/* ============ Rhoosh: ivory, ink & antique gold ============ */
:root {
  --bg: #f8f5ef;
  --paper: #fffdf9;
  --tint: #f1ece3;
  --ink: #1d1b18;
  --ink-2: #3a3631;
  --muted: #736b60;
  --line: #e4ddd0;
  --line-strong: #cbc1b0;
  --gold: #86683b;
  --gold-line: #d9c9ab;
  --danger: #973b3b;
  --font-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-sans: 'Jost', system-ui, sans-serif;
  --radius: 4px;
  --shadow: 0 24px 60px -36px rgba(29, 27, 24, 0.35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; color: var(--ink); }
h1 { font-size: clamp(38px, 5.5vw, 64px); }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h1 em, h2 em, h3 em { font-style: italic; color: var(--gold); }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.muted { color: var(--muted); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  background: rgba(248, 245, 239, 0.96);
  border-bottom: 1px solid var(--line);
}
.logo { text-decoration: none; }
.wordmark { font-family: var(--font-serif); font-weight: 600; font-size: 22px; letter-spacing: .32em; text-transform: uppercase; margin-right: -.32em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a.navlink {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; text-decoration: none;
  font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.nav a.navlink:hover { color: var(--ink); }
.nav a.navlink.active { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 420px) { .nav:not(.authed) a.navlink { padding: 8px 6px; } .wordmark { font-size: 19px; letter-spacing: .24em; } }

@media (max-width: 760px) {
  .nav.authed {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    justify-content: space-around; gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--paper); border-top: 1px solid var(--line);
  }
  .nav.authed a.navlink { flex-direction: column; gap: 4px; padding: 8px 6px; font-size: 10.5px; letter-spacing: .12em; border-bottom: 0; }
  .nav.authed a.navlink.active { color: var(--gold); }
  main { padding-bottom: 110px !important; }
}

/* ---------- layout ---------- */
main { max-width: 1160px; min-width: 0; margin: 0 auto; padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px) 80px; outline: none; }
.view { animation: fade-in .5s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.page-head h1 { margin: 0; }
.page-head .lede { margin: 14px 0 0; max-width: 58ch; color: var(--muted); }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); }
.panel h2 { font-size: 28px; margin: 0 0 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 2px; border: 1px solid transparent; cursor: pointer;
  font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; background: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover:not([disabled]) { background: #000; }
.btn-ghost { color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not([disabled]) { border-color: var(--ink); }
.btn-attending { color: var(--ink); background: var(--tint); border-color: var(--gold-line); }
.btn-attending:hover { border-color: var(--gold); }
.btn-lg { padding: 17px 34px; }
.btn-sm { padding: 10px 18px; font-size: 12px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label, .field .label { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field .hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
.input {
  width: 100%; padding: 13px 15px; border-radius: 2px;
  background: var(--paper); border: 1px solid var(--line-strong);
  transition: border-color .2s;
}
textarea.input { resize: vertical; min-height: 100px; }
.input:focus { outline: none; border-color: var(--ink); }
.input::placeholder { color: #a39a8c; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.form-error { color: var(--danger); min-height: 1.6em; margin: 4px 0 12px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 14px;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; color: var(--ink-2); border: 1px solid var(--line-strong); }

/* ---------- avatars ---------- */
.av {
  --h: 30;
  display: inline-grid; place-items: center; flex-shrink: 0;
  border-radius: 50%; object-fit: cover;
  font-family: var(--font-serif); font-weight: 500; font-style: italic; color: var(--ink-2);
  background: hsl(var(--h) 24% 86%);
  box-shadow: 0 0 0 2px var(--paper);
}
.av-xs { width: 28px; height: 28px; font-size: 15px; }
.av-sm { width: 40px; height: 40px; font-size: 20px; }
.av-md { width: 56px; height: 56px; font-size: 28px; }
.av-lg { width: 88px; height: 88px; font-size: 42px; }
.av-xl { width: 128px; height: 128px; font-size: 60px; }
.av-stack { display: flex; align-items: center; }
.av-stack .av + .av { margin-left: -8px; }

/* ---------- landing ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 6vw, 90px); align-items: center; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; } }
.hero h1 { font-size: clamp(46px, 8vw, 92px); font-weight: 400; line-height: 1; margin: 0 0 28px; letter-spacing: -0.02em; }
.hero .lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 44ch; margin: 0 0 36px; font-weight: 300; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art { position: relative; height: 660px; }
@media (max-width: 900px) { .hero-art { height: 640px; max-width: 440px; width: 100%; margin: 0 auto; } }
.invitation, .reply-card { position: absolute; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.invitation::before, .reply-card::before { content: ''; position: absolute; inset: 10px; border: 1px solid var(--gold-line); pointer-events: none; }
.invitation { top: 0; right: 0; width: min(370px, 86%); padding: 52px 34px 48px; rotate: 2deg; }
.invitation .small { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin: 0; }
.invitation .names { font-family: var(--font-serif); font-size: clamp(40px, 5vw, 54px); line-height: 1.05; margin: 22px 0; }
.invitation .names em { color: var(--gold); font-style: italic; }
.invitation .flourish { width: 48px; height: 1px; background: var(--gold); margin: 26px auto; }
.invitation .date { font-family: var(--font-serif); font-style: italic; font-size: 22px; margin: 0 0 8px; }
.reply-card { bottom: 0; left: 0; width: min(290px, 72%); padding: 30px 28px; rotate: -4deg; text-align: left; }
.reply-card .eyebrow { text-align: center; margin-bottom: 18px; }
.reply-line { display: flex; align-items: center; gap: 12px; font-family: var(--font-serif); font-size: 19px; margin: 8px 0; }
.box { width: 15px; height: 15px; border: 1px solid var(--ink-2); display: inline-grid; place-items: center; font-family: var(--font-sans); font-size: 12px; line-height: 1; flex-shrink: 0; }
.handwritten { font-family: var(--font-serif); font-style: italic; color: var(--gold); font-size: 21px; }
.reply-guests { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; font-family: var(--font-serif); font-size: 18px; }

.occasions { margin: 56px calc(-1 * clamp(16px, 4vw, 48px)) 0; padding: 22px clamp(16px, 4vw, 48px); border-block: 1px solid var(--line); text-align: center;
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); line-height: 2.2; }
.occasions span + span::before { content: '◆'; color: var(--gold-line); margin: 0 18px; font-size: 8px; vertical-align: middle; }

.gallery {
  display: grid; gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(160px, 17vw, 230px);
  grid-template-areas:
    "a a b c"
    "a a d c"
    "e f f g"
    "e h h g";
}
@media (max-width: 760px) {
  .gallery {
    gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px;
    grid-template-areas: "a a" "a a" "b c" "d c" "f f" "e g" "e g" "h h";
  }
}
.gallery figure { position: relative; margin: 0; overflow: hidden; border-radius: 2px; background: var(--tint); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 36px 16px 14px;
  font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: #fffdf9;
  background: linear-gradient(to top, rgba(29, 27, 24, .55), transparent);
}

.section-title { text-align: center; margin: 96px 0 48px; }
.section-title.how-title { margin-top: clamp(40px, 6vw, 72px); }
.section-title h2 { margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { border-top: 1px solid var(--ink); padding-top: 22px; }
.step .num { font-family: var(--font-serif); font-style: italic; font-size: 22px; color: var(--gold); }
.step h3 { font-size: 28px; margin: 6px 0 10px; }
.step p { margin: 0; color: var(--muted); font-weight: 300; }

.cta-band { position: relative; text-align: center; padding: clamp(48px, 7vw, 88px) 24px; margin-top: 110px; background: var(--paper); border: 1px solid var(--line); }
.cta-band::before { content: ''; position: absolute; inset: 10px; border: 1px solid var(--gold-line); pointer-events: none; }
.cta-band h2 { font-size: clamp(34px, 5vw, 54px); font-weight: 400; margin: 0 0 14px; }
.cta-band p { color: var(--muted); margin: 0 0 30px; }

/* ---------- events ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 32px; }
.toolbar .input { flex: 1 1 260px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }

.event-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 26px 28px 24px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.event-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.ec-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 10px; }
.ec-top .eyebrow { margin: 0 0 6px; }
.attending { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.attending::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.ec-date { text-align: center; line-height: 1; min-width: 48px; }
.ec-date small { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ec-date b { font-family: var(--font-serif); font-weight: 500; font-size: 38px; }
.event-card h3 { font-size: 27px; margin: 0 0 4px; }
.ec-meta { margin: 0; color: var(--muted); font-size: 15px; }
.ec-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.event-card .ec-meta:last-of-type { margin-bottom: 18px; }
.ec-guests { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }

.empty { text-align: center; padding: clamp(40px, 7vw, 72px) 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.empty h3 { font-size: 30px; margin: 0 0 10px; }
.empty p { color: var(--muted); margin: 0 auto 26px; max-width: 44ch; }
.empty .ornament { font-family: var(--font-serif); color: var(--gold); font-size: 28px; margin-bottom: 8px; }

/* ---------- event detail ---------- */
.back { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 24px; color: var(--muted); text-decoration: none; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.back:hover { color: var(--ink); }
.invite { position: relative; text-align: center; padding: clamp(44px, 7vw, 80px) clamp(22px, 5vw, 60px); margin-bottom: 28px; background: var(--paper); border: 1px solid var(--line); }
.invite::before { content: ''; position: absolute; inset: 12px; border: 1px solid var(--gold-line); pointer-events: none; }
.invite h1 { font-size: clamp(38px, 6vw, 66px); font-weight: 400; margin: 0 auto 22px; max-width: 18ch; }
.invite .flourish { width: 48px; height: 1px; background: var(--gold); margin: 0 auto 22px; }
.invite .when { font-family: var(--font-serif); font-style: italic; font-size: clamp(20px, 2.4vw, 26px); margin: 0 0 6px; }
.invite .where { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0; }
.invite .host { font-size: 14px; color: var(--muted); margin: 18px 0 0; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }
.vibe { font-family: var(--font-serif); font-size: 22px; line-height: 1.5; margin: 0; }
.rsvp-panel { position: sticky; top: 96px; text-align: center; }
.rsvp-panel .count { font-family: var(--font-serif); font-size: 72px; line-height: 1; }
.rsvp-panel .count-label { color: var(--muted); margin: 6px 0 22px; }
.rsvp-panel .btn { width: 100%; margin-top: 10px; }
.rsvp-panel .check { justify-content: center; margin: 18px 0 8px; font-size: 15px; }
.rsvp-panel .note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

.guest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 26px 16px; }
.guest { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.guest .av { margin-bottom: 8px; }
.guest .g-name { font-family: var(--font-serif); font-size: 20px; line-height: 1.2; }
.guest .g-sub { font-size: 13px; color: var(--muted); }
.guest .g-sub.gold { color: var(--gold); }
.locked { position: relative; }
.locked .guest-grid { filter: blur(8px); opacity: .7; pointer-events: none; user-select: none; }
.lock-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; }
.lock-msg div { padding: 22px 28px; background: var(--paper); border: 1px solid var(--line); }
.lock-msg b { font-family: var(--font-serif); font-weight: 500; font-size: 22px; display: block; }

/* ---------- guest deck ---------- */
.deck-wrap { display: grid; justify-items: center; gap: 22px; }
.mingle-head { text-align: center; margin-bottom: 24px; }
.mingle-head h1 { font-size: clamp(28px, 4vw, 42px); margin: 0; }
.deck { position: relative; width: min(380px, 100%); height: clamp(400px, calc(100svh - 440px), 580px); }
.card {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 6px; background: var(--paper); border: 1px solid var(--line);
  box-shadow: var(--shadow); cursor: grab; touch-action: none; user-select: none;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .4s;
  will-change: transform;
}
.card.dragging { transition: none; cursor: grabbing; }
.card:nth-last-child(2) { transform: translateY(10px) scale(.97); }
.card:nth-last-child(n+3) { transform: translateY(20px) scale(.94); opacity: 0; }
.card-photo { position: relative; flex: 1 1 auto; min-height: 140px; display: grid; place-items: center; overflow: hidden;
  font-family: var(--font-serif); font-style: italic; font-size: 120px; color: var(--ink-2);
  background: hsl(var(--h) 24% 86%); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-info { flex: none; padding: 18px 24px 20px; }
.card-info .chips { flex-wrap: nowrap; overflow: hidden; }
.card-info .tag { white-space: nowrap; }
.card-info h2 { font-size: 34px; margin: 0; }
.card-info h2 span { font-family: var(--font-sans); font-weight: 300; font-size: 24px; color: var(--muted); margin-left: 4px; }
.card-info .city { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 2px 0 12px; }
.card-info .power { margin: 0 0 10px; font-size: 15px; }
.card-info .power b { display: block; font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 2px; }
.card-info .bio { font-size: 15px; color: var(--ink-2); margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stamp { position: absolute; top: 28px; z-index: 2; padding: 6px 16px; background: var(--paper); border: 1px solid; font-size: 14px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; opacity: 0; }
.stamp.like { left: 20px; color: var(--gold); border-color: var(--gold); }
.stamp.nope { right: 20px; color: var(--muted); border-color: var(--muted); }
.deck-actions { display: flex; gap: 24px; align-items: center; }
.round {
  width: 64px; height: 64px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 22px; line-height: 1;
  background: var(--paper); border: 1px solid var(--line-strong); color: var(--ink-2);
  transition: border-color .2s, background .2s, color .2s;
}
.round:hover { border-color: var(--ink); }
.round.like { width: 76px; height: 76px; font-size: 28px; background: var(--ink); border-color: var(--ink); color: var(--paper); }
.round.like:hover { background: #000; }
.deck-hint { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: var(--bg); animation: fade-in .3s ease; }
.match-modal { text-align: center; max-width: 460px; width: 100%; }
.match-modal h2 { font-size: clamp(56px, 11vw, 88px); font-weight: 400; font-style: italic; margin: 0; line-height: 1; }
.match-modal .pair { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 36px 0 28px; }
.match-modal .amp { font-family: var(--font-serif); font-style: italic; font-size: 40px; color: var(--gold); }
.match-modal p { color: var(--muted); font-size: 17px; margin: 0 0 30px; }
.match-modal .btns { display: grid; gap: 10px; }

.modal { position: relative; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: clamp(24px, 4vw, 40px); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* ---------- matches & chat ---------- */
.list-title { font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.match-strip { display: flex; gap: 22px; overflow-x: auto; padding: 4px 4px 12px; margin-bottom: 36px; }
.match-strip a { display: grid; justify-items: center; gap: 8px; text-decoration: none; font-family: var(--font-serif); font-size: 18px; flex-shrink: 0; }
.match-strip .av { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--gold-line); }
.convo-list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.convo { display: flex; gap: 16px; align-items: center; padding: 18px 22px; text-decoration: none; transition: background .2s; }
.convo + .convo { border-top: 1px solid var(--line); }
.convo:hover { background: var(--tint); }
.convo .c-main { flex: 1; min-width: 0; }
.convo .c-name { font-family: var(--font-serif); font-size: 21px; line-height: 1.2; }
.convo .c-event { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.convo .c-last { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.convo .c-time { color: var(--muted); font-size: 13px; }

.chat { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 460px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
@media (max-width: 760px) { .chat { height: calc(100vh - 260px); } }
.chat-head { display: flex; gap: 14px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.chat-head h2 { font-size: 24px; margin: 0; }
.chat-head a { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.chat-body { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 74%; padding: 11px 16px; border-radius: 16px; overflow-wrap: anywhere; animation: fade-in .25s ease; }
.bubble.them { align-self: flex-start; background: var(--tint); border-bottom-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; }
.bubble time { display: block; font-size: 11px; opacity: .6; margin-top: 2px; }
.chat-intro { text-align: center; margin: auto 0; color: var(--muted); }
.chat-intro .av { margin: 0 auto 16px; }
.icebreakers { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.chat-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }

/* ---------- profile ---------- */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }
.photo-row { display: flex; gap: 22px; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.preview-col { position: sticky; top: 96px; }
.preview-col .eyebrow { text-align: center; }
.preview-col .deck { height: 560px; margin: 0 auto; }
.preview-col .card { cursor: default; }

/* ---------- auth ---------- */
.auth { position: relative; max-width: 480px; margin: 2vh auto 0; padding: clamp(28px, 5vw, 48px); background: var(--paper); border: 1px solid var(--line); }
.auth h1 { font-size: clamp(36px, 5vw, 48px); font-weight: 400; margin: 0 0 8px; }
.auth .sub { color: var(--muted); margin: 0 0 30px; }
.auth .btn-primary { width: 100%; margin-top: 4px; }
.auth .switch { text-align: center; margin: 22px 0 0; color: var(--muted); font-size: 15px; }
.auth .switch a { color: var(--ink); }

/* ---------- footer, toasts, loader ---------- */
.footer { text-align: center; color: var(--muted); padding: 28px 16px 44px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; border-top: 1px solid var(--line); max-width: 1160px; margin: 0 auto; }
@media (max-width: 760px) { .footer { padding-bottom: 110px; } }
#toasts { position: fixed; top: 84px; left: 50%; translate: -50% 0; z-index: 60; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 12px 22px; border-radius: 2px; background: var(--ink); color: var(--paper); font-size: 15px; box-shadow: var(--shadow); animation: fade-in .3s ease; }
.toast.err { background: var(--danger); }
.loader { display: grid; place-items: center; padding: 100px; }
.loader span { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); border-top-color: var(--ink); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (max-width: 760px) { .deck-hint { display: none; } }
