:root {
  color-scheme: light;
  --page: #fff;
  --surface: #fff;
  --surface-inset: #f3f6f8;
  --ink: #30344d;
  --muted: #606a7c;
  --control-edge: #b7c3ce;
  --line: #dce4ea;
  --game-header: #30344d;
  --red: #bc3548;
  --answer-red: #cc3e58;
  --brand: #83d4f5;
  --header: #83d4f5;
  --on-brand: #103a50;
  --header-text: var(--on-brand);
  --brand-hover: #a1e1fa;
  --accent: #167ba9;
  --focus: var(--accent);
  --accent-edge: #49a7ce;
  --accent-line: #b7ddeb;
  --accent-soft: #eaf7fd;
  --accent-tint: #c6eafa;
  --accent-ink: #176586;
}
:root[data-theme="orange"] {
  --brand: #ffad13;
  --header: #ffad13;
  --brand-hover: #ffba37;
  --on-brand: #483317;
  --accent: #bb7000;
  --accent-edge: #df9104;
  --accent-line: #efd391;
  --accent-soft: #fff4dd;
  --accent-tint: #ffe4af;
  --accent-ink: #895b14;
}
:root[data-theme="pink"] {
  --brand: #f7abcb;
  --header: #f7abcb;
  --brand-hover: #fac0d9;
  --on-brand: #58243e;
  --accent: #b44a7a;
  --accent-edge: #d579a1;
  --accent-line: #efc0d6;
  --accent-soft: #fff0f6;
  --accent-tint: #fbd8e7;
  --accent-ink: #913560;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #151b24;
  --surface: #1d2632;
  --surface-inset: #283340;
  --ink: #edf4fa;
  --muted: #b0c0cf;
  --line: #394857;
  --control-edge: #57697a;
  --game-header: #263445;
  --red: #ff9ca8;
  --answer-red: #ff9db0;
  --brand: #80ccea;
  --header: #213343;
  --on-brand: #102a37;
  --header-text: #e4f6ff;
  --brand-hover: #9cd9f1;
  --accent: #80ccea;
  --accent-edge: #547f97;
  --accent-line: #435e71;
  --accent-soft: #233a49;
  --accent-tint: #304e60;
  --accent-ink: #a3def7;
}
:root{font-family:-apple-system,BlinkMacSystemFont,'Noto Sans JP','Hiragino Kaku Gothic ProN',sans-serif;font-size:16px;color:var(--ink);background:var(--page);font-synthesis:none;}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit;color:inherit}button,a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid var(--focus);outline-offset:3px}a{text-decoration:none;color:inherit}svg{width:21px;height:21px;vertical-align:middle;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.shell{min-height:100dvh;padding-bottom:90px}.topbar{color:var(--header-text);background:var(--header);border-bottom:4px solid var(--accent-edge)}.header-inner{max-width:850px;margin:auto;min-height:86px;padding:20px 26px;display:flex;align-items:center;justify-content:space-between}.brand{font-size:26px;font-weight:800;letter-spacing:-1px;display:flex;align-items:center;gap:13px}.brand span{font-size:14px;font-weight:600;letter-spacing:0;border-left:1px solid var(--accent-edge);padding-left:13px}.local-tag{font-size:12px;color:#654c24}.main{max-width:850px;margin:auto;padding:30px 26px 40px}.titlebar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.titlebar h1{font-size:25px;margin:0;line-height:1.5;font-weight:800;overflow-wrap:anywhere}.subtitle{color:var(--muted);font-size:14px;line-height:1.8;margin:8px 0 0}.eyebrow{display:none}.btn{display:inline-flex;gap:7px;align-items:center;justify-content:center;min-height:44px;padding:10px 17px;border:1px solid var(--control-edge);box-shadow:0 2px 0 var(--control-edge);background:var(--surface);border-radius:7px;font-weight:700;font-size:14px;white-space:nowrap;line-height:1.5}.btn:hover{background:var(--surface-inset)}.btn:active{transform:translateY(1px);box-shadow:0 1px 0 var(--control-edge)}.btn.primary{color:var(--on-brand);background:var(--brand);border-color:var(--accent-edge);box-shadow:0 2px 0 var(--accent-edge)}.btn.primary:hover{background:var(--brand-hover)}.btn.danger{color:var(--red);border-color:#df9a9e}.btn.ghost{border-color:transparent;box-shadow:none;background:none;color:var(--muted);font-weight:500}.btn.icon{padding:8px;min-width:40px}.btn.small{min-height:36px;padding:7px 12px;font-size:13px}.sectiontop{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:20px}.sectiontop h2{font-size:18px;margin:0}.sectiontop .count{font-size:13px;color:var(--muted);margin-left:8px}.search{display:flex;align-items:center;gap:10px;border:1px solid var(--control-edge);border-radius:6px;padding:11px 13px;background:var(--surface);flex:1;min-width:0}.search svg{color:var(--muted)}.search input{border:0;outline:0;width:100%;background:transparent;min-width:0;font-size:16px}.search input::placeholder{color:var(--muted)}.grid{display:block;border-top:1px solid var(--line)}.deck{display:flex;align-items:stretch;border-bottom:1px solid var(--line);background:var(--surface)}.deck-body{display:flex;gap:20px;align-items:center;justify-content:space-between;text-align:left;border:0;background:transparent;padding:23px 8px;flex:1;min-width:0}.deck-body:hover{background:var(--accent-soft)}.deck-title{font-size:19px;font-weight:600;line-height:1.7;overflow-wrap:anywhere}.deck-count{font-size:24px;font-weight:700;white-space:nowrap;min-width:60px;text-align:right}.deck-count span{font-size:16px;margin-left:2px}.dots{font-size:23px;letter-spacing:1px;padding:0 8px 0 17px;border:0;background:transparent;color:var(--muted)}.hint{font-size:13px;color:var(--muted);line-height:1.9;margin-top:22px}.resume{display:flex;justify-content:space-between;align-items:center;gap:10px;background:var(--accent-soft);border:1px solid var(--accent-line);border-radius:6px;padding:13px 16px;margin-bottom:20px;font-size:14px}.mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:5;background:var(--surface);border-top:1px solid var(--line);display:flex;justify-content:center;padding:10px 16px calc(9px + env(safe-area-inset-bottom));gap:10px}.mobile-nav button{position:relative;width:140px;border:0;background:transparent;display:flex;align-items:center;justify-content:center;gap:9px;font-size:14px;font-weight:700;padding:12px 5px;border-radius:6px;color:var(--muted);min-height:45px}.mobile-nav button.active{background:var(--accent-soft);color:var(--accent-ink)}.badge{font-size:11px;border-radius:5px;background:var(--accent-tint);color:var(--accent-ink);padding:1px 5px}.back{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;font-size:14px;padding:0;margin-bottom:24px;color:var(--muted)}.back svg{width:18px}.view-header-actions{display:flex;gap:8px;flex-shrink:0}.toolbar-line{display:flex;gap:10px}.tablewrap{border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.qrow{display:flex;gap:15px;padding:21px 4px;align-items:center;border-bottom:1px solid var(--line)}.qrow:last-child{border:0}.qnum{font-size:13px;color:var(--muted);min-width:20px}.qtext{flex:1;min-width:0}.qtext h3{font-size:16px;font-weight:500;line-height:1.85;margin:0 0 7px;overflow-wrap:anywhere}.qtext p{font-size:14px;line-height:1.7;margin:0;color:var(--muted);overflow-wrap:anywhere}.qactions{display:flex;gap:3px}.star{border:0;background:none;padding:7px;color:#a9adbd;flex-shrink:0}.star.selected{color:#e89a00}.star.selected svg{fill:#ffc54b}.tabs{display:flex;border-bottom:1px solid var(--line);margin-bottom:19px}.tabs button{flex:1;border:0;border-bottom:3px solid transparent;background:var(--surface);padding:15px 6px;font-size:14px;font-weight:600;color:var(--muted)}.tabs button.active{color:var(--accent-ink);border-bottom-color:var(--brand)}.review-caption{font-size:13px;line-height:1.8;color:var(--muted)}.empty{text-align:center;padding:55px 20px;border-bottom:1px solid var(--line)}.empty>svg{width:34px;height:34px;color:#b2b5c3}.empty h2{font-size:18px;margin:16px 0 10px}.empty p{font-size:14px;line-height:1.9;color:var(--muted);margin-bottom:23px}.stats{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--line);border-radius:6px;margin-bottom:30px}.stat{padding:20px;display:flex;align-items:center;gap:12px;border-right:1px solid var(--line)}.stat:last-child{border:0}.stat-icon{color:var(--accent-ink);flex-shrink:0}.stat-label{font-size:13px;color:var(--muted);margin-bottom:7px}.stat-value{font-size:26px;font-weight:700}.stat-value span{font-size:13px;color:var(--muted);margin-left:4px}.settingsbox{border-bottom:1px solid var(--line);padding:4px 0 24px;margin-bottom:25px}.settingsbox h2{font-size:18px;margin:0 0 12px}.setting-row{display:flex;gap:25px;justify-content:space-between;align-items:center;padding:19px 0;border-bottom:1px solid var(--line)}.setting-row:last-child{border:0}.setting-row label{font-size:15px;font-weight:600}.setting-row p{color:var(--muted);font-size:13px;line-height:1.9;margin:7px 0 0}.setting-control{display:flex;align-items:center;gap:12px;white-space:nowrap;font-size:13px}input[type=range]{accent-color:var(--accent);width:140px}input[type=checkbox]{accent-color:var(--accent);width:20px;height:20px}.info{font-size:14px;line-height:1.9;color:var(--muted);border-left:3px solid var(--brand);padding:10px 17px;margin:24px 0}.two-actions{display:flex;gap:10px;flex-wrap:wrap}.practice-shell{max-width:760px;margin:auto}.playing{padding-bottom:0}.playing .mobile-nav{display:none}.playing .main{padding-top:22px}.practice-meta{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:17px;font-size:14px;color:var(--muted)}.practice-meta>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.practice-meta>span:last-child{white-space:nowrap;flex-shrink:0}.pill{display:inline-block;font-size:12px;font-weight:500;color:var(--accent-ink);background:var(--accent-soft);border-radius:3px;padding:3px 6px}.session-progress{display:none}.quiz-card{min-height:260px;padding:0 0 16px;border-bottom:1px solid var(--line);display:flex;flex-direction:column}.q-label{display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:700;color:#fff}.q-label>span{background:var(--game-header);border-left:8px solid var(--brand);padding:7px 16px}.question-reading{font-size:25px;font-weight:600;line-height:1.95;margin:21px 0 14px;min-height:125px;overflow-wrap:anywhere;white-space:pre-wrap}.cursor{display:inline-block;height:25px;width:2px;background:#777f96;vertical-align:middle;margin-left:3px;animation:blink .9s infinite}@keyframes blink{50%{opacity:0}}.read-status{margin-top:auto;font-size:12px;color:var(--muted);line-height:1.8}.practice-controls{text-align:center;margin-top:20px}.countdown{height:40px;display:flex;justify-content:center;align-items:center;gap:7px;font-size:13px;color:var(--muted);margin-bottom:10px;font-variant-numeric:tabular-nums}.countdown strong{font-size:28px;color:var(--ink)}.countdown.urgent,.countdown.urgent strong{color:var(--red)}.buzzer{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:160px;height:160px;border-radius:50%;border:7px solid #f8d5d4;outline:1px solid #e7b8b8;background:#f15451;color:#fff;font-size:24px;letter-spacing:.07em;font-weight:800;box-shadow:0 6px 0 #c33434;user-select:none}.buzzer>svg{width:30px;height:30px}.buzzer:hover{background:#f86560}.buzzer:active{transform:translateY(4px);box-shadow:0 2px 0 #c33434}.keyboard-hint{font-size:12px;color:var(--muted);margin:24px 0 0}.keyboard-hint kbd{font:inherit;font-size:11px;padding:2px 4px;border:1px solid var(--line);border-radius:3px;margin:0 3px}.skipbar{margin-top:20px;display:flex;justify-content:center}.skipbar .btn{font-size:13px}.answer-panel{padding:22px 0;text-align:center}.answer-label{font-size:14px;color:var(--muted)}.answer-slots{font-size:27px;font-weight:700;color:var(--ink);letter-spacing:.16em;min-height:65px;margin:18px 0 20px;overflow-wrap:anywhere;line-height:1.6}.answer-slots .pending{color:#c2c6d4;font-weight:400}.choices{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:auto;max-width:550px}.choice{min-height:88px;background:var(--surface);border:2px solid var(--control-edge);border-radius:7px;box-shadow:0 3px 0 var(--control-edge);font-size:32px;font-weight:700;position:relative}@media(hover:hover) and (pointer:fine){body:not(.touch-answer) .choice:hover{background:var(--accent-soft);border-color:var(--accent-edge)}}.choice:active{transform:translateY(2px);box-shadow:0 1px 0 var(--control-edge)}.choice kbd{position:absolute;top:6px;left:9px;font:11px inherit;font-size:11px;font-weight:400;color:var(--muted)}.pass-panel{display:flex;align-items:center;flex-direction:column;gap:13px;padding:40px 15px;color:var(--muted)}.pass-panel strong{font-size:34px;letter-spacing:.15em;color:var(--muted)}.pass-panel span{font-size:14px}.result-panel{text-align:center;padding:26px 10px}.result-status{font-size:17px;font-weight:800;color:#da4848;margin-bottom:20px}.result-status.wrong{color:var(--muted)}.result-answer{font-size:28px;font-weight:800;line-height:1.8;color:#e54149;overflow-wrap:anywhere}.result-reading{font-size:14px;color:var(--muted);margin-top:5px}.result-note{font-size:15px;color:var(--muted);line-height:1.9;white-space:pre-wrap;max-width:600px;margin:20px auto}.result-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:25px}.session-summary{text-align:center;padding:30px 15px;border:0}.session-summary h2{font-size:25px}.session-summary .big{font-size:56px;font-weight:800;color:var(--accent-ink);margin:25px 0 0}.summary-stats{display:flex;justify-content:center;gap:50px;margin:20px 0}.summary-stats strong{display:block;font-size:28px;margin-bottom:6px}.summary-stats span{font-size:14px;color:var(--muted)}.field{margin-bottom:21px}.field>label{display:block;font-size:15px;font-weight:700;margin-bottom:9px}.field .optional{font-size:12px;font-weight:400;color:var(--muted);margin-left:7px}.field input,.field textarea,.field select,.input{width:100%;border:1px solid var(--control-edge);border-radius:5px;padding:12px;font-size:16px;background:var(--surface);outline:none}.field input:focus,.field textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.field textarea{min-height:130px;resize:vertical;line-height:1.8}.field small{display:block;font-size:13px;line-height:1.8;color:var(--muted);margin-top:7px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.form-titlehint{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:15px;font-weight:700}.form-error{font-size:14px;color:var(--red);line-height:1.8;margin:12px 0 0}.choice-scroll{margin:17px 0;max-height:250px;overflow:auto}.choice-edit{display:flex;align-items:center;gap:9px;margin-bottom:10px}.choice-edit .index{min-width:24px;font-size:13px;color:var(--muted)}.choice-edit input{width:48px;padding:8px 3px;text-align:center;font-size:21px}.choice-edit input:first-of-type{background:var(--accent-soft);color:var(--accent-ink)}.color-picker{display:flex;gap:12px}.color-picker button{width:32px;height:32px;border:3px solid white;outline:1px solid var(--control-edge);border-radius:50%;background:#9abca9}.color-picker button.active{outline:2px solid var(--accent)}.color-picker .blue{background:#9cb6db}.color-picker .purple{background:#c1add8}.color-picker .orange{background:#efbd67}.file-zone{display:block;background:var(--accent-soft);border:1px dashed var(--accent-line);border-radius:6px;padding:21px;font-size:15px;margin-bottom:20px}.file-zone input{display:block;margin-top:13px;max-width:100%;font-size:13px}.import-count{color:var(--accent-ink);font-size:14px;margin:18px 0}.menu-list{display:grid;gap:12px}.menu-list .btn{justify-content:flex-start}.dialog-intro{font-size:14px;color:var(--muted);line-height:1.9;margin-top:0}dialog{padding:0;border:1px solid var(--control-edge);width:min(600px,calc(100% - 28px));border-radius:10px;max-height:90dvh;color:var(--ink);box-shadow:0 15px 65px #222d4d26}dialog::backdrop{background:#20233770}.modalhead{color:var(--header-text);background:var(--header);padding:17px 22px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:2}.modalhead h2{margin:0;font-size:19px}.modalhead .btn{color:inherit}.modalbody{padding:24px}.modalfoot{display:flex;justify-content:flex-end;gap:10px;padding:17px 24px;border-top:1px solid var(--line);position:sticky;bottom:0;background:var(--surface)}.footer-note{display:none}#toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%) translateY(10px);max-width:calc(100% - 28px);width:max-content;background:#343a54;color:#fff;padding:12px 20px;font-size:14px;border-radius:7px;box-shadow:0 3px 15px #2223;opacity:0;pointer-events:none;z-index:20;transition:.15s}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:600px){.header-inner{min-height:75px;padding:17px 19px}.brand{font-size:23px;gap:10px}.brand span{font-size:12px;padding-left:10px}.local-tag{font-size:11px}.main{padding:25px 18px 30px}.titlebar{gap:12px;margin-bottom:22px}.titlebar h1{font-size:22px}.titlebar .btn{font-size:14px}.subtitle{font-size:13px}.deck-body{padding:22px 4px}.deck-title{font-size:18px}.deck-count{font-size:22px}.sectiontop{flex-wrap:wrap;gap:10px}.search{padding:10px;min-width:160px}.search input{font-size:14px}.mobile-nav{gap:3px;padding:7px 8px calc(7px + env(safe-area-inset-bottom))}.mobile-nav button{flex-direction:column;gap:5px;padding:6px 8px;min-height:50px;font-size:12px;max-width:100px}.mobile-nav .badge{position:absolute;top:3px;left:calc(50% + 10px);font-size:10px;line-height:14px;min-width:14px;padding:0 3px}.btn{padding:10px 13px}.btn.small{font-size:12px}.qrow{gap:8px;padding:19px 0}.qnum{font-size:12px;min-width:17px}.qtext h3{font-size:15px}.qtext p{font-size:13px}.qactions .btn{min-width:32px;padding:5px}.qactions .btn svg,.star svg{width:18px;height:18px}.star{padding:6px}.view-header-actions{gap:6px}.view-header-actions .btn{font-size:12px;padding:9px}.view-header-actions .btn svg{width:17px}.tabs button{font-size:13px;padding:13px 5px}.stats{gap:0}.stat{padding:17px 10px;display:block}.stat-icon{display:none}.stat-label{font-size:11px}.stat-value{font-size:23px}.stat-value span{font-size:12px}.setting-row{flex-wrap:wrap;gap:15px}.setting-control{width:100%;justify-content:space-between}.setting-row p{font-size:12px}.form-grid{grid-template-columns:1fr;gap:0}.modalbody{padding:20px}.modalhead{padding:14px 18px}.modalhead h2{font-size:18px}.modalfoot{padding:15px 18px;gap:8px}.modalfoot .btn{font-size:13px;padding:10px 13px}.practice-meta{font-size:12px;margin-bottom:15px}.back{font-size:13px;margin-bottom:21px}.playing .main{padding:20px 18px 30px}.playing .quiz-card{min-height:255px}.question-reading{font-size:22px;line-height:1.95;min-height:140px;margin-top:17px}.q-label{font-size:13px}.q-label>span{padding:6px 12px}.keyboard-hint{display:none}.countdown{margin-bottom:8px}.buzzer{width:142px;height:142px;font-size:23px;border-width:6px}.buzzer>svg{width:27px;height:27px}.practice-controls{margin-top:13px}.skipbar{margin-top:20px}.choice{min-height:78px;font-size:29px}.choices{gap:10px}.answer-slots{font-size:25px;margin:18px 0;min-height:52px}.answer-label{font-size:13px}.result-answer{font-size:26px}.result-note{font-size:14px}.result-panel{padding:25px 0}.pass-panel{padding-top:40px}.resume{font-size:12px;padding:12px}.resume .btn{font-size:12px}#toast{bottom:96px}.settingsbox .two-actions .btn{font-size:13px}.toolbar-line{width:100%}.toolbar-line .btn{flex:1}.qtext>p>span{display:block;margin-left:0!important}.info{font-size:13px}}
@media(max-width:360px){.brand span{display:none}.view-header-actions .btn{font-size:11px;padding:8px}.playing .quiz-card{min-height:230px}.question-reading{min-height:115px}.btn.small{padding:7px 9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

.qtext h3{white-space:pre-wrap}.import-table{overflow:auto;max-height:360px;margin:18px 0}.import-table table{border-collapse:collapse;min-width:580px;width:100%;font-size:13px}.import-table th,.import-table td{padding:9px;border:1px solid var(--line);vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere;min-width:95px;max-width:240px}.import-table th{background:var(--accent-soft)}.form-error{white-space:pre-wrap}details{font-size:13px;line-height:1.8}

.header-confirm{display:flex;align-items:center;gap:9px;font-size:14px;line-height:1.8;margin:18px 0;padding:12px;background:var(--accent-soft)}.header-confirm input{flex-shrink:0}

.header-inner{min-height:65px;padding-top:16px;padding-bottom:16px}.brand{font-size:23px}.main{padding-bottom:130px}.fab-pair{position:fixed;right:max(20px,calc((100vw - 850px)/2 + 10px));bottom:calc(95px + env(safe-area-inset-bottom));display:flex;z-index:8;border:3px solid white;border-radius:45px;background:var(--brand);box-shadow:0 2px 0 #686b7f,0 4px 18px #30344d25;overflow:hidden}.fab-pair button{border:0;background:transparent;width:61px;height:62px;display:grid;place-items:center;color:var(--on-brand)}.fab-pair button svg{width:27px;height:27px}.fab-pair .fab-edit{border-right:1px solid var(--accent-edge)}.fab-pair .active{background:var(--accent-tint)}.fab-create:hover,.fab-edit:hover{background:var(--brand-hover)}.bulk-toolbar{position:sticky;top:0;z-index:3;padding:13px;background:var(--accent-soft);border:1px solid var(--accent-line);border-radius:7px;margin:15px 0}.bulk-line{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:13px;margin:5px 0}.bulk-line label{display:flex;align-items:center;gap:8px}.bulk-line .input{width:auto;max-width:260px;font-size:14px;padding:8px}.bulk-line>span{color:var(--accent-ink)}.row-edit{display:flex;gap:5px;align-items:center;flex-shrink:0}.drag-handle{font-size:27px;border:0;background:none;padding:6px;color:var(--muted);cursor:grab;touch-action:none;user-select:none}.dragging{opacity:.55}.drop-target{box-shadow:inset 0 4px var(--accent);background:var(--accent-soft)}.reorder-keys{display:flex;flex-direction:column;gap:3px}.reorder-keys button{font-size:10px;color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:3px;padding:1px 3px}.question-intro{min-height:55dvh;display:grid;place-items:center;overflow:hidden}.question-intro span{font-size:clamp(38px,7vw,64px);font-weight:900;color:var(--accent);text-shadow:2px 2px white,4px 4px var(--accent-tint);animation:question-pop 1s both;letter-spacing:.07em}@keyframes question-pop{0%{opacity:0;transform:scale(.6)}25%{opacity:1;transform:scale(1.1)}45%,80%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.08)}}.result-answer{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}.result-answer:active{background:var(--accent-soft);border-radius:7px}.practice-top-actions{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:18px}.practice-top-actions .back{margin-bottom:0}.endless-label{display:flex!important;gap:10px;align-items:center;margin-top:18px}.endless-label input{width:20px!important}.playing .main{padding-bottom:35px}
@media(max-width:600px){.header-inner{min-height:58px;padding:13px 18px}.fab-pair{right:17px;bottom:calc(86px + env(safe-area-inset-bottom))}.fab-pair button{width:56px;height:58px}.row-edit{gap:0}.row-edit input{width:17px;height:17px}.drag-handle{padding:6px 2px;font-size:24px}.deck-title{font-size:16px}.deck-body{gap:8px}.deck-count{min-width:30px;font-size:19px}.qrow .qnum{display:none}.reorder-keys{display:none}.bulk-toolbar{padding:10px}.bulk-line{gap:9px}.bulk-line .input{max-width:180px}.practice-top-actions .back{font-size:11px}.practice-top-actions .btn{font-size:11px}.question-intro{min-height:60dvh}}@media(prefers-reduced-motion:reduce){.question-intro span{animation:none}}

.home-heading{display:flex;align-items:center;gap:22px;margin:0 0 24px}.home-heading h1{font-size:24px;white-space:nowrap;margin:0}.home-heading .search{margin-left:auto;max-width:430px}.folder-performance{min-width:100px;display:flex;flex-direction:column;gap:4px;text-align:right;flex-shrink:0}.folder-percent{font-size:12px;font-weight:500;color:var(--accent-ink)}.folder-progress{height:4px;width:100%;background:var(--surface-inset);border-radius:4px;overflow:hidden}.folder-progress i{display:block;background:var(--brand);height:100%}.deck-body .deck-count{font-size:20px}.home-return{position:fixed;z-index:12;left:max(17px,calc((100vw - 850px)/2 + 10px));bottom:calc(96px + env(safe-area-inset-bottom));width:52px;height:52px;border:2px solid var(--control-edge);box-shadow:0 3px 0 #85899c;background:var(--surface);border-radius:50%;display:grid;place-items:center;color:var(--accent-ink)}.home-return svg{width:27px;height:27px}.playing .home-return{bottom:calc(20px + env(safe-area-inset-bottom))}.mobile-nav button{width:130px}.mobile-nav button.active{background:var(--accent-soft)}.quiz-pick-toolbar{display:flex;align-items:center;justify-content:space-between;font-size:14px;margin-bottom:20px}.quiz-pick-toolbar label{display:flex;gap:9px;align-items:center}.quiz-pick-toolbar>span{color:var(--muted)}.folder-picker{border-top:1px solid var(--line)}.folder-pick{display:flex;align-items:center;gap:14px;padding:23px 8px;border-bottom:1px solid var(--line);cursor:pointer}.folder-pick>span{flex:1;font-weight:600}.folder-pick small{color:var(--muted);font-size:13px}.folder-pick strong{font-size:17px;color:var(--accent-ink);min-width:48px;text-align:right}.quiz-pick-start{margin-top:30px;text-align:center}.unseen-folder-heading{display:flex;align-items:center;gap:13px;flex-wrap:wrap;margin:24px 0}.unseen-folder-heading h2{font-size:17px;margin:0;flex:1}.unseen-folder-heading>span{font-size:13px;color:var(--muted)}.import-page{padding-bottom:30px}.import-page .page-actions{display:flex;justify-content:flex-end;padding-top:20px;border-top:1px solid var(--line)}.import-page .file-zone{margin-top:10px}.playing .topbar{border-bottom:0}.playing .header-inner{min-height:48px;padding:10px 26px}.playing .brand{font-size:18px}.playing .main{padding-top:0;padding-bottom:82px;max-width:850px}.playing .practice-top-actions{display:none}.playing .practice-meta{background:var(--brand);margin:0 -26px;padding:9px 26px;color:#63522e;font-size:13px}.playing .practice-meta .pill{background:var(--surface);color:var(--accent-ink);font-size:10px}.game-clock-strip{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;background:var(--accent-soft);padding:9px 16px 0;margin:0 -26px 20px;border-bottom:1px solid var(--accent-line)}.elapsed-box,.remaining-box{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--accent-ink)}.elapsed-box strong,.remaining-box strong{font-size:17px;font-variant-numeric:tabular-nums;color:var(--on-brand)}.remaining-track{width:calc(100% + 32px);height:6px;flex-shrink:0;background:#e1e5db;margin:0 -16px}.remaining-track i{display:block;height:100%;background:#79bc49;transition:width .05s linear}.remaining-track i.time-low{background:#ef7160}#play-area{display:flex;flex-direction:column;min-height:calc(100dvh - 190px)}.playing .quiz-card{border:0;padding:0;flex:1;min-height:0}.playing .q-label>span{padding:4px 9px;font-size:12px}.playing .question-reading{font-size:20px;font-weight:600;min-height:0;line-height:1.9;margin:15px 0 18px}.playing .practice-controls{padding-top:15px;margin-top:auto}.playing .buzzer{width:130px;height:130px;box-shadow:0 5px 0 #c33434;font-size:21px}.playing .skipbar{margin-top:13px}.playing .answer-panel{margin-top:auto;padding-top:12px}.stage-answering .quiz-card{flex:1}.stage-result .quiz-card,.stage-passed .quiz-card{flex:0}.stage-result .result-panel{padding:0;text-align:left;border-top:3px solid var(--brand)}.stage-result .result-status{font-size:14px;margin:9px 0;color:#d84d52}.stage-result .result-answer{font-size:23px;text-align:left;padding:7px 10px;color:#de4a52;border-bottom:2px solid var(--brand);line-height:1.7}.stage-result .result-answer::before{content:'A';display:inline-block;background:#ee626c;color:white;font-size:13px;padding:0 5px;margin-right:10px;vertical-align:middle;border-radius:3px}.stage-result .result-reading{text-align:left;padding:0 10px;font-size:12px}.stage-result .result-note{text-align:left;font-size:14px;margin:15px 10px}.stage-result .result-actions{margin-top:18px}.playing #countdown,.playing #answer-countdown{display:none}.playing #result-countdown{font-size:12px;height:26px;margin:16px 0 0}.stage-result .keyboard-hint{display:none}.stage-result .result-panel .dialog-intro{font-size:12px}.stage-passed .pass-panel{padding-top:25px}.question-intro{min-height:calc(100dvh - 190px);flex:1}.stage-intro{display:block!important}
@media(max-width:600px){.home-heading{gap:16px;margin-bottom:23px}.home-heading h1{font-size:22px}.home-heading .search{padding:9px;min-width:0}.home-heading .search input{font-size:15px}.folder-performance{min-width:79px}.folder-percent{font-size:11px}.mobile-nav{gap:0;padding-left:5px;padding-right:5px}.mobile-nav button{min-width:0;width:20%;font-size:10px;padding:6px 2px}.mobile-nav button svg{width:21px;height:21px}.home-return{width:45px;height:45px;left:17px;bottom:calc(89px + env(safe-area-inset-bottom))}.playing .home-return{bottom:calc(17px + env(safe-area-inset-bottom))}.playing .header-inner{min-height:40px;padding:9px 18px}.playing .brand{font-size:17px}.playing .practice-meta{margin:0 -18px;padding:7px 18px;font-size:11px}.game-clock-strip{margin:0 -18px 16px;padding-top:7px;gap:11px}.elapsed-box,.remaining-box{gap:7px;font-size:10px}.elapsed-box strong,.remaining-box strong{font-size:15px}.remaining-track{height:5px}.playing .question-reading{font-size:17px;font-weight:500;margin-top:13px}.playing .buzzer{width:116px;height:116px;border-width:5px;font-size:21px}.playing .buzzer>svg{width:25px;height:25px}.playing .answer-slots{min-height:43px;margin:15px 0}.playing .choice{min-height:72px}.stage-result .result-answer{font-size:21px}.stage-result .result-note{font-size:13px}.stage-result .result-actions .btn{font-size:12px;min-height:39px;padding:9px 12px}.folder-pick{gap:10px;padding:20px 2px}.folder-pick>span{font-size:15px}.folder-pick small{font-size:12px}.folder-pick strong{font-size:15px;min-width:39px}.quiz-pick-toolbar{font-size:12px}.quiz-pick-start .btn{font-size:14px}#play-area{min-height:calc(100dvh - 168px)}.question-intro{min-height:calc(100dvh - 168px)}}

.folder-performance{gap:3px}.folder-performance .deck-count{line-height:1.1}.folder-percent{line-height:1.2}@media(max-width:600px){.deck-body{padding-top:17px;padding-bottom:17px}}
.quiz-start-heading{position:sticky;top:0;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--surface);padding:14px 0 18px;margin-top:-14px;margin-bottom:8px;border-bottom:1px solid var(--line)}.quiz-start-heading h1{font-size:25px;margin:0;white-space:nowrap}.quiz-start-heading .btn{white-space:normal;text-align:center}.deck [aria-pressed=true]{background:var(--accent-soft)}.qtext[data-select-row]{cursor:pointer;align-self:stretch;display:flex;flex-direction:column;justify-content:center;border-radius:4px}.qtext[data-select-row][aria-pressed=true]{background:var(--accent-soft);box-shadow:0 0 0 6px var(--accent-soft)}.deck,.qrow{position:relative}.drag-handle{border:1px dashed var(--control-edge);border-radius:5px;background:var(--surface-inset);color:var(--muted);padding:6px;min-width:31px}.drag-handle:active{cursor:grabbing;background:var(--accent-tint)}.dragging{opacity:.35!important;outline:2px dashed var(--accent);outline-offset:-4px;background:repeating-linear-gradient(135deg,var(--accent-soft),var(--accent-soft) 9px,var(--accent-tint) 9px,var(--accent-tint) 18px)!important}.drop-before::before,.drop-after::after{content:'ここに移動';position:absolute;left:0;right:0;z-index:3;height:4px;background:var(--accent);color:var(--accent-ink);font-size:11px;font-weight:700;line-height:16px;text-align:right;box-shadow:0 0 0 2px var(--accent-tint);pointer-events:none}.drop-before::before{top:-2px;padding-top:4px}.drop-after::after{bottom:-2px;padding-bottom:16px}.drop-before,.drop-after{background:var(--accent-soft)}.drag-preview{position:fixed;width:min(350px,calc(100vw - 24px));z-index:1000;pointer-events:none;background:var(--accent-soft);border:2px solid var(--accent-edge);border-radius:9px;box-shadow:0 12px 30px #30344d35;padding:14px 18px;transform:rotate(-1deg);color:var(--ink)}.drag-preview strong{display:block;font-size:15px;line-height:1.6;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.drag-preview span{display:block;margin-top:7px;color:var(--accent-ink);font-size:12px}@media(max-width:600px){.quiz-start-heading{gap:10px;padding-top:10px;padding-bottom:14px}.quiz-start-heading h1{font-size:22px}.quiz-start-heading .btn{font-size:12px;padding:9px 11px;min-height:40px}.quiz-start-heading .btn svg{width:17px;height:17px}.drag-handle{min-width:28px;padding:5px 2px;margin-left:3px}.row-edit{gap:3px}.drag-preview{padding:12px 14px}}

/* v1.6: touch answers, offset result, twelve note colors. */
.touch-answer .choice:focus:not(:focus-visible){outline:none}.touch-answer .choice:focus-visible{outline:none}
.stage-result .result-answer{padding-left:clamp(32px,10vw,76px);padding-right:16px}.stage-result .result-reading{padding-left:clamp(32px,10vw,76px)}
.color-picker{display:grid;grid-template-columns:repeat(6,36px);gap:14px}.color-picker button{width:34px;height:34px}.deck{border-left:5px solid var(--note-color,#9abca9);padding-left:9px}.note-green,.color-picker .green{--note-color:#9abca9}.note-blue,.color-picker .blue{--note-color:#9cb6db}.note-purple,.color-picker .purple{--note-color:#c1add8}.note-orange,.color-picker .orange{--note-color:#efbd67}.note-red,.color-picker .red{--note-color:#e88c86}.note-pink,.color-picker .pink{--note-color:#eaa9c8}.note-yellow,.color-picker .yellow{--note-color:#e8d46b}.note-lime,.color-picker .lime{--note-color:#b8d57d}.note-teal,.color-picker .teal{--note-color:#72b8aa}.note-cyan,.color-picker .cyan{--note-color:#86cbd9}.note-indigo,.color-picker .indigo{--note-color:#9099cc}.note-gray,.color-picker .gray{--note-color:#a6abb6}.color-picker button{background:var(--note-color)}.deck-export{border-top:1px solid var(--line);padding-top:12px}.deck-export h3{font-size:15px;margin:0 0 12px}.deck-export small{display:block;font-size:12px;line-height:1.9;margin-top:12px;color:var(--muted)}

/* Compact edit controls; normal navigation has no redundant home shortcut. */
.row-edit .drag-handle{flex:0 0 16px;width:16px;min-width:16px;max-width:16px;padding:6px 0;margin-left:0;font-size:20px;line-height:1.4;overflow:hidden}.bulk-actions{flex-wrap:nowrap;justify-content:flex-end;gap:8px}.bulk-actions .btn{flex:0 0 auto}.bulk-summary{justify-content:space-between}.bulk-move .input{min-width:0;flex:1}.template-download{margin:0 0 20px;white-space:normal;text-align:center}
@media(max-width:600px){.row-edit .drag-handle{flex-basis:14px;width:14px;min-width:14px;max-width:14px;padding:5px 0;font-size:18px}.row-edit{gap:4px}.bulk-actions .btn{min-width:62px}.template-download{font-size:14px}}

/* v1.7: folder navigation, one-line editing, and the reference play layout. */
.breadcrumbs{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:0 0 14px;color:var(--muted);font-size:13px}.breadcrumbs button{border:0;background:none;padding:5px 0;text-align:left;overflow-wrap:anywhere}.breadcrumbs [aria-current]{color:var(--ink);font-weight:700}.folder-location{display:block;font-size:11px;color:var(--muted);font-weight:400}.bulk-toolbar{padding:9px 10px}.bulk-strip{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;white-space:nowrap}.bulk-strip .btn{flex:0 0 auto;padding:7px 12px;min-height:36px}.selection-count{font-size:13px;color:var(--accent-ink);flex:1;min-width:max-content}.folder-destination{display:flex;width:100%;align-items:center;justify-content:space-between;text-align:left;gap:12px;background:var(--surface);border:0;border-bottom:1px solid var(--line);padding:16px 4px;font-size:15px}.folder-destination>span{display:flex;align-items:center;gap:10px;overflow-wrap:anywhere}.folder-destination small{flex-shrink:0;color:var(--muted)}.practice-audio-option{display:flex;align-items:center;gap:9px;font-size:14px;margin-top:18px}.media-player{margin:16px 0;padding:12px;background:var(--surface-inset);border:1px solid var(--line);border-radius:7px}.media-frame{display:block;width:100%;min-width:200px;min-height:200px;height:clamp(200px,45vw,350px);border:0;background:#20242f;margin:10px 0}.media-caption{font-size:14px;font-weight:700}.media-help{font-size:12px;line-height:1.7;color:var(--muted);margin:10px 0}.cursor{display:none!important}
.playing .practice-shell{position:relative}.playing .practice-meta{min-height:74px;align-items:flex-start;padding-top:13px;padding-bottom:15px;background:var(--game-header);color:#fff}.playing .practice-meta>span:first-child{white-space:normal;font-weight:700;line-height:1.7}.playing .practice-meta .pill{display:none}.game-clock-strip{margin-bottom:12px;padding-top:6px;background:var(--brand);border-bottom:0;color:white}.elapsed-box,.remaining-box{color:var(--on-brand)}.remaining-track{height:7px;background:#ede7cd;border:1px solid #fff}.remaining-track i{background:#70ca56}.playing .question-reading{font-size:18px;line-height:1.6;font-weight:500;margin:8px 0 0}.playing .q-label{height:24px}.playing .q-label>span{font-size:11px;border:0;background:none;color:var(--accent-ink);padding:0}.playing .quiz-card{flex:0;min-height:0}.playing .practice-controls{margin-top:auto;padding-bottom:25px}.playing .buzzer{width:105px;height:105px;font-size:18px}.playing .buzzer>svg{width:24px;height:24px}.stage-reading{min-height:calc(100dvh - 224px)!important}
.stage-answering::after{content:'';position:fixed;inset:155px 0 0;background:#0006;z-index:7;pointer-events:none}.playing .answer-panel{position:fixed;inset:0;z-index:8;padding:0;margin:0;pointer-events:none}.answer-dialog{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(610px,calc(100vw - 28px));background:var(--surface);border-radius:8px;box-shadow:0 5px 24px #0002;overflow:hidden;text-align:left;pointer-events:auto}.answer-dialog-head{background:var(--brand);display:flex;align-items:center;justify-content:center;padding:9px 15px;font-size:15px;color:var(--on-brand);font-weight:800;position:relative}.playing #answer-countdown{display:block;position:absolute;right:14px;color:var(--on-brand);font-size:17px}.playing .answer-slots{margin:0;padding:24px 20px;min-height:105px;font-size:23px;letter-spacing:0;text-align:left;line-height:1.6;overflow-wrap:anywhere}.answer-choice-tray{position:absolute;bottom:max(18px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(560px,calc(100vw - 32px));pointer-events:auto;text-align:center}.answer-choice-tray>.btn{margin-top:10px;color:white;text-shadow:0 1px 2px #000}.answer-choice-tray .choices{gap:12px}.playing .choice{min-height:76px;border-radius:5px;font-size:30px}.choice kbd{font-size:10px}
.stage-result .result-panel{border:0;padding-top:10px;position:relative}.stage-result .result-status{font-size:12px;margin:0 0 6px;text-align:right;color:var(--answer-red)}.stage-result .result-status.wrong{color:#278bc3}.stage-result .result-answer{border:0;padding:0 0 0 24%;text-align:right;font-size:20px;font-weight:600;line-height:1.6;color:var(--answer-red);user-select:none;-webkit-user-select:none;touch-action:none}.stage-result .result-answer::before{margin-right:5px;border-radius:0;padding:0 3px;font-size:11px}.stage-result .result-reading{padding:0;text-align:right;font-size:11px}.stage-result .result-note{font-size:13px;margin:14px 0 0}.chosen-answer{font-size:12px;color:var(--muted);text-align:right;margin:9px 0}.stage-result .result-actions{margin-top:15px}.judge-effect{position:fixed;top:42%;left:50%;z-index:15;pointer-events:none;display:grid;place-items:center;width:190px;height:190px;transform:translate(-50%,-50%) rotate(-12deg);animation:judge-pop 1.05s both}.judge-effect span{font-size:49px;font-weight:900;line-height:1.2;color:white;white-space:nowrap;-webkit-text-stroke:1px currentColor;text-shadow:-2px -2px 0 #c42d6d,2px -2px 0 #c42d6d,-2px 2px 0 #c42d6d,2px 2px 0 #c42d6d,0 5px 0 #ab225b}.judge-correct{border:12px solid #ce236a;background:#f2509b;border-radius:50%;box-shadow:0 0 0 5px #fff7,0 9px 0 #ac1d58}.judge-correct::before{content:'✦';position:absolute;top:-26px;right:-23px;color:#ffe03e;font-size:54px;text-shadow:-190px 30px #6dcdd5,16px 170px #ac88e1,-160px 190px #b5e96d}.judge-wrong{background:transparent}.judge-wrong::before{content:'×';position:absolute;color:#11ade7;font-size:230px;line-height:1;font-weight:900;text-shadow:0 5px #087db0}.judge-wrong span{z-index:1;font-size:37px;text-shadow:-2px -2px #098fc0,2px -2px #098fc0,-2px 2px #098fc0,2px 2px #098fc0,0 4px #077ca9}@keyframes judge-pop{0%{opacity:0;transform:translate(-50%,-50%) rotate(-20deg) scale(1.5)}16%{opacity:1;transform:translate(-50%,-50%) rotate(-12deg) scale(1)}78%{opacity:1}100%{opacity:0;transform:translate(-50%,-50%) rotate(-12deg) scale(1.04)}}
@media(max-width:600px){.bulk-strip{gap:5px}.bulk-strip .btn{font-size:12px;padding:7px 8px;min-height:34px}.selection-count{font-size:11px}.bulk-toolbar{padding:8px 6px}.playing .practice-meta{min-height:69px;padding-top:12px;font-size:12px}.playing .question-reading{font-size:15px;line-height:1.55}.stage-answering::after{top:140px}.playing .q-label{height:21px}.playing .choice{min-height:62px;font-size:27px}.answer-choice-tray .choices{gap:9px}.playing .answer-slots{min-height:100px;padding:23px 18px;font-size:20px}.answer-dialog-head{font-size:14px}.answer-dialog{top:51%}.stage-result .result-answer{font-size:17px}.stage-result .result-reading{font-size:10px}.judge-effect{width:154px;height:154px;top:40%}.judge-effect span{font-size:40px}.judge-wrong::before{font-size:208px}.judge-wrong span{font-size:32px}.stage-result .result-actions .btn{font-size:11px}.playing .buzzer{width:92px;height:92px}.media-player{padding:8px}.media-frame{height:200px}.stage-reading{min-height:calc(100dvh - 217px)!important}.playing:has(.media-frame) .practice-controls{padding-bottom:10px}.playing:has(.media-frame) #play-area{min-height:400px!important}}
@media(prefers-reduced-motion:reduce){.judge-effect{animation-duration:.3s}.question-intro span{animation:none}}

/* Local audio editing and spoiler-free practice status. */
.audio-fields{border:1px solid var(--line);border-radius:12px;padding:18px;margin:22px 0;min-width:0}.audio-fields legend{padding:0 7px;font-weight:700}.audio-fields small{display:block;color:var(--muted);line-height:1.7}.audio-fields input[type=file],#import-audio-files{width:100%;max-width:100%;font:inherit;font-size:14px;padding:10px 0}.audio-fields input[type=file]::file-selector-button,#import-audio-files::file-selector-button{background:var(--surface);border:1px solid var(--control-edge);border-radius:8px;padding:10px;margin-right:10px;font:inherit}.audio-fields [role=status]{display:block;font-size:14px;line-height:1.7;margin-top:8px}.legacy-url{margin:18px 0}.legacy-url summary{font-size:14px;color:var(--muted);cursor:pointer}.legacy-url .field{margin-top:12px}.audio-library{display:grid;gap:10px;margin:16px 0}.audio-library-row{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:16px;background:var(--surface)}.audio-library-row>div{flex:1;min-width:0}.audio-library-row strong{display:block;overflow-wrap:anywhere;font-size:16px}.audio-library-row small{display:block;color:var(--muted);font-size:14px;margin-top:6px}.local-audio-status{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-height:32px;margin:4px 0 8px;color:var(--muted);font-size:14px}.local-audio-status[hidden]{display:none}.audio-library-row .btn{flex-shrink:0}.bulk-strip{flex-wrap:nowrap}.deck-export .two-actions{flex-wrap:wrap}.import-page .form-error{white-space:pre-wrap}
@media(max-width:480px){.audio-fields{padding:12px}.audio-library-row{padding:12px;gap:6px}.audio-library-row .btn{padding:8px;font-size:14px}.audio-library-row strong{font-size:15px}}

.home-return {font-size:26px;font-weight:650;line-height:1}
.scope-tabs {flex-wrap:wrap;gap:6px}
.scope-tabs button {min-height:40px}
.deck>input[type=checkbox],.quiz-question>input,.quiz-pick-toolbar input {width:20px;height:20px;align-self:center;accent-color:var(--accent);flex-shrink:0}
.deck>input[type=checkbox] {margin:0 10px 0 4px}
.quiz-question {cursor:pointer;gap:14px}
.quiz-question .qtext {min-width:0;overflow-wrap:anywhere}
.quiz-question .qtext small {display:block;color:var(--muted);margin-top:5px;font-size:14px}
.quiz-pick-toolbar strong {font-variant-numeric:tabular-nums;white-space:nowrap}
.destination-trigger {justify-content:space-between;white-space:normal;text-align:left}
.destination-trigger::after {content:'⌄';color:var(--muted)}
.destination-panel {border:1px solid var(--line);border-radius:8px;padding:10px;margin-top:5px;max-height:46dvh;overflow:auto}
.destination-panel>.btn {margin-top:10px}
.destination-path {display:flex;align-items:center;gap:10px;margin-bottom:6px;overflow-wrap:anywhere}
.editor-tabs.mobile-nav {position:sticky;bottom:0;padding:4px;gap:0;display:flex}
.editor-tabs.mobile-nav button {width:20%;min-width:0;font-size:11px}
.home-editor .modalfoot {bottom:54px}
body:has(dialog.home-editor[open]) .shell .mobile-nav {visibility:hidden}
.shell:not(.playing):has(.home-return) .main {padding-bottom:85px}
.summary-count {color:var(--muted)}
@media(max-width:520px){.scope-tabs button{padding:8px 10px;font-size:14px}.quiz-start-heading {align-items:flex-start}.quiz-start-heading h1{overflow-wrap:anywhere;min-width:0}}

dialog {background:var(--surface)}
.theme-settings {border:0;border-bottom:1px solid var(--line);padding:0 0 24px;margin:0 0 10px;min-width:0}
.theme-settings legend,.attempts h2 {margin:0 0 12px;padding:0;font-size:18px;font-weight:700}
.theme-options {display:flex;flex-wrap:wrap;gap:8px}
.theme-options label {display:inline-flex;align-items:center;justify-content:center;gap:8px;position:relative;padding:9px 14px;min-height:44px;cursor:pointer;font-size:14px;border:1px solid var(--control-edge);border-radius:7px;background:var(--surface)}
.theme-options label:has(:checked) {border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);background:var(--accent-soft);font-weight:700;color:var(--accent-ink)}
.theme-options label:has(:focus-visible) {outline:3px solid var(--focus);outline-offset:2px}
.theme-options input {position:absolute;opacity:0;width:1px;height:1px}
.theme-swatch {width:16px;height:16px;border-radius:50%;border:1px solid #0003}
.swatch-sky {background:#83d4f5}.swatch-orange {background:#ffad13}.swatch-dark {background:#213343;border-color:#8193a3}.swatch-pink {background:#f7abcb}
.attempts {margin:26px 0 0;text-align:left}
.attempts ol {list-style:none;padding:0;margin:0}
.attempts li {padding:16px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
.attempt-heading {display:flex;flex-wrap:wrap;align-items:center;gap:12px;font-size:14px;color:var(--muted)}
.attempt-verdict.correct {color:#25654a}.attempt-verdict.incorrect {color:var(--red)}
:root[data-theme="dark"] .attempt-verdict.correct {color:#86dcac}
.attempt-question {margin:8px 0;white-space:pre-wrap;line-height:1.65;font-weight:600}
.attempts dl {display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 14px;margin:0;font-size:14px;line-height:1.6}
.attempts dt {color:var(--muted)}.attempts dd {margin:0;white-space:pre-wrap}
.attempt-audio {margin-top:10px}.attempt-audio svg {width:15px;height:15px}
#more-attempts[hidden] {display:none}
@media(max-width:520px){.theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}

/* The viewport stays stationary while the question and explanation panes scroll. */
body:has(.live-quiz) {overflow:hidden}
.live-quiz {height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.live-quiz .topbar,.live-quiz .practice-meta,.live-quiz .game-clock-strip,.live-quiz .local-audio-status {flex:none}
.live-quiz .main {flex:1;min-height:0;width:100%;padding-top:0;padding-bottom:0}
.live-quiz .practice-shell {height:100%;display:flex;flex-direction:column}
.live-quiz #play-area {flex:1;min-height:0!important;overflow:hidden;display:flex;flex-direction:column}
.live-quiz .question-intro {min-height:0;height:100%}
.live-quiz .quiz-card,.live-quiz .result-panel {overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0;overflow-anchor:none}
.live-quiz .quiz-card {display:block;flex:1 1 0;padding-bottom:8px}
.live-quiz .game-clock-strip {margin:0 0 8px}
.live-quiz .stage-result .quiz-card {flex:0 1 auto;max-height:32%}
.live-quiz .stage-result .result-panel {flex:1 1 0;padding:6px 0 12px}
.live-quiz .result-note {overflow-wrap:anywhere}
.live-quiz .result-note a {color:var(--accent-ink);text-decoration:underline;text-underline-offset:3px}
.live-quiz .explanation-video {display:block;width:min(100%,640px);aspect-ratio:16/9;border:0;margin:10px auto;background:#141720}
.live-quiz .practice-controls,.live-quiz .result-dock,.live-quiz .answer-panel,.live-quiz .pass-panel {
  flex:none;position:relative;inset:auto;margin:0;background:var(--page);
  padding:8px 0 max(10px,env(safe-area-inset-bottom));border-top:1px solid var(--line)
}
.live-quiz .result-dock,.live-quiz .answer-panel {padding-left:52px;padding-right:4px}
.live-quiz .result-actions {margin:4px 0 0;display:flex;align-items:stretch;justify-content:center;gap:8px;flex-wrap:nowrap}
.live-quiz .result-actions .btn {white-space:normal;line-height:1.4;min-height:44px;padding:8px 12px}
.live-quiz #result-countdown {height:1.5em;margin:0;text-align:center}
.live-quiz .home-return {bottom:max(12px,env(safe-area-inset-bottom));left:max(8px,calc(50% - 390px))}
.live-quiz .skipbar,.live-quiz .keyboard-hint {margin:4px 0 0}
.live-quiz .pass-panel {padding-block:12px}
.live-quiz .stage-answering::after {display:none}
.live-quiz .answer-panel {pointer-events:auto}
.live-quiz .answer-dialog,.live-quiz .answer-choice-tray {position:static;inset:auto;transform:none;width:min(100%,560px);margin:0 auto;box-shadow:none}
.live-quiz .answer-dialog-head {padding:4px 12px}
.live-quiz .answer-slots {height:2.3em;min-height:0;margin:0;padding:4px 10px;line-height:1.45;overflow-y:auto;background:var(--surface)}
.live-quiz .answer-choice-tray>.btn {margin-top:6px;color:var(--muted);text-shadow:none}
.live-quiz .answer-choice-tray .choice {min-height:54px}
@media(max-width:600px){
  .live-quiz .practice-meta {min-height:0;padding-block:8px}
  .live-quiz .result-actions {gap:5px}
  .live-quiz .result-actions .btn {flex:1 1 0;min-width:0;padding:6px 3px;font-size:13px}
  .live-quiz .answer-choice-tray .choices {gap:6px}
}
@media(max-height:500px){
  .live-quiz .practice-meta {min-height:0;padding-block:3px}
  .live-quiz .practice-controls {display:flex;align-items:center;justify-content:center;gap:14px}
  .live-quiz .practice-controls .keyboard-hint {display:none}
  .live-quiz .buzzer {width:68px;height:68px;font-size:14px}
  .live-quiz .answer-slots {height:1.8em}
  .live-quiz .answer-choice-tray .choice {font-size:22px;min-height:40px}
}

.live-quiz .answer-with-control {display:flex;align-items:center;justify-content:flex-end;gap:10px}
.live-quiz .answer-with-control .result-answer {min-width:0;padding-left:0;flex:1}
.live-quiz .result-pause {flex:none;min-width:44px;width:44px;height:44px;padding:10px}
.live-quiz .result-pause[aria-pressed=true] {background:var(--accent-soft);border-color:var(--accent)}
.live-quiz .result-answer {cursor:auto;touch-action:auto;user-select:text;-webkit-user-select:text}
.live-quiz .result-answer:active {background:transparent}
.live-quiz .flash-card+.practice-controls {display:flex;flex-direction:column;align-items:center;gap:8px}
.qactions {align-items:center}
@media(max-width:600px){.qactions {gap:0}.qactions .icon {min-width:32px;padding:5px}}
.quiz-question-label {display:flex;align-items:center;gap:14px;flex:1;min-width:0;cursor:pointer}
.quiz-question-label input {flex:none;width:20px;height:20px}
