:root{color-scheme:dark;--bg: #12121a;--surface: #1c1c28;--surface-2: #262636;--text: #f2f2f7;--text-dim: #9a9ab0;--accent: #e0455a;--accent-soft: rgba(224, 69, 90, .15);--green: #4ade80;--blue: #60a5fa;--amber: #fbbf24;--red-text: #f87189;--on-accent: #ffffff;--border: rgba(255, 255, 255, .06);--border-strong: rgba(255, 255, 255, .11);--overlay: rgba(0, 0, 0, .6);--overlay-strong: rgba(0, 0, 0, .72);--toggle-off: #262636;--red-soft: rgba(224, 69, 90, .15);--amber-soft: rgba(251, 191, 36, .14);--blue-soft: rgba(96, 165, 250, .14);--green-soft: rgba(74, 222, 128, .12);--radius: 16px;--heat-1: #4f2735;--heat-2: #722e3e;--heat-3: #943547;--heat-4: #b53c4f;--heat-5: var(--accent);--stage-new: #3e3e50;--stage-learning: #37537c;--stage-young: #456ea6;--stage-mature: #528ad0;--stage-mastered: var(--blue)}[data-theme=light]{color-scheme:light;--bg: #f5f4f0;--surface: #ffffff;--surface-2: #e9e8ef;--text: #1c1c28;--text-dim: #62627a;--accent: #cf3549;--accent-soft: rgba(207, 53, 73, .1);--green: #15803d;--blue: #2563eb;--amber: #b45309;--red-text: #b02a3e;--on-accent: #ffffff;--border: rgba(28, 28, 40, .08);--border-strong: rgba(28, 28, 40, .18);--overlay: rgba(28, 28, 40, .4);--overlay-strong: rgba(28, 28, 40, .55);--toggle-off: #cbcad8;--red-soft: rgba(207, 53, 73, .1);--amber-soft: rgba(251, 191, 36, .15);--blue-soft: rgba(96, 165, 250, .15);--green-soft: rgba(74, 222, 128, .15);--heat-1: #f6dbde;--heat-2: #ecaeb6;--heat-3: #e1828e;--heat-4: #d75a6a;--heat-5: var(--accent);--stage-new: #dfdfe8;--stage-learning: #c9d8fa;--stage-young: #92b1f5;--stage-mature: #5c8af0;--stage-mastered: var(--blue)}*{box-sizing:border-box;margin:0;padding:0}html{-webkit-text-size-adjust:100%}body{background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;min-height:100vh;min-height:100dvh}[lang=ja]{font-family:Hiragino Sans,Hiragino Kaku Gothic ProN,Noto Sans JP,Yu Gothic,sans-serif}button{font:inherit;color:inherit;background:none;border:none;cursor:pointer;-webkit-tap-highlight-color:transparent}.app{max-width:560px;margin:0 auto;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;gap:20px;padding:calc(20px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.app-header h1{font-size:1.5rem}.app-header h1 [lang=ja]{color:var(--accent);margin-right:.4rem}.app-header p{color:var(--text-dim);font-size:.9rem;margin-top:4px}.deck-list{display:flex;flex-direction:column;gap:14px}.deck-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;display:flex;flex-direction:column;gap:12px}.deck-head{display:flex;align-items:center;gap:14px}.deck-icon{width:52px;height:52px;border-radius:14px;background:var(--accent-soft);color:var(--accent);font-size:1.7rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.deck-head h3{font-size:1.1rem}.deck-head p{font-size:.85rem;color:var(--text-dim);margin-top:2px}.deck-progress{display:flex;align-items:center;gap:10px;font-size:.78rem;color:var(--text-dim)}.deck-progress span{white-space:nowrap}.bar{flex:1;height:6px;border-radius:3px;background:var(--surface-2);overflow:hidden}.bar-fill{height:100%;background:var(--accent);border-radius:3px;transition:width .3s}.deck-meta{display:flex;gap:8px;flex-wrap:wrap}.tag{font-size:.75rem;font-weight:600;padding:4px 10px;border-radius:999px}.tag-due{background:var(--amber-soft);color:var(--amber)}.tag-new{background:var(--blue-soft);color:var(--blue)}.tag-ok{background:var(--green-soft);color:var(--green)}.tag-known{background:var(--blue-soft);color:var(--stage-mastered)}.deck-actions{display:flex;gap:10px}.btn{min-height:44px;padding:12px 16px;border-radius:12px;font-weight:600;font-size:.95rem;transition:opacity .15s,transform .05s}.btn:active{transform:scale(.97)}.btn-primary{background:var(--accent);color:var(--on-accent);flex:1}.btn-primary:disabled{opacity:.35;cursor:default}.btn-ghost{background:var(--surface-2);color:var(--text)}.study-header{display:flex;align-items:center;gap:12px}.btn-back{width:44px;height:44px;border-radius:12px;background:var(--surface);font-size:1.1rem;flex-shrink:0}.study-header h2{flex:1;font-size:1.05rem}.study-header .remaining{color:var(--text-dim);font-size:.85rem;white-space:nowrap}.progress-track{height:5px;border-radius:3px;background:var(--surface);overflow:hidden}.flashcard{background:var(--surface);border:1px solid var(--border);border-radius:24px;cursor:pointer;-webkit-tap-highlight-color:transparent;min-height:min(420px,52vh);min-height:min(420px,52dvh);width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:24px;text-align:center}.flashcard.revealed{cursor:default}.front{font-weight:600;line-height:1.15;overflow-wrap:anywhere}.front-xl{font-size:6rem}.front-lg{font-size:3.2rem}.front-md{font-size:2.1rem}.hint{color:var(--text-dim);font-size:.85rem}.answer{display:flex;flex-direction:column;align-items:center;gap:6px;width:85%;padding-top:18px;border-top:1px solid var(--border-strong);animation:rise .25s ease}.back{font-size:1.55rem;font-weight:700}.back-sub{color:var(--text-dim);font-size:1rem}@keyframes rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.btn-show{margin-top:auto;padding:16px;border-radius:14px;background:var(--surface-2);font-weight:700;font-size:1rem}.grade-bar{margin-top:auto;display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.grade-bar.two{grid-template-columns:repeat(2,1fr)}.grade{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:44px;padding:12px 6px;border-radius:14px;font-weight:700;font-size:.95rem}.grade small{font-weight:500;font-size:.7rem;opacity:.75}.grade-again{background:var(--red-soft);color:var(--red-text)}.grade-hard{background:var(--amber-soft);color:var(--amber)}.grade-good{background:var(--blue-soft);color:var(--blue)}.grade-easy{background:var(--green-soft);color:var(--green)}.study>.btn-show,.study>.grade-bar{position:sticky;bottom:calc(12px + env(safe-area-inset-bottom));z-index:1;box-shadow:0 calc(6px + env(safe-area-inset-bottom)/2) 8px calc(16px + env(safe-area-inset-bottom)/2) var(--bg)}.study>.grade-bar{background:var(--bg)}.btn-undo:disabled{opacity:.3;cursor:default}.remaining-box{display:flex;flex-direction:column;align-items:flex-end;gap:2px;white-space:nowrap}.learn-wait{color:var(--amber);font-size:.72rem;font-weight:600}.flashcard.lesson{cursor:default}.lesson-tag{font-size:.7rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--blue);background:var(--blue-soft);padding:4px 10px;border-radius:999px}.lesson-reading{color:var(--text-dim);font-size:1.2rem;margin-top:-6px}.lesson-examples{list-style:none;display:flex;flex-direction:column;gap:4px;color:var(--text-dim);font-size:.88rem;margin-top:4px}.lesson-hint{background:var(--amber-soft);border-radius:10px;padding:10px 12px;font-size:.85rem;line-height:1.5;text-align:left;margin-top:4px}.btn-show.continue{background:var(--accent);color:var(--on-accent)}.summary{margin-top:8vh;background:var(--surface);border-radius:24px;padding:40px 24px;display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center}.summary .emoji{font-size:3rem}.summary h2{font-size:1.4rem}.summary p{color:var(--text-dim);font-size:.9rem;max-width:32ch}.summary-stats{display:flex;gap:20px 28px;justify-content:center;flex-wrap:wrap}.summary-stat{display:flex;flex-direction:column}.summary-stat b{font-size:1.6rem}.summary-stat span{color:var(--text-dim);font-size:.8rem}.summary .summary-goal{color:var(--text);font-size:.92rem;font-weight:600;max-width:none}.summary .btn{min-width:160px}.summary .summary-undo{font-size:.88rem;margin-top:-6px}.block-pause{background:var(--surface);border:1px solid var(--border);border-radius:24px;padding:36px 24px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;animation:rise .25s ease}.block-pause-emoji{font-size:2.6rem}.block-pause h3{font-size:1.25rem}.block-pause p{color:var(--text-dim);font-size:.92rem}.block-pause-actions{display:flex;gap:10px;width:100%;max-width:360px;margin-top:8px}.block-pause-actions .btn{flex:1}@media(min-width:700px){.front-xl{font-size:7rem}}.app-header-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.header-actions{display:flex;gap:8px}.icon-btn{position:relative;width:44px;height:44px;border-radius:12px;background:var(--surface);font-size:1.05rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.sync-dot{position:absolute;top:5px;right:5px;width:8px;height:8px;border-radius:50%}.sync-ok{background:var(--green)}.sync-error{background:var(--accent)}.sync-offline{background:var(--text-dim)}.sync-syncing{background:var(--amber);animation:pulse 1s ease-in-out infinite}@keyframes pulse{50%{opacity:.35}}.levels-toggle{align-self:flex-start;font-size:.8rem;font-weight:600;color:var(--text-dim);min-height:44px;display:inline-flex;align-items:center;padding:0 12px 0 0;margin:-10px 0}.level-list{display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--border);padding-top:12px}.level-row{display:flex;align-items:center;gap:8px;font-size:.82rem}.level-name{flex:1;min-width:0;overflow-wrap:break-word}.level-count{color:var(--text-dim);font-size:.72rem;white-space:nowrap}.level-bar{width:48px;flex:none}.level-btn{padding:7px 10px;min-height:44px;border-radius:8px;background:var(--surface-2);font-size:.75rem;font-weight:600;flex-shrink:0}.level-btn:disabled{opacity:.35}.level-badge{color:var(--text-dim);font-weight:500;font-size:.9em}@media(max-width:600px){.level-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;grid-template-areas:"name name count count" "bar study train master";row-gap:6px}.level-name{grid-area:name}.level-count{grid-area:count;justify-self:end}.level-bar{grid-area:bar;width:auto}.level-study{grid-area:study}.level-train{grid-area:train}.level-master{grid-area:master}}.speak-btn{margin-top:6px;font-size:1.25rem;padding:8px 16px;min-height:44px;min-width:44px;border-radius:12px;background:var(--surface-2)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--overlay);display:flex;align-items:flex-end;justify-content:center;z-index:50}.modal{background:var(--surface);border-radius:24px 24px 0 0;width:100%;max-width:560px;max-height:88dvh;overflow-y:auto;padding:24px 20px calc(24px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:20px}@media(min-width:700px){.modal-overlay{align-items:center}.modal{border-radius:24px;padding-bottom:24px}}.modal-head{display:flex;align-items:center;justify-content:space-between}.modal-head h2{font-size:1.3rem}.settings-section{display:flex;flex-direction:column;gap:10px}.settings-section h3{font-size:.95rem}.settings-section a{color:var(--blue)}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:.9rem}.toggle{width:48px;height:28px;border-radius:999px;background:var(--toggle-off);position:relative;transition:background .2s;flex-shrink:0}.toggle.on{background:var(--accent)}.toggle-knob{position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:var(--on-accent);box-shadow:0 1px 2px #00000040;transition:transform .2s}.toggle.on .toggle-knob{transform:translate(20px)}.field-row{display:flex;gap:8px;flex-wrap:wrap}.text-input{flex:1;min-width:160px;background:var(--surface-2);border:1px solid var(--border-strong);border-radius:10px;padding:10px 12px;color:var(--text);font-size:.9rem}.qr-img{width:200px;height:200px;border-radius:12px;align-self:center}.note{font-size:.8rem;color:var(--text-dim);line-height:1.45}.note code{background:var(--surface-2);padding:1px 5px;border-radius:5px}.message{font-size:.85rem;padding:10px 14px;border-radius:10px}.message-ok{background:var(--green-soft);color:var(--green)}.message-error{background:var(--red-soft);color:var(--red-text)}.reading{color:var(--text-dim);font-size:1.15rem}.card-examples{list-style:none;display:flex;flex-direction:column;gap:4px;color:var(--text-dim);font-size:.88rem;margin-top:4px}.card-hint{color:var(--text-dim);font-size:.85rem;line-height:1.5;text-align:left;margin-top:4px}@media(max-width:400px){.answer{width:100%;padding-top:12px}}.answer-ja{font-size:2.4rem;font-weight:700;line-height:1.2;overflow-wrap:anywhere}.listen-btn{width:96px;height:96px;border-radius:50%;background:var(--accent-soft);font-size:2.2rem;display:flex;align-items:center;justify-content:center}.listen-btn:active{transform:scale(.95)}.typing-area{margin-top:auto;display:flex;flex-direction:column;gap:10px}.typing-row{display:flex;gap:10px;align-items:stretch}.typing-input{flex:1;min-width:0;background:var(--surface);border:1px solid var(--border-strong);border-radius:14px;padding:14px 16px;color:var(--text);font-size:1.05rem}.typing-input:focus{outline:2px solid var(--accent);outline-offset:0}.typing-preview{min-width:64px;display:flex;align-items:center;justify-content:center;background:var(--surface);border-radius:14px;padding:0 14px;font-size:1.4rem}.typing-preview.dim{color:var(--text-dim)}.typing-actions{display:flex;gap:10px}.btn-skip{padding:14px 16px;border-radius:14px;background:var(--surface);color:var(--text-dim);font-weight:600}.typing-confirm{flex:1;margin-top:0;background:var(--accent);color:var(--on-accent)}.typing-confirm:disabled{opacity:.35;cursor:default}.typing-feedback{text-align:center;font-size:.95rem;font-weight:600;padding:10px 14px;border-radius:12px;animation:rise .25s ease}.typing-feedback.is-correct{background:var(--green-soft);color:var(--green)}.typing-feedback.is-wrong{background:var(--red-soft);color:var(--red-text)}.grade-bar.one{grid-template-columns:1fr}.celebration-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--overlay-strong);display:flex;align-items:center;justify-content:center;padding:20px;overflow:hidden;z-index:60}.confetti-layer{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;pointer-events:none}.confetti-piece{position:absolute;top:-16px;width:9px;height:14px;border-radius:2px;opacity:0;animation:confetti-fall 3s ease-in forwards}@keyframes confetti-fall{0%{opacity:1;transform:translateY(0) rotate(0)}80%{opacity:1}to{opacity:0;transform:translateY(105vh) rotate(660deg)}}.celebration{position:relative;background:var(--surface);border-radius:24px;padding:28px 24px;width:100%;max-width:400px;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;animation:rise .25s ease}.celebration-emoji{font-size:3rem}.celebration h2{font-size:1.35rem}.celebration p{color:var(--text-dim);font-size:.9rem;max-width:30ch}.share-card{width:min(240px,60vw);height:auto;border-radius:16px;margin-top:4px}.celebration-actions{display:flex;gap:10px;margin-top:6px;width:100%}.celebration-actions .btn{flex:1}@media(prefers-reduced-motion:reduce){.confetti-piece{display:none}}.stats-screen{gap:14px}.stats-screen .study-header{margin-bottom:4px}.kpi-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.kpi{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;display:flex;flex-direction:column;gap:3px}.kpi-label{font-size:.72rem;font-weight:600;color:var(--text-dim)}.kpi-value{font-size:1.4rem;font-weight:700}.kpi-sub{font-size:.72rem;color:var(--text-dim)}.stats-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px 18px;display:flex;flex-direction:column;gap:12px}.stats-card h3{font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-dim)}.heatmap-wrap{display:flex;gap:6px}.heatmap-weekdays{display:grid;grid-template-rows:repeat(7,11px);row-gap:3px;font-size:.6rem;line-height:11px;color:var(--text-dim);flex-shrink:0}.heatmap-scroll{overflow-x:auto;flex:1}.heatmap{display:flex;gap:3px;width:max-content}.heatmap-col{display:flex;flex-direction:column;gap:3px}.heat-cell{width:11px;height:11px;border-radius:3px;background:var(--surface-2);flex-shrink:0}.heat-1{background:var(--heat-1)}.heat-2{background:var(--heat-2)}.heat-3{background:var(--heat-3)}.heat-4{background:var(--heat-4)}.heat-5{background:var(--heat-5)}.heat-future{background:transparent}.heat-footer{display:flex;align-items:center;justify-content:space-between;gap:6px 10px;flex-wrap:wrap}.heat-note{font-size:.7rem;color:var(--text-dim)}.heat-legend{display:flex;align-items:center;gap:3px;font-size:.68rem;color:var(--text-dim)}.heat-legend span:first-child{margin-right:3px}.heat-legend span:last-child{margin-left:3px}.forecast{display:flex;gap:6px}.forecast-day{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px}.forecast-count{font-size:.72rem;color:var(--text-dim)}.forecast-track{width:100%;height:72px;display:flex;align-items:flex-end;justify-content:center;border-bottom:1px solid var(--surface-2)}.forecast-bar{width:20px;max-width:70%;border-radius:4px 4px 0 0;background:var(--heat-4)}.forecast-bar.is-today{background:var(--heat-5)}.forecast-label{font-size:.7rem;color:var(--text-dim);white-space:nowrap}.forecast-label.is-today{color:var(--text);font-weight:600}.forecast-stack{width:20px;max-width:70%;display:flex;flex-direction:column;border-radius:4px 4px 0 0;overflow:hidden}.forecast-stack .forecast-bar{width:100%;max-width:none;border-radius:0}.forecast-bar-new{width:100%;background:var(--stage-young);flex-shrink:0}.forecast-count-new{color:var(--blue)}.stage-list{display:flex;flex-direction:column;gap:16px}.stage-row{display:flex;flex-direction:column;gap:7px}.stage-head{display:flex;align-items:center;gap:8px;font-size:.85rem}.stage-icon{color:var(--accent)}.stage-deck{font-weight:600}.stage-total{margin-left:auto;font-size:.72rem;color:var(--text-dim);white-space:nowrap}.stage-bar{display:flex;gap:2px;height:12px;border-radius:5px;overflow:hidden}.stage-seg{min-width:4px}.stage-new{background:var(--stage-new)}.stage-learning{background:var(--stage-learning)}.stage-young{background:var(--stage-young)}.stage-mature{background:var(--stage-mature)}.stage-mastered{background:var(--stage-mastered)}.stage-chips{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:.72rem;color:var(--text-dim)}.stage-chip{display:inline-flex;align-items:center;gap:5px}.stage-chip b{color:var(--text);font-weight:600}.stage-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.leech-list{display:flex;flex-direction:column}.leech-row{display:flex;align-items:center;gap:12px;padding:8px 0;min-height:52px}.leech-row+.leech-row{border-top:1px solid var(--border)}.leech-icon{color:var(--accent);font-size:1.1rem;flex-shrink:0}.leech-info{display:flex;flex-direction:column;gap:2px;min-width:0}.leech-front{font-size:1.25rem;font-weight:600;line-height:1.2;overflow-wrap:anywhere}.leech-meta{font-size:.72rem;color:var(--text-dim)}.leech-meta b{color:var(--red-text);font-weight:600}.btn-leech-reset{margin-left:auto;min-height:44px;padding:0 14px;border-radius:12px;background:var(--surface-2);font-size:.8rem;font-weight:600;flex-shrink:0}.leech-empty{color:var(--text-dim);font-size:.85rem}.hero{background:var(--surface);border:1px solid var(--accent-soft);border-radius:var(--radius);padding:18px;display:flex;flex-direction:column;gap:14px}.hero-info{display:flex;align-items:center;gap:14px}.hero-count{min-width:60px;height:60px;padding:0 10px;border-radius:18px;background:var(--accent-soft);color:var(--accent);font-size:1.8rem;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0}.hero-count.hero-ok{background:var(--green-soft);font-size:1.5rem}.hero-count.hero-known{background:var(--blue-soft);font-size:1.5rem}.hero-info h2{font-size:1.05rem}.hero-info p{color:var(--text-dim);font-size:.85rem;margin-top:3px}.hero-streak{font-size:.78rem}.hero-streak.met{color:var(--green)}.hero-info .hero-calm{font-size:.78rem;font-style:italic}.style-menu{display:grid;grid-template-columns:1fr 1fr;gap:8px;animation:rise .2s ease}.style-option{background:var(--surface-2);border-radius:12px;padding:11px 12px;min-height:44px;display:flex;flex-direction:column;gap:2px;text-align:left}.style-option b{font-size:.88rem}.style-option span{font-size:.72rem;color:var(--text-dim)}.voice-warn{grid-column:1 / -1;font-size:.78rem;line-height:1.45;color:var(--amber);background:var(--amber-soft);padding:8px 12px;border-radius:10px}.level-btn.level-master{background:var(--green-soft);color:var(--green);min-width:44px}.onboarding{justify-content:center;align-items:center;text-align:center;gap:16px}.onboarding-ja{font-size:2.6rem;font-weight:700;color:var(--accent)}.onboarding h1{font-size:1.5rem}.onboarding-intro{color:var(--text-dim);font-size:.92rem;line-height:1.55;max-width:38ch}.onboarding-question{font-size:1.02rem;margin-top:10px}.goal-options{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:100%}.goal-option{background:var(--surface);border:2px solid transparent;border-radius:var(--radius);padding:16px 6px 14px;display:flex;flex-direction:column;align-items:center;gap:2px;transition:border-color .15s,background .15s}.goal-option.selected{border-color:var(--accent);background:var(--accent-soft)}.goal-name{font-size:.85rem;font-weight:600}.goal-reviews{display:flex;flex-direction:column;align-items:center;font-size:.72rem;line-height:1.1}.goal-reviews b{font-size:1.7rem;line-height:1.15}.goal-new{font-size:.68rem;color:var(--text-dim);white-space:nowrap;margin-top:2px}.goal-tag{font-style:normal;font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--accent);margin-top:4px}.onboarding-cta{flex:none;width:100%;max-width:320px;padding:16px;margin-top:6px}.inapp-btn{flex:none;width:100%;max-width:320px;min-height:48px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}a.btn-primary.inapp-btn{color:var(--on-accent)}.inapp-open{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.inapp-gate .inapp-open{align-items:center}.inapp-steps{list-style:none;display:flex;flex-direction:column;gap:10px;width:100%;max-width:320px;text-align:left;font-size:.92rem;line-height:1.45}.inapp-steps li{display:flex;align-items:baseline;gap:10px}.inapp-step-num{flex-shrink:0;min-width:1.1em;font-weight:700;color:var(--red-text)}.inapp-glyph{font-size:1.2em;line-height:1}.inapp-gate .inapp-steps{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px}.inapp-skip{min-height:44px;padding:0 16px;font-size:.85rem;color:var(--text-dim);text-decoration:underline;text-underline-offset:3px}.inapp-banner{display:flex;flex-direction:column;align-items:flex-start;background:var(--surface);border:1px solid var(--border-strong);border-left:3px solid var(--amber);border-radius:12px;padding:8px 14px 4px;font-size:.85rem;line-height:1.4;color:var(--text-dim)}.inapp-banner .inapp-steps,.inapp-banner .note{margin:2px 0 10px;font-size:.85rem}.inapp-banner-action{display:inline-flex;align-items:center;min-height:44px;font-size:.85rem;font-weight:600;color:var(--red-text);text-decoration:none}.onboarding h1:focus{outline:none}.kana-options{display:flex;flex-direction:column;gap:10px;width:100%;max-width:420px}.kana-option{background:var(--surface);border:2px solid transparent;border-radius:var(--radius);min-height:56px;padding:10px 16px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;text-align:left;transition:border-color .15s,background .15s}.kana-option.selected{border-color:var(--accent);background:var(--accent-soft)}.kana-option-name{display:flex;align-items:baseline;gap:8px;font-size:.95rem}.kana-option-sample{color:var(--text-dim);font-size:.9rem}.kana-option small{font-size:.75rem;color:var(--text-dim)}.onboarding-back{min-height:44px;padding:0 12px;font-size:.85rem;font-weight:600;color:var(--text-dim)}.install-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;display:flex;flex-direction:column;gap:12px}.install-head{display:flex;align-items:center;gap:12px}.install-icon{width:44px;height:44px;border-radius:12px;background:var(--accent-soft);font-size:1.35rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.install-text{flex:1;min-width:0}.install-text b{font-size:.92rem}.install-text p{font-size:.8rem;color:var(--text-dim);margin-top:1px}.install-actions{display:flex;gap:10px}.install-actions .btn{flex:1;padding:12px 14px;font-size:.88rem}.install-steps{list-style:none;display:flex;flex-direction:column;gap:14px}.install-steps li{display:flex;align-items:center;gap:14px;font-size:.92rem;line-height:1.45}.install-step-icon{width:48px;height:48px;border-radius:14px;background:var(--surface-2);color:var(--blue);display:flex;align-items:center;justify-content:center;flex-shrink:0}.install-step-icon svg{width:26px;height:26px}.setting-col{display:flex;flex-direction:column;gap:8px}.setting-value{font-size:.95rem}.stepper{display:flex;align-items:center;gap:2px;background:var(--surface-2);border-radius:12px;padding:3px;flex-shrink:0}.stepper button{width:44px;height:44px;border-radius:9px;font-size:1.15rem;font-weight:700;display:flex;align-items:center;justify-content:center}.stepper button:active{background:var(--surface)}.stepper button:disabled{opacity:.3;cursor:default}.stepper b{min-width:34px;text-align:center;font-size:.92rem}.seg{display:flex;gap:2px;background:var(--surface-2);border-radius:12px;padding:3px}.seg button{flex:1;min-height:44px;padding:0 14px;border-radius:9px;font-size:.85rem;font-weight:600;color:var(--text-dim);transition:background .15s,color .15s}.seg button[aria-checked=true]{background:var(--accent);color:var(--on-accent)}.range{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:30px;margin:0;background:transparent}.range::-webkit-slider-runnable-track{height:6px;border-radius:3px;background:var(--surface-2)}.range::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:24px;height:24px;margin-top:-9px;border:none;border-radius:50%;background:var(--accent)}.range::-moz-range-track{height:6px;border-radius:3px;background:var(--surface-2)}.range::-moz-range-thumb{width:24px;height:24px;border:none;border-radius:50%;background:var(--accent)}.setting-warn{font-size:.8rem;line-height:1.45;color:var(--amber);background:var(--amber-soft);padding:8px 12px;border-radius:10px}[data-theme=light] .grade small{opacity:1}.facet-intro{display:flex;justify-content:center;margin-bottom:-8px}.facet-deck-icon{font-size:1.6rem;opacity:.65;margin-bottom:-6px}.facet-panel{border-top:1px solid var(--border);padding-top:14px;margin-top:4px}.facet-panel-title{font-size:.9rem;font-weight:600}.facet-deck-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px}.facet-deck-name{font-size:.9rem}.facet-toggles{display:flex;gap:16px}.facet-toggle{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:.7rem;color:var(--text-dim)}.tag-custom{background:var(--surface-2);color:var(--text-dim);margin-left:8px;vertical-align:middle}.custom-note{font-size:.75rem;color:var(--text-dim);margin-top:2px}.deck-manage-list{display:flex;flex-direction:column;gap:8px}.deck-manage-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;padding:6px 10px;border:1px solid var(--border);border-radius:12px}.deck-manage-name{font-size:.9rem;min-width:0;overflow-wrap:anywhere}.deck-manage-name small{display:block;font-size:.75rem;color:var(--text-dim)}.deck-manage-actions{display:flex;gap:8px;flex-shrink:0}.btn-small{padding:12px;min-height:44px;font-size:.85rem}.btn-danger{color:var(--red-text)}.pix-row{align-items:center}.pix-key{flex:1;min-width:0;overflow-wrap:anywhere;background:var(--surface-2);border-radius:10px;padding:12px;font-size:.85rem}.diag summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between}.diag summary::-webkit-details-marker{display:none}.diag summary:after{content:"▾";color:var(--text-dim)}.diag[open] summary:after{content:"▴"}.diag-body{display:flex;flex-direction:column;gap:12px;padding-top:10px}.diag-grid{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:.85rem}.diag-grid dt{color:var(--text-dim)}.diag-grid dd{margin:0;overflow-wrap:anywhere;text-align:right}.btn-google{width:100%}.advanced-sync summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--text-dim);font-size:.85rem;font-weight:600}.advanced-sync summary::-webkit-details-marker{display:none}.advanced-sync summary:after{content:"▾";color:var(--text-dim)}.advanced-sync[open] summary:after{content:"▴"}.advanced-sync-body{display:flex;flex-direction:column;gap:12px;padding-top:4px}.storage-notice{display:flex;flex-direction:column;align-items:flex-start;gap:2px;background:var(--surface);border:1px solid var(--border-strong);border-left:3px solid var(--accent);border-radius:12px;padding:10px 14px 4px;font-size:.85rem;line-height:1.4;color:var(--text)}.storage-notice-actions{display:flex;flex-wrap:wrap;gap:0 16px}.storage-notice-action{display:inline-flex;align-items:center;min-height:44px;font-size:.85rem;font-weight:600;color:var(--red-text)}.storage-notice-status{color:var(--text-dim)}.storage-notice-status:empty{display:none}.storage-notice .crash-backup-text{margin:4px 0 10px}.cloud-notice{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:8px 8px 8px 14px;font-size:.85rem;color:var(--text-dim);line-height:1.4}.cloud-notice button{color:var(--accent);font-weight:600;min-height:44px;padding:0 8px;flex-shrink:0}.reminder-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;display:flex;flex-direction:column;gap:12px;text-align:left;max-width:100%}.summary .reminder-card{align-self:stretch;border-color:var(--border-strong)}.reminder-head{display:flex;align-items:flex-start;gap:12px}.reminder-icon{font-size:1.6rem;line-height:1.2;flex-shrink:0}.reminder-text{flex:1;min-width:0}.reminder-text b{font-size:.95rem;color:var(--text)}.reminder-card .reminder-text p{color:var(--text-dim);font-size:.9rem;line-height:1.45;margin-top:2px;max-width:none}.reminder-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.reminder-actions .btn{flex:1 1 auto;min-width:0;min-height:44px;padding:12px 14px;font-size:.88rem}.reminder-card .btn-ghost:disabled,.reminder-settings .btn-ghost:disabled{opacity:.45;cursor:default}.reminder-card .reminder-privacy,.reminder-settings .reminder-privacy{color:var(--text-dim);font-size:.78rem;line-height:1.45;max-width:none}.reminder-card .reminder-text .reminder-install-note{margin-top:6px;font-size:.84rem;color:var(--text)}.install-sheet .install-storage-note{margin-top:8px;color:var(--text)}.reminder-card .reminder-result{color:var(--text);font-size:.92rem;line-height:1.45;max-width:none}.reminder-card .note{font-size:.8rem;max-width:none}.text-input.hour-select{flex:0 0 auto;min-width:0;width:auto;min-height:44px;padding:0 12px;background:var(--surface-2);border:1px solid var(--border-strong);border-radius:10px;color:var(--text);font-size:1rem;cursor:pointer}.hour-select:disabled{opacity:.45;cursor:not-allowed}.reminder-settings .btn{min-height:44px}.reminder-muted{margin-top:2px}.toggle[disabled]{opacity:.45;cursor:not-allowed}.settings-section .hour-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:.9rem}.trail-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:6px 4px 0;font-weight:700}.trail-head:first-of-type{padding-top:0}.trail-label{font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:var(--text-dim)}.trail-head.done .trail-label{color:var(--green)}.trail-status{font-size:.78rem;font-weight:500;color:var(--text-dim);white-space:nowrap}.trail-head.known .trail-label{color:var(--stage-mastered)}.trail-tools{display:flex;flex-wrap:wrap;justify-content:flex-end;column-gap:16px;margin-top:-12px;margin-bottom:-6px}.trail-action{min-height:44px;padding:0 4px;font-size:.8rem;font-weight:600;color:var(--red-text)}.trail-undo{align-items:center;column-gap:12px}.trail-undo-text{font-size:.8rem;color:var(--text-dim)}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.crash-screen{max-width:420px;margin:0 auto;min-height:100dvh;padding:32px 16px calc(32px + env(safe-area-inset-bottom));display:flex;flex-direction:column;justify-content:safe center;gap:16px;text-align:center;color:var(--text);background:var(--bg)}.crash-screen h1:focus{outline:none}.crash-status:empty{display:none}.crash-status{font-size:.92rem}.crash-backup-text{width:100%;min-height:120px;padding:10px;border:1px solid var(--border-strong);border-radius:12px;background:var(--surface);color:var(--text);font:.75rem/1.4 ui-monospace,monospace}.crash-screen h1{font-size:1.4rem}.crash-screen p{line-height:1.5}.crash-actions{display:flex;flex-direction:column;gap:10px}.crash-hint{font-size:.88rem;color:var(--text-dim)}.crash-code{font-size:.75rem;color:var(--text-dim);overflow-wrap:anywhere}a.btn-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.cloud-data{display:flex;flex-direction:column;gap:10px;margin-top:6px;padding-top:12px;border-top:1px solid var(--border)}.home-footer{display:flex;flex-direction:column;align-items:center;color:var(--text-dim);font-size:.8rem}.home-footer-links{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px}.home-footer-label{flex-basis:100%;text-align:center}.home-footer a{display:inline-flex;align-items:center;min-height:44px;padding:0 10px;color:var(--text-dim);text-underline-offset:2px}.reminder-privacy a{color:inherit;text-underline-offset:2px}
