:root{--bg: #121110;--surface: #1a1917;--surface2: #23211e;--border: #2f2c28;--text: #d8d2c6;--muted: #8b857b;--thought: #8794a0;--user: #a8b59c;--accent: #c9a46a;--danger: #c97a6a;--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Noto Serif", "Source Serif Pro", Georgia, serif;--sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;color-scheme:dark}*{box-sizing:border-box}html,body,#root{margin:0;height:100%}body{background:var(--bg);color:var(--text);font-family:var(--sans);font-size:16px;-webkit-tap-highlight-color:transparent}button,input,textarea,select{font:inherit;color:inherit}button{min-height:44px;padding:0 1rem;border:1px solid var(--border);border-radius:10px;background:var(--surface2);cursor:pointer}button:disabled{opacity:.5;cursor:default}button.primary{background:var(--accent);color:#1a1408;border-color:var(--accent);font-weight:600}button.danger{color:var(--danger)}button.danger-solid{background:var(--danger);border-color:var(--danger);color:#1a0f0c;font-weight:600}.dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:1.25rem;background:#0009}.dialog{width:100%;max-width:24rem;padding:1.25rem;background:var(--surface2);border:1px solid var(--border);border-radius:16px;box-shadow:0 12px 40px #00000080}.dialog h2{margin:0 0 .5rem;font-size:1.1rem;font-weight:600}.dialog p{margin:0 0 1.25rem;color:var(--muted);line-height:1.5}.dialog-actions{display:flex;gap:.5rem;justify-content:flex-end}.dialog-actions button{flex:1}button.link{background:none;border:none;color:var(--accent);padding:0 .5rem}button.small{min-height:36px;padding:0 .75rem;font-size:.9rem}.button-like{display:inline-flex;align-items:center;min-height:44px;padding:0 1rem;border:1px solid var(--border);border-radius:10px;background:var(--surface2);cursor:pointer}input[type=text],input[type=password],input[type=number],textarea,select{width:100%;padding:.7rem .8rem;background:var(--surface);border:1px solid var(--border);border-radius:10px;outline:none}input:focus,textarea:focus,select:focus{border-color:var(--accent)}textarea{resize:vertical;line-height:1.5}.muted{color:var(--muted)}.center{text-align:center}.error{color:var(--danger)}.ok{color:var(--user)}.page{max-width:44rem;margin:0 auto;padding:0 1rem calc(2rem + env(safe-area-inset-bottom))}.topbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:.5rem;min-height:56px;padding:env(safe-area-inset-top) .5rem 0;background:var(--bg);border-bottom:1px solid var(--border)}.topbar h1{flex:1;margin:0;font-size:1.1rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar-actions{display:flex;gap:.25rem}.icon-btn{min-width:44px;padding:0;border:none;background:none;font-size:1.6rem;line-height:1;color:var(--muted)}.section{margin:1.5rem 0}.section h2{font-size:.85rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:0 0 .75rem}.row{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.stack>*+*{margin-top:.75rem}.field{display:block;margin-bottom:1rem}.field>span{display:block;margin-bottom:.35rem;font-size:.9rem;color:var(--muted)}.check{display:flex;align-items:center;gap:.6rem;min-height:44px}.check input{width:20px;height:20px;accent-color:var(--accent)}.card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:.9rem 1rem}.card+.card{margin-top:.75rem}.card.clickable{cursor:pointer}.card h3{margin:0 0 .25rem;font-size:1.05rem}.card p{margin:.25rem 0}.preview{font-family:var(--serif);color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.avatar{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:50%;border:2px solid var(--border);background:var(--surface2);object-fit:cover;font-family:var(--serif)}.avatars{display:flex}.avatars .avatar+.avatar{margin-left:-8px}details>summary{display:flex;align-items:center;gap:.6rem;min-height:44px;cursor:pointer;list-style:none}details>summary::-webkit-details-marker{display:none}details>summary:after{content:"";flex-shrink:0;width:.55rem;height:.55rem;margin:0 .35rem .25rem auto;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg)}details[open]>summary:after{margin-bottom:-.25rem;transform:rotate(-135deg)}.banner.clickable{cursor:pointer}.style-list{display:flex;flex-direction:column;gap:.75rem}.style-card{position:relative;display:flex;flex-direction:column;gap:.35rem;padding:.9rem 1rem;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:14px;overflow:hidden}.style-card strong{font-size:1.05rem}.style-card span{color:var(--muted);line-height:1.45;font-size:.95rem}.style-card.selected{border-color:var(--accent);background:var(--surface2)}.style-card .style-check{position:absolute;right:0;bottom:0;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-top-left-radius:12px;background:var(--accent);color:#1a1408}.style-card .style-check svg{width:1.1rem;height:1.1rem}.tabs{display:flex;gap:.25rem;margin:1rem 0;border-bottom:1px solid var(--border)}.tabs button{border:none;background:none;border-radius:0;color:var(--muted);border-bottom:2px solid transparent}.tabs button.active{color:var(--text);border-bottom-color:var(--accent)}.banner{margin:.5rem 0;padding:.75rem 1rem;border-radius:10px;background:#2a1d1a;border:1px solid #4a2f29;color:#e3b3a8;font-size:.95rem}.story-screen{display:flex;flex-direction:column;height:100dvh}.story-scroll{flex:1;overflow-y:auto;overscroll-behavior:contain}.story-text{max-width:36rem;margin:0 auto;padding:1.5rem 1.25rem 2rem;font-family:var(--serif);font-size:1rem;line-height:1.75;hyphens:auto;-webkit-hyphens:auto}.para{margin:0 0 1.1em}.para .speaker{font-variant:small-caps;letter-spacing:.06em;font-size:.92em;margin-right:.5em}.para.user{color:var(--story-color, var(--user));padding-left:1em;border-left:3px solid color-mix(in srgb,var(--story-color, var(--user)) 60%,transparent)}.glow{position:fixed;top:0;right:0;bottom:0;left:0;z-index:30;pointer-events:none;opacity:0;box-shadow:inset 0 0 40px 2px color-mix(in srgb,var(--story-color, var(--user)) 45%,transparent);transition:opacity .6s ease}.glow.on{opacity:.6;animation:glow-pulse 3s ease-in-out infinite}@keyframes glow-pulse{0%,to{opacity:.4}50%{opacity:.8}}@media(prefers-reduced-motion:reduce){.glow.on{animation:none}}.continue-row{display:flex;justify-content:flex-end;margin-top:-.9rem}.continue-btn{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;min-height:1.5rem;padding:0;border-radius:6px;color:var(--muted)}.continue-btn svg{width:.9rem;height:.9rem}.para.narrator{color:#c9c2b5}.story-input{background:var(--bg);padding:.5rem .75rem calc(.5rem + env(safe-area-inset-bottom))}.story-input .inner{max-width:36rem;margin:0 auto}.story-input form{display:flex;gap:.5rem;align-items:flex-end}.story-input textarea{flex:1;resize:none;field-sizing:content;min-height:2rem;max-height:9rem;padding:.25rem .6rem;border-radius:8px;font-family:var(--serif);font-size:1rem;line-height:1.35}.story-input button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:2rem;height:2rem;min-width:2rem;min-height:2rem;padding:0;border-radius:8px}.story-input .quote-btn{color:var(--muted)}.story-input button svg{width:1.1rem;height:1.1rem}.menu{position:absolute;right:.5rem;top:calc(56px + env(safe-area-inset-top));z-index:10;display:flex;flex-direction:column;min-width:14rem;padding:.25rem;background:var(--surface2);border:1px solid var(--border);border-radius:12px}.menu button{border:none;background:none;text-align:left}.menu button:hover{background:var(--surface)}.story-card{position:relative}.story-card.has-cover{background-size:cover;background-position:center}.story-card.archived{opacity:.6}.story-card.archived:has(.card-menu){opacity:1}.story-card.has-cover .preview{color:#b9b2a6}.card-menu-btn{margin:-.6rem -.6rem 0 0}.card-menu{top:2.75rem;right:.5rem;min-width:11rem;z-index:20;box-shadow:0 8px 24px #00000073}.menu-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:15;cursor:default}.wiz-msg{margin:0 0 1rem;white-space:pre-wrap;line-height:1.6}.wiz-msg.user{color:var(--user);padding-left:1em;border-left:3px solid color-mix(in srgb,var(--user) 60%,transparent)}.wiz-msg.model{font-family:var(--serif);font-size:1rem}
