/* Kit components (public/js/kit/*). Train theme: paper tickets, punched holes,
   rails. Classes are prefixed cdc-; screens style only their own cdc-<screen>-* classes. */

:root {
  /* Paper grain and fibres: code-drawn SVG noise, very faint */
  --tex-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .30 0 0 0 0 .25 0 0 0 .10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --tex-fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .28' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .42 0 0 0 0 .32 0 0 0 .16 -.04'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --paper-fill: var(--tex-grain), var(--tex-fibre), linear-gradient(#fffaf1, #fbf4e7);
}

/* ---------- Layout helpers ---------- */
.cdc-stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.cdc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cdc-pad {
  padding: calc(16px + var(--safe-top)) 18px calc(20px + var(--safe-bottom));
}

.cdc-muted {
  color: var(--text-soft);
}

/* ---------- HUD: mute button and the default bubble dock ---------- */
.cdc-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.cdc-hud > * {
  pointer-events: auto;
}

.cdc-hud__dock {
  position: absolute;
  top: calc(66px + var(--safe-top));
  inset-inline: 12px;
  pointer-events: none;
}

.cdc-hud__dock > * {
  pointer-events: auto;
}

.cdc-mute {
  position: absolute;
  top: calc(10px + var(--safe-top));
  inset-inline-end: 10px;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  border: 2px solid rgba(106, 76, 70, 0.25);
  background: #FBF6EC;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--cocoa);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  padding: 0;
}

.cdc-mute svg {
  width: 24px;
  height: 24px;
}

.cdc-mute[aria-pressed="true"] {
  color: var(--rose-ink);
}

/* Inline use (kit page) */
.cdc-mute.is-inline {
  position: relative;
  top: auto;
  inset-inline-end: auto;
}

/* ---------- Paper background (form steps) ---------- */
.cdc-paper {
  position: relative;
  min-height: 100%;
  background:
    var(--tex-grain),
    var(--tex-fibre),
    radial-gradient(120% 70% at 50% -10%, #fffaf0 0%, rgba(255, 250, 240, 0) 70%),
    radial-gradient(90% 60% at 100% 100%, rgba(201, 164, 92, 0.18), rgba(201, 164, 92, 0) 70%),
    radial-gradient(80% 50% at 0% 85%, rgba(127, 179, 174, 0.16), rgba(127, 179, 174, 0) 70%),
    linear-gradient(180deg, #f9f1e3 0%, #f3e6d1 100%);
  display: flex;
  flex-direction: column;
}

/* A faint dashed route with station dots across the top */
.cdc-paper::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 150px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 150' preserveAspectRatio='none'%3E%3Cpath d='M-10 110 C 80 40, 160 140, 250 70 S 380 30, 410 60' fill='none' stroke='%23B98B5E' stroke-opacity='.35' stroke-width='2.5' stroke-dasharray='2 9' stroke-linecap='round'/%3E%3Ccircle cx='86' cy='72' r='5' fill='%23C98F8F' fill-opacity='.45'/%3E%3Ccircle cx='250' cy='70' r='5' fill='%237FB3AE' fill-opacity='.5'/%3E%3Ccircle cx='372' cy='42' r='5' fill='%23C9A45C' fill-opacity='.5'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
  pointer-events: none;
}

.cdc-paper__content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: calc(72px + var(--safe-top)) 18px 18px;
}

/* The floor: a rail track the guide can stand on */
.cdc-paper__floor {
  position: relative;
  height: calc(64px + var(--safe-bottom));
  flex: none;
  background:
    linear-gradient(rgba(106, 76, 70, 0.35), rgba(106, 76, 70, 0.35)) 0 18px / 100% 3px no-repeat,
    linear-gradient(rgba(106, 76, 70, 0.35), rgba(106, 76, 70, 0.35)) 0 34px / 100% 3px no-repeat,
    repeating-linear-gradient(90deg, rgba(185, 139, 94, 0.45) 0 10px, transparent 10px 30px) 0 14px / 100% 26px no-repeat,
    linear-gradient(180deg, rgba(185, 139, 94, 0.18), rgba(185, 139, 94, 0.32));
  border-top: 2px solid rgba(106, 76, 70, 0.18);
}

/* ---------- Ticket card ---------- */
.cdc-ticket {
  position: relative;
  filter: var(--shadow-drop);
  --notch: 12px;
  --stub-bg: var(--cocoa);
  --stub-fg: var(--ivory);
}

.cdc-ticket--rose { --stub-bg: var(--rose); --stub-fg: #fff; }
.cdc-ticket--teal { --stub-bg: var(--teal); --stub-fg: #fff; }
.cdc-ticket--gold { --stub-bg: var(--gold); --stub-fg: #fff; }
.cdc-ticket--paper { --stub-bg: #f4e9d6; --stub-fg: var(--cocoa); }

.cdc-ticket__stub,
.cdc-ticket__body {
  position: relative;
}

.cdc-ticket__stub {
  border-radius: var(--radius) var(--radius) 0 0;
  background:
    var(--tex-grain),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.04)),
    var(--stub-bg);
  color: var(--stub-fg);
  padding: 14px 20px 16px;
  padding-inline-end: 56px;
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 100%, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 100%, #0000 97%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at 0 100%, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 100%, #0000 97%, #000) right / 51% 100% no-repeat;
}

.cdc-ticket__kicker {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
  opacity: 0.88;
  letter-spacing: 0;
}

.cdc-ticket__title {
  display: block;
  font-size: var(--fs-h3);
  font-weight: 800;
  line-height: 1.35;
}

.cdc-ticket__body {
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--paper-fill);
  padding: 18px 20px 20px;
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 0, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 0, #0000 97%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at 0 0, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 0, #0000 97%, #000) right / 51% 100% no-repeat;
}

/* The perforation between stub and body */
.cdc-ticket__body::before {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline: calc(var(--notch) + 8px);
  border-top: 2.5px dotted rgba(106, 76, 70, 0.35);
}

.cdc-ticket--no-stub .cdc-ticket__body {
  border-radius: var(--radius);
  -webkit-mask: none;
  mask: none;
}

.cdc-ticket--no-stub .cdc-ticket__body::before {
  display: none;
}

/* Punch hole on the stub: a dashed ring until punched, then a real-looking hole */
.cdc-ticket__hole {
  position: absolute;
  top: 50%;
  inset-inline-end: 18px;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px dashed currentColor;
  opacity: 0.7;
  transition: all var(--t) var(--ease);
}

.cdc-ticket.is-punched .cdc-ticket__hole {
  border: 0;
  opacity: 1;
  background: radial-gradient(circle at 50% 35%, #4a3531 0 55%, #6A4C46 100%);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cdc-ticket.is-punching .cdc-ticket__hole {
  animation: cdc-punch var(--t) var(--ease);
}

@keyframes cdc-punch {
  0% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

.cdc-ticket__serial {
  position: absolute;
  top: 6px;
  inset-inline-end: 16px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.55;
  letter-spacing: 0.08em;
  direction: ltr;
}

/* ---------- Buttons ---------- */
.cdc-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.cdc-btn svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.cdc-btn--main {
  min-height: 56px;
  padding: 0 30px;
  color: var(--ivory);
  background:
    var(--tex-grain),
    linear-gradient(180deg, #7d5d55 0%, var(--cocoa) 55%, #5d423c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 4px 0 #3e2c28,
    0 10px 18px -6px rgba(42, 35, 33, 0.55);
  outline: 1.5px dashed rgba(247, 242, 234, 0.4);
  outline-offset: -7px;
}

.cdc-btn--main:active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 0 #3e2c28, 0 6px 12px -6px rgba(42, 35, 33, 0.5);
}

.cdc-btn--secondary {
  color: var(--cocoa);
  background: var(--paper-fill);
  border: 2px solid var(--cocoa);
  box-shadow: 0 3px 0 rgba(106, 76, 70, 0.35);
}

.cdc-btn--secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(106, 76, 70, 0.35);
}

.cdc-btn--link {
  padding: 0 10px;
  background: none;
  color: var(--cocoa);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: rgba(106, 76, 70, 0.4);
}

/* On a picture: a soft paper pill keeps the link readable */
.cdc-btn--link.is-on-scene {
  background: rgba(251, 246, 236, 0.86);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(42, 35, 33, 0.2);
}

.cdc-btn--block {
  display: flex;
  width: 100%;
}

.cdc-btn:disabled,
.cdc-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

/* ---------- Chips ---------- */
.cdc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cdc-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid rgba(106, 76, 70, 0.28);
  background: var(--paper-fill);
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.35;
  text-align: start;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(106, 76, 70, 0.18);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.cdc-chip__check {
  display: none;
  width: 20px;
  height: 20px;
  flex: none;
}

.cdc-chip[aria-pressed="true"] {
  background: var(--cocoa);
  border-color: var(--cocoa);
  color: var(--ivory);
  box-shadow: 0 2px 0 #3e2c28;
}

.cdc-chip[aria-pressed="true"] .cdc-chip__check {
  display: block;
}

.cdc-chip:active {
  transform: scale(0.97);
}

.cdc-chip:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ---------- Speech bubble with the guide's face ---------- */
.cdc-bubble {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 100%;
}

.cdc-bubble__face {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  background: radial-gradient(circle at 50% 40%, #fff6e3, var(--gold-soft));
  box-shadow: 0 0 0 2px var(--gold), var(--shadow);
  animation: cdc-face-in var(--t) var(--ease) both, cdc-breathe 900ms ease-in-out var(--t) 1;
}

.cdc-bubble__face {
  position: relative;
}

/* The face art is head and shoulders; zoom in so the face fills about 70% of the
   circle and each line's expression (f1–f6) reads at phone size (review round 3). */
.cdc-bubble__face img {
  position: absolute;
  width: 170%;
  height: 170%;
  max-width: none;
  left: -35%;
  top: -14%;
  object-fit: cover;
}

.cdc-bubble__body {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--paper-fill);
  box-shadow: var(--shadow);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
}

/* The tail points to the face (the face is on the start side: right in RTL) */
.cdc-bubble__body::before {
  content: "";
  position: absolute;
  bottom: 12px;
  inset-inline-start: -9px;
  width: 18px;
  height: 18px;
  background: #fdf7ec;
  transform: rotate(45deg);
  border-radius: 3px;
}

.cdc-bubble__text {
  position: relative;
  display: block;
  animation: cdc-fade-in var(--t) var(--ease) 180ms both;
}

.cdc-bubble.no-face .cdc-bubble__body::before {
  display: none;
}

.cdc-bubble.is-leaving {
  animation: cdc-fade-out var(--t-fast) var(--ease) both;
}

@keyframes cdc-face-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes cdc-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes cdc-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes cdc-fade-out {
  to { opacity: 0; transform: translateY(-4px); }
}

/* ---------- Pictures (assets.js img): placeholder background while missing or loading ---------- */
.cdc-img {
  background: var(--img-ph, none) center / cover;
  color: transparent;
}

.cdc-img.is-missing {
  /* broken-image icon hidden; the placeholder background stays */
  font-size: 0;
}

/* ---------- Scene ---------- */
.cdc-scene {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--ph, linear-gradient(180deg, #a9cfd8 0%, #f3e3c8 70%, #d9b98f 100%));
  --floor: 86%;
}

.cdc-scene--full {
  min-height: 100%;
  height: 100%;
}

.cdc-scene--header {
  aspect-ratio: 4 / 3;
}

.cdc-scene__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focal, 50% 50%);
}

.cdc-scene__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* Guide slot: feet on the floor line; contact shadow under them */
.cdc-scene__guide {
  position: absolute;
  bottom: calc(100% - var(--floor));
  width: var(--guide-w, 44%);
  aspect-ratio: 765 / 1024;
  inset-inline-start: var(--guide-x, 2%);
  pointer-events: none;
}

.cdc-scene__guide.is-left {
  inset-inline-start: auto;
  inset-inline-end: var(--guide-x, 2%);
}

.cdc-scene__shadow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 72%;
  height: 22px;
  transform: translate(-50%, 50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(42, 35, 33, 0.42), rgba(42, 35, 33, 0.18) 55%, rgba(42, 35, 33, 0));
}

.cdc-pose {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  animation: cdc-pose-in var(--t-slow) var(--ease) both;
}

@keyframes cdc-pose-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Station card ---------- */
.cdc-station-card {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: start;
  cursor: pointer;
  filter: var(--shadow-drop);
  transition: transform var(--t-fast) var(--ease);
  --notch: 11px;
}

.cdc-station-card:active {
  transform: scale(0.985);
}

.cdc-station-card__pic {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background: var(--ph, var(--gold-soft));
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 100%, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 100%, #0000 97%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at 0 100%, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 100%, #0000 97%, #000) right / 51% 100% no-repeat;
}

.cdc-station-card__pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cdc-station-card__strip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 10px 18px 12px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--paper-fill);
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 0, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 0, #0000 97%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at 0 0, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 0, #0000 97%, #000) right / 51% 100% no-repeat;
}

.cdc-station-card__strip::before {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline: 20px;
  border-top: 2.5px dotted rgba(106, 76, 70, 0.32);
}

.cdc-station-card__name {
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.cdc-count {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 2px 14px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: var(--fs-small);
  font-weight: 800;
  white-space: nowrap;
}

.cdc-station-card[data-station="teachers"] .cdc-count { background: var(--teal-soft); color: var(--teal-ink); }
.cdc-station-card[data-station="family"] .cdc-count { background: var(--rose-soft); color: var(--rose-ink); }

/* ---------- Message ticket ---------- */
.cdc-msg {
  position: relative;
  filter: var(--shadow-drop);
  --notch: 10px;
}

.cdc-msg__paper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-fill);
  padding: 14px 18px 16px;
  padding-inline-start: 26px;
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 38px, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 38px, #0000 97%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at 0 38px, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 38px, #0000 97%, #000) right / 51% 100% no-repeat;
}

/* coloured edge on the start side, like a ticket's colour band */
.cdc-msg__paper::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 8px;
  background: var(--band, var(--gold));
  opacity: 0.85;
}

.cdc-msg[data-station="teachers"] { --band: var(--teal); }
.cdc-msg[data-station="family"] { --band: var(--rose); }

.cdc-msg__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.cdc-msg__avatar {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(106, 76, 70, 0.25);
}

.cdc-msg__name {
  font-weight: 800;
  font-size: var(--fs-body);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.cdc-msg__role {
  display: block;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-soft);
}

.cdc-msg__text {
  margin-top: 10px;
  font-size: var(--fs-body);
  line-height: 1.75;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.cdc-msg__chip {
  display: block;
  font-weight: 700;
  color: var(--cocoa);
}

.cdc-msg__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  min-height: 40px;
}

.cdc-msg__item {
  width: 44px;
  height: 44px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(238, 221, 181, 0.55);
  object-fit: contain;
}

/* The word as a rubber stamp */
.cdc-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 2px 16px;
  border: 3px double var(--rose-ink);
  border-radius: 10px;
  color: var(--rose-ink);
  font-weight: 800;
  font-size: 18px;
  transform: rotate(-5deg);
  background: rgba(201, 143, 143, 0.08);
  mix-blend-mode: multiply;
}

/* ---------- Store ad ---------- */
.cdc-store-ad {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--paper-fill);
  border: 2px dashed rgba(106, 76, 70, 0.35);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.cdc-store-ad__icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--cocoa);
  color: var(--ivory);
}

.cdc-store-ad__icon svg {
  width: 30px;
  height: 30px;
}

.cdc-store-ad__q {
  display: block;
  font-weight: 700;
  font-size: var(--fs-body);
  line-height: 1.45;
}

.cdc-store-ad__cta {
  display: block;
  margin-top: 2px;
  color: var(--cocoa);
  font-weight: 800;
  font-size: var(--fs-body);
  text-decoration: underline;
  text-decoration-color: rgba(106, 76, 70, 0.4);
  text-underline-offset: 5px;
}

/* ---------- Footer ---------- */
.cdc-footer {
  padding: 14px 16px calc(16px + var(--safe-bottom));
  text-align: center;
  font-size: var(--fs-small);
  color: var(--text-soft);
}

.cdc-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 8px;
  color: var(--cocoa);
  font-weight: 700;
  text-decoration: none;
}

.cdc-footer .cdc-footer__admin {
  display: flex;
  justify-content: center;
  font-weight: 400;
  color: var(--text-soft);
}

/* ---------- Screen transitions (router) ---------- */
@media (prefers-reduced-motion: reduce) {
  .cdc-bubble__face,
  .cdc-bubble__text,
  .cdc-pose {
    animation: none;
  }
}

/* ---- Shared 3D floor and station backdrop (lead glue, review round 1) ----
   .cdc-floor-3d: a strip cut from the real platform scene (tiles + platform floor),
   to put under a standing guide instead of a drawn rail line. Give it a height
   (e.g. 120–170 px); the guide's feet go about 40% from its top. Add a contact
   shadow (.cdc-floor-3d__shadow or your own) under the feet.
   .cdc-backdrop-station: the station wall (arches, bunting) washed in ivory, for
   form steps (who, activity, write, empty states) instead of flat paper. */
.cdc-floor-3d {
  position: relative;
  background-image: url("/assets/img/scene-platform.webp");
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-position: center bottom;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px);
          mask-image: linear-gradient(to bottom, transparent 0, #000 22px);
}
.cdc-floor-3d__shadow {
  position: absolute;
  width: 46%;
  height: 22px;
  left: 50%;
  top: 34%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(42, 35, 33, 0.38), rgba(42, 35, 33, 0));
  pointer-events: none;
}
.cdc-backdrop-station {
  background-color: var(--ivory, #F7F2EA);
  background-image:
    linear-gradient(to bottom, rgba(247, 242, 234, 0.3) 0%, rgba(247, 242, 234, 0.38) 45%, rgba(247, 242, 234, 0.55) 100%),
    url("/assets/img/scene-platform.webp");
  background-repeat: no-repeat;
  background-size: cover, 160% auto;
  background-position: center, center 34%;
}
