/* ==========================================================================
   /funkcie — animated phone demos
   --------------------------------------------------------------------------
   Loaded only by public/features.html, deliberately NOT part of tw-input.css:
   a Tailwind rebuild rewrites tw.css wholesale, so keeping the scenes out of it
   means neither file can break the other.

   Every class here is prefixed `rc-sc-`. Animation state is a `data-state`
   attribute set by static/js/feature-scenes.js, never a class - that is what
   makes a collision with page or Tailwind classes impossible.

   Colours: every rule is written in --raidcall-* tokens. The simulated phone
   screen pins those tokens to the classic (light) palette, because it is a
   screenshot of the app rather than a themed surface - see .rc-sc-screen. The
   dialog, the narration and the page around it stay fully themed.
   ========================================================================== */

/* ---------- phone frame ----------
   The island and the home indicator are *hardware*: they live outside
   .rc-sc-screen and sit above every scene layer, so no lockscreen, call screen
   or full-bleed map can ever paint over them - exactly like a real handset. */
.rc-sc-phone {
  /* TRUE SCALE. The screen is 360 px wide in the app with a 16 px base, so at
     a frame of content width C the base must be 16 * C / 360 = 4.444cqw —
     otherwise the text is proportionally larger than in the product and every
     scene reads as a remake rather than a screenshot. Deriving it from the
     frame is the whole point: a hand-picked value drifts the moment the frame
     is resized, which is how it ended up ~28 % too big.

     Because of this, every size below is written as the app's own value
     divided by 16: text-sm -> .875em, text-xs -> .75em, px-4 -> 1em. Anything
     hand-tuned by eye will drift out of the product again.

     The frame is then sized so that honest scale is still readable: at the old
     11rem the true base was 5.5 px and a text-[10px] label landed at 3.5 px.
     The width below is the smallest that keeps the body text near 9 px.
     The clamp is the pre-container-query fallback: 16 * (W - 12px border) / 360. */
  --rc-sc-pf: clamp(8px, calc(2.76vw - .53px), 9.25px);
  position: relative;
  flex: none;
  width: clamp(12rem, 62vw, 13.75rem);
  aspect-ratio: 9 / 17.5;
  margin: 0 auto;
  border: 6px solid #1f2937;
  border-radius: 1.75rem;
  background: #0b0f14;
  box-shadow: var(--rc-sc-frame-shadow, 0 20px 25px -5px rgb(0 0 0 / .18));
  overflow: hidden;
}
.rc-sc-phone--lg { --rc-sc-pf: clamp(8.7px, calc(3.11vw - .53px), 10.85px); width: clamp(13rem, 70vw, 16rem); }
/* Container units make the base an exact share of the frame, so it stays true
   scale at every size — including the dialog below, where the frame is sized
   from its height and no viewport formula could have described it. */
@supports (container-type: inline-size) {
  .rc-sc-phone { container-type: inline-size; --rc-sc-pf: 4.444cqw; }
}
/* a floating pill, the way every current handset draws it - not a cut-out
   hanging off the top edge */
.rc-sc-notch {
  position: absolute; top: .5em; left: 50%; transform: translateX(-50%);
  width: 30%; height: 1.05em; background: #05070a;
  border-radius: 99px; z-index: 20; font-size: var(--rc-sc-pf);
}
.rc-sc-notch::after {
  content: ""; position: absolute; top: 50%; right: .28em; transform: translateY(-50%);
  width: .3em; height: .3em; border-radius: 50%;
  background: #1b2836; box-shadow: inset 0 0 0 .04em rgb(90 130 170 / .55);
}
/* `difference` keeps the bar readable on a white app surface, a dark
   lockscreen and a red alert header alike, without the scene having to say
   which one it is */
.rc-sc-home {
  position: absolute; bottom: .55em; left: 50%; transform: translateX(-50%);
  width: 34%; height: .16em; border-radius: 99px; z-index: 20;
  font-size: var(--rc-sc-pf); background: #8a8a8a; mix-blend-mode: difference;
}

/* ---------- screen ----------
   The simulated screen is a *screenshot of the app*, so — exactly like the
   phones on /ako-to-funguje — it keeps the light (classic) look in both site
   themes. Re-theming it would invert the grey ramp: --raidcall-gray-900 is
   near-white in the modern theme, which turned dark headers white-on-white and
   dropped white-on-green buttons to a 2.5:1 contrast. Pinning the tokens
   locally keeps every rule below written in tokens while making the picture
   stable and readable. The dialog around the phone stays fully themed.        */
.rc-sc-screen {
  --raidcall-white: 255 255 255;
  --raidcall-surface: 255 255 255;
  --raidcall-surface-2: 249 250 251;
  --raidcall-border: 229 231 235;
  --raidcall-ink: 17 24 39;
  --raidcall-muted: 75 85 99;
  --raidcall-gray-100: 243 244 246;
  --raidcall-gray-200: 229 231 235;
  --raidcall-gray-300: 209 213 219;
  --raidcall-gray-400: 156 163 175;
  --raidcall-gray-500: 107 114 128;
  --raidcall-gray-900: 17 24 39;
  --raidcall-red-50: 254 242 242;
  --raidcall-red-100: 254 226 226;
  --raidcall-red-500: 239 68 68;
  --raidcall-red-600: 220 38 38;
  --raidcall-green-50: 240 253 244;
  --raidcall-green-100: 220 252 231;
  --raidcall-green-500: 34 197 94;
  --raidcall-green-600: 22 163 74;
  --raidcall-green-700: 21 128 61;
  --raidcall-amber-50: 255 251 235;
  --raidcall-amber-200: 253 230 138;
  --raidcall-amber-500: 245 158 11;
  --raidcall-amber-600: 217 119 6;
  --raidcall-amber-700: 180 83 9;
  --raidcall-blue-50: 239 246 255;
  --raidcall-blue-100: 219 234 254;
  --raidcall-blue-600: 37 99 235;
  --raidcall-blue-700: 29 78 216;
  --raidcall-yellow-400: 250 204 21;
  --raidcall-fire: 211 47 47;
  --raidcall-fire-dark: 183 28 28;
  --raidcall-fire-light: 255 235 238;

  position: absolute; inset: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: .4em;
  /* the bottom strip belongs to the home indicator, the way an app's safe area
     does; without it the last row of a scene runs into the gesture bar */
  padding-bottom: 1.3em;
  font-size: var(--rc-sc-pf); line-height: 1.4;
  background: rgb(var(--raidcall-surface));
  color: rgb(var(--raidcall-ink));
}
.rc-sc-screen--lock { background: linear-gradient(165deg, #1e2733, #0b0f14); color: #fff; padding-top: 2.4em; }
.rc-sc-screen > * { margin: 0 .6em; }
.rc-sc-screen > .rc-sc-bar,
.rc-sc-screen > .rc-sc-lock,
.rc-sc-screen > .rc-sc-layer,
.rc-sc-screen > .rc-sc-tap,
.rc-sc-screen > .rc-sc-statusbar,
.rc-sc-screen > .rc-sc-ntf,
.rc-sc-screen > .rc-sc-incoming { margin: 0; }
.rc-sc-spacer { flex: 1 1 auto; min-height: 0; }
.rc-sc-i { width: 1em; height: 1em; }
.rc-sc-i-lg { width: 1.4em; height: 1.4em; }
/* stacked states of one value; every child sits in the same cell so switching
   between them never shifts the layout */
.rc-sc-swap { display: inline-grid; }
.rc-sc-swap > * { grid-area: 1 / 1; }
/* in right-aligned contexts the states must share their right edge, not the left */
.rc-sc-field-value .rc-sc-swap,
.rc-sc-row > .rc-sc-swap { justify-items: end; }

/* ---------- OS chrome (unthemed on purpose) ---------- */
.rc-sc-lock {
  position: absolute; inset: 0; z-index: 5;
  background: linear-gradient(165deg, #1e2733, #0b0f14); color: #fff;
}
/* the handset's own status bar: always on screen, always above the content,
   and clear of the notch (which is centred) because it hugs both edges */
/* top/height are in the bar's *own* .62em, so .8/1.7 here == the island's
   .5/1.05 of the screen - that is what lines the clock up beside it */
.rc-sc-statusbar {
  position: absolute; top: .8em; left: 0; right: 0; height: 1.7em; z-index: 8;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.4em; color: #fff; font-size: .62em; font-weight: 700;
  text-shadow: 0 1px 2px rgb(0 0 0 / .35);
  pointer-events: none;
}
.rc-sc-clock { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.rc-sc-statusbar-right { display: inline-flex; align-items: center; gap: .35em; }
.rc-sc-battery {
  width: 1.1em; height: .55em; border: 1px solid currentColor; border-radius: .12em;
  position: relative; opacity: .9;
}
.rc-sc-battery::before {
  content: ""; position: absolute; inset: .1em; right: .35em; background: currentColor;
}
.rc-sc-battery::after {
  content: ""; position: absolute; top: 50%; right: -.16em; transform: translateY(-50%);
  width: .1em; height: .25em; background: currentColor; border-radius: 0 .1em .1em 0;
}
/* padding is in the clock's own (2.6em) font size, so 1.15em ≈ 3em of the
   screen — keep it in sync with .rc-sc-ntf's top offset below */
.rc-sc-lock-time { padding-top: 1.15em; text-align: center; font-size: 2.6em; font-weight: 200; line-height: 1; }
.rc-sc-lock-date { text-align: center; font-size: .8em; opacity: .5; margin-top: .2em; }
/* signal bars need explicit heights: as flex items aligned to the end they
   would otherwise collapse to zero and render as nothing */
.rc-sc-bars { display: inline-flex; gap: .1em; align-items: flex-end; height: .62em; }
.rc-sc-bars i { width: .14em; background: currentColor; border-radius: .04em; opacity: .3; }
.rc-sc-bars i:nth-child(1) { height: 35%; }
.rc-sc-bars i:nth-child(2) { height: 57%; }
.rc-sc-bars i:nth-child(3) { height: 79%; }
.rc-sc-bars i:nth-child(4) { height: 100%; }
.rc-sc-bars--full i { opacity: 1; }

.rc-sc-ntf {
  position: absolute; top: 7.6em; left: .5em; right: .5em; z-index: 6;
  background: rgb(255 255 255 / .95); color: #111827;
  border-radius: .85em; padding: .5em .6em;
  box-shadow: 0 8px 20px rgb(0 0 0 / .4);
}
.rc-sc-ntf-head { display: flex; align-items: center; gap: .28em; font-size: .6em; font-weight: 700; color: #6b7280; }
.rc-sc-ntf-head b { color: #374151; }
.rc-sc-ntf-time { margin-left: auto; font-weight: 600; opacity: .7; }
.rc-sc-ntf-title { display: flex; align-items: center; gap: .25em; margin-top: .18em; font-size: .78em; font-weight: 800; }
.rc-sc-ntf--good .rc-sc-ntf-title { color: rgb(var(--raidcall-green-600)); }
.rc-sc-ntf-body { margin-top: .05em; font-size: .66em; color: #4b5563; }
.rc-sc-ntf-link { font-size: .64em; color: #2563eb; text-decoration: underline; }
.rc-sc-ntf-acts { display: flex; gap: .3em; margin-top: .45em; }
.rc-sc-act { flex: 1; padding: .35em; border-radius: .45em; text-align: center; font-size: .6em; font-weight: 800; letter-spacing: .04em; }
.rc-sc-act--good { background: rgb(var(--raidcall-green-600)); color: #fff; }
.rc-sc-act--bad { background: rgb(var(--raidcall-red-50)); color: rgb(var(--raidcall-red-600)); }

/* ---------- app bars ---------- */
.rc-sc-bar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: .3em;
  padding: 2.4em .8em .5em; color: #fff;
}
.rc-sc-bar--fire { background: rgb(var(--raidcall-fire)); }
.rc-sc-bar--dark { background: rgb(var(--raidcall-gray-900)); }
.rc-sc-bar--gray { background: rgb(var(--raidcall-gray-400)); }
.rc-sc-bar--blue { background: rgb(var(--raidcall-blue-700)); }
.rc-sc-bar--overlay { position: absolute; top: 0; left: 0; right: 0; z-index: 3; }
.rc-sc-bar-main { min-width: 0; }
.rc-sc-bar-eyebrow { font-size: .625em; text-transform: uppercase; letter-spacing: .16em; opacity: .8; }
.rc-sc-bar-title { display: flex; align-items: center; gap: .3em; font-size: 1em; font-weight: 900; line-height: 1.2; }
.rc-sc-tabs { display: flex; gap: .1em; flex: none; padding: .125em; border-radius: .75em; background: rgb(0 0 0 / .2); font-size: .75em; font-weight: 700; }
.rc-sc-tabs > span { position: relative; padding: .2em .45em; border-radius: .3em; }
.rc-sc-tab--active { background: rgb(var(--raidcall-white)); color: rgb(var(--raidcall-gray-900)); }
.rc-sc-badge {
  position: absolute; top: -.2em; right: -.2em; width: .95em; height: .95em;
  display: grid; place-items: center; border-radius: 99px;
  background: rgb(var(--raidcall-yellow-400)); color: rgb(var(--raidcall-gray-900));
  font-size: .7em; font-weight: 900; font-style: normal;
}

/* ---------- rows / members ---------- */
.rc-sc-row {
  display: flex; align-items: center; justify-content: space-between; gap: .25em;
  padding: .625em 1em; border-radius: .75em; font-size: .875em;
  background: rgb(var(--raidcall-surface-2)); border: 1px solid rgb(var(--raidcall-border));
}
.rc-sc-row--info { background: rgb(var(--raidcall-blue-50)); border-color: rgb(var(--raidcall-blue-100)); }
.rc-sc-row--muted { opacity: .55; }
.rc-sc-row-label { display: flex; align-items: center; flex-wrap: wrap; gap: .25em; min-width: 0; font-weight: 700; }
.rc-sc-row-sub { flex-basis: 100%; font-weight: 600; color: rgb(var(--raidcall-muted)); }
.rc-sc-row-meta { flex: none; font-family: var(--raidcall-font-mono); color: rgb(var(--raidcall-faint, var(--raidcall-gray-400))); }
.rc-sc-unread { width: .35em; height: .35em; border-radius: 99px; background: rgb(var(--raidcall-blue-600)); }
.rc-sc-qual { padding: .125em .375em; border-radius: 99px; background: rgb(var(--raidcall-blue-50)); color: rgb(var(--raidcall-blue-700)); font-size: .64em; font-weight: 700; }
.rc-sc-pill { padding: .25em .625em; border-radius: 99px; font-size: .75em; font-weight: 700; white-space: nowrap; color: #fff; }
.rc-sc-pill--yes { background: rgb(var(--raidcall-green-500)); }
.rc-sc-pill--no { background: rgb(var(--raidcall-red-500)); }
.rc-sc-pill--wait { background: rgb(var(--raidcall-gray-200)); color: rgb(var(--raidcall-gray-500)); }

/* ---------- tallies ---------- */
.rc-sc-tallies { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25em; text-align: center; }
/* column flex, so the counter and its label stay centred without needing a
   `display` on <b> — that would out-specify .rc-sc-swap and break the overlap,
   laying the counter's states out side by side instead of on top of each other */
.rc-sc-tally { display: flex; flex-direction: column; align-items: center; padding: .75em .125em; border-radius: 1em; border: 1px solid; }
.rc-sc-tally > b { font-size: 1.875em; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rc-sc-tally > b.rc-sc-swap { justify-items: center; }
.rc-sc-tally-label { font-size: .625em; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.rc-sc-tally--yes { background: rgb(var(--raidcall-green-50)); border-color: rgb(var(--raidcall-green-100)); color: rgb(var(--raidcall-green-600)); }
.rc-sc-tally--no { background: rgb(var(--raidcall-red-50)); border-color: rgb(var(--raidcall-red-100)); color: rgb(var(--raidcall-red-500)); }
.rc-sc-tally--wait { background: rgb(var(--raidcall-surface-2)); border-color: rgb(var(--raidcall-border)); color: rgb(var(--raidcall-gray-400)); }

/* ---------- fields / chips ---------- */
.rc-sc-field {
  display: flex; align-items: center; justify-content: space-between; gap: .3em;
  padding: .75em 1em; border-radius: .75em;
  background: rgb(var(--raidcall-surface-2)); border: 1px solid rgb(var(--raidcall-border));
}
.rc-sc-field-key { font-size: .6875em; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: rgb(var(--raidcall-gray-400)); }
.rc-sc-field-value { display: flex; align-items: center; gap: .25em; font-size: .875em; font-weight: 700; }
.rc-sc-ok { color: rgb(var(--raidcall-green-600)); display: inline-flex; }
.rc-sc-chip {
  display: inline-flex; align-items: center; gap: .25em; align-self: flex-start;
  padding: .375em .75em; border-radius: 99px; border: 1px solid;
  font-size: .75em; font-weight: 700;
}
.rc-sc-chip--center { align-self: center; text-align: center; }
.rc-sc-chip--good { background: rgb(var(--raidcall-green-50)); color: rgb(var(--raidcall-green-700)); border-color: rgb(var(--raidcall-green-100)); }
.rc-sc-chip--warn { background: rgb(var(--raidcall-amber-50)); color: rgb(var(--raidcall-amber-700)); border-color: rgb(var(--raidcall-amber-200)); }
.rc-sc-chip--bad { background: rgb(var(--raidcall-red-50)); color: rgb(var(--raidcall-red-600)); border-color: rgb(var(--raidcall-red-100)); }
.rc-sc-chip--info { background: rgb(var(--raidcall-blue-50)); color: rgb(var(--raidcall-blue-700)); border-color: rgb(var(--raidcall-blue-100)); }
.rc-sc-chip--gray { background: rgb(var(--raidcall-surface-2)); color: rgb(var(--raidcall-muted)); border-color: rgb(var(--raidcall-border)); }
.rc-sc-chip--live {
  align-self: center; color: #fff;
  background: rgb(255 255 255 / .16); border-color: rgb(255 255 255 / .22);
  font-variant-numeric: tabular-nums;
}
.rc-sc-livedot {
  width: .42em; height: .42em; border-radius: 50%; flex: none;
  background: rgb(var(--raidcall-fire)); animation: rc-sc-livedot 1.6s ease-in-out infinite;
}
@keyframes rc-sc-livedot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- buttons / results ---------- */
.rc-sc-choice { display: flex; flex-direction: column; gap: .45em; }
.rc-sc-big {
  display: flex; align-items: center; justify-content: center; gap: .3em;
  padding: 1.1em .4em; border-radius: .65em;
  font-size: 1.5em; font-weight: 900; letter-spacing: .02em; color: #fff;
}
.rc-sc-big--pill { padding: .55em 1.25em; border-radius: 99px; font-size: 1em; align-self: center; }
.rc-sc-big--yes { background: rgb(var(--raidcall-green-600)); }
.rc-sc-big--no { background: rgb(var(--raidcall-red-500)); }
.rc-sc-big--good { background: rgb(var(--raidcall-green-600)); }
.rc-sc-big--fire { background: rgb(var(--raidcall-fire)); }
.rc-sc-big--dark { background: rgb(var(--raidcall-gray-900)); }
.rc-sc-banner { padding: .5em; border-radius: .55em; text-align: center; font-size: .8em; font-weight: 900; color: #fff; }
.rc-sc-banner--good { background: rgb(var(--raidcall-green-600)); }
.rc-sc-result { padding: 1em .6em; border-radius: .65em; text-align: center; border: 1px solid; }
.rc-sc-result-icon { width: 1.5em; height: 1.5em; }
.rc-sc-result-title { margin-top: .15em; font-size: .8em; font-weight: 900; }
.rc-sc-result-note { font-size: .58em; font-family: var(--raidcall-font-mono); }
.rc-sc-result--good { background: rgb(var(--raidcall-green-50)); border-color: rgb(var(--raidcall-green-100)); color: rgb(var(--raidcall-green-700)); }
.rc-sc-result--warn { background: rgb(var(--raidcall-amber-50)); border-color: rgb(var(--raidcall-amber-200)); color: rgb(var(--raidcall-amber-700)); }
.rc-sc-caption { padding: 0 .5em; text-align: center; font-size: .6875em; line-height: 1.35; opacity: .92; }

/* ---------- tap indicator ----------
   A fingertip-sized contact patch with a soft edge, not a hard ring: the point
   is to read as skin touching glass. pointer-events:none also lets the player
   hit-test *through* it to find the control being pressed. */
.rc-sc-tap {
  position: absolute; width: 1.9em; height: 1.9em; border-radius: 50%;
  border: 1.5px solid rgb(255 255 255 / .7);
  background: radial-gradient(closest-side, rgb(255 255 255 / .5), rgb(255 255 255 / .18));
  transform: translate(-50%, -50%); z-index: 7; pointer-events: none; opacity: 0;
}
.rc-sc-tap--dark {
  border-color: rgb(17 24 39 / .35);
  background: radial-gradient(closest-side, rgb(17 24 39 / .22), rgb(17 24 39 / .06));
}

/* ---------- voice call ---------- */
.rc-sc-incoming {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 3.4em .8em 1.8em; text-align: center;
}
.rc-sc-incoming-eyebrow { font-size: .58em; text-transform: uppercase; letter-spacing: .16em; opacity: .6; }
.rc-sc-incoming-title { margin-top: .15em; font-size: 1.05em; font-weight: 900; }
.rc-sc-incoming-number { font-size: .68em; opacity: .5; font-family: var(--raidcall-font-mono); }
.rc-sc-ring { position: relative; display: grid; place-items: center; width: 4em; height: 4em; }
/* soft glow behind the ringing handset, the way the alert page does it */
.rc-sc-ring::before {
  content: ""; position: absolute; inset: -140%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgb(var(--raidcall-fire) / .38), transparent 70%);
  animation: rc-sc-glow 2.4s ease-in-out infinite;
}
@keyframes rc-sc-glow { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.rc-sc-ring-halo { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgb(var(--raidcall-fire) / .6); }
.rc-sc-ring-core { position: relative; z-index: 1; display: grid; place-items: center; width: 2.9em; height: 2.9em; border-radius: 50%; background: rgb(var(--raidcall-fire)); color: #fff; }
.rc-sc-answer { display: flex; gap: 2.4em; }
.rc-sc-answer-btn { display: grid; place-items: center; width: 2.5em; height: 2.5em; border-radius: 50%; }
.rc-sc-answer-btn--no { background: rgb(var(--raidcall-red-500)); }
.rc-sc-answer-btn--yes { background: rgb(var(--raidcall-green-600)); }
.rc-sc-incall { display: flex; justify-content: center; }
.rc-sc-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3em; width: 64%; margin: 0 auto; }
.rc-sc-dialkey {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  background: rgb(255 255 255 / .1); color: rgb(255 255 255 / .6);
  font-family: var(--raidcall-font-mono); font-size: .8em; font-weight: 700;
}
.rc-sc-dialkey--yes { background: rgb(var(--raidcall-green-600)); color: #fff; }
.rc-sc-dialkey--no { background: rgb(var(--raidcall-red-500)); color: #fff; }

/* ---------- navigation / chat ---------- */
.rc-sc-layer { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; }
.rc-sc-layer--app { background: rgb(var(--raidcall-surface)); }
.rc-sc-map { position: absolute; inset: 0; background: #eaf0f4; }
.rc-sc-street { position: absolute; background: #fff; }
.rc-sc-route { position: absolute; inset: 0; }
.rc-sc-route path {
  fill: none; stroke: rgb(var(--raidcall-fire)); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 220; stroke-dashoffset: 220;
  transition: stroke-dashoffset 1.6s cubic-bezier(.22, 1, .36, 1);
}
.rc-sc-route[data-state="in"] path { stroke-dashoffset: 0; }
.rc-sc-dot-me { position: absolute; left: 20%; top: 80%; width: 1.2em; height: 1.2em; border-radius: 50%; background: rgb(var(--raidcall-blue-600)); border: 2px solid #fff; }
.rc-sc-map-pin { position: absolute; left: 62%; top: 17%; color: rgb(var(--raidcall-fire)); }
.rc-sc-map-pin svg { fill: #fff; }
.rc-sc-eta {
  position: absolute; left: .5em; right: .5em; bottom: .5em; z-index: 5;
  display: flex; align-items: center; gap: .4em;
  padding: .45em .6em; border-radius: .55em;
  background: rgb(var(--raidcall-surface)); color: rgb(var(--raidcall-ink));
  box-shadow: 0 6px 16px rgb(0 0 0 / .2); font-size: .7em;
}
.rc-sc-eta b { font-size: 1.1em; }
/* bubbles are ordinary flow content, but they belong to the chat *layer* that
   is painted over that flow — without lifting them they would be hidden
   underneath the very screen they are messages in */
.rc-sc-bubble {
  position: relative; z-index: 5;
  max-width: 80%; padding: .5em .75em; border-radius: 1em; font-size: .875em;
  background: rgb(var(--raidcall-surface-2));
}
.rc-sc-bubble--me { margin-left: auto; background: rgb(var(--raidcall-fire)); color: #fff; }
.rc-sc-bubble-who { display: block; font-size: .82em; font-weight: 800; opacity: .65; }

/* ---------- settings / forms ---------- */
.rc-sc-heading-sm { font-size: .62em; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: rgb(var(--raidcall-gray-400)); }
.rc-sc-switch { position: relative; flex: none; width: 1.9em; height: 1.05em; border-radius: 99px; background: rgb(var(--raidcall-gray-300)); }
.rc-sc-switch::after { content: ""; position: absolute; top: .13em; left: .13em; width: .8em; height: .8em; border-radius: 50%; background: #fff; }
.rc-sc-switch--on { background: rgb(var(--raidcall-green-600)); }
.rc-sc-switch--on::after { transform: translateX(.85em); }
.rc-sc-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .12em; text-align: center; font-size: .55em; }
.rc-sc-cal > b { color: rgb(var(--raidcall-gray-400)); font-weight: 800; }
.rc-sc-cal-day { padding: .25em 0; border-radius: .25em; font-style: normal; background: rgb(var(--raidcall-surface-2)); }
.rc-sc-cal-day--sel { background: rgb(var(--raidcall-fire)); color: #fff; font-weight: 800; }
.rc-sc-cal-day--mut { opacity: .35; }
.rc-sc-code { display: flex; gap: .25em; justify-content: center; }
.rc-sc-code > i {
  display: grid; place-items: center; width: 1.1em; height: 1.5em;
  border: 1.5px solid rgb(var(--raidcall-fire)); border-radius: .25em;
  font-family: var(--raidcall-font-mono); font-size: .8em; font-weight: 700; font-style: normal;
}
.rc-sc-langs { display: flex; gap: .25em; }
.rc-sc-langs > b, .rc-sc-langs-slot > b {
  flex: 1; padding: .3em 0; border-radius: .35em; text-align: center;
  font-size: .62em; font-weight: 800;
  background: rgb(var(--raidcall-surface-2)); color: rgb(var(--raidcall-muted));
}
.rc-sc-langs-slot { flex: 1; }
/* must out-specify `.rc-sc-langs-slot > b` above, or the picked language never
   looks picked */
.rc-sc-langs > b.rc-sc-lang--on,
.rc-sc-langs-slot > b.rc-sc-lang--on { background: rgb(var(--raidcall-fire)); color: #fff; }
.rc-sc-swatches { display: flex; gap: .3em; }
.rc-sc-swatches > b, .rc-sc-swatch-slot > b { flex: 1; height: 1.1em; border-radius: .3em; border: 2px solid transparent; }
.rc-sc-swatch-slot { flex: 1; }
.rc-sc-swatch--on { border-color: rgb(var(--raidcall-ink)); }
.rc-sc-typedot { flex: none; width: .5em; height: .5em; border-radius: 99px; }
.rc-sc-grip { color: rgb(var(--raidcall-gray-300)); }
.rc-sc-progress { height: .3em; border-radius: 99px; background: rgb(var(--raidcall-border)); overflow: hidden; }
.rc-sc-progress > i { display: block; width: 0; height: 100%; background: rgb(var(--raidcall-fire)); transition: width 1.2s cubic-bezier(.22, 1, .36, 1); }
.rc-sc-progress[data-state="in"] > i { width: 100%; }
.rc-sc-qr {
  display: grid; grid-template-columns: repeat(17, 1fr);
  width: 5.2em; height: 5.2em; margin: .2em auto; padding: .15em;
  background: #fff; border: 1px solid rgb(var(--raidcall-border)); border-radius: .25em;
}
.rc-sc-qr > i { background: transparent; }
.rc-sc-qr > i[data-on] { background: #111827; }
.rc-sc-uptime { display: flex; gap: 1px; height: 1.4em; }
.rc-sc-uptime > i { flex: 1; border-radius: 1px; background: rgb(var(--raidcall-green-500)); }
.rc-sc-uptime > i[data-rc-day="warn"] { background: rgb(var(--raidcall-amber-500)); }
.rc-sc-uptime > i[data-rc-day="down"] { background: rgb(var(--raidcall-red-500)); }
.rc-sc-layer--dark { background: linear-gradient(165deg, #1e2733, #0b0f14); color: #fff; }
.rc-sc-layer-head { padding: 3em .8em 0; text-align: center; }
.rc-sc-layer-title { margin-top: .2em; font-size: .9em; font-weight: 900; }
.rc-sc-card {
  position: absolute; left: .5em; right: .5em; z-index: 5;
  padding: .5em .6em; border-radius: .55em;
  background: rgb(var(--raidcall-surface)); color: rgb(var(--raidcall-ink));
  box-shadow: 0 8px 20px rgb(0 0 0 / .2);
}
.rc-sc-card--top { top: 6.2em; }
.rc-sc-card--bottom { bottom: .5em; }
.rc-sc-card-title { margin-top: .1em; font-size: .72em; font-weight: 900; }
.rc-sc-card-note { margin-top: .2em; font-size: .58em; color: rgb(var(--raidcall-muted)); }
.rc-sc-card-chips { display: flex; gap: .3em; margin-top: .3em; }
.rc-sc-big--blue { background: rgb(var(--raidcall-blue-700)); }
.rc-sc-big--amber { background: rgb(var(--raidcall-amber-600)); }
.rc-sc-row--warn { background: rgb(var(--raidcall-amber-50)); border-color: rgb(var(--raidcall-amber-200)); }
.rc-sc-row--bad { background: rgb(var(--raidcall-red-50)); border-color: rgb(var(--raidcall-red-100)); }
.rc-sc-row--good { background: rgb(var(--raidcall-green-50)); border-color: rgb(var(--raidcall-green-100)); }
.rc-sc-field--warn { background: rgb(var(--raidcall-amber-50)); border-color: rgb(var(--raidcall-amber-200)); }
.rc-sc-field--good { background: rgb(var(--raidcall-green-50)); border-color: rgb(var(--raidcall-green-100)); }

/* ==========================================================================
   Card trigger
   --------------------------------------------------------------------------
   The demo opens from a real <button> that carries the feature name as its
   accessible name; ::after stretches its hit area over the whole card. The
   "read more" link is a sibling raised above that layer, so it is never an
   interactive element nested inside another one.
   ========================================================================== */
.rc-sc-trigger {
  padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer;
}
.rc-sc-trigger::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.rc-sc-trigger:focus-visible { outline: none; }
.rc-sc-trigger:focus-visible::after { outline: 2px solid rgb(var(--raidcall-fire)); outline-offset: 3px; }
.rc-sc-deep { position: relative; z-index: 2; }
.rc-sc-hint {
  display: inline-flex; align-items: center; gap: .35rem; margin-top: .7rem;
  font-size: .73rem; font-weight: 700; color: rgb(var(--raidcall-fire)); pointer-events: none;
}
@media (hover: hover) {
  .rc-sc-trigger:hover { text-decoration: underline; }
}

/* ==========================================================================
   Dialog (desktop) / bottom sheet (mobile)
   ========================================================================== */
.rc-sc-dialog {
  /* the element itself is only a frame; the sheet inside carries the surface */
  padding: 0; border: 0; background: transparent;
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  overflow: visible;
}
.rc-sc-dialog:not([open]) { display: none; }
.rc-sc-dialog[open] { display: flex; }
.rc-sc-dialog::backdrop { background: rgb(9 12 16 / .72); }
:root[data-rc-sc-open] { overflow: hidden; }

/* mobile: full-screen sheet. dvh (not vh) so the browser chrome collapsing
   does not clip the controls, plus the home-bar inset.
   The whole demo has to fit ONE phone screen, so the sheet is a column where
   only the stage is elastic: the narration and the prev/replay/next row keep
   their natural height and the handset gives way. overflow-y stays `auto` as a
   safety valve - on a very small screen with a long description that is a few
   millimetres of scrolling instead of clipped controls. */
.rc-sc-sheet {
  position: relative;
  display: flex; flex-direction: column; gap: .6rem;
  width: 100%; max-height: 100dvh; height: 100dvh;
  margin-top: auto;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain;
  background: rgb(var(--raidcall-surface));
  color: rgb(var(--raidcall-ink));
  /* square on purpose: this sheet is the full 100dvh, so a rounded top edge
     only cuts two dark notches out of the corners where the backdrop shows
     through - the leftover of a design where the sheet stopped short of the
     top. The grabber still says "swipe me down". Desktop rounds it again. */
  border-radius: 0;
}
.rc-sc-grabber {
  width: 2.5rem; height: .25rem; margin: 0 auto .25rem;
  border-radius: 99px; background: rgb(var(--raidcall-border));
}
.rc-sc-close {
  position: absolute; top: .6rem; right: .6rem; z-index: 5;
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  border: 1px solid rgb(var(--raidcall-border)); border-radius: 99px;
  background: rgb(var(--raidcall-surface)); color: rgb(var(--raidcall-muted));
  cursor: pointer;
}
.rc-sc-stagewrap {
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  /* the elastic row: it takes whatever the narration leaves over */
  flex: 1 1 auto; min-height: 0;
}
/* The demo handset is sized by the space it GETS, not by the viewport width.
   flex-basis 0 makes it grow into the leftover height; with the frame's
   aspect-ratio the width then follows, so the phone simply gets smaller on a
   short screen instead of pushing the controls below the fold. The cap is on
   the HEIGHT on purpose - capping the width of an aspect-ratio box whose
   height is already flexed would stretch the handset instead of scaling it. */
.rc-sc-dialog .rc-sc-phone--lg {
  flex: 1 1 0%;
  width: auto; min-height: 8rem;
  max-height: calc(min(70vw, 16rem) * 17.5 / 9);
}
/* the scene's whole type scale hangs off --rc-sc-pf, which used to be a share
   of the VIEWPORT - meaningless once the frame stops being a fixed share of it.
   Container units make it a share of the frame itself. Custom properties are
   substituted where they are USED, so the cqw resolves against the phone for
   every element inside it; the clamp above stays the fallback. */
@supports (container-type: size) {
  /* `size`, not `inline-size`: here the width comes from the height. The base
     stays the same 16/360 share of the frame. */
  .rc-sc-dialog .rc-sc-phone--lg { container-type: size; --rc-sc-pf: 4.444cqw; }
}
.rc-sc-timeline {
  width: min(100%, 15.5rem); height: 3px;
  border-radius: 99px; background: rgb(var(--raidcall-border)); overflow: hidden;
}
.rc-sc-timeline > i { display: block; width: 0; height: 100%; border-radius: 99px; background: rgb(var(--raidcall-fire)); }
.rc-sc-info { min-width: 0; flex: none; }
.rc-sc-kicker { margin: 0; font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; color: rgb(var(--raidcall-fire)); }
.rc-sc-heading { margin: .2rem 0 .3rem; font-size: 1.1rem; font-weight: 900; letter-spacing: -.02em; padding-right: 2.5rem; }
.rc-sc-lead { margin: 0; font-size: .82rem; line-height: 1.4; color: rgb(var(--raidcall-muted)); max-width: 42ch; }

.rc-sc-steps { list-style: none; margin: .55rem 0 0; padding: 0; display: grid; gap: .05rem; }
.rc-sc-steps > li {
  display: flex; gap: .5rem; align-items: flex-start;
  padding: .22rem .45rem; border-radius: var(--raidcall-radius-lg);
  font-size: .76rem; color: rgb(var(--raidcall-gray-400));
  transition: color .2s, background-color .2s;
}
.rc-sc-step-num {
  flex: none; width: 1.05rem; height: 1.05rem; margin-top: .1rem;
  display: grid; place-items: center; border-radius: 99px;
  border: 1.5px solid currentColor;
  font-family: var(--raidcall-font-mono); font-size: .55rem; font-weight: 800;
}
.rc-sc-steps > li[data-step="done"] { color: rgb(var(--raidcall-muted)); }
.rc-sc-steps > li[data-step="done"] .rc-sc-step-num { background: rgb(var(--raidcall-green-600)); border-color: rgb(var(--raidcall-green-600)); color: #fff; }
.rc-sc-steps > li[data-step="now"] { color: rgb(var(--raidcall-ink)); background: rgb(var(--raidcall-fire-light)); font-weight: 600; }
.rc-sc-steps > li[data-step="now"] .rc-sc-step-num { background: rgb(var(--raidcall-fire)); border-color: rgb(var(--raidcall-fire)); color: #fff; }

/* nowrap: the three controls are the one row that must never fall to a second
   line and off the screen - they stay a single strip and the labels hold */
.rc-sc-controls { display: flex; flex-wrap: nowrap; gap: .35rem; margin-top: .7rem; }
.rc-sc-ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-width: 2.5rem; min-height: 2.5rem; padding: .45rem .7rem;
  border: 1px solid rgb(var(--raidcall-border)); border-radius: var(--raidcall-radius-xl);
  background: rgb(var(--raidcall-surface)); color: rgb(var(--raidcall-muted));
  font-size: .75rem; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.rc-sc-ctl--primary { background: rgb(var(--raidcall-fire)); border-color: rgb(var(--raidcall-fire)); color: #fff; }
.rc-sc-ctl[data-paused="true"] span::after { content: " ▸"; }
.rc-sc-count { flex: none; margin-left: auto; align-self: center; font-family: var(--raidcall-font-mono); font-size: .7rem; color: rgb(var(--raidcall-gray-400)); font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .rc-sc-close:hover { color: rgb(var(--raidcall-ink)); border-color: rgb(var(--raidcall-fire)); }
  .rc-sc-ctl:hover { border-color: rgb(var(--raidcall-fire)); color: rgb(var(--raidcall-fire)); }
  .rc-sc-ctl--primary:hover { background: rgb(var(--raidcall-fire-dark)); color: #fff; }
}
.rc-sc-close:focus-visible,
.rc-sc-ctl:focus-visible { outline: 2px solid rgb(var(--raidcall-fire)); outline-offset: 3px; }

/* desktop: centred dialog, phone left / narration right */
@media (min-width: 720px) {
  .rc-sc-dialog { align-items: center; justify-content: center; padding: 1rem; }
  .rc-sc-sheet {
    width: min(46rem, 100%); height: auto; max-height: min(92vh, 54rem);
    margin: 0; padding: 1.75rem;
    display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start;
    border: 1px solid rgb(var(--raidcall-border));
    border-radius: var(--raidcall-radius-3xl);
    box-shadow: var(--raidcall-shadow-xl);
  }
  .rc-sc-grabber { display: none; }

  /* The sheet is a grid here, so the stage column has no leftover height to
     flex into - the handset goes back to a definite size, and the timeline
     shares the value so it stays exactly as wide as the phone. The 68vh term
     only ever bites on a short window (a landscape phone matches this
     breakpoint too), where it keeps the frame inside the viewport. */
  .rc-sc-dialog { --rc-sc-stage-w: min(15.5rem, 64vw, calc(68vh * 9 / 17.5)); }
  .rc-sc-stagewrap { flex: none; gap: .55rem; }
  .rc-sc-dialog .rc-sc-phone--lg {
    flex: none; width: var(--rc-sc-stage-w); min-height: 0; max-height: none;
  }
  .rc-sc-timeline { width: var(--rc-sc-stage-w); }

  /* roomier narration: the desktop dialog is not fighting for vertical space */
  .rc-sc-kicker { font-size: .62rem; }
  .rc-sc-heading { margin: .3rem 0 .5rem; font-size: 1.25rem; }
  .rc-sc-lead { font-size: .9rem; }
  .rc-sc-steps { margin-top: 1rem; gap: .1rem; }
  .rc-sc-steps > li { gap: .6rem; padding: .32rem .5rem; font-size: .82rem; }
  .rc-sc-step-num { width: 1.15rem; height: 1.15rem; margin-top: .12rem; }
  .rc-sc-controls { flex-wrap: wrap; gap: .4rem; margin-top: 1.15rem; }
  .rc-sc-ctl { min-width: 2.75rem; min-height: 2.75rem; padding: .5rem .85rem; font-size: .78rem; }
}

/* still poster inside the bento cards: no JS, so neutralise the timeline */
[data-rc-preview] [data-at] { opacity: 1 !important; transform: none !important; }
[data-rc-preview] [data-fx="wipe"] { clip-path: none; }
[data-rc-preview] .rc-sc-route path { stroke-dashoffset: 0; }

/* ==========================================================================
   Timeline states — the whole animation contract
   --------------------------------------------------------------------------
   A timed element moves through these states, set by the player:

     (none)  not on screen yet   — invisible; a *block* also holds no space
     pre     the setup frame     — same look, but back in the layout, so the
                                   entry has something to transition *from*
     in      on screen
     out     leaving             — playing its exit
     gone    left                — invisible; a *block* holds no space again

   Only "pre" / "gone" differ from the resting look at all, and only in
   `display`. That is the whole point: a dismissed card lets the rows below it
   close up, and a card that has not arrived yet does not hold a hole open
   waiting for itself — which is what a phone does and a slideshow does not.
   The player FLIPs the surviving rows into their new positions, so the layout
   closes smoothly instead of snapping.

   "Block" means a *direct child* of the screen — the flex column that is the
   scene. Timed elements nested inside a block (the two halves of a
   .rc-sc-swap, calendar days, map pins) only ever fade: collapsing one of
   those would let its sibling jump into the freed cell.
   ========================================================================== */
.rc-sc-screen {
  /* iOS-like: decelerate hard, no bounce on the way out */
  --rc-sc-ease: cubic-bezier(.32, .72, 0, 1);
  --rc-sc-ease-in: cubic-bezier(.4, 0, .9, .35);
  --rc-sc-spring: cubic-bezier(.34, 1.4, .64, 1);
}
.rc-sc-screen:not([data-rc-preview]) > [data-at]:not([data-state]),
.rc-sc-screen > [data-at][data-state="gone"] { display: none; }

.rc-sc-screen [data-at] { opacity: 0; transform: translateY(10px); }
.rc-sc-screen [data-at][data-state="in"] {
  opacity: 1; transform: none;
  transition: opacity .3s var(--rc-sc-ease), transform .42s var(--rc-sc-ease);
}
.rc-sc-screen [data-at][data-state="out"] {
  opacity: 0; transform: translateY(-4px) scale(.985);
  transition: opacity .2s var(--rc-sc-ease-in), transform .2s var(--rc-sc-ease-in);
}
.rc-sc-screen [data-fx="drop"] { transform: translateY(-20px) scale(.96); }
.rc-sc-screen [data-fx="pop"] { transform: scale(.6); }
.rc-sc-screen [data-fx="pop"][data-state="in"] { transform: scale(1); transition: opacity .3s, transform .45s var(--rc-sc-spring); }
.rc-sc-screen [data-fx="pop"][data-state="out"] { transform: scale(.88); }
.rc-sc-screen [data-fx="none"] { transform: none; }
.rc-sc-screen [data-fx="none"][data-state="in"] { transition: opacity .2s var(--rc-sc-ease); }
.rc-sc-screen [data-fx="none"][data-state="out"] { transform: none; transition: opacity .18s var(--rc-sc-ease-in); }
/* a changing counter should read as a count-up, not a hard cut: the outgoing
   digit lifts away while the incoming one rises into its place */
.rc-sc-tally > b.rc-sc-swap > * { transform: translateY(.35em); transition: opacity .28s ease, transform .28s var(--rc-sc-ease); }
.rc-sc-tally > b.rc-sc-swap > [data-state="in"] { transform: none; }
.rc-sc-tally > b.rc-sc-swap > [data-state="out"] { transform: translateY(-.35em); }
.rc-sc-screen [data-fx="wipe"] { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); transition: clip-path .7s steps(14, end); }
.rc-sc-screen [data-fx="wipe"][data-state="in"] { clip-path: inset(0 0 0 0); }

/* ---------- exits that read as the OS, not as a fade ---------- */
/* opening a link from the lockscreen: the lock layer scales *away* from the
   viewer and the app underneath is revealed - the iOS app-open transition */
.rc-sc-lock[data-state="out"],
.rc-sc-incoming[data-state="out"],
.rc-sc-layer[data-state="out"] {
  opacity: 0; transform: scale(1.06);
  transition: opacity .34s var(--rc-sc-ease-in), transform .34s var(--rc-sc-ease-in);
}
/* a handled notification slides back up under the status bar */
.rc-sc-ntf[data-state="out"] {
  opacity: 0; transform: translateY(-.9em) scale(.97);
  transition: opacity .26s var(--rc-sc-ease-in), transform .3s var(--rc-sc-ease-in);
}

/* ---------- touch ----------
   A fingertip contact patch: down fast, held for a beat, released. A real
   handset does not fire an expanding ripple out of nowhere — the control under
   the finger is what moves, which is `data-rc-press` below. The player finds
   that control by hit-testing the tap's own coordinates, so a scene never has
   to name it. */
/* the "in" state must be spelled out: the generic [data-state="in"] rule would
   otherwise out-specify this and leave the dot sitting on screen at opacity 1
   once its animation has finished */
.rc-sc-screen [data-fx="tap"],
.rc-sc-screen [data-fx="tap"][data-state="in"],
.rc-sc-screen [data-fx="tap"][data-state="out"] { opacity: 0; transform: translate(-50%, -50%); transition: none; }
.rc-sc-screen [data-fx="tap"][data-state="in"] { animation: rc-sc-tap-press .58s var(--rc-sc-ease); }
@keyframes rc-sc-tap-press {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.72); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  62% { opacity: .9; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.12); }
}
.rc-sc-screen [data-rc-press] { animation: rc-sc-press .42s var(--rc-sc-ease); }
@keyframes rc-sc-press {
  0%, 100% { transform: scale(1); filter: none; }
  30%, 55% { transform: scale(.965); filter: brightness(.93); }
}
.rc-sc-screen [data-loop="ring"] { animation: rc-sc-ring 1.6s cubic-bezier(.22, 1, .36, 1) infinite; }
.rc-sc-screen .rc-sc-ring-halo--late { animation-delay: .8s; }
@keyframes rc-sc-ring { 0% { transform: scale(.7); opacity: .85; } 100% { transform: scale(1.9); opacity: 0; } }
.rc-sc-screen [data-loop="shake"] { animation: rc-sc-shake .8s ease-in-out infinite; }
@keyframes rc-sc-shake {
  0%, 100% { transform: rotate(0); } 20% { transform: rotate(-9deg); } 40% { transform: rotate(9deg); }
  60% { transform: rotate(-5deg); } 80% { transform: rotate(5deg); }
}
.rc-sc-screen [data-loop="beat"] { animation: rc-sc-beat 1.4s ease-in-out infinite; }
@keyframes rc-sc-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.rc-sc-playing { will-change: opacity, transform; }

@media (prefers-reduced-motion: reduce) {
  .rc-sc-screen *,
  .rc-sc-screen [data-at] { animation: none !important; transition: none !important; }
  .rc-sc-screen [data-at] { opacity: 1; transform: none; }
  .rc-sc-screen [data-fx="wipe"] { clip-path: none; }
  .rc-sc-screen [data-at][data-state="out"],
  .rc-sc-screen [data-at][data-state="gone"] { opacity: 0; }
  .rc-sc-screen [data-fx="tap"] { display: none; }
  .rc-sc-route path { stroke-dashoffset: 0; }
}

/* ==========================================================================
   Bringing the demos back in line with the real screens
   --------------------------------------------------------------------------
   These mirror app/templates/_alert_console.html and _chat_box.html. The demos
   had drifted: a member was one pill where the console shows a card with three
   states, the chat was bare bubbles with no composer, and the switcher still
   had the two tabs it had before the crew map existed.
   ========================================================================== */

/* ---------- member card (console dashboard) ---------- */
.rc-sc-mcard {
  display: flex;
  flex-direction: column;
  gap: .22em;
  padding: .32em .45em;
  border-radius: .45em;
  font-size: .66em;
  background: rgb(var(--raidcall-surface));
  border: 1px solid rgb(var(--raidcall-border));
  box-shadow: var(--raidcall-shadow-sm);
}
.rc-sc-mcard-top { display: flex; align-items: center; justify-content: space-between; gap: .25em; }
.rc-sc-mcard-top > .rc-sc-swap { justify-items: end; }
.rc-sc-mcard-states { display: flex; align-items: center; gap: .3em; }

/* the delivery states the commander actually watches while phones are ringing */
.rc-sc-state {
  padding: .05em .35em;
  border-radius: 99px;
  font-size: .86em;
  font-weight: 700;
  white-space: nowrap;
}
.rc-sc-state--live { background: rgb(var(--raidcall-blue-100)); color: rgb(var(--raidcall-blue-700)); }
.rc-sc-state--sent { background: rgb(var(--raidcall-blue-50)); color: rgb(var(--raidcall-blue-600)); }
.rc-sc-state--ok { background: rgb(var(--raidcall-green-50)); color: rgb(var(--raidcall-green-700)); }
.rc-sc-state--warn { background: rgb(var(--raidcall-amber-50)); color: rgb(var(--raidcall-amber-700)); }

/* ---------- console header extra lines ---------- */
.rc-sc-bar-line {
  display: flex;
  align-items: center;
  gap: .25em;
  font-size: .55em;
  font-weight: 600;
  opacity: .92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- chat ---------- */
.rc-sc-bubble-wrap { position: relative; z-index: 5; display: flex; flex-direction: column; align-items: flex-start; }
.rc-sc-bubble-wrap--me { align-items: flex-end; }
.rc-sc-bubble-time { display: block; margin-top: .1em; font-size: .74em; text-align: right; opacity: .62; }
/* a commander's standing order is not chatter and must not read like it */
.rc-sc-bubble--order {
  max-width: 100%;
  width: 100%;
  background: rgb(var(--raidcall-amber-50));
  border: 1px solid rgb(var(--raidcall-amber-300));
  color: rgb(var(--raidcall-amber-800));
}
.rc-sc-bubble-order {
  display: block;
  font-size: .78em;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgb(var(--raidcall-amber-700));
}
/* who has read down to here */
.rc-sc-reads { display: flex; gap: .15em; margin-top: .12em; }
.rc-sc-reads > i {
  display: grid;
  place-items: center;
  width: .95em; height: .95em;
  border-radius: 99px;
  font-size: .5em; font-style: normal; font-weight: 800;
  background: rgb(var(--raidcall-gray-200));
  color: rgb(var(--raidcall-gray-600));
}

/* ---------- chat composer ---------- */
.rc-sc-composer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; flex-direction: column; gap: .25em;
  padding: .3em .35em .5em;
  background: rgb(var(--raidcall-surface));
  border-top: 1px solid rgb(var(--raidcall-border));
}
.rc-sc-quick { display: flex; gap: .2em; overflow: hidden; }
.rc-sc-quick > span {
  flex: none;
  padding: .12em .4em;
  border-radius: 99px;
  font-size: .5em; font-weight: 700;
  white-space: nowrap;
  background: rgb(var(--raidcall-gray-100));
  border: 1px solid rgb(var(--raidcall-border));
  color: rgb(var(--raidcall-gray-600));
}
.rc-sc-composer-row { display: flex; align-items: center; gap: .25em; }
.rc-sc-input {
  flex: 1; min-width: 0;
  padding: .2em .5em;
  border-radius: 99px;
  font-size: .55em;
  background: rgb(var(--raidcall-surface));
  border: 1px solid rgb(var(--raidcall-border));
  color: rgb(var(--raidcall-gray-400));
}
.rc-sc-send {
  flex: none;
  display: grid; place-items: center;
  width: 1.5em; height: 1.5em;
  border-radius: 99px;
  background: rgb(var(--raidcall-fire));
  color: #fff;
}

/* ---------- crew map ---------- */
.rc-sc-crew {
  position: absolute;
  display: grid; place-items: center;
  width: 1.5em; height: 1.5em;
  border-radius: 99px;
  font-size: .6em; font-weight: 800;
  color: #fff;
  background: #374151;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / .4);
}
.rc-sc-crew--commander { background: rgb(var(--raidcall-fire)); }
/* the phone is locked or out of signal: this is where they WERE */
.rc-sc-crew--stale { opacity: .45; filter: grayscale(1); }
.rc-sc-water {
  position: absolute;
  display: grid; place-items: center;
  width: 1.3em; height: 1.3em;
  border-radius: 99px;
  font-size: .62em;
  background: #fff;
  border: 2px solid rgb(var(--raidcall-blue-600));
  box-shadow: 0 1px 2px rgb(0 0 0 / .3);
}
