/* The Retelling -- self-contained stylesheet (deliberately not shared with ../../public-site/public/css/site.css
   so this process stays decoupled, per the "keep these as distinct features" instruction). Palette tokens are
   duplicated from Living Art's house look on purpose -- same brand family, independent file. */
:root{
  /* atmospheric generation-flow palette (UNCHANGED, 2026-11-04 re-theme) --
     the whole below-the-fold flow here (mode-btn/panel/progress/mic-btn/
     result) is the generation experience itself (voice journal -> live
     FLUX image), kept dark/atmospheric same as every other habitat's
     viewer per the color bible's "dark frame around generated artwork"
     allowance. Only header/nav/h1/lede/footer below switch to the new
     light chrome tokens, matching every other Living Art page. */
  --bg:#0b1410; --bg2:#0a1c17; --card:#122a24; --card2:#0f2420; --line:#2a5248;
  --amber:#e8b964; --leaf:#6fae5c; --ink:#e9f3ee; --mute:#9fb8ac; --bad:#d97a6c;
  --r:14px;
  --jx-bg:#FFFFFF; --jx-primary:#3B1F6B; --jx-primary-hover:#5A3394;
  --jx-accent-text:#0F766E; --jx-text:#121117; --jx-text-secondary:#6B6974;
  /* No @import/webfont <link> here on purpose: this server's CSP is
     style-src 'self' 'unsafe-inline' only (see retelling/server.mjs), so a
     remote fonts.googleapis.com stylesheet would be blocked and log a CSP
     console error. System-font fallbacks read close enough. */
  --font-sans:'Segoe UI',Roboto,'Helvetica Neue',Arial,system-ui,-apple-system,sans-serif;
  --font-display:'Segoe UI',Roboto,Arial,system-ui,-apple-system,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);font-family:Georgia,'Iowan Old Style',serif;min-height:100%}
a{color:var(--amber)}
.wrap{max-width:720px;margin:0 auto;padding:0 16px 64px}
header.site{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px;max-width:100%;margin:0;background:var(--jx-primary);border-bottom:none;position:sticky;top:0;z-index:50}
.brand{display:flex;align-items:baseline;gap:10px;text-decoration:none;color:#fff}
.brand .mark{font-size:1.4rem}
.brand .name{font-weight:700;font-size:1.15rem;letter-spacing:.02em;color:#fff;font-family:var(--font-display)}
.brand .tagline{font-size:.72rem;color:rgba(255,255,255,0.75);font-weight:400;letter-spacing:.03em}
nav.main a{text-decoration:none;color:rgba(255,255,255,0.85);font-size:.85rem;margin-left:16px}
nav.main a:hover{color:#fff;text-decoration:underline}

/* NOT switched to dark/jx-text here, deliberately: unlike the rest of Living
   Art, this page's whole body stays on the dark atmospheric --bg canvas (the
   voice-journal flow IS the generation experience, start to finish) -- only
   the opaque header/nav/footer above/below got the light-chrome treatment. */
h1.page-title{font-size:1.5rem;margin:26px 0 6px;color:#f4ead6;font-family:var(--font-display)}
p.lede{color:var(--mute);font-size:.92rem;line-height:1.55}

.modes{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:22px 0}
.mode-btn{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:20px 16px;text-align:left;color:var(--ink);cursor:pointer;font-family:inherit;font-size:1rem;display:flex;flex-direction:column;gap:6px}
.mode-btn:hover{border-color:var(--amber)}
.mode-btn .icon{font-size:1.5rem}
.mode-btn .sub{font-size:.78rem;color:var(--mute);font-weight:400}

.panel{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:22px;margin:22px 0}
.progress{display:flex;gap:6px;margin-bottom:16px}
.progress .dot{height:5px;flex:1;border-radius:3px;background:var(--line)}
.progress .dot.done{background:var(--leaf)}
.progress .dot.active{background:var(--amber)}

.question{font-size:1.15rem;color:#f4ead6;margin:0 0 14px;line-height:1.4}
.answer-row{display:flex;gap:10px;align-items:flex-start}
textarea.answer{flex:1;min-height:78px;background:var(--card2);border:1px solid var(--line);border-radius:10px;color:var(--ink);font-family:inherit;font-size:.95rem;padding:10px 12px;resize:vertical}
textarea.answer:focus{outline:none;border-color:var(--amber)}

button{font-family:inherit;cursor:pointer}
.mic-btn{width:52px;height:52px;flex:0 0 auto;border-radius:50%;border:1px solid var(--line);background:var(--card2);color:var(--amber);font-size:1.3rem;display:flex;align-items:center;justify-content:center}
.mic-btn.listening{background:var(--amber);color:#1a1008;border-color:var(--amber);animation:pulse 1.2s infinite}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(232,185,100,.5)}70%{box-shadow:0 0 0 12px rgba(232,185,100,0)}100%{box-shadow:0 0 0 0 rgba(232,185,100,0)}}
.hint{font-size:.76rem;color:var(--mute);margin-top:8px}
.optional-tag{font-size:.7rem;color:var(--mute);text-transform:uppercase;letter-spacing:.05em;margin-left:8px}

.nav-row{display:flex;justify-content:space-between;margin-top:18px;gap:10px}
.btn{background:var(--card2);border:1px solid var(--line);color:var(--ink);border-radius:10px;padding:10px 18px;font-size:.9rem}
.btn:hover{border-color:var(--amber)}
.btn.primary{background:var(--amber);color:#1a1008;border-color:var(--amber);font-weight:600}
.btn.primary:disabled{opacity:.5;cursor:default}
.btn:disabled{opacity:.5;cursor:default}

.loading{text-align:center;padding:40px 10px}
.loading .spinner{width:46px;height:46px;border:4px solid var(--line);border-top-color:var(--amber);border-radius:50%;margin:0 auto 18px;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.loading .elapsed{color:var(--mute);font-size:.85rem;margin-top:8px}
.loading .note{color:var(--mute);font-size:.8rem;margin-top:14px;max-width:420px;margin-left:auto;margin-right:auto;line-height:1.5}

.result img{width:100%;border-radius:var(--r);border:1px solid var(--line);display:block}
.result .scene{font-size:.88rem;color:var(--mute);line-height:1.6;margin:14px 0}
.result .meta{font-size:.72rem;color:var(--mute);margin-top:8px}
details.prompt-detail{margin-top:10px;font-size:.78rem;color:var(--mute)}
details.prompt-detail summary{cursor:pointer;color:var(--amber)}
details.prompt-detail .final-prompt{white-space:pre-wrap;margin-top:8px;line-height:1.5}

.error-box{background:#2a1512;border:1px solid var(--bad);border-radius:10px;padding:14px 16px;color:#f2cfc8;font-size:.88rem;margin:14px 0}

.recent h3{font-size:.9rem;color:var(--mute);text-transform:uppercase;letter-spacing:.04em;margin:34px 0 10px}
.recent-strip{display:flex;gap:10px;overflow-x:auto;padding-bottom:6px}
.recent-strip .item{flex:0 0 auto;width:92px}
.recent-strip img{width:92px;height:92px;object-fit:cover;border-radius:10px;border:1px solid var(--line)}
.recent-strip .item .m{font-size:.65rem;color:var(--mute);margin-top:4px;text-align:center}

footer.site{max-width:720px;margin:40px auto 0;padding:18px 16px 36px;border-top:1px solid var(--line);color:var(--mute);font-size:.78rem}
footer.site a{color:var(--mute)}
