/* Liquid Glass-inspired functional chrome. Content and reading paper stay opaque. */
:root{--glass-blur:blur(24px) saturate(155%);--glass-shadow:0 8px 24px -12px #0006;--glass-edge:rgba(255,255,255,.32)}
#app{position:relative}#screen{padding-bottom:86px}#app:has(#bottom-nav[hidden]) #screen{padding-bottom:0}
button{transition:transform .28s cubic-bezier(.2,.8,.2,1),background-color .25s cubic-bezier(.2,.8,.2,1),box-shadow .28s cubic-bezier(.2,.8,.2,1)}button:active{transform:scale(.96)}button:focus-visible{outline:3px solid #ff9d61;outline-offset:4px}
.primary,.workspace .primary{border-radius:999px;background:linear-gradient(180deg,#ff9a5a 0%,#ff762c 48%,#ef5e12 100%);border:1px solid rgba(255,226,197,.65);color:#211308;box-shadow:inset 0 1px 0 #fff9,inset 0 -1px 0 #bf410733,0 5px 14px -8px #0008;font-weight:750}
.primary:hover,.workspace .primary:hover{box-shadow:inset 0 1px 0 #fffc,0 9px 22px -12px #0009}
.secondary,.workspace .secondary,.icon-button,.chip,.coin-mini,.guest-button{border-radius:999px;background:linear-gradient(155deg,rgba(255,255,255,.85),rgba(255,255,255,.4));border:1px solid rgba(255,255,255,.78);box-shadow:inset 0 1px 0 #fff,0 5px 16px -13px #0008;-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur)}
body.app-dark .secondary,body.app-dark .icon-button,body.app-dark .chip,body.app-dark .coin-mini{background:linear-gradient(150deg,rgba(255,255,255,.16),rgba(255,255,255,.045));border:1px solid rgba(255,255,255,.24);box-shadow:inset 0 1px 0 rgba(255,255,255,.17),0 6px 18px -13px #000c;color:#f6eee7}
body.app-dark .chip.active{background:linear-gradient(155deg,rgba(255,172,112,.95),rgba(247,110,34,.88));color:#251408;border-color:#ffc28c}
.icon-button{min-height:40px;min-width:40px;padding:9px}.icon-button svg{stroke-width:1.65;width:20px;height:20px}.header-actions{gap:6px}.header-actions .icon-button{min-height:35px;min-width:35px;padding:7px}.brand .site-logo{width:122px}.coin-mini{padding:8px 10px}.app-header{min-height:65px}
#bottom-nav,body.app-dark #bottom-nav{position:absolute;left:12px;right:12px;bottom:10px;height:68px;padding:6px;display:flex;border-radius:36px;border:1px solid rgba(255,255,255,.35);background:linear-gradient(160deg,rgba(255,255,255,.84),rgba(242,239,234,.67));-webkit-backdrop-filter:blur(28px) saturate(165%);backdrop-filter:blur(28px) saturate(165%);box-shadow:inset 0 1px 0 #fffd,0 9px 30px -13px #0009;overflow:hidden}
body.app-dark #bottom-nav{background:linear-gradient(150deg,rgba(90,82,75,.78),rgba(30,27,24,.84));box-shadow:inset 0 1px 0 #ffffff38,0 10px 30px -12px #000c}
#bottom-nav[hidden],body.app-dark #bottom-nav[hidden]{display:none}
#bottom-nav button,body.app-dark #bottom-nav button{height:54px;min-width:0;padding:6px 0;gap:3px;flex:1;background:transparent;border:1px solid transparent;border-radius:30px;box-shadow:none;font-size:10px;color:#554c44;font-weight:650;justify-content:center}
body.app-dark #bottom-nav button{color:#e6dcd2}#bottom-nav button.active,body.app-dark #bottom-nav button.active{background:linear-gradient(160deg,rgba(255,191,141,.46),rgba(255,134,62,.16));border-color:rgba(255,205,166,.55);color:#8c3405;box-shadow:inset 0 1px 0 #fff8,0 3px 10px -7px #0008}
body.app-dark #bottom-nav button.active{color:#ffd0a9;background:linear-gradient(155deg,rgba(255,177,119,.32),rgba(255,143,67,.15));border-color:rgba(255,200,153,.44)}
#bottom-nav .nav-icon,#bottom-nav .active .nav-icon,body.app-dark #bottom-nav .nav-icon,body.app-dark #bottom-nav .active .nav-icon{padding:0;background:transparent;border-radius:0}#bottom-nav svg{width:21px;height:21px;stroke-width:1.7}
.app-header{position:sticky;top:0;z-index:8;padding:10px 0;margin-bottom:14px;background:rgba(255,255,255,.88);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}body.app-dark .app-header{background:rgba(17,16,15,.87)}
.search-prompt,.field-wrap{border-radius:24px;border:1px solid #e4ded8;box-shadow:inset 0 1px 0 #fff8}body.app-dark .search-prompt,body.app-dark .field-wrap{border-color:rgba(255,255,255,.12)}
.feature{border-radius:24px}.feature .primary,body.app-dark .feature .primary{background:linear-gradient(155deg,rgba(48,37,28,.95),rgba(12,10,8,.9));color:#fff5eb;border-color:rgba(255,231,211,.4);box-shadow:inset 0 1px 0 #ffffff36,0 5px 14px -8px #0009}
.segmented,.world-tabs{position:relative}.segmented{border-radius:24px;padding:5px}.segmented button{border-radius:20px}.segmented button.active,body.app-dark .segmented button.active{background:linear-gradient(150deg,rgba(255,255,255,.7),rgba(255,255,255,.35));color:#36291f;border:1px solid rgba(255,255,255,.85);box-shadow:inset 0 1px 0 #fff9,0 4px 10px -7px #0007}body.app-dark .segmented button.active{background:linear-gradient(145deg,#604633c9,#3f3025c9);color:#ffe0c4;border-color:#b59c8544}
body.app-dark .reader .icon-button,.reader .icon-button{background:rgba(136,126,113,.1);color:inherit;border-color:rgba(139,127,112,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.2)}.reader .topbar{background:color-mix(in srgb,var(--read-bg,#fbf8f2) 88%,transparent);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);padding-block:6px;min-height:64px}
.reader .primary{border-radius:999px}.reader .secondary{border-radius:999px}
dialog,body.app-dark dialog{background:rgba(255,251,246,.94);border:1px solid #fff;border-radius:30px;-webkit-backdrop-filter:blur(28px) saturate(140%);backdrop-filter:blur(28px) saturate(140%);box-shadow:inset 0 1px 0 white,0 25px 65px -22px #0008}dialog::backdrop{background:#0a08065c;backdrop-filter:blur(7px)}dialog .icon-button{background:#e6dfd666!important;border-color:#fff!important;color:#352a22!important}
.workspace{background:#f4f2ee}.workspace-sidebar{margin:12px;height:calc(100dvh - 24px);border-radius:24px;padding:20px 14px;background:linear-gradient(155deg,rgba(45,40,36,.96),rgba(18,16,14,.95));border:1px solid #ffffff2e;box-shadow:inset 0 1px 0 #ffffff26,0 12px 27px -20px #000b;-webkit-backdrop-filter:blur(28px) saturate(140%);backdrop-filter:blur(28px) saturate(140%)}
.workspace-sidebar nav button{border-radius:999px;border:1px solid transparent}.workspace-sidebar nav button.active{background:linear-gradient(145deg,#ffb16ecc,#ef7a35cc);border-color:#ffcd9d99;color:#2b1608;box-shadow:inset 0 1px 0 #ffe4c2aa,0 5px 13px -10px #000b}
.workspace-header{position:sticky;top:0;z-index:10;background:rgba(255,255,255,.82);-webkit-backdrop-filter:blur(28px) saturate(140%);backdrop-filter:blur(28px) saturate(140%);border-color:#ffffffcc;box-shadow:0 5px 17px -16px #0005}
.workspace-header select{border-radius:99px;background:#ffffffb3}.workspace .secondary{color:#3b2d20;border-color:#fff;background:linear-gradient(150deg,#ffffffed,#e8e2db99);box-shadow:inset 0 1px 0 white,0 5px 14px -12px #0008}
body.app-dark .workspace .secondary{color:#39291d;border-color:white;background:linear-gradient(150deg,#ffffffed,#e8e2db99)}
.editor-toolbar{border-radius:24px;background:rgba(251,249,245,.8);padding:12px 15px;border:1px solid white;-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px)}.table-action{border-radius:99px}.chapter-pills button{border-radius:99px}.form-field input,.form-field select,.form-field textarea{border-radius:14px}.writing-area{border-radius:14px}.workspace-logo{border-radius:12px}.role-launch button,.role-links button{border-radius:999px}.intro-brand{border-radius:16px}.metric,.data-table,.review-work,.workspace-form,.editor-meta,.chapter-editor,.operation-link{border-radius:18px}
.cover{background-repeat:no-repeat}.cover.cover-upload{background-size:cover!important;background-position:center!important}
@supports not (backdrop-filter:blur(1px)){#bottom-nav{background:#ede7e0}body.app-dark #bottom-nav{background:#302a25}.app-header{background:white}body.app-dark .app-header{background:#11100f}.workspace-header{background:white}}
@media(max-width:760px){.workspace-sidebar{margin:8px;height:auto;border-radius:20px;padding:12px}.workspace-sidebar nav{padding-top:10px}.workspace-header{top:0}.workspace-header>div{gap:8px}.workspace-sidebar nav button{padding:8px 11px}.workspace-content{padding-top:23px}}
@media(max-width:500px){#bottom-nav,body.app-dark #bottom-nav{bottom:max(10px,env(safe-area-inset-bottom));left:10px;right:10px;height:68px;padding:6px}#screen{padding-bottom:calc(90px + env(safe-area-inset-bottom))}.app-header{padding-top:8px}.brand .site-logo{width:118px}.header-actions{gap:5px}.feature{padding:20px 15px}.onboarding{padding-bottom:25px}}
@media(prefers-reduced-motion:reduce){button{transition:none!important}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){#bottom-nav{background:#eee8e2!important}body.app-dark #bottom-nav{background:#302923!important}.app-header{background:#fff!important}body.app-dark .app-header{background:#11100f!important}.workspace-header,dialog{background:#fff!important}*{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}}

.catalog-book{display:flex;align-items:center;gap:14px;min-width:230px}.cover.table-cover{width:52px;height:78px;flex:0 0 52px;border-radius:6px}.table-cover .cover-mark{display:none}.table-cover .cover-title{font-size:8px;line-height:1.1}.table-cover .cover-author{font-size:5px}.editor-meta .cover.editor-cover-preview{display:block;width:140px;height:210px;margin:12px 0}.editor-cover-preview .cover-title{font-size:20px}
/* Mobile writer application, inherited Liquid Glass controls and opaque reading surfaces. */
.writer-entry span{flex:1;text-align:left}.writer-entry small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:4px}.writer-page .topbar{position:sticky;top:0;z-index:4;background:var(--paper);margin-bottom:16px}.writer-content{padding-bottom:12px}.writer-intro h1,.writer-status h1{font-size:29px;line-height:1.18;letter-spacing:-.035em;margin:18px 0 14px}.writer-intro p,.writer-copy,.writer-status>p{font-size:14px;line-height:1.65;color:var(--muted);margin:12px 0 20px}.writer-emblem{display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:var(--soft);color:var(--blue)}.writer-emblem svg{width:26px;height:26px}.writer-journey{padding-left:23px;margin:22px 0 28px;line-height:1.6;font-size:14px}.writer-journey li{padding:8px 0 8px 5px}.writer-step-label{font-size:13px;color:var(--muted);margin:16px 0}.writer-stepper{list-style:none;display:flex;padding:0;margin:0 0 30px;gap:8px}.writer-stepper li{flex:1;display:flex;align-items:center;flex-direction:column;gap:8px;font-size:10px;color:var(--muted)}.writer-stepper li>span{width:30px;height:30px;border-radius:50%;border:1px solid var(--line);display:grid;place-items:center;font-size:13px}.writer-stepper .current{color:var(--blue);font-weight:700}.writer-stepper .current>span{background:var(--blue);color:#21140c;border-color:var(--blue)}.writer-stepper .done>span{background:var(--soft);color:var(--blue)}#writer-mobile-form h2{font-size:23px;letter-spacing:-.025em;line-height:1.25}.writer-page .form-field small{font-size:12px;line-height:1.5;color:var(--muted)}.writer-page .check-field{font-size:14px;line-height:1.6;align-items:flex-start;margin:18px 0}.writer-page input[type=checkbox]{flex-shrink:0;width:20px;height:20px;margin-top:2px;accent-color:#db6a23}.writer-privacy{display:flex;gap:12px;margin:20px 0;color:var(--muted);font-size:13px;line-height:1.6}.writer-privacy svg{flex:0 0 20px;width:20px;height:20px}.writer-privacy p{margin:0}.writer-page .demo-verification{padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--paper)}.writer-page .demo-verification h3,.writer-terms h3{font-size:15px;line-height:1.4}.writer-page .demo-verification p,.writer-terms p{font-size:13px;line-height:1.7;color:var(--muted);margin:8px 0 18px}.writer-terms h3{margin-top:24px}.writer-actions{display:flex;gap:10px;margin-top:26px}.writer-actions .primary{flex:1}.writer-save{font-size:12px;color:var(--muted);text-align:center;line-height:1.5;margin-top:14px}.writer-status dl{margin:24px 0}.writer-status dl>div{display:flex;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid var(--line);font-size:13px}.writer-status dt{color:var(--muted)}.writer-status dd{text-align:right;margin:0;max-width:60%;overflow-wrap:anywhere}.writer-status .secondary{margin-top:12px}.writer-summary{padding:20px;border:1px solid var(--line);border-radius:16px}.writer-summary h3{font-size:19px}.writer-summary>p{font-size:14px;line-height:1.7;overflow-wrap:anywhere}.writer-check{display:flex;gap:8px;align-items:center;color:var(--blue)}.writer-check svg{width:18px;height:18px;flex-shrink:0}.writer-page .notice{line-height:1.6;font-size:13px}

/* Writer layout: controls own full rows; no inline buttons beside return links. */
.writer-page{width:100%;min-width:0}.writer-content{min-width:0}.writer-page .topbar{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;gap:10px;height:auto;min-height:60px;padding-block:8px}.writer-page .topbar h2{text-align:center;min-width:0;margin:0}.writer-page .topbar .right{width:40px}.writer-status-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:24px}.writer-status-actions>button,.writer-page>.writer-content>.primary,.writer-page .secondary.wide{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:center;line-height:1.4;min-height:48px;margin:0}.writer-status-actions .notice{margin:0}.writer-status-actions .text-button{padding:12px 16px}.writer-page .writer-actions{display:grid;grid-template-columns: minmax(0,1fr);gap:12px;width:100%;margin-top:8px}.writer-page .writer-actions:has(.secondary){grid-template-columns:minmax(0,1fr) minmax(0,2fr)}.writer-actions>button{display:flex;width:100%;min-width:0;align-items:center;justify-content:center;white-space:normal;overflow-wrap:anywhere;line-height:1.4;min-height:48px;padding:13px 14px}.writer-page .form-field{width:100%;min-width:0}.writer-page .form-field input,.writer-page .form-field textarea,.writer-page .form-field select{display:block;max-width:100%;box-sizing:border-box}.writer-page .check-field{width:100%;min-width:0;overflow-wrap:anywhere;margin:8px 0}.writer-page .writer-stepper li{min-width:0;text-align:center;line-height:1.4}.writer-page .writer-status dl>div{align-items:baseline;line-height:1.5}.writer-page .writer-save{margin:0}.writer-page .writer-content>ol+button{display:flex;width:100%;white-space:normal;line-height:1.4}.writer-page .writer-content>p{overflow-wrap:anywhere}.writer-page .app-form>.writer-copy{margin:0}.writer-page .app-form>h2{margin:0}.writer-page .writer-summary p:last-child{margin-bottom:0}
@media(max-width:350px){.writer-page .writer-actions:has(.secondary){grid-template-columns:minmax(0,1fr)}.writer-page .writer-stepper{gap:4px}.writer-page .writer-status dl>div{flex-direction:column;gap:5px}.writer-page .writer-status dd{text-align:left;max-width:100%}}

.home-writer-access{display:flex;justify-content:flex-end;margin:0 0 14px}.home-writer-access .secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;font-size:13px;line-height:1.4;border-color:#d77c3d;background:#fff2e6;color:#873a09}.home-writer-access svg{width:18px;height:18px;flex-shrink:0}body.app-dark .home-writer-access .secondary{background:#39251a;color:#ffd1ac;border-color:#ab704a}

/* Authentication actions have explicit rows, spacing and theme foregrounds. */
.auth-page{min-width:0}.auth-page .app-form{gap:20px;margin:28px 0 16px}.auth-page #auth-error:empty{display:none}.auth-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:0 0 24px}.auth-page .primary,.auth-actions .guest-button{display:flex;align-items:center;justify-content:center;min-height:48px;width:100%;min-width:0;height:auto;padding:13px 18px;margin:0;line-height:1.5;white-space:normal;overflow-wrap:anywhere;text-align:center;font-size:14px;font-weight:650}.auth-actions .guest-button{background:linear-gradient(155deg,#fff9f3,#eee4d9);color:#49301d;border-color:#cab49f}.auth-actions .guest-button:hover{background:#f3e2d2;color:#382313}body.app-dark .auth-actions .guest-button{background:linear-gradient(155deg,#3c322b,#251f1a);color:#f9eee5;border-color:#776252;box-shadow:inset 0 1px 0 #ffffff26,0 5px 16px -13px #0008}body.app-dark .auth-actions .guest-button:hover{background:#49382b;color:#fff6ed}.auth-page .notice{margin:0;line-height:1.7}.auth-page .form-field{width:100%;min-width:0}.auth-page .form-field input{max-width:100%;box-sizing:border-box}.auth-page .topbar{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;min-height:60px;height:auto;gap:10px}.auth-page .topbar h2{text-align:center;min-width:0;line-height:1.35}.auth-page .check-field{min-width:0;line-height:1.6;overflow-wrap:anywhere}
/* Disclosure controls: explicit plus/minus replaces native triangle markers. */
.faq>summary,.filter-panel>summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:48px;cursor:pointer;line-height:1.5}
.faq>summary::-webkit-details-marker,.filter-panel>summary::-webkit-details-marker{display:none}
.faq>summary::marker,.filter-panel>summary::marker{content:''}
.faq>summary::after,.filter-panel>summary::after{content:'';display:block;flex:0 0 26px;width:26px;height:26px;margin-left:auto;border:1px solid currentColor;border-radius:50%;color:var(--blue);background:linear-gradient(currentColor,currentColor) center/12px 1.5px no-repeat,linear-gradient(currentColor,currentColor) center/1.5px 12px no-repeat}
.faq[open]>summary::after,.filter-panel[open]>summary::after{background-size:12px 1.5px,1.5px 0}
.faq>summary:focus-visible,.filter-panel>summary:focus-visible{outline:2px solid var(--blue);outline-offset:4px;border-radius:6px}

/* Onboarding always uses its dark surface, independent of reader theme. */
.onboarding-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin-top:22px}.onboarding-actions .primary,.onboarding-actions .guest-button{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:48px;height:auto;padding:13px 18px;margin:0;font-size:14px;font-weight:650;line-height:1.5;text-align:center;white-space:normal;overflow-wrap:anywhere}.onboarding .onboarding-actions .guest-button,body.app-dark .onboarding .onboarding-actions .guest-button{background:linear-gradient(155deg,#3c322b,#251f1a);color:#f9eee5;border:1px solid #776252;box-shadow:inset 0 1px 0 #ffffff26,0 5px 16px -13px #0008}.onboarding .onboarding-actions .guest-button:hover{background:#49382b;color:#fff6ed}.onboarding .sample-note{color:#c0b8b1;line-height:1.6;margin-top:22px}.onboarding .welcome-copy{min-width:0}
