:root { --accent: #0F766E; --text: #111827; --muted: #6B7280; --bg: #F3F4F6; --card: #FFFFFF; --border: #E5E7EB; --err: #B91C1C; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; }
.bg { position: fixed; inset: 0; background-size: cover; background-position: center; z-index: -1; filter: brightness(.55); }
.brand { display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-weight: 800; font-size: 18px; max-width: 560px; margin: 0 auto; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 15px; }
.card { background: var(--card); max-width: 560px; margin: 0 auto 16px; padding: 20px 16px; border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.center { text-align: center; }
#app > section { display: none; }
#app[data-state="loading"] > [data-show="loading"], #app[data-state="unavailable"] > [data-show="unavailable"],
#app[data-state="error"] > [data-show="error"], #app[data-state="landing"] > [data-show="landing"],
#app[data-state="book"] > [data-show="book"], #app[data-state="done"] > [data-show="done"] { display: block; }
h1 { font-size: 22px; margin: 8px 0; } h2 { font-size: 17px; margin: 20px 0 8px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.cover { width: 100%; height: 140px; object-fit: cover; border-radius: 12px; }
.photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 8px auto; display: block; border: 3px solid #fff; background: #ddd; }
.cover:not([hidden]) + .photo { margin-top: -48px; }
.initial { display: grid; place-items: center; font-size: 36px; font-weight: 800; color: #fff; background: var(--accent); }
.chip { display: inline-block; color: #047857; background: #ECFDF5; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.btn { display: block; width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; display: grid; place-items: center; cursor: pointer; margin-top: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.link { background: none; border: 0; color: var(--accent); font-weight: 700; font-size: 15px; padding: 10px 4px; cursor: pointer; text-decoration: none; display: inline-block; min-height: 44px; min-width: 44px; }
.stack { display: grid; gap: 4px; margin-top: 16px; }
.options { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; }
.opt span { display: grid; } .opt small { color: var(--muted); }
.opt:has(input:checked) { border-color: var(--accent); }
input, textarea { width: 100%; font: inherit; padding: 12px; border: 1.5px solid var(--border); border-radius: 12px; margin: 6px 0; background: #fff; }
input[type="radio"] { width: auto; margin-top: 4px; accent-color: var(--accent); }
.lbl { display: block; font-weight: 700; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chips button { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--border); background: #fff; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.notice { background: var(--bg); border-radius: 12px; padding: 12px; font-weight: 700; }
.err { color: var(--err); font-weight: 600; min-height: 1em; }
.ts { margin: 12px 0; min-height: 65px; }
.foot { text-align: center; padding: 16px; font-size: 13px; color: var(--muted); }
.foot a { color: inherit; }
.bg:not([hidden]) ~ .brand { color: #fff; }
.spinner { width: 36px; height: 36px; border: 4px solid var(--border); border-top-color: var(--accent); border-radius: 50%; margin: 12px auto; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
