:root {
  color-scheme: dark;
  --bg: #0d0e12;
  --surface: #15161b;
  --raised: #1b1d23;
  --interactive: #22252d;
  --field: #101116;
  --line: rgb(255 255 255 / 8%);
  --line-strong: rgb(255 255 255 / 14%);
  --text: #f5f3ee;
  --muted: #9a9da7;
  --dim: #858994;
  --gold: #c9a86a;
  --gold-hover: #ddc186;
  --gold-wash: rgb(201 168 106 / 10%);
  --violet: #9d8ee5;
  --violet-wash: rgb(91 78 154 / 22%);
  --green: #79c999;
  --danger: #e5898e;
  --radius: 20px;
  --focus: #f0cf8d;
  font-family: Estedad, Vazirmatn, Tahoma, Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { overflow-x: hidden; margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); line-height: 1.5; }
body::before { position: fixed; z-index: -1; inset: 0; content: ''; pointer-events: none; background: radial-gradient(circle at 85% -10%, rgb(73 61 128 / 20%), transparent 32rem), radial-gradient(circle at 5% 85%, rgb(201 168 106 / 7%), transparent 28rem); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 1000; top: 8px; right: 8px; padding: 10px 14px; border-radius: 10px; color: #211b14; background: var(--focus); font-size: 13px; font-weight: 800; transform: translateY(-160%); transition: transform 150ms ease; }
.skip-link:focus { outline-color: var(--text); transform: translateY(0); }

.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-lockup-link { justify-content: center; }
.brand-lockup { display: block; flex: 0 0 auto; width: 82px; height: auto; border: 0; border-radius: 0; object-fit: contain; background: transparent; box-shadow: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; padding: 10px 18px; border: 1px solid transparent; border-radius: 13px; font-size: 13px; font-weight: 800; transition: 160ms ease; }
.button.primary { color: #211b14; background: var(--gold); box-shadow: 0 10px 30px rgb(201 168 106 / 12%); }
.button.primary:hover { background: var(--gold-hover); transform: translateY(-1px); }
.button.primary:active { transform: translateY(0); }
.button.secondary, .button.ghost { border-color: var(--line-strong); background: var(--raised); }
.button.secondary:hover, .button.ghost:hover { border-color: rgb(201 168 106 / 35%); background: var(--interactive); }
.button.text { min-height: 38px; color: var(--muted); background: transparent; }
.button.text:hover { color: var(--text); }
.button.small { min-height: 44px; padding: 8px 13px; border-radius: 11px; font-size: 12px; }
.button.full { width: 100%; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--gold); font-size: 12px; font-weight: 900; letter-spacing: .01em; }
.eyebrow::before { width: 15px; height: 1px; content: ''; background: currentColor; }

/* Public landing */
.landing-shell { width: min(1180px, calc(100% - 32px)); margin: auto; }
.landing-nav { display: flex; min-height: 82px; align-items: center; justify-content: space-between; }
.hero { display: grid; min-height: calc(100vh - 140px); align-items: center; gap: 44px; padding: 54px 0 78px; }
.hero-copy h1 { max-width: 720px; margin: 16px 0; font-size: clamp(34px, 8.5vw, 62px); line-height: 1.32; letter-spacing: -.045em; }
.hero-copy > p { max-width: 650px; margin: 0; color: var(--muted); font-size: 15px; line-height: 2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 28px; color: var(--muted); font-size: 12px; }
.trust-row span::before { margin-left: 6px; color: var(--green); content: '✓'; }
.hero-preview { overflow: hidden; width: 100%; max-width: 510px; margin-inline: auto; border: 1px solid var(--line-strong); border-radius: 24px; background: rgb(21 22 27 / 88%); box-shadow: 0 35px 100px rgb(0 0 0 / 38%); transform: perspective(1000px) rotateX(1.5deg); }
.preview-bar { display: flex; align-items: center; gap: 6px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: var(--field); }
.preview-bar span { width: 7px; height: 7px; border-radius: 50%; background: #3c3e47; }
.preview-bar b { margin-right: auto; color: var(--muted); font-size: 11px; }
.preview-content { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.preview-card { min-height: 116px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--raised); }
.preview-card.highlight { background: linear-gradient(145deg, var(--gold-wash), var(--raised)); }
.preview-card small, .preview-card span { display: block; color: var(--muted); font-size: 11px; }
.preview-card strong { display: block; margin: 12px 0 7px; font-size: 21px; }
.preview-session { display: flex; grid-column: 1 / -1; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); }
.preview-session i { width: 8px; height: 35px; border-radius: 8px; background: var(--gold); }
.preview-session i.violet { background: var(--violet); }
.preview-session span { min-width: 0; }
.preview-session strong, .preview-session small { display: block; }
.preview-session strong { font-size: 12px; }
.preview-session small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.preview-session b { margin-right: auto; color: var(--gold); }
.feature-section { padding: 88px 0; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 32px; }
.section-heading h2 { margin: 10px 0 0; font-size: clamp(25px, 5vw, 40px); }
.feature-grid { display: grid; gap: 12px; }
.feature-grid article { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.feature-grid article > span { color: var(--gold); font-size: 12px; }
.feature-grid h3 { margin: 18px 0 9px; font-size: 17px; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.landing-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.landing-footer a:hover { color: var(--text); }

/* Public privacy policy */
.policy-shell { width: min(960px, calc(100% - 32px)); margin: auto; }
.policy-nav { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 16px; }
.policy-page { padding: 40px 0 72px; }
.policy-hero { max-width: 760px; margin-bottom: 28px; }
.policy-hero h1 { margin: 14px 0 12px; font-size: clamp(32px, 7vw, 52px); line-height: 1.35; }
.policy-hero > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 2; }
.policy-hero .policy-updated { margin-top: 12px; color: var(--dim); font-size: 12px; }
.policy-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.policy-toc a { min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 11px; }
.policy-toc a:hover { border-color: rgb(201 168 106 / 35%); color: var(--text); }
.policy-card { padding: clamp(20px, 4vw, 42px); border: 1px solid var(--line-strong); border-radius: 24px; background: var(--surface); box-shadow: 0 26px 80px rgb(0 0 0 / 18%); }
.policy-card h2 { scroll-margin-top: 20px; margin: 38px 0 12px; font-size: 20px; line-height: 1.7; }
.policy-card h2:first-child { margin-top: 0; }
.policy-card h3 { margin: 26px 0 8px; color: #e5d7b9; font-size: 15px; }
.policy-card p, .policy-card li { color: #c6c7cc; font-size: 13px; line-height: 2.05; }
.policy-card p { margin: 0 0 14px; }
.policy-card ul { margin: 8px 0 18px; padding-inline-start: 24px; }
.policy-card li { margin-bottom: 7px; }
.policy-card a { color: var(--gold-hover); text-decoration: underline; text-decoration-color: rgb(221 193 134 / 35%); text-underline-offset: 4px; }
.policy-card code, .policy-card bdi { direction: ltr; unicode-bidi: isolate; }
.policy-card code { padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; color: #e5d7b9; background: var(--field); }
.policy-language-divider { display: flex; align-items: center; gap: 16px; margin: 38px 0; color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.policy-language-divider::before, .policy-language-divider::after { height: 1px; flex: 1; content: ''; background: var(--line); }
.policy-english { text-align: left; }
.policy-english p, .policy-english li { line-height: 1.85; }
.policy-footer { margin-top: 0; }

/* Authentication */
.auth-page { display: grid; min-height: 100vh; align-content: center; padding: 32px 16px; }
.auth-brand { margin: 0 auto 24px; }
.auth-card { width: min(100%, 440px); margin: 0 auto; padding: 24px; border: 1px solid var(--line-strong); border-radius: 24px; background: var(--surface); box-shadow: 0 30px 90px rgb(0 0 0 / 30%); }
.auth-intro h1 { margin: 10px 0 7px; font-size: 25px; }
.auth-intro p { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.stack-form { display: grid; gap: 14px; }
label > span { display: block; margin-bottom: 7px; color: #d8d8dc; font-size: 13px; font-weight: 700; }
input, textarea, select { width: 100%; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 12px; outline: none; background: var(--field); padding: 10px 12px; font-size: 16px; line-height: 1.7; transition: 150ms ease; }
input:focus, textarea:focus, select:focus { border-color: rgb(201 168 106 / 70%); box-shadow: 0 0 0 3px var(--gold-wash); }
input:disabled { color: var(--dim); }
textarea { resize: vertical; }
.otp-input { direction: ltr; text-align: center; font-size: 23px; letter-spacing: .5em; }
.auth-note { display: block; margin-top: 20px; color: var(--muted); font-size: 11px; line-height: 1.9; text-align: center; }
.auth-note a { color: var(--gold-hover); text-decoration: underline; text-underline-offset: 3px; }
.alert { margin: 0 0 16px; padding: 12px 14px; border: 1px solid; border-radius: 12px; font-size: 13px; line-height: 1.8; }
.alert.error { border-color: rgb(229 137 142 / 28%); color: #f1a1a7; background: rgb(120 43 50 / 18%); }
.alert.info { border-color: rgb(157 142 229 / 28%); color: #c3b9f1; background: var(--violet-wash); }
.alert.success { border-color: rgb(121 201 153 / 28%); color: #98ddb4; background: rgb(39 100 64 / 18%); }

/* Application shell */
.app-shell { min-height: 100vh; }
.sidebar { display: none; }
.sidebar-privacy { display: block; margin: 4px 20px 14px; color: var(--dim); font-size: 10px; text-align: center; }
.sidebar-privacy:hover { color: var(--text); }
.app-main { min-width: 0; padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
.mobile-header { position: sticky; z-index: 20; top: 0; display: flex; height: 64px; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgb(13 14 18 / 88%); backdrop-filter: blur(16px); }
.brand.compact { gap: 8px; }
.brand.compact .brand-lockup { width: 48px; border-radius: 7px; }
.brand.compact strong { font-size: 14px; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-style: normal; }
.status-dot::before { width: 6px; height: 6px; border-radius: 50%; content: ''; background: var(--green); box-shadow: 0 0 0 3px rgb(121 201 153 / 10%); }
.status-dot.status-expired::before, .status-dot.status-canceled::before, .status-dot.status-failed::before { background: #e5898e; box-shadow: 0 0 0 3px rgb(229 137 142 / 10%); }
.status-dot.status-pending::before { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
.status-dot.status-none::before { background: var(--dim); box-shadow: 0 0 0 3px rgb(255 255 255 / 5%); }
.bottom-nav { position: fixed; z-index: 30; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); left: 8px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 5px; border: 1px solid var(--line-strong); border-radius: 18px; background: rgb(21 22 27 / 96%); box-shadow: 0 15px 45px rgb(0 0 0 / 35%); backdrop-filter: blur(18px); }
.bottom-nav a { display: grid; min-height: 48px; place-content: center; gap: 3px; border-radius: 12px; color: var(--dim); text-align: center; }
.bottom-nav a.active { color: var(--gold); background: var(--gold-wash); }
.bottom-nav b { font-size: 15px; }
.bottom-nav span { overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.page-wrap { width: min(100%, 1120px); margin: auto; padding: 24px 14px 36px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { margin: 8px 0 3px; font-size: clamp(25px, 7vw, 38px); letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.compact-heading { align-items: center; }
.desktop-action { display: none; }

/* Dashboard */
.dashboard-page { padding-top: 20px; }
.dashboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.dashboard-heading h1 { margin: 7px 0 4px; font-size: clamp(26px, 8vw, 40px); line-height: 1.35; letter-spacing: -.035em; }
.dashboard-heading h1 span { display: inline-block; font-size: .75em; transform: rotate(-8deg); }
.dashboard-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.notification-button { position: relative; display: grid; flex: 0 0 auto; width: 46px; height: 46px; place-items: center; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--gold); background: linear-gradient(145deg, var(--gold-wash), var(--surface)); font-size: 22px; }
.notification-button i { position: absolute; top: 9px; right: 10px; width: 6px; height: 6px; border: 1px solid var(--surface); border-radius: 50%; background: var(--gold); }

.stat-grid { display: grid; gap: 10px; }
.stat-card { display: flex; min-height: 118px; align-items: flex-start; gap: 13px; padding: 17px; border: 1px solid var(--line-strong); border-radius: 20px; background: linear-gradient(145deg, rgb(27 29 35 / 72%), rgb(17 18 23 / 78%)); }
.stat-card.gold { background: linear-gradient(140deg, var(--gold-wash), var(--surface) 70%); }
.stat-icon { display: grid; flex: 0 0 auto; width: 42px; height: 42px; place-items: center; border: 1px solid rgb(201 168 106 / 18%); border-radius: 50%; color: var(--gold); background: var(--gold-wash); font-size: 17px; }
.stat-icon.people { color: #e0b75f; background: rgb(160 115 39 / 13%); }
.stat-icon.violet { color: var(--violet); background: var(--violet-wash); }
.stat-icon.green { color: var(--green); background: rgb(121 201 153 / 10%); }
.stat-card small, .stat-card p { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin: 5px 0 1px; font-size: 27px; line-height: 1.25; }
.stat-card p { margin: 0; }
.companion-picker { margin-top: 14px; padding: 18px 14px; border: 1px solid var(--line-strong); border-radius: 22px; background: linear-gradient(150deg, rgb(25 27 33 / 88%), rgb(14 15 20 / 78%)); box-shadow: inset 0 1px rgb(255 255 255 / 2%); }
.companion-heading { align-items: flex-start; margin-bottom: 16px; }
.companion-heading h2 { font-size: 19px; }
.companion-heading p { max-width: 560px; font-size: 12px; line-height: 1.8; }
.companion-heading > a { display: none; }
.companion-grid { display: grid; gap: 10px; }
.companion-option { position: relative; display: grid; min-height: 154px; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 12px; padding: 18px 15px 18px 56px; border: 1px solid var(--line-strong); border-radius: 19px; background: rgb(21 23 29 / 82%); cursor: pointer; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.companion-option:hover { border-color: rgb(201 168 106 / 38%); background: var(--raised); }
.companion-option:active { transform: scale(.995); }
.companion-option:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.companion-option.is-selected { border-color: var(--gold); background: linear-gradient(145deg, rgb(201 168 106 / 8%), rgb(22 24 30 / 96%)); box-shadow: 0 0 0 1px rgb(201 168 106 / 10%) inset; }
.companion-option input { position: absolute; width: 1px; height: 1px; min-height: 1px; margin: -1px; padding: 0; overflow: hidden; border: 0; clip: rect(0 0 0 0); white-space: nowrap; }
.companion-icon { display: grid; grid-column: 1; width: 50px; height: 50px; place-items: center; border: 1px solid rgb(201 168 106 / 20%); border-radius: 50%; color: var(--gold); background: var(--gold-wash); font-size: 14px; font-weight: 900; letter-spacing: -.08em; }
.companion-icon.observer { color: #e3b44c; background: rgb(154 111 40 / 13%); }
.companion-icon.coach { color: var(--violet); background: var(--violet-wash); }
.companion-copy { grid-column: 2; min-width: 0; }
.companion-copy strong, .companion-copy small { display: block; }
.companion-copy strong { font-size: 17px; }
.companion-copy small { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.selection-mark { position: absolute; top: 50%; left: 15px; display: grid; width: 26px; height: 26px; place-items: center; border: 2px solid #656a74; border-radius: 50%; color: transparent; font-size: 13px; font-weight: 900; transform: translateY(-50%); }
.companion-option.is-selected .selection-mark { border-color: var(--gold); color: #211b14; background: var(--gold); box-shadow: 0 0 20px rgb(201 168 106 / 20%); }
.start-session-button { width: 100%; min-height: 52px; margin-top: 14px; font-size: 15px; }
.panel-section, .content-card { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-section { padding: 16px; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.section-row h2, .content-title h2 { margin: 0; font-size: 16px; }
.section-row p, .content-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.section-row > a { display: inline-flex; min-height: 44px; align-items: center; color: var(--gold); font-size: 12px; font-weight: 700; }
.session-list { display: grid; gap: 7px; }
.session-row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid transparent; border-radius: 13px; background: var(--raised); transition: 140ms ease; }
.session-row:hover { border-color: var(--line-strong); background: var(--interactive); }
.session-date { display: grid; flex: 0 0 43px; height: 46px; place-content: center; border-radius: 11px; color: var(--gold); background: var(--gold-wash); text-align: center; }
.session-date b { font-size: 15px; }.session-date small { color: var(--muted); font-size: 10px; }
.session-copy { min-width: 0; }.session-copy strong, .session-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.session-copy strong { font-size: 13px; }.session-copy small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.row-arrow { margin-right: auto; color: var(--gold); }
.quick-grid { display: grid; gap: 9px; margin-top: 14px; }
.quick-grid > a { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.quick-grid > a > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: var(--violet); background: var(--violet-wash); }
.quick-grid strong, .quick-grid small { display: block; }.quick-grid strong { font-size: 13px; }.quick-grid small { margin-top: 4px; color: var(--muted); font-size: 11px; }.quick-grid b { margin-right: auto; color: var(--gold); }
.empty-state { padding: 34px 18px; color: var(--muted); text-align: center; }.empty-state.large { margin-top: 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }.empty-state > span { display: grid; width: 46px; height: 46px; margin: auto; place-items: center; border-radius: 15px; color: var(--gold); background: var(--gold-wash); font-size: 20px; }.empty-state h2, .empty-state h3 { margin: 14px 0 6px; color: var(--text); font-size: 16px; }.empty-state p { margin: 0 auto 16px; max-width: 340px; font-size: 12px; line-height: 1.9; }

/* Sessions and details */
.session-grid, .character-grid, .plan-grid { display: grid; gap: 10px; }
.session-card { padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.card-top > small { color: var(--dim); font-size: 11px; }
.status-badge { padding: 5px 9px; border-radius: 999px; color: var(--muted); background: var(--raised); font-size: 11px; font-style: normal; }.status-badge.ended { color: #a2ddb9; background: rgb(121 201 153 / 10%); }.status-badge.active { color: #ddc98f; background: var(--gold-wash); }
.session-card h2 { margin: 18px 0 7px; font-size: 16px; }.session-card > p { margin: 0; color: var(--muted); font-size: 12px; }.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 20px; color: var(--muted); font-size: 12px; }.pagination a { display: inline-flex; min-height: 44px; align-items: center; color: var(--gold); }
.back-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--gold); font-size: 12px; }.detail-heading { align-items: flex-end; }
.detail-grid { display: grid; gap: 14px; }.content-card { padding: 16px; }.content-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }.content-title > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: var(--gold); background: var(--gold-wash); }
.prose { color: #d3d1cc; font-size: 14px; line-height: 2.1; }.prose > :first-child { margin-top: 0; }.prose > :last-child { margin-bottom: 0; }.prose h1, .prose h2, .prose h3 { margin: 24px 0 10px; color: var(--text); line-height: 1.6; }.prose h1 { font-size: 20px; }.prose h2 { font-size: 18px; }.prose h3 { font-size: 16px; }.prose p { margin: 0 0 14px; }.prose ul, .prose ol { display: grid; gap: 7px; margin: 10px 0 18px; padding-right: 24px; }.prose ul { list-style: disc; }.prose ol { list-style: decimal; }.prose li { padding-right: 3px; }.prose strong { color: #f0cf8d; }.prose blockquote { margin: 14px 0; padding: 9px 14px; border-right: 3px solid var(--gold); color: var(--muted); background: var(--gold-wash); }.prose code { padding: 2px 5px; border-radius: 5px; color: #e7d3a5; background: var(--field); direction: ltr; }.prose pre { overflow: auto; margin: 14px 0; padding: 12px; border-radius: 10px; background: var(--field); direction: ltr; text-align: left; }.prose pre code { padding: 0; }.prose a { color: var(--gold); text-decoration: underline; }.tip-pagination { margin-top: 14px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 18px; }.metric-grid div { min-width: 0; padding: 11px; border-radius: 11px; background: var(--raised); }.metric-grid small, .metric-grid strong { display: block; overflow-wrap: anywhere; }.metric-grid small { color: var(--muted); font-size: 11px; }.metric-grid strong { margin-top: 6px; color: var(--gold); font-size: 14px; }
.tip-list { display: grid; gap: 7px; }.tip { position: relative; padding: 12px 18px 12px 12px; border-radius: 11px; background: var(--raised); }.tip i { position: absolute; top: 13px; right: 7px; bottom: 13px; width: 2px; border-radius: 2px; background: var(--gold); }.tip.high i { background: var(--danger); }.tip p { margin: 0; font-size: 12px; line-height: 1.9; }.tip small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.empty-inline { display: flex; min-height: 100px; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 12px; text-align: center; }.spinner { width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
.transcript-card { padding: 0; overflow: hidden; }.disclosure { display: flex; width: 100%; min-height: 64px; align-items: center; justify-content: space-between; border: 0; background: transparent; padding: 16px; text-align: right; }.disclosure strong, .disclosure small { display: block; }.disclosure strong { font-size: 14px; }.disclosure small { margin-top: 4px; color: var(--muted); font-size: 11px; }.disclosure b { color: var(--gold); transition: transform 150ms; }.disclosure[aria-expanded=true] b { transform: rotate(180deg); }
.transcript-list { max-height: 520px; overflow: auto; overscroll-behavior: contain; padding: 0 16px 16px; }.transcript-list article { padding: 13px 0; border-top: 1px solid var(--line); }.transcript-list strong { font-size: 12px; }.transcript-list time { margin-right: 7px; color: var(--dim); font-size: 10px; }.transcript-list p { margin: 7px 0 0; color: #c8c6c2; font-size: 13px; line-height: 1.9; }

/* Characters, settings and plans */
.character-card { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--raised); }.character-card.custom { background: linear-gradient(145deg, var(--violet-wash), var(--raised) 65%); }.character-head { display: flex; align-items: center; justify-content: space-between; }.character-head > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: var(--gold); background: var(--gold-wash); }.character-head em { padding: 5px 9px; border-radius: 999px; color: var(--muted); background: var(--field); font-size: 10px; font-style: normal; }
.character-card h3 { margin: 16px 0 7px; font-size: 16px; }.character-card > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.85; }.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }.chip-row span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: #cbc9cf; font-size: 10px; }.character-card footer { margin: 14px -16px -16px; padding: 12px 16px; border-top: 1px solid var(--line); }.character-card footer small { color: var(--gold); font-size: 10px; }.character-card footer p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }.danger-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 8px; padding: 0; border: 0; color: var(--danger); background: none; font-size: 12px; }
.fab { position: fixed; z-index: 20; bottom: 84px; left: 18px; display: grid; width: 46px; height: 46px; place-items: center; border: 0; border-radius: 15px; color: #211b14; background: var(--gold); box-shadow: 0 14px 40px rgb(0 0 0 / 35%); font-size: 24px; }
.modal { width: min(calc(100% - 24px), 520px); max-height: min(90vh, 760px); margin: auto; padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: 22px; color: var(--text); background: var(--surface); box-shadow: 0 30px 100px rgb(0 0 0 / 65%); }.modal::backdrop { background: rgb(0 0 0 / 66%); backdrop-filter: blur(4px); }.modal-card { padding: 19px; }.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }.modal-head h2 { margin: 7px 0 0; font-size: 20px; }.icon-button { display: grid; flex: 0 0 auto; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--raised); font-size: 18px; }
.narrow-page { max-width: 830px; }.settings-stack { display: grid; gap: 13px; }.form-card { margin: 0; }.form-grid { display: grid; gap: 12px; align-items: start; }.form-card label { display: block; }.form-card label small { display: block; margin-top: 5px; color: var(--dim); font-size: 11px; }.check-row { display: flex !important; min-height: 44px; align-items: center; gap: 10px; margin-top: 12px; }.check-row input { width: 20px; height: 20px; min-height: auto; accent-color: var(--gold); }.check-row span { margin: 0; }.save-button { position: sticky; z-index: 5; bottom: 76px; width: 100%; }
.current-plan { display: flex; align-items: center; gap: 13px; margin-bottom: 15px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }.current-plan > div small, .current-plan > div strong { display: block; }.current-plan > div small { color: var(--muted); font-size: 11px; }.current-plan > div strong { margin-top: 4px; font-size: 14px; }
.plan-card { position: relative; overflow: hidden; padding: 21px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }.plan-card.selected { border-color: rgb(201 168 106 / 45%); background: linear-gradient(145deg, var(--gold-wash), var(--surface)); }.plan-ribbon { position: absolute; top: 16px; left: 16px; padding: 5px 8px; border-radius: 999px; color: #211b14; background: var(--gold); font-size: 10px; font-weight: 800; }.plan-card h2 { margin: 0; font-size: 19px; }.plan-card > p { margin: 5px 0 20px; color: var(--muted); font-size: 12px; }.price { display: flex; align-items: baseline; gap: 7px; }.price strong { color: var(--gold); font-size: 29px; }.price span { color: var(--muted); font-size: 11px; }.plan-card ul { display: grid; gap: 10px; margin: 22px 0; padding: 0; list-style: none; }.plan-card li { color: #d1cfc9; font-size: 12px; }.plan-card li::before { margin-left: 8px; color: var(--green); content: '✓'; }
.plan-discount-input { box-sizing: border-box; width: 100%; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); background: var(--field); font: inherit; font-size: 12px; text-align: center; }
.plan-discount-input:focus { border-color: var(--gold); outline: 2px solid rgb(201 168 106 / 24%); outline-offset: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.admin-page { display: grid; gap: 18px; }
.admin-card { padding: 20px; }
.admin-card h2 { margin: 3px 0 0; font-size: 18px; }
.admin-form-grid, .admin-row { display: grid; gap: 12px; }
.admin-form-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 18px 0; }
.admin-form label, .admin-row label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.admin-form input, .admin-form select, .admin-row input, .admin-row select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; color: var(--text); background: var(--field); font-size: 12px; }
.admin-form input:focus, .admin-form select:focus, .admin-row input:focus, .admin-row select:focus { border-color: var(--gold); outline: 2px solid rgb(201 168 106 / 24%); outline-offset: 1px; }
.admin-form small, .admin-row small { color: var(--dim); font-size: 10px; }
.admin-list { display: grid; gap: 10px; margin-top: 16px; }
.admin-row { grid-template-columns: repeat(4, minmax(100px, 1fr)); align-items: end; padding: 14px 0; border-top: 1px solid var(--line); }
.admin-row > div { display: grid; grid-column: span 2; gap: 4px; align-self: center; }
.admin-check { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 7px !important; white-space: nowrap; }
.admin-check input { width: auto; }
.plan-admin-row { grid-template-columns: repeat(4, minmax(100px, 1fr)); }
.plan-admin-row .admin-check { align-self: center; }
@media (max-width: 760px) { .admin-row, .plan-admin-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-row > div, .admin-row .button { grid-column: 1 / -1; } }

@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 560px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .session-grid, .character-grid, .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid, .form-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.08fr .92fr; }
  .app-shell { display: grid; grid-template-columns: 235px minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 24px 16px; border-left: 1px solid var(--line); background: rgb(17 18 23 / 86%); backdrop-filter: blur(18px); }
  .sidebar .brand { align-self: center; padding: 0; }
  .sidebar-nav { display: grid; gap: 5px; margin-top: 24px; }.sidebar-nav a { display: flex; min-height: 46px; align-items: center; justify-content: space-between; padding: 0 13px; border-radius: 12px; color: var(--muted); font-size: 13px; font-weight: 700; transition: color 140ms ease, background 140ms ease; }.sidebar-nav a:hover { color: var(--text); background: var(--raised); }.sidebar-nav a.active { color: var(--gold); background: var(--gold-wash); }.sidebar-nav b { font-size: 15px; }
  .sidebar-user { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); }.avatar { display: grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--gold); background: var(--gold-wash); font-size: 13px; font-weight: 900; }.sidebar-user > span:nth-child(2) { min-width: 0; }.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.sidebar-user strong { font-size: 11px; }.sidebar-user small { margin-top: 3px; color: var(--dim); font-size: 10px; }.sidebar-user form { margin-right: auto; }
  .app-main { padding-bottom: 0; }.mobile-header, .bottom-nav, .fab { display: none; }.page-wrap { padding: 48px 38px 60px; }.desktop-action { display: inline-flex; }.stat-card { min-height: 124px; padding: 20px; }.panel-section { padding: 20px; }.quick-grid { grid-template-columns: repeat(2, 1fr); }.session-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.detail-grid { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); }.tips-card { margin-top: 14px; }.metric-grid { grid-template-columns: repeat(4, 1fr); }.save-button { position: static; width: max-content; min-width: 180px; margin-right: auto; }.plan-grid { grid-template-columns: repeat(2, minmax(280px, 410px)); justify-content: center; }
  .dashboard-page { padding-top: 38px; }
  .dashboard-heading { align-items: center; margin-bottom: 26px; }
  .dashboard-heading .eyebrow { display: none; }
  .dashboard-heading h1 { margin-top: 0; }
  .notification-button { order: -1; width: 50px; height: 50px; }
  .companion-picker { margin-top: 20px; padding: 22px; border-radius: 22px; }
  .companion-heading { align-items: center; }
  .companion-heading > a { display: inline-flex; }
  .companion-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .companion-option { min-height: 190px; grid-template-columns: 1fr; grid-template-rows: 56px auto; align-content: start; padding: 18px; text-align: center; }
  .companion-icon { grid-column: 1; justify-self: center; }
  .companion-copy { grid-column: 1; }
  .selection-mark { top: 18px; left: 18px; transform: none; }
  .start-session-button { width: min(280px, 100%); margin: 18px auto 0; }
}

@media (min-width: 1200px) {
  .app-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .character-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The same app becomes a compact extension-side-panel view at narrow width. */
.is-embed .sidebar { display: none; }
.is-embed .app-shell { display: block; }
.is-embed .mobile-header { display: flex; }
.is-embed .app-main { padding-bottom: 78px; }
.is-embed .bottom-nav { display: grid; }
.is-embed .page-wrap { max-width: 540px; padding: 20px 12px 32px; }
.is-embed .desktop-action { display: none; }
.is-embed .stat-grid, .is-embed .session-grid, .is-embed .character-grid, .is-embed .plan-grid, .is-embed .detail-grid { grid-template-columns: 1fr; }
.is-embed .companion-grid { grid-template-columns: 1fr; }
.is-embed .companion-picker { padding: 15px 12px; }
.is-embed .companion-option { min-height: 138px; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: auto; padding: 15px 12px 15px 50px; text-align: right; }
.is-embed .companion-icon { grid-column: 1; width: 46px; height: 46px; }
.is-embed .companion-copy { grid-column: 2; }
.is-embed .selection-mark { top: 50%; left: 12px; transform: translateY(-50%); }
.is-embed .start-session-button { width: 100%; }
.is-embed .fab { display: grid; }
.is-embed .auth-page { min-height: 100dvh; padding: 20px 12px; }
.is-embed .auth-brand { margin-bottom: 16px; }
.is-embed .auth-card { padding: 20px 16px; border-radius: 20px; box-shadow: none; }
.is-embed .page-heading { margin-bottom: 18px; }
.is-embed .page-heading h1 { font-size: clamp(24px, 7vw, 32px); }
.is-embed .stat-card { min-height: 112px; }
.is-embed .panel-section, .is-embed .content-card { border-radius: 16px; }
.extension-bridge-status { margin: 0 12px 14px; }
.extension-bridge-status:not(.error) { border-color: rgb(93 177 135 / 35%); background: rgb(93 177 135 / 10%); color: #9be0bd; }

@media (max-width: 380px) {
  .landing-nav .brand small { display: none; }
  .landing-shell { width: min(100% - 24px, 1180px); }
  .hero { padding-top: 36px; }
  .hero-copy h1 { font-size: 32px; }
  .preview-content { gap: 7px; padding: 10px; }
  .preview-card { min-height: 104px; padding: 12px; }
  .bottom-nav { right: 4px; left: 4px; }
  .bottom-nav span { font-size: 9px; }
  .page-heading { gap: 12px; }
  .card-top { align-items: flex-start; flex-direction: column; }
}

@supports not (backdrop-filter: blur(1px)) {
  .mobile-header, .bottom-nav, .sidebar { background: var(--surface); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  .status-dot::before { border: 1px solid CanvasText; }
}
