:root{--bg:#fef9f4;--fg:#2a2622;--accent:#c46a3f;--border:#d9cfc4;--panel:#fff;--error:#b0332f}*{box-sizing:border-box}html,body{background:var(--bg);color:var(--fg);margin:0;padding:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;line-height:1.5}a{color:var(--accent)}.container{max-width:780px;margin:0 auto;padding:2rem 1.25rem 4rem}.container-wide{max-width:1100px;margin:0 auto;padding:2rem 1.25rem 4rem}h1,h2,h3{font-weight:600;line-height:1.2}button,.btn{background:var(--accent);color:#fff;cursor:pointer;border:0;border-radius:8px;padding:.6rem 1.1rem;font-size:1rem}button.secondary,.btn.secondary{color:var(--fg);border:1px solid var(--border);background:#fff}button:disabled{opacity:.6;cursor:not-allowed}input,select,textarea{font:inherit;border:1px solid var(--border);color:inherit;background:#fff;border-radius:6px;width:100%;padding:.55rem .7rem}label{margin-top:.75rem;font-size:.95rem;font-weight:600;display:block}table{border-collapse:collapse;width:100%;margin-top:1rem}th,td{border-bottom:1px solid var(--border);text-align:left;padding:.55rem .7rem}.panel{background:var(--panel);border:1px solid var(--border);border-radius:8px;margin:1rem 0;padding:1rem 1.25rem}.error{color:var(--error);font-weight:600}.warning{color:#b45309;font-weight:600}nav.topbar{border-bottom:1px solid var(--border);background:#fff;align-items:center;gap:1.25rem;padding:.75rem 1.25rem;display:flex}nav.topbar a{color:var(--fg);font-weight:500;text-decoration:none}nav.topbar a.brand{color:var(--accent);font-weight:700}.footer{color:#6b615a;text-align:center;padding:1.25rem;font-size:.85rem}.page-image{object-fit:contain;background:#000;width:100%;max-height:75vh;display:block}.play-stage{color:#fff;background:#000;flex-direction:column;justify-content:center;align-items:center;min-height:100vh;display:flex}.play-stage img{max-width:100vw;max-height:100vh}.play-overlay{color:#fff;background:#000000d9;flex-direction:column;justify-content:center;align-items:center;gap:1rem;width:100vw;height:100vh;display:flex;position:fixed;top:0;left:0}.book-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1.25rem;margin-top:1.25rem;display:grid}.book-tile{background:0 0;position:relative}.book-tile.selected .book-tile-cover{outline:3px solid var(--accent);outline-offset:2px}.book-tile-link,.book-tile-button{width:100%;color:inherit;text-align:left;cursor:pointer;font:inherit;background:0 0;border:0;padding:0;text-decoration:none;display:block}.book-tile-cover{aspect-ratio:3/4;background:#eee2d3;border-radius:10px;width:100%;position:relative;overflow:hidden;box-shadow:0 2px 6px #0000001f}.book-tile-cover img{object-fit:cover;width:100%;height:100%;display:block}.book-tile-placeholder{color:#a89684;background:#eee2d3;justify-content:center;align-items:center;width:100%;height:100%;font-size:3rem;font-weight:600;display:flex}.book-tile-badge{color:#fff;letter-spacing:.03em;background:#505050d9;border-radius:999px;padding:.15rem .55rem;font-size:.75rem;font-weight:500;position:absolute;top:.5rem;left:.5rem}.book-tile-title{-webkit-line-clamp:2;text-overflow:ellipsis;-webkit-box-orient:vertical;margin-top:.55rem;font-size:.95rem;font-weight:500;line-height:1.3;display:-webkit-box;overflow:hidden}.book-tile-delete{opacity:0;transition:opacity .12s;position:absolute;top:.4rem;right:.4rem}.book-tile:hover .book-tile-delete{opacity:1}@media (hover:none){.book-tile-delete{opacity:1}}.book-tile-delete button{color:var(--fg);border:1px solid var(--border);background:#ffffffe6;border-radius:6px;padding:.35rem .55rem;font-size:.8rem}.book-grid-empty{color:#6b615a;margin-top:1.25rem;font-style:italic}.badge{color:#4a3f36;letter-spacing:.03em;background:#eee2d3;border-radius:999px;padding:.15rem .55rem;font-size:.75rem;font-weight:500;display:inline-block}.badge-cloned{color:#275c2f;background:#cfe8d0}.recorder-tip{border-left:4px solid var(--accent);background:#fdf0e4;border-radius:6px;margin:1rem 0 .75rem;padding:.75rem 1rem;font-weight:500}.recorder-controls{z-index:2;background:var(--panel);border-bottom:1px solid var(--border);padding:.5rem 0;position:sticky;top:0}.recorder-buttons{align-items:center;gap:1rem;margin-bottom:.35rem;display:flex}.recorder-record,.recorder-stop{padding:.75rem 1.4rem;font-size:1.1rem}.recorder-stop{background:var(--error)}.recorder-timer{font-variant-numeric:tabular-nums;font-size:1.5rem;font-weight:600}.recorder-timer-done{color:#b45309}.recorder-level{background:#eee2d3;border-radius:5px;width:100%;height:10px;margin:.25rem 0;overflow:hidden}.recorder-level-fill{background:#3f8f4a;width:0%;height:100%;transition:width 60ms linear}.recorder-level-hint{display:block}.recorder-take{margin:.75rem 0}.recorder-take audio{width:100%;margin-top:.25rem;display:block}.recorder-error{margin:.75rem 0}.recorder-upload-toggle{margin:.5rem 0}button.link-button{color:var(--accent);background:0 0;border:0;padding:0;font-size:.95rem;text-decoration:underline}.recorder-passage{background:#f5f5f5;border-radius:6px;max-height:55vh;margin-top:.5rem;padding:.75rem 1rem;font-size:1.2rem;line-height:1.6;overflow-y:auto}.recorder-passage p{margin:0 0 .4rem}.recorder-upload{margin:.5rem 0 1rem}.table-scroll{overflow-x:auto}.story-onboarding .muted{color:#6b625a}.visually-hidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.story-onboarding progress{accent-color:#3f8f4a;width:100%;height:12px}.story-progress{margin:.25rem 0;font-size:1.15rem}.story-reassure{margin:.5rem 0 .75rem}.story-notice{color:#275c2f;font-weight:600}button.story-big{width:100%;min-height:3.25rem;margin:.5rem 0;padding:.8rem 1rem;font-size:1.15rem;display:block}.story-actions{flex-wrap:wrap;gap:0 .75rem;display:flex}.story-actions button.story-big{flex:12rem;width:auto}.story-list{margin-top:.75rem}.story-list summary{cursor:pointer;padding:.5rem 0;font-weight:600}.story-list ol{margin:0;padding:0;list-style:none}.story-list li{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:.75rem;padding:.4rem 0;display:flex}.story-list li button{flex-shrink:0;min-width:7.5rem;min-height:2.75rem}.story-list-title{overflow-wrap:anywhere;min-width:0}
