/* Neuroaesthetic Reset Studio v2. Cormorant + Jost, plum/blush/teal; --acc = her archetype color. */
:root {
  --plum: #5C1A5E; --ink: #2E1A30; --muted: #6E5A6F; --blush: #FFF8FA; --line: #EEDFE8; --teal: #0F8080;
  --acc: #5C1A5E; --acc-soft: #F4E9F1; --card: #fff; --r: 22px; --shadow: 0 10px 30px rgba(46,26,48,.08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { overflow-x: hidden; }
html, body { margin: 0; }
body { background: var(--blush); color: var(--ink); font-family: 'Jost', system-ui, sans-serif; font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; line-height: 1.12; margin: 0 0 .35em; }
p { margin: 0 0 .7em; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); } .small { font-size: .92rem; } .fine { font-size: .8rem; } .center { text-align: center; }
#app { max-width: 560px; margin: 0 auto; padding: 0 16px 24px; }
.view[hidden] { display: none !important; }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; background: rgba(255,248,250,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brandmark { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.08rem; color: var(--plum); letter-spacing: .01em; }
.brandmark em { font-style: italic; font-weight: 500; color: var(--acc); }
.arch-chip { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 500; padding: 4px 10px 4px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.arch-chip i { width: 14px; height: 14px; border-radius: 50%; background: var(--acc); }

/* HERO */
.hero { position: relative; margin: 14px -4px 16px; border-radius: 28px; overflow: hidden; min-height: 300px; display: flex; align-items: flex-end;
  background: linear-gradient(180deg, rgba(46,26,48,0) 25%, rgba(46,26,48,.82) 100%), var(--img) center 30% / cover no-repeat, var(--plum); box-shadow: var(--shadow); color: #fff; }
.hero-sm { min-height: 220px; }
.hero-in { padding: 22px 22px 20px; width: 100%; }
.hero h1 { font-size: 2.15rem; color: #fff; }
.hero p { color: rgba(255,255,255,.9); margin: 0; }
.kicker { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; margin: 0 0 .4em; opacity: .9; }
.pages-pill { display: inline-block; margin-top: 8px !important; font-size: .82rem; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); }
.ring-row { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.ring { width: 58px; height: 58px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,.25); stroke-width: 5; }
.ring-fg { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 119.4; stroke-dashoffset: 119.4; transition: stroke-dashoffset 1s ease; }
.ring-row strong { display: block; font-size: 1.5rem; font-family: 'Jost', sans-serif; font-weight: 600; }
.ring-row span { font-size: .85rem; opacity: .9; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 14px; }
.stat { background: #fff; border-radius: 18px; padding: 14px 8px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--line); }
.stat b { display: block; font-family: 'Jost', sans-serif; font-weight: 600; font-variant-numeric: lining-nums; font-size: 1.8rem; color: var(--acc); line-height: 1; }
.stat span { font-size: .76rem; color: var(--muted); }

.next-card { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border: 0; cursor: pointer; background: #fff; border-radius: var(--r); padding: 10px 16px 10px 10px; box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 14px; }
.nc-img { flex: none; width: 76px; height: 76px; border-radius: 16px; background: var(--acc-soft) center / cover; }
.nc-body { flex: 1; display: flex; flex-direction: column; }
.nc-body .kicker { color: var(--teal); opacity: 1; }
.nc-body strong { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; line-height: 1.15; }
.nc-go { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: #fff; font-size: 1.1rem; }

.tiles { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.tile { min-width: 0; }
.tile { border: 0; padding: 0; text-align: left; cursor: pointer; background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; }
.kit-tile { grid-column: 1 / -1; }
.tile-img { display: block; aspect-ratio: 16 / 10; background: var(--acc-soft) center / cover; }
.kit-tile .tile-img { aspect-ratio: 16 / 8; }
.tile-body { padding: 12px 14px 14px; display: flex; flex-direction: column; }
.tile-body strong { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; }
.tile-body .muted { font-size: .85rem; }
.ai-note { font-size: .82rem; color: var(--muted); text-align: center; margin: 18px 8px 0; }
.lede { font-size: 1.02rem; color: var(--muted); margin: 0 4px 14px; }

/* TIMELINE */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 27px; top: 20px; bottom: 30px; width: 2px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 12px); }
.tl-item { position: relative; display: flex; gap: 14px; margin-bottom: 14px; }
.tl-node { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); z-index: 1; position: relative; color: var(--muted); }
.tl-node svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tl-node.done { background: var(--acc); border-color: var(--acc); color: #fff; }
.tl-node.next { border-color: var(--acc); color: var(--acc); box-shadow: 0 0 0 6px var(--acc-soft); }
.tl-node .check { position: absolute; right: -2px; top: -2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: var(--acc); font-size: .75rem; display: grid; place-items: center; border: 1.5px solid var(--acc); }
.tl-card { flex: 1; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; text-align: left; cursor: pointer; padding: 0; }
.tl-card .tl-img { display: block; height: 110px; background: center / cover; }
.tl-body { padding: 14px 16px 16px; }
.tl-body h3 { font-size: 1.3rem; margin-bottom: .2em; }
.tl-meta { font-size: .82rem; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.status { font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--acc-soft); color: var(--acc); }
.status.done { background: #E8F3EA; color: #2F6B3A; }
.bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--acc); border-radius: 999px; transition: width .8s ease; }
.cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 600; font-size: .9rem; color: #fff; background: var(--acc); padding: 8px 16px; border-radius: 999px; }
.intro-card { background: #fff; border-radius: var(--r); padding: 18px 18px 14px; box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 18px; }
.intro-card h2 { font-size: 1.45rem; color: var(--plum); }
.intro-card p { color: var(--muted); }

/* WIZARD */
.wizard { min-height: calc(100vh - 160px); display: flex; flex-direction: column; padding-top: 12px; }
.wz-top, .deck-top { display: flex; align-items: center; gap: 12px; margin: 8px 0 10px; }
.icon-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.2rem; display: grid; place-items: center; color: var(--plum); }
#wz-info { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 700; }
.wz-bar { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.wz-bar i { display: block; height: 100%; width: 0; background: var(--acc); border-radius: 999px; transition: width .4s ease; }
.wz-count { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 6px 0 10px; }
.wz-card { background: #fff; border-radius: 26px; padding: 22px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); animation: rise .35s ease both; flex: 1; }
.wz-lead { font-size: .92rem; color: var(--teal); font-weight: 500; margin-bottom: 6px; }
.wz-q { font-family: 'Cormorant Garamond', serif; font-size: 1.65rem; line-height: 1.2; font-weight: 600; margin: 0 0 16px; color: var(--ink); }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 15px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; min-height: 56px; transition: border-color .15s, background .15s, transform .1s; }
.opt:active { transform: scale(.99); }
.opt .dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.opt.multi .dot { border-radius: 7px; }
.opt[aria-pressed=true] { border-color: var(--acc); background: var(--acc-soft); }
.opt[aria-pressed=true] .dot { border-color: var(--acc); background: var(--acc); }
.opt[aria-pressed=true] .dot::after { content: '\2713'; color: #fff; font-size: .75rem; }
.opt .swatch { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.wz-text { width: 100%; min-height: 150px; font: inherit; font-size: 1.05rem; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; resize: vertical; color: var(--ink); background: #fff; }
.wz-text:focus, .notes:focus, #ch-in:focus, input:focus { outline: 3px solid rgba(15,128,128,.25); border-color: var(--teal); }
.wz-hint { font-size: .88rem; color: var(--muted); margin: 10px 2px 0; }
.wz-foot { position: sticky; bottom: 86px; display: flex; gap: 10px; padding: 14px 0 4px; background: linear-gradient(transparent, var(--blush) 30%); }
.btn { border: 0; border-radius: 999px; padding: 15px 22px; font-weight: 600; cursor: pointer; min-height: 52px; }
.btn-main { flex: 1; background: var(--plum); color: #fff; box-shadow: 0 8px 20px rgba(92,26,94,.25); width: 100%; }
.btn-main:disabled { opacity: .45; box-shadow: none; }
.btn-ghost { background: #fff; color: var(--plum); border: 1.5px solid var(--line); }
.btn-done { width: 100%; margin-top: 10px; background: var(--teal); color: #fff; }
.link { background: none; border: 0; color: var(--plum); text-decoration: underline; cursor: pointer; padding: 8px; }
.link.quiet { color: var(--muted); }
.link.inline { padding: 0; font-size: inherit; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* THINKING */
.center-view { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--plum); animation: spin 1s linear infinite; margin-bottom: 12px; }
.think-orb { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--acc) 60%, var(--plum)); animation: breathe 4s ease-in-out infinite; box-shadow: 0 0 60px var(--acc-soft); margin-bottom: 22px; }
.think-line { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--plum); min-height: 1.6em; transition: opacity .4s; }
@keyframes breathe { 0%,100% { transform: scale(.88); } 50% { transform: scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* DECK */
.deck-title { flex: 1; font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.2rem; text-align: center; }
.deck-count { flex: none; width: 40px; font-size: .82rem; color: var(--muted); text-align: right; }
.deck { position: relative; min-height: 380px; }
.dcard { background: #fff; border-radius: 28px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 26px 22px; animation: rise .35s ease both; overflow: hidden; }
.dcard .dk-kind { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); font-weight: 600; margin-bottom: 8px; }
.dcard h2 { font-size: 1.9rem; color: var(--plum); }
.dcard p { font-size: 1.08rem; }
.dcard.welcome { background: linear-gradient(160deg, var(--acc), var(--plum)); color: #fff; }
.dcard.welcome h2, .dcard.welcome .dk-kind { color: #fff; }
.dcard.affirm { text-align: center; background: var(--acc-soft); }
.dcard.affirm p { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-style: italic; line-height: 1.3; }
.steps { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.steps button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
.steps .tick { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .8rem; color: transparent; }
.steps button[aria-pressed=true] { background: #EEF7F0; border-color: #9CC9A6; }
.steps button[aria-pressed=true] .tick { background: #3F8A52; border-color: #3F8A52; color: #fff; }
.page-thumb { display: block; width: 100%; margin-top: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--acc-soft); min-height: 200px; object-fit: cover; cursor: zoom-in; }
.swatches { display: flex; gap: 10px; margin-top: 12px; }
.swatches i { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.choices { display: grid; gap: 10px; margin-top: 14px; }
.choices .btn { width: 100%; }
.dots { display: flex; justify-content: center; gap: 7px; margin: 14px 0 0; }
.dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: all .25s; }
.dots i.on { width: 24px; background: var(--acc); }

/* NOTES */
.notes { width: 100%; font: inherit; font-size: 1rem; line-height: 1.6; padding: 16px; border: 1.5px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: .88rem; cursor: pointer; }
.chip:hover { border-color: var(--acc); }
.chip::before { content: '\2726  '; color: var(--acc); }
.msg { min-height: 1.2em; color: var(--plum); font-size: .92rem; }

/* COMPANION */
.threads { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.threads button { width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow); }
.threads strong { display: block; }
.threads span { font-size: .8rem; color: var(--muted); }
.chat-view { display: flex; flex-direction: column; min-height: calc(100vh - 170px); }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 6px 0 12px; }
.bubble { max-width: 88%; padding: 12px 15px; border-radius: 20px; line-height: 1.5; animation: rise .3s ease both; }
.bubble p { margin: 0 0 .55em; } .bubble p:last-child { margin: 0; }
.bubble ul { margin: 0 0 .5em; padding-left: 1.1em; }
.from-her { align-self: flex-end; background: var(--plum); color: #fff; border-bottom-right-radius: 6px; }
.from-guide { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.status-line { align-self: flex-start; font-size: .85rem; color: var(--teal); font-style: italic; padding: 4px 6px; }
.chat-form { position: fixed; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 35; max-width: 560px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; background: var(--blush); padding: 10px 16px; border-top: 1px solid var(--line); }
body:has(#v-chat:not([hidden])) .foot { display: none; }
.chat-log { padding-bottom: calc(230px + env(safe-area-inset-bottom)) !important; }
#ch-in { min-height: 48px; }
#ch-in { flex: 1; font: inherit; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 22px; resize: none; max-height: 140px; background: #fff; color: var(--ink); }
.send { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--plum); color: #fff; font-size: 1.2rem; cursor: pointer; }

/* SIGN-IN */
.panel { background: #fff; border-radius: var(--r); padding: 20px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.panel label { display: block; font-weight: 500; margin: 10px 0 6px; }
.panel input { width: 100%; font: inherit; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; }
.panel .btn-main { margin-top: 16px; }
.row-links { display: flex; flex-direction: column; align-items: center; margin-top: 6px; }

/* TABBAR + FOOTER */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr); max-width: 560px; margin: 0 auto; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; color: var(--muted); font-size: .74rem; font-weight: 500; padding: 6px; border-radius: 14px; cursor: pointer; min-height: 54px; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current=page] { color: var(--plum); background: var(--acc-soft); }
.foot { max-width: 560px; margin: 0 auto; padding: 0 20px 110px; font-size: .82rem; color: var(--muted); }
.foot a { color: var(--muted); }

.dlg { border: 0; border-radius: 24px; padding: 22px; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dlg::backdrop { background: rgba(46,26,48,.45); }
.dlg h3 { font-size: 1.5rem; color: var(--plum); }
.page-dlg { padding: 12px; max-width: 640px; }
.page-dlg img { width: 100%; border-radius: 14px; display: block; margin-bottom: 10px; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (min-width: 520px) { .opts.grid2 { grid-template-columns: 1fr 1fr; } }
.swatches { align-items: center; } #confetti { display: none; }
.tl-card .tl-img { background-position: center 22%; }

.hero-face { background-position: center, center 40% !important; background: linear-gradient(180deg, rgba(46,26,48,0) 35%, rgba(46,26,48,.8) 100%), var(--img) center 38% / cover no-repeat, var(--plum); min-height: 300px; }

.chat-page { margin: 10px 0 2px; }
.chat-page img { width: 100%; border-radius: 14px; border: 1px solid var(--line); display: block; cursor: zoom-in; min-height: 120px; background: var(--acc-soft); }
.chat-page figcaption { font-size: .78rem; color: var(--muted); margin-top: 6px; }
