:root{color-scheme:light;--bg: #f6f7f3;--ink: #1e2528;--muted: #657175;--line: #d9ded8;--panel: #ffffff;--soft: #f9faf7;--accent: #236b5a;--accent-ink: #ffffff;--focus: #5d73d9;--warn: #9b6a18;--danger: #aa3f3f;--ok: #2f7d47;--blue: #3f61b5;--header-space: 124px;font-family:BIZ UDPGothic,Yu Gothic UI,Meiryo,system-ui,sans-serif}*{box-sizing:border-box}[hidden]{display:none!important}html{min-height:100%;-webkit-text-size-adjust:100%}body{margin:0;min-height:100vh;overflow-x:hidden;background:linear-gradient(180deg,#fbfcf8 0,var(--bg) 220px),var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased}button,select,input,textarea{font:inherit}button,select,input{min-height:34px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink)}button{padding:0 13px;cursor:pointer;touch-action:manipulation;transition:transform .12s ease,border-color .12s ease,background .12s ease}button:hover{transform:translateY(-1px);border-color:var(--focus)}button:disabled{cursor:not-allowed;opacity:.55;transform:none}button:focus,select:focus,textarea:focus{outline:3px solid rgba(93,115,217,.22);outline-offset:2px}.app-shell{width:min(1480px,calc(100vw - 28px));margin:0 auto;padding:8px 0 calc(8px + env(safe-area-inset-bottom))}.topbar{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;align-items:center;gap:8px;padding:0 0 5px}.update-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 7px;padding:8px 10px;border:1px solid #b9d8cd;border-radius:10px;background:#edf8f4;color:#155f50;font-size:14px;line-height:1.45}.update-banner[hidden]{display:none!important}.update-banner button{min-height:34px;padding:6px 12px;white-space:nowrap}.brand-block{display:flex;align-items:baseline;gap:10px;min-width:0}h1,h2,h3,p{margin:0}h1{flex:0 0 auto;font-size:22px;line-height:1.15;font-weight:700}#statusLine{min-width:0;margin-top:0;color:var(--muted);font-size:13px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-dock,.toolbar{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end;min-width:0}.tool-dock button{min-height:32px;padding:0 10px}.filter-strip{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;border:1px solid var(--line);border-radius:8px;background:#ffffffb8;padding:7px 9px}.filter-group{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:0}.filter-label{color:var(--muted);font-size:11.5px;font-weight:700}.filter-strip select{min-width:132px}.filter-toggles{justify-content:flex-end}.mode-switch{display:flex;gap:6px;align-items:center}.mode-switch button{min-width:64px}.study-queue-switch{display:flex;gap:6px;align-items:center}.study-queue-switch button{min-width:76px}.study-mode .management-only,.manage-mode .study-only{display:none!important}.study-strip{display:grid;grid-template-columns:minmax(150px,1.45fr) repeat(10,minmax(58px,.72fr));gap:6px;margin-bottom:8px}.local-data-panel{display:grid;grid-template-columns:minmax(260px,1fr) minmax(340px,auto);gap:10px;align-items:center;margin-bottom:8px;border:1px solid var(--line);border-radius:8px;background:var(--panel);padding:9px 11px;box-shadow:0 2px 8px #1b25230a}.local-data-panel[hidden]{display:none!important}.local-data-main{min-width:0;display:grid;gap:8px}.local-data-status{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:8px;align-items:baseline;min-width:0}.local-data-status span,.local-data-status small{color:var(--muted);font-size:12px}.local-data-status strong{color:var(--accent);font-size:15px}.local-data-status small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.local-data-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.provider-actions,.cloud-actions{display:flex;gap:7px;flex-wrap:wrap}.provider-actions button,.cloud-actions button,.local-data-actions button{min-height:44px}.cloud-sync-panel{grid-column:1 / -1;display:grid;grid-template-columns:minmax(190px,1.1fr) minmax(220px,1.2fr) minmax(180px,.9fr);gap:8px;align-items:end;border-top:1px solid var(--line);padding-top:9px}.cloud-sync-head{min-width:0;display:grid;gap:3px}.cloud-sync-head strong{color:var(--accent);font-size:15px;line-height:1.25}.cloud-sync-head small{color:var(--muted);font-size:12px;line-height:1.35;overflow-wrap:anywhere}.cloud-field{min-width:0;display:grid;gap:4px}.cloud-field span{color:var(--muted);font-size:12px;line-height:1.2}.cloud-field input{width:100%;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:#fff;font:inherit}.cloud-actions{grid-column:1 / -1;justify-content:flex-end}.study-chip{min-width:0;min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:6px;border:1px solid var(--line);border-radius:8px;background:var(--panel);padding:6px 8px;box-shadow:0 1px 2px #1b25230a}.study-chip-main{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 5px;align-content:center}.study-chip span{color:var(--muted);font-size:11px}.study-chip strong{min-width:0;font-size:16px;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.study-progress-bar{grid-column:1 / -1;height:5px;overflow:hidden;border-radius:999px;background:#e7ece8}.study-progress-bar span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent),#4b7fc7)}.study-chip-habit strong{color:#8a5a14}.settings-panel{margin-bottom:7px;border:1px solid var(--line);border-radius:8px;background:var(--panel);padding:8px 10px;box-shadow:0 4px 14px #1b25230a}.settings-panel .panel-heading{margin-bottom:0}.settings-heading>div{display:grid;gap:2px}.settings-body{margin-top:8px}.settings-body[hidden]{display:none!important}.unit-selector-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;border:1px solid var(--line);border-radius:8px;background:var(--panel);padding:9px 11px;box-shadow:0 2px 8px #1b25230a}.selected-unit{display:grid;grid-template-columns:auto minmax(0,auto) minmax(0,1fr);align-items:baseline;gap:8px;min-width:0}.selected-unit span{color:var(--muted);font-size:12px;font-weight:700}.selected-unit strong{min-width:0;font-size:18px;line-height:1.25}.selected-unit small{min-width:0;color:var(--muted);font-size:12px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-controls{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;flex:1 1 auto}.session-controls label{display:inline-flex;align-items:center;gap:5px;color:var(--muted);font-size:12px;font-weight:800;white-space:nowrap}.session-controls select{width:auto;min-width:88px;min-height:38px;font-size:14px;padding-left:9px}.session-progress{min-width:92px;border:1px solid var(--line);border-radius:999px;background:#fbfcf8;color:var(--muted);padding:6px 9px;font-size:12px;font-weight:800;line-height:1.2;text-align:center;white-space:nowrap}.session-progress.complete{border-color:#83b49b;background:#edf6f1;color:var(--accent)}.unit-selector-actions{display:flex;gap:7px;flex:0 0 auto}.unit-drawer[hidden]{display:none!important}.unit-drawer{position:fixed;inset:0;z-index:20;display:grid;justify-items:start}.unit-drawer-backdrop{position:fixed;inset:0;width:100%;height:100%;border:0;border-radius:0;background:#1e252838;padding:0}.unit-drawer-panel{position:relative;z-index:1;width:min(460px,calc(100vw - 24px));height:min(100dvh - 24px,760px);margin:12px;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--panel);box-shadow:0 18px 50px #1b252338;padding:12px}.drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.drawer-heading h2{font-size:18px;line-height:1.3}.drawer-heading span{color:var(--muted);font-size:12px}.unit-drawer-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(126px,.36fr);gap:8px;align-items:end;margin-bottom:9px}.unit-search,.unit-sort{display:grid;gap:5px;color:var(--muted);font-size:12px;font-weight:700}.unit-search input,.unit-sort select{width:100%;padding:0 11px}.unit-sort-hint{grid-column:1 / -1;color:var(--muted);font-size:11.5px;font-weight:700;line-height:1.45}.unit-sort-hint.muted-empty{color:#7b5f0e}.settings-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.settings-grid label,.custom-settings label,.custom-settings span{color:var(--muted);font-size:12px}.settings-grid label{display:grid;gap:4px}.custom-settings{display:flex;flex-wrap:wrap;gap:16px;margin-top:8px}.custom-settings[hidden]{display:none!important}.custom-settings div{display:flex;flex-wrap:wrap;align-items:center;gap:8px}#saveSettingsButton{margin-top:8px}select{padding:0 30px 0 10px}.toggle{display:inline-flex;align-items:center;gap:6px;min-height:34px;border:1px solid var(--line);border-radius:8px;background:var(--soft);padding:0 9px;color:var(--muted);font-size:12px}.toggle input{width:15px;height:15px}.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.secondary{background:var(--soft)}.stats-strip{display:grid;grid-template-columns:minmax(190px,1.45fr) repeat(7,minmax(72px,1fr));gap:7px;margin-bottom:8px}.metric{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:6px 9px;min-width:0;min-height:38px;display:flex;align-items:center;justify-content:space-between;gap:8px;box-shadow:0 1px 2px #1b25230a}.metric span{flex:0 0 auto;color:var(--muted);font-size:12px;line-height:1.2}.metric strong{min-width:0;font-size:17px;line-height:1.1;overflow-wrap:anywhere}.metric.scope strong{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.secondary-metric{background:#fbfcf8;box-shadow:none}.workspace-grid{display:grid;grid-template-columns:minmax(420px,1fr) minmax(390px,.92fr);gap:10px;align-items:stretch;min-height:0}.study-mode .workspace-grid{grid-template-columns:minmax(0,3fr) minmax(330px,2fr)}.study-mode .study-panel{padding:16px}.study-mode #questionText{font-size:20px;line-height:1.62;max-height:138px}.study-mode .cloze-answer{font-size:16.5px;line-height:1.85}.study-mode .detail-panel{background:#fbfcf8}.manage-mode #questionText{max-height:108px;font-size:17px;line-height:1.48}.study-panel,.detail-panel{background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 18px #1b25230d;min-height:0}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.panel-heading h2,.redsheet-head h3,.answer-section h3{font-size:15px;line-height:1.35}.panel-heading span,#clozeMeta{color:var(--muted);font-size:12px}.unit-list{display:grid;gap:7px;margin-top:8px;overflow:auto;min-height:0;padding-right:2px}.unit-card{width:100%;height:auto;min-height:60px;display:grid;gap:3px;text-align:left;padding:7px 9px;background:var(--soft)}.unit-card.active{border-color:var(--accent);background:#edf6f1}.unit-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.unit-title{font-weight:700;font-size:13.5px;line-height:1.28}.rank-badge{flex:0 0 auto;border:1px solid var(--line);border-radius:999px;padding:2px 7px;font-size:11px;font-weight:800;line-height:1.35;background:#f3f5f1;color:var(--muted)}.rank-3{border-color:#aeb8dc;background:#eef1ff;color:#344c9a}.rank-2{border-color:#b5d5c2;background:#eef8f1;color:#2d6b43}.rank-1{border-color:#d7c992;background:#fff8df;color:#6d5618}.unit-topic{color:var(--ink);font-size:11.5px;line-height:1.35;font-weight:700;display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.unit-progress-track{display:block;height:7px;border-radius:999px;background:#e8ece7;overflow:hidden}.unit-progress-fill{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent),#4b7fc7)}.unit-meta,.unit-progress{color:var(--muted);font-size:11.5px;line-height:1.35}.unit-empty{color:var(--muted);border:1px dashed var(--line);border-radius:8px;background:var(--soft);padding:12px;font-size:12.5px;line-height:1.5}.study-panel{display:flex;flex-direction:column;padding:14px;min-width:0;overflow:hidden}.card-meta{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:9px;flex:0 0 auto}.card-meta span{border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:11.5px;padding:4px 8px;max-width:100%;overflow-wrap:anywhere}.card-meta .recommendation-badge{color:#5a4311;border-color:#d8c17a;background:#fff7dc;font-weight:700}#questionText{flex:0 0 auto;max-height:128px;overflow-y:auto;overflow-x:hidden;min-height:0;font-size:19px;line-height:1.55;font-weight:700;white-space:pre-line;word-break:normal;line-break:strict;overflow-wrap:break-word}.study-mode #questionText{cursor:pointer;border-radius:8px;padding:4px;transition:background-color .16s ease,box-shadow .16s ease}.study-mode #questionText:hover,.study-mode #questionText:focus-visible{background:#f7fbf8;box-shadow:0 0 0 3px #236b5a24;outline:none}.round-completion-card{margin-top:10px;border:1px solid #d6b46b;border-radius:8px;background:#fff8e6;padding:14px 16px;color:var(--ink)}.round-completion-card[hidden]{display:none!important}.round-completion-card h3{margin:0 0 6px;font-size:20px;line-height:1.25}.round-completion-card p{margin:0;line-height:1.6}.round-completion-stats{display:inline-flex;margin-top:10px;border-radius:999px;background:#fff;border:1px solid #ecd59c;padding:6px 10px;color:#7a4f11;font-size:13px;font-weight:800}.round-completion-card small{display:block;margin-top:8px;color:var(--muted);line-height:1.5}body.round-complete .redsheet-panel{display:none}.redsheet-panel{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}.redsheet-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:0 0 auto}.redsheet-head>div:first-child{display:flex;align-items:baseline;gap:8px;min-width:112px}.cloze-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.cloze-actions button{min-height:34px;padding:0 11px}.inline-alert{margin-top:8px;color:#7a4b00;background:#fff8e8;border:1px solid #e7d29a;border-radius:8px;padding:7px 9px;font-size:12px}.cloze-answer{flex:1 1 auto;min-height:0;margin-top:10px;word-break:normal;line-break:strict;overflow-wrap:break-word;overflow-y:auto;overflow-x:hidden;line-height:1.78;border:1px solid var(--line);border-radius:8px;background:#fcfdfb;padding:10px;font-size:16px;display:grid;align-content:start;gap:8px}.cloze-segment{display:grid;gap:7px;border:1px solid var(--line);border-radius:8px;padding:9px 11px;background:var(--panel)}.cloze-segment.current{border-color:#acd1b9;background:#fbfffc;box-shadow:0 0 0 2px #236b5a0f}.cloze-segment.previous,.cloze-segment.next{background:#f7f8f5;opacity:.68}.segment-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--muted);font-size:11.5px;line-height:1.3}.segment-head span:first-child{color:var(--accent);font-weight:800}.segment-body{white-space:pre-wrap;word-break:normal;line-break:strict;overflow-wrap:break-word;font-size:16px;line-height:1.82}.segment-preview{color:var(--muted);font-size:12px;line-height:1.45}.cloze-token{display:inline-flex;align-items:center;justify-content:center;min-width:min(calc(var(--blank-ch) * 1em),100%);max-width:100%;min-height:1.55em;margin:0 2px;border-radius:6px;padding:0 6px;vertical-align:baseline;font-weight:700;white-space:normal;overflow-wrap:anywhere;text-align:center}.hidden-token{color:#9d2f3f;background:#f8dfe3;border:1px solid #e2a6ae}.revealed{min-width:0;color:#203b2f;background:#e3f3e8;border:1px solid #acd1b9}.last-revealed{background:#c9ead4;border-color:#74b98a;box-shadow:0 0 0 2px #2f7d471f}.study-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:0 0 auto;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}.study-mode .study-footer{position:sticky;bottom:0;z-index:8;margin-right:-16px;margin-bottom:-16px;margin-left:-16px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#fffffff5;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 -6px 18px #1b252314}.review-buttons{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.review-buttons button{min-width:74px;min-height:44px;color:#fff;border:0}.again{background:var(--danger)}.hard{background:var(--warn)}.good{background:var(--ok)}.easy{background:var(--blue)}.detail-panel{display:flex;flex-direction:column;padding:12px;min-width:0;overflow:hidden}.detail-top{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:0 0 auto;margin-bottom:8px}.tab-list{display:flex;gap:5px;overflow-x:auto}.tab{min-height:32px;padding:0 10px;font-size:12.5px}.tab.active{color:var(--accent-ink);background:var(--accent);border-color:var(--accent)}.locked-detail{flex:0 0 auto;display:block;min-height:0;color:var(--muted);border-top:1px solid var(--line);background:var(--soft);border-radius:8px;padding:10px 12px;font-size:13px;text-align:center}#detailsBody{min-height:0;overflow:auto;padding-right:2px}.validation-section{border-bottom:1px solid var(--line);padding-bottom:8px;margin-bottom:10px}.validation-badges{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;padding-bottom:2px}.validation-badge{flex:0 0 auto;border:1px solid var(--line);border-radius:999px;padding:4px 8px;font-size:11.5px;font-weight:700}.validation-badge.ok{color:#245b38;background:#eef7f1;border-color:#b9d9c2}.validation-badge.warn{color:#7a4b00;background:#fff8e8;border-color:#e2c77d}.validation-messages{display:grid;gap:5px;margin-top:8px;color:#7a4b00;font-size:11.5px;line-height:1.45}.tab-panel{display:none}.tab-panel.active{display:block}.answer-section+.answer-section{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.flow-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.flow-controls{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}.flow-controls button{min-height:30px;padding:0 8px;font-size:11.5px}.flow-source{margin-bottom:6px}.flow-roadmap{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin:8px 0 10px}.flow-roadmap span{position:relative;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--muted);padding:4px 8px;font-size:11.5px;font-weight:800;line-height:1.35}.flow-roadmap span.revealed{border-color:#bcd7cb;background:#eef7f1;color:var(--accent)}.flow-roadmap span:not(:last-child):after{content:"→";color:#8c9993;margin-left:6px}.skeleton-guide{display:grid;gap:4px;margin:8px 0;border:1px solid #d8cda8;border-radius:8px;background:#fffaf0;padding:9px 10px}.skeleton-guide span{color:#6b5212;font-size:12px;font-weight:800}.skeleton-guide p,.weak-breakdown-notice{color:var(--muted);font-size:12.5px;line-height:1.5}.weak-breakdown-notice{margin:8px 0;border:1px solid #d8b9b9;border-radius:8px;background:#fff5f5;color:#8a2f2f;padding:8px 10px;font-weight:800}.skeleton-step-list{display:grid;gap:7px;margin-top:8px}.skeleton-step{display:grid;grid-template-columns:28px 1fr;gap:8px;align-items:start;border:1px solid var(--line);border-radius:8px;padding:9px;background:var(--soft)}.skeleton-step.revealed{border-color:#bcd7cb;background:#f6fbf8}.skeleton-step.hidden p{color:var(--muted);font-style:italic}.skeleton-step b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#e7f1ed;color:var(--accent);font-size:12px}.skeleton-step p{line-height:1.58}.flow-conclusion-card{display:grid;gap:5px;margin:8px 0 10px;border:1px solid #bcd7cb;border-radius:8px;background:#f0f8f4;padding:9px 10px}.flow-conclusion-card span{color:var(--accent);font-size:12px;font-weight:700}.flow-conclusion-card p{line-height:1.55;font-weight:700}.flow-spine{display:grid;gap:6px;margin:0 0 10px;border:1px solid var(--line);border-radius:8px;background:#fffdfa;padding:9px}.flow-spine-label{color:var(--muted);font-size:12px;font-weight:700}.flow-spine-terms{display:flex;flex-wrap:wrap;gap:6px}.flow-spine-terms span{border:1px solid #d8cda8;border-radius:999px;background:#fff7db;color:#5d4815;padding:4px 7px;font-size:11.5px;line-height:1.35}.flow-list{display:grid;gap:7px}.flow-step{display:grid;grid-template-columns:28px 1fr;gap:8px;align-items:start;border:1px solid var(--line);border-radius:8px;padding:9px;background:var(--soft)}.flow-step b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#e7f1ed;color:var(--accent);font-size:12px}.flow-step-label{display:inline-flex;width:fit-content;margin-bottom:5px;border:1px solid #bcd7cb;border-radius:999px;background:#eef7f1;color:var(--accent);padding:3px 8px;font-size:11.5px;font-weight:700}.flow-step p{line-height:1.58}.one-sentence-answer{display:grid;gap:5px;margin-top:10px;border:1px solid #c8d7cf;border-radius:8px;background:#f6fbf8;padding:10px}.one-sentence-answer span{color:var(--accent);font-size:12px;font-weight:700}.one-sentence-answer p{line-height:1.58;font-weight:700}.flow-placeholder{color:var(--muted);background:var(--soft);border:1px dashed var(--line);border-radius:8px;padding:12px;line-height:1.55;font-size:12.5px}.source-details{margin-top:6px}.source-details summary{cursor:pointer;color:var(--muted);font-size:12px;font-weight:700}.quote{display:block;margin-top:5px;color:var(--muted);font-size:11.5px;line-height:1.45}pre{white-space:pre-wrap;word-break:break-word;margin:0;line-height:1.68;font-family:Yu Gothic UI,Meiryo,system-ui,sans-serif}.term-list{display:flex;flex-wrap:wrap;gap:7px}.term{border:1px solid #c8d7cf;border-radius:999px;background:#f1f7f3;color:#264f39;padding:5px 9px;font-size:11.5px}.editor-label{display:grid;gap:5px;margin-top:8px;color:var(--muted);font-size:11.5px;font-weight:700}textarea{width:100%;resize:vertical;border:1px solid var(--line);border-radius:8px;padding:8px;line-height:1.55;color:var(--ink);background:#fcfdfb}.flow-editor-steps{display:grid;gap:8px;margin-top:8px}.step-editor{border:1px solid var(--line);border-radius:8px;background:var(--soft);padding:9px}.step-editor-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.step-editor-number{color:var(--accent);font-size:13px;font-weight:700}.step-remove{min-height:30px;padding:0 10px;font-size:12px}.editor-actions{display:flex;justify-content:flex-end;margin-top:12px}@media(min-width:1181px){body.study-mode,body.manage-mode{overflow:hidden}.app-shell{display:flex;flex-direction:column;height:100vh;overflow:hidden}.manage-mode .app-shell{height:100vh;min-height:0;overflow:hidden}.topbar,.update-banner,.filter-strip,.settings-panel,.unit-selector-bar,.stats-strip{flex:0 0 auto}.workspace-grid{flex:1 1 auto;height:calc(100vh - var(--header-space));overflow:hidden}body.study-mode .study-strip{display:grid;grid-template-columns:minmax(220px,1.7fr) repeat(2,minmax(74px,.76fr)) minmax(82px,.88fr) repeat(2,minmax(66px,.68fr)) minmax(74px,.78fr) minmax(62px,.62fr) minmax(82px,.84fr) minmax(88px,.92fr) minmax(72px,.74fr);gap:6px;overflow:visible;padding-bottom:0}body.study-mode .study-chip{min-height:36px;padding:5px 7px}body.study-mode .study-chip span{font-size:10.5px}body.study-mode .study-chip strong{font-size:14.5px}body.study-mode .study-chip-main strong{font-size:16px}body.study-mode .unit-selector-bar{min-height:40px;margin-bottom:7px;padding:6px 9px}body.study-mode .selected-unit{grid-template-columns:auto minmax(0,1fr);gap:8px}body.study-mode .selected-unit strong{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.study-mode .selected-unit small,body.study-mode #clearUnitButton{display:none}body.study-mode #openUnitDrawerButton{min-height:36px;padding:0 14px}body.study-mode .workspace-grid{flex:1 1 auto;height:auto;min-height:0;grid-template-columns:minmax(0,1.82fr) minmax(320px,.82fr)}body.study-mode .study-panel{padding:14px}body.study-mode .detail-panel{padding:10px}body.study-mode #questionText{max-height:min(15dvh,112px);font-size:19px;line-height:1.5}body.study-mode .redsheet-panel{margin-top:10px;padding-top:8px}body.study-mode .redsheet-head{gap:10px}body.study-mode .cloze-actions{flex-wrap:nowrap;gap:6px}body.study-mode .cloze-actions button{min-width:76px;min-height:36px;padding:0 10px}body.study-mode .cloze-answer{margin-top:8px;padding:8px;gap:7px;font-size:15.5px;line-height:1.72}body.study-mode .cloze-segment{gap:5px;padding:8px 10px}body.study-mode .segment-body{font-size:15.5px;line-height:1.72}body.study-mode .study-footer{margin-right:-14px;margin-bottom:-14px;margin-left:-14px;padding:9px 14px calc(9px + env(safe-area-inset-bottom))}body.study-mode .tab-list,body.study-mode .validation-badges{overflow-x:visible}body.study-mode .tab{min-width:58px}body.study-mode #detailsBody{font-size:14px;line-height:1.55}body.study-mode pre{font-size:14px;line-height:1.58}.manage-mode .workspace-grid{flex:1 1 auto;height:auto;min-height:0;overflow:hidden;align-items:stretch;grid-template-columns:minmax(460px,1.12fr) minmax(360px,.82fr)}.study-panel,.detail-panel,.manage-mode .study-panel,.manage-mode .detail-panel{height:100%}#allUnitsButton{flex:0 0 auto}#detailsBody{flex:1 1 auto}}@media(min-width:861px)and (max-width:1280px){.app-shell{width:min(100vw - 20px,1240px)}.topbar{grid-template-columns:minmax(240px,1fr) auto auto}.tool-dock{grid-column:1 / -1;justify-content:flex-start}.filter-strip{align-items:flex-start}button,select,input,.tab,.cloze-actions button,.review-buttons button,.flow-controls button,.mode-switch button,.study-queue-switch button,#nextButton,#approveFlowButton{min-height:44px}.study-mode .app-shell{display:flex;flex-direction:column;height:100dvh;overflow:hidden}.study-mode .topbar,.study-mode .study-strip{flex:0 0 auto}.toolbar,.tool-dock{gap:6px}.manage-mode .workspace-grid{grid-template-columns:minmax(0,1.08fr) minmax(330px,.92fr);align-items:stretch}.manage-mode .detail-panel{grid-column:auto;max-height:none}.manage-mode .study-panel,.manage-mode .detail-panel{height:min(590px,calc(100dvh - 250px))}.study-mode .workspace-grid{flex:1 1 auto;grid-template-columns:minmax(0,3fr) minmax(300px,2fr);min-height:0;overflow:hidden}.study-mode .study-panel,.study-mode .detail-panel{height:100%;overflow:hidden}.unit-card{min-height:64px}}@media(max-width:1180px){body{overflow:auto}body.study-mode{overflow:hidden}.study-strip{grid-template-columns:minmax(170px,1.2fr) repeat(4,minmax(82px,1fr))}.study-chip{min-height:38px}.local-data-panel{grid-template-columns:1fr}.local-data-actions,.provider-actions,.cloud-actions{justify-content:stretch}.cloud-sync-panel{grid-template-columns:repeat(2,minmax(0,1fr))}.cloud-sync-head,.cloud-actions{grid-column:1 / -1}.workspace-grid{grid-template-columns:minmax(0,1.12fr) minmax(320px,.88fr);align-items:start}body.study-mode .workspace-grid{grid-template-columns:minmax(0,3fr) minmax(300px,2fr);align-items:stretch}.detail-panel{grid-column:1 / -1;position:static;max-height:none;overflow:visible}body.study-mode .detail-panel{grid-column:auto;max-height:none;overflow:hidden}.unit-list,#detailsBody,body.study-mode #detailsBody{overflow:auto}}@media(max-width:860px){body.study-mode{overflow:auto}.app-shell{width:min(100vw - 20px,720px);padding-top:10px}.topbar{grid-template-columns:1fr}.brand-block{display:block;max-width:none}#statusLine{margin-top:4px;white-space:normal}.topbar,.update-banner,.study-queue-switch,.study-footer,.redsheet-head,.detail-top{align-items:stretch}.toolbar,.tool-dock,.filter-strip,.local-data-actions,.provider-actions,.cloud-actions,.study-queue-switch,.cloze-actions,.review-buttons{width:100%;justify-content:stretch}.toolbar select,.toolbar button,.tool-dock button,.filter-strip select,.filter-strip .toggle,.local-data-actions button,.provider-actions button,.cloud-actions button,.study-queue-switch button,.cloze-actions button,.review-buttons button,#nextButton,#approveFlowButton{flex:1 1 120px;min-height:44px}.filter-strip{display:grid;gap:8px}.update-banner{display:grid;grid-template-columns:1fr}.unit-selector-bar,.local-data-panel,.local-data-status,.cloud-sync-panel,.selected-unit,.unit-selector-actions{display:grid;grid-template-columns:1fr;align-items:stretch}.local-data-status small{white-space:normal}.local-data-main,.cloud-field{min-width:0}.selected-unit small{white-space:normal}.filter-group,.filter-toggles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch}.filter-label{grid-column:1 / -1;text-align:left}.study-queue-switch{flex-direction:row}.study-queue-switch button{flex:1 1 0}.stats-strip,.study-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.study-chip-main,.metric.scope{grid-column:1 / -1}body.study-mode .workspace-grid,.workspace-grid{grid-template-columns:1fr;height:auto}body.study-mode #questionText,#questionText{font-size:18px;min-height:78px;max-height:none}.cloze-answer{min-height:240px;font-size:15px;max-height:none;overflow-y:auto;overflow-x:hidden}.segment-body{font-size:15px}}@media(min-width:861px)and (max-width:1280px){body.study-mode .study-strip{display:grid;grid-template-columns:minmax(150px,1.35fr) repeat(7,minmax(58px,.84fr)) repeat(3,minmax(48px,.62fr));gap:6px;margin-bottom:6px;overflow:visible;padding-bottom:3px}body.study-mode .study-chip{min-height:40px;padding:5px 7px}body.study-mode .study-chip-main{min-width:0}body.study-mode .study-chip span{font-size:10.5px}body.study-mode .study-chip strong{font-size:14px}body.study-mode .unit-selector-bar{margin-bottom:7px;padding:6px 8px}body.study-mode .selected-unit{grid-template-columns:auto minmax(0,1fr);gap:6px}body.study-mode .selected-unit strong{font-size:15px}body.study-mode .selected-unit small{display:none}body.study-mode .unit-selector-actions{gap:5px}body.study-mode #clearUnitButton{display:none}}@media(min-width:861px)and (max-width:1280px){body.study-mode .topbar{gap:8px}body.study-mode .study-queue-switch button{min-width:70px;padding:0 9px}body.study-mode .workspace-grid{grid-template-columns:minmax(0,1.55fr) minmax(300px,.95fr)}body.study-mode #questionText{max-height:min(18dvh,150px)}}@media(max-width:860px){body.study-mode .app-shell{width:100%;padding:max(6px,env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom))}body.study-mode .topbar{grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center}body.study-mode .brand-block{display:block;min-width:0}body.study-mode h1{font-size:20px}body.study-mode #statusLine{margin-top:2px;white-space:nowrap}body.study-mode .mode-switch{justify-content:flex-end;width:auto}body.study-mode .mode-switch button{flex:0 0 auto;min-width:54px;padding:0 9px}body.study-mode .study-queue-switch{grid-column:1 / -1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;width:100%}body.study-mode .study-queue-switch button{min-width:0;padding:0 5px;font-size:12.5px}body.study-mode .study-strip{display:flex;margin-right:-8px;margin-left:-8px;overflow-x:auto;overflow-y:hidden;padding-right:8px;padding-bottom:3px;padding-left:8px;-webkit-overflow-scrolling:touch}body.study-mode .study-chip{flex:0 0 82px}body.study-mode .study-chip-main{flex:0 0 172px}body.study-mode .unit-selector-bar{display:flex;align-items:center;gap:6px}body.study-mode .selected-unit{display:grid;min-width:0}body.study-mode .unit-selector-actions{display:flex;flex:0 0 auto}body.study-mode #openUnitDrawerButton{min-height:38px;padding:0 9px;white-space:nowrap}body.study-mode .workspace-grid{gap:8px}body.study-mode .study-panel{padding:10px}body.study-mode .card-meta{gap:4px;margin-bottom:7px}body.study-mode .card-meta span{padding:3px 7px;font-size:10.5px}body.study-mode #questionText{max-height:24dvh;min-height:64px;font-size:17px;line-height:1.58}body.study-mode .redsheet-panel{margin-top:9px;padding-top:8px}body.study-mode .redsheet-head{display:grid;gap:7px}body.study-mode .redsheet-head>div:first-child{justify-content:space-between;min-width:0}body.study-mode .cloze-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}body.study-mode .cloze-actions button{min-width:0;padding:0 5px;font-size:12.5px}body.study-mode .cloze-answer{min-height:clamp(170px,28dvh,240px);font-size:15px}body.study-mode .segment-body{font-size:15px;line-height:1.78}body.study-mode .study-footer{margin-right:-10px;margin-bottom:-10px;margin-left:-10px;padding:9px 10px calc(9px + env(safe-area-inset-bottom))}body.study-mode .review-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}body.study-mode .review-buttons button{min-width:0;padding:0 5px;font-size:14px}body.study-mode .detail-panel{padding:10px}}@media(min-width:560px)and (max-width:860px){body.study-mode .redsheet-head{grid-template-columns:minmax(98px,.65fr) minmax(0,2.6fr);align-items:center}body.study-mode .cloze-actions{grid-template-columns:repeat(6,minmax(0,1fr))}body.study-mode .cloze-actions button{font-size:12px}}@media(max-width:860px){body.manage-mode .app-shell{width:100%;padding:max(6px,env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom))}body.manage-mode .topbar{grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center}body.manage-mode .brand-block{display:block;min-width:0}body.manage-mode h1{font-size:20px}body.manage-mode #statusLine{margin-top:2px;white-space:nowrap}body.manage-mode .mode-switch{justify-content:flex-end;width:auto}body.manage-mode .mode-switch button{flex:0 0 auto;min-width:54px;padding:0 9px}body.manage-mode .tool-dock{grid-column:1 / -1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;width:100%}body.manage-mode .tool-dock button{min-width:0;padding:0 5px;font-size:12.5px}body.manage-mode .filter-strip{display:grid;gap:6px;padding:6px 7px}body.manage-mode .filter-group,body.manage-mode .filter-toggles{display:flex;flex-wrap:wrap;gap:5px;width:100%}body.manage-mode .filter-label{flex:0 0 auto;grid-column:auto;min-height:44px;display:inline-flex;align-items:center}body.manage-mode .filter-strip select{flex:1 1 145px;min-width:0}body.manage-mode .filter-strip .toggle{flex:1 1 112px;min-width:0}body.manage-mode .stats-strip{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;margin-bottom:7px;padding-bottom:3px;-webkit-overflow-scrolling:touch}body.manage-mode .metric{flex:0 0 112px;min-height:44px;padding:5px 7px}body.manage-mode .metric.scope{flex-basis:174px;grid-column:auto}body.manage-mode .metric strong{font-size:15px}body.manage-mode .settings-panel{padding:7px 8px}body.manage-mode .unit-selector-bar{display:flex;align-items:center;gap:6px;padding:7px 8px}body.manage-mode .selected-unit{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px;min-width:0}body.manage-mode .selected-unit strong{font-size:15px}body.manage-mode .selected-unit small{display:none}body.manage-mode .unit-selector-actions{display:flex;flex:0 0 auto;gap:5px}body.manage-mode #openUnitDrawerButton{min-height:38px;padding:0 9px;white-space:nowrap}body.manage-mode #clearUnitButton{display:none}body.manage-mode .workspace-grid{gap:8px}}html,body{width:100%;max-width:100%}body.study-mode{overflow-x:hidden}body.study-mode #approveFlowButton{display:none}body.study-mode:not(.queue-unit) .unit-selector-bar{display:none!important}.study-metrics-more{min-width:0}.study-metrics-more summary{min-height:44px;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:8px;background:var(--soft);color:var(--muted);cursor:pointer;font-size:12px;font-weight:800;-webkit-user-select:none;user-select:none}.study-metrics-more summary::-webkit-details-marker{display:none}.study-metrics-more summary:after{content:"+";margin-left:6px;color:var(--accent);font-size:14px;line-height:1}.study-metrics-more[open] summary:after{content:"-"}.study-metrics-more-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:6px;margin-top:6px}body.study-mode .study-chip,body.study-mode .metric{overflow:hidden}body.study-mode .study-chip span,body.study-mode .study-chip strong,body.study-mode .metric span,body.study-mode .metric strong{min-width:0}body.study-mode .detail-top{gap:6px}body.study-mode .tab-list{flex:1 1 auto}body.study-mode .tab{min-height:44px}body.study-mode .study-footer{display:grid;grid-template-columns:minmax(76px,.22fr) minmax(0,1fr);align-items:stretch;margin:12px 0 0;padding:10px 0 calc(10px + env(safe-area-inset-bottom));border-radius:0 0 8px 8px}body.study-mode:not(.answer-open) #nextButton{width:100%}body.study-mode.answer-open .review-buttons{width:100%}body.study-mode .review-buttons button,body.study-mode #nextButton,body.study-mode .cloze-actions button,body.study-mode .study-queue-switch button,body.study-mode .unit-selector-actions button,body.study-mode .local-data-actions button{min-height:44px}body.study-mode .local-data-panel{position:fixed;top:calc(58px + env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));z-index:30;width:min(560px,calc(100vw - 20px));margin:0;box-shadow:0 18px 50px #1b252333}body.study-mode .unit-drawer-panel{padding-bottom:calc(12px + env(safe-area-inset-bottom))}@media(min-width:861px){body.study-mode{overflow:hidden}body.study-mode .app-shell{width:min(1480px,calc(100vw - 20px));height:100dvh;display:flex;flex-direction:column;overflow:hidden;padding-top:max(6px,env(safe-area-inset-top));padding-bottom:calc(8px + env(safe-area-inset-bottom))}body.study-mode .topbar,body.study-mode .update-banner,body.study-mode .study-strip,body.study-mode .unit-selector-bar{flex:0 0 auto}body.study-mode .topbar{grid-template-columns:minmax(190px,1fr) auto auto;gap:8px}body.study-mode .brand-block{min-width:0}body.study-mode h1{font-size:21px;white-space:nowrap}body.study-mode #statusLine{max-width:42vw}body.study-mode .study-queue-switch{min-width:0}body.study-mode .study-queue-switch button{min-width:76px;padding:0 10px;white-space:nowrap}body.study-mode .study-strip{display:grid;grid-template-columns:minmax(210px,1.7fr) repeat(4,minmax(82px,.82fr)) minmax(76px,.68fr);align-items:stretch;gap:6px;margin-bottom:8px;overflow:visible;padding:0}body.study-mode .study-chip{min-height:44px;padding:6px 8px}body.study-mode .study-chip-main{grid-column:auto}body.study-mode .study-metrics-more{position:relative}body.study-mode .study-metrics-more[open]{grid-column:1 / -1}body.study-mode .study-metrics-more[open] summary{width:104px}body.study-mode .unit-selector-bar{min-height:44px;margin-bottom:8px;padding:7px 10px}body.study-mode .selected-unit{grid-template-columns:auto minmax(0,1fr)}body.study-mode .selected-unit strong{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.study-mode .selected-unit small,body.study-mode #clearUnitButton{display:none}body.study-mode .workspace-grid{flex:1 1 auto;min-height:0;height:auto;display:grid;grid-template-columns:minmax(0,3fr) minmax(320px,2fr);gap:10px;align-items:stretch;overflow:hidden}body.study-mode .study-panel,body.study-mode .detail-panel{height:100%;min-height:0;overflow:hidden}body.study-mode .study-panel{padding:14px}body.study-mode .detail-panel{padding:10px}body.study-mode .card-meta{max-height:60px;overflow:auto;padding-bottom:2px}body.study-mode #questionText{max-height:min(18dvh,150px);font-size:19px;line-height:1.56}body.study-mode .redsheet-panel{min-height:0;margin-top:10px;padding-top:8px}body.study-mode .redsheet-head{display:grid;grid-template-columns:minmax(116px,.38fr) minmax(0,1fr);align-items:center}body.study-mode .cloze-actions{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}body.study-mode .cloze-actions button{min-width:0;padding:0 6px;font-size:12.5px;white-space:nowrap}body.study-mode.answer-open.detail-open .redsheet-head{grid-template-columns:minmax(84px,.25fr) minmax(0,1fr)}body.study-mode.answer-open.detail-open .cloze-actions{grid-template-columns:repeat(3,minmax(0,1fr))}body.study-mode .cloze-answer{min-height:0;margin-top:8px;padding:9px;font-size:15.5px;line-height:1.76}body.study-mode .segment-body{font-size:15.5px;line-height:1.78}body.study-mode .study-footer{position:sticky;bottom:0;z-index:8;margin-right:0;margin-bottom:0;margin-left:0;padding-right:0;padding-left:0}body.study-mode .review-buttons{display:grid;grid-template-columns:repeat(4,minmax(72px,1fr));gap:7px;min-width:0;width:100%}body.study-mode #detailsBody{flex:1 1 auto;min-height:0;overflow:auto;padding-bottom:calc(8px + env(safe-area-inset-bottom))}}@media(min-width:861px)and (max-width:1180px){body.study-mode .app-shell{width:calc(100vw - 16px)}body.study-mode .topbar{grid-template-columns:minmax(160px,1fr) auto auto}body.study-mode h1{font-size:19px}body.study-mode #statusLine{max-width:28vw}body.study-mode .mode-switch button{min-width:58px;padding:0 8px}body.study-mode .study-queue-switch button{min-width:68px;padding:0 7px;font-size:12.5px}body.study-mode .study-strip{grid-template-columns:minmax(178px,1.52fr) repeat(4,minmax(72px,.78fr)) minmax(64px,.58fr);margin-bottom:7px}body.study-mode .study-chip{padding:5px 7px}body.study-mode .study-chip span{font-size:10.5px}body.study-mode .study-chip strong{font-size:14px}body.study-mode .workspace-grid{grid-template-columns:minmax(0,3fr) minmax(280px,2fr)}body.study-mode .redsheet-head{grid-template-columns:minmax(98px,.34fr) minmax(0,1fr)}body.study-mode .cloze-actions{gap:5px}body.study-mode .cloze-actions button{font-size:12px}}@media(max-width:860px){body.study-mode{overflow:auto}body.study-mode .app-shell{width:100%;min-height:100dvh;height:auto;display:block;overflow:visible;padding:max(6px,env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom))}body.study-mode .topbar{grid-template-columns:minmax(0,1fr) auto;gap:7px}body.study-mode h1{font-size:19px}body.study-mode #statusLine{max-width:100%;white-space:nowrap}body.study-mode .study-queue-switch{grid-column:1 / -1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}body.study-mode .study-queue-switch button{min-width:0;padding:0 5px;font-size:12.5px}body.study-mode .study-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:7px 0;overflow:visible;padding:0}body.study-mode .study-chip-main,body.study-mode .study-metrics-more{grid-column:1 / -1}body.study-mode .study-chip{min-height:44px;padding:6px 8px}body.study-mode .unit-selector-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;margin-bottom:8px;padding:7px 8px}body.study-mode .selected-unit{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px}body.study-mode .selected-unit strong{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.study-mode .selected-unit small,body.study-mode #clearUnitButton{display:none}body.study-mode .workspace-grid{display:grid;grid-template-columns:1fr;gap:8px;height:auto;overflow:visible}body.study-mode .study-panel,body.study-mode .detail-panel{height:auto;max-height:none;overflow:visible}body.study-mode .study-panel{padding:10px}body.study-mode .card-meta{gap:4px;margin-bottom:7px}body.study-mode .card-meta span{padding:3px 7px;font-size:10.5px}body.study-mode .card-meta span:nth-child(n+6){display:none}body.study-mode #questionText{min-height:72px;max-height:none;font-size:17px;line-height:1.58}body.study-mode .redsheet-panel{margin-top:9px;padding-top:8px}body.study-mode .redsheet-head{display:grid;gap:7px}body.study-mode .redsheet-head>div:first-child{justify-content:space-between;min-width:0}body.study-mode .cloze-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}body.study-mode .cloze-actions button{min-width:0;padding:0 5px;font-size:12.5px}body.study-mode .cloze-answer{min-height:clamp(190px,32dvh,300px);max-height:none;font-size:15px;line-height:1.78}body.study-mode .study-footer{position:sticky;bottom:0;margin:10px 0 0;padding:9px 0 calc(9px + env(safe-area-inset-bottom))}body.study-mode .review-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;width:100%}body.study-mode .review-buttons button{min-width:0;padding:0 5px;font-size:13.5px}body.study-mode #nextButton{flex:0 0 76px}body.study-mode .detail-panel{padding:10px}body.study-mode .detail-top{display:block}body.study-mode .tab-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;overflow:visible}body.study-mode .tab{min-width:0;padding:0 5px}body.study-mode #detailsBody{overflow:visible;padding-bottom:calc(8px + env(safe-area-inset-bottom))}body.study-mode .local-data-panel{top:auto;right:8px;bottom:calc(8px + env(safe-area-inset-bottom));left:8px;width:auto;max-height:min(62dvh,460px);overflow:auto}body.study-mode .local-data-status,body.study-mode .local-data-actions{display:grid;grid-template-columns:1fr}}.detail-actions{display:flex;gap:6px;align-items:center;justify-content:flex-end}body.study-mode:not(.detail-open) .detail-panel{display:none!important}body.study-mode .workspace-grid{grid-template-columns:minmax(0,1fr)}body.study-mode.detail-open .workspace-grid{grid-template-columns:minmax(0,1.45fr) minmax(340px,.72fr)}body.study-mode .study-panel{min-height:0}body.study-mode #questionText{max-height:min(22dvh,190px);font-size:20px;line-height:1.62}body.study-mode.answer-open .cloze-answer{min-height:min(42dvh,420px)}body.study-mode .study-queue-switch{display:grid;grid-template-columns:repeat(6,minmax(64px,auto));gap:5px}body.study-mode .study-queue-switch button{min-width:0;padding:0 10px;font-size:14px}body.study-mode .study-strip{grid-template-columns:minmax(260px,1fr) repeat(4,minmax(72px,.18fr)) minmax(64px,.12fr)}body.study-mode .study-footer{grid-template-columns:minmax(74px,.18fr) minmax(116px,.24fr) minmax(0,1fr);gap:8px;align-items:stretch;padding:8px 0 calc(8px + env(safe-area-inset-bottom))}body.study-mode:not(.answer-open) .study-footer{grid-template-columns:1fr}body.study-mode:not(.answer-open) #detailsToggleButton,#detailsToggleButton[hidden]{display:none!important}body.study-mode .review-buttons{display:grid;grid-template-columns:repeat(4,minmax(72px,1fr));gap:6px;min-width:0}body.study-mode .review-buttons button{min-width:0;min-height:44px;padding:0 6px;border-radius:8px;font-size:13.5px;font-weight:800;line-height:1.15}body.study-mode #nextButton,body.study-mode #detailsToggleButton{min-height:44px;padding:0 10px;white-space:nowrap}body.study-mode .detail-panel{min-height:0}@media(min-width:1181px){body.study-mode:not(.detail-open) .study-panel{padding-right:18px;padding-left:18px}body.study-mode:not(.detail-open) #questionText{max-height:min(24dvh,210px)}body.study-mode:not(.detail-open).answer-open .cloze-answer{min-height:min(48dvh,500px)}body.study-mode.answer-open .study-panel{display:grid;grid-template-columns:minmax(360px,.72fr) minmax(0,1.28fr);grid-template-rows:auto minmax(0,1fr) auto;column-gap:14px;row-gap:10px}body.study-mode.answer-open .card-meta{grid-column:1;grid-row:1;max-height:92px}body.study-mode.answer-open #questionText{grid-column:1;grid-row:2;max-height:none;align-self:stretch;font-size:clamp(16px,1vw,18px)}body.study-mode.answer-open .redsheet-panel{grid-column:2;grid-row:1 / 3;min-height:0;margin-top:0;padding-top:0;padding-left:14px;border-top:0;border-left:1px solid var(--line)}body.study-mode.answer-open .study-footer{grid-column:1 / -1;grid-row:3}body.study-mode.answer-open.detail-open .workspace-grid{grid-template-columns:minmax(0,2.15fr) minmax(340px,.85fr)}}@media(min-width:861px)and (max-width:1180px){body.study-mode .study-queue-switch{grid-template-columns:repeat(6,minmax(54px,1fr))}body.study-mode .study-queue-switch button{padding:0 5px;font-size:12.5px}body.study-mode.detail-open .workspace-grid{grid-template-columns:minmax(0,1fr)}body.study-mode.detail-open .detail-panel{max-height:36dvh}body.study-mode.answer-open .study-panel{display:grid;grid-template-columns:minmax(300px,.48fr) minmax(0,.52fr);grid-template-rows:auto minmax(0,1fr) auto;column-gap:12px;row-gap:10px}body.study-mode.answer-open .card-meta{grid-column:1;grid-row:1}body.study-mode.answer-open #questionText{grid-column:1;grid-row:2;max-height:none;font-size:16.5px}body.study-mode.answer-open .redsheet-panel{grid-column:2;grid-row:1 / 3;min-height:0;margin-top:0;padding-top:0;padding-left:12px;border-top:0;border-left:1px solid var(--line)}body.study-mode.answer-open .study-footer{grid-column:1 / -1;grid-row:3}body.study-mode .study-footer{grid-template-columns:minmax(70px,.16fr) minmax(108px,.22fr) minmax(0,1fr)}}@media(max-width:860px){body.study-mode .study-queue-switch{grid-template-columns:repeat(3,minmax(0,1fr))}body.study-mode .study-strip{grid-template-columns:repeat(2,minmax(0,1fr))}body.study-mode #questionText{max-height:none;font-size:18px}body.study-mode.answer-open .cloze-answer{min-height:clamp(260px,42dvh,460px);padding-bottom:calc(96px + env(safe-area-inset-bottom))}body.study-mode.answer-open .study-panel{padding-bottom:calc(116px + env(safe-area-inset-bottom))}body.study-mode.detail-open .workspace-grid{grid-template-columns:1fr}body.study-mode .study-footer{grid-template-columns:76px minmax(0,1fr)}body.study-mode:not(.answer-open) .study-footer{grid-template-columns:1fr}body.study-mode .review-buttons{grid-column:1 / -1;grid-template-columns:repeat(4,minmax(0,1fr))}body.study-mode .review-buttons button{font-size:12.5px}}body.study-mode .cloze-actions button,body.study-mode .review-buttons button,body.study-mode #nextButton,body.study-mode #detailsToggleButton{min-inline-size:44px}@media(min-width:861px){body.study-mode{overflow-x:hidden;overflow-y:auto}body.study-mode .app-shell{width:min(1720px,calc(100vw - 20px));min-height:100dvh;height:auto;overflow:visible}body.study-mode .workspace-grid{overflow:visible}body.study-mode .study-panel,body.study-mode .detail-panel{height:auto}body.study-mode .study-footer{position:static;margin:8px 0 0;padding:8px 0 0;background:transparent;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}body.study-mode .cloze-actions{grid-template-columns:repeat(3,minmax(88px,1fr))}body.study-mode .cloze-actions button{font-size:13px;min-height:44px}body.study-mode.answer-open .cloze-answer{min-height:clamp(340px,46dvh,620px)}}@media(min-width:1181px){body.study-mode.detail-open .workspace-grid,body.study-mode.answer-open.detail-open .workspace-grid{grid-template-columns:minmax(0,1fr) minmax(clamp(400px,30vw,520px),.45fr)}body.study-mode.answer-open .study-panel{grid-template-columns:minmax(360px,.55fr) minmax(0,1.45fr)}}@media(min-width:861px)and (max-width:1180px){body.study-mode .topbar{grid-template-columns:1fr}body.study-mode .study-queue-switch{grid-template-columns:repeat(6,minmax(68px,1fr))}body.study-mode.answer-open .study-panel{grid-template-columns:minmax(0,.58fr) minmax(360px,.42fr)}body.study-mode.detail-open .detail-panel{max-height:none}}body.study-mode #prevSegmentButton,body.study-mode #nextSegmentButton{display:none!important}.cloze-segment.context{background:#fff}.cloze-segment.context .segment-head span:first-child{color:var(--muted)}.cloze-segment.current{scroll-margin:28px}.cloze-token.last-revealed{scroll-margin:80px}.unit-drawer-panel{width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}.unit-list{flex:1 1 auto;min-height:0;padding-right:4px}.unit-card{min-height:158px;grid-template-columns:minmax(0,1fr);align-content:start;gap:7px;overflow:visible}.unit-card.active{box-shadow:inset 4px 0 0 var(--accent),0 1px 5px #1b252314}.unit-title-row,.unit-meta,.unit-progress,.unit-stat-grid{min-width:0}.unit-title{white-space:normal;overflow-wrap:anywhere}.unit-topic{display:block;color:var(--muted);font-size:11px;line-height:1.35;overflow:visible;-webkit-line-clamp:unset}.unit-meta,.unit-progress{white-space:nowrap}.unit-stat-grid{display:flex;flex-wrap:wrap;gap:5px}.unit-mini-dashboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.unit-mini-dashboard .unit-stat-chip{justify-content:center;border-color:#cfded8;background:#f9fcfa;padding-inline:5px}.unit-stat-chip{display:inline-flex;align-items:baseline;gap:3px;min-height:24px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--muted);padding:2px 7px;font-size:11px;line-height:1.35;white-space:nowrap}.unit-stat-chip strong{color:var(--ink);font-size:12px}.unit-stat-chip.accent{border-color:#b5d5c2;background:#eef8f1;color:#2d6b43}.unit-stat-chip.warn{border-color:#e4c66e;background:#fff8df;color:#7b5f0e}#allUnitsButton{flex:0 0 auto;min-height:146px}body.study-mode #questionText{border:1px solid #dbe5df;background:#fbfdfb;box-shadow:inset 0 1px #ffffffb8;padding:12px 14px;scrollbar-width:thin}body.study-mode.answer-open #questionText{font-size:clamp(16px,1.08vw,18px);line-height:1.72;font-weight:760}@media(min-width:861px){body.study-mode.answer-open{overflow:hidden}body.study-mode.answer-open .app-shell{display:flex;flex-direction:column;height:100dvh;min-height:0;overflow:hidden;padding-bottom:6px}body.study-mode.answer-open .topbar,body.study-mode.answer-open .study-strip,body.study-mode.answer-open .unit-selector-bar,body.study-mode.answer-open .local-data-panel,body.study-mode.answer-open .settings-panel{flex:0 0 auto}body.study-mode.answer-open .study-metrics-more{display:none}body.study-mode.answer-open .workspace-grid{flex:1 1 auto;min-height:0;overflow:hidden}body.study-mode.answer-open .study-panel,body.study-mode.answer-open .detail-panel{height:100%;min-height:0;overflow:hidden}body.study-mode.answer-open .study-panel{grid-template-rows:auto minmax(0,1fr) auto}body.study-mode.answer-open #questionText{overflow:auto}body.study-mode.answer-open .redsheet-panel{min-height:0;overflow:hidden}body.study-mode.answer-open .redsheet-head{display:grid;grid-template-columns:minmax(112px,.26fr) minmax(0,1fr);align-items:center}body.study-mode.answer-open .cloze-actions{display:grid;grid-template-columns:repeat(4,minmax(84px,1fr));gap:6px}body.study-mode.answer-open .cloze-answer{min-height:0;height:auto;max-height:none;overflow:auto}body.study-mode.answer-open .cloze-segment{padding:8px 10px}body.study-mode.answer-open .segment-body{font-size:15.5px;line-height:1.74}body.study-mode.answer-open .study-footer{flex:0 0 auto;margin-top:8px}}@media(min-width:1181px){body.study-mode.answer-open .study-panel{grid-template-columns:minmax(320px,.48fr) minmax(0,1.52fr)}}@media(min-width:861px)and (max-width:1180px){body.study-mode.answer-open .study-panel{grid-template-columns:minmax(280px,.5fr) minmax(0,.5fr)}body.study-mode.answer-open .cloze-actions{grid-template-columns:repeat(2,minmax(96px,1fr))}}@media(max-width:860px){.unit-drawer-controls{grid-template-columns:1fr}.unit-mini-dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}.unit-card{min-height:190px}body.study-mode.answer-open .study-metrics-more{display:none}body.study-mode.answer-open .cloze-answer{min-height:clamp(240px,42dvh,420px);max-height:none;padding-bottom:calc(82px + env(safe-area-inset-bottom))}body.study-mode.answer-open .cloze-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.unit-drawer{justify-items:stretch}.unit-drawer-panel{width:auto;margin:8px}}@media(max-width:1180px){.unit-selector-bar{flex-wrap:wrap}.selected-unit{flex:1 1 100%}.session-controls{justify-content:flex-start;order:3;flex:1 1 100%;overflow-x:auto;padding-top:2px}}@media(max-width:640px){.session-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.session-controls label{display:grid;grid-template-columns:auto minmax(0,1fr)}.session-controls select,.session-progress{width:100%;min-width:0}.session-progress{grid-column:1 / -1}}body.unit-drawer-open{overflow:hidden}body.study-mode .study-footer{display:grid}body.study-mode .detail-top{flex-wrap:wrap}body.study-mode .tab-list{min-width:0;flex:1 1 220px}body.study-mode .detail-actions{flex:0 0 auto;flex-wrap:wrap}body.study-mode.answer-open .redsheet-head{min-width:0}body.study-mode.answer-open .cloze-actions{min-width:0;grid-template-columns:repeat(auto-fit,minmax(92px,1fr))}@media(max-width:860px){.unit-selector-bar .session-controls{grid-column:1 / -1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;overflow-x:visible}.unit-selector-bar .session-controls label{display:grid;grid-template-columns:auto minmax(0,1fr)}.unit-selector-bar .session-controls select,.unit-selector-bar .session-progress{width:100%;min-width:0}.unit-selector-bar .session-progress{grid-column:1 / -1}body.study-mode .study-footer{grid-template-columns:minmax(74px,.28fr) minmax(104px,.36fr) minmax(0,1fr)}body.study-mode .review-buttons{grid-column:1 / -1}}@media(max-width:560px){body.study-mode .study-footer{grid-template-columns:minmax(70px,.42fr) minmax(0,1fr)}body.study-mode #detailsToggleButton{grid-column:2}body.study-mode .review-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}}body.study-mode:not(.answer-open) .redsheet-panel{flex:0 0 auto}body.study-mode:not(.answer-open) .redsheet-head{grid-template-columns:minmax(104px,.26fr) minmax(220px,1fr);align-items:center}body.study-mode:not(.answer-open) .cloze-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:6px}body.study-mode .study-chip{min-width:0}body.study-mode .study-chip span{white-space:normal}body.study-mode .study-chip strong{white-space:nowrap}body.study-mode .mode-switch button,body.manage-mode .mode-switch button{min-height:44px}@media(min-width:861px)and (max-width:1180px){body.study-mode .topbar{grid-template-columns:minmax(210px,1fr) auto;align-items:start}body.study-mode .mode-switch{justify-self:end}body.study-mode .study-queue-switch{grid-column:1 / -1;grid-template-columns:repeat(6,minmax(0,1fr));width:100%}body.study-mode .study-strip{grid-template-columns:minmax(300px,1.35fr) repeat(4,minmax(96px,.74fr)) minmax(82px,.48fr)}body.study-mode .study-chip{padding:6px 8px}body.study-mode .study-chip span{font-size:11px}body.study-mode .study-chip strong{font-size:15px}}@media(min-width:861px){body.manage-mode{overflow-y:auto!important}body.manage-mode .app-shell{height:auto!important;min-height:100dvh;overflow:visible!important}body.manage-mode .workspace-grid{height:auto!important;min-height:360px;overflow:visible!important;align-items:start}body.manage-mode .study-panel,body.manage-mode .detail-panel{height:auto!important;min-height:360px;max-height:none!important;overflow:visible}}.unit-stat-chip{min-width:0;justify-content:center;text-align:center;white-space:normal}.unit-stat-chip span,.unit-stat-chip strong{min-width:0}.unit-mini-dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}
