/*
  Lozenge: group chat app page (Screenery template, slug y2k)
  See-through candy plastic, around 2000: frosted ice ground, coloured translucent shells over a visible board,
  chrome bezels and bubble keys. The current group's shell colour flows through the hero (registered colour props).

  Contents
   1. Tokens (six shells, ice, graphite, chrome) and registered colour properties
   2. Base and browser surfaces
   3. Kit: buttons (candy, chrome), fields, alerts, icons
   4. Header
   5. Hero and the handset: case, board, gloss, grille, bezel, keys
   6. The chat app on the screen: status, threads, conversation, messages, reactions, composer, voice, settings
   7. Shell picker
   8. Inside: X-ray lightbox
   9. House rules
  10. Price and splitter
  11. Start a group: form, invitees, seat lights, ticket
  12. Questions, footer
  13. Motion
  14. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
@property --shell { syntax: '<color>'; inherits: true; initial-value: #16a3c2; }
@property --shell-deep { syntax: '<color>'; inherits: true; initial-value: #0a6a80; }

:root {
  /* The six shells (named after the fruit gums they look like) */
  --lagoon: #16a3c2;   --lagoon-deep: #0a6a80;
  --satsuma: #ff8f1f;  --satsuma-deep: #9a4700;
  --damson: #8a55e0;   --damson-deep: #5a2aae;
  --kiwi: #79c23a;     --kiwi-deep: #3c6b10;
  --rhubarb: #ef4a85;  --rhubarb-deep: #a3124a;
  --smoke: #6d7a88;    --smoke-deep: #3a4552;

  /* Ice, graphite and chrome */
  --ice: #eef6f8;
  --ice-2: #dcebf0;
  --ice-3: #c5dbe3;
  --ink: #1b2430;
  --ink-2: #3c4856;
  --chrome-hi: #ffffff;
  --chrome-1: #e9eef2;
  --chrome-2: #b9c4cd;
  --chrome-3: #7f8c97;
  --lightbox: #0d2430;
  --lightbox-2: #143542;
  --xray: #bfeaf5;
  --xray-dim: #8cc6d6;
  --alarm: #c4103c;

  /* Current shell (set per [data-flavour] below, animated through @property) */
  --shell-pale: color-mix(in srgb, var(--shell) 16%, var(--ice));
  --shell-mid: color-mix(in srgb, var(--shell) 40%, var(--ice));

  /* Type */
  --display: 'Tilt Warp', 'Lato', sans-serif;
  --body: 'Lato', system-ui, sans-serif;
  --fs-0: 0.8125rem;
  --fs-1: 1rem;
  --fs-2: 1.1875rem;
  --fs-3: clamp(1.6rem, 1.1rem + 1.8vw, 2.6rem);
  --fs-4: clamp(2.3rem, 1.3rem + 3.6vw, 4.6rem);

  /* Space and shape */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;
  --r-sm: 10px; --r-md: 18px; --r-lg: 28px; --r-pill: 999px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lift: 0 2px 4px rgb(27 36 48 / 0.12), 0 14px 30px -12px rgb(27 36 48 / 0.35);
}

body[data-flavour='lagoon'] { --shell: var(--lagoon); --shell-deep: var(--lagoon-deep); }
body[data-flavour='satsuma'] { --shell: var(--satsuma); --shell-deep: var(--satsuma-deep); }
body[data-flavour='damson'] { --shell: var(--damson); --shell-deep: var(--damson-deep); }
body[data-flavour='kiwi'] { --shell: var(--kiwi); --shell-deep: var(--kiwi-deep); }
body[data-flavour='rhubarb'] { --shell: var(--rhubarb); --shell-deep: var(--rhubarb-deep); }
body[data-flavour='smoke'] { --shell: var(--smoke); --shell-deep: var(--smoke-deep); }

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; scrollbar-color: var(--shell-deep) var(--ice-2); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--fs-1);
  line-height: 1.55;
  color: var(--ink);
  background: var(--ice);
  caret-color: var(--shell-deep);
  accent-color: var(--shell-deep);
  overflow-x: clip;
  transition: --shell 900ms var(--ease), --shell-deep 900ms var(--ease);
}
::selection { background: var(--shell); color: var(--ink); }
img, svg { display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.04; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -60px; z-index: 100; background: var(--ink); color: var(--ice); padding: var(--s2) var(--s4); border-radius: var(--r-pill); }
.skip:focus { top: var(--s3); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.small { font-size: var(--fs-0); }

/* ---------- 3. Kit ---------- */
.btn {
  --b: var(--shell-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 1.4em;
  border: 0; border-radius: var(--r-pill);
  font-family: var(--body); font-weight: 900; font-size: var(--fs-1); text-decoration: none;
  cursor: pointer; position: relative; isolation: isolate;
  transition: transform 160ms var(--ease), filter 160ms var(--ease), box-shadow 160ms var(--ease);
}
.btn-sm { min-height: 40px; padding: 0 1.1em; font-size: 0.9375rem; }
.btn-wide { width: 100%; }
/* candy: a gel pill with a highlight band and a darker lower lip */
.btn-candy {
  color: #fff;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.3) 0 9px, rgb(255 255 255 / 0) 12px),
    linear-gradient(180deg, color-mix(in srgb, var(--b) 90%, #fff), var(--b) 45%);
  box-shadow: inset 0 -3px 6px rgb(0 0 0 / 0.22), inset 0 1px 0 rgb(255 255 255 / 0.7), 0 2px 3px rgb(0 0 0 / 0.18), 0 10px 22px -10px var(--b);
  text-shadow: 0 1px 1px rgb(0 0 0 / 0.25);
}
.btn-candy:hover { filter: brightness(1.07) saturate(1.08); transform: translateY(-1px); }
.btn-candy:active { transform: translateY(1px); box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.3), 0 1px 2px rgb(0 0 0 / 0.2); }
/* chrome: brushed metal pill */
.btn-chrome {
  color: var(--ink);
  background: linear-gradient(180deg, var(--chrome-hi) 0%, var(--chrome-1) 45%, var(--chrome-2) 52%, var(--chrome-1) 100%);
  box-shadow: inset 0 0 0 1px rgb(27 36 48 / 0.18), inset 0 1px 0 #fff, 0 2px 4px rgb(27 36 48 / 0.15);
}
.btn-chrome:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn-chrome:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled='true'] { cursor: progress; filter: saturate(0.6); }

/* fields: frosted wells */
.field { display: grid; gap: var(--s1); }
label, .label { font-weight: 700; font-size: 0.9375rem; display: flex; justify-content: space-between; gap: var(--s3); }
.count, .seats { font-weight: 400; font-variant-numeric: tabular-nums; color: var(--ink-2); }
input[type='text'], input[type='email'], input:not([type]) {
  font: inherit; color: var(--ink); width: 100%; min-height: 48px;
  padding: 0 var(--s4); border-radius: var(--r-md);
  border: 1.5px solid color-mix(in srgb, var(--ink) 28%, transparent);
  background: linear-gradient(180deg, rgb(27 36 48 / 0.06), rgb(255 255 255 / 0.9) 40%);
  box-shadow: inset 0 2px 4px rgb(27 36 48 / 0.1);
  transition: border-color 160ms, box-shadow 160ms;
}
input::placeholder { color: #5d6a77; }
input:focus-visible { outline: none; border-color: var(--shell-deep); box-shadow: inset 0 2px 4px rgb(27 36 48 / 0.1), 0 0 0 4px color-mix(in srgb, var(--shell) 40%, transparent); }
input[aria-invalid='true'] { border-color: var(--alarm); }
.err { color: var(--alarm); font-size: 0.875rem; font-weight: 700; min-height: 0; }
.err:empty { display: none; }
.alert[hidden] { display: none; }
.alert { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: #fde3ea; color: #7d0a28; font-weight: 700; display: flex; gap: var(--s3); align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1.5px solid #f2a7bb; }

/* ---------- 4. Header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--s5);
  padding: var(--s3) var(--gutter);
  background: color-mix(in srgb, var(--ice) 88%, var(--shell));
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  box-shadow: 0 1px 0 #fff inset;
}
.logo { display: inline-flex; align-items: center; gap: var(--s2); text-decoration: none; min-height: 44px; }
.logo-pill {
  width: 46px; height: 28px; border-radius: var(--r-pill); position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--shell) 70%, #fff), var(--shell) 70%);
  box-shadow: inset 0 -3px 5px color-mix(in srgb, var(--shell-deep) 60%, transparent), inset 0 0 0 1.5px color-mix(in srgb, var(--shell-deep) 50%, transparent), 0 3px 6px -2px var(--shell-deep);
}
.logo-pill span { position: absolute; left: 6px; right: 6px; top: 4px; height: 8px; border-radius: var(--r-pill); background: rgb(255 255 255 / 0.7); }
.logo-word { font-family: var(--display); font-size: 1.5rem; line-height: 1; }
.nav { display: flex; gap: var(--s1); margin-left: auto; }
.nav a { text-decoration: none; font-weight: 700; padding: var(--s2) var(--s3); border-radius: var(--r-pill); min-height: 40px; display: inline-flex; align-items: center; }
.nav a:hover { background: rgb(255 255 255 / 0.75); }

/* ---------- 5. Hero and the handset ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 4.6fr) minmax(0, 7.4fr); gap: var(--s6);
  align-items: center;
  padding: var(--s7) var(--gutter) var(--s8);
  background:
    radial-gradient(60% 70% at 78% 40%, color-mix(in srgb, var(--shell) 30%, transparent), transparent 70%),
    linear-gradient(180deg, var(--shell-pale), var(--ice));
  position: relative;
}
/* faint moulded ribs, like the inside of a clear case */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgb(255 255 255 / 0.45) 0 1px, transparent 1px 6px);
  mask: linear-gradient(180deg, #000, transparent 70%);
}
.hero > * { position: relative; }
.hero h1 { font-size: var(--fs-4); max-width: 11ch; }
.lede { font-size: var(--fs-2); max-width: 36ch; margin-top: var(--s5); color: var(--ink-2); }
.hero-act { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.spec { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s6) 0 0; }
.spec div { padding: var(--s2) var(--s4); border-radius: var(--r-pill); background: rgb(255 255 255 / 0.7); box-shadow: inset 0 0 0 1px rgb(27 36 48 / 0.12); display: flex; gap: var(--s2); align-items: baseline; }
.spec dt { font-size: var(--fs-0); color: var(--ink-2); }
.spec dd { margin: 0; font-weight: 900; font-variant-numeric: tabular-nums; }

.handset-wrap { display: grid; gap: var(--s4); justify-items: center; min-width: 0; }
.handset { width: 100%; max-width: 820px; outline: none; }

/* The case: tinted clear plastic, board visible inside, thick moulded rim */
.case {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 84px minmax(0, 1fr) 96px; align-items: center; gap: var(--s4);
  padding: 30px 24px;
  border-radius: 150px / 130px;
  color: var(--shell-deep);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--shell) 52%, transparent), color-mix(in srgb, var(--shell) 78%, transparent));
  box-shadow:
    inset 0 2px 1px rgb(255 255 255 / 0.85),
    inset 0 0 0 2px color-mix(in srgb, var(--shell-deep) 35%, transparent),
    inset 0 -22px 40px -8px color-mix(in srgb, var(--shell-deep) 55%, transparent),
    inset 0 26px 40px -20px rgb(255 255 255 / 0.6),
    0 2px 3px rgb(27 36 48 / 0.2),
    0 40px 60px -30px color-mix(in srgb, var(--shell-deep) 85%, transparent),
    0 18px 28px -18px rgb(27 36 48 / 0.4);
}
.guts { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); z-index: -1; opacity: 0.55; border-radius: inherit; }
/* light catching the curved top and a hot spot on the left shoulder */
.gloss {
  position: absolute; inset: 6px 8% auto; height: 34%; border-radius: 140px 140px 60% 60% / 100px 100px 40% 40%;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.55), rgb(255 255 255 / 0));
  pointer-events: none; z-index: 3; mix-blend-mode: screen;
}
.screw { position: absolute; width: 12px; height: 12px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle at 35% 30%, #fff, var(--chrome-2) 55%, var(--chrome-3));
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.3); }
.screw::after { content: ''; position: absolute; inset: 5px 2px; background: var(--chrome-3); border-radius: 1px; transform: rotate(35deg); }
.s1 { top: 46px; left: 74px; } .s2 { top: 46px; right: 74px; } .s3 { bottom: 46px; left: 74px; } .s4 { bottom: 46px; right: 74px; }
.loop { position: absolute; top: -16px; right: 22%; width: 54px; height: 30px; border-radius: 30px 30px 0 0; z-index: -2;
  border: 7px solid color-mix(in srgb, var(--shell) 70%, transparent); border-bottom: 0; }

/* speaker grille: a round field of drilled holes with a status light */
.grille {
  width: 72px; height: 150px; border-radius: 40px; justify-self: center; position: relative; z-index: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--shell-deep) 85%, #000) 0 3px, transparent 3.6px) 0 0 / 12px 12px;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--shell-deep) 30%, transparent);
  mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 92%, transparent 94%);
}
.led { position: absolute; left: 50%; bottom: -2px; translate: -50% 0; width: 0; height: 0; }
.case .led-dot { display: none; }

/* chrome bezel and the screen */
.bezel {
  position: relative; z-index: 2; padding: 9px; border-radius: 34px;
  background: linear-gradient(160deg, #fff 0%, var(--chrome-1) 22%, var(--chrome-3) 48%, var(--chrome-1) 62%, #fff 78%, var(--chrome-2) 100%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.9), 0 6px 14px -6px rgb(0 0 0 / 0.45), inset 0 0 0 1px rgb(0 0 0 / 0.2);
}
.screen {
  container-type: inline-size; container-name: screen;
  height: 480px; border-radius: 26px; overflow: hidden; position: relative;
  background: #f7fbfc; color: var(--ink);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.25), inset 0 6px 12px -6px rgb(0 0 0 / 0.3);
}
/* a faint reflection on the glass */
.screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 20;
  background: linear-gradient(115deg, rgb(255 255 255 / 0.35) 0 18%, transparent 18.5% 100%); opacity: 0.35; }

/* keys: one big bubble button, two small ones */
.keys { display: grid; justify-items: center; gap: var(--s4); position: relative; z-index: 2; }
.key {
  border: 0; cursor: pointer; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background:
    radial-gradient(circle at 50% 22%, rgb(255 255 255 / 0.75) 0 18%, rgb(255 255 255 / 0) 42%),
    radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--shell) 70%, #fff), var(--shell-deep) 85%);
  box-shadow: inset 0 -4px 8px rgb(0 0 0 / 0.28), 0 0 0 4px color-mix(in srgb, var(--chrome-1) 90%, transparent), 0 0 0 5px rgb(27 36 48 / 0.2), 0 6px 10px -4px rgb(0 0 0 / 0.45);
  transition: transform 140ms var(--ease), filter 140ms;
}
.key:hover { filter: brightness(1.08); }
.key:active { transform: scale(0.94); }
.key-talk { width: 76px; height: 76px; }
.key-talk .ic { width: 30px; height: 30px; stroke-width: 2; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.3)); }
.key-talk[aria-pressed='true'] { background: radial-gradient(circle at 50% 22%, rgb(255 255 255 / 0.7) 0 18%, rgb(255 255 255 / 0) 42%), radial-gradient(circle at 50% 70%, #ff6b8e, var(--alarm) 85%); }
.key-pair { display: flex; gap: var(--s3); }
.key-mini { width: 36px; height: 36px; }
.key-mini .ic { width: 18px; height: 18px; stroke-width: 2.2; }

/* ---------- 6. The chat app ---------- */
.app { display: flex; flex-direction: column; height: 100%; font-size: 0.9375rem; line-height: 1.4; }
.status { display: flex; align-items: center; gap: var(--s3); padding: 6px 18px 4px 22px; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); background: #eef4f6; border-bottom: 1px solid #dde7eb; flex: none; }
.st-day { font-weight: 400; }
.st-sig { margin-left: auto; display: inline-flex; align-items: center; gap: var(--s1); }
.st-sig .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.st-sig.off { color: var(--alarm); }
.st-retry { border: 0; background: none; font-weight: 900; color: var(--alarm); text-decoration: underline; cursor: pointer; font-size: 0.75rem; padding: 4px; min-height: 24px; }

.panes { flex: 1; min-height: 0; display: grid; grid-template-columns: 206px minmax(0, 1fr); position: relative; }
.threads { border-right: 1px solid #dde7eb; background: #f0f6f8; overflow-y: auto; min-height: 0; }
.threads ul { list-style: none; margin: 0; padding: var(--s2); display: grid; gap: 2px; }
.thread {
  width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: 'bean name time' 'bean last unread';
  column-gap: 7px; padding: 9px 8px; border-radius: 14px; min-height: 48px;
}
.thread:hover { background: #e2edf1; }
.thread[aria-current='true'] { background: #fff; box-shadow: 0 1px 3px rgb(27 36 48 / 0.12), inset 0 0 0 1px #d6e2e7; }
.bean { grid-area: bean; width: 18px; height: 26px; border-radius: 9px; align-self: center; position: relative;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 60%);
  box-shadow: inset 0 -3px 4px rgb(0 0 0 / 0.18), inset 0 0 0 1px rgb(0 0 0 / 0.12); }
.bean::after { content: ''; position: absolute; left: 4px; top: 3px; width: 4px; height: 10px; border-radius: 3px; background: rgb(255 255 255 / 0.7); }
.t-name { grid-area: name; font-weight: 900; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.t-name .ic { width: 14px; height: 14px; color: var(--ink-2); display: inline-block; vertical-align: -2px; margin-left: 3px; }
.t-time { grid-area: time; font-size: 0.75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.thread:not(:has(.t-unread)) .t-last { grid-column: 2 / -1; }
.t-last { grid-area: last; font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.t-unread { grid-area: unread; align-self: center; justify-self: end; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--c-deep, var(--ink)); color: #fff; font-size: 0.75rem; font-weight: 900; display: grid; place-items: center; }

.convo { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #f9fcfd; }
.convo-head { display: flex; align-items: center; gap: var(--s2); padding: 8px 10px 8px 16px; border-bottom: 1px solid #e1eaee; flex: none; min-height: 52px; }
.ch-titles { min-width: 0; flex: 1; }
.ch-name { font-family: var(--display); font-size: 1.125rem; display: block; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-sub { font-size: 0.75rem; color: var(--ink-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { border: 0; background: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: #e7eff2; color: var(--ink); }
.back-btn { display: none; }
.ch-muted { color: var(--ink-2); display: inline-grid; }
.ch-muted .ic { width: 16px; height: 16px; }

.msgs { list-style: none; margin: 0; padding: 12px 12px 8px; flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; scrollbar-width: thin; }
.day { align-self: center; font-size: 0.6875rem; font-weight: 900; letter-spacing: 0.04em; color: var(--ink-2); background: #e6eef1; padding: 3px 10px; border-radius: 10px; margin: 4px 0; }
.msg { display: flex; align-items: flex-end; gap: 6px; position: relative; max-width: 86%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.av { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 0.625rem; font-weight: 900; color: #fff; background: var(--c); box-shadow: inset 0 -2px 3px rgb(0 0 0 / 0.2); }
.av.ghost { visibility: hidden; }
.bw { display: grid; gap: 2px; min-width: 0; }
.msg.me .bw { justify-items: end; }
.who { font-size: 0.6875rem; font-weight: 900; color: var(--ink-2); padding-left: 10px; }
.bubble {
  padding: 8px 12px; border-radius: 18px; background: #fff; overflow-wrap: anywhere;
  box-shadow: 0 1px 2px rgb(27 36 48 / 0.12), inset 0 0 0 1px #e0e8ec;
}
.msg.them .bubble { border-bottom-left-radius: 6px; }
.msg.me .bubble {
  color: #fff; border-bottom-right-radius: 6px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--shell-deep) 86%, #fff) 0%, var(--shell-deep) 55%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 1px 2px rgb(27 36 48 / 0.2);
}
.meta { font-size: 0.6875rem; color: var(--ink-2); display: flex; align-items: center; gap: 4px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.meta .ic { width: 14px; height: 14px; stroke-width: 2; }
.meta > span { display: inline-flex; align-items: center; gap: 3px; }
.meta .read { color: var(--shell-deep); font-weight: 700; }
.meta .wait { color: var(--alarm); font-weight: 700; }

/* reactions */
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 3px; border: 0; cursor: pointer; padding: 2px 8px 2px 5px; min-height: 26px; border-radius: 13px; background: #fff; box-shadow: inset 0 0 0 1px #d4dfe4; font-size: 0.75rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.chip .ic { width: 16px; height: 16px; }
.chip[aria-pressed='true'] { background: color-mix(in srgb, var(--shell) 22%, #fff); box-shadow: inset 0 0 0 1.5px var(--shell-deep); }
.ic.r-heart, .chip .r-heart { fill: #e8336e; stroke: #b0154a; }
.react-btn { align-self: center; border: 0; background: #fff; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); opacity: 0; box-shadow: 0 1px 3px rgb(27 36 48 / 0.18); transition: opacity 120ms; flex: none; }
.react-btn .ic { width: 18px; height: 18px; }
.msg:hover .react-btn, .msg:focus-within .react-btn, .msg.picking .react-btn { opacity: 1; }
@media (hover: none) { .react-btn { opacity: 0.85; } }
.tray {
  position: absolute; z-index: 10; bottom: calc(100% - 4px); display: flex; gap: 2px; padding: 4px; border-radius: var(--r-pill);
  background: linear-gradient(180deg, #fff, var(--chrome-1)); box-shadow: var(--shadow-lift), inset 0 0 0 1px rgb(27 36 48 / 0.12);
}
.msg.them .tray { left: 30px; } .msg.me .tray { right: 0; }
.tray button { border: 0; background: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.tray button:hover, .tray button:focus-visible { background: color-mix(in srgb, var(--shell) 25%, #fff); }
.tray .ic { width: 20px; height: 20px; }

/* voice notes */
.voice { display: flex; align-items: center; gap: 8px; min-width: 188px; }
.vplay { border: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; background: var(--shell-deep); color: #fff; box-shadow: inset 0 -2px 3px rgb(0 0 0 / 0.25); }
.msg.me .vplay { background: #fff; color: var(--shell-deep); }
.vplay .ic { width: 16px; height: 16px; fill: currentColor; }
.wave { display: flex; align-items: center; gap: 2px; height: 26px; flex: 1; }
.wave i { width: 3px; border-radius: 2px; background: currentColor; opacity: 0.35; height: var(--h); }
.wave i.on { opacity: 1; }
.vtime { font-size: 0.75rem; font-variant-numeric: tabular-nums; font-weight: 700; min-width: 30px; }

/* typing indicator */
.typing { display: flex; align-items: center; gap: 8px; padding: 0 14px 6px; font-size: 0.75rem; color: var(--ink-2); min-height: 26px; flex: none; }
.typing[hidden] { display: none; }
.dots { display: inline-flex; gap: 3px; padding: 7px 10px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #dfe8ec; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); animation: bob 1.1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: 0.15s; } .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bob { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* empty state */
.empty { margin: auto; text-align: center; display: grid; gap: var(--s2); justify-items: center; padding: var(--s5); max-width: 30ch; color: var(--ink-2); }
.empty .bean-big { width: 44px; height: 64px; border-radius: 22px; background: linear-gradient(90deg, color-mix(in srgb, var(--shell) 70%, #fff), var(--shell) 60%); box-shadow: inset 0 -5px 8px rgb(0 0 0 / 0.18); }
.empty strong { color: var(--ink); font-family: var(--display); font-weight: 400; font-size: 1.125rem; }

/* composer */
.composer { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid #e1eaee; background: #f2f7f9; flex: none; position: relative; }
.composer input { min-height: 40px; border-radius: 20px; padding: 0 14px; font-size: 0.9375rem; }
.c-btn { border: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.c-mic { background: #e3ecf0; color: var(--ink); }
.c-mic:hover { background: #d5e2e8; }
.c-send { color: #fff; background: radial-gradient(circle at 50% 25%, rgb(255 255 255 / 0.5) 0 20%, transparent 45%), var(--shell-deep); box-shadow: inset 0 -2px 4px rgb(0 0 0 / 0.25); }
.c-hint { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 4px); padding: 6px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 0.75rem; }
.c-hint[hidden] { display: none; }
.rec { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 12px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--alarm); min-width: 0; }
.rec[hidden] { display: none; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--alarm); animation: pulse 1s infinite; flex: none; }
@keyframes pulse { 50% { opacity: 0.25; } }
.rec-time { font-weight: 900; font-variant-numeric: tabular-nums; color: var(--alarm); font-size: 0.875rem; }
.rec-wave { flex: 1; display: flex; gap: 2px; align-items: center; height: 24px; overflow: hidden; color: var(--alarm); min-width: 0; }
.rec-wave i { width: 3px; flex: none; border-radius: 2px; background: currentColor; height: var(--h); }
.rec-cancel { border: 0; background: none; font-weight: 900; font-size: 0.8125rem; color: var(--ink-2); cursor: pointer; padding: 6px 8px; border-radius: 12px; min-height: 32px; }
.rec-cancel:hover { background: #eef3f5; }

/* settings sheet */
.sheet {
  position: absolute; inset: 0; z-index: 15; background: #f7fbfc; display: flex; flex-direction: column;
  transition: translate 380ms var(--ease), opacity 200ms;
}
.sheet[hidden] { display: none; }
.sheet-head { display: flex; align-items: center; gap: var(--s2); padding: 10px 10px 10px 18px; border-bottom: 1px solid #e1eaee; }
.sheet-head h3 { font-size: 1.125rem; flex: 1; }
.sheet-body { overflow-y: auto; padding: 14px 18px 18px; display: grid; gap: 18px; align-content: start; }
.set-group { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.set-group legend, .set-title { font-weight: 900; font-size: 0.875rem; padding: 0; margin-bottom: 6px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.seg label { display: block; font-weight: 700; font-size: 0.8125rem; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; min-height: 40px; padding: 4px 8px; text-align: center; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px #d4dfe4; cursor: pointer; line-height: 1.2; }
.seg input:checked + span { background: color-mix(in srgb, var(--shell) 22%, #fff); box-shadow: inset 0 0 0 2px var(--shell-deep); }
.seg input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.set-note { font-size: 0.8125rem; color: var(--ink-2); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.switch { border: 0; cursor: pointer; width: 54px; height: 32px; border-radius: 16px; position: relative; flex: none;
  background: #c7d3d9; box-shadow: inset 0 2px 4px rgb(0 0 0 / 0.2); transition: background 200ms; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #fff, var(--chrome-1) 60%, var(--chrome-2)); box-shadow: 0 1px 3px rgb(0 0 0 / 0.35); transition: translate 220ms var(--ease); }
.switch[aria-checked='true'] { background: var(--shell-deep); }
.switch[aria-checked='true']::after { translate: 22px 0; }
.members { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.members li { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; }

/* ---------- 7. Shell picker ---------- */
.flavours { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; justify-items: center; gap: var(--s2); }
.flavours legend { font-weight: 700; font-size: 0.9375rem; text-align: center; margin: 0 auto var(--s2); padding: 0; }
.fl-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }
.fl { display: grid; justify-items: center; gap: 4px; cursor: pointer; padding: 6px 8px; border-radius: var(--r-md); position: relative; font-weight: 400; }
.fl input { position: absolute; opacity: 0; pointer-events: none; }
.fl-drop {
  width: 40px; height: 40px; border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 36% 28%, rgb(255 255 255 / 0.85) 0 12%, rgb(255 255 255 / 0) 30%), radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--c) 75%, #fff), var(--c) 80%);
  box-shadow: inset 0 -4px 6px rgb(0 0 0 / 0.2), 0 3px 6px -2px rgb(27 36 48 / 0.4);
  transition: transform 220ms var(--ease);
}
.fl-name { font-size: 0.8125rem; }
.fl:hover .fl-drop { transform: translateY(-2px) scale(1.05); }
.fl input:checked ~ .fl-drop { box-shadow: inset 0 -4px 6px rgb(0 0 0 / 0.2), 0 0 0 3px var(--ice), 0 0 0 5px var(--ink); }
.fl input:checked ~ .fl-name { font-weight: 900; }
.fl input:focus-visible ~ .fl-drop { outline: 3px solid var(--ink); outline-offset: 6px; }
.hint { font-size: var(--fs-0); color: var(--ink-2); text-align: center; max-width: 60ch; }

/* ---------- 8. Inside: X-ray lightbox ---------- */
.inside { background: radial-gradient(80% 90% at 30% 40%, var(--lightbox-2), var(--lightbox)); color: var(--xray); padding: var(--s9) var(--gutter); }
.inside-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: end; margin-bottom: var(--s7); }
.inside h2 { font-size: var(--fs-3); color: #fff; }
.inside-head p { max-width: 52ch; color: var(--xray); }
.xray { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
.xray-fig { margin: 0; position: sticky; top: 100px; }
.board { width: 100%; height: auto; overflow: visible; }
.board .b-edge { fill: rgb(191 234 245 / 0.04); stroke: var(--xray-dim); stroke-width: 2; stroke-dasharray: 2 6; }
.board .b-trace { fill: none; stroke: var(--xray-dim); stroke-width: 2; opacity: 0.6; }
.board .part { fill: rgb(191 234 245 / 0.06); stroke: var(--xray); stroke-width: 2.5; stroke-linecap: round; transition: fill 240ms, stroke 240ms, filter 240ms; cursor: pointer; }
.board .part .holes, .board .part .leds { fill: var(--xray-dim); stroke: none; }
.board .part.on { fill: rgb(22 163 194 / 0.35); stroke: #fff; filter: drop-shadow(0 0 10px rgb(150 230 250 / 0.7)); }
.board .part.on .leds { fill: #9df07a; }
.parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.parts button { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: var(--s3) var(--s4); border-radius: var(--r-md); display: grid; gap: 2px; color: var(--xray); border-top: 1px solid rgb(191 234 245 / 0.16); }
.parts li:first-child button { border-top-color: transparent; }
.parts button:hover, .parts button.on { background: rgb(191 234 245 / 0.1); }
.parts button:focus-visible { outline-color: #fff; }
.p-name { font-family: var(--display); font-size: 1.25rem; color: #fff; }
.p-note { font-size: 0.9375rem; max-width: 58ch; }

/* ---------- 9. House rules ---------- */
.rules { padding: var(--s9) var(--gutter); background: var(--ice); }
.rules-sheet {
  position: relative; border-radius: 56px; padding: var(--s8) clamp(20px, 5vw, 72px);
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.22) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, color-mix(in srgb, var(--kiwi) 80%, #fff), var(--kiwi));
  box-shadow: inset 0 3px 0 rgb(255 255 255 / 0.6), inset 0 -18px 34px -10px rgb(60 107 16 / 0.45), 0 24px 40px -24px rgb(60 107 16 / 0.8);
  color: var(--ink);
}
.rules h2 { font-size: var(--fs-3); }
.rules-lede { margin-top: var(--s3); max-width: 50ch; font-size: var(--fs-2); }
.rule-list { list-style: none; margin: var(--s7) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--s6); }
.rule-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: var(--s3); align-content: start; }
.rule-list li::before { content: ''; grid-row: span 2; width: 16px; height: 28px; margin-top: 4px; border-radius: 8px;
  background: linear-gradient(90deg, #fff, #e9f7dc 60%); box-shadow: inset 0 -3px 4px rgb(60 107 16 / 0.35), 0 1px 0 rgb(255 255 255 / 0.6); }
.rule-list h3 { font-size: 1.375rem; }
.rule-list p { margin-top: var(--s2); max-width: 40ch; }

/* ---------- 10. Price ---------- */
.price { padding: var(--s8) var(--gutter) var(--s9); background: linear-gradient(180deg, var(--ice), color-mix(in srgb, var(--satsuma) 26%, var(--ice))); }
.price-copy { max-width: 62ch; margin-bottom: var(--s7); }
.price h2 { font-size: var(--fs-3); max-width: 24ch; }
.price-copy p { margin-top: var(--s4); font-size: var(--fs-2); color: var(--ink-2); }
.price-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s5); align-items: stretch; }
.tier { padding: var(--s6); border-radius: var(--r-lg); background: rgb(255 255 255 / 0.85); box-shadow: inset 0 0 0 1.5px rgb(27 36 48 / 0.12), var(--shadow-lift); }
.tier h3 { font-size: 1.5rem; }
.cost { margin-top: var(--s3); color: var(--ink-2); }
.cost .num { font-family: var(--display); font-size: 2.75rem; color: var(--ink); line-height: 1; display: block; margin-bottom: var(--s1); font-variant-numeric: tabular-nums; }
.tier ul { margin: var(--s5) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.tier li { padding-left: 22px; position: relative; }
.tier li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 20%, var(--c, var(--lagoon)) 55%); box-shadow: inset 0 -1px 2px rgb(0 0 0 / 0.2); }
.tier-extra { --c: var(--satsuma); background: linear-gradient(180deg, color-mix(in srgb, var(--satsuma) 34%, #fff), color-mix(in srgb, var(--satsuma) 12%, #fff)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--satsuma-deep) 50%, transparent), inset 0 3px 0 #fff, var(--shadow-lift); }
.splitter { padding: var(--s6); border-radius: var(--r-lg); background: var(--ink); color: var(--ice); display: grid; gap: var(--s3); align-content: start; box-shadow: var(--shadow-lift); }
.splitter h3 { font-size: 1.5rem; color: #fff; }
.sp-label { color: var(--ice); }
.sp-row { display: flex; align-items: center; gap: var(--s4); }
.sp-row input { flex: 1; accent-color: var(--satsuma); min-height: 32px; }
.sp-row output { font-family: var(--display); font-size: 2.25rem; min-width: 1.2ch; text-align: right; font-variant-numeric: tabular-nums; color: #fff; }
.sp-sum { font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.sp-sum b { color: #ffc58a; }

/* ---------- 11. Start a group ---------- */
.start {
  padding: var(--s9) var(--gutter); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s7); align-items: start;
  background:
    linear-gradient(180deg, #7d47d6, var(--damson-deep));
  color: #fff;
}
.start h2 { font-size: var(--fs-3); }
.start-copy p { margin-top: var(--s4); max-width: 44ch; font-size: var(--fs-2); }
.start-copy .small { font-size: var(--fs-0); opacity: 1; color: #efe6ff; }
.wrapper {
  border-radius: 40px; padding: clamp(20px, 3.5vw, 44px); color: var(--ink);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.96), rgb(242 236 255 / 0.94));
  box-shadow: inset 0 3px 0 #fff, inset 0 0 0 2px rgb(255 255 255 / 0.6), 0 30px 50px -30px rgb(20 0 60 / 0.8);
}
.start-form { display: grid; gap: var(--s5); }
.start-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s4); min-width: 0; }
.start-form fieldset + fieldset { padding-top: var(--s5); border-top: 1.5px dashed color-mix(in srgb, var(--damson) 35%, transparent); }
.start-form legend { float: left; font-family: var(--display); font-size: 1.375rem; padding: 0; margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); width: 100%; }
.start-form legend .seats { font-family: var(--body); font-size: 0.9375rem; }
.shell-pick { display: flex; flex-wrap: wrap; gap: var(--s2); }
.shell-pick label { cursor: pointer; display: block; position: relative; }
.shell-pick input { position: absolute; opacity: 0; pointer-events: none; }
.shell-pick span:not(.sr) { display: block; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 36% 28%, rgb(255 255 255 / 0.85) 0 12%, rgb(255 255 255 / 0) 30%), var(--c); box-shadow: inset 0 -4px 6px rgb(0 0 0 / 0.2); }
.shell-pick input:checked + span { box-shadow: inset 0 -4px 6px rgb(0 0 0 / 0.2), 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.shell-pick input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 6px; }
.add-row { display: flex; gap: var(--s2); }
.add-row .btn { flex: none; min-height: 48px; }
.invitees { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.invitees:empty { display: none; }
.invitees li { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 14px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--damson) 14%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--damson) 40%, transparent); font-weight: 700; font-size: 0.875rem; max-width: 100%; }
.invitees li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invitees button { border: 0; background: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.invitees button:hover { background: rgb(0 0 0 / 0.07); }
.seat-lights { display: flex; gap: 8px; }
.seat-lights i { width: 18px; height: 18px; border-radius: 50%; background: #d8d2e6; box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.2); transition: background 240ms; }
.seat-lights i.on { background: radial-gradient(circle at 40% 30%, #fff 0 15%, #7ee05a 50%, #3c8a1c); box-shadow: 0 0 8px rgb(126 224 90 / 0.8); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgb(255 255 255 / 0.4); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

.done { display: grid; gap: var(--s5); outline: none; }
/* once sent, the ticket stands on its own on the damson ground */
.wrapper:has(.done:not([hidden])) { background: none; box-shadow: none; padding: 0; }
.done[hidden] { display: none; }
.ticket {
  --c: var(--lagoon); --cd: var(--lagoon-deep);
  position: relative; overflow: hidden; border-radius: 30px; padding: var(--s6); padding-top: 84px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, #fff), #fff 60%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--cd) 40%, transparent), inset 0 3px 0 #fff;
}
.tk-shell { position: absolute; left: var(--s6); top: var(--s5); width: 84px; height: 46px; border-radius: var(--r-pill);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 70%);
  box-shadow: inset 0 -4px 6px color-mix(in srgb, var(--cd) 60%, transparent), 0 6px 10px -4px var(--cd); }
.tk-shell::after { content: ''; position: absolute; left: 10px; right: 10px; top: 6px; height: 12px; border-radius: var(--r-pill); background: rgb(255 255 255 / 0.7); }
.ticket h3 { font-size: 1.75rem; overflow-wrap: anywhere; }
.ticket > p { margin-top: var(--s2); color: var(--ink-2); }
.tk-link { margin-top: var(--s4); display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s2) var(--s2) var(--s2) var(--s4); border-radius: var(--r-pill); background: #fff; box-shadow: inset 0 0 0 1.5px #d9dfe8; }
.tk-link code { font-family: var(--body); font-weight: 900; font-variant-numeric: tabular-nums; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tk-list { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s2); }
.tk-list li { display: flex; justify-content: space-between; gap: var(--s3); font-size: 0.9375rem; border-top: 1px solid #e4e8ee; padding-top: var(--s2); }
.tk-list li span:first-child { overflow-wrap: anywhere; min-width: 0; }
.tk-list .ok { color: var(--kiwi-deep); font-weight: 900; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.tk-list .ok .ic { width: 16px; height: 16px; }
.done-act { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---------- 12. Questions, footer ---------- */
.faq { padding: var(--s9) var(--gutter); background: linear-gradient(180deg, color-mix(in srgb, var(--rhubarb) 14%, var(--ice)), var(--ice)); display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: var(--s7); }
.faq h2 { font-size: var(--fs-3); }
.qa { display: grid; gap: var(--s3); }
.qa details { border-radius: var(--r-lg); background: rgb(255 255 255 / 0.8); box-shadow: inset 0 0 0 1.5px rgb(27 36 48 / 0.1); }
.qa details[open] { background: #fff; box-shadow: inset 0 0 0 2px var(--rhubarb-deep); }
.qa summary { cursor: pointer; list-style: none; padding: var(--s4) var(--s5); font-weight: 900; font-size: 1.0625rem; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: 56px; border-radius: inherit; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ''; width: 28px; height: 28px; flex: none; border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) center / 12px 2px no-repeat,
    linear-gradient(#fff, #fff) center / 2px 12px no-repeat,
    radial-gradient(circle at 40% 28%, rgb(255 255 255 / 0.7) 0 14%, transparent 36%),
    var(--rhubarb-deep);
  box-shadow: inset 0 -2px 3px rgb(0 0 0 / 0.25); transition: rotate 300ms var(--ease); }
.qa details[open] summary::after { rotate: 45deg; }
.qa p { padding: 0 var(--s5) var(--s5); max-width: 66ch; }

.foot { background: var(--ink); color: var(--ice); padding: var(--s8) var(--gutter) var(--s7); }
.foot-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s5) var(--s7); align-items: start; }
.foot .logo-word { color: #fff; }
.foot-addr { font-size: 0.9375rem; line-height: 1.7; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 var(--s5); max-width: 420px; }
.foot-nav a { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.foot-nav a:hover { text-decoration: underline; }
.foot-small { grid-column: 1 / -1; font-size: var(--fs-0); color: #b8c6d1; border-top: 1px solid rgb(238 246 248 / 0.15); padding-top: var(--s4); }

/* ---------- 13. Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .msg.fresh { animation: pop 420ms var(--ease) both; }
  @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
  /* the signature: a gloss sweep across the case when its shell colour changes */
  .case.recolour::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 4; pointer-events: none;
    background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 0.55) 45%, transparent 60%) 0 0 / 260% 100% no-repeat;
    animation: sweep 900ms var(--ease) both;
  }
  @keyframes sweep { from { background-position: 120% 0; } to { background-position: -40% 0; } }
  .sheet.opening { animation: rise 380ms var(--ease) both; }
  @keyframes rise { from { translate: 0 30px; opacity: 0; } }
  .handset.bump .case { animation: bump 380ms var(--ease); }
  @keyframes bump { 30% { transform: scale(1.012) rotate(-0.4deg); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { transition: none; }
  .dots i, .rec-dot, .spinner { animation-duration: 0s; animation-iteration-count: 1; }
  .spinner { border-top-color: rgb(255 255 255 / 0.4); border-right-color: #fff; }
}

/* ---------- 14. Narrow screens ---------- */
/* the screen gets narrow: one pane at a time (list or chat) */
@container screen (max-width: 470px) {
  .panes { grid-template-columns: minmax(0, 1fr); }
  .handset[data-view='chat'] .threads { display: none; }
  .handset[data-view='list'] .convo { display: none; }
  .threads { border-right: 0; }
  .threads ul { padding: 10px; gap: 4px; }
  .thread { padding: 11px 10px; }
  .back-btn { display: grid; }
}

@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s6); padding-top: var(--s6); }
  .hero-copy { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: var(--s6); align-items: end; }
  .hero h1 { grid-row: span 3; max-width: 12ch; }
  .lede { margin-top: 0; }
  .hero-act, .spec { margin-top: var(--s4); }
  .xray { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); }
  .rule-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .splitter { grid-column: 1 / -1; }
  .start { grid-template-columns: minmax(0, 1fr); }
  .start-copy { max-width: 60ch; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .top .btn { margin-left: auto; }
  .hero-copy { display: block; }
  .hero h1 { max-width: 13ch; }
  .lede { margin-top: var(--s4); }
  .inside-head { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .xray { grid-template-columns: minmax(0, 1fr); }
  .xray-fig { position: static; max-width: 620px; }
  .faq { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .case { grid-template-columns: 56px minmax(0, 1fr) 84px; padding: 26px 16px; gap: var(--s3); border-radius: 100px / 90px; }
  .grille { width: 48px; height: 120px; }
  .key-talk { width: 64px; height: 64px; }
  .s1, .s3 { left: 48px; } .s2, .s4 { right: 48px; }
  .screen { height: 460px; }
}
/* phone: the handset turns portrait, grille on top, keys underneath */
@media (max-width: 640px) {
  :root { --s9: 4.5rem; --s8: 3.5rem; }
  .hero { padding: var(--s5) var(--gutter) var(--s7); }
  .hero h1 { font-size: clamp(2.3rem, 9.5vw, 3rem); }
  .lede { font-size: 1.0625rem; }
  .spec { gap: 6px; }
  .spec div { padding: 6px 12px; }
  .case { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; padding: 22px 14px 20px; border-radius: 52px; gap: 14px; }
  .grille { width: 132px; height: 28px; border-radius: 14px; }
  .bezel { padding: 7px; border-radius: 30px; }
  .screen { height: min(540px, 72vh); min-height: 440px; border-radius: 24px; }
  .keys { grid-auto-flow: column; align-items: center; justify-content: center; gap: var(--s6); }
  .key-pair { order: -1; }
  .s1 { top: 24px; left: 30px; } .s2 { top: 24px; right: 30px; } .s3 { bottom: 24px; left: 30px; } .s4 { bottom: 24px; right: 30px; }
  .loop { right: 18%; }
  .fl-row { gap: 2px; }
  .fl { padding: 4px 5px; }
  .fl-drop { width: 36px; height: 36px; }
  .rules-sheet { border-radius: 36px; }
  .rule-list { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .price-grid { grid-template-columns: minmax(0, 1fr); }
  .wrapper { border-radius: 30px; }
  .add-row { flex-direction: column; }
  .add-row .btn { align-self: flex-start; }
  .qa summary { padding: var(--s3) var(--s4); }
  .qa p { padding: 0 var(--s4) var(--s4); }
  .inside-head { margin-bottom: var(--s5); }
}

/* ---------- Additions: splitter beans, start preview, faq note ---------- */
.beans { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: var(--s2) 0 0; padding: 0; }
.beans li { display: grid; justify-items: center; gap: 4px; font-size: 0.8125rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ice); }
.beans li::before { content: ''; width: 26px; height: 38px; border-radius: 13px;
  background: radial-gradient(circle at 35% 25%, rgb(255 255 255 / 0.8) 0 14%, transparent 34%), linear-gradient(90deg, #ffb46a, var(--satsuma) 60%);
  box-shadow: inset 0 -4px 6px rgb(0 0 0 / 0.25); }
.beans li.payer::before { background: radial-gradient(circle at 35% 25%, rgb(255 255 255 / 0.8) 0 14%, transparent 34%), linear-gradient(90deg, #ffd9b0, #ffb46a 60%); box-shadow: inset 0 -4px 6px rgb(0 0 0 / 0.25), 0 0 0 2px #fff; }
.price { background:
  linear-gradient(180deg, var(--ice) 0%, color-mix(in srgb, var(--satsuma) 45%, var(--ice)) 100%); }
.preview { margin-top: var(--s7); position: sticky; top: 110px; display: grid; gap: var(--s3); justify-items: start; }
.pv-case {
  --c: var(--lagoon); --cd: var(--lagoon-deep);
  position: relative; width: min(100%, 360px); aspect-ratio: 2.1; border-radius: 999px; display: grid; place-content: center; text-align: center; padding: 0 var(--s6);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 55%, rgb(255 255 255 / 0.5)), color-mix(in srgb, var(--c) 85%, transparent));
  box-shadow: inset 0 3px 1px rgb(255 255 255 / 0.8), inset 0 -20px 30px -8px color-mix(in srgb, var(--cd) 70%, transparent), inset 0 0 0 2px color-mix(in srgb, var(--cd) 40%, transparent), 0 26px 40px -20px rgb(20 0 60 / 0.8);
  transition: background 500ms var(--ease), box-shadow 500ms var(--ease);
}
.pv-case::before { content: ''; position: absolute; left: 12%; right: 12%; top: 8%; height: 26%; border-radius: 999px; background: linear-gradient(180deg, rgb(255 255 255 / 0.7), rgb(255 255 255 / 0)); }
.pv-name { font-family: var(--display); font-size: 1.75rem; line-height: 1.1; color: #fff; text-shadow: 0 2px 0 var(--cd), 0 3px 8px rgb(0 0 0 / 0.35); overflow-wrap: anywhere; position: relative; }
.pv-seats { display: flex; gap: 6px; justify-content: center; margin-top: var(--s2); position: relative; }
.pv-seats i { width: 12px; height: 12px; border-radius: 50%; background: rgb(255 255 255 / 0.35); box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.3); }
.pv-seats i.on { background: radial-gradient(circle at 40% 30%, #fff 0 15%, #b6ff8f 50%, #4aa526); box-shadow: 0 0 6px rgb(182 255 143 / 0.9); }
.pv-cap { font-size: var(--fs-0); color: #efe6ff; }
.faq-note { margin-top: var(--s4); max-width: 32ch; color: var(--ink-2); }
#startSubmit { --b: var(--pick-deep, var(--lagoon-deep)); }
@media (max-width: 1180px) { .preview { position: static; margin-top: var(--s5); } }
@media (max-width: 640px) { .pv-name { font-size: 1.375rem; } }
