/* HSK4 One — Production interface, October 2026. Progressive enhancement: all original data and controls remain. */
:root{--bg:#f5f7f9;--card:#fff;--ink:#142537;--muted:#607284;--line:#dfe7ee;--brand:#126b68;--brand2:#0e8b83;--soft:#e8f5f1;--green:#11846b;--red:#bb5263;--amber:#af752a;--shadow:0 8px 32px rgba(22,48,64,.05)}
body{background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft Yahei",sans-serif;letter-spacing:-.005em}
body.dark{--bg:#0c171c;--card:#14242d;--ink:#e9f4f5;--muted:#9bafb6;--line:#29414b;--brand:#77d7c6;--brand2:#57b7ac;--soft:#213d40;--green:#72dab6;--red:#ff9da6;--amber:#edc27b;--shadow:0 10px 34px #0003}
button{transition:background .18s,border .18s,transform .18s,box-shadow .18s;font-weight:700}button:hover:not(:disabled){border-color:var(--brand)}button.primary{background:#146e69;border-color:#146e69;color:#fff;box-shadow:0 3px 10px #0e78721a}button.primary:hover:not(:disabled){background:#105c58;border-color:#105c58;box-shadow:0 7px 16px #0e78722a}body.dark button.primary{background:#2c9188;border-color:#2c9188}input:focus,select:focus,textarea:focus{border-color:var(--brand)}a{color:var(--brand)}
.topbar{height:76px;padding:0 clamp(18px,3vw,72px);gap:28px;background:color-mix(in srgb,var(--card) 94%,transparent);backdrop-filter:blur(16px);box-shadow:0 1px 0 var(--line);border:0}
.brand{font-size:21px;letter-spacing:-.055em}.brand .logo,.logo{background:linear-gradient(145deg,#126c68,#21a69b);border-radius:13px;color:#fff;box-shadow:0 5px 12px #197c7140;width:39px;height:39px;transform:rotate(-5deg)}.brand span span{color:var(--brand)}.topnav{display:flex;gap:4px;align-items:center;flex:1;justify-content:center}.topnav button{font-size:13px;font-weight:700;border:0;background:transparent;color:var(--muted);padding:11px 14px;border-radius:10px}.topnav button:hover,.topnav button.active{color:var(--brand);background:var(--soft)}.top-actions{gap:10px}.top-actions .mini{background:var(--bg);border-radius:11px;width:38px;height:38px;font-size:17px}
.container{max-width:1712px;width:100%;padding:clamp(22px,2.4vw,46px) clamp(22px,3.2vw,64px) 130px;margin:0 auto}.section{animation:studioIn .2s ease both}@keyframes studioIn{from{opacity:.76;transform:translateY(7px)}to{opacity:1;transform:none}}
.cardpanel{border-radius:19px;border-color:var(--line);box-shadow:0 3px 15px #16394807}.eyebrow{color:var(--brand);font-size:11px;letter-spacing:.125em}.tag{color:var(--brand)}.controls select,.controls input{width:100%;min-height:47px;border:1px solid var(--line);border-radius:12px;font-weight:600;padding:11px 13px}.controls .smalllabel{color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.08em}.headline h1,.workspace-header h1{letter-spacing:-.055em;font-weight:800}.headline p{font-size:14px}
/* Home: symmetric 12-column composition */
.studio-kicker{display:flex;gap:10px;align-items:center;color:var(--brand);font-size:11px;font-weight:850;letter-spacing:.14em;margin-bottom:20px}.kicker-dot,.live-dot{height:8px;width:8px;border-radius:50%;background:#23af92;box-shadow:0 0 0 4px #23af9216}.hero-date{margin-left:auto;color:var(--muted);background:var(--card);border:1px solid var(--line);border-radius:50px;padding:8px 14px;letter-spacing:.09em}
.home-hero{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(340px,.82fr);border:1px solid #d8e6e6;border-radius:30px;background:linear-gradient(133deg,#fff 12%,#f2faf8 100%);min-height:407px;overflow:hidden;box-shadow:0 10px 35px #244b3d0a}.home-hero-copy{padding:clamp(35px,4vw,66px);display:flex;flex-direction:column;align-items:flex-start;justify-content:center;position:relative;z-index:2}.home-topline{color:var(--brand);font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.home-hero h1{font-size:clamp(38px,3.5vw,64px);line-height:1.11;letter-spacing:-.067em;font-weight:820;margin:15px 0 18px}.home-hero h1 em{color:#18877d;font-style:normal}.home-hero p{color:#64788a;font-size:15px;line-height:1.8;max-width:610px;margin:0 0 25px}.hero-actions{display:flex;gap:11px;flex-wrap:wrap}.hero-actions button{min-height:49px;padding:12px 21px}.hero-actions span,.home-note button span{margin-left:11px}.hero-outline{border:1px solid #cddbdc;background:#fff;color:#31495b}.home-hero-foot{display:flex;gap:20px;flex-wrap:wrap;margin-top:31px;color:#627c83;font-size:11px;font-weight:650}
.home-hero-art{background:radial-gradient(circle at 58% 40%,#208f8170,transparent 53%),linear-gradient(135deg,#0e403d,#125e5b);position:relative;overflow:hidden;color:#fff;padding:33px;display:flex;flex-direction:column;justify-content:space-between}.home-hero-art::before,.home-hero-art::after{content:'';position:absolute;width:410px;height:410px;border:1px solid #ffffff15;border-radius:50%;top:0;left:19%}.home-hero-art::after{width:570px;height:570px;top:-75px;left:3%;border-color:#ffffff12}.art-caption{display:flex;justify-content:space-between;font-weight:800;font-size:10px;letter-spacing:.16em;color:#b8e1da;z-index:1}.art-caption span{font-variant-numeric:tabular-nums}.art-hanzi{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%) rotate(-10deg);font-size:clamp(110px,13vw,210px);font-weight:600;white-space:nowrap;color:#ffffffdf;letter-spacing:-.19em;text-shadow:0 15px 70px #001b263b;pointer-events:none}.art-hanzi span{color:#a8dbcc}.art-line{position:absolute;height:1px;left:40px;right:40px;bottom:104px;background:#ffffff2d}.art-sample{display:flex;align-items:center;gap:12px;position:relative;z-index:1;margin-top:auto;padding:13px 16px;background:#ffffff18;border:1px solid #ffffff28;border-radius:16px;backdrop-filter:blur(16px)}.art-icon{width:38px;height:38px;display:grid;place-items:center;background:#eafff017;color:#d0fae9;border-radius:10px}.art-sample b{display:block;font-size:13px}.art-sample small{display:block;font-size:11px;color:#b5d9d4;margin-top:2px}.art-arrow{margin-left:auto}.art-outline{position:absolute;right:12px;bottom:-60px;font-size:220px;opacity:.035;font-weight:900;line-height:1}
.home-section-top{display:flex;justify-content:space-between;align-items:end;gap:14px;margin:34px 0 16px}.home-section-top h2{font-size:24px;letter-spacing:-.05em;margin:4px 0 0;font-weight:800}.muted-lite{color:#8da0a8;font-size:15px;font-weight:500;letter-spacing:-.02em}.home-mini-status{color:var(--muted);font-size:11px;display:flex;gap:10px;align-items:center}.section-descriptor{font-size:12px;color:var(--muted)}.home-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.metric-card{display:flex;flex-direction:column;min-height:169px;background:var(--card);border:1px solid var(--line);border-radius:19px;padding:20px 21px;box-shadow:var(--shadow)}.metric-top{display:flex;align-items:center;justify-content:space-between;gap:9px;color:#8b9aa5;font-size:10px;font-weight:800;letter-spacing:.06em}.metric-icon{width:31px;height:31px;background:#dff5ec;color:#137b69;border-radius:9px;display:grid;place-items:center;font-size:17px;font-weight:900}.metric-icon.warm{background:#fff0dd;color:#b37a36}.metric-icon.purple{background:#ece8ff;color:#7965bc}.metric-icon.teal{background:#e4f5f4;color:#14817e}.metric-card .big-num{font-size:41px;margin:17px 0 4px;color:var(--ink)}.metric-card p{font-size:14px;font-weight:750;margin:0 0 10px}.metric-foot{font-size:11px;color:var(--muted);margin-top:auto}.feature-word{font-size:clamp(21px,1.75vw,28px);font-weight:800;letter-spacing:-.045em;margin:16px 0 20px}.metric-feature .progressbar{height:8px;margin-bottom:12px;background:#e4ecee}.metric-feature .progressbar span{background:linear-gradient(90deg,#14877d,#52bbad)}
.home-workspaces{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.workspace-card{display:flex;align-items:flex-start;flex-direction:column;min-width:0;min-height:249px;text-align:left;border:1px solid var(--line);background:var(--card);border-radius:20px;padding:23px;box-shadow:var(--shadow)}.workspace-card:hover{transform:translateY(-3px);border-color:#a9d2ca!important;box-shadow:0 14px 34px #17504412}.ws-icon{width:46px;height:46px;display:grid;place-items:center;font-size:24px;border-radius:14px;font-weight:750}.ws-teal{background:#e3f5ee;color:#0b8072}.ws-blue{background:#eaf1ff;color:#4975ad}.ws-violet{background:#f2eaff;color:#8462b8}.ws-amber{background:#fdf0dd;color:#b17d37}.ws-tag{font-size:9px;letter-spacing:.12em;font-weight:900;color:#8797a6;margin:18px 0 5px}.workspace-card h3{font-size:20px;font-weight:800;margin:0;letter-spacing:-.04em;width:100%;display:flex;justify-content:space-between}.workspace-card h3 span{color:var(--brand);font-size:16px}.workspace-card p{font-size:12px;color:var(--muted);line-height:1.65;margin:8px 0 20px}.ws-bottom{margin-top:auto;width:100%;border-top:1px solid var(--line);padding-top:13px;display:flex;justify-content:space-between;color:var(--brand);font-weight:750;font-size:12px}.home-note{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:20px 25px;margin-top:18px;border-radius:17px;background:#edf4f3;border:1px solid #dfe9e6}.home-note strong{font-size:14px}.home-note p{font-size:12px;color:#72858d;margin:4px 0 0}.home-note button{background:var(--card);border-color:#cddedb;color:var(--brand);white-space:nowrap}
/* Shared workspace headings */
.workspace-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px;padding:8px 0 10px}.workspace-header h1{font-size:clamp(31px,3vw,48px);line-height:1.12;margin:10px 0 10px}.workspace-header h1 span{color:#22a192}.workspace-header p{color:var(--muted);font-size:14px;line-height:1.75;margin:0;max-width:640px}.workspace-header-stat{width:123px;height:96px;background:var(--card);border:1px solid var(--line);border-radius:18px;display:flex;align-items:center;justify-content:center;flex-direction:column;flex-shrink:0}.workspace-header-stat b{font-size:33px;line-height:1.2;letter-spacing:-.04em}.workspace-header-stat span{color:var(--muted);font-size:11px}
/* Reading workspace — fluid 2-column layout */
.practice-layout{display:grid;grid-template-columns:minmax(250px,325px) minmax(0,1fr);gap:22px;align-items:start}.practice-sidebar{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:22px;position:sticky;top:99px;box-shadow:var(--shadow)}.aside-header{display:flex;align-items:center;gap:11px;border-bottom:1px solid var(--line);padding:0 0 18px}.aside-icon{background:#e6f5f0;color:#147d74;border-radius:12px;font-size:24px;width:43px;height:43px;display:grid;place-items:center}.aside-header strong{display:block;font-size:14px}.aside-header small{color:var(--muted);display:block;font-size:11px;margin-top:2px}.practice-sidebar .controls{display:grid;gap:17px;margin:22px 0}.practice-sidebar .controls button{min-height:49px;display:flex;justify-content:space-between;align-items:center;padding-inline:18px}.sidebar-separator{border-top:1px solid var(--line);margin:22px 0}.aside-tip{border-radius:16px;padding:18px;background:linear-gradient(140deg,#eaf8f3,#f1f6fc)}.tip-number{color:#168b77;font-size:10px;font-weight:900;letter-spacing:.1em}.aside-tip h3{font-size:17px;letter-spacing:-.04em;margin:9px 0}.aside-tip p{font-size:12px;line-height:1.75;color:#698188;margin:0}.aside-note{color:var(--muted);font-size:11px;line-height:1.7;border:0;padding:10px 0 0;background:transparent}.reading-main{min-width:0}.reading-intro-row{display:flex;justify-content:space-between;align-items:center;margin:5px 3px 17px;gap:15px}.reading-intro-row h2{font-size:21px;letter-spacing:-.045em;margin:3px 0 0}.reading-session-tag{background:var(--soft);border-radius:99px;padding:8px 13px;font-size:10px;font-weight:850;color:var(--brand)}.reading-main .cardpanel{border-radius:24px;padding:clamp(23px,2.5vw,37px);min-height:340px;box-shadow:var(--shadow)}.reading-main .question{font-size:clamp(23px,2.2vw,32px);font-weight:650;line-height:1.8;margin:22px 0 28px;letter-spacing:.01em}.reading-main .bank-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.reading-main .bank-grid button{min-height:67px;border-radius:13px;padding:12px 15px;text-align:left;background:var(--card)}.reading-main .bank-grid button:hover{background:var(--soft)}.reading-main .bank-grid .letter{background:var(--soft);border-radius:7px;color:var(--brand);padding:4px 8px;margin-right:8px}.reading-main .quiz-count{background:var(--soft);padding:6px 10px;border-radius:9px;color:var(--brand);font-weight:800;font-size:12px}.reading-main .meter{background:#edf1f3;height:6px}.reading-main .meter i{background:#159486}.reading-main .notice{background:#ecf8f1;border-color:#b9e4d1;color:#197656}.reading-main .cardpanel>.row:last-child{padding-top:10px}.reading-main .cardpanel>.row:last-child button{min-height:42px}
/* Writing library */
.writing-banner{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(300px,.65fr);background:linear-gradient(113deg,#143e46,#1c6863);border-radius:25px;overflow:hidden;color:#fff;min-height:280px}.writing-banner>div:first-child{padding:clamp(24px,3.5vw,44px)}.banner-kicker{color:#9cded1;font-size:10px;letter-spacing:.16em;font-weight:850}.writing-banner h2{font-size:clamp(26px,2.5vw,38px);line-height:1.15;letter-spacing:-.053em;margin:12px 0}.writing-banner p{color:#c0dcd9;font-size:12px;line-height:1.75;max-width:600px;margin:0}.writing-banner-pills{display:flex;flex-wrap:wrap;gap:15px;color:#badbd3;font-size:11px;margin-top:25px}.writing-banner-graphic{position:relative;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 48% 49%,#ffffff1e,transparent 61%)}.writing-banner-graphic::before{content:'写';font-size:240px;color:#ffffff0c;position:absolute;transform:rotate(-13deg)}.graphic-paper{background:#fff;border:1px solid #eef4f3;border-radius:17px;display:grid;gap:12px;color:#12343a;padding:24px 25px;min-width:260px;position:relative;transform:rotate(5deg);box-shadow:0 23px 30px #0002}.graphic-paper span{color:#789093;font-size:12px}.graphic-paper strong{font-size:24px;letter-spacing:.05em;font-family:"PingFang SC","Microsoft Yahei",sans-serif}.graphic-paper small{color:#668285}.graphic-check{background:#22aa90;position:absolute;right:-12px;bottom:-14px;border-radius:50%;width:41px;height:41px;display:grid;place-items:center;color:#fff;font-size:23px;box-shadow:0 5px 15px #154a4744}.writing-library-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:32px 0 16px}.writing-library-head h2{font-size:24px;letter-spacing:-.045em;margin:5px 0}.writing-library-head p{font-size:12px;color:var(--muted);margin:0;max-width:900px;line-height:1.6}.writing-search{display:flex;align-items:center;gap:8px;background:var(--card);border:1px solid var(--line);border-radius:12px;min-width:222px;padding:0 12px;color:var(--muted)}.writing-search span{font-size:22px}.writing-search input{width:100%;border:0;background:transparent;outline:0;padding:12px 0}.writing-papers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.writing-paper{display:flex;flex-direction:column;text-align:left;min-width:0;min-height:232px;padding:21px 22px;border:1px solid var(--line);border-radius:19px;background:var(--card);box-shadow:var(--shadow)}.writing-paper:hover{transform:translateY(-3px);box-shadow:0 15px 30px #1e4a4512;border-color:#93cbc2!important}.wp-number{font-size:10px;font-weight:850;color:var(--brand);letter-spacing:.12em;display:flex;justify-content:space-between}.wp-number span:last-child{color:#91a3ad}.wp-hanzi{font-size:22px;font-weight:850;margin:13px 0 8px;letter-spacing:-.04em}.wp-sub{color:var(--muted);font-size:11px;line-height:1.65}.wp-lower{display:flex;justify-content:space-between;margin-top:auto;padding-top:16px;border-top:1px solid var(--line);align-items:center}.wp-meta{font-size:10px;color:var(--muted)}.wp-action{color:var(--brand);font-size:12px;font-weight:800}.writing-paper.done{background:linear-gradient(160deg,var(--card),#eef8f5);border-color:#bde0d7}.writing-advanced{margin:22px 0;border:1px solid var(--line);background:var(--card);border-radius:16px;padding:14px 19px}.writing-advanced summary{cursor:pointer;font-size:12px;font-weight:750;color:var(--muted);list-style:none}.writing-advanced summary::-webkit-details-marker{display:none}.writing-advanced summary span{float:right}.writing-advanced[open] summary{color:var(--brand);padding-bottom:12px}.writing-advanced .controls{margin:12px 0;align-items:end}.writing-advanced .controls label{flex:1;min-width:170px}.writing-advanced .controls button{min-height:47px}.writing-area:empty{display:none}
/* Writing active workspace */
.writing-active-head{border:1px solid var(--line);background:var(--card);border-radius:20px;padding:21px 25px;margin-bottom:17px;display:flex;align-items:center;justify-content:space-between;gap:18px}.writing-active-head h2{margin:5px 0;font-size:26px;letter-spacing:-.045em}.writing-active-head p{color:var(--muted);font-size:12px;margin:0}.writing-active-head button{white-space:nowrap}.writing-workspace{display:grid;grid-template-columns:minmax(220px,290px) minmax(0,1fr);gap:18px;align-items:start}.writing-progress-side{border:1px solid var(--line);background:var(--card);border-radius:20px;padding:20px;position:sticky;top:95px}.writing-progress-side h3{font-size:14px;margin:0 0 6px}.writing-progress-side p{font-size:11px;color:var(--muted);margin:0 0 17px}.writing-q-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.writing-q-grid button{border-radius:10px;min-width:0;padding:10px 2px;background:var(--bg);border:1px solid var(--line);font-size:12px}.writing-q-grid button.current{background:var(--brand);color:#fff;border-color:var(--brand)}.writing-q-grid button.completed:not(.current){background:#e5f8f0;color:#118168;border-color:#b9e6d5}.writing-aside-stat{border-top:1px solid var(--line);padding-top:17px;margin-top:20px}.writing-aside-stat strong{display:block;font-size:27px}.writing-aside-stat small{color:var(--muted);font-size:11px}.writing-aside-note{color:var(--muted);font-size:11px;line-height:1.65;margin-top:15px}.writing-question-card{border:1px solid var(--line);background:var(--card);border-radius:21px;padding:clamp(22px,2.6vw,36px);box-shadow:var(--shadow);min-width:0}.writing-q-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.writing-q-head .tag{background:var(--soft)}.writing-question-card h2{margin:17px 0 15px;font-size:clamp(20px,2vw,26px);letter-spacing:-.03em}.writing-intro{font-size:12px;color:var(--muted);line-height:1.65;margin:0 0 15px}.writing-chunks{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.writing-chunks button{border:1px solid #d5e2e4;background:#f7fafb;border-radius:10px;padding:12px 17px;font-size:clamp(17px,1.65vw,21px);font-weight:650}.writing-chunks button:hover{background:#eaf6f2;border-color:#83bdb1!important}.writing-answer-drop{background:#f3f8f7;border:1px dashed #b0d3ce;padding:19px;border-radius:14px;margin-top:23px;min-height:111px}.writing-answer-drop .writing-chunks{min-height:45px;margin-top:10px}.writing-answer-drop button{background:#fff;color:#146b65}.writing-picture{display:block;width:100%;max-width:590px;max-height:325px;object-fit:contain;background:#fff;border:1px solid #e5edf0;border-radius:14px;margin:16px auto}.writing-question-card textarea{min-height:115px;font-size:19px;line-height:1.65}.writing-model{border-radius:14px;background:#e9f7f0;border:1px solid #badfd3;padding:18px 20px;margin-top:16px;color:#164b42}.writing-model .cn{font-size:clamp(21px,2vw,27px);font-weight:700;margin:9px 0}.writing-model .muted{color:#52796c}.writing-grades{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}.writing-grades button{flex:1;min-width:90px}.writing-bottom-nav{display:flex;justify-content:space-between;gap:12px;padding-top:22px;margin-top:22px;border-top:1px solid var(--line)}.writing-bottom-nav button{min-height:45px;padding-inline:20px}.writing-bottom-nav button:last-child{margin-left:auto}.writing-submitbar{display:flex;justify-content:space-between;align-items:center;gap:14px;border:1px solid var(--line);border-radius:16px;background:var(--card);padding:15px 19px;margin-top:16px}.writing-submitbar .meter{flex:1;background:#e8efef;max-width:310px}.writing-submitbar .meter i{background:#1e988b}.writing-results h2{font-size:clamp(24px,3vw,36px);margin:10px 0}.writing-result-metric{font-size:60px;line-height:1.1;color:var(--brand);font-weight:850;letter-spacing:-.06em}.writing-result-lines{display:grid;gap:10px;margin-top:21px}.writing-result-line{display:flex;justify-content:space-between;gap:13px;padding:12px 15px;background:var(--bg);border-radius:12px;font-size:13px}.writing-result-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
/* Flash: premium, functional split studio */
#page-flash{min-height:calc(100dvh - 135px)}.flash-full{display:grid;grid-template-columns:minmax(265px,325px) minmax(0,1fr);gap:22px;align-items:stretch;position:relative;max-width:none;margin:0;min-height:min(790px,calc(100dvh - 140px));padding:0;background:transparent;overflow:visible}.flash-head{background:var(--card);border:1px solid var(--line);border-radius:24px;padding:29px;display:flex;flex-direction:column;gap:0;min-width:0;box-shadow:var(--shadow)}.flash-side-top .eyebrow{font-size:10px}.flash-side-top h1{font-size:clamp(28px,2.4vw,36px);letter-spacing:-.065em;line-height:1.14;margin:18px 0 12px}.flash-side-top h1 span{color:var(--brand)}.flash-side-top p{font-size:12px;line-height:1.8;color:var(--muted);margin:0}.flash-side-controls .controls{display:grid;gap:17px;margin:26px 0 20px}.flash-head .smalllabel{font-size:10px;color:var(--muted);font-weight:850;letter-spacing:.07em}.flash-head select{margin-top:5px;width:100%;min-height:47px;background:var(--bg);border-radius:11px;padding:10px}.flash-filter-title{font-size:10px;color:var(--muted);font-weight:850;letter-spacing:.08em;margin-bottom:12px}.flash-head .chiprow{display:flex;flex-wrap:wrap;gap:8px}.flash-head .chiprow .chip{border-radius:9px;padding:8px 12px;font-size:11px;background:var(--bg);border:1px solid var(--line);color:var(--muted)}.flash-head .chiprow .selected{background:#e4f4ef;border:1px solid #96cfbe;color:#146e66}.flash-side-footer{border-top:1px solid var(--line);margin-top:auto;padding-top:20px;display:flex;gap:11px;align-items:start;color:var(--muted)}.flash-side-footer strong{font-size:12px;color:var(--ink);display:block;margin:0 0 5px}.flash-side-footer small{font-size:11px;line-height:1.7;display:block}.flash-guide-icon{background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:9px;font-size:18px}
.flash-shell{display:flex;flex-direction:column;gap:14px;min-height:0;max-width:none;width:100%;margin:0;background:linear-gradient(137deg,#eef7f5,#edf4f8);border:1px solid #dfebeb;border-radius:24px;padding:24px;box-shadow:var(--shadow)}.flash-progress{display:flex;align-items:center;justify-content:space-between;color:var(--ink);padding:3px 5px}.flash-progress #cardCount{font-size:13px;font-weight:850}.flash-progress #cardStats{font-size:11px;color:var(--muted)}.flash-stage{position:relative;display:flex;flex:1;min-height:300px;align-items:stretch;justify-content:center}.stage-glow{position:absolute;inset:5% 15%;background:radial-gradient(ellipse,#1c9f9252,transparent 70%);filter:blur(30px);pointer-events:none}.study-card{min-height:345px;min-width:0;width:100%;max-width:940px;border:1px solid #d7e8e7;background:var(--card);border-radius:23px;padding:clamp(23px,3.8vw,60px);box-shadow:0 16px 46px #164b4c14;flex:1;overflow:auto;justify-content:center;display:flex;flex-direction:column;position:relative;touch-action:pan-y}.study-card:focus-visible{outline:3px solid var(--brand)}.study-card:after{content:'';position:absolute;right:-80px;bottom:-150px;width:270px;height:270px;border-radius:50%;border:33px solid #e4f5ef66;pointer-events:none}.study-card .wordtag{position:absolute;top:22px;left:24px;border-radius:9px;background:var(--soft);color:var(--brand);font-size:10px;letter-spacing:.08em;padding:6px 10px}.study-card .audio-in-card{position:absolute;top:18px;right:20px;border:1px solid var(--line);background:var(--bg);border-radius:11px;padding:9px 13px;font-size:11px;color:var(--brand)}.study-card #flashContent{width:100%;position:relative;z-index:2;margin:auto;min-width:0}.study-card .front-main{font-size:clamp(70px,7.7vw,135px);line-height:1.34;color:var(--ink);letter-spacing:.035em;font-weight:670;word-break:break-word}.study-card .front-py{font-size:20px;color:var(--brand);margin-top:3px;letter-spacing:.04em}.study-card .flip-hint{font-size:12px;color:#849aa0;margin-top:27px}.study-card .back-main{font-size:clamp(40px,4vw,65px);line-height:1.18;font-weight:700}.study-card .back-py{font-size:18px;color:var(--brand);margin:7px 0 12px}.study-card .back-meaning{font-size:clamp(19px,2.2vw,27px);font-weight:730;color:var(--ink);line-height:1.4}.study-card .back-example{font-size:clamp(19px,2vw,25px);margin-top:20px;color:var(--ink);font-weight:600}.study-card .back-example-py{font-size:12px;line-height:1.5;color:var(--brand);margin-top:5px}.study-card .back-english{font-size:13px;line-height:1.65;color:var(--muted);margin-top:5px}.flash-btns{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;flex-shrink:0}.flash-btns button{min-width:0;display:flex;align-items:center;justify-content:center;gap:8px;min-height:60px;border-radius:14px;font-size:14px;background:#fff;border:1px solid #d8e4e7;color:#243b4c}.flash-btns .hard{color:#ae5664;background:#fff5f6;border-color:#efd7db}.flash-btns .secondary{color:#4c739e;background:#f3f7ff;border-color:#dae5f6}.flash-btns .good{color:#23836c;background:#effbf5;border-color:#cbeada}.flash-btns .primary{color:#fff;background:#126c68;border-color:#126c68}.flash-btns .rate-ic{font-size:19px}.flash-btns small{opacity:.6;font-size:11px;margin-left:auto}.flash-foot{display:flex;justify-content:center;gap:10px;padding:0 0 3px;flex-shrink:0}.flash-foot button{min-width:108px;background:transparent;color:var(--muted);border:1px solid transparent;font-size:12px;padding:7px}.flash-foot button:hover{background:var(--card);border-color:var(--line)}
/* Libraries / exam */
#page-library .headline,#page-settings .headline{margin-bottom:24px}#page-library .headline h1,#page-settings .headline h1{font-size:clamp(29px,3vw,43px)}#page-library>.controls{background:var(--card);padding:20px;border-radius:19px;border:1px solid var(--line);display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px;margin-bottom:22px}#page-library>.controls .smalllabel input,#page-library>.controls select{min-height:46px}#page-library .cardpanel{padding:24px}#page-library .library-scroll{max-height:520px}#page-settings>.cardpanel{max-width:none;gap:23px;padding:clamp(25px,3vw,46px)}#page-settings>.cardpanel>h2{font-size:19px;margin:0}#page-settings .notice{font-size:13px}
.exam-studio{max-width:none;width:100%;padding-bottom:125px}.exam-paper-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.exam-paper-card{min-height:292px;padding:26px;border-radius:22px}.exam-paper-card h3{font-size:21px}.exam-library-hero h1{font-size:clamp(35px,3.5vw,54px)}.exam-overview{padding:29px}.exam-work-area{max-width:1180px}.exam-question{padding:clamp(21px,2.5vw,34px)}.exam-main-head{padding:28px}.exam-bottom{padding-left:max(25px,calc((100vw - 1560px)/2));padding-right:max(25px,calc((100vw - 1560px)/2))}
/* Dark mode: composed, not flat black */
body.dark .home-hero{background:linear-gradient(135deg,#182f38,#1b3035);border-color:var(--line)}body.dark .home-hero p,body.dark .home-hero-foot{color:var(--muted)}body.dark .home-hero h1 em{color:#7ee1cb}body.dark .hero-outline{background:#223943;color:#c8dddd;border-color:var(--line)}body.dark .home-note{background:#1a3439;border-color:var(--line)}body.dark .home-note p{color:#a3b8b8}body.dark .metric-card,body.dark .workspace-card,body.dark .writing-paper{background:var(--card)}body.dark .flash-shell{background:linear-gradient(135deg,#1a353a,#1d2c36);border-color:var(--line)}body.dark .study-card{border-color:var(--line)}body.dark .flash-btns button:not(.primary){background:var(--card)}body.dark .flash-head .chiprow .selected{background:#26433e;color:#92ead4}body.dark .aside-tip{background:#233e40}body.dark .aside-tip p{color:var(--muted)}body.dark .graphic-paper,body.dark .art-sample{color:#173f3d}body.dark .reading-main .bank-grid button{background:var(--card)}body.dark .writing-answer-drop{background:#24383c;border-color:#416c68}body.dark .writing-chunks button{background:#253840;border-color:#48676c;color:var(--ink)}body.dark .writing-answer-drop button{background:#1b4442}body.dark .writing-model{background:#183e38;color:#bce9d9;border-color:#325e55}body.dark .writing-q-grid button.completed:not(.current){background:#1e493f;color:#bce9d9}body.dark .writing-paper.done{background:linear-gradient(125deg,#152d2b,#1b3b38)}body.dark .metric-feature .progressbar,body.dark .reading-main .meter{background:#2a4047}
@media(min-width:1700px){.container{max-width:1775px}.home-hero{min-height:440px}.home-workspaces{gap:20px}.practice-layout{grid-template-columns:350px minmax(0,1fr)}.flash-full{grid-template-columns:350px minmax(0,1fr)}.reading-main .cardpanel{min-height:480px}}
@media(max-width:1200px){.home-stats,.home-workspaces{grid-template-columns:repeat(2,minmax(0,1fr))}.writing-papers{grid-template-columns:repeat(3,minmax(0,1fr))}.flash-full{grid-template-columns:285px minmax(0,1fr)}.flash-head{padding:21px}.flash-shell{padding:17px}.practice-layout{grid-template-columns:280px minmax(0,1fr)}.topbar{gap:12px}.topnav button{padding:9px 10px}}
@media(max-width:900px){.container{padding:24px 22px 115px}.home-hero{grid-template-columns:1.25fr .75fr}.home-hero-copy{padding:30px}.home-hero-art{padding:22px}.home-hero h1{font-size:clamp(34px,4.2vw,50px)}.writing-papers{grid-template-columns:repeat(2,minmax(0,1fr))}.writing-workspace{grid-template-columns:1fr}.writing-progress-side{position:relative;top:auto}.writing-q-grid{grid-template-columns:repeat(15,minmax(35px,1fr));overflow-x:auto}.writing-q-grid button{min-width:35px}.practice-layout{grid-template-columns:1fr}.practice-sidebar{position:relative;top:0}.practice-sidebar .controls{grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.practice-sidebar .controls button{grid-column:1/-1}.practice-sidebar .controls .smalllabel{min-width:0}.aside-tip{display:none}.flash-full{grid-template-columns:1fr;min-height:0}.flash-head{display:block}.flash-side-top{display:none}.flash-side-controls{display:flex;align-items:center;gap:16px}.flash-side-controls .controls{grid-template-columns:repeat(2,minmax(0,1fr));flex:1;display:grid;margin:0}.flash-head .chiprow{max-width:250px}.flash-side-footer{display:none}.flash-shell{min-height:510px}.exam-paper-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){:root{--navH:67px}.topbar{height:58px;padding:0 15px}.brand{font-size:17px}.brand .logo{width:32px;height:32px}.container{padding:18px 15px calc(97px + env(safe-area-inset-bottom,0px))}.section{animation:none}.studio-kicker{font-size:9px;margin:7px 0 14px}.hero-date{font-size:9px;padding:6px 9px}.home-hero{grid-template-columns:1fr;border-radius:21px}.home-hero-copy{padding:28px 23px}.home-hero h1{font-size:clamp(33px,8vw,47px);margin:10px 0 13px}.home-hero p{font-size:13px;line-height:1.65;margin-bottom:19px}.hero-actions{width:100%;gap:8px}.hero-actions button{flex:1;white-space:nowrap;min-height:46px;font-size:11px;padding:9px}.home-hero-foot{margin-top:19px;gap:10px;font-size:9px}.home-hero-art{height:195px;padding:18px}.art-hanzi{top:52%;font-size:130px}.art-line{display:none}.art-sample{max-width:290px;padding:8px 12px}.art-sample b{font-size:11px}.art-sample small{font-size:9px}.art-icon{width:30px;height:30px}.home-section-top{margin:26px 0 12px}.home-section-top h2{font-size:21px}.muted-lite,.home-mini-status,.section-descriptor{display:none}.home-stats{gap:9px}.metric-card{min-height:139px;padding:15px;border-radius:16px}.metric-top{font-size:8px}.metric-icon{width:26px;height:26px;font-size:14px}.metric-card .big-num{font-size:33px;margin:14px 0 4px}.metric-card p{font-size:12px}.metric-foot{font-size:9px}.feature-word{font-size:19px;margin:10px 0 15px}.home-workspaces{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.workspace-card{padding:16px;min-height:209px;border-radius:16px}.ws-icon{width:37px;height:37px;font-size:20px}.ws-tag{font-size:8px;line-height:1.35;min-height:20px;margin:15px 0 4px}.workspace-card h3{font-size:16px}.workspace-card p{font-size:10px;line-height:1.65;margin:7px 0 15px}.ws-bottom{font-size:9px;padding-top:11px}.home-note{padding:16px;gap:10px}.home-note strong{font-size:11px}.home-note p{font-size:10px}.home-note button{font-size:10px;padding:8px;white-space:normal}.workspace-header{padding:5px 0 8px;margin-bottom:12px}.workspace-header h1{font-size:29px}.workspace-header p{font-size:12px}.workspace-header-stat{width:80px;height:76px;border-radius:14px}.workspace-header-stat b{font-size:25px}.workspace-header-stat span{font-size:9px}.practice-layout{display:block}.practice-sidebar{padding:15px;border-radius:16px;margin-bottom:16px}.practice-sidebar .controls{margin:14px 0 4px;gap:9px}.practice-sidebar .controls button{min-height:43px}.aside-header{padding-bottom:11px}.sidebar-separator,.aside-note{display:none}.reading-intro-row{margin-bottom:10px}.reading-intro-row h2{font-size:18px}.reading-session-tag{font-size:8px}.reading-main .cardpanel{padding:19px;border-radius:18px;min-height:330px}.reading-main .question{font-size:22px;margin:16px 0;line-height:1.85}.reading-main .bank-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.reading-main .bank-grid button{min-height:56px;padding:10px;border-radius:10px}.reading-main .bank-grid button .cn{font-size:17px!important}.reading-main .cardpanel .row.between{flex-wrap:wrap}.writing-banner{grid-template-columns:1fr;min-height:0;border-radius:19px}.writing-banner>div:first-child{padding:25px}.writing-banner h2{font-size:26px}.writing-banner p{font-size:11px}.writing-banner-pills{font-size:9px;gap:7px;margin-top:18px}.writing-banner-graphic{display:none}.writing-library-head{display:block;margin:23px 0 12px}.writing-library-head h2{font-size:21px}.writing-library-head p{font-size:11px}.writing-search{margin-top:14px;min-width:0}.writing-papers{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.writing-paper{min-height:181px;padding:15px;border-radius:15px}.wp-number{font-size:9px}.wp-hanzi{font-size:18px;margin:12px 0 6px}.wp-sub{font-size:10px}.wp-lower{padding-top:12px}.wp-meta{font-size:9px}.wp-action{font-size:10px}.writing-advanced{padding:13px}.writing-advanced .controls{display:grid}.writing-active-head{padding:16px;border-radius:16px;margin-bottom:12px}.writing-active-head h2{font-size:21px}.writing-active-head p{font-size:10px}.writing-active-head button{padding:9px;font-size:11px}.writing-progress-side{padding:15px;border-radius:16px}.writing-progress-side p{margin-bottom:12px}.writing-q-grid{gap:4px}.writing-q-grid button{min-width:32px;font-size:10px;padding:9px 0}.writing-aside-stat,.writing-aside-note{display:none}.writing-question-card{padding:18px;border-radius:17px}.writing-question-card h2{font-size:20px;margin:13px 0}.writing-chunks button{font-size:18px;padding:10px 12px}.writing-answer-drop{padding:13px;min-height:90px}.writing-picture{max-height:230px}.writing-bottom-nav button{padding:10px;font-size:11px}.writing-submitbar{font-size:11px;padding:12px}.writing-submitbar .meter{max-width:100px}.exam-studio{padding-bottom:130px}.exam-paper-grid{grid-template-columns:1fr}.exam-paper-card{min-height:240px}.exam-work-area{max-width:100%}
/* mobile card experience: rating controls always visible, no scroll to buttons */
#page-flash{min-height:0}.flash-full{position:fixed;top:58px;bottom:calc(67px + env(safe-area-inset-bottom,0px));left:0;right:0;z-index:32;display:flex;flex-direction:column;min-height:0;height:auto;gap:0;background:var(--bg);padding:0;overflow:hidden}.flash-head{padding:8px 12px 7px;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;flex-shrink:0}.flash-side-top,.flash-side-footer,.flash-filter-title{display:none}.flash-side-controls{display:flex;flex-direction:column;gap:7px;align-items:stretch}.flash-side-controls .controls{display:flex;align-items:end;gap:8px;margin:0}.flash-side-controls .controls .smalllabel{flex:1;min-width:0;font-size:9px}.flash-side-controls .controls select{min-height:33px;height:35px;padding:4px 7px;font-size:11px;margin-top:2px}.flash-head .chiprow{display:flex;flex-wrap:nowrap;gap:5px;max-width:none;width:100%;overflow-x:auto;scrollbar-width:none;padding:0 0 2px}.flash-head .chiprow::-webkit-scrollbar{display:none}.flash-head .chiprow .chip{font-size:10px;padding:5px 10px;white-space:nowrap;flex-shrink:0}.flash-shell{flex:1;min-height:0;min-width:0;padding:9px 10px 8px;gap:8px;border:0;border-radius:0;background:var(--bg);overflow:hidden;box-shadow:none}.flash-progress{flex:0 0 auto;padding:0 3px}.flash-progress #cardCount{font-size:11px}.flash-progress #cardStats{font-size:10px;max-width:54%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flash-stage{flex:1;min-height:0;overflow:hidden;display:flex}.stage-glow{display:none}.study-card{flex:1;min-height:0;max-width:none;padding:54px 16px 18px;border-radius:20px;overflow-y:auto;box-shadow:0 6px 24px #0f475214}.study-card:after{right:-100px;bottom:-140px}.study-card .wordtag{top:14px;left:15px;font-size:8px}.study-card .audio-in-card{top:9px;right:12px;font-size:10px;padding:7px}.study-card .front-main{font-size:clamp(54px,17vw,92px)}.study-card .front-py{font-size:16px}.study-card .flip-hint{font-size:10px;margin-top:17px}.study-card .back-main{font-size:clamp(31px,10vw,49px)}.study-card .back-py{font-size:15px;margin:3px 0 6px}.study-card .back-meaning{font-size:clamp(16px,4.4vw,21px)}.study-card .back-example{font-size:clamp(16px,4.4vw,20px);margin-top:12px}.study-card .back-example-py{font-size:11px}.study-card .back-english{font-size:11px}.study-card #flashContent button{font-size:10px;padding:6px 8px;margin-top:6px!important}.flash-btns{flex:0 0 auto;gap:5px}.flash-btns button{min-height:48px;padding:5px 3px;gap:2px;flex-direction:column;border-radius:11px;font-size:10px;line-height:1.12}.flash-btns .rate-ic{font-size:17px}.flash-btns small{display:none}.flash-foot{flex:0 0 auto;gap:8px;padding:0}.flash-foot button{min-width:0;flex:1;font-size:10px;padding:5px}.mobile-nav{background:var(--card)}.mobile-nav button.active{color:var(--brand)}
#page-library>.controls{grid-template-columns:1fr;gap:8px;padding:14px}.container #page-library>.cardpanel{padding:15px}#page-library .cardpanel .row.between{flex-wrap:wrap;gap:12px}#page-library .cardpanel .row.wrap{width:100%}#page-library #quizGroup{max-width:100%}
}
@media(max-height:720px) and (max-width:700px){.flash-head{padding-block:5px}.flash-side-controls .controls select{height:30px;min-height:30px}.flash-head .chiprow .chip{padding:4px 9px}.flash-shell{padding:5px 8px;gap:5px}.study-card{padding-top:42px}.study-card .back-main{font-size:30px}.study-card .back-example{margin-top:6px}.study-card .back-english{font-size:10px}.study-card .flip-hint{margin-top:8px}.flash-btns button{min-height:41px}.flash-foot button{padding:3px}}
@media(prefers-reduced-motion:reduce){.section{animation:none}.workspace-card:hover,.writing-paper:hover{transform:none}}
/* Critical iOS layout safeguard: never allow desktop navigation to widen the mobile layout viewport. */
@media(max-width:700px){html,body{width:100%;min-width:0;max-width:100%;overflow-x:clip}.topnav{display:none!important}.topbar{width:100%;max-width:100%;min-width:0;justify-content:space-between}.top-actions{margin-left:auto;flex-shrink:0}.container{width:100%;max-width:100%;min-width:0}.flash-full,.flash-shell,.flash-head,.flash-stage,.study-card{min-width:0;max-width:100%}.flash-shell{width:100%}.flash-btns{min-width:0}.flash-btns button{min-width:0}.writing-workspace,.writing-question-card,.practice-layout,.reading-main,.reading-main .cardpanel{min-width:0;max-width:100%}}

/* UX QA patch — 2026-10-31: fix flashcard scrollbars and iPhone writing navigator. */
/* The old oversized, absolutely-positioned circle extended outside the card and
   created *both* scrollbars even when the vocabulary content was short. */
.study-card::after{display:none!important}
.study-card{overflow:hidden;overscroll-behavior:contain}
.flash-stage,.flash-shell,.flash-full{min-width:0}
.study-card #flashContent{max-width:100%;min-width:0}
/* Writing: the grid track must be allowed to shrink below its content width. */
.writing-workspace{min-width:0}
.writing-nav-row{display:block;min-width:0;max-width:100%}
.writing-nav-arrow{display:none}
.writing-submitbar .writing-end-hint{color:var(--muted);font-size:12px;font-weight:700;text-align:right}
.writing-submitbar{min-width:0}
.writing-bottom-nav{position:relative;z-index:1}
.writing-bottom-nav button{min-width:0}
@media(max-width:900px){
 .writing-workspace{grid-template-columns:minmax(0,1fr)}
 .writing-progress-side,.writing-question-card{width:100%;min-width:0;max-width:100%;overflow:hidden}
 .writing-progress-side{position:relative;top:auto}
 .writing-nav-row{display:grid;grid-template-columns:34px minmax(0,1fr) 34px;align-items:center;gap:7px;width:100%}
 .writing-nav-arrow{display:grid;place-items:center;padding:0;width:34px;height:43px;border-radius:11px;font-size:25px;color:var(--brand);background:var(--soft);border-color:var(--line);touch-action:manipulation}
 .writing-q-grid{display:flex;gap:7px;min-width:0;max-width:100%;width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:pan-x;scroll-snap-type:x proximity;padding:3px 1px 5px}
 .writing-q-grid::-webkit-scrollbar{display:none}
 .writing-q-grid button{flex:0 0 45px;min-width:45px;width:45px;min-height:43px;padding:0;scroll-snap-align:center;touch-action:manipulation}
}
@media(max-width:700px){
 .study-card{overflow-x:hidden;overflow-y:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
 .study-card::-webkit-scrollbar{display:none}
 .writing-question-card{overflow:visible}
 .writing-progress-side{overflow:hidden}
 .writing-q-grid button{font-size:12px;flex-basis:46px;min-width:46px}
 .writing-bottom-nav{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:stretch;margin-top:20px;padding-top:19px}
 .writing-bottom-nav button,.writing-bottom-nav button:last-child{width:100%;margin:0;min-height:49px;padding:10px 8px;font-size:12px;white-space:normal;overflow-wrap:break-word}
 .writing-submitbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:space-between;padding:12px 14px;margin-top:12px}
 .writing-submitbar .meter{min-width:50px;max-width:none;flex:1}
 .writing-end-hint{flex:0 0 100%;text-align:left!important;font-size:10px!important}
 .writing-workspace{min-width:0;max-width:100%}
 .writing-q-head{flex-wrap:wrap}
}
@media(max-height:690px) and (max-width:700px){
 .study-card .back-main{font-size:clamp(26px,8vw,36px)}
 .study-card .back-py{font-size:12px;margin:1px 0 3px}
 .study-card .back-meaning{font-size:15px;line-height:1.3}
 .study-card .back-example{font-size:15px;line-height:1.35;margin-top:7px}
 .study-card .back-example-py,.study-card .back-english{font-size:10px;line-height:1.3}
 .study-card .flip-hint{font-size:9px;margin-top:8px}
}

/* 2026-10-31: Center flashcard examples consistently across desktop and mobile. */
/* The word/meaning can look centered even if the example inherits a left alignment. */
.study-card #flashContent{text-align:center}
.study-card #flashContent .back-example,
.study-card #flashContent .back-example-py,
.study-card #flashContent .back-english{
  display:block;
  width:100%;
  max-width:100%;
  margin-left:auto;
  margin-right:auto;
  text-align:center;
  text-wrap:pretty;
}
.study-card #flashContent .back-example{margin-top:20px}
.study-card #flashContent .back-example-py{margin-top:5px}
.study-card #flashContent .back-english{margin-top:5px}
.study-card #flashContent button{display:inline-flex;justify-content:center;align-items:center;margin-left:auto;margin-right:auto}
@media(max-width:700px){.study-card #flashContent .back-example{margin-top:9px}}
@media(max-height:690px) and (max-width:700px){.study-card #flashContent .back-example{margin-top:7px}}

/* 2026-11-01: make nested TTS controls independent of card-flip taps on iOS/Android */
.study-card .audio-in-card, .study-card #flashContent button{touch-action:manipulation;pointer-events:auto;position:relative;z-index:5;-webkit-tap-highlight-color:transparent}
.study-card .audio-in-card{position:absolute;z-index:6}

/* Writing studio: scoped retake control, distinct from per-question Clear. */
.writing-head-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:9px;flex-shrink:0}
.writing-head-actions .writing-retake-btn{border:1px solid var(--brand);color:var(--brand);background:var(--soft)}
.writing-head-actions .writing-retake-btn:hover:not(:disabled){background:var(--card);border-color:var(--brand)}
@media(max-width:700px){.writing-active-head{flex-wrap:wrap;align-items:flex-start}.writing-head-actions{justify-content:flex-start;width:100%}.writing-head-actions button{flex:1 1 auto;min-width:0}.writing-head-actions .writing-retake-btn{white-space:normal}}
