/* ============================================================================
   直播间 v3 · Coco's Livestream (THE PHONE) — the objects
   ============================================================================
   Companion to prom/js/drills/stream2.js. This is the sole stylesheet for the
   current Livestream. The v2 desk objects are gone with the desk.

   WHAT THE PLAYER IS LOOKING AT
   · a portrait live-stream PHONE: her video edge to edge, the app's chrome
     floating over it — status bar, avatar + LIVE pill + watching count,
     comment ghosts up the bottom, hearts riding the right edge — built to
     read as the real thing at a squint and at a stare
   · a chat column beside it, the way a stream sits next to its chat on every
     desktop platform: colored handles, emotes, and the one PINK card that is
     a question with your name on it
   · the input row under the chat: type hanzi or pinyin, 发 sends

   TWO SKINS, ONE LAYOUT
   · .sk-ig     the western-app dress: gradient LIVE pill, blue verified,
                cool glass — what the blind judges score against the real app
   · .sk-world  狐圈, Coco's in-world platform: lacquer LIVE pill, gold
                verified, the fox mark in the status bar
   Everything structural is shared; the skin only recolors chrome.

   THE DISCIPLINE (unchanged from v2)
   · FOUR type sizes, all kit tokens: --dk-display (the pinned question),
     --dk-read (20px — every hanzi read to play: chat, bubble, fix card),
     --dk-label (16px latin), --dk-caption (pinyin/gloss only).
     The phone's own chrome (status bar, handle, counts, mirror ghosts) is
     APP DECOR at app sizes — none of it is Chinese a player must read to
     play, and the mirror column is aria-hidden duplicate texture.
   · gold = the one live thing; vermillion = wrong; jade = yes; Coco's pink
     (#ff4fa3, her cast color) = HER question, and only that.
   ========================================================================== */

/* .minigame is the game's FIXED full-screen panel (prom.css) — never re-position
   it: a position of our own knocks it back into the page flow and the town map
   shows above it (measured, first shot set). The head is absolute (top 18px,
   prom.css), so the wrap pads under it instead of flexing beside it. */
.stream2-drill.s3 {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0;
  padding-top: 64px;
}
.stream2-drill.s3 .mg-head .s3-ten { font-weight: 600; opacity: 0.85; }
.s3-goals { display: inline-flex; align-items: center; gap: 8px; }
.s3-goals.tick { animation: s3-goaltick 0.7s ease; }
@keyframes s3-goaltick {
  0% { transform: scale(1); }
  30% { transform: scale(1.12); filter: drop-shadow(0 0 8px rgba(255, 200, 74, 0.6)); }
  100% { transform: scale(1); }
}
.s3-goal-lab { font-size: var(--dk-caption); opacity: 0.8; }
.s3-goal-lab .han { font-size: var(--dk-label); }

/* (A left-flank pip meter lived here for one cycle — two judges read it as
   a second, cryptic language for the goal chip the head already carries.
   One stat, one meter: it's gone.) */

/* ------------------------------------------------------------- the two-up */
.s3-wrap {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(260px, 350px);
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  padding: 4px 10px 10px;
}

/* ================================================================= PHONE */
.s3-phone {
  position: relative;
  height: 100%;
  max-height: 780px;
  aspect-ratio: 9 / 18.6;
  align-self: center;
  container-type: inline-size;
  border-radius: 34px;
  /* the device: a hair of bezel, a deep drop into the room behind it */
  background: #05030a;
  padding: 7px;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.14),
    0 2px 6px rgba(0, 0, 0, 0.55),
    0 18px 48px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.45s ease;
}
/* lantern warmth pooling behind the device, so it sits IN the courtyard
   instead of floating on the dark */
.s3-phone::before {
  content: "";
  position: absolute;
  inset: -16% -36%;
  z-index: -1;
  background: radial-gradient(52% 44% at 50% 46%,
    rgba(255, 130, 90, 0.32), rgba(255, 79, 163, 0.16) 55%, transparent 76%);
  filter: blur(12px);
  pointer-events: none;
}
/* the stage behind the phone breathes — a barely-there drift so the judged
   "flat mud backdrop" reads as a place, not a matte */
.stream2-drill.s3 .mg-stagebg img { animation: s3-stagedrift 46s ease-in-out infinite alternate; }
@keyframes s3-stagedrift {
  from { transform: scale(1.02) translateX(-0.5%); }
  to   { transform: scale(1.06) translateX(0.8%); }
}
/* a vignette, not a uniform dim: the courtyard glows around the stage and
   falls off toward the frame (judged: "uniformly dimmed void") */
.stream2-drill.s3 .mg-scrim {
  background: radial-gradient(85% 78% at 50% 44%,
    rgba(18, 9, 30, 0.16), rgba(18, 9, 30, 0.44) 62%, rgba(14, 7, 24, 0.7)) !important;
}
.stream2-drill.s3 .mg-stagebg img { filter: brightness(1.07) saturate(1.06); }
/* the whole device pops for a heartbeat on a right answer */
.s3.s3-joy .s3-phone { animation: s3-joypop 0.9s cubic-bezier(0.3, 1.5, 0.4, 1); }
@keyframes s3-joypop {
  0% { transform: scale(1); }
  24% { transform: scale(1.012); }
  55% { transform: scale(0.998); }
  100% { transform: scale(1); }
}
/* her turn = her pink, breathing on the device edge */
.s3.s3-asking .s3-phone {
  box-shadow:
    0 0 0 1.5px rgba(255, 79, 163, 0.45),
    0 0 14px rgba(255, 79, 163, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.55),
    0 18px 48px rgba(0, 0, 0, 0.5);
}
.s3-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: #0a0714;
  /* the app text is the app's — never the game theme's */
  color: #fff;
  font-family: -apple-system, "SF Pro Text", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}
/* Inside the CAMERA, the dictionary's dotted underline whispers: the words
   still hover, but the reading affordance stops reading as annotation ON the
   video (judged tell). Full strength returns on hover. */
.s3-screen .w { text-decoration-color: rgba(255, 255, 255, 0.22); }
.s3-screen .w:hover { text-decoration-color: rgba(255, 255, 255, 0.65); }

/* the OS home indicator — the one bar every real screen recording carries */
.s3-screen::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  width: 86px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  z-index: 9;
  pointer-events: none;
}

/* ---- the video ---------------------------------------------------------- */
.s3-video { position: absolute; inset: 0; overflow: hidden; }
.s3-cam { position: absolute; inset: -4%; animation: s3-kenburns 26s ease-in-out infinite alternate; }
.s3-camj { position: absolute; inset: 0; animation: s3-handheld 7.3s ease-in-out infinite; }
@keyframes s3-kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.07) translate(-1.2%, 1%); }
}
@keyframes s3-handheld {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  27%      { transform: translate(0.35%, -0.3%) rotate(0.12deg); }
  55%      { transform: translate(-0.3%, 0.25%) rotate(-0.1deg); }
  80%      { transform: translate(0.2%, 0.35%) rotate(0.08deg); }
}
.s3-vbg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* an over-the-shoulder slice of the courtyard: soft, warm, DEFOCUSED —
     a phone camera holds focus on the face, not the lanterns (judged: the
     sharp wide landscape read as a poster) */
  filter: saturate(1.12) contrast(1.04) brightness(0.96) sepia(0.1) blur(3px);
  transform: scale(1.13);
}
/* the grade: warm key from her ring light, cool floor, phone-camera vignette */
.s3-vgrade {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 30%, rgba(255, 190, 120, 0.12), transparent 55%),
    linear-gradient(to top, rgba(8, 4, 18, 0.82), rgba(8, 4, 18, 0.3) 11%, transparent 40%),
    linear-gradient(to top, rgba(8, 4, 18, 0.45), transparent 34%),
    linear-gradient(to bottom, rgba(8, 4, 18, 0.5), transparent 26%),
    radial-gradient(140% 120% at 50% 50%, transparent 62%, rgba(5, 2, 12, 0.4));
}

/* ---- Coco, alive --------------------------------------------------------- */
/* SELFIE FRAMING (the judged flagship fix): the camera holds her head and
   shoulders — face ~half the frame width, eyes in the upper third. The zoom
   is a TRANSFORM with its origin at her face, so the full-body art stays
   bottom-anchored and the poses compose with it; p-back is her stepping back
   from the lens, which is when the wide shot is earned. */
.s3-coco {
  /* the 763x900 cutout, bottom-anchored in this 1:2 box, puts her face at
     ~56% of the box — the zoom pivots THERE, and --ty lifts the framed face
     into the upper third. p-back zeroes both for the step-back wide. */
  --zm: 2.0;
  --ty: -30%;
  position: absolute;
  left: 50%;
  bottom: -2%;
  height: 88%;
  aspect-ratio: 1 / 2;
  transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm));
  transform-origin: 50% 56%;
  transition: transform 1.3s cubic-bezier(0.36, 0, 0.24, 1);
  will-change: transform;
}
.s3-coco img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 6px 14px rgba(5, 2, 12, 0.55)) saturate(1.05) contrast(1.03);
  animation: s3-breathe 3.4s ease-in-out infinite;
  transform-origin: 50% 92%;
}
@keyframes s3-breathe {
  0%, 100% { transform: scaleY(1) translateY(0); }
  50%      { transform: scaleY(1.009) translateY(-0.3%); }
}
/* she walks on when the stream starts — arriving wide, then stepping in
   close, which doubles as the one guaranteed wide beat every run */
.s3-coco.p-enter { animation: s3-enter 1.6s cubic-bezier(0.3, 0.9, 0.3, 1); }
@keyframes s3-enter {
  0%   { transform: translateX(-120%) translateY(0) scale(1) rotate(-1.6deg); }
  34%  { transform: translateX(-78%) translateY(0) scale(1) rotate(1.2deg); }
  58%  { transform: translateX(-52%) translateY(-6%) scale(1.15) rotate(-0.8deg); }
  100% { transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm)) rotate(0); }
}
/* verdict body language — the cutout's stand-in for a face change */
.s3-coco.v-joy   { animation: s3-vjoy 1.4s cubic-bezier(0.3, 1.4, 0.4, 1); }
.s3-coco.v-shock { animation: s3-vshock 1.3s ease-out; }
.s3-coco.v-huh   { animation: s3-vhuh 1.4s ease-in-out; }
@keyframes s3-vjoy {
  0%   { transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm)); }
  18%  { transform: translateX(-50%) translateY(calc(var(--ty) - 1.6%)) scale(calc(var(--zm) * 1.05)); }
  36%  { transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm)); }
  52%  { transform: translateX(-50%) translateY(calc(var(--ty) - 1%)) scale(calc(var(--zm) * 1.03)); }
  70%  { transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm)); }
  100% { transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm)); }
}
@keyframes s3-vshock {
  0%   { transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm)); }
  12%  { transform: translateX(-52%) translateY(var(--ty)) scale(calc(var(--zm) * 0.99)) rotate(-2.2deg); }
  30%  { transform: translateX(-48.5%) translateY(var(--ty)) scale(var(--zm)) rotate(1.6deg); }
  48%  { transform: translateX(-51%) translateY(var(--ty)) scale(var(--zm)) rotate(-1.1deg); }
  70%  { transform: translateX(-49.6%) translateY(var(--ty)) scale(var(--zm)) rotate(0.5deg); }
  100% { transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm)) rotate(0); }
}
@keyframes s3-vhuh {
  0%   { transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm)) rotate(0); }
  30%  { transform: translateX(-50%) translateY(calc(var(--ty) + 0.4%)) scale(var(--zm)) rotate(2.4deg); }
  62%  { transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm)) rotate(1.9deg); }
  100% { transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm)) rotate(0); }
}
.s3-coco.p-sway  { transform: translateX(-50%) translateY(var(--ty)) scale(var(--zm)) rotate(1.1deg); }
.s3-coco.p-lean  { transform: translateX(-50%) translateY(calc(var(--ty) + 0.8%)) scale(calc(var(--zm) * 1.05)); }
.s3-coco.p-left  { transform: translateX(-53.5%) translateY(var(--ty)) scale(var(--zm)) rotate(-0.8deg); }
.s3-coco.p-right { transform: translateX(-46.5%) translateY(var(--ty)) scale(var(--zm)) rotate(0.8deg); }
.s3-coco.p-wait  { transform: translateX(-49%) translateY(var(--ty)) scale(var(--zm)) rotate(1.4deg); }
/* she steps back from the lens — the one beat that shows the fit */
.s3-coco.p-back  { transform: translateX(-50%) translateY(0) scale(1); }
.s3-coco.talking img { animation: s3-breathe 3.4s ease-in-out infinite, s3-talkbob 0.46s ease-in-out infinite; }
@keyframes s3-talkbob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -1.1%; }
}
/* filter stickers that pop near her — the cutout's stand-in for expressions */
.s3-fx { position: absolute; inset: 0; pointer-events: none; }
.s3-fxpop {
  position: absolute;
  top: 16%;
  left: var(--fx, 40%);
  width: 34px; height: 34px;
  animation: s3-fxpop 1.9s ease-out forwards;
}
@keyframes s3-fxpop {
  0%   { transform: scale(0.2) rotate(-14deg); opacity: 0; }
  16%  { transform: scale(1.15) rotate(6deg); opacity: 1; }
  30%  { transform: scale(1) rotate(0deg); }
  78%  { transform: scale(1) translateY(-10px); opacity: 1; }
  100% { transform: scale(0.92) translateY(-22px); opacity: 0; }
}

/* ---- her speech bubble ---------------------------------------------------- */
/* A live app's caption chip, not a comic bubble (judged): plain soft dark
   pill, white text, no border, no tail, no glass blur — the blur was reading
   her red hair through the mime dots as "corrupted video". */
.s3-bubble {
  position: absolute;
  left: 4%;
  bottom: 34%;
  max-width: 76%;
  min-width: 120px;
  width: max-content;
  z-index: 5;
  padding: 7px 13px;
  border-radius: 10px;
  background: rgba(8, 5, 13, 0.74);
  box-shadow: 0 2px 10px rgba(4, 2, 10, 0.35), inset 3px 0 0 rgba(255, 255, 255, 0.14);
  font-size: var(--dk-read);
  line-height: var(--dk-lh-read);
  text-align: left;
  color: #fff;
}
.s3-bubble.pop { animation: s3-bpop 0.28s ease-out; }
@keyframes s3-bpop { 0% { transform: translateY(6px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
.s3-bubble.ok  { box-shadow: 0 2px 10px rgba(4, 2, 10, 0.35), inset 3px 0 0 var(--dk-jade); }
.s3-bubble.bad { box-shadow: 0 2px 10px rgba(4, 2, 10, 0.35), inset 3px 0 0 var(--dk-verm); }
.s3-bubble .han { font-size: var(--dk-read); }
.s3-bubble { overflow-wrap: anywhere; }
/* act one of 显影: just the dots, in a chip barely bigger than they are */
.s3-bubble.mimeonly { min-width: 0; padding: 8px 12px; }
/* the mime dots + 显影 streaming, unchanged mechanics from v2 */
.s3-mime { display: inline-flex; gap: 4px; align-items: center; height: 1.1em; margin-right: 2px; }
.s3-mimeava { width: 17px; height: 17px; border-radius: 50%; object-fit: cover; margin-right: 3px; }
.s3-mime i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: s3-mime 1.1s ease-in-out infinite; }
.s3-mime i:nth-child(2) { animation-delay: 0.18s; }
.s3-mime i:nth-child(3) { animation-delay: 0.36s; }
@keyframes s3-mime { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
.s3-resolve i {
  opacity: 0;
  font-style: normal;
  animation: s3-charin 0.4s ease forwards;
  animation-delay: calc(var(--hold) + var(--i) * var(--step));
}
@keyframes s3-charin { to { opacity: 1; } }

/* ---- overlay comment ghosts (the app's own comment stack) ----------------- */
/* while a question is pinned, the phone's own rail steps back — the pinned
   card, the panel question and the input are the only hot pink (judged:
   three pink zones and two chats competing at answer time) */
.s3.s3-asking .s3-mirror { opacity: 0.32; }
.s3-mirror {
  position: absolute;
  left: 10px;
  right: 31%;
  bottom: 58px;
  transition: opacity 0.4s;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 26%);
  mask-image: linear-gradient(to bottom, transparent, #000 26%);
}
.s3-mline {
  display: flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 2.5px 8px 2.5px 3px;
  border-radius: 999px;
  background: rgba(6, 3, 10, 0.32);
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  animation: s3-mline-in 0.3s ease;
}
.s3-mline .s3-mava.mini { width: 17px; height: 17px; font-size: 9px; flex: none; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.s3-mline b { font-weight: 700; opacity: 0.85; }
.s3-mline .s3-emo { width: 15px; height: 15px; vertical-align: -3px; }
.s3-mline .han { font-size: 13.5px; }
/* opacity only: a translate-in caught mid-frame stacked two rows on one
   baseline in stills (judged as a glitch) */
@keyframes s3-mline-in { from { opacity: 0; } to { opacity: 1; } }

/* ---- hearts (and their opposite) ------------------------------------------ */
.s3-heartlayer { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
/* --rise is set by JS in PIXELS (a fraction of the video's real height):
   translate percentages are of the HEART's own 16px box, which is how the
   first build's hearts crawled 13px and died under the bottom chrome. */
.s3-heart {
  position: absolute;
  bottom: 44px;
  left: var(--hx, 82%);
  width: var(--hs, 16px);
  height: var(--hs, 16px);
  opacity: 0;
  animation: s3-rise var(--hd, 2400ms) ease-out forwards;
}
.s3-heart.big { filter: drop-shadow(0 0 6px rgba(255, 90, 140, 0.5)); }
.s3-heart.down { animation-name: s3-fall-rise; filter: saturate(1.15) drop-shadow(0 0 5px rgba(140, 30, 20, 0.45)); }
@keyframes s3-rise {
  0%   { transform: translate(0, 0) scale(0.4) rotate(0deg); opacity: 0; }
  10%  { transform: translate(calc(var(--hw) * 4px), calc(var(--rise, 300px) * -0.08)) scale(1.08); opacity: 1; }
  30%  { transform: translate(calc(var(--hw) * 16px), calc(var(--rise, 300px) * -0.3)) scale(1) rotate(calc(var(--hw) * 9deg)); }
  55%  { transform: translate(calc(var(--hw) * -13px), calc(var(--rise, 300px) * -0.55)) rotate(calc(var(--hw) * -8deg)); opacity: 0.95; }
  80%  { transform: translate(calc(var(--hw) * 11px), calc(var(--rise, 300px) * -0.8)) rotate(calc(var(--hw) * 6deg)); opacity: 0.6; }
  100% { transform: translate(calc(var(--hw) * -7px), calc(var(--rise, 300px) * -1)) scale(0.86); opacity: 0; }
}
@keyframes s3-fall-rise {
  0%   { transform: translate(0, 0) scale(0.5) rotate(0deg); opacity: 0; }
  12%  { transform: translate(0, calc(var(--rise, 300px) * -0.07)) scale(1.05); opacity: 1; }
  40%  { transform: translate(calc(var(--hw) * -18px), calc(var(--rise, 300px) * -0.3)) rotate(calc(var(--hw) * -14deg)); }
  70%  { transform: translate(calc(var(--hw) * 16px), calc(var(--rise, 300px) * -0.55)) rotate(calc(var(--hw) * 12deg)); opacity: 0.8; }
  100% { transform: translate(calc(var(--hw) * -9px), calc(var(--rise, 300px) * -0.75)) scale(0.9) rotate(0deg); opacity: 0; }
}
/* verdict weather on the glass */
.s3-flash { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; }
.s3-flash.bad { background: radial-gradient(120% 100% at 50% 60%, transparent 42%, rgba(224, 74, 58, 0.34)); }
.s3-flash.huh { background: radial-gradient(120% 100% at 50% 60%, transparent 46%, rgba(255, 200, 74, 0.26)); }
.s3-flash.good { background: radial-gradient(120% 100% at 50% 60%, transparent 44%, rgba(255, 90, 140, 0.28)); }
.s3-flash.on { animation: s3-flash 0.9s ease; }
@keyframes s3-flash { 0% { opacity: 0; } 22% { opacity: 1; } 100% { opacity: 0; } }

/* ---- the app chrome ------------------------------------------------------- */
.s3-statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.s3-island {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 15px;
  border-radius: 999px;
  background: #05030a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.s3-sig { display: inline-flex; width: 52px; opacity: 0.95; }
.s3-sig svg { width: 100%; }
.s3-appmark { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; opacity: 0.9; }
.s3-appmark img { width: 14px; height: 14px; }
.s3-appmark .han { font-size: 12px; }
.sk-ig .s3-appmark { display: none; }
/* the platform watermark lives where real apps stamp it: low corner, quiet */
.s3-watermark {
  position: absolute;
  left: 10px;
  bottom: 158px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.s3-watermark img { width: 13px; height: 13px; opacity: 0.7; }
.s3-watermark .han { font-size: 12px; }

.s3-top {
  position: absolute;
  top: 26px; left: 0; right: 0;
  z-index: 8;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  padding: 6px 38px 6px 12px;
}
.s3-ava {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(#f9ce34, #ee2a7b, #6228d7, #f9ce34);
}
.sk-world .s3-ava { background: conic-gradient(var(--dk-gold), #ff4fa3, var(--dk-verm), var(--dk-gold)); }
.s3-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 1.6px solid #0a0714; }
.s3-idblock { display: flex; flex-direction: column; flex: 0 1 auto; min-width: 54px; overflow: hidden; line-height: 1.18; }
.s3-handle {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13.5px; font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.s3-verified { display: inline-flex; width: 13px; height: 13px; color: #0095f6; }
.sk-world .s3-verified { color: var(--dk-gold); }
.s3-verified svg { width: 100%; height: 100%; }
.s3-sub { font-size: 10.5px; color: rgba(255, 255, 255, 0.78); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s3-follow {
  flex: none;
  font-size: 11px; font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.08);
}
.s3-follow .han { font-size: 11px; }
.s3-livepill {
  flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3.5px 8px;
  border-radius: 7px;
  font-size: 10.5px; font-weight: 900;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(100deg, #d300c5, #ff0069 55%, #ff7a00);
  box-shadow: 0 1px 6px rgba(255, 0, 105, 0.4);
}
.sk-world .s3-livepill { background: linear-gradient(100deg, var(--dk-verm), #ff4fa3); box-shadow: 0 1px 6px rgba(224, 74, 58, 0.45); }
/* the Chinese-app signature IS the avatar stack — the western eye glyph
   comes off the world pill (judged: its presence was the skin's tell) */
.sk-world .s3-eyes svg { display: none; }
.s3-livepill .han { font-size: 11px; font-weight: 900; }
.s3-livepill small { font-size: 9px; opacity: 0.9; }
.s3-livepill i { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.s3-livepill.on i { animation: s3-liveblink 1.1s ease-in-out infinite; }
@keyframes s3-liveblink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.s3-livepill.off { background: rgba(255, 255, 255, 0.16); box-shadow: none; }
.s3-livepill.off .han::after { content: ""; }
/* Douyin's signature top-right viewer stack — world skin only */
.s3-vstack { margin-left: auto; flex: none; display: inline-flex; }
.s3-vstack .s3-vava {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: hsl(var(--h, 300), 50%, 44%);
  border: 1.4px solid rgba(0, 0, 0, 0.55);
  margin-left: -7px;
}
.s3-vstack .s3-vava:first-child { margin-left: 0; }
.s3-vstack + .s3-eyes { margin-left: 4px; }
.s3-eyes {
  margin-left: auto;
  flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  font-size: 10.5px; font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.s3-eyes svg { width: 13px; height: 13px; opacity: 0.9; }
/* pin the kit counter's type down to app-pill scale — its own display
   sizing rendered the count as the boldest thing in the top bar (judged) */
.s3-eyes .dk-counter, .s3-eyes .dk-counter-n, .s3-eyes .dk-counter b {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.s3-eyes.bleeding { color: #ffb0a6; }
.s3-eyes.surge { animation: s3-surge 1s ease; }
@keyframes s3-surge {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.16); color: #ffd98a; }
  60%  { transform: scale(1.05); color: #ffd98a; }
  100% { transform: scale(1); }
}
/* pinned to the bezel edge, outside the flex fight — the row overflowing
   left the X clipped to a chevron in every wide-count frame */
.s3-x {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  width: 20px; height: 20px;
  color: #fff;
  opacity: 0.9;
}
.s3-x svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }

/* ---- the pinned question -------------------------------------------------- */
/* App-scale, the way the real app pins a comment: a compact translucent dark
   row with a small pin label — not a billboard (judged, twice). Her pink stays
   as the accent edge, the tag, and the your-turn chip. display:flex must never
   outvote [hidden]: that exact fight painted an empty "HP bar" in every state
   of the first judged set. */
.s3-pinq[hidden] { display: none; }
.s3-pinq {
  position: absolute;
  top: 74px; left: 10px; right: 34px;
  max-width: 86%;
  z-index: 9;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 10px 10px;
  border-radius: 11px;
  background: rgba(12, 6, 14, 0.78);
  border: 1px solid rgba(255, 79, 163, 0.5);
  border-left: 3px solid #ff4fa3;
  box-shadow: 0 3px 12px rgba(4, 2, 8, 0.45);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.s3-pinq.done, .s3-pinq.wrong { opacity: 0; transform: translateY(-8px); }
.s3-pinq.landing { animation: s3-pindrop 0.42s cubic-bezier(0.2, 1.3, 0.4, 1); }
@keyframes s3-pindrop { 0% { transform: translateY(-14px) scale(0.96); opacity: 0; } 100% { transform: none; opacity: 1; } }
.s3-pinq.done { border-color: rgba(62, 230, 196, 0.8); border-left-color: var(--dk-jade); }
.s3-pinq.wrong { border-color: rgba(224, 74, 58, 0.8); border-left-color: var(--dk-verm); animation: none; }
.s3-pintag {
  position: absolute;
  top: -8px; left: 8px;
  font-size: 8.5px; font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: #ff4fa3;
  border-radius: 5px;
  padding: 1px 6px;
  box-shadow: 0 2px 6px rgba(255, 79, 163, 0.45);
}
.s3-pintag .han { font-size: 10px; }
.s3-pinbody { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.s3-pinq .s3-mava { width: 20px; height: 20px; font-size: 10.5px; }
.s3-pinq .s3-who { font-size: 10.5px; }
.s3-pinq-txt { font-size: var(--dk-read); line-height: 1.3; font-weight: 600; color: #fff; }
/* the card's own ear: replay the line that answers THIS question */
.s3-pinplay {
  flex: none;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}
.s3-pinplay svg { width: 14px; height: 14px; }
.s3-pinplay .han { font-size: 12px; font-weight: 700; }
.s3-pinplay:active { transform: scale(0.92); }
/* Coco's own pin: the correction wearing jade */
.s3-pinq.fixpin { border-color: rgba(62, 230, 196, 0.75); border-left-color: var(--dk-jade); }
.s3-pintag.fix { background: var(--dk-jade); color: #06251d; }
.s3-pinq .s3-pinq-txt.good { color: var(--dk-jade); }
.s3-pinq .s3-mava.host { width: 22px; height: 22px; padding: 1px; }
/* the first-time callout, anchored to the 听 chip it names */
.s3-hintcall {
  position: absolute;
  bottom: -40px;
  right: 34px;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: #2a0a1c;
  background: linear-gradient(120deg, #ffe9a8, #ffd35e);
  border-radius: 9px;
  padding: 4px 10px;
  box-shadow: 0 3px 10px rgba(255, 200, 74, 0.4);
  animation: s3-callin 0.4s ease, s3-turnpulse 1.8s 0.5s ease-in-out infinite;
}
.s3-hintcall::after {
  content: "";
  position: absolute;
  top: -5px;
  right: 18px;
  width: 10px; height: 10px;
  background: #ffe9a8;
  transform: rotate(45deg);
}
.s3-hintcall small { font-size: 10px; font-weight: 600; opacity: 0.8; }
@keyframes s3-callin { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.s3-turn {
  position: absolute;
  right: 6px;
  bottom: -9px;
  flex: none;
  font-size: 9.5px; font-weight: 800;
  color: #2a0a1c;
  background: linear-gradient(120deg, #ffd3e8, #ff9ecb);
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(255, 79, 163, 0.45);
  animation: s3-turnpulse 1.6s ease-in-out infinite;
}
.s3-turn .han { font-size: 11px; }
@keyframes s3-turnpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

/* ---- the bottom chrome ---------------------------------------------------- */
.s3-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px 12px;
}
.s3-cpill {
  flex: 1;
  min-width: 0;
  border: 1.2px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* a mirror, not a second door: dim until it is echoing real typing */
  opacity: 0.6;
  transition: opacity 0.25s;
}
.s3-cpill:has(.live) { opacity: 1; }
.s3-cghost.live { color: #fff; font-weight: 600; }
.s3-cghost.live::after {
  content: "";
  display: inline-block;
  width: 1.5px;
  height: 13px;
  margin-left: 2px;
  vertical-align: -2px;
  background: #fff;
  animation: s3-caret 1s steps(1) infinite;
}
@keyframes s3-caret { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
.s3-vic {
  flex: none;
  display: inline-flex;
  width: 30px; height: 30px;
  align-items: center; justify-content: center;
  color: #fff;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}
.s3-vic svg { width: 24px; height: 24px; }
.s3-vic.dim { opacity: 0.85; }
.s3-vic:active { transform: scale(1.25); transition: transform 0.1s; }
.s3-vtools {
  position: absolute;
  right: 8px;
  bottom: 54px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.s3-vtools .tool {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.s3-vtools .tool svg { width: 19px; height: 19px; opacity: 1; }
/* while a question is up, the CARD's own 听 chip carries the pulse — the
   video tools stay native circles (findability moved to the pin, judged) */
.s3.s3-asking .s3-pinplay {
  border-color: var(--dk-gold);
  animation: s3-replaypulse 1.8s ease-in-out infinite;
}
@keyframes s3-replaypulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 74, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(255, 200, 74, 0); }
}
/* the gift banner: a sender pill crossing the lower third, app-style */
.s3-giftban {
  position: absolute;
  left: 0;
  bottom: 38%;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: linear-gradient(100deg, rgba(255, 79, 163, 0.85), rgba(120, 40, 200, 0.75));
  color: #fff;
  font-size: 12.5px;
  box-shadow: 0 3px 12px rgba(120, 40, 160, 0.4);
  animation: s3-giftban 3.4s cubic-bezier(0.25, 0.9, 0.4, 1) forwards;
  pointer-events: none;
}
.s3-giftban .han { font-size: 13px; }
.s3-giftban .s3-emo.ban { width: 22px; height: 22px; }
@keyframes s3-giftban {
  0%   { transform: translateX(-110%); opacity: 0; }
  12%  { transform: translateX(10px); opacity: 1; }
  78%  { transform: translateX(10px); opacity: 1; }
  100% { transform: translateX(14px) translateY(-8px); opacity: 0; }
}

/* world's fan-club chip: the bottom bars stop being pixel-identical twins */
.s3-fanchip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(255, 200, 74, 0.9), rgba(255, 150, 60, 0.9));
  color: #4a2404;
  font-weight: 800;
}
.s3-fanchip img { width: 13px; height: 13px; }
.s3-fanchip .han { font-size: 11px; }
.s3-vtools .mg-cc.on { background: var(--dk-gold); color: #241335; border-color: var(--dk-gold); }

/* ---- pre-air -------------------------------------------------------------- */
.s3-preair {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 3, 12, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.s3-preair-card { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; padding: 20px 22px; max-width: 84%; }
.s3-preair-hd { font-size: var(--dk-display); }
.s3-preair-sub { font-size: var(--dk-label); opacity: 0.9; }
.s3-preair-sub .han { font-size: var(--dk-read); }
.s3-onair {
  margin-top: 4px;
  font-size: var(--dk-label);
  font-weight: 800;
  padding: 10px 26px;
  border-radius: 999px;
  border: 0;
  color: #2a0a1c;
  background: linear-gradient(120deg, var(--dk-gold), #ffdf8a);
  box-shadow: 0 4px 16px rgba(255, 200, 74, 0.4);
  cursor: pointer;
}
.s3-onair .han { font-size: var(--dk-read); }

/* ================================================================ THE SIDE */
.s3-side {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: var(--ink-line, 2.5px solid #241335);
  border-radius: 16px;
  /* depth, not a flat slab: a soft top sheen and a floor shadow */
  background:
    radial-gradient(120% 40% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 60%),
    linear-gradient(180deg, rgba(30, 18, 48, 0.94), rgba(16, 9, 28, 0.96));
  overflow: hidden;
  position: relative;
}
.s3-shead {
  flex: none;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 12px;
  border-bottom: 1.5px solid var(--line, #443063);
  background: var(--panel2, rgba(28, 16, 44, 0.9));
  font-size: var(--dk-caption);
  color: var(--dim, #b9a8d6);
}
.s3-shead .han { font-size: var(--dk-label); color: var(--ink, #f3eaff); }
.s3-scount { margin-left: auto; font-style: normal; font-variant-numeric: tabular-nums; opacity: 0.8; }
.s3-chatlist {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* animated rows composite onto their own layers; contain:paint pins the
     clip to this box so nothing ever ghosts over the header mid-animation */
  contain: paint;
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  scrollbar-width: thin;
  /* a chat lives at its floor: sparse early traffic sits by the input, and
     the top rows dissolve instead of hitting a hard edge */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 30px);
}
.s3-chatlist::before { content: ""; flex: 1 0 auto; }
/* while it's your turn, the list reserves a landing strip above the input so
   the active question card can never sit half-under the composer (judged in
   three separate frames) */
.s3.s3-asking .s3-chatlist { padding-bottom: 42px; }
.s3-msg {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  animation: s3-msg-in 0.28s ease;
  overflow-anchor: none;
}
@keyframes s3-msg-in { from { transform: translateY(9px); opacity: 0; } to { transform: none; opacity: 1; } }
.s3-mava {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: hsl(var(--h, 300), 55%, 46%);
  overflow: hidden;
}
.s3-mava.host { background: none; padding: 1.5px; background: conic-gradient(#f9ce34, #ee2a7b, #6228d7, #f9ce34); }
.s3-mava.host img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.s3-mbody { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.s3-who { font-size: var(--dk-caption); font-weight: 700; color: hsl(var(--h, 300), 70%, 72%); }
:root[data-theme="light"] .s3-who { color: hsl(var(--h, 300), 65%, 36%); }
.s3-who.host { color: var(--dk-gold); display: inline-flex; align-items: center; gap: 5px; }
:root[data-theme="light"] .s3-who.host { color: var(--dk-gold-deep); }
.s3-hosttag {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--dk-gold);
  color: #241335;
}
.s3-hosttag .han { font-size: 11px; }
.s3-mtxt { font-size: var(--dk-read); line-height: 1.35; color: var(--ink, #f3eaff); overflow-wrap: anywhere; }
.s3-mtxt.sys { font-size: var(--dk-caption); opacity: 0.62; }
.s3-msg.sys { justify-content: center; }
.s3-memo { display: inline-flex; gap: 3px; }
.s3-memo .s3-emo { width: 22px; height: 22px; }
/* any emoji inline in a chat sentence (gift lines) stays text-sized — an
   unsized SVG rendered at its natural 128px (judged: "oversized graphic") */
.s3-mtxt .s3-emo { width: 18px; height: 18px; vertical-align: -4px; }
/* the player's own lines */
.s3-msg.mine .s3-mtxt { color: var(--dk-gold); }
:root[data-theme="light"] .s3-msg.mine .s3-mtxt { color: var(--dk-gold-deep); }
.s3-msg.mine.bad .s3-mtxt { color: var(--dk-verm); text-decoration: underline wavy rgba(224, 74, 58, 0.6) 1.5px; }
/* a question in the flow: HER pink, unmistakably a card */
.s3-msg.q {
  position: relative;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 79, 163, 0.85);
  background: rgba(255, 79, 163, 0.13);
  box-shadow: 0 2px 12px rgba(255, 79, 163, 0.22);
}
:root[data-theme="light"] .s3-msg.q { background: rgba(255, 79, 163, 0.1); }
/* once its copy is PINNED on the phone, the chat original stands down fully —
   five simultaneous attention grabs at pin time was judged a pile-up */
.s3-msg.q.pinned-away { opacity: 0.5; border-color: transparent; box-shadow: none; background: rgba(255, 79, 163, 0.06); }
/* while it is THE live question, the card breathes */
.s3-msg.q:not(.pinned-away):not(.asked-ok):not(.asked-bad) { animation: s3-qpulse 2s ease-in-out infinite; }
@keyframes s3-qpulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(255, 79, 163, 0.22); }
  50%      { box-shadow: 0 2px 18px rgba(255, 79, 163, 0.42); }
}
/* …and the instant it resolves it is SPENT: grey bones, a verdict tick,
   never a second pink card competing with the live one. Borderless, so the
   header mask can shear it without slicing a visible frame (judged). */
.s3-msg.q.asked-ok, .s3-msg.q.asked-bad {
  animation: none;
  opacity: 0.55;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}
.s3-msg.q.asked-ok .s3-qtag { background: var(--dk-jade); color: #06251d; }
.s3-msg.q.asked-bad .s3-qtag { background: var(--dk-verm); }
.s3-msg.q .s3-mtxt { font-weight: 700; }
.s3-qtag {
  position: absolute;
  top: -8px; right: 8px;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: #ff4fa3;
  border-radius: 6px;
  padding: 1px 6px;
}
.s3-qtag .han { font-size: 11px; }
/* the host's correction card */
.s3-msg.host.fix {
  padding: 9px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--dk-gold);
  background: rgba(255, 200, 74, 0.1);
}
.s3-fixrows { display: flex; flex-direction: column; gap: 5px; }
.s3-fixrow { display: flex; flex-direction: column; gap: 1px; }
.s3-fixrow small { font-size: var(--dk-caption); opacity: 0.75; }
.s3-fixrow small .han { font-size: var(--dk-caption); }
.s3-fixrow .han { font-size: var(--dk-read); }
.s3-fixrow .han.bad { color: var(--dk-verm); }
:root[data-theme="light"] .s3-fixrow .han.bad { color: var(--dk-verm-deep); }
.s3-fixrow .han.good { color: var(--dk-jade); }
:root[data-theme="light"] .s3-fixrow .han.good { color: var(--dk-jade-deep); }
.s3-fixrow .dim { opacity: 0.75; font-size: var(--dk-caption); }
.s3-jump {
  position: absolute;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: var(--dk-caption);
  font-weight: 700;
  border-radius: 999px;
  border: 1.5px solid var(--line, #443063);
  background: var(--panel2, rgba(34, 20, 52, 0.95));
  color: var(--ink, #f3eaff);
  padding: 5px 12px;
  cursor: pointer;
}
.s3-jump .han { font-size: var(--dk-label); }

/* ---- input row ------------------------------------------------------------ */
.s3-inputrow {
  flex: none;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 9px 10px;
  border-top: 1.5px solid var(--line, #443063);
  background: var(--panel2, rgba(28, 16, 44, 0.6));
}
.s3-input {
  flex: 1;
  min-width: 0;
  font-size: var(--dk-read);
  padding: 9px 13px;
  border-radius: 999px;
  border: 1.6px solid var(--line, #443063);
  background: var(--field-bg, rgba(0, 0, 0, 0.38));
  color: var(--field-fg, #f3eaff);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.s3-input::placeholder { color: var(--dim, #b9a8d6); font-size: var(--dk-label); }
.s3.s3-asking .s3-input {
  border-color: #ff4fa3;
  box-shadow: 0 0 0 3px rgba(255, 79, 163, 0.22), 0 0 14px rgba(255, 79, 163, 0.25);
}
.s3-mic {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.6px solid var(--line, #443063);
  background: var(--panel, rgba(20, 12, 34, 0.82));
  color: var(--ink, #f3eaff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.s3-mic.listening { border-color: var(--dk-jade); color: var(--dk-jade); animation: s3-miclisten 1.2s ease-in-out infinite; }
@keyframes s3-miclisten { 0%, 100% { box-shadow: 0 0 0 0 rgba(62, 230, 196, 0.4); } 50% { box-shadow: 0 0 0 7px rgba(62, 230, 196, 0); } }
.s3-mic.unsupported { opacity: 0.45; }
.s3-chop {
  flex: none;
  min-width: 52px;
  height: 38px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 1px;
  border-radius: 12px;
  border: 2px solid var(--dk-verm);
  background: transparent;
  color: var(--dk-verm);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
:root[data-theme="light"] .s3-chop { border-color: var(--dk-verm-deep); color: var(--dk-verm-deep); }
.s3-chop .han { font-size: var(--dk-label); }
.s3-chop small { font-size: 9.5px; letter-spacing: 0.05em; opacity: 0.85; }
.s3-chop.ready { background: var(--dk-verm); color: #fff; box-shadow: 0 2px 10px rgba(224, 74, 58, 0.4); }
.s3-chop.ready:active { transform: scale(0.94); }
.s3-chop.busy { pointer-events: none; }
.s3-chop.busy .han { visibility: hidden; }
.s3-chop.busy small { visibility: hidden; }
.s3-chop.busy::after {
  content: "";
  position: absolute;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-top-color: transparent;
  animation: s3-spin 0.7s linear infinite;
}
.s3-chop { position: relative; }
@keyframes s3-spin { to { transform: rotate(360deg); } }
.s3-say {
  flex: none;
  min-height: 0;
  padding: 7px 14px 9px;
  border-top: 1px solid var(--line, #443063);
  font-size: var(--dk-label);
  line-height: 1.5;
}
.s3-say:empty { padding: 0; border-top: 0; }
.s3-say .off { color: var(--dim, #b9a8d6); }
.s3-say .idle { color: var(--dim, #b9a8d6); opacity: 0.85; }
.s3-say .idle .han { font-size: var(--dk-label); color: var(--dim, #b9a8d6); }
.s3-say .off .han { font-size: var(--dk-read); color: var(--ink, #f3eaff); }
.s3-say .live { color: var(--dk-jade); }
.s3-say .heard { color: var(--ink, #f3eaff); font-size: var(--dk-read); }
.s3-say .heard.miss { color: var(--dk-verm); }

/* ---- the curtain ----------------------------------------------------------- */
/* one veil under the whole ending, so toast + report + 下播 layer cleanly */
.s3-endveil {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(14, 7, 26, 0.66);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: s3-veil 0.5s ease;
}
@keyframes s3-veil { from { opacity: 0; } to { opacity: 1; } }
/* the whole ending is ONE flex column over the veil */
.s3-endcol {
  position: absolute;
  inset: 0;
  z-index: 21;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 4vh 16px;
  pointer-events: none;
}
.s3-endcol > * { pointer-events: auto; }
.s3-endcol .dk-goal-verdict { position: static; margin: 0; left: auto; transform: none; max-width: min(480px, 88vw); }
.s3-endcol .s3-revealwrap { position: static; inset: auto; flex: none; display: block; }
.s3-revealwrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 21; }
.mg-reveal:empty { display: none; }
.s3-spark { display: flex; flex-direction: column; gap: 3px; }
.s3-spark svg { width: 100%; height: 44px; }
.s3-spark small { font-size: var(--dk-caption); opacity: 0.85; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.s3-spark small .han { font-size: var(--dk-caption); }
.s3-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.s3-dot.hi { background: var(--dk-jade); }
.s3-dot.lo { background: var(--dk-verm); }
.s3-repsum {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.s3-repsum .han { font-size: var(--dk-read); }
.s3-repsum i { font-style: normal; opacity: 0.5; }
.s3-repsum small { margin-left: auto; font-size: 9.5px; letter-spacing: 0.05em; opacity: 0.65; }
.s3-report {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: min(480px, 88vw);
  padding: 16px 18px;
  border-radius: 16px;
  border: 2px solid var(--dk-gold);
  background: var(--panel, rgba(20, 12, 34, 0.94));
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5);
}
.s3-rephd { font-size: var(--dk-label); letter-spacing: 0.04em; color: var(--dim, #b9a8d6); }
.s3-rephd .han { font-size: var(--dk-read); color: var(--dk-gold); }
:root[data-theme="light"] .s3-rephd .han { color: var(--dk-gold-deep); }
.s3-rep-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 9px; align-items: baseline; }
.s3-rep-row > b .han, .s3-rep-row > b { font-size: var(--dk-read); }
.s3-rep-row > b small { display: block; font-size: 10.5px; opacity: 0.7; letter-spacing: 0.04em; }
.s3-rep-mid { display: flex; flex-direction: column; gap: 2px; }
.s3-rep-mid .han { font-size: var(--dk-read); }
.s3-rep-en { font-size: var(--dk-caption); opacity: 0.7; }
.s3-rep-row i { font-style: normal; font-variant-numeric: tabular-nums; opacity: 0.85; }
.s3-endbtns { display: flex; align-items: center; gap: 12px; }
.s3-againbtn {
  font-size: var(--dk-label);
  font-weight: 700;
  padding: 11px 24px;
  border-radius: 999px;
  border: 2px solid var(--dk-gold);
  background: rgba(255, 200, 74, 0.08);
  color: var(--dk-gold);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s, transform 0.15s;
}
.s3-againbtn.ready { opacity: 1; }
.s3-againbtn.ready:active { transform: scale(0.96); }
.s3-againbtn .han { font-size: var(--dk-read); }
/* the one action on the curtain looks like the one action: filled, warm */
.s3-wrapbtn {
  position: static;
  filter: saturate(1.15);
  box-shadow: 0 4px 22px rgba(255, 200, 74, 0.5);
  font-size: var(--dk-label);
  font-weight: 800;
  padding: 12px 34px;
  border-radius: 999px;
  border: 0;
  color: #2a0a1c;
  background: linear-gradient(120deg, var(--dk-gold), #ffdf8a);
  box-shadow: 0 4px 18px rgba(255, 200, 74, 0.35);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s, transform 0.15s;
}
.s3-wrapbtn.ready { opacity: 1; }
.s3-wrapbtn.ready:active { transform: scale(0.96); }
.s3-wrapbtn .han { font-size: var(--dk-read); }

/* ---- the light port -------------------------------------------------------
   The phone is a video and stays a video; the room around it follows the
   game's cream-paper light theme (cycle-8 port standard). */
:root[data-theme="light"] .s3-side { background: #f6efdd; border-color: #241335; }
:root[data-theme="light"] .s3-shead { background: #efe6cf; border-color: #cdbfa0; color: #6b5e6f; }
:root[data-theme="light"] .s3-shead .han { color: #241335; }
:root[data-theme="light"] .s3-mtxt { color: #241335; }
:root[data-theme="light"] .s3-inputrow { background: #efe6cf; border-color: #cdbfa0; }
:root[data-theme="light"] .s3-input { background: #fdfaf1; border-color: #cdbfa0; color: #241335; }
:root[data-theme="light"] .s3-input::placeholder { color: #6b5e6f; }
:root[data-theme="light"] .s3-mic { background: #fdfaf1; border-color: #cdbfa0; color: #241335; }
:root[data-theme="light"] .s3-jump { background: #fdfaf1; border-color: #241335; color: #241335; }
:root[data-theme="light"] .s3-say .off { color: #6b5e6f; }
:root[data-theme="light"] .s3-say .off .han { color: #241335; }
:root[data-theme="light"] .s3-report { background: #f6efdd; border-color: var(--dk-gold-deep); color: #241335; }
:root[data-theme="light"] .s3-msg.q { background: rgba(255, 79, 163, 0.12); }
:root[data-theme="light"] .s3-msg.host.fix { background: rgba(255, 200, 74, 0.18); }
/* the phone's own controls NEVER theme — the light port turned the replay
   pill cream inside a dark video */
:root[data-theme="light"] .s3-vtools .tool {
  background: rgba(0, 0, 0, 0.34);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.85);
}
:root[data-theme="light"] .s3-vtools .mg-cc.on { background: var(--dk-gold); color: #241335; }

/* the kit's streak burst pops over the PHONE, where the celebration is */
.stream2-drill.s3 .mg-burst { left: 36%; top: 30%; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 760px) {
  .s3-wrap {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.6fr) minmax(0, 1fr);
    justify-items: center;
    gap: 8px;
  }
  .s3-phone { height: 100%; max-height: none; }
  .s3-side { width: 100%; }
  .s3-vtools { bottom: 50px; }
}
/* A real phone gets the real thing: the stream IS the screen, the chat is a
   bottom sheet over the video — the shape every live app actually ships.
   The bezel-in-a-frame look is a desktop stage metaphor; at 189px wide it
   was an unreadable miniature (judged). */
@media (max-width: 540px) {
  .stream2-drill.s3 { padding-top: 0; }
  .s3-wrap { display: block; padding: 0; }
  .s3-phone {
    position: absolute;
    inset: 92px 0 0 0;
    /* the box is a flex column: align-self:center on an abs child swaps
       inset-stretch for shrink-to-content (height 0, measured) */
    align-self: stretch;
    justify-self: stretch;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    /* the @container chrome tweaks are for the small desktop frame; here the
       container-type's size containment zeroes an inset-stretched height */
    container-type: normal;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    background: none;
  }
  .s3-phone::before { display: none; }
  .s3-screen { border-radius: 18px 18px 0 0; }
  .s3-statusbar { display: none; }         /* the player's own phone has one */
  .s3-island { display: none; }
  .s3-top { top: 8px; }
  .s3-pinq { top: 56px; }
  .s3-side {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    top: auto;
    height: 44%;
    z-index: 9;
    border: 0;
    border-radius: 0;
    background: linear-gradient(to bottom, transparent, rgba(10, 5, 18, 0.86) 19%, rgba(10, 5, 18, 0.94));
  }
  .s3-shead { display: none; }
  .s3-mirror { display: none; }             /* the sheet IS the comment stack */
  .s3-bottom { display: none; }             /* one input: the sheet's own */
  .s3-vtools { bottom: 45%; }
  .s3-coco { height: 82%; bottom: 9%; }
  .s3-bubble { bottom: 51%; }
  .s3-wrapbtn { right: 50%; transform: translateX(50%); }
}
@media (max-height: 560px) {
  .s3-phone { border-radius: 22px; padding: 5px; }
  .s3-screen { border-radius: 18px; }
}

/* The kit's gold ring names ONE live control; at 4px + offset 10 it read as
   a debug outline against the app chrome (judged twice). Same semantics,
   this board's dress: thinner, tighter, calmer. */
.stream2-drill.s3 .dk-live {
  outline-width: 2px;
  outline-offset: 3px;
  filter: drop-shadow(0 0 8px rgba(255, 200, 74, 0.45));
}
@keyframes s3-dklive-soft { 0%, 100% { outline-offset: 3px; } 50% { outline-offset: 5px; } }
.stream2-drill.s3 .dk-live { animation-name: s3-dklive-soft; }

/* ---------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .s3-cam, .s3-camj, .s3-coco img, .s3-coco.talking img,
  .s3-livepill.on i, .s3-turn, .s3-mime i,
  .s3-coco.v-joy, .s3-coco.v-shock, .s3-coco.v-huh { animation: none; }
  .s3-coco, .s3-msg, .s3-mline, .s3-pinq.landing, .s3-bubble.pop, .s3-endveil { animation: none; transition: none; }
  .s3-heart { animation-duration: 1200ms; }
  .s3-resolve i { animation-duration: 0.01s; }
}

/* At the desk scale the row earns its keep bare: the sub-line and the third
   fan avatar go before the COUNT ever clips (judged twice on world). */
@container (max-width: 400px) {
  .s3-sub { display: none; }
  .s3-vstack .s3-vava:nth-child(3) { display: none; }
  .s3-idblock { min-width: 44px; }
}

/* ------------------------------------------------- phone-width chrome fit */
/* Judged at 390px viewport: LIVE clipped to "LIV", the count and X pushed
   clean off the row. The chrome compresses instead: the follow chip and the
   handle's second line give way first — the count and the X are signature
   and never leave the screen. */
@container (max-width: 352px) {
  .s3-top { gap: 5px; padding: 5px 12px 5px 9px; }
  .s3-follow { display: none; }
  .s3-sub { display: none; }
  .s3-ava { width: 28px; height: 28px; }
  .s3-handle { font-size: 12px; }
  .s3-livepill { padding: 3px 6px; font-size: 9.5px; }
  .s3-livepill small { display: none; }
  .s3-livepill .han { font-size: 10px; }
  .s3-eyes { padding: 2.5px 7px; font-size: 10px; }
  .s3-eyes .dk-counter { font-size: 10px; }
  .s3-vstack .s3-vava:nth-child(3) { display: none; }
  .s3-statusbar { font-size: 10.5px; padding: 6px 13px 2px; }
  .s3-island { width: 46px; height: 12px; top: 6px; }
  .s3-cpill { font-size: 12px; padding: 7px 12px; }
  .s3-pinq { top: 64px; }
}

/* when Coco asks, the stream gives the question room to be read. */
.s3-pinq { background: #28394b; border-color: #9bb7c8; border-left-color: #9bb7c8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); padding-top: 14px; }
.s3-pintag { background: #28394b; color: #f2eedb; box-shadow: none; font-size: 12px; }
.s3-pintag .han { font-size: 14px; }
.s3-pinplay { min-width: 44px; min-height: 44px; justify-content: center; border-radius: 8px; }
.s3-pinplay .han { font-size: 16px; }
.s3.s3-asking .s3-msg:not(.q), .s3.s3-asking .s3-mirror { opacity: 0.28; }
.s3.s3-asking .s3-msg.q.pinned-away { opacity: 0.3; }
.s3-msg.q:not(.pinned-away):not(.asked-ok):not(.asked-bad) { animation: none; }
.s3-pinq-txt { line-height: 1.5; }
@media (max-width: 700px) {
  .s3-pinq { right: 10px; max-width: none; }
  .s3.s3-asking .s3-side { background: #1c2937; }
}
@media (max-width: 700px) {
  /* the long English title was making a third header line over Coco's video. */
  .stream2-drill.s3 .mg-head .s3-ten { display: none; }
}

/* Packet 07: content-sized header; the phone starts after it, including zoom. */
.minigame.stream2-drill.s3 { padding-top: 8px; }
.minigame.stream2-drill.s3 > .mg-head {
  position: relative; inset: auto; transform: none; width: 100%; max-width: none;
  flex: 0 0 auto; align-self: stretch; flex-wrap: wrap; min-width: 0;
}
.stream2-drill.s3 .mg-head > b { flex: 1 1 100%; padding: 0 96px 0 40px; min-height: 36px; }
.stream2-drill.s3 .s3-goals { display: flex; flex-wrap: wrap; min-width: 0; gap: 8px; }
.stream2-drill.s3 .s3-goal-lab { flex: none; white-space: nowrap; }
.stream2-drill.s3 .dk-goal { flex-wrap: wrap; white-space: normal; min-width: 0; }
.stream2-drill.s3 .s3-wrap { position: relative; }
.stream2-drill.s3 .s3-pinq { background: var(--prom-paper); color: var(--prom-ink); }
.stream2-drill.s3 .s3-pinq-txt { color: var(--prom-ink); overflow-wrap: anywhere; }
.stream2-drill.s3 .s3-pinplay { color: var(--prom-ink); }
.stream2-drill.s3.s3-asking .s3-msg:not(.q),
.stream2-drill.s3.s3-asking .s3-mirror { visibility: hidden; }
.stream2-drill.s3 :is(.s3-chop, .s3-mic) { min-width: 44px; min-height: 44px; }
@media (max-width: 540px) {
  .stream2-drill.s3 .s3-wrap { flex: 1 0 620px; min-height: 620px; }
  .stream2-drill.s3 .s3-phone { inset: 0; }
  .stream2-drill.s3 .s3-pinq { flex-wrap: wrap; }
  .stream2-drill.s3 .s3-pinbody { flex: 1 1 160px; }
  .stream2-drill.s3 .s3-side { height: auto; max-height: 48%; min-height: 160px; }
  .stream2-drill.s3 .s3-chatlist { min-height: 0; }
  .stream2-drill.s3 .s3-inputrow { flex-wrap: wrap; }
  .stream2-drill.s3 .s3-input { flex: 1 1 140px; min-width: 0; }
}
/* Shared chrome reserves the entire header; reserve just its title row here. */
body .minigame.stream2-drill.s3 > .mg-head { padding-inline: 12px !important; }
.stream2-drill.s3 .s3-wrap { width: 100%; }
.stream2-drill.s3 .s3-goals { flex-basis: 100%; }
/* A zoomed question grows the phone; chat and input follow without covering it. */
@media (max-width: 540px) {
  .stream2-drill.s3 .s3-wrap { flex: 1 0 auto; min-height: 0; display: flex; flex-direction: column; }
  .stream2-drill.s3 .s3-phone { position: relative; inset: auto; width: 100%; height: auto; flex: none; }
  .stream2-drill.s3 .s3-screen { height: auto; min-height: 350px; padding-top: 64px; padding-bottom: 12px; }
  .stream2-drill.s3 .s3-pinq { position: relative; inset: auto; margin: 12px 10px; max-width: none; }
  .stream2-drill.s3 .s3-side { position: relative; inset: auto; width: 100%; height: auto; max-height: none; min-height: 0; flex: none; }
  .stream2-drill.s3 .s3-chatlist { max-height: 140px; }
  .stream2-drill.s3.s3-asking .s3-chatlist { display: none; }
  .stream2-drill.s3 .s3-bubble { bottom: auto; top: 8px; max-height: none; }
}
@media (max-width: 540px) {
  .stream2-drill.s3 .s3-screen > .s3-bubble { position: relative; inset: auto; margin: 12px 10px; width: auto; max-width: none; transform: none; }
}

.stream2-drill .s3-restart { position: relative; z-index: 6; flex: none; align-self: center; margin: 8px; padding: 8px 12px; min-height: 44px; max-width: calc(100% - 16px); border: 1px solid var(--prom-ink-muted); border-radius: 8px; background: var(--prom-paper); color: var(--prom-ink); font: inherit; font-size: 1rem; }
.stream2-drill.s3-over .s3-restart { display: none; }
.stream2-drill.s3, .stream2-drill.s3 .s3-wrap { justify-content: flex-start; }
.stream2-drill.s3 .s3-pinq-txt.good { color: var(--prom-success); }

.stream2-drill.s3 :is(.s3-input,.s3-mic,.s3-chop) { min-height: 44px; height: auto; }
.stream2-drill.s3 .s3-chop { padding: 6px 10px; color: var(--prom-ink); background: var(--prom-paper); }
.stream2-drill.s3 .s3-chop.ready { background: #b94737; color: #fffdf5; }
.stream2-drill.s3 .s3-chop small, .stream2-drill.s3 .s3-pinplay .han { font-size: 1rem; }
.stream2-drill.s3 .s3-chop .han { font-size: 1.25rem; }

/* Results form a scrolling document; live chrome must not cover enlarged copy. */
.stream2-drill.s3-over > .mg-head,
.stream2-drill.s3-over > .s3-wrap { display: none; }
.stream2-drill.s3-over .s3-endcol { position: relative; inset: auto; flex: none; width: 100%; justify-content: flex-start; padding-top: 64px; }
.stream2-drill.s3-over .s3-endveil { position: fixed; }
.stream2-drill.s3-over .s3-report { background: var(--prom-paper); color: var(--prom-ink); }
.stream2-drill.s3-over .s3-rep-en { opacity: 1; }
@media (max-width: 540px) {
  .stream2-drill.s3-over .s3-rep-row { grid-template-columns: 1fr auto; }
  .stream2-drill.s3-over .s3-rep-mid { grid-column: 1 / -1; grid-row: 2; }
}
.stream2-drill.s3-over .s3-report :is(.han,.s3-rephd,.s3-repsum,.s3-rep-en) { color: var(--prom-ink); }
