:root{--paper:#f5f3fb;--surface:#fffefd;--ink:#25223f;--muted:#787489;--line:#e4dfed;--accent:#464276;--accent-dark:#302c58;--accent-soft:#eeebf8;--orange:#c78654;--orange-soft:#fcebdc;--red:#aa5149;--red-soft:#f8e8e3;--shadow:0 14px 38px #30234c08;--radius:24px;--safe-bottom:env(safe-area-inset-bottom,0px);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none;font-size:15px;line-height:1.55}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{cursor:wait;opacity:.55}a{color:var(--accent)}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}button{border:0;background:transparent}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #d5a455;outline-offset:4px}input,select,textarea{max-width:100%}h1,h2,h3,p{margin:0}h1{font-size:clamp(27px,4vw,36px);letter-spacing:-.045em;line-height:1.3;font-weight:750}h2{font-size:20px;letter-spacing:-.025em;line-height:1.4}h3{font-size:16px;line-height:1.4}p{overflow-wrap:anywhere}small{font-size:12px}.app-shell{max-width:1080px;margin:auto;padding:0 32px 132px}.app-header{height:105px;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{text-decoration:none;color:var(--ink);display:flex;align-items:center;gap:12px;font-size:24px;font-weight:750;letter-spacing:-.04em;line-height:1.2}.brand-mark{background:var(--accent);color:var(--surface);font-family:Georgia,"Songti SC",serif;font-size:27px;display:grid;place-items:center;width:49px;height:49px;border-radius:17px;transform:rotate(-5deg);box-shadow:inset 0 0 0 1px #ffffff18}.brand-caption{display:block;font-size:10px;font-weight:500;letter-spacing:.16em;margin-top:6px;color:var(--muted)}.header-status{display:flex;gap:7px;align-items:center;color:var(--muted);font-size:12px}.status-dot{width:6px;height:6px;background:var(--accent);border-radius:50%}.status-dot.offline{background:var(--orange)}.bottom-nav{position:fixed;z-index:20;bottom:18px;left:50%;transform:translateX(-50%);width:min(480px,calc(100% - 32px));padding:8px 12px calc(8px + var(--safe-bottom));display:flex;background:#fffefdf5;border:1px solid #e5dfed;border-radius:24px;box-shadow:0 8px 36px #30234c13;backdrop-filter:blur(18px)}.bottom-nav button{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;min-height:48px;border-radius:15px;color:var(--muted);font-size:13px;font-weight:600}.bottom-nav button[aria-current=page]{background:var(--accent-soft);color:var(--accent)}.bottom-nav svg{width:19px;height:19px}.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin:19px 0 29px}.eyebrow{font-size:11px;color:var(--accent);font-weight:700;letter-spacing:.16em;text-transform:uppercase;margin-bottom:9px}.subtitle{color:var(--muted);margin-top:10px;font-size:14px;line-height:1.7}.muted{color:var(--muted)}.mini-label{font-size:11px;font-weight:600;letter-spacing:.04em;color:var(--muted)}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:30px 0 16px}.section-heading h2{font-size:18px}.section-heading .text-button{font-size:12px}.text-button{color:var(--accent);font-weight:650;display:inline-flex;align-items:center;gap:5px;min-height:42px;padding:5px}.text-button svg{width:15px;height:15px}.primary,.secondary,.danger{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:49px;padding:12px 22px;border-radius:14px;font-weight:650;text-decoration:none;line-height:1.5}.primary{background:var(--accent);color:white;box-shadow:0 3px 0 #14382b0c}.primary:hover{background:var(--accent-dark)}.secondary{background:var(--accent-soft);color:var(--accent)}.secondary:hover{background:#e4def4}.danger{background:var(--red-soft);color:var(--red)}.button-small{min-height:40px;padding:9px 13px;border-radius:12px;font-size:13px}.icon-button{display:inline-grid;place-items:center;width:43px;height:43px;min-width:43px;border:1px solid var(--line);border-radius:50%;background:var(--surface)}.icon-button:hover{background:var(--accent-soft)}.icon-button.active{color:var(--orange);background:var(--orange-soft);border-color:#edd6b8}.icon-button.active svg{fill:currentColor;stroke:currentColor}.icon-button.borderless{border-color:transparent;background:transparent}.pill{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:8px;background:var(--accent-soft);font-size:11px;color:var(--accent);font-weight:650;max-width:100%}.pill.orange{color:#916135;background:var(--orange-soft)}.pill.neutral{background:#f1eff6;color:var(--muted)}.notice{padding:15px 18px;border-radius:15px;background:var(--accent-soft);color:var(--accent);font-size:13px;line-height:1.7;margin:15px 0}.notice-warning{background:var(--orange-soft);color:#805927}.notice-error{background:var(--red-soft);color:var(--red)}.notice button{font-size:inherit;text-decoration:underline;color:inherit}.hero-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(240px,1fr);gap:20px}.study-hero{position:relative;overflow:hidden;background:var(--accent);color:white;padding:32px;border-radius:var(--radius);min-height:286px;display:flex;flex-direction:column;justify-content:space-between}.study-hero:before,.study-hero:after{content:"";position:absolute;width:230px;height:300px;right:-66px;bottom:-157px;border:1px solid #ffffff16;border-radius:45%;transform:rotate(-30deg);pointer-events:none}.study-hero:after{width:265px;height:335px;right:-83px;bottom:-175px}.study-hero .eyebrow{color:#d9d2f4;font-size:10px}.study-hero h2{font-size:29px;line-height:1.3;letter-spacing:-.05em}.study-hero p{font-size:13px;color:#e0daf2;margin:11px 0 24px}.study-hero .primary{background:var(--surface);color:var(--accent);align-self:flex-start;z-index:1}.hero-top{display:flex;justify-content:space-between;gap:16px}.hero-icon{background:#ffffff10;border:1px solid #ffffff20;border-radius:15px;width:46px;height:46px;display:grid;place-items:center;transform:rotate(8deg);flex-shrink:0}.hero-icon svg{width:25px;height:25px}.progress-panel{border:1px solid var(--line);border-radius:var(--radius);padding:26px;background:var(--surface);box-shadow:var(--shadow);display:flex;flex-direction:column;justify-content:space-between;align-items:center}.progress-ring{width:138px;height:138px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--accent) var(--progress),#ece8f4 0);position:relative;margin:16px 0}.progress-ring:before{content:"";position:absolute;inset:9px;background:var(--surface);border-radius:50%}.ring-inner{position:relative;text-align:center}.ring-inner strong{display:block;font-size:37px;line-height:1.1;letter-spacing:-.05em;font-variant-numeric:tabular-nums}.ring-inner span{font-size:11px;color:var(--muted)}.progress-panel .mini-label{font-size:12px}.progress-panel p{font-size:12px;color:var(--muted);text-align:center}.metric-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:19px}.metric{border:1px solid var(--line);border-radius:19px;padding:20px 22px;background:var(--surface)}.metric-top{display:flex;justify-content:space-between;gap:8px;color:var(--muted);font-size:12px;align-items:center}.metric-top svg{width:17px;height:17px;color:var(--orange)}.metric strong{font-size:29px;display:inline-block;margin-top:8px;line-height:1.2;letter-spacing:-.04em;font-variant-numeric:tabular-nums}.metric .metric-unit{font-size:11px;color:var(--muted);margin-left:5px}.deck-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.deck-card{display:flex;flex-direction:column;text-align:left;background:var(--surface);padding:19px;border:1px solid var(--line);border-radius:19px;min-height:140px;transition:transform .15s,border-color .15s}.deck-card:hover{transform:translateY(-2px);border-color:#bcb2d4}.deck-card .deck-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.deck-index{width:31px;height:31px;display:grid;place-items:center;border-radius:10px;background:var(--accent-soft);font-family:Georgia,serif;color:var(--accent);font-size:16px}.deck-card:nth-child(3n+2) .deck-index{background:var(--orange-soft);color:#a57541}.deck-card:nth-child(3n) .deck-index{background:#eae8f5;color:#71608c}.deck-card h3{font-size:14px;margin-bottom:5px}.deck-card p{font-size:11px;color:var(--muted)}.deck-card .arrow{width:15px;height:15px;color:#b4abc7}.track{height:4px;background:#ece8f4;border-radius:10px;overflow:hidden;margin-top:14px}.track>span{display:block;height:100%;background:var(--accent);border-radius:10px}.quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.quick-card{display:flex;align-items:center;gap:13px;text-align:left;border:1px solid var(--line);border-radius:18px;padding:18px;background:transparent}.quick-icon{width:39px;height:39px;display:grid;place-items:center;background:var(--orange-soft);color:#a67442;border-radius:12px;flex-shrink:0}.quick-card:nth-child(2) .quick-icon{background:var(--accent-soft);color:var(--accent)}.quick-card:nth-child(3) .quick-icon{background:#eae8f5;color:#71608c}.quick-card strong{font-size:13px;display:block}.quick-card small{font-size:11px;color:var(--muted)}.quote-line{margin:33px 0 0;text-align:center;font-size:12px;color:#8b8299;letter-spacing:.03em}.study-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:17px 0 18px}.study-topbar .study-heading{text-align:center}.study-heading strong{font-size:14px;display:block}.study-heading small{font-size:11px;color:var(--muted)}.study-progress{display:flex;align-items:center;gap:11px;font-size:11px;color:var(--muted);margin:15px 0 21px}.study-progress .track{flex:1;margin:0;height:5px}.study-wrap{max-width:690px;margin:0 auto}.flashcard{position:relative;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:28px;background:var(--surface);min-height:360px;box-shadow:0 18px 60px #33235008;padding:24px 29px}.flashcard-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.flashcard-top .pill{font-size:10px}.card-actions{display:flex;gap:3px}.card-actions .icon-button{width:35px;height:35px;min-width:35px}.card-actions svg{width:18px;height:18px}.card-face{display:flex;align-items:center;justify-content:center;flex-direction:column;flex:1;padding:30px 0;text-align:center;min-height:240px}.card-word{font-size:clamp(28px,6vw,43px);line-height:1.25;font-weight:650;letter-spacing:-.035em;overflow-wrap:anywhere}.card-prompt{font-size:clamp(21px,4vw,28px);line-height:1.6;font-weight:600;max-width:500px;white-space:pre-wrap;overflow-wrap:anywhere}.phonetic{font-size:15px;font-family:Georgia,"Times New Roman",serif;color:var(--muted);margin-top:10px;letter-spacing:.01em}.speaker-button{display:inline-flex;align-items:center;gap:7px;color:var(--accent);font-size:12px;padding:9px 16px;background:var(--accent-soft);border-radius:100px;margin-top:21px;min-height:40px}.answer-block{border-top:1px dashed var(--line);padding:23px 0 0;margin-top:22px;width:100%;text-align:center;animation:appear .18s ease-out}.answer-block .card-word{font-size:31px}.meaning{font-size:18px;font-weight:550;line-height:1.7;white-space:pre-wrap}.part-of-speech{font-size:12px;color:var(--orange);font-style:italic;margin-right:7px}.example{font-size:14px;line-height:1.8;color:var(--muted);margin:13px auto 0;max-width:520px;white-space:pre-wrap;text-align:left}.card-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px;color:var(--muted)}.card-bottom button{font-size:11px;color:var(--muted);min-height:34px;text-decoration:underline;text-decoration-color:#cfc5dd;text-underline-offset:3px}.reveal-button{width:100%;margin-top:19px;min-height:55px}.keyboard-hint{font-size:10px;text-align:center;color:#91879e;margin-top:12px}.rating-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:20px}.rating-button{border-radius:15px;min-height:71px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-weight:650;font-size:13px;background:var(--accent-soft);color:var(--accent)}.rating-button small{font-size:10px;font-weight:500;opacity:.8}.rating-button:nth-child(1){background:var(--red-soft);color:var(--red)}.rating-button:nth-child(2){background:var(--orange-soft);color:#956431}.rating-button:nth-child(3){background:#e7e1f5;color:#625385}.rating-button:nth-child(4){background:var(--accent);color:#fff}.rating-button:hover{filter:brightness(.97);transform:translateY(-1px)}.study-footer{display:flex;justify-content:space-between;align-items:center;margin-top:15px;gap:12px;color:var(--muted);font-size:11px}.mode-select{border:0;background:transparent;color:var(--muted);font-size:12px;max-width:145px;min-height:42px}.spell-form{width:100%;max-width:350px;margin:23px auto 0;display:flex;gap:9px}.spell-form input{width:100%;min-width:0;background:var(--paper);border:1px solid var(--line);border-radius:12px;min-height:49px;padding:10px 13px;font-size:17px;text-align:center;color:var(--ink)}.spell-form .secondary{padding:10px 15px}.listen-art{width:80px;height:80px;border:1px solid #dcd4ec;display:grid;place-items:center;border-radius:25px;background:var(--accent-soft);margin:3px 0 20px;color:var(--accent)}.listen-art svg{width:37px;height:37px}.answer-feedback{margin-top:12px;font-size:12px;border-radius:9px;padding:8px 12px;background:var(--accent-soft);color:var(--accent)}.answer-feedback.incorrect{background:var(--orange-soft);color:#8f6438}.filter-bar{display:flex;flex-wrap:wrap;gap:8px;margin:17px 0}.filter-chip{border:1px solid var(--line);border-radius:100px;padding:8px 14px;min-height:40px;color:var(--muted);font-size:12px;white-space:nowrap;background:var(--surface)}.filter-chip.active{background:var(--accent);border-color:var(--accent);color:white}.search-box{position:relative;flex:1;min-width:0}.search-box>svg{position:absolute;left:15px;top:15px;width:18px;height:18px;color:var(--muted)}.search-box input{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:13px 15px 13px 44px;min-height:49px;width:100%;color:var(--ink);font-size:14px}.library-toolbar{display:flex;align-items:center;gap:10px}.library-toolbar select{border:1px solid var(--line);border-radius:13px;background:var(--surface);min-height:49px;padding:10px;color:var(--ink);font-size:13px;max-width:145px}.list-summary{display:flex;justify-content:space-between;align-items:center;margin:20px 0 13px;font-size:12px;color:var(--muted);gap:10px}.word-list{border:1px solid var(--line);border-radius:20px;overflow:hidden;background:var(--surface)}.word-row{display:flex;align-items:center;padding:16px 19px;border-bottom:1px solid var(--line);gap:13px}.word-row:last-child{border-bottom:0}.word-main{min-width:0;flex:1;text-align:left;padding:0}.word-main strong{font-size:16px;font-weight:650;display:block;overflow-wrap:anywhere}.word-main p{font-size:12px;color:var(--muted);margin-top:4px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:pre-wrap}.word-main .row-tags{display:flex;gap:5px;margin-top:7px;flex-wrap:wrap}.row-tags .pill{font-size:9px;padding:2px 6px;font-weight:500}.word-row .icon-button{width:34px;height:34px;min-width:34px;border:0;background:transparent}.word-row .icon-button svg{width:18px;height:18px}.load-more{display:block;margin:19px auto 0;min-width:145px}.empty-state{padding:48px 24px;text-align:center;border:1px dashed #d3c9e2;border-radius:24px;background:#fffefd7a}.empty-icon{width:67px;height:67px;background:var(--accent-soft);color:var(--accent);border-radius:21px;display:grid;place-items:center;margin:0 auto 20px}.empty-icon svg{width:29px;height:29px}.empty-state h2{font-size:21px}.empty-state p{color:var(--muted);font-size:13px;max-width:360px;margin:11px auto 23px;line-height:1.8}.onboard{max-width:760px;margin:20px auto 0}.onboard-intro{border:1px solid var(--line);border-radius:28px;background:var(--surface);padding:43px;text-align:center;box-shadow:var(--shadow)}.onboard-art{display:flex;justify-content:center;margin:15px 0 29px;height:138px;position:relative}.mini-card{position:absolute;left:50%;transform:translateX(-50%);width:112px;height:138px;border-radius:16px;border:1px solid #ded4ec;background:var(--surface);display:flex;align-items:center;justify-content:center;flex-direction:column;box-shadow:0 13px 23px #33234c10;color:var(--accent)}.mini-card:first-child{transform:translateX(-83%) rotate(-13deg);background:#eee7f8}.mini-card:last-child{transform:translateX(-15%) rotate(12deg);background:#f7e9d6;border-color:#ecddc5}.mini-card:nth-child(2){z-index:1}.mini-card strong{font-family:Georgia,serif;font-size:43px;line-height:1}.mini-card span{font-size:10px;margin-top:10px;letter-spacing:.1em}.onboard-intro p{max-width:440px;margin:15px auto 23px;font-size:14px;line-height:1.8;color:var(--muted)}.onboard-intro .privacy-note{font-size:11px;margin-bottom:0;color:#948aa3}.onboard-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:26px 0}.onboard-step{padding:17px}.onboard-step strong{color:var(--orange);font-family:Georgia,serif;font-size:22px}.onboard-step h3{margin:9px 0 7px;font-size:14px}.onboard-step p{font-size:12px;color:var(--muted);line-height:1.8}.panel{border:1px solid var(--line);background:var(--surface);border-radius:22px;padding:25px;box-shadow:var(--shadow)}.stats-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:18px;margin-top:22px}.chart{display:flex;gap:11px;align-items:flex-end;height:170px;margin-top:27px;padding-top:20px}.bar-column{display:flex;align-items:center;flex-direction:column;justify-content:flex-end;flex:1;height:100%;gap:9px;min-width:0}.bar-value{font-size:10px;color:var(--muted)}.bar{width:100%;max-width:34px;background:#bfb1da;border-radius:7px 7px 3px 3px;min-height:3px}.bar-column:last-child .bar{background:var(--accent)}.bar-label{font-size:10px;color:var(--muted);white-space:nowrap}.stat-list{margin-top:17px}.stat-line{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:13px 0;border-bottom:1px solid var(--line);font-size:13px}.stat-line:last-child{border:0}.stat-line span{color:var(--muted)}.stat-line strong{font-weight:650;font-variant-numeric:tabular-nums}.deck-stat{padding:16px 0;border-bottom:1px solid var(--line)}.deck-stat:last-child{border:0;padding-bottom:0}.deck-stat-top{display:flex;justify-content:space-between;gap:10px;font-size:13px}.deck-stat-top span{font-size:11px;color:var(--muted)}.deck-stat .track{margin-top:10px;height:5px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}.settings-stack{display:grid;gap:20px}.field{display:flex;flex-direction:column;gap:8px;margin-top:21px}.field label,.field-label{font-size:13px;font-weight:650}.field input,.field textarea,.field select{width:100%;background:var(--paper);border:1px solid var(--line);border-radius:11px;min-height:46px;padding:11px 12px;color:var(--ink);font-size:14px}.field textarea{resize:vertical;min-height:90px;line-height:1.7}.field small{color:var(--muted);font-size:11px;line-height:1.65}.field-row{display:flex;gap:13px}.field-row>.field{flex:1;min-width:0}.field input[type=range]{padding:0;min-height:28px;accent-color:var(--accent);background:transparent;border:0}.form-actions{display:flex;align-items:center;gap:10px;justify-content:flex-end;margin-top:23px;flex-wrap:wrap}.form-actions .primary,.form-actions .secondary{font-size:13px}.settings-note{color:var(--muted);font-size:12px;line-height:1.8;margin-top:11px}.settings-actions{display:grid;gap:9px;margin-top:20px}.settings-actions>button{width:100%;justify-content:flex-start}.settings-actions>button>svg{width:19px;height:19px}.info-list{list-style:none;padding:0;margin:20px 0 0;counter-reset:steps}.info-list li{counter-increment:steps;position:relative;padding:0 0 19px 31px;color:var(--muted);font-size:12px;line-height:1.8}.info-list li:last-child{padding-bottom:0}.info-list li:before{content:counter(steps);position:absolute;left:0;top:1px;width:21px;height:21px;background:var(--accent-soft);color:var(--accent);border-radius:50%;font-size:10px;text-align:center;line-height:21px}.connection-info{margin-top:17px;padding-top:15px;border-top:1px solid var(--line);font-size:11px;color:var(--muted);line-height:1.8}.completion{max-width:620px;margin:25px auto}.completion .empty-state{padding:43px 28px}.completion .empty-icon{background:var(--orange-soft);color:#b27b45}.completion .metric-row{text-align:left}.completion-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:22px}.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(106px + var(--safe-bottom));z-index:60;background:var(--ink);color:white;border-radius:14px;padding:13px 18px;box-shadow:0 7px 24px #25223f20;font-size:13px;width:max-content;max-width:calc(100% - 32px);line-height:1.6}.toast button{color:#e0d6f5;margin-left:15px;font-weight:650;text-decoration:underline}.toast.error{background:#84433e}.toast[hidden]{display:none}dialog{border:1px solid var(--line);background:var(--surface);border-radius:24px;padding:0;max-width:540px;width:calc(100% - 30px);max-height:85dvh;color:var(--ink);box-shadow:0 24px 80px #152f3533;overflow:auto}dialog::backdrop{background:#27203859;backdrop-filter:blur(3px)}.dialog-body{padding:27px}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:12px}.dialog-heading h2{font-size:21px}.dialog-heading .icon-button{width:35px;height:35px;min-width:35px}.dialog-subtitle{font-size:12px;color:var(--muted);line-height:1.8;margin:5px 0 16px}.source-list{list-style:none;margin:18px 0 0;padding:0}.source-list li{padding:12px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.7}.source-list li:last-child{border:0}.source-list small{display:block;color:var(--muted);font-size:11px;overflow-wrap:anywhere}.source-list .source-meaning{color:var(--muted);margin-top:6px;font-size:12px;white-space:pre-wrap}.preview-counts{display:flex;gap:12px;padding:15px;background:var(--accent-soft);border-radius:13px;margin:16px 0}.preview-counts>div{flex:1}.preview-counts strong{font-size:23px;font-variant-numeric:tabular-nums;display:block}.preview-counts span{font-size:11px;color:var(--accent)}.preview-decks{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.loading-state{padding:80px 20px;text-align:center;color:var(--muted);font-size:13px}.loading-dot{display:inline-block;width:25px;height:25px;border:3px solid var(--accent-soft);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;margin-bottom:15px}.skip-link{position:fixed;top:-80px;left:20px;background:var(--accent);color:white;padding:10px 15px;border-radius:8px;z-index:99}.skip-link:focus{top:12px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}.loading-button{display:inline-flex;align-items:center;gap:9px}.loading-button:before{content:"";width:12px;height:12px;border:2px solid #ffffff4a;border-top-color:currentColor;border-radius:50%;animation:spin .8s linear infinite}.pending-banner{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:15px 18px;border:1px solid #ecdfc6;border-radius:16px;background:#fbf3e4;color:#8b6b3c;margin:20px 0}.pending-banner p{font-size:12px}.pending-banner button{font-size:12px;font-weight:650;color:inherit;white-space:nowrap;min-height:35px}.empty-library{margin-top:24px}.status-badge{font-size:10px;font-weight:600;color:var(--accent)}.loading-overlay{pointer-events:none;opacity:.7}.activity-note{font-size:11px;color:var(--muted);line-height:1.7;margin-top:17px}.session-note{font-size:12px;text-align:center;color:var(--muted);padding:15px 10px}.checkbox-row{display:flex;align-items:flex-start;gap:10px;margin-top:20px;font-size:13px;line-height:1.7}.checkbox-row input{width:18px;height:18px;margin-top:3px;accent-color:var(--accent)}.saved-label{font-size:11px;color:var(--accent)}.review-card-detail .meaning{margin-top:20px}.review-card-detail .example{max-width:none}.inline-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:17px}.inline-actions .secondary{font-size:12px;min-height:39px;padding:8px 12px}.pack-info{font-size:11px;color:var(--muted);margin-top:14px;line-height:1.8}.due-indicator{width:6px;height:6px;border-radius:50%;background:var(--orange);display:inline-block;margin-left:4px;vertical-align:middle}.search-count{font-variant-numeric:tabular-nums}.voice-note{margin-top:13px;font-size:11px;line-height:1.75;color:var(--muted)}
@keyframes spin{to{transform:rotate(360deg)}}@keyframes appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1000px){.app-shell{padding-top:8px}.page-heading{margin-top:20px}.hero-grid{grid-template-columns:1.75fr 1fr}.study-hero{padding:34px}.progress-panel{flex-direction:row;flex-wrap:wrap;justify-content:center;column-gap:25px}.progress-panel>.mini-label{width:100%;text-align:center}.progress-panel>p{width:100%}.progress-ring{width:135px;height:135px;margin:6px}.deck-grid{gap:15px}.deck-card{min-height:151px}.study-wrap{padding-top:6px}}
@media(max-width:700px){.app-shell{padding:0 22px 126px}.app-header{height:93px}.brand{font-size:22px;gap:10px}.brand-mark{width:43px;height:43px;font-size:24px;border-radius:14px}.brand-caption{font-size:9px}.header-status{font-size:10px}.page-heading{margin:16px 0 25px}.eyebrow{font-size:10px}.subtitle{font-size:12px;line-height:1.8}.page-heading>.secondary{padding:9px 12px;font-size:12px;min-height:39px}.hero-grid{grid-template-columns:minmax(0,1.35fr) minmax(120px,1fr);gap:12px}.study-hero{padding:23px;min-height:263px;border-radius:22px}.study-hero h2{font-size:25px}.study-hero p{font-size:11px;margin-bottom:22px}.study-hero .primary{padding:11px 17px;font-size:12px;min-height:43px}.hero-icon{display:none}.progress-panel{padding:20px 12px;border-radius:22px}.progress-ring{width:110px;height:110px;margin:15px 0}.progress-ring:before{inset:7px}.ring-inner strong{font-size:29px}.ring-inner span{font-size:10px}.progress-panel .mini-label{font-size:11px}.progress-panel p{font-size:10px}.metric-row{gap:10px;margin-top:13px}.metric{padding:15px;border-radius:16px}.metric-top{font-size:10px;gap:5px}.metric-top svg{width:14px;height:14px}.metric strong{font-size:25px}.metric .metric-unit{font-size:9px;margin-left:3px}.deck-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.deck-card{padding:16px;min-height:135px;border-radius:17px}.deck-card h3{font-size:13px}.deck-card p{font-size:10px}.quick-grid{grid-template-columns:1fr;gap:10px}.quick-card{padding:14px 17px;gap:15px}.quick-icon{width:36px;height:36px}.quick-card strong{font-size:13px}.quick-card small{font-size:11px}.quick-card:after{content:"›";margin-left:auto;color:#a1ada0;font-size:24px;font-weight:300}.quick-card>span:last-child{display:flex;align-items:center;gap:11px;flex-wrap:wrap}.section-heading{margin:27px 0 14px}.section-heading h2{font-size:17px}.section-heading .text-button{font-size:11px}.bottom-nav{bottom:10px;width:calc(100% - 28px);border-radius:22px;padding:6px 7px calc(6px + var(--safe-bottom))}.bottom-nav button{flex-direction:column;gap:4px;font-size:10px;min-height:51px;border-radius:15px}.bottom-nav svg{width:19px;height:19px}.flashcard{min-height:350px;padding:19px 21px;border-radius:24px}.card-face{padding:25px 0;min-height:230px}.card-word{font-size:34px}.meaning{font-size:17px}.card-bottom{font-size:10px}.rating-grid{gap:7px;margin-top:17px}.rating-button{min-height:67px;border-radius:13px;font-size:12px}.rating-button small{font-size:9px}.study-topbar{margin-top:8px}.study-progress{margin:12px 0 18px}.study-footer{margin-top:10px}.keyboard-hint{display:none}.stats-grid{grid-template-columns:1fr;gap:15px}.panel{padding:21px;border-radius:20px}.settings-grid{grid-template-columns:1fr;gap:16px}.settings-stack{gap:16px}.settings-grid .panel>h2{font-size:18px}.library-toolbar{gap:8px}.library-toolbar select{max-width:115px;font-size:12px;padding:9px 7px}.search-box input{font-size:12px;padding-left:39px}.search-box>svg{left:13px}.filter-bar{gap:6px;margin:14px 0}.filter-chip{font-size:11px;padding:7px 12px;min-height:37px}.word-row{padding:14px;gap:8px}.word-main strong{font-size:15px}.word-main p{font-size:11px}.list-summary{font-size:11px}.list-summary .text-button{font-size:11px}.toast{bottom:calc(93px + var(--safe-bottom));font-size:12px;padding:12px 15px}.onboard-intro{padding:27px 22px;border-radius:24px}.onboard-intro h1{font-size:27px}.onboard-intro p{font-size:12px}.onboard-steps{gap:7px}.onboard-step{padding:10px 6px}.onboard-step h3{font-size:12px}.onboard-step p{font-size:10px}.dialog-body{padding:22px}.dialog-heading h2{font-size:19px}.pending-banner{padding:12px 14px;gap:8px}.pending-banner p{font-size:11px}.pending-banner button{font-size:11px}.completion .empty-state{padding:32px 20px}.quote-line{font-size:10px;margin-top:25px}.field-row{gap:11px}}
@media(max-width:380px){.app-shell{padding-left:16px;padding-right:16px}.study-hero{padding:20px 17px}.study-hero h2{font-size:23px}.progress-ring{width:99px;height:99px}.progress-panel{padding:20px 9px}.metric{padding:14px 12px}.metric-top svg{display:none}.flashcard{padding:16px 18px}.card-word{font-size:30px}.library-toolbar select{max-width:105px}.filter-chip{padding-left:10px;padding-right:10px}.bottom-nav{width:calc(100% - 24px)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(display-mode:standalone){.app-header{padding-top:env(safe-area-inset-top,0px);height:calc(93px + env(safe-area-inset-top,0px))}}

/* Personal wordmark: two lines keep the full name readable on small phones. */
.brand { gap: 12px; min-width: 0; letter-spacing: -.035em; }
.brand-mark {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  overflow: hidden;
  transform: none;
  box-shadow: 0 3px 8px #302c5814;
}
.brand-mark img { display: block; width: 100%; height: 100%; }
.brand-copy { display: block; min-width: 0; }
.brand-name { display: block; font-size: 24px; line-height: 1.15; white-space: nowrap; }
.brand-and { padding: 0 .16em; font-size: .68em; font-weight: 550; color: var(--accent); }
.brand-caption { font-size: 12px; margin-top: 5px; letter-spacing: .15em; color: var(--accent); }
.header-status { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 700px) {
  .app-header { gap: 10px; }
  .brand { gap: 10px; }
  .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
  .brand-name { font-size: 21px; }
  .brand-caption { font-size: 11px; margin-top: 4px; }
}
@media (max-width: 360px) {
  .brand { gap: 8px; }
  .brand-name { font-size: 19px; }
  .header-status { gap: 4px; font-size: 9px; }
}

/* Two-sided study cards and touch navigation. */
.card-stage {
  position: relative;
  isolation: isolate;
  padding: 26px 16px 25px;
  margin: -26px -16px -13px;
  /* A padded viewport leaves room for tilt/shadows and contains the fly-out. */
  overflow: hidden;
}
.card-stage::before,
.card-stage::after {
  content: "";
  position: absolute;
  inset: 35px 27px 17px;
  border: 1px solid #ded3ee;
  border-radius: 27px;
  background: #e9e2f4;
  transform: rotate(-1.8deg);
  pointer-events: none;
  z-index: -2;
}
.card-stage::after {
  inset: 32px 22px 21px;
  background: #fff0e3;
  border-color: #ecd7c5;
  transform: rotate(1.1deg);
  z-index: -1;
}
.flashcard {
  touch-action: pan-y pinch-zoom;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  overflow: hidden;
  transform-origin: 50% 53%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: linear-gradient(145deg, #fffefd 4%, #fffefd 62%, #f0ebf8);
  box-shadow: 0 20px 44px #34264c10, 0 3px 8px #34264c08, inset 0 1px 0 #fff;
}
.flashcard.is-revealed {
  background: linear-gradient(145deg, #f8f5ff 4%, #fffefd 60%, #efe9f7);
  border-color: #d3c5e6;
}
.flashcard[data-dragging],
.flashcard[data-motion] {
  will-change: transform, opacity;
}
.flashcard::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: -25% auto -25% -90%;
  width: 75%;
  pointer-events: none;
  opacity: 0;
  transform: rotate(17deg);
  background: linear-gradient(90deg, transparent, #fff9 48%, #ffffffc9 53%, transparent);
}
.flashcard[data-motion="flip-in"]::after {
  animation: card-sheen .44s ease-out both;
}
.card-swipe-cue {
  position: absolute;
  z-index: 3;
  top: 74px;
  padding: 7px 12px;
  border: 2px solid currentColor;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .06em;
  pointer-events: none;
  box-shadow: 0 4px 12px #34264c0a;
}
.card-swipe-next {
  right: 23px;
  color: var(--accent);
  background: #eee8f9f0;
  opacity: var(--swipe-next, 0);
  transform: rotate(9deg);
}
.card-swipe-previous {
  left: 23px;
  color: #926132;
  background: #fff4e4f0;
  opacity: var(--swipe-previous, 0);
  transform: rotate(-9deg);
}
@keyframes card-sheen {
  0% { opacity: 0; transform: translateX(0) rotate(17deg); }
  30% { opacity: .7; }
  100% { opacity: 0; transform: translateX(310%) rotate(17deg); }
}
.flashcard:focus-visible {
  outline: 3px solid #d5a455;
  outline-offset: 4px;
}
.flashcard input,
.flashcard textarea,
.flashcard [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
  touch-action: auto;
}
.flashcard > .card-face,
.flashcard > .card-back {
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.flashcard > .card-back {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 30px 0;
  text-align: center;
}
.flashcard.is-revealed > .card-face:not(.card-back) {
  display: none;
}
.flashcard.is-revealed > .card-back {
  display: flex;
}
.card-back .answer-block {
  border: 0;
  margin: 0;
  padding: 0;
  animation: none;
}
.card-back .meaning,
.card-back .example {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.card-flip-label {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  margin: 2px 0 5px;
}
.flashcard-top .card-actions .icon-button,
.flashcard .speaker-button,
.flashcard .card-bottom button,
.study-topbar .icon-button {
  min-height: 44px;
}
.flashcard-top .card-actions .icon-button,
.study-topbar .icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
}
.gesture-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}
.rating-status {
  margin-top: 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}
.rating-status + .rating-grid {
  margin-top: 8px;
}
.rating-button {
  position: relative;
  min-width: 0;
  border: 2px solid transparent;
  padding: 11px 5px;
}
.rating-button[aria-pressed="true"] {
  border-color: currentColor;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent);
}
.rating-button[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}
.study-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}
.study-navigation .secondary {
  min-height: 44px;
  padding: 9px 12px;
  font-size: 12px;
}
.study-navigation .secondary:disabled {
  cursor: default;
  opacity: .4;
}
.study-position {
  min-width: 76px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}
.study-progress > span {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .study-topbar { margin: 8px 0 12px; }
  .study-progress { margin: 8px 0 13px; }
  .flashcard { min-height: 272px; padding: 13px 18px; }
  .card-stage::before,
  .card-stage::after { border-radius: 24px; }
  .card-swipe-cue { top: 65px; padding: 6px 10px; font-size: 11px; }
  .flashcard > .card-face,
  .flashcard > .card-back { min-height: 150px; padding: 15px 0; }
  .flashcard .speaker-button { margin-top: 13px; }
  .flashcard .phonetic { margin-top: 7px; font-size: 14px; }
  .flashcard .meaning { font-size: 16px; line-height: 1.65; }
  .flashcard .example { margin-top: 10px; font-size: 13px; }
  .card-flip-label { font-size: 10px; margin-bottom: 2px; }
  .gesture-hint { font-size: 10px; margin-top: 7px; }
  .rating-status { margin-top: 11px; }
  .rating-grid { gap: 8px; }
  .rating-button { min-height: 64px; }
  .study-navigation { gap: 9px; margin-top: 12px; }
  .study-footer { gap: 8px; }
  .study-footer .text-button,
  .study-footer .mode-select { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .flashcard,
  .flashcard *,
  .rating-button { animation: none !important; transition: none !important; }
  .flashcard::after { animation: none !important; }
  .card-stage::before,
  .card-stage::after { transform: none; }
  .card-swipe-cue { display: none; }
  .rating-button:hover { transform: none; }
}
.phonetic-block{max-width:100%}.phonetic-block .phonetic{overflow-wrap:anywhere;line-height:1.65}.phonetic-label{font-size:10px;color:var(--muted);line-height:1.65;margin-top:5px}.phonetic-label.is-pending{color:#916135}.catalog-info{margin:16px 0;padding:16px 18px;border:1px solid var(--line);border-radius:15px;background:var(--surface);font-size:12px;line-height:1.85;overflow-wrap:anywhere}.catalog-info>p+p{margin-top:5px}.catalog-note{font-size:11px;color:var(--muted)}.catalog-info .notice{margin:11px 0 0;padding:11px 13px}.row-phonetic,.row-review-note{display:block;margin-top:5px;font-size:11px;line-height:1.65;overflow-wrap:anywhere}.row-phonetic{color:var(--muted);font-family:Georgia,"Times New Roman",serif}.row-review-note{color:#916135}

.voice-presets{display:grid;grid-template-columns:1fr 1fr;gap:10px}.voice-preset{text-align:left;padding:15px 13px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);min-width:0}.voice-preset[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft)}.voice-preset strong,.voice-preset span,.voice-preset small{display:block}.voice-preset strong{font-size:13px}.voice-preset span{font-size:11px;line-height:1.6;color:var(--muted);margin:7px 0 4px}.voice-help{font-size:11px;line-height:1.8;color:var(--muted);margin-top:6px}.voice-help summary{cursor:pointer;color:var(--accent);min-height:32px}.voice-help p+p{margin-top:8px}.voice-rescan{align-self:flex-start;font-size:12px;min-height:36px}#voice-status{margin:0;overflow-wrap:anywhere}

/* Root Memory 1.0: a quiet indigo notebook with warm study accents. */
body{background:radial-gradient(ellipse at 90% 0,#eee8fa 0,transparent 42%),var(--paper)}
.app-header{border-bottom:1px solid #e4dfedb0;margin-bottom:25px}
.brand-name{font-size:23px;font-weight:720;letter-spacing:-.04em}
.brand-caption{letter-spacing:.08em;font-size:11px;font-weight:600}
.brand-mark{box-shadow:0 5px 16px #44327115;border-radius:16px}
.header-status{font-size:11px}
.page-heading{margin:25px 0 28px}
.eyebrow{letter-spacing:.15em;font-size:10px;color:#7f6d9b}
h1{letter-spacing:-.045em;font-weight:700}
.study-hero{background:linear-gradient(135deg,#292543,#484172 78%,#65568d);min-height:296px;box-shadow:0 14px 32px #39305c17}
.study-hero h2{font-size:32px;font-weight:650;line-height:1.36;position:relative;z-index:1}
.study-hero .primary{color:#302849;background:#f9e4d0;padding-inline:21px}
.study-hero .primary:hover{background:#ffeddd}
.study-hero .eyebrow{font-size:9px;color:#d5cbed;margin-top:0}
.study-hero:before{width:270px;height:270px;bottom:-170px;right:-30px;border-radius:50%;border-color:#d9cbed20}
.study-hero:after{width:310px;height:310px;bottom:-190px;right:-50px;border-radius:50%;border-color:#d9cbed18}
.hero-icon{background:#ffffff0b;transform:rotate(10deg)}
.hero-decoration{position:absolute;right:37px;top:88px;font-family:Georgia,serif;font-size:30px;line-height:1.05;color:#d9c8ed3d;transform:rotate(-9deg);pointer-events:none}
.hero-decoration span{display:block;font-family:inherit;text-align:center;font-size:28px;margin:9px 0;color:#ecc5a263}
.progress-panel{background:linear-gradient(155deg,#fffefd,#f5f1fa);box-shadow:none}
.progress-ring{background:conic-gradient(#8e78b6 var(--progress),#e9e2f3 0)}
.progress-ring:before{inset:7px;background:#fbf9fe}
.metric{background:#fffefdcc;box-shadow:none}
.metric-top svg{color:#a48ab6}
.metric strong{font-weight:650}
.concept-section{margin-top:30px}
.concept-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.concept-card{position:relative;text-align:left;padding:22px 21px;border:1px solid var(--line);border-radius:19px;background:#f0ebf8;overflow:hidden;transition:transform .15s,border-color .15s}
.concept-card:nth-child(2){background:#fff0e4;border-color:#efdece}
.concept-card:nth-child(3){background:#ece9f5}
.concept-card:hover{transform:translateY(-2px);border-color:#bcb0d4}
.concept-symbol{font-family:Georgia,serif;font-size:14px;color:#9a88b3;display:block;margin-bottom:17px}
.concept-card:nth-child(2) .concept-symbol{color:#b88f69}
.concept-card h3{font-size:16px;font-weight:650}
.concept-card p{color:#7c7189;font-size:12px;line-height:1.85;margin-top:9px}
.concept-link{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:16px;font-size:11px;font-weight:600;color:#665081}
.concept-link svg{width:14px;height:14px}
.concept-note{font-size:10px;color:#8c8298;line-height:1.8;margin-top:11px}
.practice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.practice-card{position:relative;text-align:left;border:1px solid var(--line);border-radius:18px;padding:20px 46px 20px 62px;background:var(--surface);min-height:92px}
.practice-card:hover{border-color:#b9add1;background:#faf8ff}
.practice-card.warm{background:#fff8f1;border-color:#efdece}
.practice-index{position:absolute;left:19px;top:22px;display:grid;place-items:center;width:29px;height:29px;border-radius:9px;background:#eee7f8;color:#725d94;font-family:Georgia,serif;font-size:15px}
.practice-card.warm .practice-index{background:#fbe5d1;color:#aa754b}
.practice-card strong{display:block;font-size:13px;font-weight:650}
.practice-card small{display:block;color:var(--muted);font-size:11px;line-height:1.7;margin-top:5px}
.practice-card>svg{position:absolute;right:17px;top:34px;width:17px;height:17px;color:#9d90b2}
.deck-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.deck-card{background:#fffefdd9;min-height:144px}
.deck-card h3{line-height:1.6}
.deck-card .track{margin-top:auto}
.deck-card p{margin-bottom:14px}
.secondary-practice{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:24px}
.quick-card{background:#fffefd77}
.quick-card:nth-child(2) .quick-icon{background:#eee7f8}
.card-kind{display:block;font-size:10px;letter-spacing:.09em;color:#9180a8;font-weight:600;margin:0 0 15px}
.card-face .card-word{font-family:Georgia,"Times New Roman",serif;font-weight:500;font-size:clamp(34px,7vw,48px);letter-spacing:-.025em;color:#332c4a}
.card-face .card-prompt{margin-top:16px;font-size:clamp(20px,4vw,27px)}
.card-face .card-kind{margin-bottom:18px}
.recall-prompt{font-size:12px;color:#8b7f99;line-height:1.9;margin-top:22px}
.recall-count{font-size:10px;color:#a095aa;margin-top:14px}
.card-face .spelling-prompt{font-size:23px;margin-top:0}
.flashcard{border-color:#ded5eb;background:linear-gradient(145deg,#fffefd 4%,#fffdfd 62%,#f0ebf8);box-shadow:0 18px 42px #3829490c,0 3px 8px #38294907}
.flashcard.is-revealed{background:linear-gradient(145deg,#fcfaff,#fffefd 65%,#f5effb)}
.flashcard-top .pill{background:#f0eaf7;color:#7d6a96;font-weight:500}
.flashcard-top>.pill{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;max-width:calc(100% - 95px)}
.flashcard .card-back{padding:26px 0;align-items:stretch;text-align:left}
.card-back>.card-kind,.card-back>.card-word,.card-back>.phonetic-block{text-align:center}
.card-back>.card-word{font-family:Georgia,"Times New Roman",serif;font-size:32px;font-weight:500;margin-bottom:10px;color:#332c4a}
.card-back>.speaker-button{align-self:center}
.card-back>.meaning{font-size:16px;line-height:1.85;text-align:center;margin:6px 0 10px}
.root-meaning{display:flex;gap:10px;align-items:baseline;justify-content:center;color:#756287;font-size:13px;margin:4px 0 10px;line-height:1.8}
.root-meaning>span{font-size:10px;color:#9a8aa9;white-space:nowrap}
.root-meaning>strong{font-weight:550;white-space:pre-wrap;overflow-wrap:anywhere}
.memory-note,.breakdown-note{margin-top:14px;padding:16px 17px;border-radius:14px;width:100%}
.memory-note{background:#faf0e5;border:1px solid #f1e1d0}
.breakdown-note{background:#f1edf7;border:1px solid #e6ddef}
.memory-note h3,.breakdown-note h3{font-size:10px;font-weight:650;margin-bottom:8px;letter-spacing:.05em;color:#9b784f}
.breakdown-note h3{color:#8b73a5}
.memory-note p,.breakdown-note p{font-size:13px;line-height:1.95;white-space:pre-wrap;color:#705d4b}
.breakdown-note p{color:#746182}
.related-section{margin-top:21px;width:100%;text-align:left}
.content-label{display:flex;gap:12px;justify-content:space-between;color:#8d7d9f;font-size:10px;margin-bottom:9px;letter-spacing:.03em}
.related-words{border-top:1px solid #e9e1ef}
.related-word{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 1px;border-bottom:1px solid #eee8f3;min-height:58px}
.related-word>span{min-width:0}
.related-word strong{display:block;font-family:Georgia,"Times New Roman",serif;font-size:18px;font-weight:500;overflow-wrap:anywhere;color:#504060}
.related-word small{display:block;font-size:11px;color:#93849e;margin-top:3px;line-height:1.75;white-space:pre-wrap}
.related-word .icon-button{width:44px;height:44px;min-width:44px;color:#9c87b5}
.related-word .icon-button:hover{background:#eee8f7}
.related-word svg{width:18px;height:18px}
.association-note{font-size:10px;line-height:1.8;color:#aa8d70;margin-top:16px}
.card-back .example{margin:17px 0 0;color:#978a9f;font-size:12px}
.card-bottom{border-top:1px solid #eae3f0;padding-top:8px;margin-top:7px;line-height:1.6}
.card-flip-label{padding:5px;font-size:11px;color:#9b86b3;background:#f4eff9;border-radius:9px}
.card-flip-label svg{width:12px;height:12px;vertical-align:-2px;margin-left:5px}
.rating-button:nth-child(3){background:#e9e2f5;color:#715991}
.rating-button:nth-child(4){background:#474071}
.rating-button[aria-pressed=true]{box-shadow:0 0 0 2px var(--paper),0 0 0 3px #9d88b9}
.study-footer .mode-select{max-width:175px;color:#8b779e}
.library-toolbar{flex-wrap:wrap}
.library-selects{display:flex;gap:9px;min-width:0}
.library-toolbar select{max-width:170px;background:#fffefd;min-width:115px}
.catalog-info{background:#f0ebf7;border-color:#e5dcee;padding:15px 17px}
.catalog-info>p:first-child{font-size:12px;color:#685879}
.catalog-types{display:flex;gap:6px 16px;flex-wrap:wrap;color:#8b799f;font-size:11px;margin:8px 0 5px}
.catalog-types strong{font-weight:650;color:#68567f;margin-left:3px}
.catalog-note{font-size:10px}
.word-row{padding-block:17px}
.word-main strong{font-family:Georgia,"Times New Roman",serif;font-size:20px;font-weight:500;color:#4b3c5e}
.row-tags .kind-tag{background:#eae1f4;color:#85689d}
.row-tags .family-tag{background:#faf0e5;color:#aa835d}
.word-row .icon-button{min-width:44px;width:44px;min-height:44px}
.source-heading{display:flex;justify-content:space-between;gap:12px;align-items:baseline}
.source-locator{font-size:10px;white-space:nowrap;background:#f0e9f8;border-radius:6px;padding:3px 7px;color:#9077a6}
.source-list .source-meaning{background:#f5f1f9;border-radius:10px;padding:11px 13px;color:#8b7b98;font-size:12px;line-height:1.85}
.source-list .source-meaning>small{margin-bottom:6px;color:#b09cbd;font-size:10px}
.review-card-detail .card-word{font-family:Georgia,"Times New Roman",serif;font-weight:500}
.review-card-detail>.card-kind{margin-top:19px}
.review-card-detail .meaning{font-size:16px;line-height:1.9}
.review-card-detail .root-meaning{justify-content:flex-start}
.review-card-detail .speaker-button{margin-top:15px}
.onboard-intro{background:linear-gradient(140deg,#fffefd,#f3edfb);border-color:#e4d9ef}
.onboard-art{height:146px;margin:17px 0 37px}
.mini-card{width:118px;height:146px;box-shadow:0 13px 23px #392c5210}
.mini-card strong{font-size:26px;font-weight:500;letter-spacing:-.04em}
.mini-card:first-child{transform:translateX(-105%) rotate(-13deg);background:#eee5f8}
.mini-card:last-child{transform:translateX(4%) rotate(12deg);background:#fae6d3}
.mini-card:nth-child(2){background:#fffaf5;transform:translateX(-50%) rotate(1deg)}
.onboard-intro .eyebrow{font-size:9px;letter-spacing:.15em;margin-bottom:15px;color:#927ea8}
.onboard-intro h1{font-size:35px;line-height:1.35}
.bottom-nav{background:#fffefdf5;border-color:#e4ddeb;box-shadow:0 8px 35px #35294a0f}
.bottom-nav button[aria-current=page]{background:#eee7f8;color:#66517f}
.toast button{color:#e4c9ef}
@media(min-width:1000px){.hero-grid{grid-template-columns:1.7fr 1fr}.study-hero{padding:33px}.progress-panel{column-gap:24px}.hero-decoration{right:72px;top:85px;font-size:35px}}
@media(max-width:700px){
 .app-shell{padding-left:21px;padding-right:21px}.app-header{height:91px;margin-bottom:20px}.brand-name{font-size:21px}.brand-caption{font-size:10px;letter-spacing:.065em}.header-status{font-size:9px;gap:5px}
 .page-heading{margin:18px 0 23px}.page-heading h1{font-size:26px}.eyebrow{font-size:8px;letter-spacing:.12em}.subtitle{font-size:11px}
 .hero-grid{grid-template-columns:minmax(0,1.45fr) minmax(105px,1fr);gap:11px}.study-hero{padding:23px 20px;min-height:270px}.study-hero h2{font-size:26px}.study-hero .eyebrow{font-size:7px;letter-spacing:.1em;line-height:1.7;max-width:125px;margin-bottom:12px}.study-hero p{font-size:10px;line-height:1.85;margin:14px 0 19px}.study-hero .primary{font-size:11px;padding:11px 13px;min-height:44px;gap:7px}.study-hero .primary svg{width:16px;height:16px}.hero-decoration{display:none}
 .progress-panel{padding:22px 9px}.progress-ring{width:101px;height:101px}.progress-ring:before{inset:6px}.ring-inner strong{font-size:31px}.ring-inner span{font-size:9px}.progress-panel .mini-label{font-size:10px}.progress-panel p{font-size:9px;line-height:1.8}
 .metric{padding:15px 12px}.metric-top{font-size:10px}.metric strong{font-size:26px}.metric-top svg{width:14px;height:14px}
 .concept-section{margin-top:25px}.concept-grid{gap:8px}.concept-card{padding:16px 12px 13px;border-radius:15px}.concept-card h3{font-size:12px;white-space:nowrap}.concept-symbol{font-size:12px;margin-bottom:14px}.concept-card p{font-size:10px;line-height:1.85;margin-top:8px}.concept-link{font-size:9px;margin-top:14px;gap:3px}.concept-link svg{width:11px;height:11px}.concept-note{font-size:9px}
 .practice-grid{gap:9px}.practice-card{padding:18px 12px 15px;min-height:142px;border-radius:16px}.practice-index{position:static;margin-bottom:13px;width:26px;height:26px;font-size:13px}.practice-card strong{font-size:12px}.practice-card small{font-size:10px;margin-top:6px;line-height:1.8}.practice-card>svg{right:15px;top:23px;width:14px;height:14px}
 .deck-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.deck-card{min-height:148px}.deck-card p{font-size:10px;line-height:1.8}
 .secondary-practice{grid-template-columns:1fr;gap:9px;margin-top:19px}.quick-card>span:last-child{gap:6px}.quick-card strong{font-size:12px}.quick-card small{font-size:10px}
 .flashcard{padding:13px 17px;border-radius:23px}.flashcard>.card-face{min-height:245px;padding:24px 0}.flashcard>.card-back{min-height:245px;padding:24px 0 18px}.card-face .card-word{font-size:39px}.card-kind{font-size:9px}.card-face .card-kind{margin-bottom:18px}.card-back>.card-word{font-size:31px}.card-back>.meaning{font-size:15px;line-height:1.85;margin-top:9px}.recall-prompt{font-size:11px}.recall-count{font-size:9px}
 .root-meaning{font-size:12px;gap:8px}.memory-note,.breakdown-note{padding:13px 14px;margin-top:12px;border-radius:12px}.memory-note p,.breakdown-note p{font-size:12px;line-height:1.9}.memory-note h3,.breakdown-note h3{font-size:9px}.related-section{margin-top:18px}.related-word strong{font-size:17px}.related-word small{font-size:10px}.related-word{padding:9px 0}.association-note{font-size:9px}.card-bottom{font-size:9px;gap:7px}.card-bottom button{font-size:9px}.card-flip-label{font-size:10px;min-height:34px}
 .library-toolbar{gap:9px}.library-toolbar .search-box{flex-basis:100%}.library-selects{width:100%;gap:9px}.library-toolbar select{flex:1;width:50%;max-width:none;min-height:45px;font-size:12px;padding-inline:11px}.search-box input{font-size:13px;min-height:47px}.filter-chip{font-size:10px;padding:8px 12px;min-height:37px}.filter-bar{gap:5px}.word-main strong{font-size:20px}.word-main p{font-size:11px;line-height:1.8}.word-row{padding:15px 14px}.catalog-types{gap:5px 13px}.catalog-info{padding:14px 15px}.list-summary{align-items:center}
 .source-heading{gap:9px}.source-heading strong{font-size:12px}.source-locator{font-size:9px}.source-list .source-meaning{font-size:11px}.review-card-detail .meaning{font-size:15px}
 .onboard-intro{padding:29px 20px}.onboard-intro h1{font-size:31px}.onboard-art{height:128px;margin-bottom:33px}.mini-card{height:128px;width:104px}.mini-card strong{font-size:24px}.mini-card span{font-size:9px}.onboard-intro .privacy-note{font-size:10px;line-height:1.9}
}
@media(max-width:370px){.app-shell{padding-left:16px;padding-right:16px}.app-header{gap:7px}.brand{gap:8px}.brand-mark{width:40px;height:40px;border-radius:13px}.brand-name{font-size:19px}.brand-caption{font-size:9px}.header-status{font-size:8px;gap:4px}.page-heading h1{font-size:24px}.study-hero{padding:21px 16px}.study-hero h2{font-size:24px}.study-hero .primary{padding-inline:10px;font-size:10px}.progress-ring{width:90px;height:90px}.concept-card{padding-inline:10px}.concept-card h3{font-size:11px}.concept-card p{font-size:9px}.concept-link{font-size:8px}.study-footer{gap:7px}.study-footer .text-button{font-size:10px}.mode-select{font-size:11px;max-width:155px}}

/* Keep the study controls within a normal phone's first viewport. */
@media (max-width:700px) and (max-height:900px) {
  .app-shell:has(.study-wrap) .app-header {
    height:calc(68px + env(safe-area-inset-top,0px));
    padding-top:env(safe-area-inset-top,0px);
    margin-bottom:4px;
  }
  .app-shell:has(.study-wrap) .brand-mark { width:38px; height:38px; border-radius:12px; }
  .app-shell:has(.study-wrap) .brand-name { font-size:20px; }
  .app-shell:has(.study-wrap) .brand-caption { font-size:9px; margin-top:3px; }
  .study-wrap .study-topbar { margin:4px 0 6px; }
  .study-wrap .study-progress { margin:5px 0 9px; }
  .study-wrap .flashcard {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    column-gap:8px;
    min-height:0;
    padding:8px 16px;
  }
  .study-wrap .flashcard-top,
  .study-wrap .flashcard>.card-face,
  .study-wrap .flashcard>.card-back { grid-column:1 / -1; }
  .study-wrap .flashcard>.card-face { min-height:160px; padding:12px 0; }
  .study-wrap .card-face .card-kind { margin-bottom:8px; }
  .study-wrap .card-face .card-word { font-size:35px; line-height:1.2; }
  .study-wrap .recall-prompt { margin-top:12px; line-height:1.75; }
  .study-wrap .recall-count { margin-top:8px; }
  .study-wrap .flashcard>.card-flip-label {
    grid-column:1;
    margin:0;
    min-height:44px;
    align-self:end;
    background:transparent;
    text-align:left;
    padding:6px 0;
    line-height:1.6;
  }
  .study-wrap .card-bottom {
    grid-column:2;
    position:relative;
    display:block;
    min-height:44px;
    padding:0;
    margin:0;
    border:0;
    text-align:right;
    align-self:end;
  }
  .study-wrap .card-bottom>span { position:absolute; top:3px; right:0; font-size:9px; line-height:12px; pointer-events:none; }
  .study-wrap .card-bottom>button { min-height:44px; padding:16px 0 2px; font-size:10px; line-height:1.6; }
  .study-wrap .gesture-hint { margin-top:5px; line-height:1.5; }
  .study-wrap .rating-status { margin-top:7px; line-height:1.6; }
  .study-wrap .rating-status+.rating-grid { margin-top:6px; }
  .study-wrap .rating-button { min-height:60px; padding:9px 5px; }
  .study-wrap .study-navigation { margin-top:9px; }
  .study-wrap .study-footer { margin-top:5px; }

  /* Answer content stays in normal flow; long examples expand the page. */
  .study-wrap .flashcard>.card-back { min-height:0; padding:4px 0; }
  .study-wrap .card-back>.card-kind { margin-bottom:3px; font-size:9px; line-height:1.5; }
  .study-wrap .card-back>.card-word { font-size:28px; line-height:1.15; margin-bottom:2px; }
  .study-wrap .card-back>.meaning { font-size:14px; line-height:1.6; margin:2px 0 3px; }
  .study-wrap .card-back .root-meaning { margin:2px 0 4px; line-height:1.6; }
  .study-wrap .card-back .memory-note,
  .study-wrap .card-back .breakdown-note { padding:6px 9px; margin-top:6px; border-radius:10px; }
  .study-wrap .card-back .memory-note h3,
  .study-wrap .card-back .breakdown-note h3 { display:inline; font-size:10px; line-height:1.65; margin:0 7px 0 0; }
  .study-wrap .card-back .memory-note p,
  .study-wrap .card-back .breakdown-note p { display:inline; font-size:12px; line-height:1.65; }
  .study-wrap .card-back .related-section { margin-top:8px; }
  .study-wrap .card-back .content-label { font-size:10px; line-height:1.5; margin-bottom:3px; }
  .study-wrap .card-back .related-word { min-height:44px; padding:0; gap:7px; }
  .study-wrap .card-back .related-word>span { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 10px; }
  .study-wrap .card-back .related-word strong { font-size:17px; line-height:1.4; }
  .study-wrap .card-back .related-word small { font-size:11px; line-height:1.6; margin-top:0; }
  .study-wrap .card-back .association-note { margin-top:6px; font-size:9px; line-height:1.6; }
  .study-wrap .card-back .example { margin-top:8px; font-size:12px; line-height:1.7; }
  .study-wrap .card-back>.speaker-button { margin-top:8px; }
}

/* Type names and distinct underline styles accompany every morphology color. */
.morph-root { --morph-color:#684091; --morph-wash:#f0e6f8; --morph-line:solid; }
.morph-prefix { --morph-color:#235f91; --morph-wash:#e8f2fa; --morph-line:dashed; }
.morph-suffix { --morph-color:#8b551b; --morph-wash:#fff0dc; --morph-line:double; }
.morph-alternation { --morph-color:#963e68; --morph-wash:#fbeaf2; --morph-line:dotted; }
.morph-linker { --morph-color:#176963; --morph-wash:#e6f4f0; --morph-line:solid; }
.morph-label { color:var(--morph-color,#776a86); }
.morph-token,
.morph-segment {
  color:var(--morph-color,inherit);
  border-bottom:2px var(--morph-line,solid) currentColor;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}
.morph-segment { background:var(--morph-wash,transparent); border-radius:3px 3px 0 0; }
.morph-suffix.morph-token,
.morph-suffix.morph-segment { border-bottom-width:3px; }
.morph-legend { display:flex; flex-wrap:wrap; align-items:center; gap:15px; margin:9px 0 12px; font-size:10px; line-height:1.5; }
.morph-legend>.morph-label { border-bottom:2px var(--morph-line,solid) currentColor; padding:0 1px 1px; font-weight:650; }
.morph-legend>.morph-suffix { border-bottom-width:3px; padding-bottom:0; }
.concept-section>.morph-legend { margin:-4px 0 12px; }
.concept-join { color:#918598; font-weight:400; }
.study-wrap>.morph-legend { justify-content:center; margin:0 0 9px; }
.review-card-detail>.morph-legend { margin:10px 0 12px; }
.word-row.morph-root,
.word-row.morph-prefix,
.word-row.morph-suffix { box-shadow:inset 3px 0 0 var(--morph-color); }
.row-tags .kind-tag { color:var(--morph-color,#7e7586); background:var(--morph-wash,#f2eff5); }
.row-tags .family-tag { color:#7e7586; background:#f2eff5; }
.row-tags .cue-tag { color:var(--morph-color); background:var(--morph-wash); }
.structure-section { width:100%; margin-top:16px; text-align:left; }
.structure-links { display:grid; gap:7px; }
.structure-link {
  display:grid;
  grid-template-columns:auto minmax(32px,auto) minmax(0,1fr) 14px;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:9px 10px;
  border:1px solid #e5ddef;
  border-radius:11px;
  background:#fcfafd;
  text-align:left;
  width:100%;
}
.structure-link:hover { background:#f2edf8; border-color:#c8b7dc; }
.structure-link>.morph-label { font-size:10px; font-weight:650; line-height:1.6; white-space:nowrap; }
.structure-link>strong { max-width:115px; min-width:0; overflow-wrap:anywhere; font-family:Georgia,"Times New Roman",serif; font-size:17px; font-weight:500; line-height:1.4; justify-self:start; }
.structure-meaning { min-width:0; color:#71627d; font-size:12px; line-height:1.7; overflow-wrap:anywhere; white-space:pre-wrap; }
.structure-link>svg { width:14px; height:14px; color:#9a89ac; }
@media (max-width:700px) and (max-height:900px) {
  .study-wrap .study-progress { margin-bottom:5px; }
  .study-wrap>.morph-legend { font-size:9px; line-height:1.4; gap:14px; margin-bottom:7px; }
  .study-wrap .card-back .structure-section { margin-top:8px; }
  .study-wrap .card-back .structure-links { gap:5px; }
  .study-wrap .card-back .structure-link { min-height:44px; padding:7px 9px; gap:7px; }
  .study-wrap .card-back .structure-link>strong { font-size:16px; max-width:105px; }
  .study-wrap .card-back .structure-meaning { font-size:11px; line-height:1.7; }
}

/* Exact letter cues stay in the answer, with the original teaching context. */
.morph-legend { gap:8px 13px; }
.morph-linker.morph-token,
.morph-linker.morph-segment { border-bottom-width:3px; }
.memory-cues { width:100%; margin-top:15px; text-align:left; }
.cue-panel { padding:13px 14px; border:1px solid #e4dce9; border-left:3px solid var(--morph-color); border-radius:13px; background:var(--morph-wash); }
.cue-panel+.cue-panel { margin-top:10px; }
.cue-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; }
.cue-heading h3 { font-size:12px; font-weight:650; line-height:1.65; }
.cue-heading>span { color:#877386; font-size:10px; line-height:1.7; }
.cue-letters { display:flex; align-items:baseline; flex-wrap:wrap; gap:10px; margin:8px 0 6px; }
.cue-letters>strong { font-family:Georgia,"Times New Roman",serif; font-size:21px; font-weight:550; line-height:1.3; }
.cue-join { color:#998897; font-size:14px; }
.cue-note { font-size:11px; line-height:1.8; color:#766674; margin-bottom:6px; white-space:pre-wrap; }
.cue-words { border-top:1px solid #d8cbdc80; }
.cue-member { display:flex; align-items:center; justify-content:space-between; min-height:44px; gap:8px; padding:3px 0; border-bottom:1px solid #d8cbdc80; }
.cue-member:last-child { border-bottom:0; }
.cue-member>div { display:flex; flex-wrap:wrap; align-items:baseline; min-width:0; gap:3px 9px; }
.cue-member .cue-word { font-family:Georgia,"Times New Roman",serif; font-size:18px; line-height:1.5; font-weight:500; overflow-wrap:anywhere; }
.cue-member small { color:#786773; font-size:11px; line-height:1.7; overflow-wrap:anywhere; white-space:pre-wrap; }
.cue-member small.cue-reference { color:#91828d; font-size:10px; }
.cue-member .icon-button { width:44px; min-width:44px; height:44px; color:var(--morph-color); }
.cue-member .icon-button svg { width:18px; height:18px; }
.cue-source { color:#887684; font-size:10px; line-height:1.75; margin-top:7px; }
.cue-source-details { margin-top:1px; }
.cue-source-details>summary { min-height:44px; padding:13px 0 10px; cursor:pointer; font-size:11px; line-height:1.8; color:var(--morph-color); }
.cue-source-details[open]>summary { padding-bottom:8px; }
.cue-source-details .source-list { margin-top:0; }
.cue-source-details .source-list li { padding:9px 0; }
.cue-source-details .source-meaning { background:#fffafc99; }
.cue-disclaimer { color:#937d8a; font-size:10px; line-height:1.75; margin-top:8px; }
@media (max-width:700px) and (max-height:900px) {
  .study-wrap>.morph-legend { gap:5px 9px; }
  .study-wrap .card-back .memory-cues { margin-top:8px; }
  .study-wrap .card-back .cue-panel { padding:9px 10px; border-radius:10px; }
  .study-wrap .card-back .cue-heading h3 { font-size:11px; }
  .study-wrap .card-back .cue-heading>span { font-size:9px; }
  .study-wrap .card-back .cue-letters { margin:6px 0 5px; }
  .study-wrap .card-back .cue-letters>strong { font-size:19px; }
  .study-wrap .card-back .cue-member { padding:0; }
  .study-wrap .card-back .cue-member .cue-word { font-size:17px; }
  .study-wrap .card-back .cue-source,
  .study-wrap .card-back .cue-disclaimer { font-size:9px; }
}
