/* avatars.ad: the dressing room before a shoot. Light is the blush room with the lights on, dark is
   the plum room just before the shoot. Everything that moves is under html.motion, which theme.js
   sets only when reduced motion is not asked for. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-variable-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --plum: #2a1424;
  --velvet: #4a2340;
  --lipstick: #e0245e;
  --neon: #ff3d6e;
  --bulb: #ffd98a;
  --silver: #c9cdd6;
  --blush: #fbefe9;

  --room: var(--blush);
  --room-stripe: rgba(224, 36, 94, 0.045);
  --ink: var(--plum);
  --ink-soft: #6b3d5c;
  --accent: var(--lipstick);
  --on-accent: #ffffff;
  --accent-text: #c8195a;
  --chip-bg: rgba(255, 255, 255, 0.72);
  --chip-line: rgba(74, 35, 64, 0.16);
  --cue-line: rgba(74, 35, 64, 0.28);
  --spill: rgba(255, 210, 130, 0.55);
  --spill-2: rgba(255, 140, 170, 0.22);
  --dim: #5c2a4e;
  --dim-in: #e7b8c8;
  --bubble: #ffffff;
  --frame-a: #66305a;
  --frame-b: #4a2340;
  --frame-c: #351730;
  --glass-a: #f6eef1;
  --glass-b: #d9d3dd;
  --glass-c: #bfc1cc;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Hiragino Sans", "Noto Sans JP", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --room: var(--plum);
    --room-stripe: rgba(255, 61, 110, 0.05);
    --ink: var(--blush);
    --ink-soft: #d9b8c8;
    --accent: var(--neon);
    --on-accent: var(--plum);
    --accent-text: var(--neon);
    --chip-bg: rgba(74, 35, 64, 0.55);
    --chip-line: rgba(251, 239, 233, 0.16);
    --cue-line: rgba(251, 239, 233, 0.3);
    --spill: rgba(255, 200, 120, 0.2);
    --spill-2: rgba(255, 61, 110, 0.16);
    --dim: #3c2a36;
    --dim-in: #a48a98;
    --bubble: var(--blush);
    --frame-a: #74376a;
    --frame-b: #56284c;
    --frame-c: #3e1937;
    --glass-a: #e9e1e9;
    --glass-b: #c6bfcd;
    --glass-c: #a7a6b6;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --room: var(--plum);
  --room-stripe: rgba(255, 61, 110, 0.05);
  --ink: var(--blush);
  --ink-soft: #d9b8c8;
  --accent: var(--neon);
  --on-accent: var(--plum);
  --accent-text: var(--neon);
  --chip-bg: rgba(74, 35, 64, 0.55);
  --chip-line: rgba(251, 239, 233, 0.16);
  --cue-line: rgba(251, 239, 233, 0.3);
  --spill: rgba(255, 200, 120, 0.2);
  --spill-2: rgba(255, 61, 110, 0.16);
  --dim: #3c2a36;
  --dim-in: #a48a98;
  --bubble: var(--blush);
  --frame-a: #74376a;
  --frame-b: #56284c;
  --frame-c: #3e1937;
  --glass-a: #e9e1e9;
  --glass-b: #c6bfcd;
  --glass-c: #a7a6b6;
  color-scheme: dark;
}

/* ---------- avatar colour sets: three human-ish, three that no person has ---------- */

[data-colours="lilac"], .mini-lilac { --skin: #c9b6ff; --hair: #ffc95a; --top: #4a2340; --trim: #ff3d6e; --cheek: #ff79b0; }
[data-colours="peach"], .mini-peach { --skin: #ffd5bb; --hair: #3d1f2f; --top: #e0245e; --trim: #fbefe9; --cheek: #ff8a9d; }
[data-colours="mint"], .mini-mint { --skin: #a6e9d0; --hair: #e0245e; --top: #2a1424; --trim: #ff8fb1; --cheek: #ff8fb1; }
[data-colours="cocoa"], .mini-cocoa { --skin: #8f5d40; --hair: #24121a; --top: #ff8a5c; --trim: #fbefe9; --cheek: #e0607e; }
[data-colours="bubblegum"], .mini-bubblegum { --skin: #ffc3dd; --hair: #7b3fe4; --top: #ff7a59; --trim: #fbefe9; --cheek: #ff5f99; }
[data-colours="toffee"], .mini-toffee { --skin: #e4ab7c; --hair: #8c2f39; --top: #6c3a96; --trim: #ffc3dd; --cheek: #e8677c; }

[data-colours], .mini {
  --skin-shade: color-mix(in oklab, var(--skin) 82%, #4a2340);
  --skin-line: color-mix(in oklab, var(--skin) 55%, #2a1424);
  --brow: color-mix(in oklab, var(--hair) 45%, #2a1424);
}

/* ---------- base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--room);
  background-image: repeating-linear-gradient(90deg, transparent 0 46px, var(--room-stripe) 46px 48px);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
main { overflow-x: clip; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- top bar ---------- */

.bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 16px 6px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-radius: 8px;
}

.wm-mirror { width: 26px; height: 26px; flex: none; }
.wm-frame { fill: var(--velvet); }
.wm-glass { fill: var(--silver); }
.wm-bulbs { fill: var(--bulb); }

.theme {
  display: inline-flex;
  margin: 0;
  padding: 3px;
  border: 1.5px solid var(--chip-line);
  border-radius: 999px;
  background: var(--chip-bg);
  min-width: 0;
}

.theme label { position: relative; display: block; cursor: pointer; }

.theme span {
  display: block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-soft);
}

.theme input:checked + span {
  background: var(--ink);
  color: var(--room);
}

.theme input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-areas: "copy" "stage" "rehearsal";
  row-gap: 14px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 6px 16px 48px;
}

.copy { grid-area: copy; }
.stage { grid-area: stage; }
.rehearsal { grid-area: rehearsal; }

h1 {
  position: relative;
  z-index: 31;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 12vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

h1 > span { display: block; }
.hl-accent { color: var(--accent-text); }

h1.is-swapping > span { opacity: 0; transform: translateY(-0.18em) rotate(-2deg); }

.lede {
  margin-top: 12px;
  max-width: 36em;
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---------- the stage: ON AIR, the mirror, the line ---------- */

.stage {
  --mw: min(300px, 80vw);
  --pad: 26px;
  --b: 14px;
  position: relative;
  z-index: 31;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  width: 100%;
  padding-top: 4px;
}

.stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 46%;
  width: calc(var(--mw) * 2.2);
  height: calc(var(--mw) * 2);
  translate: -50% -50%;
  background:
    radial-gradient(closest-side, var(--spill), transparent 75%),
    radial-gradient(closest-side, var(--spill-2), transparent);
  pointer-events: none;
}

.onair {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 7px;
}

.onair-wire {
  width: 2px;
  height: 10px;
  background: var(--velvet);
  opacity: 0.7;
}

.onair-box {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 10px;
  border-radius: 8px;
  background: linear-gradient(#3d1a34, #2a1124);
  border: 1.5px solid #1d0a17;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 10px -4px rgba(0, 0, 0, 0.5);
  font-family: var(--display);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  line-height: 1.2;
  color: #82506d;
}

.onair-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5c2a46;
}

.stage.is-live .onair-box {
  background: linear-gradient(#ff5a82, #e0245e);
  border-color: #ffb3c6;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 61, 110, 0.25), 0 0 22px 4px rgba(255, 61, 110, 0.6), 0 0 70px 10px rgba(255, 61, 110, 0.35);
}

.stage.is-live .onair-dot { background: #fff; box-shadow: 0 0 8px 2px #fff; }

.motion .stage.is-live .onair-box { animation: onair-on 0.6s linear 1; }

@keyframes onair-on {
  0%, 12%, 30% { filter: brightness(0.35); }
  6%, 22%, 45%, 100% { filter: brightness(1); }
  38% { filter: brightness(0.7); }
}

.mirror {
  position: relative;
  width: var(--mw);
  height: calc((var(--mw) - 2 * var(--pad)) * 1.125 + 2 * var(--pad));
  border-radius: calc(var(--pad) * 0.9);
  background:
    linear-gradient(150deg, var(--frame-a) 0%, var(--frame-b) 38%, var(--frame-c) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.14),
    inset 0 -3px 0 rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 30px 50px -24px rgba(42, 20, 36, 0.6),
    0 0 90px 10px rgba(255, 205, 120, 0.22);
}

/* bulbs */
.bulbs { position: absolute; inset: 0; pointer-events: none; }

.bulb-row,
.bulb-col {
  position: absolute;
  display: flex;
  justify-content: space-between;
}

.bulb-row { left: 0; right: 0; padding-inline: calc((var(--pad) - var(--b)) / 2); }
.bulb-top { top: calc((var(--pad) - var(--b)) / 2); }
.bulb-bottom { bottom: calc((var(--pad) - var(--b)) / 2); flex-direction: row-reverse; }
.bulb-col { flex-direction: column; justify-content: space-evenly; top: var(--pad); bottom: var(--pad); }
.bulb-left { left: calc((var(--pad) - var(--b)) / 2); flex-direction: column-reverse; }
.bulb-right { right: calc((var(--pad) - var(--b)) / 2); }

.bulbs i {
  display: block;
  width: var(--b);
  height: var(--b);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fffef8 0 14%, #fff3d2 30%, var(--bulb) 60%, #f0b24e 100%);
  box-shadow:
    0 0 0 2px #d9d2c6,
    0 0 0 3.5px rgba(26, 8, 20, 0.45),
    0 0 calc(var(--b) * 0.7) calc(var(--b) * 0.2) rgba(255, 217, 138, 0.95),
    0 0 calc(var(--b) * 1.9) calc(var(--b) * 0.5) rgba(255, 185, 90, 0.42);
}

.motion .bulbs i { animation: flicker var(--fd, 6s) var(--fdel, 0s) ease-in-out infinite; }

@keyframes flicker {
  0%, 44%, 56%, 100% { filter: brightness(1); }
  47% { filter: brightness(0.82); }
  49% { filter: brightness(1.06); }
  52% { filter: brightness(0.9); }
}

.motion .mirror.is-pulse .bulbs i { animation: flare 0.62s var(--pd, 0s) ease-out 1 both; }

@keyframes flare {
  0% { filter: brightness(1); transform: scale(1); }
  35% { filter: brightness(1.5) saturate(1.3); transform: scale(1.22); }
  100% { filter: brightness(1); transform: scale(1); }
}

/* the glass */
.glass {
  position: absolute;
  inset: var(--pad);
  overflow: hidden;
  border-radius: calc(var(--pad) * 0.45);
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 236, 200, 0.75), rgba(255, 236, 200, 0) 60%),
    linear-gradient(172deg, var(--glass-a) 0%, var(--glass-b) 52%, var(--glass-c) 100%);
  box-shadow:
    0 0 0 3px var(--silver),
    0 0 0 4.5px rgba(26, 8, 20, 0.5),
    inset 0 0 24px rgba(42, 20, 36, 0.22);
}

.glow {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 92%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.9), rgba(255, 244, 230, 0.4) 55%, rgba(255, 255, 255, 0));
}

.avatar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.streak {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(122deg, transparent 0 12%, rgba(255, 255, 255, 0.5) 12.5% 19%, transparent 19.5% 22%, rgba(255, 255, 255, 0.32) 22.5% 24%, transparent 24.5%),
    linear-gradient(122deg, transparent 0 74%, rgba(255, 255, 255, 0.22) 74.5% 79%, transparent 79.5%);
  mix-blend-mode: screen;
}

.doodle {
  position: absolute;
  top: 6%;
  right: 6%;
  width: 17%;
  rotate: 10deg;
  fill: none;
  stroke: var(--lipstick);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

/* the avatar */
.head { fill: var(--skin); }
.ear { fill: var(--skin-shade); }
.neck { fill: var(--skin-shade); }
.top { fill: var(--top); }
.top-shine { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 5; stroke-linecap: round; }
.neckline { fill: var(--skin-shade); }
.collar { fill: none; stroke: var(--trim); stroke-width: 4.5; stroke-linecap: round; }
.cheek { fill: var(--cheek); opacity: 0.6; }
.brow { fill: none; stroke: var(--brow); stroke-width: 4.5; stroke-linecap: round; }
.eye ellipse { fill: #2a1424; }
.glint { fill: #ffffff; }
.chin-shadow { fill: var(--skin-line); opacity: 0.25; }
.nose { fill: none; stroke: var(--skin-line); stroke-width: 3; stroke-linecap: round; opacity: 0.7; }
.mouth { fill: #3a1426; stroke: #3a1426; stroke-width: 2.4; stroke-linejoin: round; }
.tongue { fill: #ff7d9b; opacity: 0; }
.avatar.is-open .tongue { opacity: 1; }
.hair-back,
.hair-front,
.chip-hair,
.chip-hair-back,
.mini use { fill: var(--hair); }
.shine { fill: none; stroke: rgba(255, 255, 255, 0.38); stroke-width: 5; stroke-linecap: round; }
.strand { fill: none; stroke: color-mix(in oklab, var(--hair) 72%, #2a1424); stroke-width: 3; stroke-linecap: round; }
.band { fill: var(--lipstick); }
.tag-card { fill: #ffffff; stroke: rgba(42, 20, 36, 0.18); stroke-width: 1; }
.tag-pin { fill: var(--lipstick); }
.tag-text {
  fill: #2a1424;
  font-family: var(--display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.eye { transform-box: fill-box; transform-origin: center; }
.eyes, .brows { transition: none; }
.motion .eye { transition: transform 0.07s ease-in; }
.motion .eyes { transition: transform 0.35s cubic-bezier(0.3, 1.2, 0.5, 1); }
.motion .brows { transition: transform 0.25s ease; }
.avatar.is-blink .eye,
.avatar.is-wink .eye-r { transform: scaleY(0.1); }
.avatar.is-talking .brows,
.avatar.is-hello .brows { transform: translateY(-4px); }
.avatar.is-wink .cheek { transform: translateY(-2px); }

.motion .mouth { transition: d 0.07s ease; }

.motion .avatar .breathe { animation: breathe 5s ease-in-out infinite; transform-origin: 120px 270px; }
.motion .avatar .head-group { animation: sway 7.5s ease-in-out infinite; transform-origin: 120px 196px; }
.motion .avatar.is-talking .head-group { animation: talk-nod 0.8s ease-in-out infinite; }
.motion .avatar.is-pop { animation: pop 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) 1; transform-origin: 50% 100%; }

@keyframes breathe {
  50% { transform: translateY(-1.6px) scale(1.006); }
}

@keyframes sway {
  0%, 100% { transform: rotate(-1.3deg); }
  50% { transform: rotate(1.5deg); }
}

@keyframes talk-nod {
  0%, 100% { transform: rotate(-1deg) translateY(0); }
  50% { transform: rotate(1.2deg) translateY(-1.5px); }
}

@keyframes pop {
  0% { transform: scale(1); }
  30% { transform: scale(0.94, 0.97); }
  65% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.spk { fill: var(--bulb); stroke: #ffffff; stroke-width: 1.6; opacity: 0; transform-box: fill-box; transform-origin: center; }
.motion .avatar.is-sparkle .spk { animation: sparkle 0.7s ease-out 1 both; }
.motion .avatar.is-sparkle .sparkles > g:nth-child(2) .spk { animation-delay: 0.08s; }
.motion .avatar.is-sparkle .sparkles > g:nth-child(3) .spk { animation-delay: 0.16s; }
.motion .avatar.is-sparkle .sparkles > g:nth-child(4) .spk { animation-delay: 0.05s; }

@keyframes sparkle {
  0% { opacity: 0; scale: 0.2; rotate: -30deg; }
  40% { opacity: 1; scale: 1.15; }
  100% { opacity: 0; scale: 0.6; rotate: 40deg; }
}

/* a quick hello when the language changes */
.hello {
  position: absolute;
  z-index: 2;
  left: 5%;
  top: 7%;
  max-width: 62%;
  padding: 5px 11px 6px;
  border-radius: 14px 14px 4px 14px;
  background: #ffffff;
  color: #2a1424;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  box-shadow: 0 6px 14px -6px rgba(42, 20, 36, 0.45);
  opacity: 0;
  transform: scale(0.6);
  transform-origin: 100% 100%;
}

.hello::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 0;
  width: 14px;
  height: 12px;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.hello.is-on { opacity: 1; transform: none; }
.motion .hello { transition: opacity 0.18s ease, transform 0.3s cubic-bezier(0.2, 1.5, 0.4, 1); }

/* COMING SOON, tucked into the frame */
.soon {
  position: absolute;
  z-index: 4;
  right: calc(var(--pad) * -0.7);
  bottom: calc(var(--pad) * 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 40%;
  padding: 14px 10px 12px;
  text-align: center;
  border-radius: 6px;
  background: #fffaf5;
  color: #2a1424;
  box-shadow: 0 14px 26px -10px rgba(26, 8, 20, 0.55), 0 1px 0 rgba(0, 0, 0, 0.04);
  transform: rotate(-6deg);
  visibility: hidden;
  opacity: 0;
}

.mirror.is-soon .soon { visibility: visible; opacity: 1; }
.motion .mirror.is-soon .soon { animation: soon-in 0.75s cubic-bezier(0.2, 1.35, 0.35, 1) both; }

@keyframes soon-in {
  0% { opacity: 0; transform: translate(80%, 10%) rotate(18deg); }
  25% { opacity: 1; }
  100% { opacity: 1; transform: rotate(-6deg); }
}

.soon-tape {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 56px;
  height: 18px;
  translate: -50% 0;
  rotate: 3deg;
  background: rgba(255, 170, 196, 0.78);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.soon-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b3d5c;
}

.soon-text {
  font-family: var(--display);
  font-weight: 800;
  font-size: 27px;
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #b0164a;
  text-wrap: balance;
}

/* the line: a cue card at rest, the speech bubble during a take */
.line {
  width: calc(var(--mw) + 24px);
  max-width: 100%;
  margin-top: 18px;
}

.cue {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 10px 14px;
  border: 1.5px dashed var(--cue-line);
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-soft);
  text-align: center;
}

.cue[hidden] { display: none; }

.take {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--room);
  font-family: var(--display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

.bubble {
  position: relative;
  padding: 14px 18px 12px;
  border-radius: 22px;
  background: var(--bubble);
  color: #2a1424;
  text-align: center;
  box-shadow: 0 16px 30px -16px rgba(26, 8, 20, 0.55), 0 0 0 1px rgba(42, 20, 36, 0.06);
  transform-origin: 50% -12px;
}

.bubble::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 22px;
  height: 22px;
  translate: -50% 0;
  rotate: 45deg;
  border-radius: 4px 0 0 0;
  background: var(--bubble);
}

.bubble[hidden] { display: none; }
.motion .bubble.is-open { animation: bubble-in 0.42s cubic-bezier(0.2, 1.5, 0.4, 1) both; }

@keyframes bubble-in {
  0% { opacity: 0; transform: scale(0.55); }
  100% { opacity: 1; transform: scale(1); }
}

.said {
  position: relative;
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.said:lang(ja) {
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0;
  line-break: strict;
  word-break: auto-phrase;
}

::highlight(unsaid) { color: transparent; }

.said-under {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #6b3d5c;
  opacity: 0;
}

.bubble.is-translated .said-under { opacity: 1; }
.motion .said-under { transition: opacity 0.45s ease; }

.said-en { quotes: "“" "”"; }
.said-en:not(:empty)::before { content: open-quote; }
.said-en:not(:empty)::after { content: close-quote; }

.said-lang {
  margin-right: 4px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b0164a;
}

/* ---------- the rehearsal: chips and Action! ---------- */

.rehearsal { margin-top: 4px; }

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hint {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-soft);
}

.chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px 10px 10px;
  border: 1.5px solid var(--chip-line);
  border-radius: 20px;
  background: var(--chip-bg);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.chip:hover { border-color: var(--accent); }
.motion .chip { transition: transform 0.15s ease, border-color 0.15s ease; }
.motion .chip:active { transform: scale(0.96); }

.chip-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffffff, var(--silver));
  box-shadow: 0 0 0 2px var(--velvet), 0 0 0 3.5px var(--bulb);
  overflow: hidden;
}

.chip-face { fill: var(--skin); }
.chip-face .ear,
.chip-icon .ear { fill: var(--skin-shade); }
.chip-head { fill: var(--skin); opacity: 0.55; }
.sw-skin { fill: var(--skin); }
.sw-hair { fill: var(--hair); }
.sw-top { fill: var(--top); stroke: #ffffff; stroke-width: 1.5; }

.chip-lang {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #2a1424;
}

.chip-text { display: flex; flex-direction: column; min-width: 0; }

.chip-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1.15;
}

.chip-value {
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dots {
  position: absolute;
  top: 9px;
  right: 11px;
  display: flex;
  gap: 3px;
}

.dots i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--chip-line);
}

.dots i.on { background: var(--accent); }

.action {
  position: relative;
  z-index: 31;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  padding: 14px 28px 15px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 14px 26px -12px var(--accent);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.motion .action { transition: transform 0.15s ease, box-shadow 0.2s ease; }
.motion .action:hover { transform: translateY(-1px); }
.motion .action:active { transform: translateY(1px) scale(0.98); }

.clap { width: 28px; height: 28px; fill: currentColor; flex: none; }
.clap-arm { transform-origin: 4px 13px; }
.motion .action.is-clap .clap-arm { animation: clap 0.34s ease-in 1; }

@keyframes clap {
  0% { transform: rotate(0); }
  45% { transform: rotate(-24deg); }
  100% { transform: rotate(0); }
}

/* ---------- the room dims for a take ---------- */

.dimmer {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 40%), var(--dim-in) 0, var(--dim-in) 22%, var(--dim) 58%);
  mix-blend-mode: multiply;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html.is-dim .dimmer { opacity: 1; visibility: visible; }

/* with the room lights down, the headline lights up */
html.is-dim .hl-lead { color: var(--blush); text-shadow: 0 0 24px rgba(255, 217, 138, 0.35); }
html.is-dim .hl-accent { color: var(--neon); text-shadow: 0 0 28px rgba(255, 61, 110, 0.45); }
.motion .hl-lead,
.motion .hl-accent { transition: color 0.45s ease, text-shadow 0.45s ease, opacity 0.22s ease, transform 0.32s cubic-bezier(0.2, 1.2, 0.4, 1); }
.motion .dimmer { transition: opacity 0.5s ease, visibility 0s linear 0.5s; }
.motion.is-dim .dimmer { transition: opacity 0.35s ease, visibility 0s; }

/* ---------- three steps, on the curtain ---------- */

.steps {
  position: relative;
  margin-top: 8px;
  padding: 58px 16px 54px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0, rgba(255, 255, 255, 0.035) 26px, rgba(0, 0, 0, 0.16) 52px),
    linear-gradient(180deg, #55284a, var(--velvet) 40%, #3e1c37);
  color: var(--blush);
}

.valance {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  background:
    linear-gradient(#2a1424, #2a1424) top / 100% 8px no-repeat,
    radial-gradient(circle at 50% 8px, #2a1424 0 15px, transparent 15.5px) 0 0 / 36px 24px repeat-x;
}

.steps-inner { max-width: 1240px; margin: 0 auto; }

.steps h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.step-list {
  display: grid;
  gap: 16px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding: 14px 14px 18px;
  border-radius: 22px;
  background: rgba(251, 239, 233, 0.06);
  border: 1px solid rgba(251, 239, 233, 0.14);
}

.step-art {
  display: grid;
  place-items: center;
  height: 112px;
  border-radius: 14px;
  background:
    radial-gradient(80% 90% at 50% 20%, #ffffff, rgba(255, 255, 255, 0) 70%),
    var(--blush);
  box-shadow: inset 0 0 0 1px rgba(42, 20, 36, 0.06);
}

.step-art svg { width: 100%; max-width: 230px; height: 96px; }

.step-no {
  position: absolute;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fffef8 0 14%, #fff3d2 30%, var(--bulb) 62%, #f0b24e 100%);
  box-shadow: 0 0 0 2px #d9d2c6, 0 0 0 3.5px rgba(26, 8, 20, 0.4), 0 0 16px 3px rgba(255, 217, 138, 0.6);
  color: #2a1424;
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
}

.step h3 {
  margin-top: 16px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.step p {
  margin-top: 4px;
  font-size: 15.5px;
  line-height: 1.45;
  color: #ead6da;
}

.mini .head { fill: var(--skin); }
.m-eye, .m-smile { fill: #2a1424; }
.m-cheek { fill: var(--cheek); opacity: 0.6; }
.pick-ring { fill: none; stroke: var(--lipstick); stroke-width: 2.5; stroke-dasharray: 5 5; stroke-linecap: round; }
.pick-star { fill: var(--bulb); stroke: #f0b24e; stroke-width: 1.2; }
.say rect, .say > path:not(.say-line) { stroke-linejoin: round; }
.say-1 rect, .say-1 > path:not(.say-line) { fill: #ffffff; }
.say-1 .say-line { stroke: #2a1424; }
.say-2 rect, .say-2 > path:not(.say-line) { fill: var(--lipstick); }
.say-2 .say-line { stroke: #ffffff; }
.say-3 rect, .say-3 > path:not(.say-line) { fill: var(--velvet); }
.say-3 .say-line { stroke: var(--blush); }
.say-line { fill: none; stroke-width: 4; stroke-linecap: round; }
.say-1 rect { stroke: rgba(42, 20, 36, 0.18); stroke-width: 1.5; }
.phone { fill: #2a1424; }
.phone-screen { fill: #d8d3dc; }
.phone-body { fill: var(--top); }
.ai-tag { fill: #ffffff; stroke: rgba(42, 20, 36, 0.25); stroke-width: 1; }
.ai-tag-text { fill: #2a1424; font-family: var(--display); font-weight: 800; font-size: 7.5px; text-anchor: middle; }
.play { fill: var(--lipstick); stroke: var(--lipstick); stroke-width: 3; stroke-linejoin: round; }

/* ---------- footer ---------- */

.foot {
  padding: 26px 16px 34px;
  text-align: center;
}

.foot-line {
  font-size: 14px;
  color: var(--ink-soft);
}

.foot-line a {
  color: var(--ink);
  font-weight: 600;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
  border-radius: 4px;
}

/* ---------- 404 ---------- */

.lost .hero { grid-template-areas: "copy" "stage"; row-gap: 28px; }
.lost h1 { font-size: clamp(40px, 10.5vw, 84px); line-height: 0.95; }
.lost .stage { padding-bottom: 8px; }
.lost-404 { fill: none; stroke: var(--lipstick); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.88; }
.chair { fill: var(--velvet); }
.chair-shine { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 5; stroke-linecap: round; }
.chair-star { fill: var(--bulb); stroke: #f0b24e; stroke-width: 1.5; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 14px 26px -12px var(--accent);
}

/* ---------- wider screens ---------- */

@media (min-width: 560px) {
  .stage { --mw: 340px; --pad: 30px; --b: 16px; }
}

@media (min-width: 720px) {
  .bar { padding: 22px 32px 8px; }
  .hero { padding: 10px 32px 64px; }
  .steps { padding: 70px 32px 64px; }
  .step-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .action { width: auto; display: inline-flex; padding-inline: 30px 36px; }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 1fr;
    grid-template-areas: "copy stage" "rehearsal stage";
    column-gap: clamp(48px, 6vw, 104px);
    align-items: start;
    min-height: min(820px, calc(100vh - 84px));
    padding-top: 28px;
  }
  .stage { --mw: 460px; --pad: 40px; --b: 22px; align-self: start; padding-top: 0; }
  .copy { padding-top: 34px; }
  .lede { font-size: 19px; margin-top: 22px; max-width: 30em; }
  .rehearsal { margin-top: 30px; max-width: 540px; }
  .said { font-size: 25px; }
  .said:lang(ja) { font-size: 20px; }
  .soon-text { font-size: 38px; }
  .soon-kicker { font-size: 12px; }
  .hello { font-size: 18px; }
  .tag-text { font-size: 11px; }
  .steps h2 { font-size: 40px; }
  .lost .hero { grid-template-rows: auto; grid-template-areas: "copy stage"; align-items: center; }
  .lost .copy { padding-top: 0; }
}
