/* Let's Go Padel Derry receptionist demo. Independent EdgeAudit concept.
   Phone first. No external fonts, no CDNs. Palette "feels related" to the club (slate navy + ball lime),
   no logo, no copied layout. Colours are tokens at the top so they are easy to swap. */

:root {
  --navy: #1e2936;
  --navy-2: #2a3b50;
  --navy-deep: #11181f;
  --navy-line: #374a61;
  --lime: #d1f139;
  --lime-ink: #16210a;
  --lime-deep: #7a9412;
  --end: #d23a3e;
  --end-ink: #ffffff;
  --on-navy: #ffffff;
  --on-navy-2: #adbccd;

  /* Page, light */
  --bg: #f1f3f5;
  --surface: #ffffff;
  --surface-2: #e4e8ec;
  --ink: #1e2936;
  --ink-2: #4c5a6a;
  --line: #d3d9df;
  --line-strong: #9aa6b2;
  --focus: #1f6fd1;
  --next-bg: #eef9c4;
  --next-ink: #1f2b06;
  --upd-bg: #fff0c7;
  --upd-ink: #5e4100;
  --ok: #276f39;
  --pill-type-bg: var(--navy);
  --tab-on-bg: var(--navy);
  --tab-on-ink: #ffffff;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Avenir Next Condensed", "AvenirNextCondensed-Heavy", "Roboto Condensed", "sans-serif-condensed", "Bahnschrift", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --dock-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11181f;
    --surface: #1b2531;
    --surface-2: #243244;
    --ink: #f2f5f8;
    --ink-2: #adbccd;
    --line: #33455a;
    --line-strong: #56697e;
    --focus: #8cc0ff;
    --next-bg: rgba(209, 241, 57, .14);
    --next-ink: #f0ffc2;
    --upd-bg: rgba(255, 199, 64, .16);
    --upd-ink: #ffd978;
    --ok: #8fdca3;
    --pill-type-bg: #33475e;
    --tab-on-bg: #ffffff;
    --tab-on-ink: var(--navy);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; }
a { color: inherit; }
svg { display: block; flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* ---------- Disclaimer strip: sticky, so it is on screen whatever is scrolled ---------- */
.strip {
  position: sticky; top: 0; z-index: 40;
  background: var(--navy-deep);
  color: #e6ecf1;
  font-size: 12.5px; line-height: 1.3; font-weight: 600;
  text-align: center;
  padding: 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.strip span { display: inline-block; }
.strip span + span { margin-left: .3em; }

/* ---------- Masthead ---------- */
.mast {
  background-color: var(--navy);
  background-image: url("/court.svg"), linear-gradient(165deg, var(--navy-2) 0%, var(--navy) 60%);
  background-repeat: no-repeat, no-repeat;
  background-size: 112px auto, cover;
  background-position: right -22px top -46px, center;
  color: var(--on-navy);
}
.mast__inner { display: flex; align-items: center; gap: 14px; padding-top: 16px; padding-bottom: 18px; }
.avatar {
  flex: 0 0 auto;
  width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #f2ffc0 0, var(--lime) 50%, #a6c421 100%);
  color: var(--lime-ink);
  display: grid; place-items: center;
  font: 800 30px/1 var(--font-display);
  font-stretch: condensed;
  box-shadow: 0 0 0 3px rgba(209, 241, 57, .22);
}
.mast__text { flex: 1 1 auto; min-width: 0; }
.mast__name {
  margin: 0;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font: 800 36px/1 var(--font-display);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: #ffffff;
  overflow-wrap: anywhere;
}
.mast__badge {
  display: inline-block;
  padding: 4px 8px 3px;
  border: 1.5px solid var(--lime); border-radius: 6px;
  color: var(--lime);
  font: 800 12px/1 var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mast__sub { margin: 6px 0 0; font-size: 15px; line-height: 1.35; color: var(--on-navy-2); font-weight: 500; }
.restart {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px;
  border-radius: 999px;
  font-size: 14.5px; font-weight: 700;
  white-space: nowrap;
}
.restart svg { width: 18px; height: 18px; }
.restart--navy { background: transparent; color: #ffffff; border: 1.5px solid rgba(255, 255, 255, .28); }
.restart--navy:active { background: rgba(255, 255, 255, .1); }
.restart--page { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-strong); }
.restart--page:active { background: var(--surface-2); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 4px;
  margin: 14px 0 12px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 999px;
}
.tabs__tab {
  flex: 1 1 0; min-width: 0;
  min-height: 46px; padding: 0 10px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2);
  font-size: 15.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap;
}
.tabs__tab[aria-selected="true"] { background: var(--tab-on-bg); color: var(--tab-on-ink); box-shadow: 0 2px 8px rgba(17, 24, 31, .15); }
.tabs__count {
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px;
  background: var(--lime); color: var(--lime-ink);
  font-size: 13px; line-height: 22px; font-weight: 800; text-align: center;
}
.tabs__count.is-pulse { animation: pop 1.2s ease 3; }

/* ---------- Layout ---------- */
.layout { display: block; padding-bottom: 8px; }
.panel { border-radius: var(--radius); }
body[data-view="talk"] #panel-club { display: none; }
body[data-view="club"] #panel-talk { display: none; }

/* ---------- Talk panel: always a navy "call screen" ---------- */
.talk {
  background: var(--navy);
  color: var(--on-navy);
  padding: 22px 18px 16px;
  border: 1px solid var(--navy-line);
  box-shadow: 0 14px 34px rgba(17, 24, 31, .16);
}
.talk__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 14px;
  border-top: 1px solid var(--navy-line);
  font-size: 13.5px; line-height: 1.4; color: var(--on-navy-2);
}
.talk__foot p { margin: 0; flex: 1 1 170px; }

.stage { text-align: center; }
.stage__label {
  margin: 16px 0 6px;
  font: 800 26px/1.05 var(--font-display);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: #ffffff;
}
.stage__hint { margin: 0 auto; max-width: 32ch; font-size: 15.5px; line-height: 1.45; color: var(--on-navy-2); }

/* Orb: a padel ball that shows the call state */
.orb { --size: 124px; position: relative; width: var(--size); height: var(--size); margin: 2px auto 0; }
.orb__core {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  color: var(--lime-ink);
  background: radial-gradient(circle at 32% 28%, #f4ffcc 0, var(--lime) 48%, #98b41c 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35), inset 0 -8px 16px rgba(0, 0, 0, .12);
  transition: filter .3s ease, transform .3s ease;
}
.orb__core::before, .orb__core::after {
  content: ""; position: absolute; top: -6%;
  width: 112%; height: 112%;
  border: 3px solid rgba(255, 255, 255, .78); border-radius: 50%;
}
.orb__core::before { left: -80%; }
.orb__core::after { left: 68%; }
.orb__icon { position: relative; z-index: 1; width: 38%; height: 38%; }
.orb__icon--wave { display: none; }
.orb__ring { position: absolute; inset: -12px; border-radius: 50%; border: 3px solid transparent; opacity: 0; }
.orb::before, .orb::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(209, 241, 57, .6); opacity: 0; pointer-events: none;
}

.orb[data-state="idle"] .orb__core { animation: breathe 4s ease-in-out infinite; }
.orb[data-state="connecting"] .orb__ring { opacity: 1; border-top-color: var(--lime); border-right-color: rgba(209, 241, 57, .4); animation: spin .9s linear infinite; }
.orb[data-state="connecting"] .orb__core { filter: saturate(.75) brightness(.92); }
.orb[data-state="live"] .orb__icon--mic,
.orb[data-state="listening"] .orb__icon--mic,
.orb[data-state="thinking"] .orb__icon--mic,
.orb[data-state="speaking"] .orb__icon--mic { display: none; }
.orb[data-state="live"] .orb__icon--wave,
.orb[data-state="listening"] .orb__icon--wave,
.orb[data-state="thinking"] .orb__icon--wave,
.orb[data-state="speaking"] .orb__icon--wave { display: block; }
.orb[data-state="listening"] .orb__ring { opacity: 1; border-color: rgba(209, 241, 57, .5); animation: listen 1.8s ease-in-out infinite; }
.orb[data-state="thinking"] .orb__ring { opacity: 1; border-style: dotted; border-color: rgba(209, 241, 57, .85); animation: spin 2.4s linear infinite; }
.orb[data-state="thinking"] .orb__core { filter: brightness(.9); }
.orb[data-state="speaking"]::before { animation: ripple 1.5s ease-out infinite; }
.orb[data-state="speaking"]::after { animation: ripple 1.5s .5s ease-out infinite; }
.orb[data-state="speaking"] .orb__core { animation: talk .9s ease-in-out infinite; }
.orb[data-state="ended"] .orb__core,
.orb[data-state="failed"] .orb__core { filter: saturate(.35) brightness(.8); }

@keyframes breathe { 50% { transform: scale(1.035); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes listen { 50% { transform: scale(1.06); opacity: .55; } }
@keyframes ripple { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes talk { 50% { transform: scale(1.05); } }
@keyframes pop { 30% { transform: scale(1.25); } 60% { transform: scale(.95); } }

/* In a call the stage becomes one compact row so the captions get the room */
body[data-call="connecting"] .stage,
body[data-call="live"] .stage,
body[data-call="ended"] .stage {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: center;
  text-align: left; padding-left: 6px;
}
body[data-call="connecting"] .orb,
body[data-call="live"] .orb,
body[data-call="ended"] .orb { --size: 60px; grid-row: 1 / span 3; margin: 0; }
body[data-call="connecting"] .stage__label,
body[data-call="live"] .stage__label,
body[data-call="ended"] .stage__label { margin: 0; font-size: 25px; }
body[data-call="connecting"] .stage__hint,
body[data-call="live"] .stage__hint,
body[data-call="ended"] .stage__hint { margin: 2px 0 0; max-width: none; font-size: 14.5px; }
body[data-call="ended"] .actions { margin-top: 18px; }
body[data-call="live"] .stage__hear { grid-column: 2; justify-self: start; margin-top: 8px; }
body[data-call="live"] .ideas,
body[data-call="connecting"] .ideas { display: none; }
/* Tall enough that the page can scroll the call screen up under the disclaimer strip on phones */
body[data-call="connecting"] #panel-talk,
body[data-call="live"] #panel-talk { min-height: calc(100vh - 140px); }
/* In a call the disclaimer line sits at the foot of the call screen, not under the status */
body[data-call="connecting"] #panel-talk,
body[data-call="live"] #panel-talk { display: flex; flex-direction: column; }
body[data-call="connecting"] .talk__foot,
body[data-call="live"] .talk__foot { margin-top: auto; }
@supports (height: 100dvh) {
  body[data-call="connecting"] #panel-talk,
  body[data-call="live"] #panel-talk { min-height: calc(100dvh - 140px); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  border: 0; border-radius: 999px;
  font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none;
  transition: transform .12s ease, background-color .2s ease, opacity .2s ease;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn svg { width: 22px; height: 22px; }
.btn--talk {
  width: 100%; min-height: 66px;
  background: var(--lime); color: var(--lime-ink);
  font-size: 20px; font-weight: 800;
  box-shadow: 0 10px 26px rgba(209, 241, 57, .2);
}
.btn--talk svg { width: 26px; height: 26px; }
.btn--quiet {
  width: 100%; min-height: 54px;
  background: transparent; color: #ffffff;
  border: 2px solid rgba(255, 255, 255, .3);
}
.btn--quiet.is-primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); min-height: 62px; font-size: 19px; font-weight: 800; }
.btn--small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn--small svg { width: 18px; height: 18px; }
.btn--light { background: #ffffff; color: var(--navy); }
.btn--outline { background: transparent; color: #ffffff; border: 2px solid rgba(255, 255, 255, .35); }

.actions { display: grid; gap: 12px; margin-top: 22px; }
.voice-note { margin: 0; font-size: 15px; line-height: 1.45; color: #ffe39a; text-align: center; }

/* Alert inside the call screen */
.alert {
  margin: 0 0 18px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: #3b2226;
  border: 1px solid rgba(255, 150, 150, .4);
  color: #ffffff;
}
.alert.is-info { background: #22364b; border-color: rgba(140, 192, 255, .45); }
.alert__title { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.alert__body { margin: 0; font-size: 15px; line-height: 1.45; color: #f6dede; }
.alert.is-info .alert__body { color: #d9e6f3; }
.alert__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.alert__actions:not(:has(button:not([hidden]))) { display: none; }

/* Captions and chat bubbles share a style */
/* After a call the transcript sits in the page flow; during a call it is its own scroll box sized to
   the screen, so the newest line is never hidden under the call bar. */
.captions {
  margin-top: 18px;
  display: flex; flex-direction: column; gap: 10px;
  padding: 2px;
}
body[data-call="live"] .captions {
  max-height: calc(100vh - 250px); min-height: 150px;
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@supports (height: 100dvh) {
  body[data-call="live"] .captions { max-height: calc(100dvh - 250px); }
}
.bubble {
  max-width: 92%;
  align-self: flex-start;
  padding: 10px 14px 11px;
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, .09);
  color: #eaf0f5;
  font-size: 16px; line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.bubble__who { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lime); white-space: normal; }
.bubble--user { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: rgba(209, 241, 57, .17); color: #f6ffd9; }
.bubble--user .bubble__who { color: #e4f79a; }
.bubble.is-partial .bubble__text::after { content: " \2026"; opacity: .6; }
.bubble--user + .bubble--user .bubble__who,
.bubble--bot + .bubble--bot .bubble__who { display: none; }
.stage__hear { margin-top: 12px; }
body[data-call="connecting"] .talk__foot .restart,
body[data-call="live"] .talk__foot .restart { display: none; }
.captions .bubble:last-child { font-size: 18px; color: #ffffff; }
.bubble a { color: #c3e1ff; text-decoration: underline; text-underline-offset: 2px; }
.bubble--typing { display: inline-flex; align-items: center; gap: 5px; padding: 12px 16px; }
.bubble--typing b { margin-right: 4px; font-size: 14px; font-weight: 600; color: var(--on-navy-2); }
.bubble--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--on-navy-2); animation: dot 1.2s ease-in-out infinite; }
.bubble--typing i:nth-of-type(2) { animation-delay: .15s; }
.bubble--typing i:nth-of-type(3) { animation-delay: .3s; }
@keyframes dot { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { opacity: .45; } }

/* After a call: the latest card sits inline under Talk again / Type instead (phones) */
.inline-card {
  margin-top: 18px; padding: 12px;
  border-radius: 20px;
  background: var(--bg);
  border: 2px solid var(--lime);
  color: var(--ink);
}
.chat-card {
  align-self: stretch;
  padding: 10px;
  border-radius: 20px;
  background: var(--bg);
  border: 2px solid var(--lime);
  color: var(--ink);
}
.claim-warning {
  margin: 16px 0 0; padding: 12px 14px;
  border-radius: 14px;
  background: #3b3014; border: 1.5px solid rgba(255, 207, 90, .6);
  color: #ffe9a8;
  font-size: 15.5px; font-weight: 700; line-height: 1.4;
}
.madeup-note { margin: 2px 0 0; text-align: center; font-size: 14px; line-height: 1.4; color: var(--on-navy-2); }
.inline-card__title { margin: 2px 4px 10px; font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

/* Ideas */
.ideas { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--navy-line); }
.ideas__title { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lime); }
.ideas__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ideas__list li { font-size: 15.5px; line-height: 1.45; color: #dde6ee; padding-left: 14px; border-left: 3px solid rgba(209, 241, 57, .55); }
.ideas__list b { display: block; color: #ffffff; font-size: 14px; }

/* ---------- Text chat ---------- */
.chat__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.chat__title { margin: 0; font-size: 18px; font-weight: 800; color: #ffffff; }
.chat__voiceoff { margin: -4px 0 12px; font-size: 14px; line-height: 1.4; color: #ffe39a; }
.chat__log {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 120px; max-height: min(50vh, 520px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
}
.chips { display: grid; gap: 8px; margin-top: 12px; }
.chips__title { margin: 0 0 2px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lime); }
.chip {
  min-height: 50px; padding: 10px 16px;
  border: 1.5px solid rgba(209, 241, 57, .6); border-radius: 14px;
  background: rgba(209, 241, 57, .08); color: #f4ffd4;
  font-size: 16.5px; font-weight: 700; text-align: left; line-height: 1.3;
}
.chip:active { background: rgba(209, 241, 57, .22); }
.chat__error { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #3b2226; color: #ffe3e3; font-size: 15px; line-height: 1.4; }
.composer {
  display: flex; align-items: flex-end; gap: 8px;
  margin-top: 12px; padding: 6px 6px 6px 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .08);
  border: 1.5px solid rgba(255, 255, 255, .24);
}
.composer:focus-within { border-color: var(--lime); }
.composer textarea {
  flex: 1 1 auto; min-width: 0;
  min-height: 44px; max-height: 132px;
  padding: 10px 0;
  border: 0; outline: 0; resize: none;
  background: transparent; color: #ffffff;
  font-size: 16px; line-height: 1.4;
}
.composer textarea::placeholder { color: #9fb0c1; }
.composer__send {
  flex: 0 0 auto; width: 46px; height: 46px;
  border: 0; border-radius: 50%;
  background: var(--lime); color: var(--lime-ink);
  display: grid; place-items: center;
}
.composer__send svg { width: 22px; height: 22px; }
.composer__send:disabled { opacity: .45; }
.chat__note { margin: 10px 2px 0; font-size: 13.5px; line-height: 1.4; color: var(--on-navy-2); }

/* ---------- Owner preview ---------- */
.club { padding: 4px 2px 12px; }
.club__head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 6px 2px 14px; }
.club__head > div { flex: 1 1 auto; min-width: 0; }
.club__title {
  margin: 0;
  font: 800 30px/1.05 var(--font-display);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: .01em;
  white-space: nowrap;
}
.club__sub { margin: 4px 0 0; font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.club__empty {
  text-align: center;
  padding: 26px 18px 22px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.club__empty-art { width: 56px; height: 56px; margin: 0 auto 10px; color: var(--ink-2); }
.club__empty-title { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.club__empty-body { margin: 0 auto; max-width: 34ch; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.club__list { display: grid; gap: 14px; }
.club__disclaimer { margin: 16px 4px 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }

/* Enquiry card */
.card {
  position: relative;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: 0 6px 20px rgba(17, 24, 31, .07);
}
.card.is-fresh { animation: glow 1.6s ease-in-out 3; border-color: var(--lime-deep); }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(209, 241, 57, 0), 0 6px 20px rgba(17, 24, 31, .07); }
  50% { box-shadow: 0 0 0 6px rgba(209, 241, 57, .8), 0 6px 20px rgba(17, 24, 31, .07); }
}
.card__top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 26px; padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px; font-weight: 800; line-height: 1.2;
  background: var(--surface-2); color: var(--ink);
}
.pill--type { background: var(--pill-type-bg); color: #ffffff; }
.pill--type::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.pill--demo { background: transparent; border: 1.5px solid var(--line-strong); color: var(--ink-2); }
.pill--new { background: var(--lime); color: var(--lime-ink); }
.pill--updated { background: var(--upd-bg); color: var(--upd-ink); }
.card__source { margin-left: auto; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.card__head { margin: 0; font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.card__when { margin: 4px 0 0; font-size: 17px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }
.changes { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--upd-bg); color: var(--upd-ink); font-size: 15px; line-height: 1.4; }
.changes__title { margin: 0 0 2px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.changes ul { margin: 0; padding-left: 18px; font-weight: 700; }
.facts { display: grid; grid-template-columns: minmax(88px, max-content) minmax(0, 1fr); gap: 7px 14px; margin: 14px 0 0; font-size: 15.5px; line-height: 1.4; }
.facts dt { color: var(--ink-2); font-weight: 600; }
.facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.facts dd.is-quote { font-weight: 600; }
.next {
  margin: 14px 0 0;
  padding: 10px 12px 11px 14px;
  border-radius: 12px;
  border-left: 5px solid var(--lime-deep);
  background: var(--next-bg); color: var(--next-ink);
}
.next__label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.next__text { display: block; font-size: 17.5px; line-height: 1.3; font-weight: 800; }
.card__foot { display: flex; align-items: flex-start; gap: 6px 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.card__status { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--ok); font-weight: 700; flex: 1 1 200px; }
.card__status svg { width: 16px; height: 16px; margin-top: 1px; }
.card__time { white-space: nowrap; }

/* ---------- Footer ---------- */
.foot { padding-top: 18px; padding-bottom: 28px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--focus); }
.foot p a { display: inline-flex; align-items: center; min-height: 44px; }
.booklink {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 16px; padding: 12px 16px; min-height: 60px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface);
  color: var(--ink) !important; text-decoration: none;
}
.booklink__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.booklink__title { font-size: 16px; font-weight: 800; }
.booklink__sub { font-size: 13.5px; color: var(--ink-2); }
.booklink svg { width: 22px; height: 22px; color: var(--ink-2); }

/* ---------- Call dock (fixed, reachable on both views) ---------- */
body.has-dock { padding-bottom: calc(var(--dock-h) + var(--safe-b) + 12px); }
.dock {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + var(--safe-b));
  background: var(--navy-deep);
  color: var(--on-navy);
  border-top: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .25);
}
.dock__status { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; }
.dock__dot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(209, 241, 57, .2); }
body[data-call="connecting"] .dock__dot { background: #ffcf5a; box-shadow: 0 0 0 4px rgba(255, 207, 90, .2); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.dock__text { min-width: 0; display: flex; flex-direction: column; }
.dock__label { font-size: 16px; font-weight: 800; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock__timer { font-size: 13.5px; color: var(--on-navy-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dock__mute, .dock__end {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; border-radius: 999px; border: 0;
  font-size: 16px; font-weight: 800;
}
.dock__mute { min-width: 54px; padding: 0 14px; background: rgba(255, 255, 255, .13); color: #ffffff; }
.dock__mute svg, .dock__end svg { width: 24px; height: 24px; }
.dock__mute .i-off { display: none; }
.dock__mute[aria-pressed="true"] { background: #ffffff; color: var(--navy); }
.dock__mute[aria-pressed="true"] .i-on { display: none; }
.dock__mute[aria-pressed="true"] .i-off { display: block; }
.dock__end { padding: 0 20px; background: var(--end); color: var(--end-ink); }
.dock__end:disabled { opacity: .6; }

/* ---------- Slide-up card: the payoff without a tap ---------- */
.sheet {
  position: fixed; z-index: 55; left: 8px; right: 8px;
  bottom: calc(10px + var(--safe-b));
  max-width: 560px; margin: 0 auto;
  max-height: calc(100vh - 120px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 12px 12px;
  border-radius: 24px;
  background: var(--bg);
  border: 2px solid var(--lime);
  box-shadow: 0 -6px 40px rgba(0, 0, 0, .35);
  animation: slideup .35s cubic-bezier(.2, .8, .2, 1);
}
body.has-dock .sheet { bottom: calc(var(--dock-h) + var(--safe-b) + 8px); max-height: calc(100vh - var(--dock-h) - 110px); }
@supports (height: 100dvh) {
  .sheet { max-height: calc(100dvh - 120px); }
  body.has-dock .sheet { max-height: calc(100dvh - var(--dock-h) - 110px); }
}
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 8px 6px; }
.sheet__title { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.sheet__close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; }
.sheet__close svg { width: 20px; height: 20px; }
.sheet__more { width: 100%; min-height: 48px; margin-top: 10px; border: 0; border-radius: 999px; background: var(--navy); color: #ffffff; font-size: 16px; font-weight: 800; }
@keyframes slideup { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Start again confirm ---------- */
.confirm {
  position: fixed; z-index: 70; left: 12px; right: 12px;
  top: 64px;
  max-width: 440px; margin: 0 auto;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
  animation: rise .2s ease;
}
.confirm__text { margin: 0 0 10px; font-size: 16px; font-weight: 700; line-height: 1.35; }
.confirm__actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.confirm__keep { background: var(--surface-2); color: var(--ink); }
.confirm__go { background: var(--navy); color: #ffffff; }
@keyframes rise { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Narrow phones ---------- */
@media (max-width: 359px) {
  .mast__name { font-size: 31px; gap: 8px; }
  .avatar { width: 48px; height: 48px; font-size: 26px; }
  .mast__inner { gap: 12px; }
  .restart { padding: 0 12px; font-size: 14px; }
  .talk { padding: 18px 14px 14px; }
  .tabs__tab { font-size: 14.5px; padding: 0 6px; }
  .orb { --size: 108px; }
  .stage__label { font-size: 23px; }
  .dock { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .dock__end { padding: 0 16px; }
  .dock__mute { padding: 0 12px; }
  .facts { grid-template-columns: minmax(80px, max-content) minmax(0, 1fr); gap: 6px 10px; }
  .card__head { font-size: 25px; }
}

/* Narrow phones: the Mute button keeps its label for screen readers but shows only the icon,
   so the call state ("Listening") never gets cut off */
@media (max-width: 379px) {
  .dock__mute { padding: 0 12px; }
  .dock__mute span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (min-width: 600px) {
  .mast { background-size: 150px auto, cover; background-position: right 8% top -60px, center; }
  .mast__name { font-size: 42px; }
  .avatar { width: 64px; height: 64px; font-size: 34px; }
  .layout, .tabs, .mast__inner { max-width: 640px; margin-left: auto; margin-right: auto; }
  .mast__inner { max-width: 672px; }
  .foot { max-width: 672px; }
  .tabs { margin-top: 18px; }
  .talk { padding: 28px 28px 20px; }
  .dock { left: 50%; right: auto; width: min(560px, calc(100% - 24px)); transform: translateX(-50%); bottom: 12px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .12); padding-bottom: 10px; }
  body.has-dock { padding-bottom: calc(var(--dock-h) + 30px); }
  body.has-dock .sheet { bottom: calc(var(--dock-h) + 24px); }
}

/* ---------- Desktop: both views side by side ---------- */
@media (min-width: 960px) {
  .tabs { display: none; }
  .layout {
    max-width: 1120px;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start;
    margin-top: 24px;
  }
  body[data-view] #panel-talk, body[data-view] #panel-club { display: block; }
  .mast__inner { max-width: 1120px; }
  .club { padding-top: 0; }
  .inline-card, .sheet, .chat-card { display: none !important; }
  .foot { max-width: 1120px; }
  .booklink { max-width: 520px; }
}

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