*,*:before,*:after{box-sizing:border-box}:root{--accent: #6366f1;--accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);--accent-text: #fff;--bg: #f6f7fb;--surface: #ffffff;--surface-2: #f1f3f9;--surface-3: #e8ebf3;--border: #dfe3ec;--text: #12161f;--muted: #626b7d;--faint: #8b93a4;--danger: #dc2626;--success: #15803d;--warning: #b45309;--radius: 16px;--radius-sm: 10px;--radius-lg: 22px;--shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .18);--shadow-lg: 0 24px 60px -20px rgba(16, 24, 40, .35);--nav-h: 62px;--safe-b: env(safe-area-inset-bottom, 0px);--safe-t: env(safe-area-inset-top, 0px);color-scheme:light}[data-theme=dark]{--bg: #0d1117;--surface: #161b25;--surface-2: #1d2431;--surface-3: #262f3f;--border: #2b3444;--text: #e8ecf4;--muted: #98a3b6;--faint: #6d7889;--danger: #f87171;--success: #4ade80;--warning: #fbbf24;--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -14px rgba(0, 0, 0, .7);--shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .8);color-scheme:dark}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,system-ui,sans-serif;font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none}h1,h2,h3,h4{margin:0;font-weight:650;letter-spacing:-.015em;line-height:1.25}h1{font-size:1.55rem}h2{font-size:1.15rem}h3{font-size:1rem}p{margin:0}a{color:var(--accent);text-decoration:none}img{max-width:100%;display:block}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}.muted{color:var(--muted)}.faint{color:var(--faint)}.tiny{font-size:.78rem}.small{font-size:.86rem}.center{text-align:center}.row{display:flex;align-items:center;gap:10px}.row.wrap{flex-wrap:wrap}.between{justify-content:space-between}.col{display:flex;flex-direction:column;gap:12px}.grow{flex:1;min-width:0}.hidden{display:none!important}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app{min-height:100%;display:flex;flex-direction:column}.page{flex:1;width:100%;max-width:900px;margin:0 auto;padding:calc(14px + var(--safe-t)) 14px calc(var(--nav-h) + var(--safe-b) + 24px)}.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}.page-header .sub{color:var(--muted);font-size:.87rem;margin-top:2px}.nav{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;justify-content:space-around;align-items:stretch;height:calc(var(--nav-h) + var(--safe-b));padding-bottom:var(--safe-b);background:color-mix(in srgb,var(--surface) 88%,transparent);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-top:1px solid var(--border)}.nav a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--faint);font-size:.66rem;font-weight:600;letter-spacing:.01em;text-decoration:none;transition:color .15s}.nav a svg{width:22px;height:22px}.nav a.active{color:var(--accent)}@media(min-width:900px){.app{flex-direction:row}.nav{position:sticky;top:0;bottom:auto;height:100vh;width:216px;flex-direction:column;justify-content:flex-start;gap:4px;padding:20px 12px;border-top:none;border-right:1px solid var(--border)}.nav a{flex:none;flex-direction:row;justify-content:flex-start;gap:12px;padding:11px 14px;border-radius:12px;font-size:.92rem}.nav a.active{background:var(--accent-soft)}.nav-brand{display:flex;align-items:center;gap:10px;padding:4px 14px 18px;font-weight:700}.page{padding-bottom:40px}}.nav-brand{display:none}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow)}.card.tight{padding:12px}.card.flat{box-shadow:none}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;min-height:42px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text);font-size:.92rem;font-weight:600;transition:transform .08s,background .15s,border-color .15s}.btn:active{transform:scale(.975)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}.btn.ghost{background:transparent;border-color:transparent}.btn.ghost:hover{background:var(--surface-2)}.btn.soft{background:var(--surface-2);border-color:transparent}.btn.danger{color:var(--danger);border-color:color-mix(in srgb,var(--danger) 35%,transparent);background:transparent}.btn.block{width:100%}.btn.sm{min-height:34px;padding:6px 12px;font-size:.84rem;border-radius:9px}.btn.icon{padding:0;width:42px;min-height:42px}.btn.icon.sm{width:34px}.input,.select,.textarea{width:100%;padding:11px 13px;background:var(--surface);border:1px solid var(--border);border-radius:11px;font-size:.95rem;transition:border-color .15s}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent);outline:none}.textarea{min-height:140px;resize:vertical;line-height:1.55}.field{display:flex;flex-direction:column;gap:6px}.field>label{font-size:.8rem;font-weight:650;color:var(--muted)}.chip{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:999px;background:var(--surface-2);border:1px solid transparent;font-size:.78rem;font-weight:600;color:var(--muted)}.chip.on{background:var(--accent-soft);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 35%,transparent)}.badge{display:inline-block;padding:2px 8px;border-radius:999px;background:var(--surface-3);font-size:.7rem;font-weight:700;letter-spacing:.03em;color:var(--muted)}.progress{height:6px;border-radius:999px;background:var(--surface-3);overflow:hidden}.progress>i{display:block;height:100%;background:var(--accent);border-radius:inherit;transition:width .3s}.empty{padding:42px 18px;text-align:center;color:var(--muted)}.empty .big{font-size:2.4rem;margin-bottom:10px}.grid{display:grid;gap:12px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.auto{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}.divider{height:1px;background:var(--border);margin:4px 0}.switch{position:relative;width:46px;height:27px;border-radius:999px;background:var(--surface-3);border:none;flex:none;transition:background .18s}.switch:after{content:"";position:absolute;top:3px;left:3px;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0000004d;transition:transform .18s}.switch.on{background:var(--accent)}.switch.on:after{transform:translate(19px)}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0}.setting-row+.setting-row{border-top:1px solid var(--border)}.setting-row .label{font-weight:600;font-size:.92rem}.setting-row .hint{color:var(--muted);font-size:.78rem;margin-top:1px}input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:4px;border-radius:999px;background:var(--surface-3)}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border-radius:50%;background:var(--accent);border:3px solid var(--surface);box-shadow:var(--shadow)}input[type=range]::-moz-range-thumb{width:20px;height:20px;border:3px solid var(--surface);border-radius:50%;background:var(--accent)}input[type=color]{width:38px;height:32px;padding:2px;border:1px solid var(--border);border-radius:9px;background:var(--surface)}.reader{position:fixed;inset:0;display:flex;flex-direction:column;background:var(--bg);z-index:30}.reader-bar{display:flex;align-items:center;gap:8px;padding:calc(8px + var(--safe-t)) 10px 8px;border-bottom:1px solid var(--border);background:var(--surface)}.reader-bar .title{font-weight:650;font-size:.93rem}.reader-bar .meta{font-size:.72rem;color:var(--faint)}.reader-body{position:relative;flex:1;overflow:hidden}.book-viewport{position:absolute;inset:0;padding:18px 20px 8px;overflow:hidden}.book-columns{height:100%;column-gap:40px;column-fill:auto;transition:transform .28s cubic-bezier(.22,.61,.36,1);will-change:transform}.reader.scroll-mode .book-viewport{overflow-y:auto;-webkit-overflow-scrolling:touch}.reader.scroll-mode .book-columns{height:auto;columns:auto!important;transform:none!important}.book-columns p{margin:0 0 .95em;text-align:justify;-webkit-hyphens:auto;hyphens:auto}.reader-content{font-family:var(--reader-font);font-size:var(--reader-size);line-height:var(--reader-lh);max-width:var(--reader-width);margin:0 auto;height:100%}.w{border-radius:4px;padding:0 1px;cursor:pointer;transition:box-shadow .12s;box-decoration-break:clone;-webkit-box-decoration-break:clone}.w.multi{padding:0 2px;box-shadow:inset 0 -2px color-mix(in srgb,var(--text) 30%,transparent)}.w.sel{box-shadow:0 0 0 2px var(--accent)}.w.speaking{background:color-mix(in srgb,var(--accent) 26%,transparent)!important}.s.speaking{background:color-mix(in srgb,var(--accent) 13%,transparent);border-radius:5px}.reader-foot{display:flex;align-items:center;gap:8px;padding:8px 10px calc(8px + var(--safe-b));border-top:1px solid var(--border);background:var(--surface)}.page-tap{position:absolute;top:0;bottom:0;width:22%;z-index:2;background:transparent;border:none}.page-tap.left{left:0}.page-tap.right{right:0}.sheet-backdrop{position:fixed;inset:0;background:#080b1273;z-index:50;animation:fade .16s ease}.sheet{position:fixed;left:0;right:0;bottom:0;z-index:51;max-height:82vh;overflow-y:auto;background:var(--surface);border-radius:22px 22px 0 0;border-top:1px solid var(--border);box-shadow:var(--shadow-lg);padding:10px 16px calc(20px + var(--safe-b));animation:rise .22s cubic-bezier(.22,.61,.36,1)}.sheet .handle{width:40px;height:4px;border-radius:999px;background:var(--surface-3);margin:4px auto 12px}@media(min-width:900px){.sheet{inset:24px 24px 24px auto;width:420px;max-height:none;border-radius:var(--radius-lg);border:1px solid var(--border)}.sheet .handle{display:none}}@keyframes fade{0%{opacity:0}}@keyframes rise{0%{transform:translateY(18px);opacity:0}}.status-picker{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.status-btn{height:44px;border-radius:11px;border:2px solid transparent;font-weight:700;font-size:.9rem;color:#12161f;display:flex;align-items:center;justify-content:center}.status-btn.on{border-color:var(--text)}.image-slot{display:flex;flex-direction:column;gap:8px}.image-slot img{width:100%;max-height:200px;object-fit:contain;border-radius:12px;background:var(--surface-2)}.word-thumb{width:40px;height:40px;border-radius:9px;object-fit:cover;background:var(--surface-2);flex:none}.term-title{font-size:1.45rem;font-weight:700;letter-spacing:-.02em}.ipa{font-family:Charis SIL,Doulos SIL,Gentium,Times New Roman,serif;color:var(--muted);font-size:1rem}.definition{white-space:pre-line}.example{font-style:italic;color:var(--muted);border-left:3px solid var(--border);padding-left:10px}.deck-wrap{display:flex;flex-direction:column;gap:14px;min-height:62vh}.flashcard{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center;padding:28px 20px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);min-height:300px}.flashcard .front-word{font-size:2.1rem;font-weight:700;letter-spacing:-.025em;line-height:1.15}.flashcard .back{width:100%;max-width:460px;display:flex;flex-direction:column;gap:12px;text-align:left}.flashcard .back-block{background:var(--surface-2);border-radius:12px;padding:12px 14px}.flashcard img{max-height:190px;margin:0 auto;border-radius:14px}.flashcard .front-image{max-height:210px}.answers{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.answer{display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px 4px;border-radius:13px;border:1px solid var(--border);background:var(--surface);font-weight:650;font-size:.83rem}.answer .t{font-size:.68rem;color:var(--faint);font-weight:600}.answer.again{border-color:color-mix(in srgb,#ef4444 45%,transparent);color:#ef4444}.answer.hard{border-color:color-mix(in srgb,#f59e0b 45%,transparent);color:#d97706}.answer.good{border-color:color-mix(in srgb,#22c55e 45%,transparent);color:#16a34a}.answer.easy{border-color:color-mix(in srgb,#3b82f6 45%,transparent);color:#2563eb}[data-theme=dark] .answer.hard{color:#fbbf24}[data-theme=dark] .answer.good{color:#4ade80}[data-theme=dark] .answer.easy{color:#60a5fa}.deck-counts{display:flex;gap:14px;justify-content:center;font-size:.8rem;font-weight:700}.deck-counts .n-new{color:#2563eb}.deck-counts .n-learn{color:#d97706}.deck-counts .n-due{color:#16a34a}.shadow-line{font-size:1.35rem;line-height:1.55;font-weight:600;text-align:center;letter-spacing:-.015em;padding:10px 4px}.shadow-stage{display:flex;flex-direction:column;justify-content:center;gap:18px;min-height:240px;padding:22px 18px}.pulse{width:12px;height:12px;border-radius:50%;background:var(--danger);animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.25}}.stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px}.stat .n{font-size:1.7rem;font-weight:750;letter-spacing:-.03em;line-height:1.1}.stat .k{font-size:.76rem;color:var(--muted);font-weight:600;margin-top:2px}.bars{display:flex;align-items:flex-end;gap:3px;height:110px}.bars>div{flex:1;background:var(--accent);border-radius:3px 3px 0 0;min-height:2px;opacity:.85}.bars>div.empty-day{background:var(--surface-3)}.legend{display:flex;flex-wrap:wrap;gap:10px;font-size:.76rem;color:var(--muted)}.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}.auth{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(120% 80% at 50% 0%,color-mix(in srgb,var(--accent) 18%,var(--bg)),var(--bg))}.auth .card{width:100%;max-width:380px}.auth .logo{width:62px;height:62px;border-radius:18px;margin:0 auto 14px;background:linear-gradient(135deg,#6366f1,#22d3ee);display:flex;align-items:center;justify-content:center}.error-text{color:var(--danger);font-size:.85rem}.toast{position:fixed;left:50%;bottom:calc(var(--nav-h) + var(--safe-b) + 16px);transform:translate(-50%);z-index:60;padding:10px 16px;border-radius:999px;background:var(--text);color:var(--bg);font-size:.85rem;font-weight:600;box-shadow:var(--shadow-lg);animation:rise .2s ease}.spinner{width:18px;height:18px;border-radius:50%;border:2px solid color-mix(in srgb,currentColor 25%,transparent);border-top-color:currentColor;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}
