/* Impact Indy portal — Impact Indy brand: navy #0E1050, gold #C69727, off-white #F8F9FA (sampled from impactindygroup.com + the existing app).
   Layout: fixed navy rail + light work area; gold reserved for the one primary action per screen and the active nav item. */
:root {
  --bg: #F8F9FA; --bg-2: #FFFFFF; --bg-3: #F1F3F6; --fg: #111827; --fg-2: #374151; --fg-3: #6B7280; --line: #E5E7EB; --line-2: #D1D5DB;
  --navy: #0E1050; --navy-2: #1E2270; --gold: #C69727; --gold-2: #A97F1E; --gold-soft: #FBF3E0; --on-gold: #FFFFFF; --on-navy: #FFFFFF;
  --coral: #C69727; --coral-2: #A97F1E; --coral-soft: #FBF3E0; --on-coral: #FFFFFF;
  --good: #1F7A4D; --good-soft: #DCF2E6; --warn: #B8600F; --warn-soft: #FBE9D7; --bad: #B3261E; --bad-soft: #F8DEDC; --info-soft: #E6ECFA;
  --rail: #0E1050; --rail-fg: #FFFFFF; --rail-fg-2: #FFFFFF; --rail-active: #C69727; --rail-active-fg: #FFFFFF; --shadow: 0 1px 3px rgba(17,24,39,.06), 0 4px 12px rgba(17,24,39,.05);
  --font-display: "Inter", "Segoe UI", system-ui, sans-serif; --font-body: "Inter", "Segoe UI", system-ui, sans-serif; --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px; --radius-s: 8px; --stat-lbl: #1E2270; --stat-val: #0E1050; --link: #1E2270;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0B0C2A; --bg-2: #14163F; --bg-3: #1E2156; --fg: #F2F3FA; --fg-2: #C9CBE6; --fg-3: #9497BF; --line: #2A2D66; --line-2: #383C7D;
  --navy: #0E1050; --navy-2: #2A2E8A; --gold: #D9AC3F; --gold-2: #C69727; --gold-soft: #3A2E12; --on-gold: #14163A; --on-navy: #FFFFFF;
  --coral: #D9AC3F; --coral-2: #C69727; --coral-soft: #3A2E12; --on-coral: #14163A;
  --good: #5CC98D; --good-soft: #10331F; --warn: #F0A050; --warn-soft: #3A2810; --bad: #F2786E; --bad-soft: #3B1715; --info-soft: #1F2560;
  --rail: #07081F; --rail-fg: #FFFFFF; --rail-fg-2: #FFFFFF; --rail-active: #C69727; --rail-active-fg: #FFFFFF; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --stat-lbl: #C9CBE6; --stat-val: #FFFFFF; --link: #8FB4FF; --on-gold: #0B0C2A; --on-coral: #0B0C2A;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0B0C2A; --bg-2: #14163F; --bg-3: #1E2156; --fg: #F2F3FA; --fg-2: #C9CBE6; --fg-3: #9497BF; --line: #2A2D66; --line-2: #383C7D;
  --navy: #0E1050; --navy-2: #2A2E8A; --gold: #D9AC3F; --gold-2: #C69727; --gold-soft: #3A2E12; --on-gold: #14163A; --on-navy: #FFFFFF;
  --coral: #D9AC3F; --coral-2: #C69727; --coral-soft: #3A2E12; --on-coral: #14163A;
  --good: #5CC98D; --good-soft: #10331F; --warn: #F0A050; --warn-soft: #3A2810; --bad: #F2786E; --bad-soft: #3B1715; --info-soft: #1F2560;
  --rail: #07081F; --rail-fg: #FFFFFF; --rail-fg-2: #FFFFFF; --rail-active: #C69727; --rail-active-fg: #FFFFFF; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --stat-lbl: #C9CBE6; --stat-val: #FFFFFF; --link: #8FB4FF; --on-gold: #0B0C2A; --on-coral: #0B0C2A;
  color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14.5px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 700; } h2 { font-size: 17px; font-weight: 700; } h3 { font-size: 15px; font-weight: 600; } h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); }
p { margin: 0; } a { color: var(--link); } button { font: inherit; } input, select, textarea { font: inherit; color: var(--fg); }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100%; }
.rail { background: var(--rail); color: var(--rail-fg); padding-block: 0 18px; padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.rail-head { margin: 0 -14px 14px calc(-1 * max(14px, env(safe-area-inset-left, 0px))); padding: 22px 24px 20px; border-bottom: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); }
.rail-head .brand { padding: 0; }
.brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 18px; color: var(--rail-fg-2); font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: .95; letter-spacing: .01em; text-transform: uppercase; }
.brand { flex-direction: column; align-items: flex-start; gap: 6px; }
.brand .logo { height: 54px; width: auto; max-width: 100%; display: block; image-rendering: -webkit-optimize-contrast; }
.brand small { display: none; }
.brand.on-light { align-items: center; } .brand.on-light .logo { height: 60px; } .brand.on-light small { color: var(--fg-3); }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 8px; color: var(--rail-fg); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { background: rgba(255,255,255,.08); color: var(--rail-fg-2); }
.nav a.active { background: var(--rail-active); color: var(--rail-active-fg); font-weight: 700; }
.nav a .badge { margin-left: auto; background: var(--gold); color: var(--on-gold); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.nav a.active .badge { background: var(--rail); color: #fff; }
.nav a .ic { width: 18px; text-align: center; opacity: .8; font-size: 15px; }
.nav h4 { color: var(--rail-fg); opacity: .55; padding: 16px 14px 4px; }
.rail .me { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.rail .me b { display: block; color: var(--rail-fg-2); } .rail .me a { color: var(--rail-fg); }
.main { min-width: 0; padding: 0; }
.page { display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 18px; background: var(--bg-2); border-bottom: 1px solid var(--line); padding-block: 18px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
@media (min-width: 900px) { .page-head { padding-left: 28px; padding-right: 28px; } }
.page-head .sub { color: var(--fg-3); margin-top: 2px; font-size: 14px; }
.page > :not(.page-head) { margin-left: max(16px, env(safe-area-inset-left, 0px)); margin-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .page > :not(.page-head) { margin-left: 28px; margin-right: 28px; } }
.page > :last-child { margin-bottom: 60px; }
.page-head > :first-child { flex: 1 1 320px; min-width: 0; }
.topnav-right { display: flex; align-items: center; gap: 14px; order: 99; padding-left: 10px; border-left: 1px solid var(--line); }
.mobile-bar { display: none; }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-100%); transition: transform .2s; z-index: 40; height: 100%; }
  .rail.open { transform: none; box-shadow: var(--shadow); }
  .page-head { position: static; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; background: var(--rail); color: var(--rail-fg-2); padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; }
  .mobile-bar button { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 6px; padding: 4px 10px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
}

/* ---------- components */
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; box-shadow: var(--shadow); }
.card.flat { background: transparent; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; } .grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } .grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } .grid-3s { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: #EEF3FD; border: 1px solid #DCE6F8; border-radius: var(--radius); min-width: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stat { background: var(--bg-3); border-color: var(--line); } } :root[data-theme="dark"] .stat { background: var(--bg-3); border-color: var(--line); }
.stat .lbl { color: var(--stat-lbl); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.stat .val { color: var(--stat-val); }
.stat .lbl { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); }
.stat .val { font: 700 30px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.stat .val small { font: 500 13px/1 var(--font-body); color: var(--fg-3); margin-left: 4px; }
.stat .meter { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.stat .meter i { display: block; height: 100%; background: var(--navy-2); border-radius: 3px; }
.stat .meter i.good { background: var(--good); } .stat .meter i.warn { background: var(--warn); } .stat .meter i.bad { background: var(--bad); }
.stat .hint { font-size: 12px; color: var(--fg-3); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg); font-weight: 600; cursor: pointer; text-decoration: none; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: var(--fg-3); } .btn.primary { background: var(--gold); border-color: var(--gold); color: #0B0C2A; font-weight: 700; } .btn.primary:hover { background: var(--gold-2); border-color: var(--gold-2); color: #0B0C2A; }
.btn.navy { background: var(--navy); border-color: var(--navy); color: var(--on-navy); } .btn.small { padding: 4px 10px; font-size: 13px; } .btn.ghost { background: transparent; border-color: transparent; color: var(--fg-2); } .btn.ghost:hover { background: var(--bg-3); }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn[disabled] { opacity: .5; cursor: default; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-3); color: var(--fg-2); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.coral { background: var(--coral-soft); color: var(--coral); } .pill.info { background: var(--info-soft); color: var(--fg); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .field label { font-size: 12px; font-weight: 600; color: var(--fg-2); text-transform: uppercase; letter-spacing: .05em; }
.field input, .field select, .field textarea { padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); width: 100%; min-width: 0; }
.field textarea { min-height: 80px; resize: vertical; }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.form-row > .wide { grid-column: 1 / -1; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-3); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 600; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; } tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg-2); }
.row .grow { flex: 1; min-width: 0; } .row .meta { font-size: 12px; color: var(--fg-3); } .row .acts { display: flex; gap: 4px; flex-shrink: 0; }
.empty { padding: 22px; text-align: center; color: var(--fg-3); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); z-index: 100; max-width: 90vw; }
.toast.bad { background: var(--bad); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--fg-3); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--fg); border-bottom-color: var(--gold); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { background: var(--bg-2); border: 0; padding: 6px 12px; cursor: pointer; color: var(--fg-2); font-weight: 600; } .seg button.active { background: var(--navy-2); color: #fff; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--av, var(--navy-2)); color: #fff; display: grid; place-items: center; font: 700 14px var(--font-display); flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg { width: 96px; height: 96px; font-size: 32px; border: 3px solid var(--gold); }
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: -6px; }
.bell { position: relative; background: none; border: 0; cursor: pointer; font-size: 20px; color: var(--fg-2); padding: 4px; }
.bell .dot { position: absolute; top: 0; right: 0; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 5px; }
.ann { border-left: 4px solid var(--gold); padding: 12px 16px; background: var(--bg-2); border-radius: 0 var(--radius) var(--radius) 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ann.pinned { border-left-color: var(--navy-2); }
.ann h3 { font-size: 17px; margin-bottom: 4px; } .ann .body { white-space: pre-wrap; color: var(--fg-2); max-width: 72ch; } .ann .meta { font-size: 12px; color: var(--fg-3); margin-top: 6px; }
.ev { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: start; }
.ev .date { background: var(--navy); color: #fff; border-radius: 10px; text-align: center; padding: 8px 4px; font-family: var(--font-display); }
.ev .date b { display: block; font-size: 24px; line-height: 1; } .ev .date span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.ev.past .date { background: var(--bg-3); color: var(--fg-2); } .ev.past .date span { color: var(--fg-3); }
@media (max-width: 560px) { .ev { grid-template-columns: 64px 1fr; } .ev > .acts { grid-column: 2; } }
.photo-drop { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 16px; text-align: center; color: var(--fg-3); cursor: pointer; }
.photo-drop:hover { border-color: var(--gold); color: var(--fg); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; } .switch input { width: 20px; height: 20px; accent-color: var(--gold); }
.member-card { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.member-card:hover { border-color: var(--fg-3); }
.member-card .nm { font-weight: 700; } .member-card .co { color: var(--fg-2); font-size: 14px; } .member-card .seat { color: var(--fg-3); font-size: 13px; }
.rank { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.rank:last-child { border-bottom: 0; } .rank > span:nth-child(2) { display:block; min-width:0; } .rank .n { color: var(--fg-3); font-weight: 600; font-variant-numeric: tabular-nums; } .rank .v { font: 700 16px var(--font-display); font-variant-numeric: tabular-nums; }
.rank:nth-child(1) .n { color: var(--gold); }
.rank.me { background: var(--gold-soft); margin: 0 -8px; padding-left: 12px; padding-right: 8px; border-radius: 6px; }
.rank.me .n { color: var(--gold); }
.rank .v { color: var(--fg); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; } .swatch { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; } .swatch.on { border-color: var(--fg); }
.list-edit .row { padding: 6px 10px; } .list-edit input { padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg-2); min-width: 0; }
.bar { height: 4px; background: var(--bg-3); border-radius: 2px; margin-top: 3px; } .bar i { display: block; height: 100%; background: var(--navy-2); border-radius: 2px; }
.modal-bg { position: fixed; inset: 0; background: rgba(5,15,30,.55); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--bg-2); border-radius: 12px; width: min(720px, 100%); max-height: 90vh; overflow: auto; padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.att-grid { display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.att { height: 34px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--good-soft); color: var(--good); }
.att.absent { background: var(--bad-soft); color: var(--bad); } .att.sub { background: var(--info-soft); color: var(--fg); } .att.visitor { background: var(--info-soft); color: var(--fg); } .att.unknown { background: var(--bg-3); color: var(--fg-3); } .att.future { background: transparent; border: 1px dashed var(--line-2); color: var(--fg-3); }
.heat td { padding: 4px; } .heat .cell { display: block; width: 26px; height: 26px; border-radius: 4px; margin: auto; cursor: pointer; border: 0; font-size: 10px; font-weight: 700; }
.heat .present { background: var(--good-soft); color: var(--good); } .heat .absent { background: var(--bad); color: #fff; } .heat .sub { background: var(--info-soft); color: var(--fg); } .heat .visitor { background: var(--info-soft); color: var(--fg); } .heat .unknown { background: var(--bg-3); } .heat .future { background: transparent; border: 1px dashed var(--line-2); }
.rule-body { white-space: pre-wrap; color: var(--fg-2); line-height: 1.6; max-width: 72ch; }
details.rule { border-bottom: 1px solid var(--line); padding: 10px 0; } details.rule summary { cursor: pointer; font-weight: 700; font-family: var(--font-display); font-size: 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.rule summary::after { content: "+"; color: var(--fg-3); } details[open].rule summary::after { content: "–"; }
details.rule .src { font-size: 12px; color: var(--fg-3); margin: 4px 0 8px; }
.kbd { font-family: var(--font-mono); background: var(--bg-3); padding: 2px 6px; border-radius: 4px; font-size: 13px; letter-spacing: .05em; }
.match { border-left: 3px solid var(--gold); padding-left: 12px; }
.callout { background: var(--gold-soft); border: 1px solid var(--gold); border-radius: var(--radius); padding: 12px 14px; color: var(--fg); }
.callout.info { background: var(--info-soft); border-color: var(--line-2); }

/* ---------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: linear-gradient(165deg, #0E1050 0%, #1E2270 55%, #2E3390 100%); }
.login .tag { font-family: var(--font-display); font-weight: 800; font-size: 28px; color: #fff; text-align: center; letter-spacing: -.01em; margin-bottom: 14px; }
.login .tag span { color: var(--gold); }
.login .box { width: min(420px, 100%); background: var(--bg-2); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.login .box h1 { font-size: 22px; } .login .note { font-size: 13px; color: var(--fg-3); }
.login .err { color: var(--bad); font-weight: 600; font-size: 14px; }

/* ---------- chat */
.chat-fab { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 50; background: var(--gold); color: #0B0C2A; border: 0; border-radius: 999px; padding: 12px 18px; font: 600 14px var(--font-body); box-shadow: var(--shadow); cursor: pointer; display: flex; gap: 8px; align-items: center; }
.chat { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 32px)); background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 55; display: flex; flex-direction: column; overflow: hidden; }
.chat-head { background: var(--navy); color: #fff; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-weight: 700; }
.chat-head button { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; }
.chat-head small { display: block; font: 500 11px var(--font-body); opacity: .75; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: 14px; white-space: pre-wrap; line-height: 1.45; }
.msg.me { align-self: flex-end; background: var(--navy-2); color: #fff; border-bottom-right-radius: 3px; }
.msg.bot { align-self: flex-start; background: var(--bg-3); color: var(--fg); border-bottom-left-radius: 3px; }
.msg.bot b { font-family: var(--font-display); }
.chat-sugg { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 8px; } .chat-sugg button { font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg-2); cursor: pointer; }
.chat-in { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); } .chat-in input { flex: 1; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); min-width: 0; }
.demo-banner { background: var(--navy); color: #fff; font-size: 13px; padding: 6px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.demo-banner select { padding: 3px 6px; border-radius: 6px; border: 0; }
