:root{color-scheme:light;--paper:#f7f5ef;--white:#fffefa;--ink:#242324;--dim:#5c575e;--line:#ded8df;--purple:#563a80;--deep:#382456;--lav:#eee6fa;--lime:#d9eb8e;--sans:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--serif:Georgia,"Noto Serif SC",serif}
*{box-sizing:border-box} [hidden]{display:none!important} body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);line-height:1.5} button,input,textarea,select{font:inherit;color:inherit} button,a,label.file-button{touch-action:manipulation;-webkit-tap-highlight-color:transparent} button,a.outline,.file-button{cursor:pointer} button:disabled{cursor:wait;opacity:.65} :focus-visible{outline:3px solid #9a6de6;outline-offset:3px} a{color:var(--purple)} p{margin:0 0 1rem} h1,h2,h3{margin:0;line-height:1.08} .mast{display:flex;align-items:center;gap:.55rem;padding:.9rem 1.1rem;min-height:72px;border-bottom:1px solid var(--line)} .brand{display:flex;gap:.65rem;align-items:center;margin-right:auto;white-space:nowrap}.brand strong{display:block;font-weight:780;line-height:1.15}.brand div span{font-size:.66rem;letter-spacing:.115em;color:var(--dim);font-weight:750}.logo{display:grid;place-items:center;background:var(--deep);color:var(--lime);height:40px;width:40px;border-radius:12px;font-size:1.35rem;font-weight:650} main{max-width:680px;margin:auto;padding:1.1rem 1.05rem calc(1.3rem + env(safe-area-inset-bottom));min-height:calc(100vh - 72px)} .modes{display:flex;padding:4px;gap:4px;border:1px solid var(--line);background:#ece8ed;border-radius:14px}.modes button{width:50%;border:0;border-radius:11px;min-height:44px;background:transparent;display:flex;align-items:center;justify-content:center;gap:.45rem;font-weight:750;color:var(--dim)}.modes button[aria-pressed=true]{color:var(--deep);background:var(--white);box-shadow:0 1px 3px #2a15451c}svg{height:19px;width:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.intro{padding:1.55rem .1rem 1.15rem}.eyebrow{font-size:.74rem;letter-spacing:.14em;font-weight:800;color:var(--purple);display:flex;align-items:center;gap:.45rem;margin:0 0 .5rem}.eyebrow span{width:.53rem;height:.53rem;border:1px solid var(--purple);border-radius:3px;background:var(--lime);transform:rotate(-12deg)}h1{font-family:var(--serif);font-weight:400;font-size:clamp(2.5rem,10vw,4.3rem);letter-spacing:-.055em} h1 em{color:var(--purple)}.intro>p:last-child{max-width:31rem;color:var(--dim);margin:.8rem 0 0}.surface{border:1px solid var(--line);background:var(--white);border-radius:19px;padding:1rem;box-shadow:0 4px 0 #39303a09}.secondary{margin-top:.7rem}.surface details>p,details>p{margin-top:.65rem;color:var(--dim)}.field-label{font-weight:720;font-size:.9rem;display:block;margin:0 0 .38rem}.optional{font-size:.78rem;font-weight:500;color:var(--dim);margin-left:.18rem}textarea,input:not([type=file]),select{display:block;background:#faf8f9;color:var(--ink);border:1px solid var(--line);border-radius:10px;width:100%;padding:.67rem .7rem;margin:.33rem 0 .85rem;outline-offset:1px;font-size:1rem}textarea{resize:vertical;min-height:4.5rem} textarea::placeholder,input::placeholder{color:#6b626e}.photo-row,.actions,.section-head{display:flex;gap:.55rem;align-items:center;flex-wrap:wrap}.photo-row{margin:.2rem 0 .75rem}.actions{margin-top:.75rem}.actions.tight{margin:.5rem 0 .85rem}.section-head{justify-content:space-between;margin-bottom:.9rem}.primary,.outline,.subtle{min-height:42px;display:inline-flex;justify-content:center;align-items:center;gap:.4rem;border-radius:9px;font-size:.88rem;font-weight:750;padding:.58rem .78rem;border:1px solid transparent;text-align:center;text-decoration:none}.primary{background:var(--deep);color:#fff;border-color:var(--deep)}.primary:hover{background:var(--purple)}.outline{background:var(--white);border-color:var(--line);color:var(--deep)}.outline:hover,.subtle:hover{background:var(--lav)}.subtle{background:none;color:var(--deep);padding:.4rem .35rem}.count{background:var(--lav);border-radius:50px;min-width:1.45em;text-align:center;padding:0 .27em;color:var(--deep);font-size:.78rem}.status{color:var(--dim);margin:.55rem 0 0;font-size:.9rem}.status:empty{display:none}.below{display:flex;align-items:center;justify-content:space-between;gap:.6rem;color:var(--dim);font-size:.88rem;margin-top:.45rem}.visually-hidden{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}.file-button:has(+ input:focus-visible){outline:3px solid #9a6de6;outline-offset:3px}#photo-preview{display:block;max-height:145px;max-width:100%;border-radius:10px;object-fit:contain}.grid{display:grid;grid-template-columns:1fr 1fr;gap:0 .7rem}.grid>*{min-width:0}#ai-panel summary{cursor:pointer}footer{color:var(--dim);font-size:.78rem;margin-top:1.35rem;text-align:center}footer span:first-child{color:var(--purple);font-weight:800}
.study-card{width:100%;background:var(--deep);color:#fff;border:1px solid var(--deep);border-radius:20px;box-shadow:0 5px 0 #27183e26;padding:1rem 1.2rem;display:flex;flex-direction:column;justify-content:space-between;min-height:255px;text-align:left}.study-card:hover{background:#432961}.study-card .facet{color:var(--lime);font-size:.75rem;letter-spacing:.13em;font-weight:750;text-transform:uppercase}.cue{font-size:clamp(1.6rem,6vw,2.25rem);line-height:1.34;margin:.8rem 0;overflow-wrap:anywhere}.cue[lang=zh-Hans]{font-weight:680}.cue strong{color:var(--lime)}.card-foot{font-size:.85rem;color:#efe7f7}.answer{border-top:5px solid var(--purple)}.answer h2{color:var(--deep);overflow-wrap:anywhere;font-size:clamp(1.6rem,7vw,2.45rem)} .answer .pron{color:var(--purple);font-size:1.08rem;margin:.4rem 0}.answer .meaning{font-weight:750;font-size:1.04rem;margin:.45rem 0 .8rem}.answer-example{border-radius:12px;background:var(--lav);margin:.8rem 0;padding:.75rem .85rem}.answer-example p{margin:0}.answer-example p+p{margin-top:.28rem;color:var(--dim);font-size:.91rem}.answer-example strong{color:var(--deep);font-weight:850}.answer-note{white-space:pre-wrap;color:var(--dim)} .answer .actions{justify-content:space-between}.answer .actions .primary{min-width:125px}
dialog{color:var(--ink);width:min(calc(100% - 22px),630px);max-height:92dvh;border:1px solid var(--line);border-radius:18px;padding:0;background:var(--white)}dialog::backdrop{background:#20132d99}.dialog-inner{padding:1rem}.deck-list{list-style:none;padding:0;margin:.6rem 0}.deck-list li{border-bottom:1px solid var(--line);padding:.7rem 0;display:flex;gap:.45rem;align-items:center;justify-content:space-between}.deck-list li p{margin:0;overflow-wrap:anywhere}.deck-list .item-main{min-width:0;flex:1}.deck-list small{display:block;color:var(--dim);font-size:.82rem}.deck-list .outline{flex:none} @media(min-width:700px){.mast{padding-inline:max(1rem,calc((100vw - 680px)/2 + 1.05rem))} @media(max-width:374px){.grid{grid-template-columns:1fr}.brand div span{letter-spacing:.06em}.mast{padding-inline:.7rem}.mast .subtle{font-size:.76rem}}
.quick-capture textarea{min-height:4.7rem;margin-bottom:.65rem}.quick-actions{display:flex;align-items:flex-start;justify-content:space-between;gap:.6rem}.quick-actions .primary{min-width:6.5rem}.photo-menu{position:relative}.photo-menu summary{cursor:pointer;list-style:none}.photo-menu summary::-webkit-details-marker{display:none}.photo-options{position:absolute;z-index:1;display:grid;min-width:155px;white-space:nowrap;gap:.35rem;top:calc(100% + .25rem);background:var(--white);border:1px solid var(--line);box-shadow:0 .5rem 1rem #24183722;border-radius:11px;padding:.3rem}.photo-strip{margin-bottom:.75rem;display:flex;align-items:flex-start;gap:.6rem}#photo-preview{max-width:min(70%,22rem)} .capture-links{min-height:2.7rem}.capture-links #connect-quick{margin-left:auto}#capture-result{margin-bottom:0}.check-line{display:flex;align-items:flex-start;gap:.5rem;font-size:.9rem;margin:.65rem 0 .85rem}.check-line input[type=checkbox]{width:1.2rem;height:1.2rem;margin:.16rem 0 0;padding:0;accent-color:var(--purple);flex:none}#setup-summary{margin:.65rem 0 1rem}#setup-form button,#setup-disconnect{margin-bottom:.25rem}#setup-dialog>div>p:not(.status){color:var(--dim)}
#setup-form input[aria-invalid=true]{border-color:#a22d42;box-shadow:0 0 0 1px #a22d42}#setup-status{color:#49365a}
.lookup-choices{list-style:none;padding:0;margin:.15rem 0;width:100%;display:grid;gap:.35rem}.lookup-choices li{margin:0}.lookup-choices .choice{width:100%;justify-content:space-between;text-align:left;gap:.55rem}.choice-text{display:block;min-width:0}.choice-text strong{font-size:1.1rem;margin-right:.45rem}.choice-text .choice-pinyin{font-weight:500;color:var(--purple)}.choice-english{display:block;overflow-wrap:anywhere;font-weight:550;color:var(--dim)}.choice-use{font-weight:750;flex:none}
.lookup-original{width:100%;margin:.1rem 0;background:#f2edf6;border-radius:9px;padding:.5rem .65rem;font-size:.92rem;color:var(--dim);white-space:pre-wrap;overflow-wrap:anywhere}
#draft-photo{display:block;max-width:100%;max-height:12rem;object-fit:contain;border-radius:10px;margin:.55rem 0 .85rem}
.mode-disclosure{color:var(--dim);font-size:.84rem;margin:.55rem 0 0}.capture-links #capture-settings{margin-left:auto}#current-add-mode{margin:0}#provider-disclosure{margin-top:.45rem}#provider-actions .actions{margin-bottom:.55rem}
.deck-list .capture-row{flex-wrap:wrap;justify-content:flex-start}.deck-list .capture-row .item-main{flex-basis:100%}

/* Compact everyday view: the learning content owns the screen. */
.mast{min-height:52px;padding:.45rem 1rem}.brand{font-size:1.25rem;color:var(--deep)}
main{padding-top:.65rem;min-height:calc(100dvh - 52px)}
#capture-mode,#study-mode{margin-top:.8rem}.study-card{min-height:clamp(290px,58dvh,520px);justify-content:center}
.cue{margin:0;font-size:clamp(1.9rem,7vw,2.8rem)}.answer{min-height:clamp(290px,58dvh,520px);padding:1.2rem}
.study-controls{display:flex;gap:.55rem;margin-top:.7rem;align-items:center}.study-controls .primary{margin-left:auto;min-width:7rem}
.study-controls button{min-height:46px}.study-controls .report-card{min-width:46px;font-size:1.1rem}
.study-grades{display:flex;gap:.75rem;margin-top:.8rem}.study-grades button{flex:1;min-height:56px;font-size:1.6rem}
.answer-example .example-pinyin{color:var(--purple);line-height:1.6;font-size:1rem}
#study-message{display:flex;align-items:center;gap:.65rem}#study-message:empty{display:none}
#study-count{font-variant-numeric:tabular-nums}.capture-row small{white-space:pre-wrap}.capture-row .capture-error{color:#8e3145}
#queue-actions .check-line{margin:0;margin-left:auto}#feedback-note{min-height:8rem}
@media(min-width:700px){.mast{padding-inline:max(1rem,calc((100vw - 680px)/2 + 1.05rem))}}

#study-category{width:auto;min-width:9rem;margin:0 0 .7rem auto;background:var(--white)}
