/* Full-screen selector. Layer order: photograph, wash, particles, interface. */
/* Shared violet UI; book-cover colours identify titles without changing CTA meaning. */
:root { color-scheme:light; --bg:#f2effb; --ink:#2c2048; --muted:#625977; --accent:#6650d9; --on-accent:#fff; --line:rgba(98,73,151,.2); --panel:rgba(252,250,255,.94); --selected:#fbf8ff; --wash:linear-gradient(90deg,#f4f0fbe8 0%,#f2edfbee 39%,#eeebfbe0 66%,#e6ddf29b 100%); --error:#ae3244; --spell:#bd167e; --trans:#bc364f; --sentence:#6a4acb; --speed:#ac520d; }
@media(prefers-color-scheme:dark) { :root:not([data-theme=light]) { color-scheme:dark; --bg:#201b32; --ink:#f3eefb; --muted:#c2b9d3; --accent:#c5b5ff; --on-accent:#2f2155; --line:rgba(218,202,248,.21); --panel:rgba(43,34,62,.95); --selected:rgba(221,200,255,.09); --wash:linear-gradient(90deg,#241b36f7 0%,#251e39ef 39%,#2c2041dc 66%,#302446af 100%); --error:#ffb1b8; --spell:#ff9dd6; --trans:#ffabb8; --sentence:#c5b5ff; --speed:#ffc083; } }
:root[data-theme=dark] { color-scheme:dark; --bg:#201b32; --ink:#f3eefb; --muted:#c2b9d3; --accent:#c5b5ff; --on-accent:#2f2155; --line:rgba(218,202,248,.21); --panel:rgba(43,34,62,.95); --selected:rgba(221,200,255,.09); --wash:linear-gradient(90deg,#241b36f7 0%,#251e39ef 39%,#2c2041dc 66%,#302446af 100%); --error:#ffb1b8; --spell:#ff9dd6; --trans:#ffabb8; --sentence:#c5b5ff; --speed:#ffc083; }
[data-book=spell] { --book-accent:var(--spell); }
[data-book=trans] { --book-accent:var(--trans); }
[data-book=sentence] { --book-accent:var(--sentence); }
[data-book=speed] { --book-accent:var(--speed); }
* { box-sizing:border-box; }
html,body { margin:0; width:100%; height:100%; overflow:hidden; }
body { color:var(--ink); background:var(--bg); font-family:"Segoe UI","Microsoft YaHei",sans-serif; -webkit-font-smoothing:antialiased; }
button,input { font:inherit; } button,a,input { -webkit-tap-highlight-color:transparent; }
a { color:inherit; text-decoration:none; }
button { cursor:pointer; } button:disabled { cursor:wait; opacity:.65; }
[hidden] { display:none!important; }
.scene-photo,.scene-wash { position:fixed; inset:0; width:100%; height:100%; pointer-events:none; }
.scene-photo { object-fit:cover; object-position:80% center; }
.scene-wash { background:var(--wash); }
.scene-particles { position:fixed; inset:0; width:100%; height:100%; pointer-events:none; }
@media(prefers-reduced-motion:reduce) { .scene-particles { display:none; } }
.studio { position:relative; width:100%; height:100%; height:100dvh; display:grid; grid-template-rows:76px minmax(0,1fr) var(--home-footer-height); padding:0 clamp(24px,5vw,100px); }
.topbar { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.brand { display:flex; gap:12px; align-items:center; }
.brand-mark { font-size:22px; color:var(--accent); }
.brand strong { display:block; font-size:17px; font-weight:650; letter-spacing:.05em; }
.brand small { display:block; font-size:11px; color:var(--muted); letter-spacing:.12em; margin-top:4px; }
.top-actions { display:flex; align-items:center; gap:18px; }
.icon-button { width:40px; height:40px; display:inline-grid; place-items:center; border:1px solid var(--line); border-radius:50%; background:transparent; color:var(--ink); flex-shrink:0; }
.icon-button:hover { background:var(--selected); }
.help-link { font-size:13px; display:flex; align-items:center; gap:9px; }
.library { width:100%; max-width:1540px; margin:0 auto; display:grid; grid-template-columns:minmax(270px,.85fr) minmax(0,1.7fr); gap:clamp(40px,6vw,120px); align-items:center; min-height:0; }
.collection { min-height:0; display:flex; flex-direction:column; max-height:100%; padding:24px 0; }
.eyebrow { color:var(--accent); font-size:10px; font-weight:600; letter-spacing:.22em; }
.collection h1 { font-size:clamp(24px,2.4vw,38px); font-weight:500; line-height:1.35; letter-spacing:-.03em; margin:15px 0 10px; }
.collection-heading p { font-size:13px; color:var(--muted); margin:0; }
.book-choices { margin:clamp(18px,4vh,42px) 0 14px; display:grid; gap:7px; overflow:auto; scrollbar-width:none; min-height:0; }
.book-choices::-webkit-scrollbar { display:none; }
.book-choice { text-align:left; color:var(--muted); border:1px solid transparent; border-radius:12px; display:grid; grid-template-columns:46px minmax(0,1fr) 16px; gap:16px; padding:10px 14px; width:100%; background:transparent; align-items:center; }
.book-choice:hover { background:var(--selected); color:var(--ink); }
.book-choice[aria-current=true] { color:var(--ink); border-color:var(--book-accent); border-color:color-mix(in srgb,var(--book-accent) 38%,transparent); background:var(--selected); }
.choice-cover { width:46px; height:66px; display:grid; place-items:center; color:var(--book-accent); }
.choice-cover img { display:block; width:100%; height:100%; object-fit:contain; border-radius:2px; filter:drop-shadow(0 3px 4px rgba(35,20,60,.18)); }
.choice-cover i { font-size:25px; }
.book-choice strong { display:block; font-size:15px; font-weight:600; }
.book-choice small { display:block; font-size:11px; margin-top:5px; color:var(--muted); }
.choice-arrow { opacity:0; font-size:11px; }
.book-choice[aria-current=true] .choice-arrow { opacity:1; color:var(--book-accent); }
.shelf-navigation { display:flex; gap:14px; align-items:center; }
.shelf-navigation .icon-button { width:32px; height:32px; font-size:11px; }
#bookPosition { font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; }
.book-stage { min-width:0; max-width:870px; padding:clamp(28px,5vh,60px) 0; }
.book-category { display:flex; align-items:center; gap:12px; font-size:12px; font-weight:600; letter-spacing:.08em; color:var(--book-accent); }
.book-category i { font-size:23px; }
.book-stage h2 { font-weight:500; font-size:clamp(36px,4.6vw,76px); line-height:1.16; letter-spacing:-.045em; margin:24px 0; max-width:11em; text-wrap:balance; }
.book-stage h2 .book-prefix { display:block; font-size:.43em; letter-spacing:.06em; line-height:1.6; margin-bottom:8px; }
.book-description { font-size:15px; line-height:1.85; max-width:36em; color:var(--muted); margin:0; }
.book-backup-note { margin:14px 0 0; color:var(--muted); font-size:12px; line-height:1.7; }
.book-backup-note i { color:var(--book-accent); margin-right:7px; }
.library { overflow-y:auto; align-items:safe center; scrollbar-width:thin; }
.book-features { list-style:none; padding:0; margin:22px 0 0; display:flex; flex-wrap:wrap; gap:14px 25px; }
.book-features li { display:flex; gap:8px; align-items:center; color:var(--muted); font-size:12px; }
.book-features i { font-size:10px; color:var(--book-accent); }
.access-area { margin-top:clamp(25px,5vh,56px); min-height:158px; max-width:660px; }
.primary-button { display:inline-flex; align-items:center; justify-content:space-between; gap:34px; border:0; border-radius:10px; min-height:54px; padding:0 24px; color:var(--on-accent); background:var(--accent); font-weight:650; font-size:14px; }
.primary-button:hover { filter:brightness(1.08); }
.welcome-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.secondary-button { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:54px; padding:0 18px; border:1px solid var(--line); border-radius:10px; background:var(--selected); color:var(--accent); font-size:14px; font-weight:650; }
.secondary-button:hover { border-color:var(--accent); }
.welcome-state > p { color:var(--muted); font-size:12px; margin-top:16px; white-space:pre-line; }
.checking-state { min-height:130px; display:flex; align-items:center; gap:16px; color:var(--accent); }
.checking-state > i { font-size:24px; }
.checking-state strong { font-size:15px; font-weight:600; }
.checking-state p { color:var(--muted); font-size:12px; margin:8px 0 0; }
.activation-state { background:var(--panel); padding:20px 22px; border:1px solid var(--line); border-radius:16px; box-shadow:0 16px 50px -30px rgba(58,30,102,.25); }
.activation-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.activation-heading > span { font-size:13px; font-weight:600; display:flex; gap:9px; align-items:center; }
.activation-heading .icon-button { width:28px; height:28px; font-size:11px; border:0; }
.serial-field { display:flex; gap:10px; }
.serial-field input[type=text] { width:0; flex:1; min-width:0; border:1px solid var(--line); border-radius:9px; background:var(--selected); padding:0 13px; height:50px; font-size:14px; color:var(--ink); }
.serial-field input::placeholder { color:var(--muted); font-size:12px; }
.serial-field .primary-button { min-height:50px; padding:0 18px; gap:18px; font-size:13px; }
.serial-hint { font-size:11px; color:var(--muted); line-height:1.5; margin:12px 0 0; white-space:pre-line; }
.activation-error { color:var(--error); font-size:12px; line-height:1.5; margin:0 0 12px; }
.trial-link { display:inline-block; margin-top:10px; font-size:12px; color:var(--accent); }
.footer { display:flex; align-items:center; justify-content:space-between; gap:20px; color:var(--muted); font-size:11px; border-top:1px solid var(--line); }
.footer i { margin-right:8px; color:var(--accent); }
.footer-notes { display:flex; flex-direction:column; gap:4px; line-height:1.6; }
.footer .book-backup-note { margin:0; font-size:inherit; line-height:inherit; }
.legal { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px 12px; line-height:1.6; }
.legal > * { white-space:nowrap; }
.legal > * + * { border-left:1px solid var(--line); padding-left:12px; }
.legal a:hover { text-decoration:underline; text-underline-offset:3px; color:var(--accent); }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
.no-script { position:fixed; inset:25%; background:var(--panel); padding:32px; }
@media(max-height:540px) and (max-width:599px) {
 .studio { grid-template-rows:46px minmax(0,1fr) var(--home-footer-height)!important; }
 .library { gap:10px!important; }
 .book-choice { padding:7px!important; }
 .book-stage h2 { font-size:22px!important; margin:8px 0!important; }
 .book-stage h2 .book-prefix,.book-category,.book-description,.book-features { display:none!important; }
 .access-area { margin-top:10px!important; min-height:0!important; }
 .activation-state { padding:10px!important; }
}
@media(prefers-reduced-motion:no-preference) {
 .book-choice,.primary-button { transition:background .2s,color .2s,transform .2s; }
 .book-choice:active,.primary-button:active { transform:scale(.98); }
 .book-detail.is-changing { animation:bookEnter .3s ease-out; }
 .activation-state { animation:bookEnter .22s ease-out; }
 @keyframes bookEnter { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
}
@media(max-height:760px) and (min-width:761px) {
 .studio { grid-template-rows:64px minmax(0,1fr) var(--home-footer-height); }
 .collection h1 { font-size:27px; margin-top:10px; }
 .book-choices { margin-top:18px; gap:3px; }
 .book-choice { padding:8px 12px; grid-template-columns:38px minmax(0,1fr) 16px; gap:12px; }
 .choice-cover { width:38px; height:55px; }
 .book-stage { padding:16px 0; }
 .book-stage h2 { font-size:clamp(32px,4vw,56px); margin:18px 0; }
 .access-area { margin-top:22px; min-height:142px; }
}
@media(max-width:760px) {
 .studio { padding:0 22px; grid-template-rows:62px minmax(0,1fr) var(--home-footer-height); }
 .brand strong { font-size:14px; }.brand small { font-size:9px; }.brand-mark { font-size:19px; }
 .top-actions { gap:12px; }.top-actions .icon-button { width:32px; height:32px; }.help-link { font-size:11px; }
 .library { display:flex; flex-direction:column; justify-content:safe center; align-items:stretch; gap:24px; }
 .collection { padding:0; flex-shrink:0; }
 .collection-heading .eyebrow,.collection-heading h1,.collection-heading p,.shelf-navigation { display:none; }
 .book-choices { grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; gap:6px; max-height:166px; }
 .book-choice { grid-template-columns:32px minmax(0,1fr); padding:9px; gap:9px; }
 .choice-cover { width:32px; height:46px; }
 .choice-arrow { display:none; }.book-choice strong { font-size:12px; line-height:1.5; text-wrap:balance; }.book-choice small { font-size:10px; }
 .book-stage { padding:0; }
 .book-stage h2 { font-size:clamp(29px,7.8vw,46px); margin:16px 0; max-width:12em; }
 .book-stage h2 .book-prefix { margin-bottom:4px; }
 .book-category { font-size:11px; }.book-category i { font-size:17px; }
 .book-description { font-size:12px; line-height:1.7; }
 .book-features { margin-top:14px; gap:10px 16px; }.book-features li { font-size:10px; }
 .access-area { margin-top:22px; min-height:145px; }
 .activation-state { padding:13px; }.activation-heading { margin-bottom:10px; }
 .serial-field { gap:7px; }.serial-field input[type=text] { padding:0 8px; font-size:13px; height:44px; }.serial-field input::placeholder { font-size:10px; }
 .serial-field .primary-button { min-height:44px; padding:0 11px; font-size:12px; gap:8px; }.serial-field .primary-button i { display:none; }
 .footer { font-size:10px; justify-content:center; flex-direction:column; gap:8px; padding:6px 0; }
 .footer-notes { align-self:stretch; align-items:flex-start; }
 .legal { justify-content:center; column-gap:9px; row-gap:1px; }
 .legal > :first-child { flex-basis:100%; text-align:center; }
 .legal > :nth-child(2) { border:0; padding:0; }
 .legal > :last-child { padding-left:9px; }
 .scene-photo { object-position:70% center; }
}
@media(max-height:700px) and (max-width:760px) {
 .studio { grid-template-rows:54px minmax(0,1fr) var(--home-footer-height); padding:0 16px; }
 .library { gap:15px; }.book-choice { padding:9px; }.book-choice small { display:none; }
 .book-choice { grid-template-columns:26px minmax(0,1fr); gap:7px; }.choice-cover { width:26px; height:38px; }
 .book-stage h2 { font-size:28px; margin:12px 0; }
 .book-features { display:none; }.access-area { margin-top:15px; min-height:130px; }
 .activation-heading { margin-bottom:7px; }.serial-hint { margin-top:8px; }
}
@media(max-height:480px) and (min-width:600px) {
 .studio { grid-template-rows:48px minmax(0,1fr) var(--home-footer-height); padding:0 20px; }
 .library { display:grid; grid-template-columns:minmax(190px,.8fr) minmax(0,1.5fr); gap:26px; }
 .collection-heading,.shelf-navigation { display:none; }.book-choices { display:grid; grid-template-columns:1fr; max-height:none; margin:0; }
 .book-choice { padding:9px; }.book-choice small { display:none; }
 .book-choice { grid-template-columns:28px minmax(0,1fr); gap:10px; }.choice-cover { width:28px; height:40px; }.choice-arrow { display:none; }
 .book-stage h2 { font-size:26px; margin:8px 0; }.book-stage h2 .book-prefix { display:none; }
 .book-description,.book-features { display:none; }.book-category { font-size:10px; }
 .access-area { margin-top:12px; min-height:120px; }.book-stage { padding:0; }
 .activation-state { padding:10px; }.activation-heading { margin-bottom:4px; }
 .legal { justify-content:flex-end; }
}

:root { --home-footer-height:60px; }
@media(max-width:760px) { :root { --home-footer-height:126px; } }
