:root { --ink:#202722; --muted:#69736c; --line:#dfe4df; --paper:#f6f7f4; --white:#fff; --green:#236c4a; --green-soft:#dcece2; --yellow:#f0c45a; --red:#b55347; --shadow:0 12px 35px rgba(28,48,37,.08); font-family:Inter,"SF Pro Display","PingFang SC","Microsoft YaHei",sans-serif; color:var(--ink); background:var(--paper); }.rating-actions { grid-template-columns:repeat(4,1fr)!important; }
.spelling-input { display:block; width:min(360px,100%); margin-top:18px; font-size:16px; }.spelling-result { display:block; margin-top:6px; color:var(--muted); }.spelling-result.correct { color:var(--green); }.checklist { display:grid; gap:8px; margin-top:18px; }.checklist label { display:flex; align-items:center; gap:8px; color:var(--ink); font-size:13px; }.checklist input { width:16px; height:16px; accent-color:var(--green); }
.subject-tabs { display:flex; gap:5px; margin-bottom:14px; overflow-x:auto; scrollbar-width:none; }.subject-tabs button { border:1px solid var(--line); background:white; color:var(--muted); border-radius:5px; padding:8px 12px; display:flex; align-items:center; gap:7px; white-space:nowrap; }.subject-tabs button small { display:grid; place-items:center; min-width:19px; height:19px; padding:0 5px; background:#edf0ed; border-radius:3px; font-size:9px; }.subject-tabs button.active { color:white; background:var(--green); border-color:var(--green); }.subject-tabs button.active small { background:rgba(255,255,255,.16); } dialog select { border:1px solid #ccd4ce; border-radius:5px; padding:11px 12px; background:white; outline:none; } dialog select:focus { border-color:var(--green); box-shadow:0 0 0 3px rgba(35,108,74,.09); } dialog select:disabled { color:#667169; background:#f0f2f0; }.answer-detail { display:block; margin-top:13px; color:var(--muted); font-size:12px; font-weight:400; }
* { box-sizing:border-box; } body { margin:0; min-width:320px; } button,input,textarea,select { font:inherit; letter-spacing:0; } button { cursor:pointer; } .app-shell { min-height:100vh; display:grid; grid-template-columns:220px 1fr; }
.sidebar { position:fixed; inset:0 auto 0 0; width:220px; background:#1f2b24; color:#eaf1ec; padding:28px 18px; display:flex; flex-direction:column; z-index:5; }.brand { display:flex; align-items:center; gap:12px; padding:0 10px 32px; color:white; text-decoration:none; font-size:19px; font-weight:700; }.brand-mark { display:grid; place-items:center; width:34px; height:34px; background:#d7e8dc; color:#235d42; border-radius:7px; font-family:serif; }.sidebar nav { display:grid; gap:6px; }.nav-item { width:100%; border:0; background:transparent; color:#abb8b0; display:flex; align-items:center; gap:13px; padding:12px 14px; border-radius:6px; text-align:left; }.nav-item span { width:18px; text-align:center; font-size:18px; }.nav-item:hover,.nav-item.active { background:#334138; color:white; }.sidebar-bottom { margin-top:auto; display:grid; gap:5px; }.privacy-note { color:#84928a; font-size:11px; padding:12px 13px; display:flex; gap:8px; align-items:center; }.status-dot { width:7px; height:7px; background:#71bd89; border-radius:50%; }.file-label { cursor:pointer; }.file-label input { display:none; }
main { grid-column:2; width:min(1120px,100%); margin:auto; padding:35px 54px 70px; align-self:start; }.topbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:32px; }.top-actions { display:flex; gap:8px; }.eyebrow { color:var(--muted); font-size:12px; margin:0 0 5px; }.topbar h1 { margin:0; font-size:26px; letter-spacing:0; }.primary,.secondary { border:0; border-radius:6px; padding:13px 19px; font-weight:650; }.primary { background:var(--green); color:white; box-shadow:0 6px 16px rgba(35,108,74,.17); }.primary:hover { background:#195b3d; }.primary:disabled { background:#8a968e; cursor:default; box-shadow:none; }.primary.compact,.secondary.compact { padding:10px 14px; display:flex; gap:6px; align-items:center; }.secondary { background:#edf0ed; color:var(--ink); }.secondary:hover { background:#e2e7e3; }.view { display:none; }.view.active { display:block; }
main { margin:0 auto; }
.hero-panel { min-height:270px; padding:44px 48px; background:#e5eee7; border:1px solid #d2dfd5; border-radius:8px; display:flex; justify-content:space-between; align-items:center; overflow:hidden; position:relative; }.hero-panel:after { content:""; position:absolute; width:240px; height:240px; right:-85px; bottom:-135px; border:42px solid rgba(51,104,75,.08); border-radius:50%; }.hero-copy { position:relative; z-index:1; max-width:600px; }.pill { display:inline-block; padding:5px 9px; background:#cfe2d5; color:#2c6b4b; font-size:11px; font-weight:700; border-radius:4px; }.hero-copy h2 { font-family:Georgia,"Songti SC",serif; font-size:34px; font-weight:500; margin:15px 0 10px; letter-spacing:0; }.hero-copy p { color:#5a695f; margin:0 0 25px; }.progress-ring { --progress:0deg; flex:0 0 154px; height:154px; border-radius:50%; background:conic-gradient(var(--green) var(--progress),#cfdbd2 0); display:grid; place-items:center; margin:0 45px; z-index:1; }.progress-ring:before { content:""; grid-area:1/1; width:128px; height:128px; background:#e5eee7; border-radius:50%; }.progress-ring div { grid-area:1/1; z-index:1; text-align:center; }.progress-ring strong,.progress-ring span { display:block; }.progress-ring strong { font-size:27px; }.progress-ring span { font-size:11px; color:var(--muted); margin-top:3px; }
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:18px 0 38px; }.stats-grid article { min-height:91px; background:white; border:1px solid var(--line); border-radius:7px; padding:20px; display:flex; align-items:center; gap:14px; }.stats-grid strong,.stats-grid span { display:block; }.stats-grid strong { font-size:21px; }.stats-grid article div span { color:var(--muted); font-size:12px; margin-top:3px; }.stat-icon { width:38px; height:38px; border-radius:6px; display:grid!important; place-items:center; font-weight:700; }.stat-icon.due { background:#e2efe7; color:var(--green); }.stat-icon.new { background:#fff0ce; color:#9f7315; }.stat-icon.time { background:#e6eaef; color:#506377; }.stat-icon.streak { background:#f2e4df; color:#a24e3c; }
.goal-strip { background:white; border:1px solid var(--line); border-left:3px solid var(--yellow); border-radius:6px; padding:17px 20px; display:flex; justify-content:space-between; align-items:center; margin:-20px 0 34px; }.goal-strip strong { display:block; margin:9px 0 3px; font-size:14px; }.goal-strip p { margin:0; color:var(--muted); font-size:12px; }
.section-head { display:flex; align-items:end; justify-content:space-between; margin-bottom:15px; }.section-head h2 { font-size:18px; margin:0 0 3px; }.section-head p,.library-meta p { color:var(--muted); font-size:12px; margin:0; }.text-button { border:0; background:none; color:var(--green); font-size:12px; }.card-list { display:grid; gap:9px; }.memory-card { background:white; border:1px solid var(--line); border-radius:7px; padding:19px 20px; display:flex; justify-content:space-between; gap:15px; transition:.15s ease; }.memory-card:hover { border-color:#b5c3ba; transform:translateY(-1px); box-shadow:0 8px 24px rgba(28,48,37,.05); }.card-tags { display:flex; align-items:center; gap:10px; }.card-tags span { font-size:10px; background:#edf2ee; color:#4e6857; padding:4px 7px; border-radius:3px; }.card-tags small { color:#89918c; }.memory-card h3 { font-size:15px; margin:10px 0 5px; }.memory-card p { color:var(--muted); font-size:13px; margin:0; line-height:1.55; }.source-line { display:flex; gap:12px; margin-top:10px; color:#879189; font-size:10px; }.source-line a,.source a { color:var(--green); text-decoration:none; }.card-main { min-width:0; }.card-actions { display:flex; opacity:0; transition:.15s; }.memory-card:hover .card-actions { opacity:1; }.card-actions button,.icon-button { border:0; background:none; color:#7c877f; width:32px; height:32px; border-radius:5px; font-size:17px; }.card-actions button:hover,.icon-button:hover { background:#edf0ed; color:var(--ink); }
.toolbar { display:flex; gap:12px; margin-bottom:20px; }.search { flex:1; background:white; border:1px solid var(--line); border-radius:6px; display:flex; align-items:center; padding:0 13px; gap:9px; }.search input { width:100%; border:0; outline:none; padding:12px 0; background:transparent; }.toolbar select { border:1px solid var(--line); border-radius:6px; background:white; padding:0 30px 0 13px; color:var(--ink); }.library-meta { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }.tag-filters { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }.tag-filters button { border:1px solid var(--line); background:white; color:var(--muted); border-radius:4px; padding:5px 9px; font-size:11px; }.tag-filters button.active { color:white; background:var(--green); border-color:var(--green); }.empty-state { text-align:center; padding:80px 20px; color:var(--muted); }.empty-state span { font-size:38px; }.empty-state h3 { color:var(--ink); }.inline-empty { border:1px dashed #cbd3cd; padding:30px; text-align:center; color:var(--muted); border-radius:7px; }.hidden { display:none!important; }
.insight-lead { background:#25332a; color:white; border-radius:8px; padding:38px 42px; display:flex; justify-content:space-between; align-items:center; }.insight-lead h2 { font-family:Georgia,"Songti SC",serif; font-size:28px; font-weight:500; margin:14px 0 7px; }.insight-lead p { color:#aebbb3; margin:0; }.mastery { text-align:center; padding:8px 30px; border-left:1px solid #4a574f; }.mastery strong,.mastery span { display:block; }.mastery strong { font-size:36px; color:#b8dbc3; }.mastery span { color:#aebbb3; font-size:12px; }.insights-stats { grid-template-columns:repeat(3,1fr); margin-bottom:18px; }.chart-panel { background:white; border:1px solid var(--line); border-radius:7px; padding:24px; margin-bottom:16px; }.bar-chart { height:170px; display:flex; align-items:end; gap:18px; padding-top:20px; border-bottom:1px solid var(--line); }.bar-column { flex:1; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:5px; color:var(--muted); font-size:10px; }.bar-column div { width:min(38px,70%); background:#78a888; border-radius:3px 3px 0 0; min-height:4px; }.bar-column small { padding:4px; }.topic-row { display:grid; grid-template-columns:110px 1fr 42px; align-items:center; gap:12px; margin:18px 0; font-size:13px; }.topic-row>div { height:7px; background:#edf0ed; border-radius:5px; overflow:hidden; }.topic-row i { display:block; height:100%; background:var(--green); }.topic-row strong { text-align:right; font-size:12px; }.muted { color:var(--muted); }
.learning-history { margin:30px 0 16px; }.learning-history-head { align-items:center; }.calendar-nav { display:grid; grid-template-columns:32px minmax(92px,auto) 32px; align-items:center; gap:5px; }.calendar-nav strong { text-align:center; font-size:13px; }.calendar-nav .icon-button { border:1px solid var(--line); background:white; font-size:22px; line-height:1; }.learning-history-panel { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,.8fr); background:white; border:1px solid var(--line); border-radius:7px; overflow:hidden; }.calendar-pane { min-width:0; padding:22px 24px 18px; }.calendar-weekdays,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; }.calendar-weekdays { margin-bottom:5px; }.calendar-weekdays span { padding:5px 0; color:var(--muted); font-size:10px; text-align:center; }.calendar-grid { min-height:270px; }.calendar-day { position:relative; width:100%; aspect-ratio:1; min-width:0; border:1px solid transparent; border-radius:5px; background:transparent; color:var(--ink); display:grid; place-items:center; font-size:12px; }.calendar-day:hover { background:#f0f4f1; }.calendar-day.outside-month { color:#b5bcb7; }.calendar-day.has-study { background:#e7f0ea; color:#245c40; }.calendar-day.plan-complete { background:#2e7854; color:white; }.calendar-day.selected { border-color:#1f2b24; box-shadow:inset 0 0 0 1px #1f2b24; }.calendar-day.today:after { content:""; position:absolute; bottom:5px; width:4px; height:4px; border-radius:50%; background:currentColor; }.calendar-day:focus-visible { outline:3px solid rgba(35,108,74,.18); outline-offset:1px; }.calendar-legend { display:flex; gap:15px; justify-content:flex-end; margin-top:13px; color:var(--muted); font-size:10px; }.calendar-legend span { display:flex; align-items:center; gap:5px; }.calendar-legend i { width:10px; height:10px; border-radius:2px; background:#e7f0ea; }.calendar-legend i.complete { background:#2e7854; }.daily-summary { min-width:0; padding:24px; border-left:1px solid var(--line); background:#fafbf9; }.daily-summary-head { display:flex; align-items:start; justify-content:space-between; gap:10px; }.daily-summary-head h3 { margin:0; font-size:17px; }.daily-summary-head time { color:var(--muted); font-size:11px; white-space:nowrap; }.daily-summary-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; margin:22px 0; background:var(--line); border:1px solid var(--line); }.summary-metric { min-width:0; padding:12px; background:white; }.summary-metric strong,.summary-metric span { display:block; }.summary-metric strong { font-size:18px; overflow-wrap:anywhere; }.summary-metric span { margin-top:3px; color:var(--muted); font-size:10px; }.daily-summary-block { padding-top:15px; border-top:1px solid var(--line); margin-top:15px; }.daily-summary-block h4 { margin:0 0 10px; font-size:12px; }.summary-tags { display:flex; flex-wrap:wrap; gap:5px; }.summary-tags span { padding:4px 7px; border-radius:3px; background:#edf2ee; color:#4e6857; font-size:10px; }.daily-summary-block ul { padding-left:17px; margin:0; color:var(--muted); font-size:11px; line-height:1.65; }.daily-summary-empty { color:var(--muted); font-size:12px; line-height:1.6; margin:24px 0 0; }
.mistake-head { align-items:center; margin-bottom:18px; }.mistake-head-actions { display:flex; gap:8px; flex:0 0 auto; }.mistake-toolbar { margin-bottom:14px; }.mistake-list { display:grid; gap:10px; }.mistake-item { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px; padding:20px; border:1px solid var(--line); border-radius:7px; background:white; }.mistake-item:has(.mistake-item-media:not(.hidden)) { grid-template-columns:120px minmax(0,1fr) auto; }.mistake-item-media { width:120px; height:120px; border-radius:5px; overflow:hidden; background:#edf0ed; }.mistake-item-media img { width:100%; height:100%; display:block; object-fit:cover; }.mistake-item-main { min-width:0; }.mistake-item-meta { display:flex; flex-wrap:wrap; gap:6px; }.mistake-item-meta span { padding:4px 7px; border-radius:3px; background:#edf2ee; color:#4e6857; font-size:10px; }.mistake-item h3 { margin:10px 0 13px; font-size:15px; line-height:1.55; overflow-wrap:anywhere; }.mistake-item dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0; }.mistake-item dl div { min-width:0; padding-left:10px; border-left:2px solid #e4e9e5; }.mistake-item dt { margin-bottom:4px; color:var(--muted); font-size:10px; }.mistake-item dd { margin:0; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }.mistake-item-actions { display:flex; align-items:flex-start; gap:4px; }.mistake-item-actions .secondary { padding:9px 11px; white-space:nowrap; font-size:11px; }.icon-button.danger:hover { background:#f5e8e6; color:var(--red); }.visually-hidden { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }.mistake-image-field { min-width:0; margin:0 0 15px; padding:0; border:0; }.mistake-image-field legend { margin-bottom:7px; font-size:12px; font-weight:650; }.mistake-image-picker { min-height:105px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; padding:18px; border:1px dashed #b9c5bd; border-radius:6px; background:#fafbf9; color:var(--muted); cursor:pointer; text-align:center; }.mistake-image-picker:hover { border-color:var(--green); background:#f4f8f5; }.mistake-image-picker strong { color:var(--ink); font-size:12px; }.mistake-image-picker small { font-size:10px; }.mistake-image-icon { font-size:25px; color:var(--green); }.mistake-image-preview { min-width:0; display:grid; grid-template-columns:70px minmax(0,1fr) 32px; align-items:center; gap:12px; padding:10px; border:1px solid var(--line); border-radius:6px; background:#fafbf9; }.mistake-image-preview img { width:70px; height:70px; display:block; object-fit:cover; border-radius:4px; background:#edf0ed; }.mistake-image-preview strong,.mistake-image-preview small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.mistake-image-preview strong { font-size:12px; }.mistake-image-preview small { margin-top:4px; color:var(--muted); font-size:10px; }.ocr-status { display:flex; align-items:center; gap:8px; margin-top:9px; padding:9px 11px; border-radius:5px; background:#edf2ee; color:#3d624b; font-size:11px; }.ocr-spinner { width:13px; height:13px; flex:0 0 auto; border:2px solid #b8d0c0; border-top-color:var(--green); border-radius:50%; animation:ocr-spin .8s linear infinite; }.mistake-image-hint { margin:9px 0 0; }.mistake-dialog-actions { flex-wrap:wrap; }@keyframes ocr-spin { to { transform:rotate(360deg); } }
.batch-ocr-dialog { width:min(920px,calc(100% - 30px)); }.batch-image-picker { min-width:0; display:flex; align-items:center; gap:12px; margin:0 0 16px; padding:16px 18px; border:1px dashed #b9c5bd; border-radius:6px; background:#fafbf9; color:var(--muted); cursor:pointer; }.batch-image-picker:hover { border-color:var(--green); background:#f4f8f5; }.batch-image-picker span:last-child { min-width:0; }.batch-image-picker strong,.batch-image-picker small { display:block; overflow-wrap:anywhere; }.batch-image-picker strong { color:var(--ink); font-size:12px; }.batch-image-picker small { margin-top:3px; font-size:10px; font-weight:400; }.batch-ocr-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:13px; border-bottom:1px solid var(--line); }.batch-ocr-toolbar p { min-width:0; margin:0; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }.batch-ocr-toolbar .secondary:disabled { color:#9aa39d; cursor:default; }.batch-ocr-empty { min-height:180px; display:grid; place-items:center; align-content:center; gap:7px; color:var(--muted); text-align:center; }.batch-ocr-empty span { font-size:28px; }.batch-ocr-empty p { max-width:300px; margin:0; font-size:12px; line-height:1.6; }.batch-ocr-queue { display:grid; }.batch-ocr-item { min-width:0; padding:18px 0; border-bottom:1px solid var(--line); }.batch-ocr-item-head { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:12px; }.batch-ocr-file { min-width:0; display:grid; grid-template-columns:64px minmax(0,1fr); align-items:center; gap:11px; }.batch-ocr-file img { width:64px; height:64px; display:block; object-fit:cover; border-radius:4px; background:#edf0ed; }.batch-ocr-file div { min-width:0; }.batch-ocr-file strong,.batch-ocr-file small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.batch-ocr-file strong { margin-top:3px; font-size:12px; }.batch-ocr-file small { margin-top:3px; color:var(--muted); font-size:10px; }.batch-ocr-index { color:var(--green); font-size:10px; font-weight:700; }.batch-ocr-state { display:flex; align-items:center; gap:7px; }.batch-status-badge { min-width:52px; padding:5px 7px; border-radius:3px; background:#edf0ed; color:#5f6a63; font-size:10px; text-align:center; white-space:nowrap; }.batch-ocr-item[data-state="processing"] .batch-status-badge { background:#fff0ce; color:#8a6418; }.batch-ocr-item[data-state="succeeded"] .batch-status-badge { background:#dcece2; color:#236c4a; }.batch-ocr-item[data-state="failed"] .batch-status-badge { background:#f5e8e6; color:#9f463c; }.batch-ocr-order { display:flex; gap:2px; }.batch-ocr-message { margin:11px 0 0; padding:9px 11px; border-radius:5px; background:#f5e8e6; color:#93453c; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }.batch-ocr-review { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr); gap:0 14px; margin-top:15px; padding-top:15px; border-top:1px dashed #d7ddd8; }.batch-ocr-review>label,.batch-ocr-review .form-row label { display:grid; gap:6px; margin-bottom:12px; font-size:11px; font-weight:650; }.batch-ocr-review>.batch-question-field { grid-row:span 3; }.batch-ocr-review textarea { min-width:0; min-height:62px; }.batch-ocr-review .batch-question-field textarea { min-height:100%; }.batch-ocr-review .form-row { gap:9px; }.batch-retry { margin-top:11px; }.batch-ocr-actions { position:sticky; bottom:-28px; z-index:1; margin:0 -28px -28px; padding:15px 28px; border-top:1px solid var(--line); background:white; }.batch-ocr-actions .primary:disabled { cursor:default; }
.review-overlay { position:fixed; inset:0; background:#f4f5f2; z-index:20; display:flex; flex-direction:column; }.review-overlay>header { height:70px; display:grid; grid-template-columns:80px 1fr 80px; gap:20px; align-items:center; padding:0 25px; border-bottom:1px solid var(--line); }.review-progress { height:4px; background:#dde2de; border-radius:4px; overflow:hidden; }.review-progress div { height:100%; background:var(--green); transition:.25s; }.review-overlay header>span { text-align:right; color:var(--muted); font-size:12px; }.review-stage { flex:1; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:30px; }.review-card { width:min(720px,100%); min-height:390px; padding:38px 45px; background:white; border:1px solid #dce2dd; border-radius:8px; box-shadow:var(--shadow); }.review-card-meta { display:flex; justify-content:space-between; color:var(--muted); font-size:11px; }.review-card-meta span:first-child { color:var(--green); background:var(--green-soft); padding:4px 7px; border-radius:3px; }.card-side-label { color:#8a948d; font-size:10px; text-transform:uppercase; margin:44px 0 12px; }.review-card h2 { font-family:Georgia,"Songti SC",serif; font-weight:500; font-size:27px; line-height:1.45; }.divider { height:1px; background:var(--line); margin:34px 0 24px; }.answer-area .card-side-label { margin:0 0 11px; }.answer-area div:not(.divider) { font-size:17px; line-height:1.7; }.answer-area .source { margin-top:24px; color:#8a948d; font-size:11px; }.reveal { width:min(340px,100%); margin-top:24px; }.reveal kbd { margin-left:14px; background:rgba(255,255,255,.16); padding:3px 6px; border-radius:3px; font-size:10px; }.rating-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; width:min(570px,100%); margin-top:24px; }.rating-actions button { border:1px solid var(--line); background:white; border-radius:6px; padding:11px; color:var(--ink); }.rating-actions button:hover { border-color:#97a89c; }.rating-actions span { float:left; color:#a1aaa4; font-size:10px; }.rating-actions strong,.rating-actions small { display:block; }.rating-actions small { color:var(--muted); margin-top:3px; font-size:10px; }
.pdf-file-picker { min-width:0; display:flex; align-items:center; gap:12px; margin:0 0 14px; padding:15px 16px; border:1px dashed #b9c5bd; border-radius:6px; background:#fafbf9; color:var(--muted); cursor:pointer; }.pdf-file-picker:hover { border-color:var(--green); background:#f4f8f5; }.pdf-file-picker>span:last-child { min-width:0; }.pdf-file-picker strong,.pdf-file-picker small { display:block; overflow-wrap:anywhere; }.pdf-file-picker strong { color:var(--ink); font-size:12px; }.pdf-file-picker small { margin-top:3px; font-size:10px; }.pdf-file-icon { width:30px; height:30px; display:grid; place-items:center; border-radius:5px; background:var(--green-soft); color:var(--green); font-size:18px; }.pdf-import-status { min-width:0; margin:0 0 12px; padding:9px 11px; border-radius:5px; background:#edf2ee; color:#3d624b; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }.pdf-page-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:4px 0 8px; padding-bottom:9px; border-bottom:1px solid var(--line); }.pdf-page-toolbar strong { font-size:12px; }.pdf-page-progress { color:var(--muted); font-size:10px; white-space:nowrap; }.pdf-page-list { min-width:0; display:grid; gap:10px; max-height:52vh; overflow:auto; padding:2px 2px 4px; }.pdf-page-empty { padding:28px 15px; border:1px dashed #cbd3cd; border-radius:6px; color:var(--muted); text-align:center; font-size:11px; line-height:1.6; }.pdf-page-row { min-width:0; display:grid; grid-template-columns:92px minmax(0,1fr); gap:13px; padding:12px; border:1px solid var(--line); border-radius:6px; background:#fafbf9; }.pdf-page-row>img,.pdf-page-thumbnail { width:92px; height:116px; display:block; object-fit:cover; border-radius:4px; background:#edf0ed; }.pdf-page-row>div,.pdf-page-content { min-width:0; }.pdf-page-row header,.pdf-page-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px; }.pdf-page-number { color:var(--green); font-size:11px; font-weight:700; }.pdf-page-source { color:var(--muted); font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.pdf-page-status,.pdf-page-badge { display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border-radius:3px; background:#edf0ed; color:#5f6a63; font-size:10px; white-space:nowrap; }.pdf-page-row[data-status="ocr-processing"] .pdf-page-status,.pdf-page-row[data-status="processing"] .pdf-page-status { background:#fff0ce; color:#8a6418; }.pdf-page-row[data-status="ocr-ready"] .pdf-page-status,.pdf-page-row[data-status="text-ready"] .pdf-page-status,.pdf-page-row[data-status="ready"] .pdf-page-status { background:#dcece2; color:#236c4a; }.pdf-page-row[data-status="failed"] .pdf-page-status { background:#f5e8e6; color:#9f463c; }.pdf-page-row textarea,.pdf-page-text { width:100%; min-width:0; min-height:108px; margin:0; resize:vertical; font-size:12px; line-height:1.55; background:white; }.pdf-page-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:8px; }.pdf-page-actions button { padding:7px 9px; font-size:10px; }.pdf-page-error { margin:7px 0 0; color:var(--red); font-size:10px; line-height:1.45; overflow-wrap:anywhere; }.pdf-page-row[data-status="ocr-pending"] textarea { border-style:dashed; }.pdf-page-row[data-status="failed"] textarea { border-color:#dfb8b2; }.pdf-page-row[data-status="ocr-processing"] .pdf-page-actions button { pointer-events:none; opacity:.55; }
dialog { width:min(650px,calc(100% - 30px)); max-height:90vh; border:0; border-radius:8px; padding:0; box-shadow:0 30px 90px rgba(20,35,26,.2); } dialog::backdrop { background:rgba(20,28,23,.55); } dialog form { padding:28px; max-height:90vh; overflow:auto; }.dialog-head { display:flex; justify-content:space-between; align-items:start; }.dialog-head h2 { margin:0 0 22px; font-size:22px; } .dialog-hint { color:var(--muted); font-size:12px; line-height:1.6; margin:-10px 0 18px; } form>label,.form-row label { display:grid; gap:7px; margin-bottom:15px; font-size:12px; font-weight:650; } .field-hint { color:var(--muted); font-size:10px; font-weight:400; line-height:1.4; } textarea,input { border:1px solid #ccd4ce; border-radius:5px; padding:11px 12px; outline:none; } textarea:focus,input:focus { border-color:var(--green); box-shadow:0 0 0 3px rgba(35,108,74,.09); } textarea { min-height:88px; resize:vertical; }.short-textarea { min-height:65px; }.source-textarea { min-height:150px; }.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }.split-import-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:-4px 0 16px; }.split-import-status { min-width:0; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }.dialog-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }.split-preview { border-top:1px solid var(--line); padding-top:15px; margin-top:5px; }.draft-card { background:#f7f8f6; border:1px solid var(--line); border-radius:6px; padding:14px; margin-bottom:10px; }.draft-card label { display:grid; gap:5px; font-size:11px; font-weight:650; margin:8px 0; }.draft-card textarea { min-height:65px; }.draft-card .draft-check { display:flex; grid-template-columns:auto 1fr; align-items:center; justify-content:flex-start; flex-direction:row; color:var(--green); }.draft-check input { width:auto; }.warning { color:#9a641f; display:block; margin-top:5px; }.toast { position:fixed; left:50%; bottom:25px; transform:translate(-50%,20px); background:#243129; color:white; padding:11px 18px; border-radius:5px; opacity:0; pointer-events:none; transition:.2s; z-index:50; font-size:12px; }.toast.show { opacity:1; transform:translate(-50%,0); }
@media(max-width:800px) { .app-shell { display:block; padding-bottom:68px; }.sidebar { position:fixed; top:auto; width:100%; height:64px; padding:6px 10px; flex-direction:row; background:#1f2b24; }.brand,.sidebar-bottom { display:none; }.sidebar nav { width:100%; display:grid; grid-template-columns:repeat(4,1fr); }.nav-item { justify-content:center; flex-direction:column; gap:1px; padding:5px; font-size:10px; }.nav-item span { font-size:18px; } main { padding:24px 16px 45px; }.topbar { margin-bottom:22px; align-items:flex-start; gap:10px; }.topbar h1 { font-size:23px; }.top-actions { display:grid; grid-template-columns:1fr 1fr; }.top-actions button { font-size:0; justify-content:center; width:42px; height:42px; padding:0!important; }.top-actions button span { font-size:18px; }.top-actions #addCardBtn { grid-column:2; grid-row:1; }.top-actions #settingsBtn { display:none; }.hero-panel { min-height:310px; padding:30px 25px; align-items:flex-start; }.hero-copy h2 { font-size:28px; }.progress-ring { position:absolute; width:92px; height:92px; right:16px; bottom:18px; margin:0; }.progress-ring:before { width:76px; height:76px; }.progress-ring strong { font-size:18px; }.stats-grid { grid-template-columns:1fr 1fr; }.stats-grid article { padding:15px; }.goal-strip { margin-top:-20px; }.memory-card { padding:16px; }.card-actions { opacity:1; }.source-line { flex-wrap:wrap; }.toolbar { flex-direction:column; }.toolbar select { padding:11px; }.library-meta { align-items:flex-start; gap:8px; }.mistake-head { align-items:flex-start; gap:12px; }.mistake-head .primary { flex:0 0 auto; padding:10px 12px; }.mistake-item,.mistake-item:has(.mistake-item-media:not(.hidden)) { grid-template-columns:1fr; padding:16px; }.mistake-item-media { width:100%; height:auto; aspect-ratio:16/7; }.mistake-item dl { grid-template-columns:1fr; gap:9px; }.mistake-item-actions { flex-wrap:wrap; }.mistake-item-actions .secondary { margin-right:auto; }.insight-lead { padding:28px 24px; }.mastery { padding:8px 10px; }.insight-lead h2 { font-size:23px; }.learning-history-panel { grid-template-columns:1fr; }.calendar-pane { padding:17px 13px 14px; }.calendar-grid { min-height:auto; }.calendar-weekdays,.calendar-grid { gap:3px; }.calendar-day { min-height:37px; }.daily-summary { border-left:0; border-top:1px solid var(--line); padding:20px 18px; }.review-stage { padding:16px; justify-content:flex-start; overflow:auto; }.review-card { min-height:360px; padding:28px 24px; margin-top:20px; }.review-card h2 { font-size:23px; }.answer-area .source { white-space:pre-wrap; }.rating-actions { position:sticky; bottom:5px; }.form-row { grid-template-columns:1fr; gap:0; }.mistake-dialog-actions { display:grid; grid-template-columns:1fr 1fr; }.mistake-dialog-actions #saveMistakeBtn { grid-column:1/-1; grid-row:1; }.mistake-dialog-actions button { min-width:0; padding-left:10px; padding-right:10px; } }
@media(max-width:800px) { .mistake-head { flex-direction:column; }.mistake-head-actions { width:100%; display:grid; grid-template-columns:1fr 1fr; }.mistake-head-actions button { min-width:0; justify-content:center; padding:10px!important; }.batch-ocr-dialog form { padding:22px 18px; }.batch-image-picker { padding:13px; }.batch-ocr-toolbar { align-items:flex-start; }.batch-ocr-toolbar .secondary { flex:0 0 auto; padding:9px 10px; }.batch-ocr-item-head { grid-template-columns:minmax(0,1fr) auto; gap:10px; }.batch-ocr-file { grid-column:1/-1; grid-template-columns:56px minmax(0,1fr); }.batch-ocr-file img { width:56px; height:56px; }.batch-ocr-state { min-width:0; }.batch-ocr-order { justify-self:end; }.batch-ocr-review { grid-template-columns:1fr; }.batch-ocr-review>.batch-question-field { grid-row:auto; }.batch-ocr-review .batch-question-field textarea { min-height:105px; }.batch-ocr-actions { bottom:-22px; grid-template-columns:1fr 1.35fr; margin:0 -18px -22px; padding:13px 18px; }.batch-ocr-actions button { min-width:0; padding-left:9px; padding-right:9px; } }
@media(max-width:800px) { .pdf-page-list { max-height:48vh; }.pdf-page-row { grid-template-columns:58px minmax(0,1fr); gap:10px; padding:10px; }.pdf-page-row>img,.pdf-page-thumbnail { width:58px; height:78px; }.pdf-page-head { align-items:flex-start; flex-wrap:wrap; }.pdf-page-status { order:3; }.pdf-page-row textarea,.pdf-page-text { min-height:125px; }.pdf-file-picker { padding:13px; }.pdf-import-status { margin-bottom:10px; }.pdf-page-toolbar { margin-top:2px; }.pdf-page-actions { gap:5px; }.pdf-page-actions button { min-width:0; padding:7px 8px; } }

/* Separate gallery and camera entry points on mobile while sharing one preview. */
.mistake-image-choices { min-width:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.mistake-image-field { display:block; min-inline-size:0; }
.mistake-image-hint { display:block; clear:both; margin:12px 0 0; line-height:1.55; }
.split-source-row { align-items:start; }
.split-source-row > label { min-width:0; align-content:start; }
.split-source-row .field-hint { min-height:28px; }
@media(max-width:520px) { .mistake-image-choices { grid-template-columns:1fr; } }

/* Personal pink theme: calm enough for long study sessions, warm without losing contrast. */
:root {
  --ink:#32292d;
  --muted:#796a70;
  --line:#eadde2;
  --paper:#fff9fb;
  --white:#fff;
  --green:#c94f79;
  --green-soft:#f8d8e5;
  --yellow:#efb84f;
  --red:#b84c5e;
  --shadow:0 12px 30px rgba(117,50,74,.09);
}

body { background:var(--paper); }
.app-shell { grid-template-columns:232px minmax(0,1fr); }
.sidebar {
  width:232px;
  padding:26px 16px;
  background:#6f2947;
  color:#fff5f8;
  box-shadow:8px 0 28px rgba(80,27,49,.08);
}
.brand { padding:0 10px 30px; }
.brand-mark { background:#fff0f5; color:#a63c64; }
.nav-item { color:#e8bdce; border-radius:6px; }
.nav-item:hover,.nav-item.active { background:#93405f; color:white; }
.privacy-note { color:#dba9bd; }
.status-dot { background:#f5c850; box-shadow:0 0 0 3px rgba(245,200,80,.12); }
.privacy-note[data-state="synced"] .status-dot { background:#8ed5a6; }
.privacy-note[data-state="syncing"] .status-dot,.privacy-note[data-state="pending"] .status-dot { background:#f5c850; }
.privacy-note[data-state="offline"] .status-dot { background:#d99aaa; }
.account-error { margin:0 0 14px; padding:9px 11px; border-radius:5px; background:#fbe8ed; color:#9c3e5e; font-size:11px; line-height:1.5; }
#accountSignedOut>label { display:grid; grid-template-columns:1fr; gap:7px; margin-bottom:15px; font-size:12px; font-weight:650; }
#accountSignedOut>label input { width:100%; min-width:0; }
.account-profile { display:flex; align-items:center; gap:12px; margin:2px 0 24px; padding:15px; border:1px solid var(--line); border-radius:7px; background:#fff9fb; }
.account-avatar { width:38px; height:38px; display:grid; place-items:center; flex:0 0 38px; border-radius:50%; background:#f8d8e5; color:#a63c64; font-size:19px; }
.account-profile div { min-width:0; }.account-profile strong,.account-profile small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.account-profile small { margin-top:4px; color:var(--muted); font-size:10px; }
.danger-text { color:#a43e5d; }
.account-support-note { margin:-4px 0 18px; padding-left:10px; border-left:2px solid #e8a8bf; color:#795564; font-size:11px; line-height:1.6; }
.account-section { margin:20px 0 18px; border:1px solid #ead6de; border-radius:7px; overflow:hidden; background:#fff9fb; }
.account-section-toggle { width:100%; min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 13px; border:0; background:transparent; color:var(--ink); font:inherit; font-size:12px; font-weight:650; cursor:pointer; }
.account-section-toggle:hover { background:#f9eaf0; }
.account-section-toggle span:last-child { color:#a64d6e; font-size:16px; transition:transform .18s ease; }
.account-section-toggle[aria-expanded="true"] span:last-child { transform:rotate(180deg); }
.account-password-panel { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; padding:14px; border-top:1px solid #ead6de; background:#fff; }
.account-password-panel>label { min-width:0; display:grid; gap:7px; margin-bottom:13px; font-size:11px; font-weight:650; }
.account-password-panel>label:first-child { grid-column:1/-1; }
.account-password-panel input { width:100%; min-width:0; }
.account-password-panel .account-error { grid-column:1/-1; }
.account-password-submit { grid-column:2; justify-content:center; }
.account-session-actions { flex-wrap:wrap; }

main { width:min(1180px,100%); padding:36px 52px 72px; }
.topbar { margin-bottom:28px; }
.topbar h1 { font-size:28px; }
.top-actions { flex-wrap:wrap; justify-content:flex-end; }
.primary { box-shadow:0 7px 18px rgba(201,79,121,.2); }
.primary:hover { background:#ad3f68; }
.primary:disabled { background:#bbaeb3; }
.secondary { background:#f7edf1; }
.secondary:hover { background:#f1dfe6; }
.text-button { font-weight:650; }

.subject-tabs { gap:8px; margin-bottom:18px; }
.subject-tabs button { border-color:#ead9e0; background:#fff; }
.subject-tabs button:hover { border-color:#d89aae; background:#fff7fa; }
.subject-tabs button small { background:#f6e9ee; }

.hero-panel {
  min-height:258px;
  padding:40px 44px;
  background:#fbe9f0;
  border-color:#f0cad8;
  box-shadow:0 14px 32px rgba(156,65,96,.07);
}
.hero-panel:after { border-color:rgba(201,79,121,.08); }
.pill { background:#f4ccda; color:#8f3558; }
.hero-copy h2 { max-width:620px; color:#492f39; }
.hero-copy p { color:#765e67; }
.progress-ring { background:conic-gradient(var(--green) var(--progress),#f1ccd9 0); }
.progress-ring:before { background:#fbe9f0; }

.stats-grid { gap:14px; margin:16px 0 30px; }
.stats-grid article,.memory-card,.mistake-item,.chart-panel,.learning-history-panel {
  border-color:#eadce1;
  box-shadow:0 5px 18px rgba(94,44,62,.035);
}
.stats-grid article { min-height:94px; }
.stat-icon.due { background:#f8dce6; color:#b83f6a; }
.stat-icon.new { background:#fff0c9; color:#91630b; }
.stat-icon.time { background:#e6edf3; color:#536b7d; }
.stat-icon.streak { background:#e4f1ec; color:#317059; }
.goal-strip { margin:0 0 34px; border-left-color:#e7a83a; box-shadow:0 5px 18px rgba(94,44,62,.035); }

.memory-card:hover { border-color:#d69aad; box-shadow:0 9px 24px rgba(128,54,80,.08); }
.card-tags span,.mistake-item-meta span,.summary-tags span { background:#f7e8ee; color:#88405c; }
.card-actions button:hover,.icon-button:hover { background:#f7e8ee; }
.search:focus-within { border-color:#d47a99; box-shadow:0 0 0 3px rgba(201,79,121,.09); }
.tag-filters button:hover { border-color:#d89aae; }

.insight-lead { background:#75304d; box-shadow:0 12px 30px rgba(104,39,64,.13); }
.insight-lead p,.mastery span { color:#ecc7d5; }
.mastery { border-left-color:#a45c76; }
.mastery strong { color:#ffd7e4; }
.bar-column div { background:#d66d92; }
.topic-row>div { background:#f3e4e9; }
.calendar-day:hover { background:#fbedf2; }
.calendar-day.has-study { background:#f8dce6; color:#8f3558; }
.calendar-day.plan-complete { background:#c94f79; }
.calendar-day.selected { border-color:#7c304f; box-shadow:inset 0 0 0 1px #7c304f; }
.calendar-legend i { background:#f8dce6; }
.calendar-legend i.complete { background:#c94f79; }
.daily-summary { background:#fffbfc; }

.mistake-image-picker,.batch-image-picker,.pdf-file-picker { border-color:#dfb6c5; background:#fff9fb; }
.mistake-image-picker:hover,.batch-image-picker:hover,.pdf-file-picker:hover { border-color:var(--green); background:#fff1f6; }
.mistake-image-preview,.pdf-page-row { background:#fffbfc; }
.ocr-status,.pdf-import-status { background:#f8e5ec; color:#7d3e57; }
.pdf-page-icon,.pdf-file-icon { background:#f7d8e4; }
.pdf-page-row[data-status="ocr-ready"] .pdf-page-status,
.pdf-page-row[data-status="text-ready"] .pdf-page-status,
.pdf-page-row[data-status="ready"] .pdf-page-status,
.batch-ocr-item[data-state="succeeded"] .batch-status-badge { background:#f7dce6; color:#983d60; }

.review-overlay { background:#fff7fa; }
.review-overlay>header { background:#fff; }
.review-progress { background:#f1dce4; }
.review-card { border-color:#edd7df; box-shadow:0 18px 50px rgba(111,41,71,.11); }
.review-card-meta span:first-child { color:#943b5e; background:#f8dce6; }
.rating-actions button:hover { border-color:#d88daa; background:#fff8fa; }

dialog { border:1px solid #ead6de; box-shadow:0 30px 90px rgba(85,30,52,.24); }
dialog::backdrop { background:rgba(67,31,46,.5); }
dialog form { background:#fff; }
dialog select,textarea,input { border-color:#ddcbd2; }
textarea:focus,input:focus,dialog select:focus { box-shadow:0 0 0 3px rgba(201,79,121,.1); }
.draft-card { background:#fff9fb; }
.batch-ocr-actions { background:#fff; }
.toast { background:#633047; }

@media(max-width:800px) {
  .app-shell { padding-bottom:72px; }
  .sidebar { width:100%; height:68px; padding:6px 8px; background:#6f2947; box-shadow:0 -7px 24px rgba(76,25,47,.16); }
  .sidebar nav { gap:4px; }
  .nav-item { min-width:0; padding:5px 2px; }
  .nav-item:hover,.nav-item.active { background:#963f61; }
  main { padding:20px 16px 48px; }
  .topbar { margin-bottom:20px; }
  .topbar h1 { font-size:25px; }
  .top-actions { flex-wrap:nowrap; gap:7px; }
  .top-actions button { width:40px; height:40px; }
  .hero-panel { min-height:296px; padding:27px 25px; }
  .hero-copy { max-width:calc(100% - 14px); }
  .hero-copy h2 { margin-top:13px; font-size:27px; line-height:1.45; }
  .hero-copy p { max-width:230px; font-size:13px; line-height:1.55; }
  .progress-ring { right:18px; bottom:18px; }
  .stats-grid { gap:10px; margin:12px 0 18px; }
  .stats-grid article { min-height:90px; padding:14px; gap:11px; }
  .goal-strip { margin:0 0 28px; padding:16px; gap:12px; }
  .goal-strip .text-button { flex:0 0 auto; }
  .section-head { align-items:flex-start; gap:12px; }
  .memory-card { padding:16px; }
  .mistake-head-actions { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .mistake-head-actions button { font-size:11px; }
  .insight-lead { align-items:flex-start; gap:16px; }
  .mastery { flex:0 0 auto; }
  dialog { width:min(650px,calc(100% - 20px)); }
  dialog form { padding:22px 18px; }
}

@media(max-width:420px) {
  .stats-grid strong { font-size:19px; }
  .stat-icon { width:34px; height:34px; }
  .mistake-head-actions { grid-template-columns:1fr 1fr; }
  .mistake-head-actions #addMistakeBtn { grid-column:1/-1; }
  .insight-lead { padding:24px 20px; }
  .mastery { padding:7px 0 7px 14px; }
  .account-password-panel { grid-template-columns:1fr; }
  .account-password-panel>label:first-child,.account-password-submit { grid-column:1; }
  .account-session-actions { display:grid; grid-template-columns:1fr 1fr; }
  .account-session-actions button { min-width:0; padding-left:10px; padding-right:10px; }
}

.reset-page { min-height:100vh; margin:0; display:grid; place-items:center; padding:24px; background:#fff5f8; color:var(--ink); }
.reset-shell { position:relative; width:min(880px,100%); min-height:520px; display:flex; align-items:center; padding:56px clamp(24px,7vw,76px); border:1px solid #ead6de; border-radius:8px; overflow:hidden; background:#fff; box-shadow:0 24px 70px rgba(111,41,71,.13); }
.reset-panel { position:relative; z-index:1; width:min(430px,100%); }
.reset-brand { display:flex; align-items:center; gap:10px; margin-bottom:46px; color:#74314e; font-size:17px; }
.reset-brand .brand-mark { width:34px; height:34px; display:grid; place-items:center; padding:0; border-radius:6px; }
.reset-panel h1 { margin:4px 0 13px; font-size:32px; letter-spacing:0; }
.reset-intro { margin:0 0 28px; color:var(--muted); font-size:13px; line-height:1.7; }
.reset-panel form>label { display:grid; gap:7px; margin-bottom:15px; font-size:12px; font-weight:650; }
.reset-panel input { width:100%; min-width:0; }
.reset-submit { width:100%; justify-content:center; margin-top:5px; }
.reset-back { display:inline-block; margin-top:20px; color:#9c4668; font-size:12px; text-decoration:none; }
.reset-back:hover { text-decoration:underline; }
.reset-mascot { position:absolute; right:-25px; bottom:-18px; width:390px; max-width:46%; opacity:.17; transform:rotate(-4deg); pointer-events:none; }
.reset-success { padding:22px 0; }
.reset-success strong { display:block; margin-bottom:8px; color:#913c5e; font-size:22px; }
.reset-success p { margin:0 0 22px; color:var(--muted); font-size:13px; line-height:1.7; }
.reset-success .primary { display:inline-flex; color:white; text-decoration:none; }
@media(max-width:600px) {
  .reset-page { align-items:start; padding:12px; }
  .reset-shell { min-height:calc(100vh - 24px); padding:36px 22px; align-items:flex-start; }
  .reset-brand { margin-bottom:56px; }
  .reset-panel h1 { font-size:27px; }
  .reset-mascot { right:-22px; bottom:-8px; width:230px; max-width:60%; opacity:.11; }
}

/* Personal theme finishing pass */
#dynamicFields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 12px; }
#dynamicFields>label { min-width:0; display:grid; gap:7px; margin-bottom:15px; font-size:12px; font-weight:650; }
#dynamicFields>label textarea,#dynamicFields>label input { width:100%; min-width:0; }
.top-actions b { font:inherit; }
.hero-usagi { position:absolute; z-index:0; right:20px; bottom:16px; width:154px; height:auto; aspect-ratio:480/416; object-fit:contain; object-position:center; border:6px solid rgba(255,255,255,.72); border-radius:10px; opacity:.72; transform:rotate(2deg); box-shadow:0 14px 35px rgba(118,48,73,.13); }
.hero-copy,.progress-ring { position:relative; z-index:1; }
.hero-copy { max-width:470px; }
/* Dialog content must stay in its own layout lane; decorative mascots here
   used to overlap the final fields on short mobile viewports. */
dialog form { position:relative; }
.empty-state { max-width:560px; min-height:260px; margin:0 auto; padding:52px 20px; }
.calendar-grid { min-height:230px; }
.view-mascot-header { display:flex; align-items:flex-end; gap:16px; margin-bottom:16px; }
.view-mascot-header .subject-tabs { min-width:0; flex:1; margin-bottom:0; }
.view-mascot { width:76px; height:76px; flex:0 0 76px; display:block; object-fit:cover; border:5px solid rgba(255,255,255,.88); border-radius:8px; background:#fff; box-shadow:0 8px 22px rgba(111,41,71,.11); transform:rotate(2deg); }
#mistakesView .view-mascot { transform:rotate(-3deg); }
#insightsView .view-mascot { object-position:center 38%; transform:rotate(1deg); }

/* Keep the character sticker and progress metric in separate visual lanes. */
.hero-panel { padding-right:330px; }
.hero-copy { max-width:560px; }
.hero-usagi { right:20px; bottom:16px; width:154px; opacity:.72; transform:rotate(2deg); }
.progress-ring { position:absolute; right:188px; top:50%; margin:0; transform:translateY(-50%); }

@media(max-width:800px) {
  main { padding-bottom:calc(92px + env(safe-area-inset-bottom)); }
  .sidebar { height:calc(68px + env(safe-area-inset-bottom)); padding-bottom:calc(6px + env(safe-area-inset-bottom)); }
  .top-actions { display:flex; }
  .top-actions button { display:flex!important; }
  .top-actions button b { display:none; }
  .hero-panel { min-height:330px; padding-right:25px; }
  .hero-usagi { right:10px; bottom:12px; width:112px; height:auto; border-width:4px; opacity:.5; }
  .hero-copy { max-width:100%; }
  .hero-copy h2 { max-width:195px; }
  .hero-copy p { max-width:220px; }
  .progress-ring { position:absolute; top:18px; right:18px; bottom:auto; margin:0; transform:none; }
  .insights-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .insights-stats article { min-width:0; padding:12px 8px; justify-content:center; text-align:center; }
  .insights-stats strong { font-size:18px; }
  .insights-stats article div span { font-size:10px; }
  #dynamicFields { grid-template-columns:1fr; gap:0; }
  .view-mascot-header { gap:10px; margin-bottom:14px; }
  .view-mascot { width:58px; height:58px; flex-basis:58px; border-width:4px; }
  dialog form { overflow-x:hidden; }
  dialog .dialog-actions { position:sticky; bottom:-22px; z-index:2; margin:8px -18px -22px; padding:13px 18px; background:#fff; border-top:1px solid var(--line); }
}

@media(max-width:420px) {
  .topbar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; }
  .top-actions { min-width:0; display:grid; grid-template-columns:repeat(4,34px); gap:4px; }
  .top-actions button { width:34px; height:34px; padding:0; }
  .top-actions { gap:5px; }
  .top-actions button { width:36px; height:36px; }
  .hero-usagi { right:8px; bottom:12px; width:100px; height:auto; opacity:.42; }
  .mistake-head-actions { grid-template-columns:1fr 1fr; }
  .mistake-head-actions #addMistakeBtn { grid-column:1/-1; grid-row:1; }
}
 .mistake-analysis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:14px; padding:12px; border-left:3px solid #c94f79; background:#fff5f8; border-radius:4px; }
 .mistake-analysis div { min-width:0; display:grid; gap:3px; }
 .mistake-analysis b { color:#88405c; font-size:10px; }
 .mistake-analysis span { color:var(--ink); font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
 @media(max-width:800px) { .mistake-analysis { grid-template-columns:1fr; } }
