    :root {
      color-scheme: dark;
      --ink: #211822;
      --ink-soft: #3a2639;
      --rose: #ff5ba7;
      --rose-soft: #ff9cc8;
      --violet: #8d5cff;
      --violet-deep: #4d2a7f;
      --gold: #d7a94c;
      --gold-soft: #f0d489;
      --jade: #70d6b2;
      --paper: #f7e1b5;
      --paper-deep: #b9823c;
      --red-piece: #d53244;
      --black-piece: #25202a;
      --line: rgba(76, 45, 38, 0.72);
      --host-glow: rgba(255, 91, 167, 0.72);
      --host-accent: #ff7eba;
      --host-mouth: #9b244d;
      --host-eye: #3d204a;
      --board-border: #6a3e2a;
      --board-line: rgba(86, 48, 25, 0.68);
      --board-river: rgba(90, 52, 26, 0.44);
      --board-bg:
        repeating-linear-gradient(90deg, rgba(112, 70, 32, 0.08) 0 2px, transparent 2px 42px),
        repeating-linear-gradient(0deg, rgba(255, 247, 214, 0.08) 0 1px, transparent 1px 34px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.08)),
        linear-gradient(180deg, #f8dfa5 0%, #d6a75b 48%, #f1cf86 100%);
      --board-inset: rgba(255, 232, 169, 0.22);
      --board-glow: rgba(90, 52, 26, 0.36);
      --piece-ring: rgba(112, 64, 28, 0.94);
      --piece-inner-ring: rgba(85, 47, 24, 0.58);
      --piece-inner-glow: rgba(255, 228, 161, 0.30);
      --piece-red-text: #d53244;
      --piece-black-text: #151118;
      --piece-red-bg:
        linear-gradient(180deg, rgba(255, 249, 220, 0.52), transparent 30%),
        linear-gradient(90deg, rgba(114, 68, 32, 0.10), transparent 24%, rgba(255, 245, 201, 0.10) 56%, transparent),
        linear-gradient(180deg, #f1d18a 0%, #d5a55f 58%, #ad7132 100%);
      --piece-black-bg:
        linear-gradient(180deg, rgba(255, 246, 213, 0.44), transparent 30%),
        linear-gradient(90deg, rgba(92, 52, 25, 0.12), transparent 26%, rgba(255, 241, 197, 0.08) 58%, transparent),
        linear-gradient(180deg, #e2c27a 0%, #bd914e 58%, #7e572b 100%);
      --pressure-wall-opacity: 0.46;
      --pressure-word-primary: rgba(124, 12, 76, 0.22);
      --pressure-word-secondary: rgba(185, 25, 96, 0.18);
      --pressure-word-stroke: rgba(255, 212, 236, 0.12);
      --pressure-word-glow: rgba(255, 91, 167, 0.14);
    }

    body[data-board-skin="queen"] {
      --board-border: #d6ac62;
      --board-line: rgba(232, 190, 103, 0.58);
      --board-river: rgba(242, 211, 147, 0.38);
      --board-bg:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.05)),
        repeating-linear-gradient(90deg, rgba(232, 190, 103, 0.06) 0 2px, transparent 2px 38px),
        repeating-linear-gradient(0deg, rgba(255, 110, 182, 0.05) 0 1px, transparent 1px 34px),
        linear-gradient(180deg, #26171f 0%, #120d12 48%, #28131c 100%);
      --board-inset: rgba(232, 190, 103, 0.28);
      --board-glow: rgba(255, 91, 167, 0.28);
      --piece-ring: rgba(232, 190, 103, 0.92);
      --piece-inner-ring: rgba(232, 190, 103, 0.54);
      --piece-inner-glow: rgba(255, 110, 182, 0.18);
      --piece-red-text: #ff557f;
      --piece-black-text: #f4d78b;
      --piece-red-bg:
        linear-gradient(180deg, rgba(255, 229, 238, 0.24), transparent 32%),
        linear-gradient(145deg, #4b1225 0%, #7d1837 55%, #270b17 100%);
      --piece-black-bg:
        linear-gradient(180deg, rgba(255, 234, 178, 0.18), transparent 32%),
        linear-gradient(145deg, #191319 0%, #2f2528 54%, #09070a 100%);
      --pressure-wall-opacity: 0.50;
      --pressure-word-primary: rgba(176, 65, 212, 0.17);
      --pressure-word-secondary: rgba(255, 91, 167, 0.14);
      --pressure-word-stroke: rgba(255, 214, 236, 0.12);
      --pressure-word-glow: rgba(255, 91, 167, 0.16);
    }

    body[data-board-skin="judgment"] {
      --board-border: #8f233a;
      --board-line: rgba(118, 24, 42, 0.58);
      --board-river: rgba(103, 18, 35, 0.38);
      --board-bg:
        radial-gradient(circle at 50% 50%, rgba(255, 207, 194, 0.15), transparent 17rem),
        repeating-linear-gradient(90deg, rgba(118, 24, 42, 0.08) 0 2px, transparent 2px 40px),
        linear-gradient(180deg, #e7b783 0%, #c97966 54%, #5a172b 100%);
      --board-inset: rgba(255, 112, 136, 0.30);
      --board-glow: rgba(112, 0, 34, 0.48);
      --piece-ring: rgba(114, 18, 38, 0.92);
      --piece-inner-ring: rgba(114, 18, 38, 0.52);
      --piece-inner-glow: rgba(255, 226, 188, 0.30);
      --piece-red-text: #bd1731;
      --piece-black-text: #2b1018;
      --piece-red-bg:
        linear-gradient(180deg, rgba(255, 236, 210, 0.40), transparent 30%),
        linear-gradient(145deg, #f1c27d 0%, #c96c58 56%, #7b2539 100%);
      --piece-black-bg:
        linear-gradient(180deg, rgba(255, 228, 189, 0.36), transparent 30%),
        linear-gradient(145deg, #b98454 0%, #643141 62%, #1c1018 100%);
      --pressure-wall-opacity: 0.42;
      --pressure-word-primary: rgba(92, 0, 42, 0.24);
      --pressure-word-secondary: rgba(173, 7, 74, 0.18);
      --pressure-word-stroke: rgba(255, 204, 220, 0.13);
      --pressure-word-glow: rgba(105, 0, 54, 0.16);
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      min-height: 100%;
      margin: 0;
    }

    body {
      min-height: 100vh;
      font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
      background:
        radial-gradient(circle at 12% 18%, rgba(255, 67, 154, 0.34), transparent 34rem),
        radial-gradient(circle at 72% 6%, rgba(141, 92, 255, 0.28), transparent 30rem),
        radial-gradient(circle at 78% 88%, rgba(240, 212, 137, 0.10), transparent 24rem),
        linear-gradient(135deg, #1b101d 0%, #31172e 38%, #140f17 100%);
      color: #fff7fb;
      overflow-x: hidden;
      letter-spacing: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    body.cg-preloading {
      overflow: hidden;
    }

    .cg-loading-screen {
      position: fixed;
      inset: 0;
      z-index: 3000;
      display: grid;
      place-items: center;
      padding: 24px;
      background:
        radial-gradient(circle at 50% 38%, rgba(141, 92, 255, 0.24), transparent 22rem),
        radial-gradient(circle at 50% 62%, rgba(255, 91, 167, 0.18), transparent 26rem),
        linear-gradient(135deg, #160d19 0%, #2a1428 52%, #100b12 100%);
      opacity: 1;
      visibility: visible;
      transition: opacity 180ms ease, visibility 180ms ease;
    }

    .cg-loading-screen[hidden],
    body.cg-cache-ready .cg-loading-screen {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .cg-loading-card {
      width: min(420px, 100%);
      padding: 26px 28px 24px;
      border: 1px solid rgba(240, 212, 137, 0.34);
      border-radius: 20px;
      background: rgba(28, 15, 29, 0.92);
      box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42), 0 0 38px rgba(255, 91, 167, 0.10);
      text-align: center;
    }

    .cg-loading-title {
      margin: 0 0 8px;
      color: #fff7fb;
      font-size: clamp(1.18rem, 4vw, 1.46rem);
      font-weight: 800;
      letter-spacing: 0.06em;
    }

    .cg-loading-status {
      min-height: 1.5em;
      margin: 0 0 16px;
      color: rgba(255, 247, 251, 0.76);
      font-size: 0.92rem;
      font-variant-numeric: tabular-nums;
    }

    .cg-loading-track {
      height: 8px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.10);
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.38);
    }

    .cg-loading-bar {
      width: 0%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--violet), var(--rose), var(--gold-soft));
      box-shadow: 0 0 14px rgba(255, 91, 167, 0.52);
      transition: width 120ms ease-out;
    }

    button {
      font: inherit;
    }

    [data-feature-controls][hidden] {
      display: none !important;
    }

    body:not(.qa-open) .qa-panel * {
      box-shadow: none !important;
      text-shadow: none !important;
    }

    :where(.heart-burst span) {
      animation: fullHeartFloat 3.2s ease-in-out infinite;
    }

    .hostess-character-slot {
      animation: portraitStillBreath 7.2s ease-in-out infinite;
    }

    .hostess-portrait.has-active-effects .portrait-negative-tint {
      animation: portraitNegativeTintPulse 2600ms ease-in-out infinite;
    }

    .hostess-portrait.has-active-effects[data-effect-intensity="high"] {
      animation: fullEffectPressurePulse 1700ms ease-in-out infinite;
    }

    .board-panel.has-active-effects::after {
      animation: fullEffectAtmosphere 3000ms ease-in-out infinite;
    }

    .cell.false-opening::after {
      animation: fullFalseOpeningPulse 920ms ease-in-out infinite;
    }

    :where(.temptation-sigil) {
      animation: fullTemptationSigilPulse 1250ms ease-in-out infinite;
    }

    .temptation-sigil::before,
    .temptation-sigil::after {
      animation: fullTemptationRing 1800ms ease-in-out infinite;
    }

    :where(.temptation-whisper) {
      animation: fullTemptationWhisper 1250ms ease-in-out infinite;
    }

    :where(.cell.switch-cheat-source, .cell.switch-cheat-target) {
      animation: fullCheatCellFlash 980ms ease-out both;
    }

    :where(.cell.revive-cheat-target, .cell.advantage-reversal-stolen) {
      animation: fullCheatCellFlash 1400ms ease-out both;
    }

    :where(.clock-box.is-critical) {
      animation: fullClockCriticalPulse 720ms ease-in-out infinite;
    }

    body.player-damage-hit .app {
      animation: playerScreenShake 520ms cubic-bezier(0.32, 0.02, 0.18, 1);
    }

    .player-damage-overlay {
      position: fixed;
      inset: 0;
      z-index: 1000;
      pointer-events: none;
      opacity: 0;
      background:
        radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.28), transparent 14rem),
        radial-gradient(circle at 50% 48%, rgba(255, 31, 82, 0.42), transparent 24rem),
        linear-gradient(90deg, rgba(220, 23, 62, 0.45), transparent 18%, transparent 82%, rgba(220, 23, 62, 0.45)),
        linear-gradient(180deg, rgba(220, 23, 62, 0.36), transparent 24%, transparent 76%, rgba(220, 23, 62, 0.36));
      mix-blend-mode: normal;
    }

    .player-damage-overlay::before {
      content: "";
      position: absolute;
      inset: -18% -28%;
      opacity: 0;
      background: linear-gradient(112deg, transparent 36%, rgba(255, 255, 255, 0.74) 49%, rgba(255, 54, 98, 0.7) 56%, transparent 68%);
      transform: translateX(-36%) skewX(-16deg);
    }

    .player-damage-overlay::after {
      content: "";
      position: absolute;
      inset: 0;
      opacity: 0;
      box-shadow:
        inset 0 0 0 2px rgba(255, 212, 224, 0.46),
        inset 0 0 92px rgba(255, 25, 70, 0.92),
        inset 0 0 170px rgba(126, 0, 28, 0.72);
    }

    .player-damage-flash {
      position: absolute;
      left: 50%;
      top: 50%;
      width: min(58vw, 760px);
      aspect-ratio: 1;
      border-radius: 50%;
      border: 4px solid rgba(255, 240, 246, 0.86);
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.28);
      box-shadow:
        0 0 36px rgba(255, 42, 92, 0.95),
        inset 0 0 42px rgba(255, 42, 92, 0.45);
    }

    .player-damage-slash {
      position: absolute;
      left: 8%;
      top: 46%;
      width: 84%;
      height: 16px;
      border-radius: 999px;
      opacity: 0;
      transform: rotate(-14deg) scaleX(0);
      transform-origin: left center;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.98), rgba(255, 35, 82, 0.94), transparent);
      box-shadow:
        0 0 22px rgba(255, 255, 255, 0.66),
        0 0 40px rgba(255, 25, 70, 0.88);
    }

    body.player-damage-hit .player-damage-overlay {
      mix-blend-mode: screen;
      animation: playerDamageOverlayFlash 860ms ease-out both;
    }

    body.player-damage-hit .player-damage-overlay::before {
      animation: playerDamageSweep 580ms ease-out both;
    }

    body.player-damage-hit .player-damage-overlay::after {
      animation: playerDamageVignette 860ms ease-out both;
    }

    body.player-damage-hit .player-damage-flash {
      animation: playerDamageRing 780ms ease-out both;
    }

    body.player-damage-hit .player-damage-slash {
      animation: playerDamageSlash 560ms ease-out both;
    }

    .screen-feedback-layer {
      position: fixed;
      inset: 0;
      z-index: 980;
      pointer-events: none;
      opacity: 0;
      contain: strict;
    }

    .screen-feedback-flash,
    .screen-feedback-ring {
      position: absolute;
      inset: 0;
      opacity: 0;
    }

    .screen-feedback-flash {
      background:
        radial-gradient(circle at 50% 48%, var(--screen-cue-center, rgba(255, 255, 255, 0.34)), transparent 26%),
        linear-gradient(90deg, var(--screen-cue-edge, rgba(255, 91, 167, 0.26)), transparent 18%, transparent 82%, var(--screen-cue-edge, rgba(255, 91, 167, 0.26)));
    }

    .screen-feedback-ring {
      inset: 5%;
      border: 2px solid var(--screen-cue-ring, rgba(255, 226, 241, 0.68));
      border-radius: 18px;
      transform: scale(0.96);
    }

    body.screen-cue-capture {
      --screen-cue-center: rgba(255, 247, 214, 0.32);
      --screen-cue-edge: rgba(255, 91, 167, 0.24);
      --screen-cue-ring: rgba(240, 212, 137, 0.68);
    }

    body.screen-cue-check,
    body.screen-cue-impact,
    body.screen-cue-lose {
      --screen-cue-center: rgba(255, 91, 167, 0.30);
      --screen-cue-edge: rgba(174, 14, 69, 0.42);
      --screen-cue-ring: rgba(255, 145, 190, 0.76);
    }

    body.screen-cue-check-given {
      --screen-cue-center: rgba(255, 250, 215, 0.46);
      --screen-cue-edge: rgba(224, 176, 72, 0.30);
      --screen-cue-ring: rgba(255, 226, 142, 0.88);
    }

    body.screen-cue-win {
      --screen-cue-center: rgba(255, 244, 196, 0.42);
      --screen-cue-edge: rgba(215, 169, 76, 0.30);
      --screen-cue-ring: rgba(255, 226, 142, 0.84);
    }

    body.screen-cue-peek {
      --screen-cue-center: rgba(255, 214, 237, 0.42);
      --screen-cue-edge: rgba(255, 36, 139, 0.34);
      --screen-cue-ring: rgba(255, 151, 203, 0.82);
    }

    body.screen-cue-capture .screen-feedback-layer,
    body.screen-cue-check .screen-feedback-layer,
    body.screen-cue-check-given .screen-feedback-layer,
    body.screen-cue-impact .screen-feedback-layer,
    body.screen-cue-win .screen-feedback-layer,
    body.screen-cue-lose .screen-feedback-layer {
      animation: screenFeedbackSurface var(--screen-feedback-duration, 720ms) ease-out both;
    }

    body.screen-cue-capture .screen-feedback-flash,
    body.screen-cue-check .screen-feedback-flash,
    body.screen-cue-check-given .screen-feedback-flash,
    body.screen-cue-impact .screen-feedback-flash,
    body.screen-cue-win .screen-feedback-flash,
    body.screen-cue-lose .screen-feedback-flash {
      animation: screenFeedbackFlash var(--screen-feedback-duration, 720ms) ease-out both;
    }

    body.screen-cue-capture .screen-feedback-ring,
    body.screen-cue-check .screen-feedback-ring,
    body.screen-cue-check-given .screen-feedback-ring,
    body.screen-cue-impact .screen-feedback-ring,
    body.screen-cue-win .screen-feedback-ring,
    body.screen-cue-lose .screen-feedback-ring {
      animation: screenFeedbackRing var(--screen-feedback-duration, 720ms) cubic-bezier(0.2, 0.78, 0.22, 1) both;
    }

    body.screen-cue-peek .screen-feedback-layer {
      animation: screenPeekHeartbeatSurface var(--screen-feedback-duration, 920ms) ease-out both;
    }

    body.screen-cue-peek .screen-feedback-flash {
      animation: screenPeekHeartbeatFlash var(--screen-feedback-duration, 920ms) ease-out both;
    }

    body.screen-cue-peek .screen-feedback-ring {
      animation: screenPeekHeartbeatRing var(--screen-feedback-duration, 920ms) cubic-bezier(0.2, 0.78, 0.22, 1) both;
    }

    .host-panel.settlement-hostess-victory::before,
    .host-panel.settlement-player-victory::before,
    .board-panel.settlement-hostess-victory::after,
    .board-panel.settlement-player-victory::after {
      animation: settlementBorderArrival 860ms ease-out 2 alternate both;
    }

    .host-panel > .content-event-overlay {
      position: absolute;
      inset: 8px;
      z-index: 100;
      display: grid;
      place-items: stretch;
      padding: 0;
      overflow: hidden;
      border-radius: 7px;
      background: rgba(10, 5, 13, 0.96);
      contain: layout paint style;
    }

    .content-event-overlay[hidden] {
      display: none;
    }

    .content-event-frame {
      --content-intensity: 0.7;
      position: relative;
      width: 100%;
      height: 100%;
      min-height: 0;
      overflow: hidden;
      isolation: isolate;
      border: 1px solid rgba(240, 212, 137, 0.52);
      border-radius: 7px;
      background:
        radial-gradient(circle at 50% 24%, rgba(141, 92, 255, 0.28), transparent 26rem),
        linear-gradient(160deg, #2c1327, #110b14 66%);
      box-shadow: inset 0 0 42px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(255, 91, 167, 0.18);
      contain: layout paint style;
      transform-origin: 50% 56%;
    }

    .content-event-image {
      position: absolute;
      inset: 0;
      z-index: -3;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: var(--content-focal-point, 50% 40%);
      opacity: 1;
    }

    .content-event-vignette {
      position: absolute;
      inset: 0;
      z-index: -2;
      pointer-events: none;
      opacity: 0.72;
      background:
        linear-gradient(180deg, rgba(8, 4, 10, 0.06), rgba(8, 4, 10, 0.20) 42%, rgba(8, 4, 10, 0.92) 86%),
        radial-gradient(circle at 50% 42%, transparent 18%, rgba(18, 5, 16, 0.62) 92%);
    }

    .content-event-copy {
      position: absolute;
      inset: auto 0 0;
      z-index: 4;
      display: grid;
      gap: 9px;
      padding: clamp(14px, 2vw, 24px);
      background: linear-gradient(180deg, transparent, rgba(10, 5, 13, 0.76) 18%, rgba(10, 5, 13, 0.96));
    }

    .content-event-meta,
    .content-event-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .content-event-meta strong {
      color: var(--gold-soft);
      font-size: 0.82rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .content-event-meta span {
      color: rgba(255, 247, 251, 0.62);
      font-size: 0.76rem;
      font-variant-numeric: tabular-nums;
    }

    .content-event-copy p {
      min-height: 2.8em;
      margin: 0;
      color: #fff7fb;
      font-size: clamp(1rem, 1.7vw, 1.2rem);
      font-weight: 800;
      line-height: 1.55;
      text-wrap: balance;
    }

    .content-event-actions {
      justify-content: flex-end;
    }

    .content-event-actions button,
    .content-event-choice {
      border: 1px solid rgba(255, 145, 198, 0.40);
      border-radius: 999px;
      padding: 9px 16px;
      background: rgba(33, 13, 32, 0.88);
      color: #fff7fb;
      cursor: pointer;
      font-weight: 900;
    }

    .content-event-actions button:hover,
    .content-event-choice:hover {
      border-color: rgba(240, 212, 137, 0.78);
      background: rgba(91, 24, 70, 0.92);
    }

    [data-testid="content-event-skip"] {
      opacity: 0.68;
    }

    .content-event-choices {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 10px;
    }

    .content-event-choices:empty {
      display: none;
    }

    .content-event-heartbeat,
    .content-event-scent {
      position: absolute;
      inset: 0;
      z-index: 2;
      pointer-events: none;
      overflow: hidden;
    }

    .content-event-heartbeat span {
      position: absolute;
      left: 50%;
      top: 46%;
      width: min(44vw, 360px);
      aspect-ratio: 1;
      border: 2px solid rgba(255, 120, 176, 0.62);
      border-radius: 50%;
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.42);
    }

    .content-event-scent span {
      position: absolute;
      left: var(--scent-left, 28%);
      bottom: 28%;
      color: rgba(255, 210, 232, 0.72);
      font-family: Georgia, serif;
      font-size: clamp(2rem, 5vw, 4.4rem);
      opacity: 0;
      transform: translateY(22px) rotate(-12deg);
    }

    .content-event-scent span:nth-child(1) { --scent-index: 0; --scent-left: 28%; }
    .content-event-scent span:nth-child(2) { --scent-index: 1; --scent-left: 41%; }
    .content-event-scent span:nth-child(3) { --scent-index: 2; --scent-left: 54%; }
    .content-event-scent span:nth-child(4) { --scent-index: 3; --scent-left: 67%; }

    .content-event-frame.fx-heartbeatPulse .content-event-heartbeat span {
      animation: contentHeartbeatRing 620ms ease-out 2 both;
      animation-delay: var(--content-fx-resume-offset, 0ms);
    }

    .content-event-frame.fx-heartbeatPulse .content-event-heartbeat,
    .content-event-frame.fx-scentTrail .content-event-scent,
    .content-event-frame.fx-sniffFocus .content-event-vignette,
    .content-event-frame.fx-vignette .content-event-vignette {
      opacity: var(--content-intensity, 0.7);
    }

    .content-event-frame.fx-heartbeatPulse .content-event-heartbeat span:nth-child(2) {
      animation-delay: calc(var(--content-fx-resume-offset, 0ms) + 100ms);
    }

    .content-event-frame.fx-heartbeatPulse .content-event-heartbeat span:nth-child(3) {
      animation-delay: calc(var(--content-fx-resume-offset, 0ms) + 200ms);
    }

    .content-event-frame.fx-scentTrail .content-event-scent span {
      animation: contentScentTrail 1280ms ease-out both;
      animation-delay: calc(var(--content-fx-resume-offset, 0ms) + var(--scent-index, 0) * 110ms);
    }

    .content-event-frame.fx-sniffFocus {
      animation: contentSniffFocus 820ms cubic-bezier(0.22, 0.7, 0.2, 1) both;
      animation-delay: var(--content-fx-resume-offset, 0ms);
    }

    .content-event-frame.fx-vignette .content-event-vignette {
      animation: contentVignette 1000ms ease-out both;
      animation-delay: var(--content-fx-resume-offset, 0ms);
    }

    @keyframes screenFeedbackSurface {
      0%, 100% { opacity: 0; }
      14%, 38% { opacity: 1; }
    }

    @keyframes screenFeedbackFlash {
      0%, 100% { opacity: 0; }
      18% { opacity: 0.82; }
      44% { opacity: 0.18; }
    }

    @keyframes screenFeedbackRing {
      0% { opacity: 0; transform: scale(0.96); }
      26% { opacity: 0.9; }
      100% { opacity: 0; transform: scale(1.015); }
    }

    @keyframes screenPeekHeartbeatSurface {
      0%, 100% { opacity: 0; }
      8% { opacity: 0.92; }
      17% { opacity: 0.18; }
      27% { opacity: 1; }
      42% { opacity: 0.12; }
      68% { opacity: 0.28; }
    }

    @keyframes screenPeekHeartbeatFlash {
      0%, 100% { opacity: 0; }
      9% { opacity: 0.72; }
      18% { opacity: 0.08; }
      29% { opacity: 0.88; }
      47% { opacity: 0.12; }
    }

    @keyframes screenPeekHeartbeatRing {
      0% { opacity: 0; transform: scale(0.965); }
      10% { opacity: 0.72; transform: scale(0.988); }
      19% { opacity: 0.10; transform: scale(0.998); }
      30% { opacity: 0.94; transform: scale(1.006); }
      100% { opacity: 0; transform: scale(1.026); }
    }

    @keyframes settlementBorderArrival {
      0% { opacity: 0.42; transform: scale(0.992); }
      100% { opacity: 1; transform: scale(1); }
    }

    @keyframes contentHeartbeatRing {
      0% { opacity: 0; transform: translate(-50%, -50%) scale(0.42); }
      24% { opacity: 0.88; }
      100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18); }
    }

    @keyframes contentScentTrail {
      0% { opacity: 0; transform: translateY(24px) rotate(-12deg) scale(0.82); }
      28% { opacity: 0.78; }
      100% { opacity: 0; transform: translateY(-110px) rotate(12deg) scale(1.08); }
    }

    @keyframes contentSniffFocus {
      0%, 100% { transform: scale(1); }
      38% { transform: scale(1.018); }
      66% { transform: scale(0.997); }
    }

    @keyframes contentVignette {
      0%, 100% { opacity: 0.72; }
      38% { opacity: 0.94; }
    }

    .app {
      width: fit-content;
      max-width: 100%;
      height: min(720px, 100vh);
      min-height: 0;
      margin: 0 auto;
      padding: 6px 10px;
      display: grid;
      grid-template-columns: minmax(300px, 360px) max-content;
      gap: 10px;
      align-items: stretch;
    }

    .host-panel,
    .board-panel {
      min-width: 0;
      border: 1px solid rgba(255, 116, 181, 0.44);
      border-radius: 8px;
      background:
        linear-gradient(145deg, rgba(48, 18, 44, 0.88), rgba(17, 12, 19, 0.9)),
        rgba(25, 18, 27, 0.86);
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.42),
        0 0 38px rgba(255, 67, 154, 0.12);
      overflow: hidden;
      height: 100%;
      position: relative;
    }

    .host-panel::before,
    .board-panel::after {
      content: "";
      position: absolute;
      inset: 8px;
      z-index: 0;
      pointer-events: none;
      border: 1px solid rgba(240, 212, 137, 0.38);
      border-radius: 7px;
      background:
        linear-gradient(90deg, rgba(240, 212, 137, 0.78) 0 38px, transparent 38px calc(100% - 38px), rgba(240, 212, 137, 0.78) calc(100% - 38px)) top / 100% 1px no-repeat,
        linear-gradient(90deg, rgba(240, 212, 137, 0.78) 0 38px, transparent 38px calc(100% - 38px), rgba(240, 212, 137, 0.78) calc(100% - 38px)) bottom / 100% 1px no-repeat,
        linear-gradient(180deg, rgba(240, 212, 137, 0.78) 0 38px, transparent 38px calc(100% - 38px), rgba(240, 212, 137, 0.78) calc(100% - 38px)) left / 1px 100% no-repeat,
        linear-gradient(180deg, rgba(240, 212, 137, 0.78) 0 38px, transparent 38px calc(100% - 38px), rgba(240, 212, 137, 0.78) calc(100% - 38px)) right / 1px 100% no-repeat;
      box-shadow:
        inset 0 0 26px rgba(240, 212, 137, 0.06),
        0 0 18px rgba(255, 91, 167, 0.10);
    }

    .host-panel {
      display: grid;
      grid-template-rows: minmax(0, 1fr);
      gap: 0;
      padding: 8px;
      min-height: 0;
    }

    .host-panel.has-active-effects {
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 91, 167, 0.26),
        0 0 42px rgba(255, 67, 154, 0.22);
    }

    .host-panel.cheat-declaration-active {
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 212, 236, 0.34),
        0 0 48px rgba(255, 42, 132, 0.30);
    }

    .host-panel.cheat-declaration-active .hostess-portrait {
      animation: hostDeclarationPulse 980ms cubic-bezier(0.18, 0.86, 0.22, 1) both;
      transform-origin: 50% 44%;
    }

    .host-panel.settlement-hostess-victory,
    .board-panel.settlement-hostess-victory {
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(255, 91, 167, 0.38),
        0 0 58px rgba(255, 42, 132, 0.34);
    }

    .host-panel.settlement-player-victory,
    .board-panel.settlement-player-victory {
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(240, 212, 137, 0.30),
        0 0 34px rgba(240, 212, 137, 0.16);
    }

    .host-panel.clock-pressure-active,
    .board-panel.clock-pressure-active {
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.46),
        0 0 0 1px rgba(255, 91, 167, 0.32),
        0 0 46px rgba(255, 42, 132, 0.28);
    }

    .host-panel.check-pressure-active,
    .board-panel.check-pressure-active {
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.46),
        0 0 0 1px rgba(255, 232, 245, 0.40),
        0 0 50px rgba(255, 42, 132, 0.34);
    }

    .host-panel > *,
    .board-panel > * {
      position: relative;
      z-index: 1;
    }

    .brand-title {
      margin: 0;
      font-size: 1.55rem;
      line-height: 1.15;
      color: #fff3f9;
      text-shadow: 0 0 20px rgba(255, 91, 167, 0.5);
      white-space: nowrap;
    }

    .hostess-stage {
      position: relative;
      min-width: 0;
      min-height: 0;
      height: 100%;
      isolation: isolate;
    }

    /* Camera transforms own the framing. Hidden overflow is still scrollable:
       focusing a clipped descendant can shift the entire portrait off its frame. */
    body[data-portrait-camera="1"] .host-panel > .hostess-stage {
      overflow: clip;
    }

    .hostess-portrait {
      width: 100%;
      min-height: 0;
      height: 100%;
      border: 0;
      border-radius: 8px;
      padding: 0;
      position: relative;
      overflow: hidden;
      cursor: pointer;
      background:
        linear-gradient(180deg, rgba(255, 156, 200, 0.20), rgba(141, 92, 255, 0.16)),
        radial-gradient(circle at 52% 20%, var(--host-glow), transparent 22rem),
        linear-gradient(145deg, #492548, #1c1722);
      box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 -80px 120px rgba(255, 67, 154, 0.16),
        0 0 54px rgba(255, 91, 167, 0.26);
      isolation: isolate;
    }

    .hostess-scene {
      position: absolute;
      inset: 0;
      z-index: 4;
      overflow: hidden;
      pointer-events: none;
      --art-x: 0%;
      --art-scale: 1.04;
      --art-object-position: 50% 40%;
    }

    .hostess-layer {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: var(--art-object-position);
      pointer-events: none;
      transform: translateX(var(--art-x)) scale(var(--art-scale));
      transform-origin: 50% 50%;
      transition: transform 220ms ease, object-position 220ms ease;
      user-select: none;
    }

    .hostess-character-slot {
      position: absolute;
      inset: 0;
      z-index: 3;
      pointer-events: none;
      transform-origin: 50% 50%;
    }

    .hostess-character-motion {
      position: absolute;
      inset: 0;
      pointer-events: none;
      transform-origin: 50% 46%;
    }

    .hostess-background-layer {
      z-index: 1;
    }

    .hostess-table-layer {
      z-index: 2;
    }

    .hostess-art {
      z-index: 2;
    }

    .hostess-character-layer {
      opacity: 1;
      transition:
        opacity 240ms cubic-bezier(0.22, 0.78, 0.24, 1),
        transform 320ms cubic-bezier(0.22, 0.78, 0.24, 1),
        object-position 220ms ease;
    }

    .hostess-thinking-layer {
      z-index: 4;
      opacity: 0;
      visibility: hidden;
      --art-x: 0%;
      --art-scale: 1.04;
      transition:
        opacity 220ms cubic-bezier(0.22, 0.78, 0.24, 1),
        transform 320ms cubic-bezier(0.22, 0.78, 0.24, 1),
        visibility 0ms linear 240ms;
    }

    .hostess-portrait.ai-thinking-active .hostess-character-layer,
    .hostess-portrait.ai-thinking-active .hostess-losing-pressure-layer,
    .hostess-portrait.ai-thinking-active .hostess-reaction-layer,
    .hostess-portrait.ai-thinking-active .hostess-boob-taunt-layer {
      opacity: 0;
      visibility: hidden;
    }

    .hostess-portrait.ai-thinking-active .hostess-thinking-layer {
      opacity: 1;
      visibility: visible;
      transition-delay: 0ms;
    }

    .hostess-portrait.damage-hit.damage-cg-active .hostess-thinking-layer,
    .hostess-portrait.footrub-tabletop-active .hostess-thinking-layer,
    .hostess-portrait.ai-move-cg-active .hostess-thinking-layer {
      opacity: 0;
      visibility: hidden;
    }

    .hostess-losing-pressure-layer {
      z-index: 2;
      opacity: 0;
      visibility: hidden;
      --art-x: 0%;
      --art-scale: 1;
      transition:
        opacity 320ms cubic-bezier(0.22, 0.78, 0.24, 1),
        transform 420ms cubic-bezier(0.22, 0.78, 0.24, 1),
        visibility 0ms linear 340ms;
    }

    .hostess-fatal-blunder-layer {
      z-index: 7;
      opacity: 0;
      visibility: hidden;
      --art-x: 0%;
      --art-scale: 1.04;
      transition: none;
    }

    .hostess-fatal-blunder-foreground-layer {
      z-index: 6;
      opacity: 0;
      visibility: hidden;
      --art-x: 0%;
      --art-scale: 1.04;
      will-change: opacity;
      transition:
        opacity 45ms linear,
        visibility 0ms linear 50ms;
    }

    .hostess-portrait.fatal-blunder-active .hostess-character-slot {
      animation: none;
    }

    /* Fatal blunder owns the character slot, including later pressure entry animations. */
    .hostess-portrait.fatal-blunder-active .hostess-character-motion > .hostess-layer:not(.hostess-fatal-blunder-layer),
    .hostess-portrait.fatal-blunder-active .hostess-character-layer,
    .hostess-portrait.fatal-blunder-active .hostess-thinking-layer,
    .hostess-portrait.fatal-blunder-active .hostess-losing-pressure-layer,
    .hostess-portrait.fatal-blunder-active .hostess-reaction-layer,
    .hostess-portrait.fatal-blunder-active .hostess-damage-reaction-layer,
    .hostess-portrait.fatal-blunder-active .hostess-footrub-tabletop-layer,
    .hostess-portrait.fatal-blunder-active .hostess-shoesniff-tabletop-base-layer,
    .hostess-portrait.fatal-blunder-active .hostess-shoesniff-tabletop-shoe-layer,
    .hostess-portrait.fatal-blunder-active .shoesniff-tabletop-steam,
    .hostess-portrait.fatal-blunder-active .hostess-ai-move-body-layer,
    .hostess-portrait.fatal-blunder-active .hostess-ai-move-hand-layer,
    .hostess-portrait.fatal-blunder-active .hostess-ai-move-press-layer {
      opacity: 0;
      visibility: hidden;
      animation: none;
      transition: none;
    }

    .hostess-portrait.fatal-blunder-active .hostess-fatal-blunder-layer,
    .hostess-portrait.fatal-blunder-active .hostess-fatal-blunder-point-finger-layer {
      opacity: 1;
      visibility: visible;
      transition-delay: 0ms;
    }

    .hostess-portrait.fatal-blunder-active .hostess-fatal-blunder-layer,
    .hostess-portrait.fatal-blunder-active .hostess-fatal-blunder-point-finger-layer {
      animation: none;
      transition: none;
    }

    .hostess-reaction-layer {
      z-index: 3;
      opacity: 0;
      visibility: hidden;
      --art-x: 0%;
      --art-scale: 1.04;
      transition:
        opacity 240ms cubic-bezier(0.22, 0.78, 0.24, 1),
        transform 320ms cubic-bezier(0.22, 0.78, 0.24, 1),
      visibility 0ms linear 260ms;
    }

    .hostess-boob-taunt-layer {
      z-index: 4;
      opacity: 0;
      visibility: hidden;
      --art-x: 0%;
      --art-scale: 1.04;
      transition:
        opacity 240ms cubic-bezier(0.22, 0.78, 0.24, 1),
        transform 320ms cubic-bezier(0.22, 0.78, 0.24, 1),
        visibility 0ms linear 260ms;
    }

    .hostess-damage-reaction-layer {
      z-index: 6;
      opacity: 0;
      visibility: hidden;
      --art-x: 0%;
      --art-scale: 1.04;
      transition:
        opacity 120ms cubic-bezier(0.22, 0.78, 0.24, 1),
        visibility 0ms linear 140ms;
    }

    .hostess-portrait.damage-hit.damage-cg-active .hostess-character-layer,
    .hostess-portrait.damage-hit.damage-cg-active .hostess-losing-pressure-layer,
    .hostess-portrait.damage-hit.damage-cg-active .hostess-reaction-layer,
    .hostess-portrait.damage-hit.damage-cg-active .hostess-boob-taunt-layer,
    .hostess-portrait.damage-hit.damage-cg-active .hostess-footrub-tabletop-layer,
    .hostess-portrait.damage-hit.damage-cg-active .hostess-stroke-tabletop-layer,
    .hostess-portrait.damage-hit.damage-cg-active .hostess-shoesniff-tabletop-base-layer,
    .hostess-portrait.damage-hit.damage-cg-active .hostess-shoesniff-tabletop-shoe-layer,
    .hostess-portrait.damage-hit.damage-cg-active .shoesniff-tabletop-steam,
    .hostess-portrait.damage-hit.damage-cg-active .hostess-thinking-layer,
    .hostess-portrait.damage-hit.damage-cg-active .hostess-ai-move-body-layer,
    .hostess-portrait.damage-hit.damage-cg-active .hostess-ai-move-hand-layer,
    .hostess-portrait.damage-hit.damage-cg-active .hostess-ai-move-press-layer {
      opacity: 0;
      visibility: hidden;
    }

    /* The reaction owns the slot immediately, including AI hand keyframes. */
    .hostess-portrait.damage-hit.damage-cg-active :is(.hostess-ai-move-body-layer, .hostess-ai-move-hand-layer, .hostess-ai-move-press-layer, .hostess-damage-reaction-layer) {
      animation: none;
      transition: none;
    }

    .hostess-portrait.damage-hit.damage-cg-active .hostess-damage-reaction-layer {
      opacity: 1;
      visibility: visible;
      transition-delay: 0ms;
    }

    .hostess-portrait.losing-pressure-cg-active .hostess-character-layer {
      opacity: 0;
      transform: translateX(var(--art-x)) scale(1.015);
    }

    .hostess-portrait.losing-pressure-cg-active .hostess-losing-pressure-layer {
      opacity: 1;
      visibility: visible;
      transform: translateX(var(--art-x)) scale(var(--art-scale));
      transition-delay: 0ms;
    }

    .hostess-portrait.losing-pressure-cg-entering .hostess-losing-pressure-layer {
      animation: losingPressureCGEntry 760ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
    }

    .hostess-portrait.portrait-reaction-active .hostess-character-layer {
      opacity: 0;
      transform: translateX(var(--art-x)) scale(1.015);
    }

    .hostess-portrait.portrait-reaction-active .hostess-reaction-layer {
      opacity: 1;
      visibility: visible;
      transform: translateX(var(--art-x)) scale(var(--art-scale));
      transition-delay: 0ms;
    }

    .hostess-portrait.portrait-reaction-active .hostess-boob-taunt-layer:not([hidden]) {
      opacity: 1;
      visibility: visible;
      transform: translateX(var(--art-x)) scale(var(--art-scale));
      transition-delay: 0ms;
    }

    .hostess-portrait.portrait-reaction-active .hostess-losing-pressure-layer {
      opacity: 0;
      transform: translateX(var(--art-x)) scale(var(--art-scale));
    }

    .hostess-portrait.portrait-reaction-entering .hostess-character-motion {
      animation: portraitReactionPulseIn 820ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
    }

    .hostess-footrub-tabletop-layer {
      z-index: 5;
      opacity: 0;
      visibility: hidden;
      --art-x: 0%;
      --art-scale: 1.04;
      transition:
        opacity 180ms cubic-bezier(0.22, 0.78, 0.24, 1),
        visibility 0ms linear 200ms;
    }

    .hostess-shoesniff-tabletop-base-layer,
    .hostess-shoesniff-tabletop-shoe-layer {
      opacity: 0;
      visibility: hidden;
      --art-x: 0%;
      --art-scale: 1.04;
      will-change: transform;
      transition:
        opacity 180ms cubic-bezier(0.22, 0.78, 0.24, 1),
        visibility 0ms linear 200ms;
    }

    .hostess-shoesniff-tabletop-base-layer {
      z-index: 5;
    }

    .hostess-shoesniff-tabletop-shoe-layer {
      z-index: 6;
      --art-scale: 1.1;
      transform-origin: 59% 54%;
    }

    .shoesniff-tabletop-steam {
      position: absolute;
      inset: 0;
      z-index: 7;
      overflow: hidden;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      -webkit-mask-image: radial-gradient(ellipse 60% 80% at 68% 61%, #000 42%, rgba(0, 0, 0, 0.82) 72%, transparent 100%);
      mask-image: radial-gradient(ellipse 60% 80% at 68% 61%, #000 42%, rgba(0, 0, 0, 0.82) 72%, transparent 100%);
      transition: opacity 240ms ease, visibility 0ms linear 260ms;
    }

    .shoesniff-tabletop-steam img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: 50% 50%;
      transform-origin: 59% 56%;
      opacity: 0;
      mix-blend-mode: screen;
      background-image:
        url("../generated-assets/steam.png"),
        url("../generated-assets/steam.png"),
        url("../generated-assets/steam.png");
      background-position: 50% 50%;
      background-size: cover;
      background-repeat: no-repeat;
      animation: shoesniffSteamRise 6200ms ease-in-out infinite;
    }

    .shoesniff-tabletop-steam img:nth-child(2) { animation-delay: -2067ms; }
    .shoesniff-tabletop-steam img:nth-child(3) { animation-delay: -4133ms; }

    .hostess-portrait.footrub-tabletop-active .hostess-character-layer,
    .hostess-portrait.footrub-tabletop-active .hostess-losing-pressure-layer,
    .hostess-portrait.footrub-tabletop-active .hostess-reaction-layer,
    .hostess-portrait.footrub-tabletop-active .hostess-boob-taunt-layer,
    .hostess-portrait.footrub-tabletop-active .hostess-thinking-layer {
      opacity: 0;
      visibility: hidden;
    }

    .hostess-portrait.footrub-tabletop-active .hostess-footrub-tabletop-layer {
      opacity: 1;
      visibility: visible;
      animation: footrubTabletopWiggle 520ms ease-in-out infinite;
      transition-delay: 0ms;
    }

    .hostess-portrait.footrub-tabletop-active:not(.shoesniff-tabletop-active) .hostess-character-slot {
      z-index: 1;
    }

    .hostess-portrait.footrub-tabletop-active:not(.shoesniff-tabletop-active) .hostess-character-motion {
      translate: 0 10px;
    }

    .hostess-portrait.footrub-tabletop-active.stroke-tabletop-active .hostess-character-motion {
      translate: none;
    }

    .hostess-portrait.stroke-tabletop-active .hostess-character-slot,
    .hostess-portrait.stroke-tabletop-active .hostess-character-motion {
      animation: none;
    }

    .hostess-portrait.stroke-tabletop-active .hostess-stroke-tabletop-layer {
      z-index: 5;
      opacity: 1;
      visibility: visible;
      object-position: left top;
      translate: calc(var(--portrait-source-scale, 1) * var(--stroke-offset-x, 0px)) 0;
      transition-delay: 0ms;
    }

    @media (max-width: 520px) {
      .hostess-stroke-tabletop-layer { --stroke-offset-x: -85px; }
    }

    @media (prefers-reduced-motion: no-preference) {
      .hostess-stroke-animation:not([hidden]) + .hostess-stroke-still { display: none; }
    }

    @media (prefers-reduced-motion: reduce) {
      .hostess-stroke-animation { display: none; }
    }

    .hostess-portrait.shoesniff-tabletop-active .hostess-shoesniff-tabletop-base-layer,
    .hostess-portrait.shoesniff-tabletop-active .hostess-shoesniff-tabletop-shoe-layer,
    .hostess-portrait.shoesniff-tabletop-active .shoesniff-tabletop-steam {
      opacity: 1;
      visibility: visible;
      transition-delay: 0ms;
    }

    .hostess-portrait.shoesniff-tabletop-active .hostess-character-slot {
      animation: none;
    }

    .hostess-portrait.shoesniff-tabletop-active .hostess-shoesniff-tabletop-base-layer {
      animation: shoesniffBaseShake 420ms ease-in-out infinite;
    }

    .hostess-portrait.shoesniff-tabletop-active .hostess-shoesniff-tabletop-shoe-layer {
      animation: shoesniffShoeFollow 420ms ease-in-out infinite;
      animation-delay: 90ms;
      animation-fill-mode: backwards;
    }

    .hostess-portrait.ai-move-cg-active .hostess-footrub-tabletop-layer,
    .hostess-portrait.ai-move-cg-active .hostess-shoesniff-tabletop-base-layer,
    .hostess-portrait.ai-move-cg-active .hostess-shoesniff-tabletop-shoe-layer,
    .hostess-portrait.ai-move-cg-active .shoesniff-tabletop-steam {
      opacity: 0;
      visibility: hidden;
      animation: none;
    }

    .hostess-portrait.fatal-blunder-active .hostess-footrub-tabletop-layer,
    .hostess-portrait.fatal-blunder-active .hostess-shoesniff-tabletop-base-layer,
    .hostess-portrait.fatal-blunder-active .hostess-shoesniff-tabletop-shoe-layer,
    .hostess-portrait.fatal-blunder-active .shoesniff-tabletop-steam,
    .hostess-portrait.fatal-blunder-active .hostess-footrub-parallel {
      opacity: 0;
      visibility: hidden;
      animation: none;
      transition: none;
    }

    .hostess-under-table-view {
      --art-x: 0%;
      --art-scale: 1.45;
      --art-object-position: 50% 50%;
      position: absolute;
      inset: 0;
      z-index: 7;
      overflow: hidden;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      isolation: isolate;
      background: #8b9b9d;
      transition:
        opacity 300ms cubic-bezier(0.22, 0.78, 0.24, 1),
        visibility 0ms linear 320ms;
    }

    .hostess-under-table-view[hidden] {
      display: none;
    }

    .hostess-under-table-view.is-open {
      opacity: 1;
      visibility: visible;
      transition-delay: 0ms;
      animation: underTableViewEnter 480ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
    }

    .hostess-under-table-background-layer {
      z-index: 1;
    }

    .hostess-under-table-shoe-layer {
      z-index: 2;
    }

    .hostess-under-table-shoe-off-layer {
      z-index: 2;
    }

    .hostess-under-table-feet-off-layer,
    .hostess-under-table-feet-up-layer {
      z-index: 3;
    }

    .hostess-under-table-background-layer,
    .hostess-under-table-shoe-layer,
    .hostess-under-table-shoe-off-layer,
    .hostess-under-table-feet-off-layer,
    .hostess-under-table-feet-up-layer {
      object-fit: contain;
      object-position: 50% 0;
      transform-origin: 50% 0;
    }

    .hostess-under-table-view[data-under-table-scene="stockingFeet"] .hostess-under-table-feet-off-layer {
      animation: underTableStockingFeetIdle 2800ms ease-in-out infinite alternate;
    }

    .hostess-under-table-view[data-under-table-scene="feetUp"] .hostess-under-table-feet-up-layer {
      animation: underTableFeetUpIdle 2200ms ease-in-out infinite alternate;
    }

    .under-table-steam-particles {
      position: absolute;
      inset: 0;
      z-index: 4;
      overflow: hidden;
      pointer-events: none;
    }

    .under-table-steam-particles[hidden] {
      display: none;
    }

    .under-table-steam-particles img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: 50% 0;
      opacity: 0;
      pointer-events: none;
      transform-origin: 50% 72%;
    }

    .under-table-steam-particles img:nth-child(1) {
      animation: underTableSteamDrift 3600ms ease-in-out -800ms infinite;
    }

    .under-table-steam-particles img:nth-child(2) {
      animation: underTableSteamDrift 4300ms ease-in-out -2600ms infinite;
    }

    .under-table-steam-particles img:nth-child(3) {
      animation: underTableSteamDrift 5100ms ease-in-out -3900ms infinite;
    }

    .under-table-shoe-hotspot {
      position: absolute;
      left: 18%;
      top: 22%;
      width: 64%;
      height: 42%;
      z-index: 5;
      display: block;
      overflow: visible;
      border-radius: 44% 44% 30% 30%;
      pointer-events: auto;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    .under-table-shoe-hotspot[hidden] {
      display: none;
    }

    .hostess-under-table-view[data-under-table-scene="feetUp"] .under-table-shoe-hotspot {
      top: 14%;
      height: 58%;
    }

    .under-table-shoe-focus {
      position: absolute;
      inset: 28% 12% 6%;
      border: 2px solid rgba(255, 194, 225, 0.12);
      border-radius: 48% 48% 34% 34%;
      opacity: 0.28;
      background: radial-gradient(ellipse at 50% 62%, rgba(255, 78, 158, 0.20), transparent 68%);
      box-shadow: 0 0 18px rgba(255, 61, 151, 0.14), inset 0 0 18px rgba(255, 224, 240, 0.08);
      transform: scale(0.94);
    }

    .under-table-shoe-hotspot.is-ready .under-table-shoe-focus {
      opacity: 0.68;
      animation: underTableShoeReady 2200ms ease-in-out infinite;
    }

    .under-table-shoe-hotspot.is-spent .under-table-shoe-focus,
    .under-table-shoe-hotspot.is-blocked .under-table-shoe-focus {
      opacity: 0.14;
      animation: none;
    }

    .under-table-shoe-particles {
      position: absolute;
      inset: 12% 5% 0;
      pointer-events: none;
    }

    .under-table-shoe-particles span {
      --shoe-heart-x: 50%;
      --shoe-heart-drift: 0px;
      --shoe-heart-delay: 0ms;
      position: absolute;
      left: var(--shoe-heart-x);
      bottom: 16%;
      opacity: 0;
      color: #ff70b5;
      font-size: 1.25rem;
      text-shadow: 0 0 12px rgba(255, 46, 147, 0.92), 0 0 3px #fff;
      transform: translate3d(-50%, 0, 0) scale(0.45) rotate(-8deg);
    }

    .under-table-shoe-particles span:nth-child(1) { --shoe-heart-x: 20%; --shoe-heart-drift: -18px; --shoe-heart-delay: 0ms; }
    .under-table-shoe-particles span:nth-child(2) { --shoe-heart-x: 35%; --shoe-heart-drift: 10px; --shoe-heart-delay: 70ms; font-size: 0.95rem; }
    .under-table-shoe-particles span:nth-child(3) { --shoe-heart-x: 49%; --shoe-heart-drift: -6px; --shoe-heart-delay: 125ms; font-size: 1.5rem; }
    .under-table-shoe-particles span:nth-child(4) { --shoe-heart-x: 63%; --shoe-heart-drift: 16px; --shoe-heart-delay: 45ms; font-size: 1.05rem; }
    .under-table-shoe-particles span:nth-child(5) { --shoe-heart-x: 78%; --shoe-heart-drift: -8px; --shoe-heart-delay: 150ms; font-size: 1.35rem; }
    .under-table-shoe-particles span:nth-child(6) { --shoe-heart-x: 88%; --shoe-heart-drift: 20px; --shoe-heart-delay: 95ms; font-size: 0.86rem; }

    .hostess-under-table-view[data-under-table-scene="shoe"].shoe-peek-pulse-a .hostess-under-table-shoe-layer,
    .hostess-under-table-view[data-under-table-scene="shoe"].shoe-peek-pulse-b .hostess-under-table-shoe-layer {
      animation: underTableShoeHeartbeat 920ms cubic-bezier(0.18, 0.82, 0.2, 1) both;
    }

    .hostess-under-table-view[data-under-table-scene="stockingFeet"].shoe-peek-pulse-a .hostess-under-table-shoe-off-layer,
    .hostess-under-table-view[data-under-table-scene="stockingFeet"].shoe-peek-pulse-b .hostess-under-table-shoe-off-layer,
    .hostess-under-table-view[data-under-table-scene="feetUp"].shoe-peek-pulse-a .hostess-under-table-shoe-off-layer,
    .hostess-under-table-view[data-under-table-scene="feetUp"].shoe-peek-pulse-b .hostess-under-table-shoe-off-layer {
      animation: underTableShoeOffSettle 920ms cubic-bezier(0.18, 0.82, 0.2, 1) both;
    }

    .hostess-under-table-view[data-under-table-scene="stockingFeet"].shoe-peek-pulse-a .hostess-under-table-feet-off-layer,
    .hostess-under-table-view[data-under-table-scene="stockingFeet"].shoe-peek-pulse-b .hostess-under-table-feet-off-layer {
      animation: underTableStockingFeetPulse 920ms cubic-bezier(0.18, 0.82, 0.2, 1) both;
    }

    .hostess-under-table-view[data-under-table-scene="feetUp"].shoe-peek-pulse-a .hostess-under-table-feet-up-layer,
    .hostess-under-table-view[data-under-table-scene="feetUp"].shoe-peek-pulse-b .hostess-under-table-feet-up-layer {
      animation: underTableFeetUpTease 920ms cubic-bezier(0.16, 0.8, 0.2, 1) both;
    }

    .hostess-under-table-view.shoe-peek-pulse-a .under-table-shoe-focus,
    .hostess-under-table-view.shoe-peek-pulse-b .under-table-shoe-focus {
      animation: underTableShoeFocusBurst 920ms ease-out both;
    }

    .hostess-under-table-view.shoe-peek-pulse-a .under-table-shoe-particles span,
    .hostess-under-table-view.shoe-peek-pulse-b .under-table-shoe-particles span {
      animation: underTableShoeHeartBurst 920ms cubic-bezier(0.16, 0.78, 0.24, 1) var(--shoe-heart-delay) both;
    }

    .hostess-footrub-parallel {
      position: absolute;
      inset: 0;
      z-index: 3;
      overflow: hidden;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      isolation: isolate;
      background: transparent;
      transition:
        opacity 320ms cubic-bezier(0.22, 0.78, 0.24, 1),
        visibility 0ms linear 340ms;
    }

    .hostess-footrub-parallel[hidden] {
      display: none;
    }

    .hostess-footrub-parallel.is-active {
      opacity: 1;
      visibility: visible;
      transition-delay: 0ms;
      animation: footrubParallelEnter 520ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
    }

    .hostess-footrub-art-stage {
      position: absolute;
      inset: 0;
      z-index: 1;
      pointer-events: none;
    }

    .hostess-footrub-image,
    .hostess-footrub-feet-image {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: 50% 50%;
      pointer-events: none;
    }

    .hostess-footrub-image {
      z-index: 1;
    }

    .hostess-footrub-feet-image {
      z-index: 2;
      transform-origin: 51.5% 69%;
      animation: footrubFeetRub 160ms cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
      will-change: transform;
    }

    .hostess-footjob-body-image,
    .hostess-footjob-leg-left-image,
    .hostess-footjob-leg-right-image,
    .hostess-footjob-penis-image {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: 50% 50%;
      pointer-events: none;
      will-change: transform;
    }

    .hostess-footjob-body-image {
      z-index: 1;
      transform-origin: 50% 72%;
      animation: footjobBodyShudder 160ms linear infinite;
    }

    .hostess-footjob-leg-left-image,
    .hostess-footjob-leg-right-image {
      z-index: 2;
      inset: auto 0 8.5%;
      height: 148%;
      transform-origin: 50% 82%;
      animation-duration: 1200ms;
      animation-timing-function: cubic-bezier(0.45, 0.02, 0.55, 0.98);
      animation-iteration-count: infinite;
    }

    .hostess-footjob-leg-left-image {
      animation-name: footjobLegLeftAlternate;
    }

    .hostess-footjob-leg-right-image {
      z-index: 3;
      animation-name: footjobLegRightAlternate;
    }

    .hostess-footrub-parallel[data-footjob-motion="together"] .hostess-footjob-leg-left-image,
    .hostess-footrub-parallel[data-footjob-motion="together"] .hostess-footjob-leg-right-image {
      animation-name: footjobLegTogether;
    }

    .hostess-footrub-parallel[data-parallel-scene="shoesniff"] .hostess-footjob-body-image {
      animation-duration: 125ms;
    }

    .hostess-footrub-parallel[data-parallel-scene="shoesniff"] .hostess-footjob-leg-left-image,
    .hostess-footrub-parallel[data-parallel-scene="shoesniff"] .hostess-footjob-leg-right-image {
      height: 142%;
      animation-duration: 480ms;
      animation-timing-function: cubic-bezier(0.44, 0.02, 0.56, 0.98);
    }

    .hostess-footrub-parallel[data-parallel-scene="shoesniff"] .hostess-footjob-leg-left-image {
      z-index: 2;
      animation-name: shoesniffFrontLowerSandwich;
    }

    .hostess-footrub-parallel[data-parallel-scene="shoesniff"] .hostess-footjob-leg-right-image {
      z-index: 3;
      animation-name: shoesniffFrontUpperSandwich;
    }

    .hostess-footrub-parallel[data-parallel-scene="shoesniff"] .hostess-footjob-penis-image {
      animation: shoesniffFrontResponse 480ms cubic-bezier(0.42, 0.02, 0.58, 0.98) infinite;
    }

    .hostess-footjob-penis-image {
      z-index: 4;
      transform-origin: 49% 66%;
      animation: footjobResponseCycle 1200ms cubic-bezier(0.42, 0.02, 0.58, 0.98) infinite;
    }

    .footjob-steam-particles {
      position: absolute;
      inset: 0;
      z-index: 5;
      overflow: hidden;
      pointer-events: none;
    }

    .footjob-steam-particles img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: 50% 50%;
      opacity: 0;
      animation: footjobSteamDrift 7200ms ease-in-out infinite;
    }

    .footjob-steam-particles img:nth-child(2) { animation-delay: -2400ms; }
    .footjob-steam-particles img:nth-child(3) { animation-delay: -4800ms; }

    .hostess-footrub-parallel::before,
    .hostess-footrub-parallel::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 3;
      pointer-events: none;
    }

    .hostess-footrub-parallel::before {
      background:
        radial-gradient(circle at 50% 68%, rgba(255, 91, 167, 0.22), transparent 34%),
        radial-gradient(circle at 52% 42%, transparent 38%, rgba(24, 5, 22, 0.34) 100%);
      mix-blend-mode: screen;
      animation: footrubParallelAura 2100ms ease-in-out infinite;
    }

    .hostess-footrub-parallel::after {
      background: linear-gradient(180deg, transparent 52%, rgba(22, 4, 18, 0.34));
    }

    .footrub-parallel-particles {
      position: absolute;
      inset: 0;
      z-index: 7;
      overflow: hidden;
      pointer-events: none;
    }

    .footrub-parallel-particles span {
      position: absolute;
      left: var(--footrub-particle-x);
      bottom: -12%;
      color: rgba(255, 119, 184, 0.82);
      font-size: var(--footrub-particle-size);
      opacity: 0;
      text-shadow: 0 0 12px rgba(255, 91, 167, 0.72);
      animation: footrubParallelParticle var(--footrub-particle-duration) ease-in infinite;
      animation-delay: var(--footrub-particle-delay);
    }

    .footrub-parallel-particles span:nth-child(1) { --footrub-particle-x: 12%; --footrub-particle-size: 18px; --footrub-particle-duration: 3.1s; --footrub-particle-delay: -0.4s; }
    .footrub-parallel-particles span:nth-child(2) { --footrub-particle-x: 25%; --footrub-particle-size: 13px; --footrub-particle-duration: 3.8s; --footrub-particle-delay: -2.1s; }
    .footrub-parallel-particles span:nth-child(3) { --footrub-particle-x: 39%; --footrub-particle-size: 22px; --footrub-particle-duration: 3.5s; --footrub-particle-delay: -1.2s; }
    .footrub-parallel-particles span:nth-child(4) { --footrub-particle-x: 53%; --footrub-particle-size: 15px; --footrub-particle-duration: 4.0s; --footrub-particle-delay: -3.1s; }
    .footrub-parallel-particles span:nth-child(5) { --footrub-particle-x: 66%; --footrub-particle-size: 20px; --footrub-particle-duration: 3.3s; --footrub-particle-delay: -1.7s; }
    .footrub-parallel-particles span:nth-child(6) { --footrub-particle-x: 79%; --footrub-particle-size: 12px; --footrub-particle-duration: 3.7s; --footrub-particle-delay: -0.8s; }
    .footrub-parallel-particles span:nth-child(7) { --footrub-particle-x: 88%; --footrub-particle-size: 17px; --footrub-particle-duration: 4.2s; --footrub-particle-delay: -2.6s; }
    .footrub-parallel-particles span:nth-child(8) { --footrub-particle-x: 46%; --footrub-particle-size: 11px; --footrub-particle-duration: 2.9s; --footrub-particle-delay: -2.3s; }

    .under-table-peek-hint {
      position: absolute;
      inset: auto 0 0;
      z-index: 8;
      min-height: 54px;
      pointer-events: none;
      opacity: 0;
      background: linear-gradient(180deg, transparent, rgba(255, 22, 132, 0.86));
      box-shadow: inset 0 -3px 0 rgba(255, 211, 235, 0.84);
      transform: translateY(8px);
      transition: opacity 180ms ease, transform 180ms ease;
    }

    .under-table-peek-hint::before,
    .under-table-peek-hint::after {
      content: "";
      position: absolute;
      left: 50%;
      width: 14px;
      height: 14px;
      border: solid rgba(255, 239, 248, 0.92);
      border-width: 0 3px 3px 0;
      opacity: 0;
      transform: translateX(-50%) rotate(45deg);
      transform-origin: 50% 50%;
      transition: opacity 180ms ease, transform 180ms ease;
    }

    .under-table-peek-hint::before { bottom: 22px; }
    .under-table-peek-hint::after { bottom: 10px; }

    .under-table-peek-hint[data-cue="down"]::before,
    .under-table-peek-hint[data-cue="down"]::after,
    .under-table-peek-hint[data-cue="up"]::before,
    .under-table-peek-hint[data-cue="up"]::after {
      opacity: 1;
    }

    .under-table-peek-hint[data-cue="up"]::before,
    .under-table-peek-hint[data-cue="up"]::after {
      border-color: rgba(255, 234, 169, 0.94);
      transform: translateX(-50%) rotate(225deg);
    }

    .hostess-portrait.under-table-peek-available .under-table-peek-hint {
      opacity: 0.38;
      transform: translateY(0);
      background: linear-gradient(180deg, transparent, rgba(73, 23, 61, 0.70));
      box-shadow: inset 0 -2px 0 rgba(255, 160, 207, 0.42);
    }

    .hostess-portrait.footrub-under-table-alert .under-table-peek-hint {
      opacity: 1;
      transform: translateY(0);
      animation: underTableActivityFlash 720ms ease-in-out infinite alternate;
    }

    .hostess-portrait.under-table-view-open .under-table-peek-hint {
      min-height: 48px;
      opacity: 0.86;
      transform: translateY(0);
      animation: none;
      background: linear-gradient(180deg, transparent, rgba(31, 9, 29, 0.88));
      box-shadow: inset 0 -2px 0 rgba(240, 212, 137, 0.68);
    }

    .advantage-reversal-scene {
      position: absolute;
      inset: 0;
      z-index: 16;
      overflow: hidden;
      isolation: isolate;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      background: #8b9b9d;
      transition: opacity 220ms ease, visibility 0ms linear 240ms;
    }

    .advantage-reversal-scene[hidden] {
      display: none;
    }

    /* Shared once-only cut-in above the reversal scene. */
    .footjob-cum-cutin {
      position: absolute;
      inset: 0;
      z-index: 17;
      overflow: hidden;
      pointer-events: none;
      background: #120e16;
    }

    .footjob-cum-cutin[hidden] {
      display: none;
    }

    /* Cum stain painted over the board's border box (the board border is 3px, so the image
       extends under it). Above the pieces, below locks, move animation and popups. */
    .board-cum-stain {
      position: absolute;
      inset: -3px;
      width: calc(100% + 6px);
      height: calc(100% + 6px);
      z-index: 8;
      pointer-events: none;
      user-select: none;
      opacity: 1;
      transition: opacity 180ms ease;
    }

    .board-cum-stain[hidden] {
      display: none;
    }

    .board-cum-stain.is-faded {
      opacity: 0.28;
    }

    /* The shot lands frame by frame over the reversal lock (z 14) so it reads during the cut-in;
       the static layer under it takes over at its last frame. */
    .board-cum-stain-shot {
      z-index: 15;
    }

    /* Liquid still in the air above the landing shot (runtime/board-cum-sim.js). */
    .board-cum-stain-sim {
      position: absolute;
      inset: -3px;
      width: calc(100% + 6px);
      height: calc(100% + 6px);
      z-index: 16;
      pointer-events: none;
    }

    .board-cum-stain-sim[hidden] {
      display: none;
    }

    .footjob-cum-cutin-image {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: 50% 50%;
    }

    .advantage-reversal-scene.is-active {
      opacity: 1;
      visibility: visible;
      transition-delay: 0ms;
    }

    .advantage-reversal-tabletop,
    .advantage-reversal-floor,
    .advantage-reversal-sniff {
      position: absolute;
      inset: 0;
      display: none;
      overflow: hidden;
      isolation: isolate;
    }

    .advantage-reversal-scene[data-phase="placing"] .advantage-reversal-tabletop,
    .advantage-reversal-scene[data-phase="dropping"] .advantage-reversal-tabletop,
    .advantage-reversal-scene[data-phase="waiting"] .advantage-reversal-tabletop,
    .advantage-reversal-scene[data-phase="floorBait"] .advantage-reversal-floor,
    .advantage-reversal-scene[data-phase="feetApproach"] .advantage-reversal-floor,
    .advantage-reversal-scene[data-phase="sniffing"] .advantage-reversal-sniff {
      display: block;
    }

    .advantage-reversal-layer,
    .advantage-reversal-sniff-side,
    .advantage-reversal-sniff-feet,
    .advantage-reversal-sniff-boy {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: 50% 50%;
      pointer-events: none;
      user-select: none;
      transform-origin: 50% 50%;
    }

    .advantage-reversal-table-background,
    .advantage-reversal-floor-background {
      z-index: 1;
    }

    .advantage-reversal-table-surface {
      z-index: 2;
      opacity: 0;
    }

    .advantage-reversal-move-body,
    .advantage-reversal-taunt {
      z-index: 3;
      opacity: 0;
    }

    .advantage-reversal-board {
      z-index: 4;
      opacity: 0;
    }

    .advantage-reversal-move-hand,
    .advantage-reversal-chess-big {
      z-index: 5;
      opacity: 0;
    }

    .advantage-reversal-scene[data-phase="placing"] .advantage-reversal-move-body,
    .advantage-reversal-scene[data-phase="placing"] .advantage-reversal-table-surface,
    .advantage-reversal-scene[data-phase="placing"] .advantage-reversal-board,
    .advantage-reversal-scene[data-phase="placing"] .advantage-reversal-move-hand {
      opacity: 1;
    }

    .advantage-reversal-scene[data-phase="placing"] .advantage-reversal-move-body {
      animation: advantageReversalPlaceBody 1000ms ease-in-out both;
    }

    .advantage-reversal-scene[data-phase="placing"] .advantage-reversal-move-hand {
      animation: advantageReversalPlaceHand 1000ms cubic-bezier(0.2, 0.78, 0.22, 1) both;
    }

    .advantage-reversal-scene[data-phase="dropping"] .advantage-reversal-chess-big {
      opacity: 1;
      animation: advantageReversalChessFall 1050ms linear both;
    }

    .advantage-reversal-scene[data-phase="waiting"] .advantage-reversal-table-surface {
      opacity: 1;
    }

    .advantage-reversal-scene[data-phase="waiting"] .advantage-reversal-taunt,
    .advantage-reversal-scene[data-phase="waiting"] .advantage-reversal-board {
      opacity: 1;
      animation: advantageReversalTauntSettle 520ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
    }

    .advantage-reversal-scene[data-phase="waiting"]::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 19;
      height: 16%;
      border-radius: 0;
      pointer-events: none;
      background: linear-gradient(0deg, rgba(255, 45, 151, 0.58), rgba(255, 45, 151, 0));
      animation: advantageReversalFloorAlert 980ms ease-in-out infinite;
    }

    .advantage-reversal-floor {
      --art-scale: 1.45;
      container-type: size;
      /* Keep the shared artwork and hotspot at y=714 of the 1000×832 image in view on short stages. */
      --chess-floor-y: min(7.5%, calc(76% - min(71.4cqw, 85.82cqh) * var(--art-scale)));
    }

    .advantage-reversal-floor-background,
    .advantage-reversal-floor-shoes,
    .advantage-reversal-feet-up,
    .advantage-reversal-feet-close {
      --floor-layer-y: 0%;
      object-fit: contain;
      object-position: 50% 0;
      transform-origin: 50% 0;
      transform: translateY(var(--floor-layer-y)) scale(var(--art-scale));
    }

    .advantage-reversal-floor-shoes,
    .advantage-reversal-feet-up,
    .advantage-reversal-chess-floor {
      opacity: 0;
    }

    .advantage-reversal-floor-shoes {
      z-index: 2;
    }

    .advantage-reversal-feet-up,
    .advantage-reversal-feet-close {
      z-index: 3;
    }

    .advantage-reversal-chess-floor-artwork {
      position: absolute;
      inset: 0;
      z-index: 4;
      overflow: visible;
      transform-origin: 50% 0;
      transform: translateY(var(--chess-floor-y)) scale(var(--art-scale));
      pointer-events: none;
    }

    .advantage-reversal-chess-floor-artwork .advantage-reversal-chess-floor {
      z-index: 1;
      object-fit: contain;
      object-position: 50% 0;
      transform: none;
    }

    .advantage-reversal-scene[data-phase="floorBait"] .advantage-reversal-floor-shoes,
    .advantage-reversal-scene[data-phase="floorBait"] .advantage-reversal-feet-up,
    .advantage-reversal-scene[data-phase="floorBait"] .advantage-reversal-chess-floor {
      opacity: 1;
      animation: advantageReversalFloorReveal 460ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
    }

    .advantage-reversal-scene[data-phase="feetApproach"] .advantage-reversal-floor-shoes,
    .advantage-reversal-scene[data-phase="feetApproach"] .advantage-reversal-chess-floor {
      opacity: 1;
    }

    .advantage-reversal-chess-hotspot-layer {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      z-index: 2;
      display: none;
      overflow: visible;
      pointer-events: none;
    }

    .advantage-reversal-chess-hotspot {
      fill: rgba(255, 226, 167, 0.20);
      stroke: rgba(255, 225, 177, 0.52);
      stroke-width: 4;
      pointer-events: auto;
      cursor: pointer;
      transform-box: fill-box;
      transform-origin: center;
      animation: advantageReversalChessHotspot 1300ms ease-in-out infinite;
    }

    .advantage-reversal-scene[data-phase="floorBait"] .advantage-reversal-chess-hotspot-layer {
      display: block;
    }

    .advantage-reversal-feet-close {
      z-index: 4;
      opacity: 0;
    }

    .advantage-reversal-scene[data-phase="feetApproach"] .advantage-reversal-feet-close {
      opacity: 1;
      animation:
        advantageReversalFeetApproach 440ms cubic-bezier(0.18, 0.76, 0.3, 1) both,
        advantageReversalFeetImpactJelly 420ms 440ms cubic-bezier(0.22, 0.72, 0.3, 1) forwards;
    }

    .advantage-reversal-steam {
      position: absolute;
      inset: 0;
      z-index: 12;
      display: none;
      overflow: hidden;
      pointer-events: none;
    }

    .advantage-reversal-scene[data-phase="floorBait"] .advantage-reversal-steam,
    .advantage-reversal-scene[data-phase="feetApproach"] .advantage-reversal-steam {
      display: block;
    }

    .advantage-reversal-scene[data-phase="feetApproach"] .advantage-reversal-steam {
      transform-origin: 50% 0;
      animation: advantageReversalSteamApproach 440ms cubic-bezier(0.18, 0.76, 0.3, 1) both;
    }

    .advantage-reversal-steam img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: 50% 0;
      transform: scale(var(--art-scale));
      transform-origin: 50% 0;
      opacity: 0;
      animation: advantageReversalSteamRush 4200ms ease-in-out infinite;
    }

    .advantage-reversal-steam img:nth-child(2) { animation-delay: -1050ms; }
    .advantage-reversal-steam img:nth-child(3) { animation-delay: -2100ms; }
    .advantage-reversal-steam img:nth-child(4) { animation-delay: -3150ms; }

    .advantage-reversal-sniff {
      z-index: 1;
      background: #8e4b7e;
    }

    .advantage-reversal-sniff-clouds-track,
    .advantage-reversal-sniff-side-track {
      position: absolute;
      top: -3%;
      left: 50%;
      height: 106%;
      width: auto;
      aspect-ratio: 1091 / 832;
      translate: -50% 0;
      pointer-events: none;
      animation:
        advantageReversalSniffSidePan 9.6s linear infinite,
        advantageReversalSniffSideFade 13.2s ease-in-out infinite;
    }

    .advantage-reversal-sniff-clouds-track {
      z-index: 1;
    }

    .advantage-reversal-sniff-clouds-canvas {
      position: absolute;
      inset: -14% -65%;
      overflow: hidden;
      isolation: isolate;
      background:
        radial-gradient(ellipse 52% 48% at 50% 48%, #c9a4c2 0%, #b777a9 38%, #d646a4 74%, #c22488 100%);
    }

    .advantage-reversal-sniff-cloud {
      position: absolute;
      top: 0;
      left: 0;
      width: 200%;
      height: 200%;
      max-width: none;
      object-fit: fill;
      pointer-events: none;
      user-select: none;
    }

    .advantage-reversal-sniff-cloud-a {
      mix-blend-mode: hard-light;
      opacity: 0.78;
      animation:
        advantageReversalSniffCloudDriftA 20s linear infinite,
        advantageReversalSniffCloudBreatheA 6.4s ease-in-out infinite;
    }

    .advantage-reversal-sniff-cloud-b {
      mix-blend-mode: difference;
      opacity: 0.44;
      animation:
        advantageReversalSniffCloudDriftB 14.5s linear infinite,
        advantageReversalSniffCloudBreatheB 5.2s ease-in-out infinite;
    }

    .advantage-reversal-sniff-clouds-vignette {
      position: absolute;
      inset: 0;
      z-index: 1;
      pointer-events: none;
      background:
        radial-gradient(ellipse 66% 62% at 50% 50%, rgba(226, 78, 174, 0) 42%, rgba(226, 56, 164, 0.34) 76%, rgba(206, 30, 140, 0.72) 100%);
      animation: advantageReversalSniffSideFade 13.2s ease-in-out infinite;
    }

    .advantage-reversal-sniff-feet-closeup-wrap {
      position: absolute;
      inset: 0;
      z-index: 2;
      pointer-events: none;
      overflow: hidden;
      animation: advantageReversalSniffSideFade 13.2s ease-in-out infinite;
    }

    .advantage-reversal-sniff-feet-closeup {
      position: absolute;
      left: 50%;
      top: 44%;
      width: 170%;
      height: auto;
      max-width: none;
      translate: -50% -50%;
      opacity: 0.82;
      pointer-events: none;
      user-select: none;
      transform-origin: 50% 50%;
      animation: advantageReversalSniffFeetCloseupBreath 4600ms ease-in-out infinite;
      -webkit-mask-image:
        linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.65) 8%, #000 18%, #000 92%, transparent 100%),
        linear-gradient(to right, transparent 19%, #000 28%, #000 72%, transparent 81%);
      -webkit-mask-composite: source-in;
      mask-image:
        linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.65) 8%, #000 18%, #000 92%, transparent 100%),
        linear-gradient(to right, transparent 19%, #000 28%, #000 72%, transparent 81%);
      mask-composite: intersect;
    }

    .advantage-reversal-sniff-side-track {
      z-index: 3;
    }

    .advantage-reversal-sniff-side {
      position: absolute;
      inset: 0;
      z-index: 1;
      width: 100%;
      height: 100%;
      pointer-events: none;
      transform-origin: 50% 50%;
      animation: advantageReversalSniffSideBreath 3400ms ease-in-out infinite;
    }

    .advantage-reversal-sniff-side-layer {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: 50% 50%;
      pointer-events: none;
      user-select: none;
      transform-origin: 50% 50%;
    }

    .advantage-reversal-sniff-side-clock { z-index: 1; }
    .advantage-reversal-sniff-side-table-pieces { z-index: 2; }
    .advantage-reversal-sniff-side-leg-a { z-index: 3; }

    .advantage-reversal-sniff-boy-wrap {
      z-index: 4;
      transform-origin: 84% 72%;
      animation: advantageReversalSniffSideBoyShudder 3800ms linear infinite;
    }

    .advantage-reversal-sniff-side-boy {
      transform-origin: 84% 72%;
      animation: advantageReversalSniffSideBoyTremble 260ms linear infinite;
    }

    .advantage-reversal-sniff-side-her { z-index: 5; }
    .advantage-reversal-sniff-side-leg-b { z-index: 6; }

    .advantage-reversal-sniff-piece-wrap {
      z-index: 7;
      transform-origin: 52% 84.4%;
      animation: advantageReversalSniffSidePieceHover 2800ms ease-in-out infinite;
    }

    .advantage-reversal-sniff-side-piece {
      transform-origin: 52% 84.4%;
      animation: advantageReversalSniffSidePieceShake 310ms linear infinite;
    }

    .advantage-reversal-sniff-side-mist {
      position: absolute;
      left: 72%;
      top: 50%;
      z-index: 8;
      width: 28%;
      height: 34%;
      pointer-events: none;
    }

    .advantage-reversal-sniff-side-mist img {
      --mist-x: 0%;
      --mist-drift: 6%;
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      mix-blend-mode: screen;
      transform: scale(1.95);
      transform-origin: 50% 50%;
      opacity: 0;
      pointer-events: none;
      user-select: none;
      animation: advantageReversalSniffSideMist 3600ms ease-in-out infinite;
    }

    .advantage-reversal-sniff-side-mist img:nth-child(2) { --mist-x: 11%; --mist-drift: -8%; animation-delay: -600ms; }
    .advantage-reversal-sniff-side-mist img:nth-child(3) { --mist-x: -10%; --mist-drift: 10%; animation-delay: -1200ms; }
    .advantage-reversal-sniff-side-mist img:nth-child(4) { --mist-x: 5%; --mist-drift: -6%; animation-delay: -1800ms; }
    .advantage-reversal-sniff-side-mist img:nth-child(5) { --mist-x: -6%; --mist-drift: 7%; animation-delay: -2400ms; }
    .advantage-reversal-sniff-side-mist img:nth-child(6) { --mist-x: 8%; --mist-drift: -4%; animation-delay: -3000ms; }

    .advantage-reversal-sniff-callouts {
      position: absolute;
      inset: 0;
      z-index: 6;
      pointer-events: none;
      animation: advantageReversalSniffSideFade 13.2s ease-in-out infinite;
    }

    .advantage-reversal-sniff-callouts .portrait-callout.left,
    .advantage-reversal-sniff-callouts .portrait-callout.right {
      visibility: visible;
      opacity: 0;
      transition: none;
      animation-name: advantageReversalSniffCalloutCycle;
      animation-duration: 16s;
      animation-timing-function: linear;
      animation-iteration-count: infinite;
    }

    .advantage-reversal-sniff-callouts .portrait-callout.left {
      left: 14px;
      top: 24px;
      max-height: 46%;
      translate: 0 0;
    }

    .advantage-reversal-sniff-callouts .portrait-callout.right {
      right: 14px;
      top: 24px;
      max-height: 44%;
      translate: 0 0;
    }

    .advantage-reversal-sniff-callouts .advantage-reversal-sniff-callout.c-h1 { animation-delay: 0s; }
    .advantage-reversal-sniff-callouts .advantage-reversal-sniff-callout.c-b1 { animation-delay: -14s; }
    .advantage-reversal-sniff-callouts .advantage-reversal-sniff-callout.c-h2 { animation-delay: -12s; }
    .advantage-reversal-sniff-callouts .advantage-reversal-sniff-callout.c-b2 { animation-delay: -10s; }
    .advantage-reversal-sniff-callouts .advantage-reversal-sniff-callout.c-h3 { animation-delay: -8s; }
    .advantage-reversal-sniff-callouts .advantage-reversal-sniff-callout.c-b3 { animation-delay: -6s; }
    .advantage-reversal-sniff-callouts .advantage-reversal-sniff-callout.c-h4 { animation-delay: -4s; }
    .advantage-reversal-sniff-callouts .advantage-reversal-sniff-callout.c-b4 { animation-delay: -2s; }

    .advantage-reversal-sniff-layered {
      position: absolute;
      inset: 0;
      z-index: 4;
      opacity: 0;
      overflow: hidden;
      animation: advantageReversalSniffLayerCycle 13.2s ease-in-out infinite;
    }

    .advantage-reversal-sniff-feet {
      z-index: 1;
      animation: advantageReversalSniffFeetBreath 2500ms ease-in-out infinite;
    }

    .advantage-reversal-sniff-boy {
      z-index: 2;
      animation: advantageReversalSniffBoyMotion 200ms cubic-bezier(0.3, 0, 0.6, 1) infinite;
    }

    .advantage-reversal-sniff-steam {
      position: absolute;
      left: -4%;
      top: -2%;
      z-index: 3;
      width: 62%;
      height: 82%;
      overflow: hidden;
      pointer-events: none;
    }

    .advantage-reversal-sniff-steam img {
      --sniff-steam-x: 0%;
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      transform: scale(2);
      transform-origin: 50% 32%;
      opacity: 0;
      animation: advantageReversalSniffSteam 5200ms ease-in-out infinite;
    }

    .advantage-reversal-sniff-steam img:nth-child(2) { --sniff-steam-x: 5%; animation-delay: -1300ms; }
    .advantage-reversal-sniff-steam img:nth-child(3) { --sniff-steam-x: -5%; animation-delay: -2600ms; }
    .advantage-reversal-sniff-steam img:nth-child(4) { --sniff-steam-x: 2%; animation-delay: -3900ms; }

    .advantage-reversal-sniff-pulse {
      position: absolute;
      inset: -8%;
      z-index: 5;
      pointer-events: none;
      border: 5px solid rgba(255, 76, 168, 0.25);
      box-shadow: inset 0 0 58px rgba(255, 39, 146, 0.30), 0 0 38px rgba(255, 53, 155, 0.22);
      animation: advantageReversalSniffPulse 1380ms ease-in-out infinite;
    }

    /* Camera language between the views (owner request 2026-11-20): instead of hard cuts the
       camera follows the fallen piece, ducks under the table, takes the feet in the face and
       comes out of a flash into the sniff. Containers move with the individual `translate`
       property so the layers keep their own framing transforms. */
    .advantage-reversal-scene[data-phase="dropping"] .advantage-reversal-tabletop {
      animation: advantageReversalFollowDrop 1050ms cubic-bezier(0.45, 0, 0.55, 1) both;
    }

    /* The piece hits the floor: a low pink burst under the table edge. */
    .advantage-reversal-scene[data-phase="waiting"]::before {
      content: "";
      position: absolute;
      left: -10%;
      right: -10%;
      bottom: -4%;
      z-index: 20;
      height: 34%;
      pointer-events: none;
      background: radial-gradient(ellipse 46% 62% at 50% 100%, rgba(255, 250, 253, 1), rgba(255, 92, 176, 0.75) 38%, rgba(255, 45, 151, 0) 74%);
      transform-origin: 50% 100%;
      animation: advantageReversalLandingBurst 760ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
    }

    /* Clicking the floor tilts the camera down under the table: the tabletop leaves upward while
       the floor view rises in from below. */
    .advantage-reversal-scene[data-phase="floorBait"] .advantage-reversal-tabletop {
      display: block;
      z-index: 3;
      pointer-events: none;
      animation: advantageReversalDuckOut 620ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
    }

    .advantage-reversal-scene[data-phase="floorBait"] :is(.advantage-reversal-table-surface, .advantage-reversal-taunt, .advantage-reversal-board) {
      opacity: 1;
    }

    .advantage-reversal-scene[data-phase="floorBait"] .advantage-reversal-floor {
      animation: advantageReversalDuckIn 620ms cubic-bezier(0.65, 0, 0.35, 1) both;
    }

    /* Waiting under the table: her stockinged feet dangle and flex a little. */
    .advantage-reversal-scene[data-phase="floorBait"] .advantage-reversal-feet-up {
      animation:
        advantageReversalFloorReveal 460ms cubic-bezier(0.16, 0.84, 0.24, 1) both,
        advantageReversalFeetDangle 2600ms 460ms ease-in-out infinite;
    }

    /* The feet rush in: the view darkens round the edges, then the impact flashes and shakes. */
    .advantage-reversal-scene[data-phase="feetApproach"] .advantage-reversal-floor {
      animation: advantageReversalImpactShake 420ms 440ms linear both;
    }

    .advantage-reversal-scene[data-phase="feetApproach"]::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 19;
      pointer-events: none;
      box-shadow: inset 0 0 120px 40px rgba(26, 4, 22, 0.78);
      animation: advantageReversalApproachVignette 440ms cubic-bezier(0.55, 0, 0.75, 0.2) both;
    }

    .advantage-reversal-scene[data-phase="feetApproach"]::before,
    .advantage-reversal-scene[data-phase="sniffing"]::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 20;
      pointer-events: none;
      background: radial-gradient(circle at 50% 46%, rgba(255, 246, 251, 0.96), rgba(255, 92, 176, 0.72) 48%, rgba(120, 20, 84, 0.6) 100%);
      opacity: 0;
    }

    .advantage-reversal-scene[data-phase="feetApproach"]::before {
      animation: advantageReversalImpactFlash 460ms 400ms ease-out both;
    }

    /* Out of the flash into the sniff: the flash clears while the view settles from a push-in. */
    .advantage-reversal-scene[data-phase="sniffing"]::before {
      animation: advantageReversalSniffFlashOut 520ms ease-out both;
    }

    .advantage-reversal-scene[data-phase="sniffing"] .advantage-reversal-sniff {
      animation: advantageReversalSniffEnter 700ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
    }

    @keyframes advantageReversalFollowDrop {
      0% { translate: 0 0; }
      55% { translate: 0 -2.4%; }
      100% { translate: 0 0; }
    }

    @keyframes advantageReversalLandingBurst {
      0% { opacity: 0; transform: scale(0.4, 0.3); }
      22% { opacity: 1; transform: scale(1, 1); }
      100% { opacity: 0; transform: scale(1.25, 0.8); }
    }

    @keyframes advantageReversalDuckOut {
      0% { translate: 0 0; }
      100% { translate: 0 -100%; visibility: hidden; }
    }

    @keyframes advantageReversalDuckIn {
      0% { translate: 0 100%; }
      100% { translate: 0 0; }
    }

    @keyframes advantageReversalFeetDangle {
      0%, 100% { rotate: 0deg; translate: 0 0; }
      30% { rotate: 0.7deg; translate: 0 0.5%; }
      65% { rotate: -0.6deg; translate: 0 -0.3%; }
    }

    @keyframes advantageReversalApproachVignette {
      0% { opacity: 0; }
      100% { opacity: 1; }
    }

    @keyframes advantageReversalImpactShake {
      0% { translate: 0 0; }
      15% { translate: -1.6% 1.1%; }
      32% { translate: 1.3% -0.8%; }
      50% { translate: -0.9% 0.6%; }
      68% { translate: 0.6% -0.3%; }
      84% { translate: -0.25% 0.15%; }
      100% { translate: 0 0; }
    }

    @keyframes advantageReversalImpactFlash {
      0% { opacity: 0; }
      18% { opacity: 0.92; }
      100% { opacity: 0.3; }
    }

    @keyframes advantageReversalSniffFlashOut {
      0% { opacity: 0.3; }
      100% { opacity: 0; }
    }

    @keyframes advantageReversalSniffEnter {
      0% { scale: 1.1; }
      100% { scale: 1; }
    }

    .advantage-reversal-hint {
      position: absolute;
      left: 50%;
      bottom: 1.5%;
      z-index: 20;
      width: 54px;
      height: 44px;
      opacity: 0;
      pointer-events: none;
      translate: -50% 0;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(255, 75, 160, 0.24), transparent 68%);
      transition: opacity 160ms ease;
    }

    .advantage-reversal-hint::before,
    .advantage-reversal-hint::after {
      content: "";
      position: absolute;
      left: 50%;
      width: 13px;
      height: 13px;
      border: solid rgba(255, 239, 248, 0.96);
      border-width: 0 3px 3px 0;
      transform: translateX(-50%) rotate(45deg);
    }

    .advantage-reversal-hint::before { top: 7px; }
    .advantage-reversal-hint::after { top: 19px; }

    .advantage-reversal-hint[data-cue="down"],
    .advantage-reversal-hint[data-cue="up"] {
      opacity: 1;
      animation: advantageReversalActionCue 920ms ease-in-out infinite;
    }

    .advantage-reversal-hint[data-cue="up"]::before,
    .advantage-reversal-hint[data-cue="up"]::after {
      border-color: rgba(255, 234, 169, 0.98);
      transform: translateX(-50%) rotate(225deg);
    }

    .hostess-boob-reaction-scene {
      --art-scale: 1;
      --chest-pan-duration: 9600ms;
      position: absolute;
      inset: 0;
      z-index: 6;
      overflow: hidden;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      transform-origin: 50% 46%;
      transition:
        opacity 260ms cubic-bezier(0.22, 0.78, 0.24, 1),
        visibility 0ms linear 280ms;
    }

    .hostess-boob-reaction-scene[hidden] {
      display: none;
    }

    .hostess-boob-background-layer {
      z-index: 1;
    }

    .hostess-boob-character-slot {
      position: absolute;
      inset: 0;
      z-index: 2;
      pointer-events: none;
      transform-origin: 50% 50%;
      animation: portraitStillBreath 7.2s ease-in-out infinite;
    }

    .hostess-boob-character-layer {
      z-index: 2;
    }

    .hostess-boob-board-layer {
      z-index: 3;
    }

    .hostess-portrait.portrait-chest-reaction-active .hostess-boob-reaction-scene {
      opacity: 1;
      visibility: visible;
      transition-delay: 0ms;
    }

    .hostess-portrait.portrait-chest-reaction-active .hostess-boob-reaction-scene .hostess-layer {
      inset: 0 auto 0 -50%;
      width: 200%;
      height: 100%;
      object-position: 50% 50%;
      animation: portraitChestHorizontalPan var(--chest-pan-duration) ease-in-out infinite;
    }

    .hostess-portrait.portrait-chest-reaction-entering .hostess-boob-reaction-scene {
      animation: portraitChestSceneFlare 920ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
    }

    .hostess-board-layer {
      z-index: 4;
    }

    .hostess-art[data-fit="neutral"] {
      object-position: var(--art-object-position) !important;
      --art-x: 0%;
      --art-scale: 1.04;
    }

    .hostess-reaction-layer[data-fit="neutral"],
    .hostess-boob-taunt-layer[data-fit="neutral"],
    .hostess-losing-pressure-layer[data-fit="neutral"],
    .hostess-fatal-blunder-layer[data-fit="neutral"],
    .hostess-damage-reaction-layer[data-fit="neutral"],
    .hostess-thinking-layer[data-fit="neutral"] {
      object-position: var(--reaction-object-position, var(--art-object-position)) !important;
    }

    .hostess-ai-move-body-layer,
    .hostess-ai-move-hand-layer,
    .hostess-ai-move-press-layer {
      opacity: 0;
      visibility: hidden;
      transition:
        opacity 160ms cubic-bezier(0.22, 0.78, 0.24, 1),
        visibility 0ms linear 180ms;
    }

    .hostess-ai-move-body-layer {
      z-index: 4;
    }

    .hostess-ai-move-hand-layer {
      z-index: 5;
    }

    .hostess-ai-move-press-layer {
      z-index: 3;
    }

    .hostess-portrait.ai-move-cg-active .hostess-character-layer,
    .hostess-portrait.ai-move-cg-active .hostess-losing-pressure-layer,
    .hostess-portrait.ai-move-cg-active .hostess-reaction-layer,
    .hostess-portrait.ai-move-cg-active .hostess-boob-taunt-layer,
    .hostess-portrait.ai-move-cg-active .hostess-thinking-layer {
      opacity: 0;
      visibility: hidden;
    }

    .hostess-portrait.ai-move-cg-moving .hostess-ai-move-body-layer,
    .hostess-portrait.ai-move-cg-moving .hostess-ai-move-hand-layer,
    .hostess-portrait.ai-move-cg-pressing .hostess-ai-move-press-layer {
      opacity: 1;
      visibility: visible;
      transition-delay: 0ms;
    }

    .hostess-portrait.ai-move-cg-moving .hostess-ai-move-body-layer {
      animation: aiMoveBodyMotion 1000ms cubic-bezier(0.22, 0.78, 0.24, 1) both;
    }

    .hostess-portrait.ai-move-cg-moving .hostess-ai-move-hand-layer {
      animation: aiMoveHandReach 1000ms cubic-bezier(0.18, 0.82, 0.24, 1) both;
    }

    .hostess-portrait.ai-move-cg-pressing .hostess-ai-move-press-layer {
      animation: aiClockPress 620ms cubic-bezier(0.2, 0.86, 0.28, 1) both;
    }

    .hostess-art[data-fit="blush"] {
      object-position: 0% 44% !important;
      width: auto;
      max-width: none;
      min-width: 100%;
      left: 0;
      right: auto;
      object-fit: contain;
      --art-x: 0%;
      --art-scale: 1.1;
    }

    .hostess-art[data-fit="damage"] {
      object-position: 0% 44% !important;
      width: auto;
      max-width: none;
      min-width: 100%;
      left: 0;
      right: auto;
      object-fit: contain;
      --art-x: 0%;
      --art-scale: 1.1;
    }

    .hostess-art[data-fit="smug"] {
      object-position: 0% 42% !important;
      width: auto;
      max-width: none;
      min-width: 100%;
      left: 0;
      right: auto;
      object-fit: contain;
      --art-x: 22%;
      --art-scale: 1.1;
    }

    .hostess-art[data-fit="defeated"] {
      object-position: 0% 44% !important;
      width: auto;
      max-width: none;
      min-width: 100%;
      left: 0;
      right: auto;
      object-fit: contain;
      --art-x: -32%;
      --art-scale: 1.1;
    }

    .portrait-negative-tint {
      position: absolute;
      inset: -2%;
      z-index: 6;
      pointer-events: none;
      background:
        linear-gradient(110deg, transparent 0 22%, rgba(255, 224, 241, 0.16) 34%, rgba(255, 66, 151, 0.15) 46%, transparent 62%),
        radial-gradient(circle at 78% 24%, rgba(255, 55, 153, 0.30), transparent 7rem),
        radial-gradient(circle at 20% 74%, rgba(190, 84, 255, 0.22), transparent 9rem),
        linear-gradient(180deg, rgba(255, 70, 157, 0.12), rgba(84, 5, 60, 0.30));
      box-shadow:
        inset 0 0 56px rgba(255, 51, 145, 0.24),
        inset 0 -70px 96px rgba(255, 31, 134, 0.20);
      opacity: 0;
      transform: scale(1.015);
      transform-origin: 50% 50%;
      transition: opacity 180ms ease;
    }

    .hostess-portrait.has-active-effects .portrait-negative-tint {
      opacity: calc(0.40 + min(var(--effect-count, 1), 4) * 0.08);
    }

    .hostess-portrait.has-active-effects[data-effect-intensity="high"] {
      opacity: 0.98;
    }

    .portrait-callout {
      --callout-x: 0px;
      --callout-y: 0px;
      --callout-rotate: 0deg;
      position: absolute;
      left: 18px;
      top: 34px;
      max-height: 74%;
      max-width: 112px;
      padding: 14px 10px;
      border: 1px solid rgba(255, 255, 255, 0.25);
      border-radius: 4px;
      background: rgba(34, 38, 42, 0.58);
      color: #fff;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
      font-size: 1.02rem;
      font-weight: 700;
      line-height: 1.35;
      writing-mode: vertical-rl;
      text-orientation: upright;
      overflow: hidden;
      z-index: 7;
      pointer-events: none;
      translate: var(--callout-x) var(--callout-y);
      rotate: var(--callout-rotate);
      opacity: 0;
      visibility: hidden;
      transition: opacity 900ms ease, visibility 0ms linear 900ms, translate 220ms ease, rotate 180ms ease;
      box-shadow:
        0 0 22px rgba(255, 91, 167, 0.24),
        inset 0 0 26px rgba(255, 255, 255, 0.06);
    }

    .portrait-callout::after {
      content: "♥♥";
      color: rgba(255, 255, 255, 0.92);
      margin-block-start: 0.5rem;
    }

    html[lang="en"] .portrait-callout {
      writing-mode: horizontal-tb;
      max-width: min(16rem, 74%);
      padding: 0.55em 0.7em;
      overflow-wrap: anywhere;
    }

    .portrait-callout.right {
      left: auto;
      right: 18px;
      top: 76px;
      max-height: 68%;
      background: rgba(66, 17, 50, 0.58);
      border-color: rgba(255, 156, 200, 0.34);
      box-shadow:
        0 0 24px rgba(255, 91, 167, 0.30),
        inset 0 0 26px rgba(255, 255, 255, 0.07);
      opacity: 0;
      visibility: hidden;
      translate: calc(var(--callout-x) + 10px) var(--callout-y);
      transition: opacity 900ms ease, visibility 0ms linear 900ms, translate 220ms ease, rotate 180ms ease;
    }

    .wager-bankruptcy-dialogue.has-left-callout .portrait-callout.left,
    .hostess-portrait.has-left-callout .portrait-callout.left {
      opacity: 1;
      visibility: visible;
      translate: var(--callout-x) var(--callout-y);
      transition: opacity 180ms ease, visibility 0ms linear 0ms, translate 220ms ease, rotate 180ms ease;
    }

    .wager-bankruptcy-dialogue.has-right-callout .portrait-callout.right,
    .hostess-portrait.has-right-callout .portrait-callout.right {
      opacity: 1;
      visibility: visible;
      translate: var(--callout-x) var(--callout-y);
      transition: opacity 180ms ease, visibility 0ms linear 0ms, translate 220ms ease, rotate 180ms ease;
      transition-delay: 120ms;
    }

    .portrait-effect-badges {
      position: absolute;
      right: 16px;
      bottom: 18px;
      z-index: 9;
      display: grid;
      justify-items: end;
      gap: 6px;
      max-width: 72%;
      pointer-events: none;
    }

    .portrait-effect-badge {
      display: inline-grid;
      grid-template-columns: auto auto;
      align-items: center;
      gap: 6px;
      min-height: 30px;
      padding: 5px 9px;
      border: 1px solid rgba(255, 116, 181, 0.56);
      border-radius: 999px;
      color: #fff7fb;
      background:
        linear-gradient(180deg, rgba(255, 213, 237, 0.18), transparent 46%),
        rgba(47, 11, 34, 0.78);
      box-shadow:
        0 0 18px rgba(255, 91, 167, 0.32),
        inset 0 0 16px rgba(255, 247, 251, 0.06);
      font-size: 0.74rem;
      font-weight: 900;
      white-space: nowrap;
      animation: portraitEffectBadgeIn 220ms ease-out both;
    }

    .portrait-effect-badge::before {
      content: "";
      width: 8px;
      aspect-ratio: 1;
      border-radius: 50%;
      background: #ff5ba7;
      box-shadow:
        0 0 0 4px rgba(255, 91, 167, 0.16),
        0 0 14px rgba(255, 91, 167, 0.72);
    }

    .portrait-effect-badge[data-effect-id="pieceNameCorruption"]::before {
      background: #f0d489;
      box-shadow:
        0 0 0 4px rgba(240, 212, 137, 0.14),
        0 0 14px rgba(240, 212, 137, 0.66);
    }

    .portrait-effect-badge[data-effect-id="temptationTarget"]::before,
    .portrait-effect-badge[data-effect-id="falseOpening"]::before {
      background: #ff82c5;
    }

    .portrait-effect-badge[data-effect-id="losingPressure"] {
      border-color: rgba(183, 140, 255, 0.48);
      background:
        linear-gradient(180deg, rgba(255, 213, 237, 0.14), transparent 46%),
        rgba(28, 8, 38, 0.78);
    }

    .portrait-effect-badge[data-effect-id="losingPressure"]::before {
      background: #b78cff;
      box-shadow:
        0 0 0 4px rgba(183, 140, 255, 0.14),
        0 0 14px rgba(183, 140, 255, 0.66);
    }

    .portrait-losing-pressure-bubbles {
      position: absolute;
      inset: 0;
      z-index: 6;
      pointer-events: none;
      opacity: 0;
      transition: opacity 900ms ease;
    }

    .portrait-losing-pressure-bubbles.is-active {
      opacity: 1;
    }

    .portrait-losing-pressure-bubbles.is-fading {
      opacity: 0;
    }

    .losing-pressure-sigil {
      --voice-tilt: -5deg;
      --voice-left: 50%;
      --voice-top: 42%;
      --voice-drift-x: 7px;
      --voice-drift-y: -9px;
      --voice-sway: 1.2deg;
      position: absolute;
      left: var(--voice-left);
      top: var(--voice-top);
      max-height: 8.6em;
      padding: 0;
      border: 0;
      border-radius: 0;
      color: rgba(255, 229, 244, 0.92);
      background: transparent;
      box-shadow: none;
      font-size: clamp(0.92rem, 2.15vw, 1.18rem);
      font-weight: 900;
      line-height: 1.08;
      text-align: center;
      text-shadow:
        0 0 5px rgba(255, 91, 167, 0.86),
        0 0 14px rgba(176, 65, 212, 0.52),
        0 2px 7px rgba(15, 0, 10, 0.78);
      writing-mode: vertical-rl;
      text-orientation: upright;
      -webkit-text-stroke: 0.35px rgba(73, 0, 45, 0.72);
      rotate: var(--voice-tilt);
      opacity: 0.88;
      translate: -50% 0;
      scale: 1;
      will-change: translate, rotate, scale, opacity;
      animation: losingPressureSigilDrift 2600ms ease-in-out infinite;
      animation-delay: -420ms;
    }

    .portrait-losing-pressure-bubbles:lang(zh) .losing-pressure-sigil {
      max-height: none;
      white-space: nowrap;
      top: var(--voice-top);
    }

    :lang(en) .losing-pressure-sigil {
      writing-mode: horizontal-tb;
      text-orientation: mixed;
      width: max-content;
      max-width: 10em;
      max-height: none;
      line-height: 1.2;
    }

    .losing-pressure-sigil:nth-child(2) {
      --voice-drift-x: -8px;
      --voice-drift-y: -6px;
      --voice-sway: -1deg;
      animation-duration: 3100ms;
      animation-delay: -1760ms;
    }

    .losing-pressure-sigil::before,
    .losing-pressure-sigil::after {
      content: "";
      display: none;
    }

    @keyframes losingPressureSigilDrift {
      0%, 100% {
        opacity: 0.68;
        translate: -50% 2px;
        rotate: var(--voice-tilt);
        scale: 0.96;
      }
      38% {
        opacity: 1;
        translate: calc(-50% + var(--voice-drift-x)) var(--voice-drift-y);
        rotate: calc(var(--voice-tilt) + var(--voice-sway));
        scale: 1.05;
      }
      72% {
        opacity: 0.84;
        translate: calc(-50% - 3px) -3px;
        rotate: calc(var(--voice-tilt) - 0.45deg);
        scale: 1.01;
      }
    }

    .losing-pressure-board-wall {
      position: absolute;
      inset: -8% -18%;
      z-index: 0;
      overflow: hidden;
      pointer-events: none;
      opacity: var(--pressure-wall-opacity);
      transform: rotate(-10deg);
      mix-blend-mode: normal;
      contain: layout paint style;
    }

    .losing-pressure-board-row {
      position: absolute;
      left: -22%;
      top: var(--row-y);
      width: 164%;
      display: block;
      contain: layout paint style;
      color: var(--pressure-word-primary);
      font-family: Impact, Haettenschweiler, "Arial Black", "Arial Narrow", "Noto Sans TC", "Microsoft JhengHei UI", sans-serif;
      font-size: clamp(1.2rem, 3vw, 2.65rem);
      font-weight: 1000;
      font-stretch: condensed;
      line-height: 0.82;
      white-space: nowrap;
      text-transform: uppercase;
      -webkit-text-stroke: 0.34px var(--pressure-word-stroke);
      paint-order: stroke fill;
      text-shadow: 0 0 5px var(--pressure-word-glow);
      transform: translate3d(0, 0, 0);
      animation: losingPressureBoardMarquee var(--row-speed, 12000ms) linear infinite;
      animation-delay: var(--row-delay, 0ms);
    }

    .losing-pressure-board-row:nth-child(2n) {
      color: var(--pressure-word-secondary);
    }

    .losing-pressure-board-row:nth-child(2n) {
      animation-direction: reverse;
    }

    .losing-pressure-board-row:nth-child(3n) {
      text-shadow:
        0 0 6px var(--pressure-word-glow),
        0 0 14px var(--pressure-word-glow);
    }

    .hostess-portrait::after {
      content: "";
      position: absolute;
      inset: auto 12% 0;
      height: 34%;
      border-radius: 46% 46% 0 0;
      background: linear-gradient(180deg, rgba(255, 91, 167, 0.18), rgba(112, 214, 178, 0.06));
      opacity: 0.65;
      z-index: 1;
    }

    .hostess-figure {
      position: absolute;
      left: 50%;
      bottom: 0;
      width: 280px;
      height: 390px;
      transform: translateX(-50%) translateY(8px);
      transform-origin: 50% 85%;
      transition: transform 220ms ease;
      z-index: 2;
    }

    .hair-back {
      position: absolute;
      left: 34px;
      top: 18px;
      width: 212px;
      height: 268px;
      border-radius: 48% 48% 38% 38%;
      background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.15), transparent 28%, rgba(24, 15, 44, 0.45) 68%),
        linear-gradient(180deg, #7f49d9, #4b2575 52%, #241831);
      box-shadow: 0 16px 38px rgba(46, 24, 84, 0.62);
    }

    .neck {
      position: absolute;
      left: 118px;
      top: 168px;
      width: 44px;
      height: 72px;
      border-radius: 18px;
      background: linear-gradient(180deg, #f5c6c2, #d7929b);
      z-index: 3;
    }

    .face {
      position: absolute;
      left: 78px;
      top: 54px;
      width: 124px;
      height: 136px;
      border-radius: 46% 46% 48% 48%;
      background: linear-gradient(180deg, #ffd9d2, #f0a8ad);
      box-shadow: inset 0 -12px 20px rgba(149, 54, 83, 0.16);
      z-index: 5;
      transition: transform 220ms ease;
    }

    .bangs {
      position: absolute;
      left: 72px;
      top: 30px;
      width: 136px;
      height: 82px;
      border-radius: 50% 50% 38% 36%;
      background:
        linear-gradient(110deg, transparent 62%, rgba(255, 255, 255, 0.16) 64%, transparent 78%),
        linear-gradient(180deg, #8c51e6, #5a2d91);
      clip-path: polygon(0 0, 100% 0, 94% 76%, 75% 48%, 58% 100%, 45% 52%, 28% 92%, 13% 48%);
      z-index: 7;
    }

    .eye {
      position: absolute;
      top: 72px;
      width: 28px;
      height: 12px;
      border-radius: 50%;
      background: var(--host-eye);
      box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22) inset;
      transition: transform 180ms ease;
    }

    .eye.left {
      left: 25px;
    }

    .eye.right {
      right: 25px;
    }

    .eye::after {
      content: "";
      position: absolute;
      right: 5px;
      top: 2px;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.82);
    }

    .brow {
      position: absolute;
      top: 58px;
      width: 32px;
      height: 4px;
      border-radius: 999px;
      background: #4b235b;
      transition: transform 180ms ease;
    }

    .brow.left {
      left: 22px;
      transform: rotate(-8deg);
    }

    .brow.right {
      right: 22px;
      transform: rotate(8deg);
    }

    .mouth {
      position: absolute;
      left: 50%;
      top: 103px;
      width: 30px;
      height: 13px;
      border-radius: 0 0 999px 999px;
      border-bottom: 4px solid var(--host-mouth);
      transform: translateX(-50%);
      transition: transform 180ms ease;
    }

    .cheek {
      position: absolute;
      top: 92px;
      width: 26px;
      height: 11px;
      border-radius: 50%;
      background: rgba(255, 91, 167, 0.42);
      opacity: 0.38;
      transition: opacity 180ms ease, transform 180ms ease;
    }

    .cheek.left {
      left: 15px;
    }

    .cheek.right {
      right: 15px;
    }

    .torso {
      position: absolute;
      left: 44px;
      top: 204px;
      width: 192px;
      height: 178px;
      border-radius: 48% 48% 8px 8px;
      background:
        linear-gradient(180deg, rgba(255, 156, 200, 0.18), transparent 34%),
        linear-gradient(135deg, #453545, #28212b);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
      z-index: 2;
    }

    .collar {
      position: absolute;
      left: 102px;
      top: 204px;
      width: 76px;
      height: 52px;
      border-radius: 0 0 22px 22px;
      background: linear-gradient(180deg, #231923, #392038);
      z-index: 4;
    }

    .bow {
      position: absolute;
      left: 101px;
      top: 216px;
      width: 78px;
      height: 34px;
      z-index: 5;
    }

    .bow::before,
    .bow::after {
      content: "";
      position: absolute;
      top: 3px;
      width: 34px;
      height: 28px;
      border-radius: 50% 12% 50% 12%;
      background: linear-gradient(135deg, #ff62ad, #8d5cff);
      box-shadow: 0 0 18px rgba(255, 91, 167, 0.5);
    }

    .bow::before {
      left: 0;
      transform: rotate(18deg);
    }

    .bow::after {
      right: 0;
      transform: rotate(-18deg) scaleX(-1);
    }

    .bow-knot {
      position: absolute;
      left: 32px;
      top: 10px;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--gold-soft);
      box-shadow: 0 0 12px rgba(240, 212, 137, 0.58);
    }

    .arm {
      position: absolute;
      top: 278px;
      width: 96px;
      height: 30px;
      border-radius: 999px;
      background: linear-gradient(90deg, #f3b8b2, #d68c99);
      z-index: 6;
    }

    .arm.left {
      left: 24px;
      transform: rotate(-16deg);
    }

    .arm.right {
      right: 25px;
      transform: rotate(16deg);
    }

    .heart-burst {
      pointer-events: none;
      position: absolute;
      inset: 0;
      z-index: 9;
    }

    .heart-burst span {
      position: absolute;
      left: var(--heart-x);
      top: var(--heart-y);
      color: var(--heart-color);
      font-size: var(--heart-size);
      opacity: 0.68;
      text-shadow:
        0 0 12px rgba(255, 91, 167, 0.78),
        0 0 22px rgba(188, 112, 255, 0.42);
      transform: translate(-50%, -50%) scale(var(--heart-scale, 1)) rotate(var(--heart-tilt, -4deg));
    }

    .heart-burst span:nth-child(1) {
      --heart-x: 72%;
      --heart-y: 14%;
      --heart-size: 1.9rem;
      --heart-color: #ff6fc4;
      --heart-scale: 0.92;
      --heart-tilt: -6deg;
      --heart-drift-x: 15px;
      --heart-drift-y: -22px;
      animation-delay: -400ms;
    }

    .heart-burst span:nth-child(2) {
      --heart-x: 18%;
      --heart-y: 38%;
      --heart-size: 1.25rem;
      --heart-color: #c783ff;
      --heart-scale: 0.84;
      --heart-tilt: 8deg;
      --heart-drift-x: -12px;
      --heart-drift-y: -18px;
      animation-delay: -1200ms;
    }

    .heart-burst span:nth-child(3) {
      --heart-x: 84%;
      --heart-y: 54%;
      --heart-size: 1.1rem;
      --heart-color: #ff8ed8;
      --heart-scale: 0.78;
      --heart-tilt: -10deg;
      --heart-drift-x: 13px;
      --heart-drift-y: -20px;
      animation-delay: -2100ms;
    }

    .heart-burst span:nth-child(4) {
      --heart-x: 11%;
      --heart-y: 74%;
      --heart-size: 0.95rem;
      --heart-color: #ff78c8;
      --heart-scale: 0.74;
      --heart-tilt: 7deg;
      --heart-drift-x: 14px;
      --heart-drift-y: -24px;
      animation-delay: -2700ms;
    }

    .heart-burst span:nth-child(5) {
      --heart-x: 61%;
      --heart-y: 29%;
      --heart-size: 0.82rem;
      --heart-color: #d591ff;
      --heart-scale: 0.7;
      --heart-tilt: -8deg;
      --heart-drift-x: -10px;
      --heart-drift-y: -16px;
      animation-delay: -1700ms;
    }

    .hostess-portrait[data-emotion="neutral"] {
      --host-glow: rgba(255, 156, 200, 0.42);
      --host-accent: #ff9cc8;
      --host-mouth: #9b244d;
      --host-eye: #43264e;
    }

    .hostess-portrait[data-emotion="confident"],
    .hostess-portrait[data-emotion="tease"] {
      --host-glow: rgba(255, 91, 167, 0.72);
      --host-accent: #ff5ba7;
      --host-mouth: #7f1742;
      --host-eye: #2d163c;
    }

    .hostess-portrait[data-emotion="smile"] {
      --host-glow: rgba(240, 212, 137, 0.58);
      --host-accent: #f0d489;
      --host-mouth: #9b244d;
      --host-eye: #3c274b;
    }

    .hostess-portrait[data-emotion="blush"],
    .hostess-portrait[data-emotion="shy_impressed"],
    .hostess-portrait[data-emotion="flustered_defeated"] {
      --host-glow: rgba(255, 116, 157, 0.82);
      --host-accent: #ff6f9d;
      --host-mouth: #c23669;
      --host-eye: #593055;
    }

    .hostess-portrait[data-emotion="surprised"],
    .hostess-portrait[data-emotion="worried"],
    .hostess-portrait[data-emotion="nervous"] {
      --host-glow: rgba(112, 214, 178, 0.6);
      --host-accent: #70d6b2;
      --host-mouth: #7d334d;
      --host-eye: #244940;
    }

    .hostess-portrait[data-emotion="annoyed"],
    .hostess-portrait[data-emotion="proud"],
    .hostess-portrait[data-emotion="intense"],
    .hostess-portrait[data-emotion="smug_victory"] {
      --host-glow: rgba(141, 92, 255, 0.78);
      --host-accent: #b48cff;
      --host-mouth: #62206e;
      --host-eye: #28153a;
    }

    .hostess-portrait[data-emotion="tease"] .eye.left {
      height: 7px;
      transform: translateY(2px) rotate(-7deg);
    }

    .hostess-portrait[data-emotion="tease"] .mouth,
    .hostess-portrait[data-emotion="confident"] .mouth,
    .hostess-portrait[data-emotion="proud"] .mouth,
    .hostess-portrait[data-emotion="smug_victory"] .mouth {
      width: 36px;
      height: 10px;
      border-bottom-width: 5px;
      transform: translateX(-50%) rotate(-4deg);
    }

    .hostess-portrait[data-emotion="smile"] .mouth {
      width: 42px;
      height: 17px;
      border-bottom-width: 5px;
    }

    .hostess-portrait[data-emotion="blush"] .cheek,
    .hostess-portrait[data-emotion="shy_impressed"] .cheek,
    .hostess-portrait[data-emotion="flustered_defeated"] .cheek {
      opacity: 0.95;
      transform: scale(1.22);
    }

    .hostess-portrait[data-emotion="surprised"] .eye {
      height: 24px;
      border-radius: 50%;
    }

    .hostess-portrait[data-emotion="surprised"] .mouth,
    .hostess-portrait[data-emotion="worried"] .mouth,
    .hostess-portrait[data-emotion="nervous"] .mouth {
      width: 18px;
      height: 18px;
      border: 3px solid var(--host-mouth);
      border-radius: 50%;
      background: rgba(92, 35, 58, 0.2);
    }

    .hostess-portrait[data-emotion="annoyed"] .brow.left,
    .hostess-portrait[data-emotion="intense"] .brow.left,
    .hostess-portrait[data-emotion="smug_victory"] .brow.left {
      transform: rotate(12deg);
    }

    .hostess-portrait[data-emotion="annoyed"] .brow.right,
    .hostess-portrait[data-emotion="intense"] .brow.right,
    .hostess-portrait[data-emotion="smug_victory"] .brow.right {
      transform: rotate(-12deg);
    }

    .hostess-portrait[data-emotion="worried"] .brow.left,
    .hostess-portrait[data-emotion="nervous"] .brow.left,
    .hostess-portrait[data-emotion="flustered_defeated"] .brow.left {
      transform: rotate(-22deg) translateY(-2px);
    }

    .hostess-portrait[data-emotion="worried"] .brow.right,
    .hostess-portrait[data-emotion="nervous"] .brow.right,
    .hostess-portrait[data-emotion="flustered_defeated"] .brow.right {
      transform: rotate(22deg) translateY(-2px);
    }

    .hostess-portrait[data-emotion="shy_impressed"] .hostess-figure,
    .hostess-portrait[data-emotion="flustered_defeated"] .hostess-figure {
      transform: translateX(-50%) translateY(10px) rotate(-2deg);
    }

    .hostess-portrait[data-emotion="intense"] .hostess-figure,
    .hostess-portrait[data-emotion="smug_victory"] .hostess-figure {
      transform: translateX(-50%) translateY(5px) rotate(1.5deg) scale(1.02);
    }

    .hostess-portrait.pulse .hostess-art {
      animation: imagePulse 420ms ease;
    }

    .damage-overlay {
      position: absolute;
      inset: 0;
      z-index: 10;
      pointer-events: none;
      overflow: hidden;
      opacity: 0;
      background:
        radial-gradient(circle at 52% 42%, rgba(255, 255, 255, 0.42), transparent 18rem),
        radial-gradient(circle at 50% 48%, rgba(255, 42, 112, 0.38), transparent 24rem);
      mix-blend-mode: normal;
    }

    .damage-overlay::before {
      content: "";
      position: absolute;
      inset: -18% -34%;
      background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.78) 48%, transparent 62%);
      opacity: 0;
      transform: translateX(-42%) skewX(-14deg);
    }

    .damage-ring {
      position: absolute;
      left: 50%;
      top: 48%;
      width: min(54%, 340px);
      aspect-ratio: 1;
      border: 3px solid rgba(255, 240, 249, 0.9);
      border-radius: 50%;
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.36);
      box-shadow:
        0 0 26px rgba(255, 91, 167, 0.95),
        inset 0 0 26px rgba(255, 91, 167, 0.52);
    }

    .damage-slash {
      position: absolute;
      left: 12%;
      top: 41%;
      width: 76%;
      height: 12px;
      border-radius: 999px;
      opacity: 0;
      transform: rotate(-18deg) scaleX(0);
      transform-origin: left center;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.96), rgba(255, 76, 134, 0.92), transparent);
      box-shadow:
        0 0 18px rgba(255, 255, 255, 0.62),
        0 0 30px rgba(255, 42, 112, 0.82);
    }

    .damage-spark {
      position: absolute;
      color: #fff2fb;
      font-weight: 900;
      font-size: clamp(1.25rem, 3vw, 2.35rem);
      text-shadow:
        0 0 12px rgba(255, 255, 255, 0.9),
        0 0 22px rgba(255, 42, 112, 0.95);
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5);
    }

    .damage-spark.spark-a {
      left: 36%;
      top: 34%;
    }

    .damage-spark.spark-b {
      left: 66%;
      top: 45%;
    }

    .damage-spark.spark-c {
      left: 48%;
      top: 22%;
    }

    .hostess-portrait.damage-hit {
      animation: portraitHitShake 520ms cubic-bezier(0.32, 0.02, 0.18, 1);
    }

    .hostess-portrait.damage-hit .hostess-art {
      animation: imageHitShake 620ms cubic-bezier(0.32, 0.02, 0.18, 1);
    }

    .hostess-portrait.damage-hit .damage-overlay {
      mix-blend-mode: screen;
      animation: damageOverlayFlash 820ms ease-out both;
    }

    .hostess-portrait.damage-hit .damage-overlay::before {
      animation: damageSweep 540ms ease-out both;
    }

    .hostess-portrait.damage-hit .damage-ring {
      animation: damageRingPop 780ms ease-out both;
    }

    .hostess-portrait.damage-hit .damage-slash {
      animation: damageSlash 520ms ease-out both;
    }

    .hostess-portrait.damage-hit .damage-spark {
      animation: damageSpark 700ms ease-out both;
    }

    .hostess-portrait.damage-hit .damage-spark.spark-b {
      animation-delay: 70ms;
    }

    .hostess-portrait.damage-hit .damage-spark.spark-c {
      animation-delay: 120ms;
    }

    .dialogue-box {
      --dialogue-x: 0px;
      --dialogue-y: 0px;
      --dialogue-rotate: 0deg;
      min-height: 0;
      height: 100%;
      border: 1px solid rgba(255, 116, 181, 0.46);
      border-radius: 8px;
      padding: 10px 14px;
      display: none;
      align-content: center;
      position: relative;
      overflow: hidden;
      background:
        radial-gradient(circle at 12% 20%, rgba(255, 91, 167, 0.18), transparent 18rem),
        linear-gradient(135deg, rgba(58, 28, 57, 0.62), rgba(31, 18, 34, 0.62)),
        linear-gradient(90deg, rgba(255, 91, 167, 0.13), transparent);
      background-color: rgba(31, 18, 34, 0.66);
      box-shadow:
        inset 0 0 28px rgba(255, 91, 167, 0.14),
        0 0 24px rgba(255, 67, 154, 0.10);
      color: #fff6fb;
      font-size: 1rem;
      line-height: 1.45;
      translate: var(--dialogue-x) var(--dialogue-y);
      rotate: var(--dialogue-rotate);
      transition: opacity 180ms ease, transform 180ms ease;
    }

    .dialogue-box::before {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.16) 48%, transparent 100%);
      opacity: 0;
      transform: translateX(-100%);
      pointer-events: none;
    }

    .dialogue-box.dialogue-enter {
      animation: dialogueFadeIn 420ms ease both;
    }

    .dialogue-box.dialogue-enter::before {
      animation: dialogueShimmer 680ms ease both;
    }

    .dialogue-box.dialogue-typing {
      box-shadow:
        inset 0 0 34px rgba(255, 91, 167, 0.20),
        0 0 30px rgba(255, 67, 154, 0.16);
    }

    .dialogue-box.dialogue-typing::after {
      content: "";
      display: inline-block;
      width: 0.55em;
      height: 1.18em;
      margin-left: 0.18em;
      border-right: 2px solid rgba(255, 214, 238, 0.95);
      vertical-align: -0.18em;
    }

    .choice-overlay {
      position: fixed;
      inset: 0;
      z-index: 2200;
      display: none;
      align-items: center;
      justify-content: center;
      padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
      background: rgba(14, 6, 14, 0.76);
    }

    @media (min-width: 961px) {
      .choice-overlay {
        align-items: center;
        justify-content: center;
        background:
          linear-gradient(180deg, rgba(14, 6, 14, 0.72), rgba(14, 6, 14, 0.58));
        pointer-events: auto;
      }

      .choice-panel {
        width: min(100%, 560px);
      }
    }

    .choice-overlay.is-open {
      display: flex;
    }

    .choice-overlay.is-open .choice-panel {
      animation: choiceTrapPulse 420ms cubic-bezier(0.18, 0.86, 0.22, 1.08) both;
      transform-origin: 50% 50%;
    }

    .choice-panel {
      width: 100%;
      max-width: 560px;
      border: 1px solid rgba(255, 126, 186, 0.62);
      border-radius: 8px;
      background:
        radial-gradient(circle at 8% 0%, rgba(255, 91, 167, 0.20), transparent 16rem),
        linear-gradient(180deg, rgba(72, 12, 43, 0.96), rgba(30, 8, 24, 0.98));
      box-shadow:
        0 18px 60px rgba(0, 0, 0, 0.46),
        0 0 28px rgba(255, 91, 167, 0.20);
      padding: 16px;
      position: relative;
      overflow: hidden;
    }

    .choice-panel::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(108deg, transparent 0 34%, rgba(255, 238, 248, 0.18) 42%, rgba(255, 91, 167, 0.10) 48%, transparent 58%),
        repeating-linear-gradient(90deg, rgba(255, 116, 181, 0.08) 0 1px, transparent 1px 16px);
      opacity: 0;
      animation: choiceTrapSweep 820ms ease-out both;
    }

    .choice-panel > * {
      position: relative;
      z-index: 1;
    }

    .choice-speaker {
      color: var(--rose-soft);
      font-size: 0.82rem;
      margin-bottom: 8px;
    }

    .choice-line {
      color: #fff7fb;
      font-size: 1.08rem;
      line-height: 1.5;
      margin-bottom: 14px;
    }

    .choice-options {
      display: grid;
      gap: 8px;
    }

    .choice-option {
      min-height: 42px;
      border: 1px solid rgba(255, 156, 200, 0.42);
      border-radius: 8px;
      background: rgba(255, 91, 167, 0.14);
      color: #fff7fb;
      cursor: pointer;
      animation: choiceOptionEnter 360ms cubic-bezier(0.18, 0.86, 0.22, 1.08) both;
      animation-delay: calc(var(--choice-index, 0) * 64ms);
    }

    .choice-option:hover,
    .choice-option:focus-visible {
      background: rgba(255, 91, 167, 0.28);
      outline: 2px solid rgba(255, 156, 200, 0.48);
    }

    .meta-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .metric {
      border: 1px solid rgba(240, 212, 137, 0.24);
      border-radius: 8px;
      padding: 7px 9px;
      min-height: 50px;
      background: rgba(30, 23, 32, 0.66);
    }

    .metric-label {
      display: block;
      color: rgba(255, 247, 251, 0.68);
      font-size: 0.74rem;
      margin-bottom: 2px;
    }

    .metric-value {
      display: block;
      color: var(--gold-soft);
      font-size: 0.92rem;
      line-height: 1.3;
    }

    .controls {
      display: none;
    }

    .action-button {
      min-height: 34px;
      border: 1px solid rgba(255, 156, 200, 0.35);
      border-radius: 8px;
      color: #fff7fb;
      background:
        linear-gradient(180deg, rgba(255, 213, 237, 0.18), transparent 44%),
        linear-gradient(135deg, rgba(255, 91, 167, 0.48), rgba(141, 92, 255, 0.34));
      padding: 6px 12px;
      cursor: pointer;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -10px 18px rgba(89, 24, 74, 0.28),
        0 0 18px rgba(255, 91, 167, 0.20);
      text-shadow: 0 1px 8px rgba(255, 214, 238, 0.42);
    }

    .action-button:hover,
    .action-button:focus-visible,
    .hostess-portrait:hover,
    .hostess-portrait:focus-visible {
      outline: 2px solid rgba(240, 212, 137, 0.88);
      outline-offset: 2px;
    }

    .controls .qa-toggle {
      display: none;
    }

    /* A compact play-through sheet in the game's plum, rose and warm-gold palette. */
    .qa-panel {
      display: none;
      position: fixed;
      z-index: 12000;
      right: 20px;
      top: 50%;
      transform: translateY(-50%);
      width: min(420px, calc(100vw - 32px));
      height: min(784px, calc(100dvh - 32px));
      min-height: 0;
      grid-template-rows: auto auto minmax(0, 1fr) auto;
      overflow: hidden;
      border: 1px solid #dc99b766;
      border-radius: 14px 4px 14px 4px;
      background: radial-gradient(ellipse at 100% 0%, #99397338, transparent 48%), linear-gradient(150deg, #30172f, #1a0d23 65%, #251026);
      color: #f9dfeb;
      box-shadow: 0 24px 70px #090211a8, inset 0 1px #f5c3db24;
      font-family: inherit;
    }
    .qa-panel.open { display: grid; animation: qaPanelEnter 80ms ease-out; }
    .qa-panel.qa-panel-exit { display: grid; pointer-events: none; }
    @keyframes qaPanelEnter {
      from { opacity: 0; transform: translateY(calc(-50% + 6px)); }
      to { opacity: 1; transform: translateY(-50%); }
    }
    .qa-panel [hidden] { display: none !important; }
    .qa-panel-header { display: flex; align-items: center; gap: 12px; padding: 20px 20px 14px; }
    .qa-emblem { display: grid; place-items: center; width: 42px; height: 48px; flex: 0 0 auto; color: #efc58d; }
    .qa-emblem svg { width: 36px; height: 36px; stroke: currentColor; stroke-width: 1.2; }
    .qa-panel-title { display: grid; gap: 6px; flex: 1; }
    .qa-panel-title strong { font-size: 1.15rem; font-weight: 650; letter-spacing: .16em; color: #ffe3f0; }
    .qa-panel-title > span { color: #c996b5; font-size: .56rem; letter-spacing: .24em; }
    .qa-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: 0 0 auto; border: 0; background: transparent; color: #d5a9c5; font-size: 1.5rem; cursor: pointer; }
    .qa-session { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 20px; padding: 0 0 14px; border-bottom: 1px solid #dc9ab72e; }
    .qa-cash-display { color: #f0ce9c; font: 500 1.55rem/1.2 Georgia, serif; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
    .qa-session [data-testid="qa-session-status"] { flex: 0 0 auto; color: #d1a7c5; font-size: .68rem; }
    .qa-scroll.qa-actions { display: block; min-height: 0; overflow: auto; padding: 18px 20px 4px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #965377 transparent; }
    .qa-section { position: relative; display: block; padding: 0 0 18px 34px; border: 0; border-radius: 0; background: none; }
    .qa-section::before { content: ""; position: absolute; left: 12px; top: 29px; bottom: 4px; width: 1px; background: linear-gradient(#c489a354, #c489a31c); }
    .qa-section:last-of-type::before { display: none; }
    .qa-section:last-of-type { padding-bottom: 8px; }
    .qa-section-title { margin: 0 0 9px; color: #f5cce3; font-size: .79rem; font-weight: 600; letter-spacing: .08em; line-height: 26px; }
    .qa-section-title::after { content: none; }
    .qa-step-number { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #c394a84d; border-radius: 50%; color: #bd93ae; font: .65rem/1 Georgia, serif; letter-spacing: 0; background: #28132d; }
    .qa-section[data-current="true"] .qa-step-number { color: #ffe0f0; border-color: #e692bd; background: #723255; box-shadow: 0 0 14px #f17db83b; }
    .qa-step-body { display: grid; gap: 7px; }
    .qa-control-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; gap: 8px; }
    .qa-actions button { min-height: 44px; padding: 9px 10px; border: 1px solid #d08bae50; border-radius: 5px; background: #ce77a60a; color: #f0cde2; font: inherit; font-size: .74rem; line-height: 1.4; text-align: center; white-space: normal; overflow-wrap: anywhere; cursor: pointer; box-shadow: inset 0 1px #ffd2e90a; }
    .qa-actions button span[aria-hidden] { margin-left: 4px; color: #e8bace; }
    .qa-actions .qa-primary { color: #ffe8f5; background: linear-gradient(120deg, #a04379, #733c89); border-color: #ed8bc07a; box-shadow: inset 0 1px #f8b5de2b, 0 3px 14px #08010c30; }
    .qa-actions input, .qa-actions select { width: 100%; min-width: 0; min-height: 44px; padding: 9px 10px; border: 1px solid #c58aaa36; border-radius: 5px; background: #140b1c75; color: #efd4e6; font-family: inherit; font-size: .74rem; color-scheme: dark; box-sizing: border-box; }
    .qa-actions select { cursor: pointer; }
    .qa-money-field { display: flex; align-items: center; gap: 6px; min-width: 0; padding-left: 10px; border: 1px solid #c58aaa36; border-radius: 5px; background: #140b1c75; color: #e3b98b; }
    .qa-money-field input { padding-left: 0; border: 0; background: transparent; font-variant-numeric: tabular-nums; }
    .qa-cash-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .qa-cash-presets button { padding-inline: 3px; min-height: 44px; color: #d9b2ce; font-size: .65rem; border-color: #b87c9e29; background: #ffffff03; }
    .qa-actions .qa-danger { color: var(--rose-soft); border-color: var(--host-mouth); background: linear-gradient(90deg, #9b244d20, transparent); }
    .qa-actions .qa-danger[data-wipe-armed="true"] { color: var(--paper); border-color: var(--rose); background-color: var(--host-mouth); }
    .qa-actions .qa-next { color: #e1b9d4; border-style: dashed; background: transparent; }
    .qa-panel :is(button, input, select) {
      transition: border-color 120ms ease, background-color 120ms ease, transform 80ms ease;
    }
    @media (hover: hover) and (pointer: fine) {
      .qa-panel :is(button, input, select):not(:disabled):hover {
        color: #fff0da;
        border-color: var(--ui-brass, #bc9b61);
        background-color: #bc9b6124;
        box-shadow: inset 0 0 0 1px #bc9b6130, 0 0 10px #bc9b6126;
      }
      .qa-panel .qa-primary:not(:disabled):hover { background: linear-gradient(120deg, #78583b, #62432f); }
      .qa-panel .qa-danger:not(:disabled):hover {
        color: #ffe0e1; border-color: #d96a75; background-color: #9b244d45;
        box-shadow: inset 0 0 0 1px #d96a7530, 0 0 10px #d96a7530;
      }
    }
    .qa-panel :is(button, input, select):not(:disabled):active { transform: translateY(1px) scale(.96); }
    .qa-panel :is(button, input, select):focus-visible { outline: 2px solid var(--ui-brass, #bc9b61); outline-offset: -3px; }
    .qa-actions button[data-qa-state="running"] { cursor: progress; opacity: .6; }
    .qa-panel :is(button, input, select):disabled { cursor: wait; opacity: .45; }
    .qa-result-area { padding: 11px 20px; border-top: 1px solid #dc9ab72e; background: #0d071647; }
    .qa-result-area p { margin: 0; color: #b78fab; font-size: .65rem; line-height: 1.6; overflow-wrap: anywhere; }
    .qa-result-area p[data-state="pass"] { color: #dbbce2; }
    .qa-result-area p[data-state="fail"], .qa-result-area p[data-state="blocked"] { color: #f5b2c7; }
    @media (max-width: 600px) {
      .qa-panel { right: 8px; width: calc(100vw - 16px); height: min(784px, calc(100dvh - 16px)); }
      .qa-panel-header { padding: 14px 16px 10px; }
      .qa-session { margin-inline: 16px; }
      .qa-scroll.qa-actions { padding: 14px 16px 4px; }
      .qa-control-row { grid-template-columns: minmax(0, 1fr) 94px; }
      .qa-section { padding-left: 32px; }
      .qa-cash-presets button { font-size: .62rem; }
    }
    @media (max-height: 500px) {
      .qa-panel-header { padding-block: 5px; }
      .qa-emblem { height: 38px; }
      .qa-panel-title > span { display: none; }
      .qa-session { padding-bottom: 8px; }
      .qa-cash-display { font-size: 1.1rem; }
    }

    .cheat-director-debug {
      display: grid;
      gap: 7px;
      padding: 10px;
      border-bottom: 1px solid rgba(240, 212, 137, 0.18);
      background:
        radial-gradient(circle at 12% 0%, rgba(255, 91, 167, 0.20), transparent 44%),
        rgba(10, 6, 14, 0.34);
      color: rgba(255, 247, 251, 0.88);
      font-size: 0.72rem;
      line-height: 1.25;
    }

    .cheat-director-debug strong,
    .cheat-director-debug b {
      color: #fff7fb;
      font-weight: 900;
    }

    .cheat-director-topline,
    .cheat-director-kv,
    .cheat-director-next {
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: center;
      gap: 8px;
    }

    .cheat-director-topline {
      font-size: 0.78rem;
    }

    .cheat-director-pill {
      border: 1px solid rgba(240, 212, 137, 0.38);
      border-radius: 999px;
      padding: 3px 8px;
      color: #f0d489;
      background: rgba(240, 212, 137, 0.10);
      font-variant-numeric: tabular-nums;
    }

    .cheat-director-pressure {
      position: relative;
      height: 8px;
      overflow: hidden;
      border-radius: 999px;
      border: 1px solid rgba(255, 156, 200, 0.26);
      background: rgba(255, 247, 251, 0.08);
    }

    .cheat-director-pressure::before {
      content: "";
      display: block;
      width: var(--pressure, 0%);
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #ff5ba7, #f0d489);
      box-shadow: 0 0 14px rgba(255, 91, 167, 0.46);
      transition: width 180ms ease;
    }

    .cheat-director-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 5px;
    }

    .cheat-director-kv {
      min-height: 26px;
      border: 1px solid rgba(255, 156, 200, 0.18);
      border-radius: 6px;
      padding: 4px 6px;
      background: rgba(255, 255, 255, 0.04);
      min-width: 0;
    }

    .cheat-director-kv b,
    .cheat-director-next b {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .cheat-director-kv span,
    .cheat-director-next span,
    .cheat-director-history-title {
      color: rgba(255, 247, 251, 0.56);
    }

    .cheat-director-next {
      border: 1px solid rgba(240, 212, 137, 0.25);
      border-radius: 6px;
      padding: 6px 7px;
      background: rgba(240, 212, 137, 0.08);
    }

    .cheat-director-history {
      display: grid;
      gap: 3px;
    }

    .cheat-director-history-row {
      display: grid;
      grid-template-columns: 42px 1fr;
      gap: 6px;
      color: rgba(255, 247, 251, 0.74);
      font-variant-numeric: tabular-nums;
    }

    .cheat-director-history-empty {
      color: rgba(255, 247, 251, 0.46);
    }

    .board-panel {
      --board-stage-width: clamp(620px, calc((min(720px, 100vh) - 74px) * 0.9 + 80px), 670px);
      padding: 8px;
      width: var(--board-stage-width);
      max-width: 100%;
      justify-self: center;
      display: grid;
      grid-template-rows: 52px minmax(0, 1fr);
      gap: 6px;
      align-content: stretch;
      min-height: 0;
    }

    .board-panel.has-active-effects {
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 91, 167, 0.24),
        0 0 36px rgba(255, 67, 154, 0.20);
    }

    .board-panel.has-active-effects::before {
      content: "";
      position: absolute;
      inset: 8px;
      z-index: 0;
      pointer-events: none;
      border-radius: 8px;
      background:
        linear-gradient(110deg, transparent 0 28%, rgba(255, 238, 248, 0.12) 35%, rgba(255, 91, 167, 0.07) 42%, transparent 50%),
        radial-gradient(circle at 52% 16%, rgba(255, 91, 167, 0.18), transparent 8rem),
        linear-gradient(180deg, rgba(255, 91, 167, 0.035), transparent 50%, rgba(183, 140, 255, 0.05));
      opacity: calc(0.22 + min(var(--effect-count, 1), 4) * 0.08);
      mix-blend-mode: screen;
    }

    .board-panel.has-active-effects[data-effect-intensity="high"] {
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 91, 167, 0.34),
        0 0 48px rgba(255, 67, 154, 0.30);
    }

    .board-panel.cheat-declaration-active {
      animation: cheatDeclarationPanelImpact 980ms cubic-bezier(0.18, 0.86, 0.22, 1) both;
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 212, 236, 0.42),
        0 0 52px rgba(255, 42, 132, 0.34);
      transform-origin: center;
    }

    .board-panel.cheat-declaration-active[data-cheat-declaration-kind="time"] {
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 232, 245, 0.46),
        0 0 54px rgba(183, 140, 255, 0.34);
    }

    .board-panel.cheat-declaration-active[data-cheat-declaration-kind="revive"] {
      box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 217, 184, 0.40),
        0 0 54px rgba(255, 91, 167, 0.36);
    }

    .board-header {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: minmax(0, 1fr);
      align-items: center;
      min-height: 0;
      gap: 0;
      padding: 5px;
      border: 1px solid rgba(255, 116, 181, 0.24);
      border-radius: 8px;
      background:
        linear-gradient(180deg, rgba(255, 213, 237, 0.08), transparent 58%),
        rgba(18, 9, 23, 0.28);
      box-shadow:
        inset 0 0 18px rgba(255, 91, 167, 0.08),
        0 0 18px rgba(255, 91, 167, 0.08);
      overflow: hidden;
      position: relative;
    }

    .board-header > * {
      position: relative;
      z-index: 1;
    }

    .board-panel.has-active-effects .board-header::after {
      content: "";
      position: absolute;
      inset: -40% -18%;
      z-index: 0;
      pointer-events: none;
      background: linear-gradient(100deg, transparent 24%, rgba(255, 91, 167, 0.18) 44%, rgba(255, 238, 248, 0.12) 50%, transparent 68%);
      opacity: 0.42;
      transform: translate3d(0, 0, 0) skewX(-18deg);
    }

    .board-title {
      margin: 0;
      color: #fff4f8;
      font-size: 1.48rem;
      line-height: 1.2;
    }

    .hint-text {
      margin: 0;
      color: rgba(255, 247, 251, 0.68);
      font-size: 0.88rem;
      text-align: right;
    }

    .board-state-stack {
      grid-column: 1;
      display: grid;
      place-items: stretch;
      min-width: 0;
      width: 100%;
      height: 100%;
    }

    .clock-strip {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: center;
      gap: 5px;
      min-width: 0;
      width: 100%;
      height: 100%;
      position: relative;
      z-index: 0;
    }

    .clock-strip.is-time-cheating::before {
      content: "";
      position: absolute;
      inset: -3px;
      z-index: -1;
      border: 1px solid rgba(255, 91, 167, 0.42);
      border-radius: 7px;
      background:
        linear-gradient(90deg, transparent, rgba(255, 91, 167, 0.20), transparent),
        rgba(77, 8, 48, 0.18);
      box-shadow:
        0 0 22px rgba(255, 91, 167, 0.34),
        inset 0 0 18px rgba(255, 247, 251, 0.08);
      pointer-events: none;
      animation: timeCheatStripSweep 1150ms ease-out both;
    }

    .clock-strip.clock-strip-pressure::after {
      content: "";
      position: absolute;
      inset: -3px;
      z-index: -1;
      pointer-events: none;
      border-radius: 7px;
      background:
        linear-gradient(100deg, transparent 12%, rgba(255, 91, 167, 0.24) 38%, rgba(255, 238, 248, 0.18) 48%, transparent 72%),
        rgba(77, 8, 48, 0.14);
      opacity: 0.72;
      transform: translate3d(0, 0, 0);
    }

    .clock-box {
      position: relative;
      z-index: 1;
      width: 100%;
      height: 100%;
      display: inline-grid;
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      padding: 5px 14px;
      border: 1px solid rgba(255, 156, 200, 0.24);
      border-radius: 6px;
      color: rgba(255, 247, 251, 0.76);
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 58%),
        rgba(12, 9, 13, 0.46);
      font-size: 0.72rem;
      line-height: 1;
      overflow: hidden;
    }


    /* Remaining time is a separate layer, leaving surrender's hold fill intact. */
    .clock-box { --clock-accent: #cda863; }
    .clock-box.player { --clock-accent: #efb5d1; }
    .clock-box .clock-reserve { position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden; }
    .clock-reserve::after { content:"";position:absolute;left:8px;right:8px;bottom:4px;height:4px;border-radius:4px;background:#fff5df12; }
    .clock-reserve-fill { position:absolute;left:8px;right:8px;top:0;bottom:4px;transform:scaleX(var(--clock-fraction,1));transform-origin:left center;transition:transform .28s linear;background:linear-gradient(to top,color-mix(in srgb,var(--clock-accent) 12%,transparent),transparent 90%); }
    .clock-reserve-fill::before { content:"";position:absolute;left:0;right:0;bottom:0;height:4px;border-radius:4px;background:linear-gradient(90deg,color-mix(in srgb,var(--clock-accent) 42%,transparent),var(--clock-accent));box-shadow:0 0 8px color-mix(in srgb,var(--clock-accent) 38%,transparent);opacity:.48;transition:opacity .25s; }
    .clock-reserve-fill::after { content:"";position:absolute;right:0;bottom:-2px;width:2px;height:8px;border-radius:2px;background:var(--clock-accent);box-shadow:0 0 9px var(--clock-accent);opacity:.45; }
    .clock-reserve-sheen { position:absolute;inset:0;overflow:hidden; }
    .clock-reserve-sheen::after { content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 30%,#fff4dc22 50%,transparent 70%);transform:translateX(-110%); }
    .clock-box.is-active .clock-reserve-fill::before,.clock-box.is-active .clock-reserve-fill::after { opacity:1; }
    .clock-box.is-active .clock-reserve-sheen::after { animation:clockReserveSweep 2.6s ease-in-out infinite; }
    .clock-box.is-low,.clock-box.is-critical { --clock-accent:#ff5b9d; }
    .clock-box.is-active.is-critical .clock-reserve-fill::before { animation:clockReservePulse .7s ease-in-out infinite; }
    .clock-box.is-time-cheat-target .clock-reserve-fill { transition-duration:.85s; }
    @keyframes clockReserveSweep { 0%,15%{transform:translateX(-110%)} 85%,100%{transform:translateX(110%)} }
    @keyframes clockReservePulse { 50%{opacity:.42} }

    button.clock-box {
      appearance: none;
      font: inherit;
      text-align: left;
      cursor: pointer;
      touch-action: manipulation;
      user-select: none;
    }

    .clock-box.player::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background: linear-gradient(90deg, rgba(255, 51, 137, 0.12), rgba(255, 91, 167, 0.58));
      transform: scaleX(0);
      transform-origin: 0 50%;
      opacity: 0;
    }

    .clock-box.player.is-surrender-holding {
      border-color: rgba(255, 91, 167, 0.95);
      box-shadow: inset 0 0 22px rgba(255, 91, 167, 0.16), 0 0 18px rgba(255, 42, 132, 0.36);
    }

    .clock-box.player.is-surrender-holding::before {
      opacity: 1;
      animation: surrenderHoldFill 1400ms linear both;
    }

    .clock-box > * {
      position: relative;
      z-index: 1;
    }

    button.clock-box:disabled {
      cursor: default;
    }

    button.clock-box:focus-visible {
      outline: 2px solid rgba(240, 212, 137, 0.92);
      outline-offset: -3px;
    }

    .clock-box.is-active {
      border-color: rgba(240, 212, 137, 0.78);
      box-shadow: 0 0 12px rgba(240, 212, 137, 0.22);
      color: #fff7fb;
    }

    .clock-box.is-low {
      border-color: rgba(255, 91, 167, 0.72);
    }

    .clock-box.is-critical {
      border-color: rgba(255, 91, 167, 0.92);
      color: #fff7fb;
      background: rgba(95, 12, 48, 0.56);
      box-shadow: 0 0 14px rgba(255, 91, 167, 0.42);
    }

    .clock-box.is-time-cheat-target {
      border-color: rgba(255, 91, 167, 0.96);
      background:
        linear-gradient(90deg, rgba(255, 91, 167, 0.24), rgba(47, 11, 34, 0.72)),
        rgba(12, 9, 13, 0.62);
      box-shadow:
        0 0 0 2px rgba(255, 247, 251, 0.24),
        0 0 22px rgba(255, 91, 167, 0.72);
      animation: timeCheatClockRewrite 980ms cubic-bezier(0.18, 0.82, 0.22, 1) both;
    }

    .clock-box.is-time-cheat-target .clock-time {
      color: #fff7fb;
      text-shadow:
        -2px 0 rgba(255, 91, 167, 0.68),
        2px 0 rgba(112, 211, 255, 0.36),
        0 0 12px rgba(255, 247, 251, 0.58);
      animation: timeCheatDigitsGlitch 720ms steps(2, end) 2;
    }

    .clock-box.is-time-cheat-target::after {
      content: attr(data-time-cheat-delta);
      position: absolute;
      right: -8px;
      top: -18px;
      min-width: 34px;
      min-height: 20px;
      display: grid;
      place-items: center;
      padding: 2px 7px;
      border: 1px solid rgba(255, 247, 251, 0.76);
      border-radius: 999px;
      color: #fff7fb;
      background:
        linear-gradient(180deg, rgba(255, 91, 167, 0.84), rgba(91, 14, 60, 0.92));
      box-shadow:
        0 0 0 1px rgba(240, 212, 137, 0.22),
        0 0 18px rgba(255, 91, 167, 0.72);
      font-size: 0.68rem;
      font-weight: 900;
      line-height: 1;
      pointer-events: none;
      animation: timeCheatDeltaStamp 1180ms cubic-bezier(0.16, 0.86, 0.22, 1.06) both;
    }

    .clock-label {
      color: rgba(255, 247, 251, 0.62);
      font-size: 0.78rem;
      font-weight: 800;
    }

    .clock-time {
      justify-self: end;
      color: var(--gold-soft);
      font-variant-numeric: tabular-nums;
      font-size: clamp(1.28rem, 2.4vw, 1.72rem);
      letter-spacing: 0.04em;
      line-height: 1;
    }

    .time-cheat-marker {
      position: absolute;
      left: 50%;
      top: calc(100% + 4px);
      translate: -50% 0;
      opacity: 0;
      pointer-events: none;
      white-space: nowrap;
      color: #fff7fb;
      padding: 3px 8px;
      border-radius: 999px;
      background: rgba(255, 91, 167, 0.46);
      box-shadow: 0 0 18px rgba(255, 91, 167, 0.42);
      font-size: 0.7rem;
      font-weight: 900;
      letter-spacing: 0;
    }

    .time-cheat-marker.is-active {
      animation: timeCheatMarker 1350ms ease-out both;
    }

    .ai-pressure-control {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 22px;
      padding: 3px 8px;
      border: 1px solid rgba(255, 91, 167, 0.24);
      border-radius: 999px;
      color: rgba(255, 247, 251, 0.72);
      background: rgba(12, 9, 13, 0.30);
      font-size: 0.75rem;
      line-height: 1;
      white-space: nowrap;
    }

    .ai-pressure-control input[type="range"] {
      width: 58px;
      accent-color: var(--rose);
    }

    .ai-pressure-value {
      min-width: 1ch;
      color: var(--gold-soft);
      font-weight: 800;
    }

    .qa-settings .ai-pressure-control {
      width: 100%;
      height: auto;
      justify-content: space-between;
      box-sizing: border-box;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
    }

    .qa-settings .ai-pressure-control input[type="range"] {
      flex: 1;
      width: auto;
      max-width: none;
    }

    .board-shell {
      min-height: 0;
      height: 100%;
      width: 100%;
      max-width: 100%;
      display: grid;
      grid-template-columns: clamp(34px, 2.7vw, 40px) minmax(0, auto) clamp(34px, 2.7vw, 40px);
      grid-template-rows: minmax(0, 1fr);
      gap: 0;
      justify-self: center;
      justify-content: center;
      place-items: center;
      padding: 0;
      border-radius: 8px;
      border: 1px solid rgba(240, 212, 137, 0.3);
      background:
        linear-gradient(135deg, rgba(240, 212, 137, 0.16), rgba(255, 91, 167, 0.11)),
        linear-gradient(180deg, rgba(25, 17, 24, 0.74), rgba(12, 9, 12, 0.58)),
        rgba(18, 14, 18, 0.52);
      box-shadow:
        inset 0 1px 0 rgba(255, 246, 210, 0.10),
        inset 0 0 36px rgba(0, 0, 0, 0.26),
        0 18px 46px rgba(0, 0, 0, 0.30);
    }

    .board-panel.cheat-declaration-active .board-shell {
      animation: cheatDeclarationShellPressure 980ms cubic-bezier(0.18, 0.86, 0.22, 1) both;
      transform-origin: center;
    }

    .captured-tray {
      width: 100%;
      min-width: 34px;
      max-width: 40px;
      height: 100%;
      min-height: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 3px;
      padding: 4px 3px;
      border: 1px dashed rgba(240, 212, 137, 0.32);
      border-radius: 8px;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 14%, transparent 86%, rgba(255, 255, 255, 0.04)),
        rgba(25, 18, 27, 0.42);
      box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.18);
      writing-mode: horizontal-tb;
      align-content: center;
      overflow: hidden auto;
    }

    .captured-tray.left {
      grid-column: 1;
      justify-self: end;
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }

    .captured-tray.right {
      grid-column: 3;
      justify-self: start;
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
      border-color: rgba(255, 91, 167, 0.36);
      box-shadow:
        inset 0 0 18px rgba(0, 0, 0, 0.18),
        0 0 18px rgba(255, 91, 167, 0.10);
    }

    .board {
      height: 100%;
      width: auto;
      max-width: 100%;
      aspect-ratio: 9 / 10;
      display: grid;
      grid-template-columns: repeat(9, minmax(0, 1fr));
      grid-template-rows: repeat(10, minmax(0, 1fr));
      position: relative;
      border: 3px solid var(--board-border);
      border-radius: 8px;
      overflow: hidden;
      background: var(--board-bg);
      box-shadow:
        inset 0 0 0 5px var(--board-inset),
        inset 0 0 32px var(--board-glow),
        0 14px 34px rgba(0, 0, 0, 0.35);
    }

    .board-grid-lines,
    .board-palace-lines {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
      pointer-events: none;
      opacity: 0.82;
    }

    .board-dynamic-layer {
      position: absolute;
      inset: 0;
      pointer-events: none;
      overflow: visible;
      container-type: size;
      contain: layout style;
    }

    .advantage-reversal-board-lock {
      position: absolute;
      inset: 0;
      z-index: 14;
      /* One 25px stripe period projected horizontally at 24 degrees. */
      --board-lock-stripe-step: 61.4648333884px;
      display: grid;
      place-items: center;
      pointer-events: none;
      overflow: hidden;
      border-radius: 5px;
      background:
        repeating-linear-gradient(-24deg, rgba(255, 231, 244, 0.12) 0 11px, rgba(20, 8, 18, 0.22) 11px 25px),
        rgba(8, 3, 8, 0.68);
      background-position: calc(0px - var(--board-lock-stripe-step)) 0;
      box-shadow:
        inset 0 0 0 3px rgba(255, 185, 218, 0.18),
        inset 0 0 72px rgba(8, 2, 8, 0.66);
      animation: advantageReversalBoardLockStripes 2400ms linear infinite;
    }

    .advantage-reversal-board-lock[hidden] {
      display: none;
    }

    .advantage-reversal-board-lock[data-lock-phase="revealing"] {
      z-index: 10;
      background:
        repeating-linear-gradient(-24deg, rgba(255, 231, 244, 0.07) 0 11px, rgba(20, 8, 18, 0.12) 11px 25px),
        rgba(8, 3, 8, 0.36);
    }

    .advantage-reversal-board-lock,
    .advantage-reversal-board-lock[data-lock-phase="revealing"] {
      background-size: calc(100% + var(--board-lock-stripe-step)) 100%;
      background-repeat: no-repeat;
    }

    .advantage-reversal-board-lock-symbol {
      position: relative;
      width: clamp(42px, 9cqw, 64px);
      height: clamp(34px, 7cqw, 50px);
      margin-top: clamp(18px, 4cqw, 30px);
      border: 3px solid rgba(255, 235, 245, 0.76);
      border-radius: 9px;
      background: rgba(66, 24, 53, 0.74);
      box-shadow:
        0 0 0 2px rgba(255, 91, 167, 0.20),
        0 0 28px rgba(255, 91, 167, 0.42);
      animation: advantageReversalBoardLockPulse 1500ms ease-in-out infinite;
    }

    .advantage-reversal-board-lock-symbol::before {
      content: "";
      position: absolute;
      left: 50%;
      bottom: calc(100% - 3px);
      width: 52%;
      height: 58%;
      translate: -50% 0;
      border: 4px solid rgba(255, 235, 245, 0.76);
      border-bottom: 0;
      border-radius: 999px 999px 0 0;
    }

    .advantage-reversal-board-lock[data-lock-phase="revealing"] .advantage-reversal-board-lock-symbol {
      opacity: 0.48;
    }

    .board.advantage-reversal-board-locked .board-dynamic-layer {
      z-index: 12;
    }

    .board-atmosphere-layer {
      position: absolute;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      overflow: hidden;
      contain: layout paint style;
    }

    .board-popup-layer {
      position: absolute;
      inset: 0;
      z-index: 30;
      pointer-events: none;
      overflow: visible;
      contain: layout style;
    }

    .board-grid-lines line,
    .board-palace-lines line {
      stroke: var(--board-line);
      stroke-width: 0.045;
      stroke-linecap: round;
    }

    .board::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 45%;
      height: 10%;
      display: grid;
      place-items: center;
      color: var(--board-river);
      font-size: 1.28rem;
      font-weight: 700;
      pointer-events: none;
      z-index: 1;
    }

    .board.losing-pressure::after {
      content: "";
      color: rgba(255, 156, 205, 0.74);
      text-shadow:
        0 0 8px rgba(255, 91, 167, 0.46),
        0 0 18px rgba(176, 65, 212, 0.28);
    }


    /* River inscriptions center on the two halves of the playable river. */
    .board-river-labels {
      position: absolute; left: 5.555556%; right: 5.555556%;
      top: 45%; height: 10%; z-index: 1;
      display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
      place-items: center; pointer-events: none;
      color: var(--board-river); font-size: 1.28rem; line-height: 1;
      font-family: "DFKai-SB", "KaiTi", serif; font-weight: 400;
      text-shadow: 0 -1px 0 #0008;
    }
    .board-river-phrase {
      width: 50%; height: 100%; display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr)); place-items: center;
    }
    .board-river-phrase > span::before { content: attr(data-river-glyph); }
    .board.losing-pressure .board-river-phrase > span::before { content: attr(data-pressure-glyph); }
    .board.losing-pressure .board-river-labels {
      color: rgba(255, 156, 205, .74);
      text-shadow: 0 0 8px #ff5ba775, 0 0 18px #b041d448;
    }
    .board.cheat-declaring .board-river-labels { visibility: hidden; }

    .cell {
      border: 0;
      margin: 0;
      padding: 0;
      border-radius: 0;
      background: transparent;
      color: inherit;
      position: relative;
      z-index: 2;
      display: grid;
      place-items: center;
      cursor: pointer;
      min-width: 0;
      min-height: 0;
      container-type: size;
    }

    .cell:hover {
      background: rgba(255, 255, 255, 0.12);
    }

    .cell:focus-visible {
      outline: 3px solid #fff2a8;
      outline-offset: -3px;
      background: rgba(255, 255, 255, 0.18);
      box-shadow: inset 0 0 0 2px rgba(110, 22, 78, 0.92), 0 0 16px rgba(255, 242, 168, 0.72);
    }

    .cell.selected {
      background: rgba(255, 91, 167, 0.22);
      box-shadow: inset 0 0 0 3px rgba(255, 91, 167, 0.7);
    }

    .piece-motion {
      width: 100%;
      height: 100%;
      position: relative;
      z-index: 3;
      /* Fixed-size centered content does not need nested Grid sizing. */
      display: flex;
      align-items: center;
      justify-content: center;
      pointer-events: none;
    }

    .cell.selected .piece-motion {
      animation: selectedPieceHover 760ms ease-in-out infinite;
    }

    .cell.board-move-arrival .piece-motion {
      opacity: 0;
    }

    .cell.legal::before {
      content: "";
      position: absolute;
      width: 32%;
      aspect-ratio: 1;
      border-radius: 50%;
      background: rgba(112, 214, 178, 0.64);
      box-shadow: 0 0 16px rgba(112, 214, 178, 0.72);
      z-index: 1;
    }

    .cell.capture-target::before {
      width: 68%;
      background: transparent;
      border: 3px solid rgba(255, 91, 167, 0.82);
      box-shadow: 0 0 18px rgba(255, 91, 167, 0.72);
    }

    .cell.false-opening::after {
      content: "?";
      position: absolute;
      width: 48%;
      aspect-ratio: 1;
      z-index: 4;
      display: grid;
      place-items: center;
      border: 2px solid rgba(255, 239, 246, 0.72);
      border-radius: 4px;
      color: #fff7fb;
      background:
        linear-gradient(135deg, rgba(255, 62, 132, 0.78), rgba(116, 18, 68, 0.72));
      box-shadow:
        0 0 12px rgba(255, 62, 132, 0.88),
        inset 0 0 12px rgba(255, 246, 250, 0.16);
      font-weight: 900;
      transform: rotate(45deg);
    }

    .cell.false-opening::after {
      line-height: 1;
    }

    .cell.temptation-target {
      overflow: visible;
      background:
        radial-gradient(circle, rgba(255, 247, 251, 0.18), transparent 42%),
        linear-gradient(135deg, rgba(255, 91, 167, 0.24), rgba(183, 140, 255, 0.16));
      box-shadow:
        inset 0 0 30px rgba(255, 91, 167, 0.56),
        0 0 18px rgba(255, 91, 167, 0.36);
    }

    .temptation-sigil {
      position: absolute;
      left: 50%;
      top: 50%;
      width: 88%;
      aspect-ratio: 1;
      translate: -50% -50%;
      z-index: 5;
      display: grid;
      place-items: center;
      pointer-events: none;
      border: 2px solid rgba(255, 247, 251, 0.74);
      border-radius: 50%;
      background:
        linear-gradient(135deg, rgba(255, 91, 167, 0.26), rgba(183, 140, 255, 0.16)),
        rgba(68, 12, 50, 0.18);
      box-shadow:
        0 0 16px rgba(255, 91, 167, 0.82),
        inset 0 0 18px rgba(255, 247, 251, 0.12);
    }

    .temptation-sigil::before,
    .temptation-sigil::after {
      content: "";
      position: absolute;
      inset: -9%;
      border-radius: 50%;
      border: 1px solid rgba(255, 91, 167, 0.58);
      box-shadow: 0 0 12px rgba(183, 140, 255, 0.46);
    }

    .temptation-sigil::after {
      inset: 15%;
      border-style: dashed;
    }

    .temptation-whisper {
      position: absolute;
      left: 50%;
      bottom: calc(100% - 7px);
      translate: -50% 0;
      max-width: 72px;
      padding: 3px 7px;
      border: 1px solid rgba(255, 247, 251, 0.72);
      border-radius: 999px;
      color: #fff7fb;
      background: rgba(132, 18, 82, 0.94);
      box-shadow:
        0 0 14px rgba(255, 91, 167, 0.84),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
      font-size: 0.58rem;
      font-weight: 900;
      line-height: 1.05;
      white-space: nowrap;
      text-align: center;
    }

    .cell.switch-cheat-source,
    .cell.switch-cheat-target {
      outline: 4px solid rgba(255, 91, 167, 0.92);
      outline-offset: -4px;
      background:
        radial-gradient(circle, rgba(255, 247, 251, 0.18), transparent 48%),
        linear-gradient(135deg, rgba(255, 91, 167, 0.26), rgba(112, 211, 255, 0.12));
      box-shadow:
        inset 0 0 34px rgba(255, 91, 167, 0.66),
        0 0 18px rgba(255, 91, 167, 0.46);
      overflow: visible;
    }

    .cell.switch-cheat-source::before,
    .cell.switch-cheat-target::before {
      content: "";
      position: absolute;
      inset: 7%;
      z-index: 3;
      border: 2px dashed rgba(255, 247, 251, 0.72);
      border-radius: 7px;
      box-shadow: 0 0 14px rgba(255, 91, 167, 0.66);
      pointer-events: none;
      animation: switchCheatSealSpin 980ms ease-out both;
    }

    .cell.switch-cheat-source::after,
    .cell.switch-cheat-target::after {
      position: absolute;
      left: 50%;
      bottom: calc(100% - 10px);
      z-index: 8;
      translate: -50% 0;
      padding: 2px 6px;
      border: 1px solid rgba(255, 247, 251, 0.72);
      border-radius: 999px;
      color: #fff7fb;
      background: rgba(132, 18, 82, 0.92);
      box-shadow: 0 0 14px rgba(255, 91, 167, 0.72);
      font-size: 0.58rem;
      font-weight: 900;
      line-height: 1.1;
      pointer-events: none;
      animation: switchCheatLabelPop 980ms ease-out both;
    }

    .cell.switch-cheat-source::after {
      content: "換走";
    }

    .cell.switch-cheat-target::after {
      content: "替入";
    }

    .cell.switch-cheat-source .piece,
    .cell.switch-cheat-target .piece {
      animation: switchCheatPieceRewrite 980ms cubic-bezier(0.16, 0.86, 0.22, 1.08) both;
    }

    .cell.switch-cheat-source .piece::before,
    .cell.switch-cheat-target .piece::before {
      box-shadow:
        inset 0 0 0 2px rgba(255, 247, 251, 0.62),
        inset 0 0 0 6px rgba(255, 91, 167, 0.18),
        0 0 16px rgba(255, 91, 167, 0.72);
      animation: switchCheatPieceRing 980ms ease-out both;
    }

    .switch-cheat-flight-layer {
      position: absolute;
      inset: 0;
      z-index: 9;
      pointer-events: none;
      contain: layout paint style;
    }

    .board-move-fx-layer {
      position: absolute;
      inset: 0;
      z-index: 12;
      pointer-events: none;
      overflow: hidden;
      contain: layout paint style;
    }

    .board-move-fx-piece {
      position: absolute;
      width: 10.444444%;
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      translate: -50% -50%;
      border: 3px solid var(--piece-ring);
      border-radius: 50%;
      color: var(--board-move-color);
      background: var(--board-move-bg);
      font-family: "Microsoft JhengHei", "Noto Serif TC", serif;
      font-size: clamp(0.8rem, min(4cqw, 3.6cqh), 1.56rem);
      font-weight: 900;
      line-height: 1;
      text-shadow:
        0 1px 0 rgba(255, 238, 184, 0.52),
        0 -1px 0 rgba(77, 41, 22, 0.28);
      box-shadow:
        inset 0 2px 0 rgba(255, 246, 208, 0.68),
        inset 0 -4px 0 rgba(89, 55, 26, 0.30),
        0 3px 7px rgba(0, 0, 0, 0.30);
    }

    .board-move-fx-piece.red {
      --board-move-bg: var(--piece-red-bg);
      --board-move-color: var(--piece-red-text);
    }

    .board-move-fx-piece.black {
      --board-move-bg: var(--piece-black-bg);
      --board-move-color: var(--piece-black-text);
    }

    .board-move-fx-piece::before,
    .board-move-fx-piece::after {
      content: "";
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
    }

    .board-move-fx-piece::before {
      inset: 8%;
      border: 2px solid var(--piece-inner-ring);
      outline: 3px solid var(--piece-inner-glow);
      outline-offset: -6px;
    }

    .board-move-fx-piece::after {
      inset: 20%;
      border: 1px solid rgba(93, 52, 27, 0.28);
    }

    .board-move-fx-label {
      position: relative;
      z-index: 1;
    }

    .board-move-flight-carrier {
      position: absolute;
      left: var(--move-start-x);
      top: var(--move-start-y);
      width: 10.444444%;
      aspect-ratio: 1;
      z-index: 2;
      translate: -50% -50%;
      animation: boardMoveFlight var(--board-move-duration, 460ms) cubic-bezier(0.22, 0.68, 0.3, 1) both;
    }

    .board-move-flight-carrier.has-opponent-cheat-stall {
      animation-timing-function: linear(0 0%, .1548 5%, .24 7.8021%, .24 16.4978%, .3524 20%, .4954 25%, .6126 30%, .7046 35%, .7755 40%, .8303 45%, .8726 50%, .9055 55%, .9312 60%, .9511 65%, .9665 70%, .9782 75%, .9869 80%, .9930 85%, .9971 90%, .9993 95%, 1 100%);
    }

    .new-run-flight-carrier {
      animation: boardMoveFlight var(--new-run-piece-duration, 414ms) cubic-bezier(0.22, 0.68, 0.3, 1) var(--new-run-piece-delay, 0ms) both;
    }

    .new-run-flight-carrier .board-move-flight-piece {
      animation-duration: var(--new-run-piece-duration, 414ms);
      animation-delay: var(--new-run-piece-delay, 0ms);
    }

    body[data-new-run-transition] .cell .piece {
      opacity: 0;
    }

    .board-move-flight-carrier .board-move-fx-piece {
      inset: 0;
      width: 100%;
      translate: 0 0;
    }

    .board-move-flight-piece {
      animation: boardMoveDiscPulse var(--board-move-duration, 460ms) ease-in-out both;
    }

    .board-capture-exit-piece {
      left: var(--capture-x);
      top: var(--capture-y);
      z-index: 1;
      animation: boardCapturedPieceExit var(--capture-exit-duration, var(--board-capture-duration, 520ms)) cubic-bezier(0.24, 0.74, 0.34, 1) var(--capture-exit-delay, 0ms) both;
    }

    .board.capture-impact {
      animation: captureImpactShake var(--capture-shake-duration, 120ms) ease-out var(--capture-impact-delay, 460ms) both;
      transform-origin: center;
    }

    .board-move-landing-cue {
      position: absolute;
      left: var(--landing-x);
      top: var(--landing-y);
      width: 11.2%;
      aspect-ratio: 1;
      z-index: 3;
      translate: -50% -50%;
      border: 2px solid rgba(255, 239, 187, 0.9);
      border-radius: 50%;
      box-shadow:
        0 0 0 2px rgba(255, 91, 167, 0.28),
        0 0 18px rgba(255, 91, 167, 0.56);
      opacity: 0;
      animation: boardMoveLandingCue var(--board-move-duration, 460ms) ease-out both;
    }

    .board-move-landing-cue.is-capture {
      border-color: rgba(255, 218, 132, 0.96);
      box-shadow:
        0 0 0 3px rgba(255, 91, 167, 0.34),
        0 0 24px rgba(255, 70, 147, 0.72);
    }

    .switch-cheat-path {
      position: absolute;
      left: var(--mid-x);
      top: var(--mid-y);
      width: var(--path-w);
      height: 10px;
      translate: -50% -50%;
      rotate: var(--path-rotate);
      border-radius: 999px;
      background:
        linear-gradient(90deg, transparent, rgba(255, 91, 167, 0.84), rgba(255, 247, 251, 0.86), rgba(183, 140, 255, 0.62), transparent);
      box-shadow:
        0 0 18px rgba(255, 91, 167, 0.72),
        0 0 34px rgba(183, 140, 255, 0.38);
      opacity: 0;
      animation: switchCheatPathPulse var(--switch-duration, 1850ms) ease-out both;
    }

    .switch-cheat-flight-piece {
      position: absolute;
      left: var(--start-x);
      top: var(--start-y);
      width: 10.444444%;
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      translate: -50% -50%;
      border-radius: 50%;
      border: 3px solid var(--piece-ring);
      background: var(--flight-bg);
      color: var(--flight-color);
      font-family: "Microsoft JhengHei", "Noto Serif TC", serif;
      font-size: 1.16rem;
      font-weight: 900;
      line-height: 1;
      text-shadow:
        0 1px 0 rgba(255, 238, 184, 0.52),
        0 -1px 0 rgba(77, 41, 22, 0.28);
      box-shadow:
        inset 0 2px 0 rgba(255, 246, 208, 0.72),
        inset 0 -4px 0 rgba(89, 55, 26, 0.34),
        0 0 0 3px rgba(255, 91, 167, 0.42),
        0 12px 24px rgba(0, 0, 0, 0.42),
        0 0 24px rgba(255, 91, 167, 0.66);
      animation: switchCheatFlight var(--switch-duration, 1850ms) cubic-bezier(0.14, 0.78, 0.22, 1) both;
    }

    .switch-cheat-flight-piece.red {
      --flight-bg: var(--piece-red-bg);
      --flight-color: var(--piece-red-text);
    }

    .switch-cheat-flight-piece.black {
      --flight-bg: var(--piece-black-bg);
      --flight-color: var(--piece-black-text);
    }

    .switch-cheat-flight-piece::before {
      content: "";
      position: absolute;
      inset: 8%;
      border-radius: 50%;
      box-shadow:
        inset 0 0 0 2px var(--piece-inner-ring),
        inset 0 0 0 5px var(--piece-inner-glow);
    }

    .switch-cheat-flight-piece::after {
      content: "偷換";
      position: absolute;
      left: 50%;
      bottom: calc(100% + 4px);
      translate: -50% 0;
      padding: 2px 7px;
      border: 1px solid rgba(255, 247, 251, 0.78);
      border-radius: 999px;
      color: #fff7fb;
      background: rgba(132, 18, 82, 0.94);
      box-shadow: 0 0 14px rgba(255, 91, 167, 0.78);
      font-size: 0.58rem;
      white-space: nowrap;
    }

    .switch-cheat-flight-piece span {
      position: relative;
      z-index: 1;
    }

    .cell.revive-cheat-target {
      outline: 4px solid rgba(255, 91, 167, 0.94);
      outline-offset: -4px;
      background:
        radial-gradient(circle, rgba(255, 247, 251, 0.28), transparent 46%),
        linear-gradient(135deg, rgba(255, 91, 167, 0.28), rgba(183, 140, 255, 0.18));
      box-shadow:
        inset 0 0 36px rgba(255, 91, 167, 0.72),
        0 0 22px rgba(255, 91, 167, 0.54);
      overflow: visible;
    }

    .cell.revive-cheat-target::before {
      content: "";
      position: absolute;
      inset: -10%;
      z-index: 3;
      border: 2px solid rgba(255, 247, 251, 0.74);
      border-radius: 999px;
      box-shadow:
        0 0 18px rgba(255, 91, 167, 0.78),
        inset 0 0 18px rgba(183, 140, 255, 0.30);
      pointer-events: none;
      animation: reviveCheatSummonRing 1400ms ease-out both;
    }

    .cell.revive-cheat-target::after {
      content: "召回";
      position: absolute;
      left: 50%;
      bottom: calc(100% - 8px);
      z-index: 8;
      translate: -50% 0;
      padding: 2px 7px;
      border: 1px solid rgba(255, 247, 251, 0.76);
      border-radius: 999px;
      color: #fff7fb;
      background: rgba(132, 18, 82, 0.94);
      box-shadow: 0 0 16px rgba(255, 91, 167, 0.78);
      font-size: 0.58rem;
      font-weight: 900;
      line-height: 1.1;
      pointer-events: none;
      animation: switchCheatLabelPop 1400ms ease-out both;
    }

    .cell.revive-cheat-target .piece {
      animation: reviveCheatPieceMaterialize 1400ms cubic-bezier(0.16, 0.86, 0.22, 1.08) both;
    }

    .cell.revive-cheat-target .piece::before {
      box-shadow:
        inset 0 0 0 2px rgba(255, 247, 251, 0.66),
        inset 0 0 0 6px rgba(255, 91, 167, 0.22),
        0 0 18px rgba(255, 91, 167, 0.76);
    }

    .revive-cheat-flight-layer {
      position: absolute;
      inset: 0;
      z-index: 10;
      pointer-events: none;
      overflow: visible;
      contain: layout style;
    }

    .revive-cheat-path {
      position: absolute;
      left: var(--revive-mid-x);
      top: var(--revive-mid-y);
      width: var(--revive-path-w);
      height: 12px;
      translate: -50% -50%;
      rotate: var(--revive-path-rotate);
      border-radius: 999px;
      background:
        linear-gradient(90deg, transparent, rgba(255, 91, 167, 0.24), rgba(255, 247, 251, 0.92), rgba(255, 91, 167, 0.86), transparent);
      box-shadow:
        0 0 20px rgba(255, 91, 167, 0.78),
        0 0 42px rgba(183, 140, 255, 0.46);
      opacity: 0;
      animation: reviveCheatPathPulse var(--revive-duration, 1900ms) ease-out both;
    }

    .revive-cheat-source-flare,
    .revive-cheat-arrival-seal {
      position: absolute;
      aspect-ratio: 1;
      translate: -50% -50%;
      border-radius: 50%;
      pointer-events: none;
      opacity: 0;
    }

    .revive-cheat-source-flare {
      left: var(--revive-start-x);
      top: var(--revive-start-y);
      width: 15%;
      border: 2px solid rgba(255, 116, 181, 0.72);
      background:
        repeating-radial-gradient(circle, rgba(255, 247, 251, 0.18) 0 2px, transparent 2px 8px),
        radial-gradient(circle, rgba(255, 91, 167, 0.42), transparent 64%);
      box-shadow:
        inset 0 0 20px rgba(255, 91, 167, 0.22),
        0 0 28px rgba(255, 91, 167, 0.72),
        0 0 42px rgba(183, 140, 255, 0.40);
      animation: reviveCheatSourceFlare var(--revive-duration, 1900ms) ease-out both;
    }

    .revive-cheat-source-flare::before,
    .revive-cheat-source-flare::after,
    .revive-cheat-arrival-seal::before,
    .revive-cheat-arrival-seal::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 70%;
      height: 2px;
      border-radius: 999px;
      background: rgba(255, 247, 251, 0.86);
      box-shadow: 0 0 10px rgba(255, 91, 167, 0.78);
      translate: -50% -50%;
    }

    .revive-cheat-source-flare::before {
      rotate: 28deg;
    }

    .revive-cheat-source-flare::after {
      rotate: -28deg;
    }

    .revive-cheat-arrival-seal {
      left: var(--revive-end-x);
      top: var(--revive-end-y);
      width: 13.5%;
      border: 2px solid rgba(240, 212, 137, 0.84);
      background:
        radial-gradient(circle, rgba(255, 247, 251, 0.28), transparent 34%),
        radial-gradient(circle, rgba(255, 91, 167, 0.40), transparent 66%);
      box-shadow:
        inset 0 0 18px rgba(240, 212, 137, 0.20),
        0 0 22px rgba(240, 212, 137, 0.54),
        0 0 34px rgba(255, 91, 167, 0.58);
      animation: reviveCheatArrivalSeal var(--revive-duration, 1900ms) ease-out both;
    }

    .revive-cheat-arrival-seal::before {
      rotate: 90deg;
    }

    .revive-cheat-rift {
      position: absolute;
      left: var(--revive-end-x);
      top: var(--revive-end-y);
      width: 13%;
      aspect-ratio: 1;
      translate: -50% -50%;
      border-radius: 50%;
      border: 2px solid rgba(255, 247, 251, 0.72);
      background:
        radial-gradient(circle, rgba(255, 247, 251, 0.42), transparent 31%),
        radial-gradient(circle, rgba(255, 91, 167, 0.44), transparent 63%);
      box-shadow:
        0 0 24px rgba(255, 91, 167, 0.82),
        inset 0 0 20px rgba(183, 140, 255, 0.32);
      animation: reviveCheatRift 1400ms ease-out both;
    }

    .revive-cheat-flight-piece {
      position: absolute;
      left: var(--revive-start-x);
      top: var(--revive-start-y);
      width: 10.444444%;
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      translate: -50% -50%;
      border-radius: 50%;
      border: 3px solid var(--piece-ring);
      background: var(--piece-black-bg);
      color: var(--piece-black-text);
      font-family: "Microsoft JhengHei", "Noto Serif TC", serif;
      font-size: 1.16rem;
      font-weight: 900;
      line-height: 1;
      text-shadow:
        0 1px 0 rgba(255, 238, 184, 0.52),
        0 -1px 0 rgba(77, 41, 22, 0.28);
      box-shadow:
        inset 0 2px 0 rgba(255, 246, 208, 0.72),
        inset 0 -4px 0 rgba(89, 55, 26, 0.34),
        0 0 0 3px rgba(255, 91, 167, 0.48),
        0 12px 26px rgba(0, 0, 0, 0.44),
        0 0 28px rgba(255, 91, 167, 0.76);
      animation: reviveCheatFlight var(--revive-duration, 1900ms) cubic-bezier(0.14, 0.78, 0.22, 1) both;
    }

    .revive-cheat-flight-piece::before {
      content: "";
      position: absolute;
      inset: 8%;
      border-radius: 50%;
      box-shadow:
        inset 0 0 0 2px var(--piece-inner-ring),
        inset 0 0 0 5px var(--piece-inner-glow);
    }

    .revive-cheat-flight-piece::after {
      content: "死棋回場";
      position: absolute;
      left: 50%;
      bottom: calc(100% + 4px);
      translate: -50% 0;
      padding: 2px 7px;
      border: 1px solid rgba(255, 247, 251, 0.78);
      border-radius: 999px;
      color: #fff7fb;
      background: rgba(132, 18, 82, 0.94);
      box-shadow: 0 0 14px rgba(255, 91, 167, 0.78);
      font-size: 0.58rem;
      white-space: nowrap;
    }

    .revive-cheat-flight-piece span {
      position: relative;
      z-index: 1;
    }

    .board.advantage-reversal-active {
      animation: advantageReversalBoardLurch 680ms cubic-bezier(0.16, 0.86, 0.22, 1.08) both;
    }

    .cell.advantage-reversal-stolen {
      outline: 4px solid rgba(255, 91, 167, 0.92);
      outline-offset: -4px;
      background:
        radial-gradient(circle, rgba(255, 247, 251, 0.32), transparent 44%),
        linear-gradient(135deg, rgba(255, 91, 167, 0.34), rgba(27, 0, 18, 0.22));
      box-shadow:
        inset 0 0 40px rgba(255, 91, 167, 0.70),
        0 0 24px rgba(255, 91, 167, 0.55);
    }

    .cell.advantage-reversal-revived {
      background: radial-gradient(circle, rgba(240, 212, 137, 0.32), transparent 62%);
      box-shadow:
        inset 0 0 30px rgba(240, 212, 137, 0.34),
        0 0 22px rgba(255, 91, 167, 0.42);
    }

    .cell.advantage-reversal-revived .piece-motion {
      animation: advantageReversalUnderlyingArrival 2800ms ease-out both;
    }

    .advantage-reversal-layer {
      position: absolute;
      inset: 0;
      z-index: 12;
      pointer-events: none;
      overflow: visible;
      contain: layout style;
    }

    .advantage-reversal-sweep {
      position: absolute;
      inset: 0;
      background:
        linear-gradient(115deg, transparent 18%, rgba(255, 91, 167, 0.22) 36%, rgba(255, 247, 251, 0.32) 47%, rgba(183, 140, 255, 0.20) 58%, transparent 76%);
      opacity: 0;
      mix-blend-mode: screen;
      animation: advantageReversalSweep var(--advantage-duration, 2800ms) ease-out both;
    }

    .advantage-reversal-reveal-note {
      position: absolute;
      inset: 6px 0 auto;
      width: max-content;
      max-width: calc(100% - 20px);
      box-sizing: border-box;
      margin-inline: auto;
      padding: 5px 9px;
      border: 1px solid rgba(240, 212, 137, .72);
      color: #fff2db;
      background: #2b1827;
      font: 600 13px/1.4 system-ui, sans-serif;
      text-align: center;
    }


    .advantage-reversal-missing-outline {
      position: absolute;
      left: var(--ghost-start-x);
      top: var(--ghost-start-y);
      width: 9.6%;
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      translate: -50% -50%;
      border-radius: 50%;
      border: 3px dotted rgba(255, 247, 251, 0.84);
      color: rgba(255, 247, 251, 0.34);
      font-family: "Microsoft JhengHei", "Noto Serif TC", serif;
      font-size: 1.12rem;
      font-weight: 900;
      line-height: 1;
      opacity: 0;
      animation: advantageReversalMissingOutline var(--advantage-duration, 2800ms) ease-out both;
    }

    .advantage-reversal-absence-ping,
    .advantage-reversal-arrival-sigil {
      position: absolute;
      width: 12.4%;
      aspect-ratio: 1;
      translate: -50% -50%;
      border-radius: 50%;
      pointer-events: none;
      opacity: 0;
    }

    .advantage-reversal-absence-ping {
      left: var(--ghost-start-x);
      top: var(--ghost-start-y);
      border: 2px solid rgba(255, 247, 251, 0.78);
      background:
        repeating-linear-gradient(135deg, rgba(255, 247, 251, 0.20) 0 2px, transparent 2px 7px),
        radial-gradient(circle, rgba(255, 91, 167, 0.34), transparent 62%);
      box-shadow:
        inset 0 0 20px rgba(255, 91, 167, 0.30),
        0 0 26px rgba(255, 91, 167, 0.70);
      animation-name: advantageReversalAbsencePing;
      animation-duration: var(--advantage-duration, 2800ms);
      animation-timing-function: ease-out;
      animation-fill-mode: both;
    }

    .advantage-reversal-absence-ping::before,
    .advantage-reversal-absence-ping::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 72%;
      height: 3px;
      border-radius: 999px;
      background: rgba(255, 247, 251, 0.86);
      box-shadow: 0 0 10px rgba(255, 91, 167, 0.76);
      translate: -50% -50%;
      rotate: 45deg;
    }

    .advantage-reversal-absence-ping::after {
      rotate: -45deg;
    }

    .advantage-reversal-arrival-sigil {
      left: var(--ghost-end-x);
      top: var(--ghost-end-y);
      border: 2px solid rgba(240, 212, 137, 0.86);
      background:
        radial-gradient(circle, rgba(255, 247, 251, 0.24), transparent 38%),
        radial-gradient(circle, rgba(255, 91, 167, 0.32), transparent 62%);
      box-shadow:
        inset 0 0 18px rgba(240, 212, 137, 0.20),
        0 0 24px rgba(240, 212, 137, 0.56),
        0 0 34px rgba(255, 91, 167, 0.56);
      animation-name: advantageReversalArrivalSigil;
      animation-duration: var(--advantage-duration, 2800ms);
      animation-timing-function: ease-out;
      animation-fill-mode: both;
    }

    .advantage-reversal-stolen-ghost,
    .advantage-reversal-revive-ghost {
      position: absolute;
      left: var(--ghost-start-x);
      top: var(--ghost-start-y);
      width: 10.444444%;
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      translate: -50% -50%;
      border-radius: 50%;
      border: 3px solid var(--piece-ring);
      font-family: "Microsoft JhengHei", "Noto Serif TC", serif;
      font-size: 1.12rem;
      font-weight: 900;
      line-height: 1;
      opacity: 0;
      box-shadow:
        inset 0 2px 0 rgba(255, 246, 208, 0.72),
        inset 0 -4px 0 rgba(89, 55, 26, 0.34),
        0 0 0 3px rgba(255, 91, 167, 0.44),
        0 14px 26px rgba(0, 0, 0, 0.44),
        0 0 26px rgba(255, 91, 167, 0.72);
    }

    .advantage-reversal-stolen-ghost {
      background: var(--piece-red-bg);
      color: var(--piece-red-text);
      animation: advantageReversalStolenGhost var(--advantage-duration, 2800ms) ease-out both;
    }

    .advantage-reversal-revive-ghost {
      background: var(--piece-black-bg);
      color: var(--piece-black-text);
      animation: advantageReversalReviveGhost var(--advantage-duration, 2800ms) ease-out both;
    }

    .advantage-reversal-stolen-ghost::before,
    .advantage-reversal-revive-ghost::before {
      content: "";
      position: absolute;
      inset: -18%;
      border-radius: 50%;
      border: 1px solid rgba(255, 247, 251, 0.64);
      box-shadow: 0 0 18px rgba(255, 91, 167, 0.68);
      animation: reviveCheatSummonRing 1100ms ease-out both;
    }

    .cell.last-from,
    .cell.last-to {
      background: rgba(240, 212, 137, 0.22);
    }

    /* Origin reads as a faint "ghost" of where the piece was; the arrival square owns the strong frame. */
    .cell.ai-last-from {
      background: rgba(240, 212, 137, 0.08);
    }

    .cell.ai-last-to {
      background:
        linear-gradient(135deg, rgba(240, 212, 137, 0.32), rgba(255, 91, 167, 0.10)),
        rgba(240, 212, 137, 0.18);
      box-shadow:
        inset 0 0 0 3px rgba(240, 212, 137, 0.76),
        inset 0 0 24px rgba(240, 212, 137, 0.20);
    }

    .cell.ai-last-from::after,
    .cell.ai-last-to::after {
      content: "";
      position: absolute;
      pointer-events: none;
      z-index: 2;
    }

    .cell.ai-last-from::after {
      inset: 22%;
      border: 2px dashed rgba(240, 212, 137, 0.46);
      border-radius: 50%;
    }

    .cell.ai-last-to::after {
      inset: 8px;
      border: 1px solid rgba(255, 247, 251, 0.42);
      border-radius: 8px;
    }

    .cell.ai-last-to::after {
      animation: aiMoveArrivalPulse 760ms ease-out both;
    }

    .board.checkmate-loss {
      animation: boardDefeatPulse 1100ms ease-out both;
      box-shadow:
        inset 0 0 0 5px rgba(255, 232, 169, 0.16),
        inset 0 0 48px rgba(108, 0, 30, 0.68),
        0 0 0 2px rgba(255, 91, 167, 0.44),
        0 18px 48px rgba(0, 0, 0, 0.46);
    }

    .board.checkmate-loss::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 5;
      pointer-events: none;
      background:
        radial-gradient(circle at 50% 82%, rgba(255, 246, 218, 0.18), transparent 9rem),
        radial-gradient(circle at 50% 82%, rgba(255, 31, 82, 0.36), transparent 17rem),
        linear-gradient(180deg, rgba(35, 0, 18, 0.04), rgba(57, 0, 22, 0.38));
      animation: checkmateBoardWash 1400ms ease-out both;
    }

    .board.player-win {
      animation: boardVictoryPulse 1100ms ease-out both;
      box-shadow:
        inset 0 0 0 5px rgba(255, 246, 218, 0.20),
        inset 0 0 46px rgba(240, 212, 137, 0.38),
        0 0 0 2px rgba(240, 212, 137, 0.54),
        0 18px 48px rgba(0, 0, 0, 0.42);
    }

    .board.player-win::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 5;
      pointer-events: none;
      background:
        radial-gradient(circle at 50% 18%, rgba(255, 247, 251, 0.22), transparent 9rem),
        radial-gradient(circle at 50% 18%, rgba(240, 212, 137, 0.28), transparent 17rem),
        linear-gradient(180deg, rgba(240, 212, 137, 0.18), rgba(57, 0, 34, 0.22));
      animation: victoryBoardWash 1400ms ease-out both;
    }

    .losing-pressure-layer {
      position: absolute;
      inset: 0;
      z-index: 0;
      overflow: hidden;
      pointer-events: none;
      contain: layout paint style;
    }

    .losing-pressure-tint {
      position: absolute;
      inset: 0;
      opacity: 0.38;
      background:
        radial-gradient(circle at 50% 78%, rgba(255, 91, 167, 0.14), transparent 13rem),
        radial-gradient(circle at 50% 18%, rgba(92, 26, 88, 0.18), transparent 14rem),
        linear-gradient(180deg, rgba(49, 0, 29, 0.05), rgba(83, 0, 42, 0.14));
    }

    .losing-pressure-heartbeat {
      position: absolute;
      left: 50%;
      top: 55%;
      width: 32%;
      aspect-ratio: 1;
      translate: -50% -50%;
      border: 2px solid rgba(255, 116, 181, 0.22);
      border-radius: 50%;
      box-shadow:
        0 0 24px rgba(255, 91, 167, 0.18),
        inset 0 0 24px rgba(255, 91, 167, 0.08);
    }

    .checkmate-banner {
      position: absolute;
      left: 50%;
      top: 50%;
      z-index: 7;
      width: min(82%, 360px);
      transform: translate(-50%, -50%);
      display: grid;
      gap: 6px;
      justify-items: center;
      padding: 16px 18px;
      border: 1px solid rgba(255, 239, 206, 0.56);
      border-radius: 8px;
      color: #fff7fb;
      text-align: center;
      pointer-events: none;
      background:
        linear-gradient(135deg, rgba(255, 91, 167, 0.28), rgba(83, 18, 55, 0.82)),
        rgba(28, 8, 22, 0.88);
      box-shadow:
        0 0 0 1px rgba(255, 91, 167, 0.28),
        0 18px 42px rgba(0, 0, 0, 0.42),
        inset 0 0 32px rgba(255, 91, 167, 0.16);
      animation: checkmateBannerEnter 760ms cubic-bezier(0.2, 0.86, 0.2, 1.08) both;
    }

    .checkmate-banner strong {
      color: #ffe6f1;
      font-size: clamp(2rem, 7vw, 4.1rem);
      line-height: 0.95;
      letter-spacing: 0;
      text-shadow:
        0 0 16px rgba(255, 91, 167, 0.86),
        0 2px 0 rgba(54, 0, 22, 0.82);
    }

    .checkmate-banner span {
      color: rgba(255, 246, 250, 0.88);
      font-size: clamp(0.82rem, 2.2vw, 1rem);
      font-weight: 700;
    }

    .defeat-replay {
      position: absolute;
      left: 50%;
      top: 66%;
      z-index: 8;
      width: min(84%, 430px);
      translate: -50% 0;
      display: grid;
      gap: 7px;
      padding: 11px 13px 12px;
      border: 1px solid rgba(255, 129, 178, 0.58);
      border-radius: 8px;
      color: #fff7fb;
      pointer-events: none;
      background:
        linear-gradient(135deg, rgba(91, 8, 50, 0.82), rgba(25, 3, 18, 0.88)),
        rgba(31, 5, 22, 0.88);
      box-shadow:
        0 0 0 1px rgba(255, 91, 167, 0.22),
        0 14px 30px rgba(17, 0, 10, 0.42),
        inset 0 0 22px rgba(255, 91, 167, 0.12);
      animation: defeatReplayEnter 900ms cubic-bezier(0.2, 0.86, 0.2, 1.04) both;
    }

    .defeat-replay h3,
    .defeat-replay p,
    .defeat-replay ul {
      margin: 0;
    }

    .defeat-replay h3 {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: #ffdce9;
      font-size: 0.86rem;
      line-height: 1.18;
      letter-spacing: 0;
      text-shadow: 0 0 10px rgba(255, 91, 167, 0.58);
    }

    .defeat-replay h3 span {
      color: rgba(255, 236, 246, 0.78);
      font-size: 0.72rem;
      font-weight: 800;
      white-space: nowrap;
    }

    .defeat-replay ul {
      display: grid;
      gap: 4px;
      padding: 0;
      list-style: none;
    }

    .defeat-replay li {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 6px;
      align-items: baseline;
      color: rgba(255, 244, 249, 0.86);
      font-size: 0.74rem;
      font-weight: 800;
      line-height: 1.25;
    }

    .defeat-replay li::before {
      content: "";
      width: 0.42rem;
      height: 0.42rem;
      margin-top: 0.28rem;
      border-radius: 50%;
      background: #ff5ba7;
      box-shadow: 0 0 11px rgba(255, 91, 167, 0.86);
    }

    .defeat-replay-closing {
      color: rgba(255, 226, 239, 0.92);
      font-size: 0.72rem;
      font-weight: 900;
      line-height: 1.28;
      text-align: right;
    }

    .victory-banner {
      position: absolute;
      left: 50%;
      top: 50%;
      z-index: 7;
      width: min(82%, 380px);
      transform: translate(-50%, -50%);
      display: grid;
      gap: 7px;
      justify-items: center;
      padding: 16px 18px;
      border: 1px solid rgba(255, 247, 251, 0.70);
      border-radius: 8px;
      color: #fff7fb;
      text-align: center;
      pointer-events: auto;
      background:
        linear-gradient(135deg, rgba(240, 212, 137, 0.34), rgba(88, 22, 64, 0.82)),
        rgba(26, 9, 22, 0.90);
      box-shadow:
        0 0 0 1px rgba(240, 212, 137, 0.32),
        0 18px 42px rgba(0, 0, 0, 0.42),
        inset 0 0 34px rgba(240, 212, 137, 0.18);
      animation: victoryBannerEnter 760ms cubic-bezier(0.2, 0.86, 0.2, 1.08) both;
    }

    .victory-banner strong {
      color: #fff7fb;
      font-size: clamp(2rem, 7vw, 4rem);
      line-height: 0.95;
      letter-spacing: 0;
      text-shadow:
        0 0 16px rgba(240, 212, 137, 0.78),
        0 2px 0 rgba(54, 0, 22, 0.82);
    }

    .victory-banner span {
      color: rgba(255, 246, 250, 0.9);
      font-size: clamp(0.82rem, 2.2vw, 1rem);
      font-weight: 800;
    }

    .contract-result-banner {
      position: absolute;
      right: 12px;
      top: 12px;
      z-index: 9;
      width: min(58%, 270px);
      display: grid;
      gap: 3px;
      padding: 9px 11px;
      border: 1px solid rgba(255, 129, 178, 0.66);
      border-radius: 8px;
      color: #fff7fb;
      text-align: left;
      pointer-events: none;
      background:
        linear-gradient(135deg, rgba(255, 51, 111, 0.82), rgba(83, 10, 42, 0.88)),
        rgba(35, 5, 23, 0.90);
      box-shadow:
        0 0 0 1px rgba(255, 66, 132, 0.26),
        0 10px 24px rgba(32, 0, 16, 0.36),
        inset 0 0 20px rgba(255, 151, 190, 0.18);
      animation: contractResultPulse 1500ms ease-out both;
    }

    .contract-result-banner strong {
      color: #fff0f6;
      font-size: 0.92rem;
      line-height: 1.15;
      letter-spacing: 0;
      text-shadow: 0 0 12px rgba(255, 174, 206, 0.72);
    }

    .contract-result-banner span {
      color: rgba(255, 236, 246, 0.88);
      font-size: 0.72rem;
      font-weight: 800;
      line-height: 1.25;
    }

    .board.cheat-declaring {
      animation: cheatDeclarationImpact 980ms cubic-bezier(0.18, 0.86, 0.22, 1) both;
      box-shadow:
        inset 0 0 0 3px rgba(255, 232, 245, 0.18),
        inset 0 0 34px rgba(255, 91, 167, 0.38),
        0 0 0 2px rgba(255, 91, 167, 0.52),
        0 18px 48px rgba(37, 0, 22, 0.48);
    }

    .board.cheat-declaring::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 6;
      pointer-events: none;
      background:
        linear-gradient(115deg, transparent 0 34%, rgba(255, 232, 245, 0.46) 38%, rgba(255, 74, 159, 0.16) 43%, transparent 49%),
        repeating-linear-gradient(0deg, rgba(255, 116, 181, 0.12) 0 1px, transparent 1px 13px),
        radial-gradient(circle at 50% 50%, rgba(255, 238, 248, 0.24), transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(255, 91, 167, 0.34), transparent 50%),
        linear-gradient(135deg, rgba(255, 45, 132, 0.18), rgba(85, 18, 62, 0.24));
      mix-blend-mode: screen;
      animation:
        cheatDeclarationBoardWash 980ms ease-out both,
        cheatDeclarationGlitchSweep 980ms cubic-bezier(0.16, 0.88, 0.22, 1) both;
    }

    .board.cheat-declaring::after {
      content: attr(data-cheat-declaration-label);
      position: absolute;
      left: 50%;
      top: 50%;
      z-index: 7;
      pointer-events: none;
      width: min(82%, 440px);
      padding: 6px 0 9px;
      border-top: 2px solid rgba(255, 217, 238, 0.72);
      border-bottom: 2px solid rgba(255, 42, 132, 0.58);
      color: rgba(255, 236, 248, 0.98);
      font-size: clamp(1.28rem, 4.8vw, 2.6rem);
      font-weight: 1000;
      text-align: center;
      letter-spacing: 0.08em;
      white-space: nowrap;
      background:
        linear-gradient(90deg, transparent, rgba(255, 36, 132, 0.18) 14% 86%, transparent),
        linear-gradient(180deg, transparent 0 43%, rgba(255, 238, 248, 0.18) 44% 48%, transparent 49% 100%);
      box-shadow:
        0 0 0 1px rgba(255, 91, 167, 0.26),
        0 0 24px rgba(255, 42, 132, 0.46),
        0 10px 32px rgba(45, 0, 28, 0.38);
      text-shadow:
        0 2px 0 rgba(58, 0, 36, 0.82),
        0 0 8px rgba(255, 235, 247, 0.7),
        0 0 20px rgba(255, 46, 142, 0.82);
      -webkit-text-stroke: 1px rgba(76, 0, 45, 0.62);
      transform: translate(-50%, -50%) rotate(-8deg) skewX(-8deg) scale(0.9);
      clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
      animation:
        cheatDeclarationStamp 980ms cubic-bezier(0.16, 0.88, 0.22, 1.06) both,
        cheatDeclarationSealCut 980ms steps(2, end) both;
    }

    .board.cheat-declaring[data-cheat-declaration-kind="time"]::before {
      background:
        linear-gradient(115deg, transparent 0 32%, rgba(255, 232, 245, 0.5) 37%, rgba(255, 74, 159, 0.16) 43%, transparent 50%),
        repeating-linear-gradient(90deg, rgba(255, 116, 181, 0.12) 0 1px, transparent 1px 14px),
        radial-gradient(circle at 50% 12%, rgba(255, 238, 248, 0.28), transparent 24%),
        linear-gradient(180deg, rgba(255, 91, 167, 0.36), rgba(96, 22, 72, 0.28));
    }

    .board.cheat-declaring[data-cheat-declaration-kind="time"]::after {
      top: 20%;
      transform: translate(-50%, -50%) rotate(3deg) skewX(-8deg) scale(0.92);
    }

    .board.cheat-declaring[data-cheat-declaration-kind="revive"]::before {
      background:
        linear-gradient(115deg, transparent 0 32%, rgba(255, 232, 245, 0.48) 38%, rgba(255, 74, 159, 0.16) 44%, transparent 51%),
        repeating-linear-gradient(0deg, rgba(255, 116, 181, 0.12) 0 1px, transparent 1px 13px),
        radial-gradient(circle at 8% 50%, rgba(255, 238, 248, 0.24), transparent 21%),
        linear-gradient(90deg, rgba(255, 91, 167, 0.42), rgba(84, 18, 62, 0.26));
    }

    .board.cheat-declaring[data-cheat-declaration-kind="revive"]::after {
      left: 26%;
      width: min(56%, 320px);
      transform: translate(-50%, -50%) rotate(-12deg) skewX(-8deg) scale(0.92);
    }

    .board.cheat-declaring[data-cheat-declaration-kind="director"]::after {
      top: 44%;
      width: min(76%, 400px);
    }

    .board.check-pressure {
      box-shadow:
        inset 0 0 0 2px rgba(255, 232, 245, 0.18),
        inset 0 0 34px rgba(255, 42, 132, 0.24),
        0 0 34px rgba(255, 42, 132, 0.24);
    }

    .cell.checkmated-general {
      background:
        radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 44%),
        rgba(255, 32, 84, 0.24);
      box-shadow:
        inset 0 0 0 3px rgba(255, 238, 206, 0.84),
        inset 0 0 30px rgba(255, 32, 84, 0.42),
        0 0 16px rgba(255, 32, 84, 0.28);
    }

    .cell.checkmated-general .piece {
      animation: defeatedPieceSink 900ms ease-out both;
    }

    .cell.checked-general {
      background:
        radial-gradient(circle, rgba(255, 70, 120, 0.42) 0 38%, rgba(255, 42, 132, 0.16) 58%, transparent 72%);
      box-shadow:
        inset 0 0 0 2px rgba(255, 214, 228, 0.86),
        inset 0 0 24px rgba(255, 42, 100, 0.42),
        0 0 18px rgba(255, 42, 100, 0.38);
      border-radius: 50%;
      animation: checkedGeneralPulse 1.1s ease-in-out infinite;
    }

    .cell.checked-general .piece {
      box-shadow: 0 0 10px 2px rgba(255, 56, 110, 0.7);
      border-radius: 50%;
    }

    @keyframes checkedGeneralPulse {
      0%, 100% {
        box-shadow:
          inset 0 0 0 2px rgba(255, 214, 228, 0.86),
          inset 0 0 24px rgba(255, 42, 100, 0.42),
          0 0 18px rgba(255, 42, 100, 0.38);
      }
      50% {
        box-shadow:
          inset 0 0 0 3px rgba(255, 236, 242, 0.96),
          inset 0 0 30px rgba(255, 42, 100, 0.56),
          0 0 26px rgba(255, 42, 100, 0.55);
      }
    }

    .cell.checkmate-attacker {
      background:
        radial-gradient(circle, rgba(255, 244, 210, 0.26), transparent 48%),
        rgba(255, 91, 167, 0.20);
      box-shadow:
        inset 0 0 0 3px rgba(255, 91, 167, 0.82),
        inset 0 0 26px rgba(255, 91, 167, 0.32),
        0 0 16px rgba(255, 91, 167, 0.26);
    }

    .checkmate-attack {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 6;
      overflow: visible;
    }

    .checkmate-triangle {
      fill: rgba(255, 72, 132, 0.9);
      stroke: rgba(255, 246, 218, 0.78);
      stroke-width: 0.035;
      transform-box: fill-box;
      transform-origin: center;
    }

    .checkmate-triangle.hot {
      fill: rgba(255, 236, 245, 0.96);
      stroke: rgba(255, 72, 132, 0.92);
    }

    .checkmate-impact {
      fill: rgba(255, 72, 132, 0.16);
      stroke: rgba(255, 246, 218, 0.84);
      stroke-width: 0.05;
      transform-box: fill-box;
      transform-origin: center;
    }

    .cell.fatal-blunder-mistake {
      background:
        radial-gradient(circle, rgba(255, 50, 134, 0.34), transparent 52%),
        rgba(80, 8, 47, 0.24);
      box-shadow:
        inset 0 0 0 3px rgba(255, 92, 166, 0.86),
        inset 0 0 24px rgba(255, 40, 126, 0.36),
        0 0 18px rgba(255, 40, 126, 0.34);
      animation: fatalBlunderMistakePulse 620ms ease-in-out infinite alternate;
    }

    .cell.fatal-blunder-killer-source {
      background: radial-gradient(circle, rgba(255, 225, 132, 0.42), transparent 58%);
      box-shadow:
        inset 0 0 0 3px rgba(255, 226, 145, 0.9),
        0 0 18px rgba(255, 190, 90, 0.42);
    }

    .cell.fatal-blunder-killer-target {
      background: radial-gradient(circle, rgba(255, 50, 120, 0.46), transparent 58%);
      box-shadow:
        inset 0 0 0 4px rgba(255, 70, 139, 0.92),
        inset 0 0 28px rgba(255, 29, 105, 0.42),
        0 0 22px rgba(255, 46, 125, 0.48);
      animation: fatalBlunderTargetPulse 520ms ease-in-out infinite alternate;
    }

    .fatal-blunder-killer-line {
      z-index: 11;
    }

    .fatal-blunder-killer-line .checkmate-triangle {
      opacity: 0.3;
      animation: fatalBlunderTriangleFlow 760ms ease-in-out infinite;
      animation-delay: calc(var(--triangle-index, 0) * 85ms);
    }

    .fatal-blunder-killer-line .checkmate-impact {
      animation: fatalBlunderImpact 700ms ease-in-out infinite alternate;
    }

    .fatal-blunder-killer-ghost {
      position: absolute;
      left: var(--killer-target-x);
      top: var(--killer-target-y);
      width: 10.444444%;
      aspect-ratio: 1;
      translate: -50% -50%;
      z-index: 12;
      pointer-events: none;
      animation: fatalBlunderKillerGhost 780ms ease-in-out infinite alternate;
    }

    .fatal-blunder-killer-ghost .board-move-fx-piece {
      inset: 0;
      width: 100%;
      translate: 0 0;
      opacity: 0.82;
      border-color: rgba(255, 240, 186, 0.92);
      box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.76),
        inset 0 -4px 0 rgba(89, 55, 26, 0.26),
        0 0 20px rgba(255, 54, 138, 0.72);
    }

    .ai-move-arrow {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 4;
      overflow: visible;
      opacity: 0.68;
    }

    .ai-move-arrow-line {
      stroke: rgba(255, 247, 251, 0.86);
      stroke-width: 4px;
      stroke-linecap: round;
      vector-effect: non-scaling-stroke;
      stroke-dasharray: 0.18 0.16;
      animation: aiMoveArrowSweep 820ms ease-out both;
    }

    .ai-move-arrow-head {
      fill: rgba(255, 247, 251, 0.9);
    }

    .piece {
      --piece-size: min(94cqw, 94cqh);
      --piece-text-size: min(46cqw, 46cqh);
      width: var(--piece-size);
      height: var(--piece-size);
      aspect-ratio: 1;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      z-index: 3;
      font-family: "Microsoft JhengHei", "Noto Serif TC", serif;
      font-weight: 900;
      font-size: var(--piece-text-size);
      line-height: 1;
      user-select: none;
    }

    .piece::before,
    .piece::after {
      content: "";
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
    }

    .piece::before {
      inset: 8%;
      border: 2px solid var(--piece-inner-ring);
      outline: 3px solid var(--piece-inner-glow);
      outline-offset: -6px;
    }

    .piece::after {
      inset: 20%;
      border: 1px solid rgba(93, 52, 27, 0.28);
    }

    .piece.red {
      color: var(--piece-red-text);
      border: 3px solid var(--piece-ring);
      background: var(--piece-red-bg);
    }

    .piece.black {
      color: var(--piece-black-text);
      border: 3px solid var(--piece-ring);
      background: var(--piece-black-bg);
    }

    .piece.general {
      box-shadow:
        inset 0 1px 0 rgba(255, 246, 208, 0.62),
        inset 0 -2px 0 rgba(89, 55, 26, 0.28),
        0 0 0 3px rgba(240, 212, 137, 0.46),
        0 3px 6px rgba(0, 0, 0, 0.24);
    }

    .piece.name-corrupted {
      box-shadow:
        inset 0 2px 0 rgba(255, 246, 208, 0.62),
        inset 0 -4px 0 rgba(89, 55, 26, 0.30),
        0 0 0 3px rgba(255, 91, 167, 0.68),
        0 0 16px rgba(255, 91, 167, 0.62),
        0 4px 9px rgba(0, 0, 0, 0.34);
    }

    .piece.name-corrupted::before {
      inset: 5%;
      box-shadow:
        inset 0 0 0 2px rgba(255, 247, 251, 0.55),
        inset 0 0 0 6px rgba(255, 91, 167, 0.18),
        0 0 12px rgba(255, 91, 167, 0.42);
    }

    .piece.name-corrupted.level-3 {
      animation: pieceCorruptionDiscPulse 620ms ease-in-out infinite;
    }

    .piece-label {
      position: relative;
      display: inline-grid;
      place-items: center;
      min-width: 1em;
      max-width: 86%;
      max-height: 86%;
      z-index: 1;
      line-height: 1;
      overflow: hidden;
    }

    .piece-label.piece-name-corrupted {
      display: inline-block;
      color: #fff7fb;
      text-shadow:
        0 0 5px rgba(255, 91, 167, 0.92),
        0 0 11px rgba(240, 212, 137, 0.42),
        0 1px 0 rgba(74, 18, 52, 0.72);
    }

    .piece-label.piece-name-corrupted::before {
      content: "";
      position: absolute;
      left: -0.22em;
      right: -0.22em;
      top: 50%;
      height: 3px;
      border-radius: 999px;
      background: rgba(255, 91, 167, 0.78);
      box-shadow:
        0 0 8px rgba(255, 91, 167, 0.86),
        0 0 14px rgba(240, 212, 137, 0.30);
      transform: translateY(-50%) rotate(-8deg);
      opacity: 0.78;
      pointer-events: none;
      animation: pieceNameOverwriteSlash 1100ms ease-in-out infinite;
    }

    .piece-label.piece-name-corrupted.level-2 {
      animation: pieceNameCorruptJitter 780ms steps(2, end) infinite;
    }

    .piece-label.piece-name-corrupted.level-3 {
      animation: pieceNameCorruptJitter 420ms steps(2, end) infinite;
    }

    .piece-corruption-badge {
      position: absolute;
      right: -12px;
      top: -9px;
      z-index: 5;
      padding: 2px 5px;
      border: 1px solid rgba(255, 247, 251, 0.72);
      border-radius: 999px;
      color: #fff7fb;
      background:
        linear-gradient(180deg, rgba(255, 213, 237, 0.34), transparent 46%),
        rgba(174, 30, 102, 0.92);
      box-shadow:
        0 0 10px rgba(255, 91, 167, 0.74),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
      font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
      font-size: 0.48rem;
      font-weight: 900;
      line-height: 1;
      letter-spacing: 0;
      transform: rotate(8deg);
      pointer-events: none;
      animation: pieceCorruptionBadge 920ms ease-in-out infinite;
    }

    body[data-vision-debuff="1"] {
      --vision-label-opacity: 0.94;
      --vision-label-speed: 920ms;
      --vision-label-shift-negative: -1.5px;
      --vision-label-shift-positive: 1.5px;
      --vision-scan-opacity: 0.48;
      --vision-scan-speed: 1220ms;
      --vision-ghost-opacity: 0.42;
      --vision-ghost-speed: 820ms;
      --vision-ghost-left: -4px;
      --vision-ghost-right: 4px;
    }

    body[data-vision-debuff="2"] {
      --vision-label-opacity: 0.88;
      --vision-label-speed: 670ms;
      --vision-label-shift-negative: -2.6px;
      --vision-label-shift-positive: 2.6px;
      --vision-scan-opacity: 0.66;
      --vision-scan-speed: 900ms;
      --vision-ghost-opacity: 0.62;
      --vision-ghost-speed: 590ms;
      --vision-ghost-left: -7px;
      --vision-ghost-right: 7px;
    }

    body[data-vision-debuff="3"] {
      --vision-label-opacity: 0.80;
      --vision-label-speed: 450ms;
      --vision-label-shift-negative: -4px;
      --vision-label-shift-positive: 4px;
      --vision-scan-opacity: 0.82;
      --vision-scan-speed: 650ms;
      --vision-ghost-opacity: 0.78;
      --vision-ghost-speed: 390ms;
      --vision-ghost-left: -11px;
      --vision-ghost-right: 11px;
    }

    body:is([data-vision-debuff="1"], [data-vision-debuff="2"], [data-vision-debuff="3"]) .piece-label:not(.piece-name-corrupted) {
      opacity: var(--vision-label-opacity);
      text-shadow:
        0 0 5px rgba(255, 247, 251, 0.54),
        0 0 11px rgba(255, 91, 167, 0.40),
        var(--vision-label-shift-negative) 0 rgba(255, 91, 167, 0.34),
        var(--vision-label-shift-positive) 0 rgba(112, 211, 255, 0.28);
      animation: visionLabelScramble var(--vision-label-speed) steps(2, end) infinite;
    }

    /* One label jitter per piece plus two board overlays replaces two extra
       infinite pseudo-element animations on every live piece. */
    body:is([data-vision-debuff="1"], [data-vision-debuff="2"], [data-vision-debuff="3"]) .piece-label:not(.piece-name-corrupted)::before,
    body:is([data-vision-debuff="1"], [data-vision-debuff="2"], [data-vision-debuff="3"]) .piece-label:not(.piece-name-corrupted)::after {
      content: none;
      animation: none;
    }

    body:is([data-vision-debuff="1"], [data-vision-debuff="2"], [data-vision-debuff="3"]) .board-atmosphere-layer::before,
    body:is([data-vision-debuff="1"], [data-vision-debuff="2"], [data-vision-debuff="3"]) .board-atmosphere-layer::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
    }

    body:is([data-vision-debuff="1"], [data-vision-debuff="2"], [data-vision-debuff="3"]) .board-atmosphere-layer::before {
      background:
        linear-gradient(180deg, transparent 0 42%, rgba(255, 247, 251, 0.30) 48%, rgba(255, 91, 167, 0.36) 51%, transparent 58%),
        repeating-linear-gradient(180deg, transparent 0 16px, rgba(112, 211, 255, 0.055) 17px, transparent 18px);
      mix-blend-mode: screen;
      opacity: var(--vision-scan-opacity);
      animation: visionBoardScan var(--vision-scan-speed) ease-in-out infinite;
    }

    body:is([data-vision-debuff="1"], [data-vision-debuff="2"], [data-vision-debuff="3"]) .board-atmosphere-layer::after {
      inset: 2.5%;
      border: 1px solid rgba(255, 91, 167, 0.30);
      box-shadow:
        var(--vision-ghost-left) 0 rgba(255, 91, 167, 0.13),
        var(--vision-ghost-right) 0 rgba(112, 211, 255, 0.11),
        inset 0 0 26px rgba(255, 91, 167, 0.10);
      opacity: var(--vision-ghost-opacity);
      animation: visionBoardGhost var(--vision-ghost-speed) steps(2, end) infinite;
    }

    .dead-piece {
      --captured-piece-size: 34px;
      width: var(--captured-piece-size);
      aspect-ratio: 1;
      border-radius: 50%;
      display: grid;
      place-items: center;
      position: relative;
      font-family: "Microsoft JhengHei", "Noto Serif TC", serif;
      font-size: calc(var(--captured-piece-size) * .49);
      font-weight: 900;
      line-height: 1;
      opacity: 0.78;
      transform: rotate(-9deg) translateY(2px);
      box-shadow:
        inset 0 1px 0 rgba(255, 246, 208, 0.34),
        inset 0 -2px 0 rgba(58, 39, 24, 0.32),
        0 2px 5px rgba(0, 0, 0, 0.28);
    }

    .dead-piece:nth-child(2n) {
      transform: rotate(8deg) translateY(2px);
    }

    .dead-piece.red {
      color: rgba(213, 50, 68, 0.82);
      border: 2px solid rgba(213, 50, 68, 0.55);
      background:
        linear-gradient(180deg, rgba(255, 241, 205, 0.32), transparent 30%),
        linear-gradient(180deg, #c9aa76 0%, #9e774a 64%, #64472f 100%);
    }

    .dead-piece.black {
      color: rgba(21, 17, 24, 0.78);
      border: 2px solid rgba(36, 30, 33, 0.58);
      background:
        linear-gradient(180deg, rgba(255, 241, 205, 0.26), transparent 30%),
        linear-gradient(180deg, #bba271 0%, #806039 64%, #503b2a 100%);
    }

    .dead-piece.revive-source {
      opacity: 1;
      box-shadow:
        inset 0 1px 0 rgba(255, 246, 208, 0.48),
        inset 0 -2px 0 rgba(58, 39, 24, 0.32),
        0 0 0 3px rgba(255, 91, 167, 0.38),
        0 0 22px rgba(255, 91, 167, 0.72);
      animation: reviveDeadPieceWake 920ms ease-out both;
    }

    @keyframes fullHeartFloat {
      0%,
      100% {
        opacity: 0.56;
        transform: translate(-50%, -50%) scale(var(--heart-scale, 1)) rotate(var(--heart-tilt, -4deg));
      }

      42% {
        opacity: 1;
        transform:
          translate(calc(-50% + var(--heart-drift-x, 14px)), calc(-50% + var(--heart-drift-y, -20px)))
          scale(calc(var(--heart-scale, 1) + 0.18))
          rotate(7deg);
      }

      72% {
        opacity: 0.82;
        transform:
          translate(calc(-50% - 5px), calc(-50% - 13px))
          scale(calc(var(--heart-scale, 1) + 0.06))
          rotate(-5deg);
      }
    }

    @keyframes fullEffectAtmosphere {
      0%,
      100% {
        opacity: 0.28;
        transform: translate3d(-1.5%, 0, 0) scale(1);
      }

      50% {
        opacity: 0.58;
        transform: translate3d(1.5%, 0, 0) scale(1.02);
      }
    }

    @keyframes portraitNegativeTintPulse {
      0%, 100% { transform: scale(1.015); }
      50% { transform: scale(1.035); }
    }

    @keyframes fullEffectPressurePulse {
      0%,
      100% {
        transform: scale(1);
        opacity: 0.98;
      }

      50% {
        transform: scale(1.008);
        opacity: 1;
      }
    }

    @keyframes fullFalseOpeningPulse {
      0%,
      100% {
        opacity: 0.74;
        transform: rotate(45deg) scale(0.96);
      }

      50% {
        opacity: 1;
        transform: rotate(45deg) scale(1.08);
      }
    }

    @keyframes fullTemptationSigilPulse {
      0%,
      100% {
        opacity: 0.78;
        transform: scale(0.96);
      }

      50% {
        opacity: 1;
        transform: scale(1.06);
      }
    }

    @keyframes fullTemptationRing {
      0%,
      100% {
        opacity: 0.52;
        transform: scale(0.94) rotate(0deg);
      }

      50% {
        opacity: 0.92;
        transform: scale(1.08) rotate(10deg);
      }
    }

    @keyframes fullTemptationWhisper {
      0%,
      100% {
        opacity: 0.72;
        transform: translateY(0);
      }

      50% {
        opacity: 1;
        transform: translateY(-4px);
      }
    }

    @keyframes fullCheatCellFlash {
      0% {
        opacity: 0.76;
        transform: scale(0.98);
      }

      48% {
        opacity: 1;
        transform: scale(1.04);
      }

      100% {
        opacity: 1;
        transform: scale(1);
      }
    }

    @keyframes fullClockCriticalPulse {
      0%,
      100% {
        transform: scale(1);
        opacity: 0.92;
      }

      50% {
        transform: scale(1.045);
        opacity: 1;
      }
    }

    @keyframes surrenderHoldFill {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }

    @keyframes dialogueFadeIn {
      0% {
        opacity: 0.18;
        transform: translateY(8px);
      }
      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes dialogueShimmer {
      0% {
        opacity: 0;
        transform: translateX(-100%);
      }
      35% {
        opacity: 0.72;
      }
      100% {
        opacity: 0;
        transform: translateX(100%);
      }
    }

    @keyframes portraitPulse {
      0% {
        transform: translateX(-50%) translateY(8px) scale(1);
      }
      50% {
        transform: translateX(-50%) translateY(2px) scale(1.03);
      }
      100% {
        transform: translateX(-50%) translateY(8px) scale(1);
      }
    }

    @keyframes portraitStillBreath {
      0%,
      100% {
        transform: translateY(0) scale(1);
      }
      50% {
        transform: translateY(-4px) scale(1.015);
      }
    }

    @keyframes advantageReversalPlaceBody {
      0% { opacity: 0; transform: translateY(7px) scale(1.025); }
      24%, 78% { opacity: 1; transform: translateY(0) scale(1.04); }
      100% { opacity: 1; transform: translateY(-2px) scale(1.035); }
    }

    @keyframes advantageReversalPlaceHand {
      0% { opacity: 0; transform: translate3d(7%, -2%, 0) scale(1.045); }
      28%, 76% { opacity: 1; transform: translate3d(0, 0, 0) scale(1.04); }
      100% { opacity: 0.86; transform: translate3d(-1.5%, 1%, 0) scale(1.035); }
    }

    @keyframes advantageReversalChessFall {
      0% { opacity: 1; transform: translate3d(0, -9.62%, 0) scale(1); }
      100% { opacity: 1; transform: translate3d(0, 90.38%, 0) scale(1); }
    }

    @keyframes advantageReversalTauntSettle {
      0% { opacity: 0; transform: translateY(5px) scale(1.055); }
      100% { opacity: 1; transform: translateY(0) scale(1.04); }
    }

    @keyframes advantageReversalFloorAlert {
      0%, 100% { opacity: 0.34; transform: scaleY(0.9); }
      50% { opacity: 1; transform: scaleY(1.08); }
    }

    @keyframes advantageReversalFloorReveal {
      0% { opacity: 0; translate: 0 5%; scale: 1.04; }
      100% { opacity: 1; translate: 0 0; scale: 1; }
    }

    @keyframes advantageReversalChessHotspot {
      0%, 100% { opacity: 0.44; transform: scale(0.86); }
      50% { opacity: 0.92; transform: scale(1.04); }
    }

    @keyframes advantageReversalFeetApproach {
      0% { opacity: 1; transform: scale(1.45); }
      100% { opacity: 1; transform: scale(2.9); }
    }

    @keyframes advantageReversalFeetImpactJelly {
      0% { transform: translate3d(0, 0, 0) rotate(0) scale(2.9); }
      22% { transform: translate3d(-0.7%, 0.45%, 0) rotate(-0.55deg) scale(3.08); }
      43% { transform: translate3d(0.55%, -0.25%, 0) rotate(0.42deg) scale(2.8); }
      63% { transform: translate3d(-0.35%, 0.18%, 0) rotate(-0.28deg) scale(3.01); }
      81% { transform: translate3d(0.2%, -0.1%, 0) rotate(0.16deg) scale(2.86); }
      100% { transform: translate3d(0, 0, 0) rotate(0) scale(2.9); }
    }

    @keyframes advantageReversalSteamRush {
      0% { opacity: 0; translate: 0 7%; scale: 0.92; }
      30% { opacity: 0.44; }
      76% { opacity: 0.28; }
      100% { opacity: 0; translate: 0 -10%; scale: 1.08; }
    }

    @keyframes advantageReversalSteamApproach {
      0% { transform: scale(1); }
      100% { transform: scale(2); }
    }

    @keyframes advantageReversalSniffSidePan {
      0% { transform: translate3d(31%, 0, 0); }
      22% { transform: translate3d(28%, 0, 0); }
      29% { transform: translate3d(-44%, 0, 0); }
      61% { transform: translate3d(-40%, 0, 0); }
      68% { transform: translate3d(34%, 0, 0); }
      100% { transform: translate3d(31%, 0, 0); }
    }

    @keyframes advantageReversalSniffSideBreath {
      0%, 100% { transform: rotate(-0.35deg) scale(1.16); }
      50% { transform: rotate(0.25deg) scale(1.19); }
    }

    @keyframes advantageReversalSniffCloudDriftA {
      0% { translate: 0% 0%; }
      100% { translate: -50% -50%; }
    }

    @keyframes advantageReversalSniffCloudDriftB {
      0% { translate: -50% 0%; }
      100% { translate: 0% -50%; }
    }

    @keyframes advantageReversalSniffCloudBreatheA {
      0%, 100% { opacity: 0.68; }
      50% { opacity: 0.92; }
    }

    @keyframes advantageReversalSniffCloudBreatheB {
      0%, 100% { opacity: 0.34; }
      50% { opacity: 0.56; }
    }

    @keyframes advantageReversalSniffFeetCloseupBreath {
      0%, 100% { scale: 1; }
      50% { scale: 1.03; }
    }

    @keyframes advantageReversalSniffSideBoyTremble {
      0%, 100% { translate: 0px 0px; rotate: 0deg; }
      17% { translate: -1.4px 0.9px; rotate: -0.14deg; }
      34% { translate: 1.3px -1.1px; rotate: 0.16deg; }
      53% { translate: -1.6px -0.7px; rotate: -0.18deg; }
      71% { translate: 1.1px 1.2px; rotate: 0.12deg; }
      88% { translate: -0.9px 0.6px; rotate: -0.09deg; }
    }

    @keyframes advantageReversalSniffSideBoyShudder {
      0%, 68%, 86%, 100% { translate: 0px 0px; rotate: 0deg; }
      71% { translate: -3.2px -1.8px; rotate: -0.55deg; }
      74% { translate: 3.6px 1.6px; rotate: 0.6deg; }
      77% { translate: -2.8px 1.4px; rotate: -0.45deg; }
      80% { translate: 2.4px -1.5px; rotate: 0.42deg; }
      83% { translate: -1.4px 0.8px; rotate: -0.22deg; }
    }

    @keyframes advantageReversalSniffSidePieceHover {
      0%, 100% { translate: 0px -4px; rotate: -3.2deg; }
      50% { translate: 0px 5px; rotate: 3.4deg; }
    }

    @keyframes advantageReversalSniffSidePieceShake {
      0%, 100% { translate: 0px 0px; rotate: 0deg; }
      25% { translate: -1.1px 0.8px; rotate: -0.85deg; }
      50% { translate: 1.2px -0.7px; rotate: 0.9deg; }
      75% { translate: -0.8px -0.9px; rotate: -0.65deg; }
    }

    @keyframes advantageReversalSniffSideMist {
      0% { opacity: 0; translate: var(--mist-x) 16%; scale: 0.92; }
      22% { opacity: 0.98; }
      68% { opacity: 0.76; }
      100% { opacity: 0; translate: calc(var(--mist-x) + var(--mist-drift)) -26%; scale: 1.38; }
    }

    @keyframes advantageReversalSniffCalloutCycle {
      0% { opacity: 0; }
      2% { opacity: 1; }
      10.5% { opacity: 1; }
      14.5% { opacity: 0; }
      100% { opacity: 0; }
    }

    @keyframes advantageReversalSniffSideFade {
      0%, 42% { opacity: 1; }
      48%, 78% { opacity: 0; }
      84%, 100% { opacity: 1; }
    }

    @keyframes advantageReversalSniffLayerCycle {
      0%, 42% { opacity: 0; }
      48%, 78% { opacity: 1; }
      84%, 100% { opacity: 0; }
    }

    @keyframes advantageReversalSniffFeetBreath {
      0%, 100% { transform: translate3d(0, 0, 0) scale(1.015); }
      50% { transform: translate3d(-0.5%, -0.6%, 0) scale(1.045); }
    }

    @keyframes advantageReversalSniffBoyMotion {
      0%, 100% { transform: translate3d(1px, 1px, 0) rotate(-0.12deg) scale(1.003); }
      20% { transform: translate3d(-2px, -1px, 0) rotate(0.1deg) scale(1.01); }
      40% { transform: translate3d(-4px, -2.5px, 0) rotate(0.18deg) scale(1.018); }
      58% { transform: translate3d(-1px, 0, 0) rotate(-0.05deg) scale(1.005); }
      78% { transform: translate3d(-3px, -1.5px, 0) rotate(0.12deg) scale(1.012); }
    }

    @keyframes advantageReversalSniffSteam {
      0% { opacity: 0; translate: var(--sniff-steam-x) 7%; scale: 0.94; }
      32% { opacity: 0.5; }
      76% { opacity: 0.3; }
      100% { opacity: 0; translate: var(--sniff-steam-x) -10%; scale: 1.08; }
    }

    @keyframes advantageReversalSniffPulse {
      0%, 100% { opacity: 0.34; transform: scale(0.985); }
      18% { opacity: 0.82; transform: scale(1.01); }
      34% { opacity: 0.42; transform: scale(0.998); }
      48% { opacity: 0.76; transform: scale(1.016); }
    }

    @keyframes advantageReversalActionCue {
      0%, 100% { scale: 0.92; }
      50% { scale: 1.12; }
    }

    @keyframes portraitReactionPulseIn {
      0% {
        transform: translateY(2px) scale(0.985);
      }
      42% {
        transform: translateY(-7px) scale(1.085);
      }
      68% {
        transform: translateY(-3px) scale(1.035);
      }
      100% {
        transform: translateY(0) scale(1);
      }
    }

    @keyframes portraitChestSceneFlare {
      0% {
        opacity: 0;
        transform: translateY(7px) scale(0.94);
      }
      36% {
        opacity: 1;
        transform: translateY(-5px) scale(1.055);
      }
      68% {
        opacity: 1;
        transform: translateY(-2px) scale(1.018);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes portraitChestHorizontalPan {
      0%, 100% {
        transform: translate3d(-25%, 0, 0);
      }
      50% {
        transform: translate3d(25%, 0, 0);
      }
    }

    @keyframes footrubParallelEnter {
      0% { opacity: 0; transform: scale(0.985); }
      62% { opacity: 1; transform: scale(1.012); }
      100% { opacity: 1; transform: scale(1); }
    }

    @keyframes underTableViewEnter {
      0% { opacity: 0; transform: translateY(2.4%) scale(1.015); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes footrubTabletopWiggle {
      0%, 100% { transform: translate3d(0, 0.28%, 0) scale(1.04); }
      25% { transform: translate3d(0, -0.58%, 0) scale(1.04); }
      50% { transform: translate3d(0, 0.42%, 0) scale(1.04); }
      75% { transform: translate3d(0, -0.46%, 0) scale(1.04); }
    }

    @keyframes shoesniffBaseShake {
      0%, 100% { transform: translate3d(0, 0.1%, 0) scale(1.04) rotate(0deg); }
      25% { transform: translate3d(-0.12%, -0.28%, 0) scale(1.04) rotate(-0.08deg); }
      50% { transform: translate3d(0.1%, 0.2%, 0) scale(1.04) rotate(0.06deg); }
      75% { transform: translate3d(-0.06%, -0.2%, 0) scale(1.04) rotate(-0.04deg); }
    }

    @keyframes shoesniffShoeFollow {
      0%, 100% { transform: translate3d(0, 0.12%, 0) scale(1.1) rotate(0deg); }
      18% { transform: translate3d(-0.55%, -0.85%, 0) scale(1.145) rotate(-0.42deg); }
      42% { transform: translate3d(0.75%, 0.68%, 0) scale(1.11) rotate(0.55deg); }
      68% { transform: translate3d(-0.46%, -1.25%, 0) scale(1.165) rotate(-0.62deg); }
      86% { transform: translate3d(0.42%, 0.52%, 0) scale(1.13) rotate(0.34deg); }
    }

    @keyframes shoesniffSteamRise {
      0% { opacity: 0; transform: translate3d(0, 4%, 0) scale(1.02); }
      24% { opacity: 0.78; }
      68% { opacity: 0.5; }
      100% { opacity: 0; transform: translate3d(-1.5%, -13%, 0) scale(1.16); }
    }

    @keyframes underTableActivityFlash {
      0% {
        opacity: 0.54;
        box-shadow: inset 0 -3px 0 rgba(255, 211, 235, 0.62), 0 -4px 22px rgba(255, 27, 139, 0.28);
      }
      100% {
        opacity: 1;
        box-shadow: inset 0 -4px 0 rgba(255, 235, 246, 0.94), 0 -10px 42px rgba(255, 27, 139, 0.72);
      }
    }

    @keyframes underTableShoeReady {
      0%, 100% { opacity: 0.34; transform: scale(0.94); }
      50% { opacity: 0.76; transform: scale(1.025); }
    }

    @keyframes underTableShoeHeartbeat {
      0%, 100% { transform: translate3d(0, 0, 0) scale(1.45); }
      10% { transform: translate3d(-0.35%, 0.2%, 0) scale(1.492); }
      18% { transform: translate3d(0.18%, 0, 0) scale(1.45); }
      29% { transform: translate3d(0.38%, -0.15%, 0) scale(1.515); }
      43% { transform: translate3d(-0.12%, 0, 0) scale(1.46); }
      68% { transform: translate3d(0, -0.2%, 0) scale(1.475); }
    }

    @keyframes underTableStockingFeetIdle {
      0% { transform: translate3d(-0.18%, 0.16%, 0) scale(1.45) rotate(-0.18deg); }
      100% { transform: translate3d(0.18%, -0.22%, 0) scale(1.462) rotate(0.18deg); }
    }

    @keyframes underTableFeetUpIdle {
      0% { transform: translate3d(0, 0.28%, 0) scale(1.45); }
      100% { transform: translate3d(0, -0.46%, 0) scale(1.478); }
    }

    @keyframes underTableShoeOffSettle {
      0%, 100% { transform: translate3d(0, 0, 0) scale(1.45); }
      12% { transform: translate3d(-0.3%, 0.3%, 0) scale(1.475) rotate(-0.18deg); }
      30% { transform: translate3d(0.28%, -0.18%, 0) scale(1.492) rotate(0.16deg); }
      58% { transform: translate3d(0, 0.1%, 0) scale(1.46); }
    }

    @keyframes underTableStockingFeetPulse {
      0%, 100% { transform: translate3d(0, 0, 0) scale(1.45); }
      10% { transform: translate3d(-0.5%, 0.35%, 0) scale(1.49) rotate(-0.3deg); }
      19% { transform: translate3d(0.2%, 0, 0) scale(1.46); }
      31% { transform: translate3d(0.55%, -0.36%, 0) scale(1.525) rotate(0.32deg); }
      52% { transform: translate3d(-0.12%, -0.1%, 0) scale(1.478); }
      72% { transform: translate3d(0, -0.24%, 0) scale(1.49); }
    }

    @keyframes underTableFeetUpTease {
      0%, 100% { transform: translate3d(0, 0, 0) scale(1.45); }
      10% { transform: translate3d(-0.35%, -0.55%, 0) scale(1.505) rotate(-0.22deg); }
      19% { transform: translate3d(0.18%, -0.22%, 0) scale(1.47); }
      31% { transform: translate3d(0.4%, -1.05%, 0) scale(1.565) rotate(0.24deg); }
      54% { transform: translate3d(-0.12%, -0.62%, 0) scale(1.525); }
      74% { transform: translate3d(0, -0.35%, 0) scale(1.492); }
    }

    @keyframes underTableSteamDrift {
      0% { opacity: 0; transform: translate3d(-1.2%, 3.5%, 0) scale(1.42); }
      18% { opacity: 0.42; }
      56% { opacity: 0.68; transform: translate3d(1.1%, -1.8%, 0) scale(1.53); }
      100% { opacity: 0; transform: translate3d(-0.4%, -7.2%, 0) scale(1.62); }
    }

    @keyframes underTableShoeFocusBurst {
      0% { opacity: 0; transform: scale(0.78); }
      11% { opacity: 0.92; transform: scale(1.02); }
      20% { opacity: 0.22; transform: scale(1.08); }
      31% { opacity: 1; transform: scale(1.13); }
      100% { opacity: 0; transform: scale(1.42); }
    }

    @keyframes underTableShoeHeartBurst {
      0% { opacity: 0; transform: translate3d(-50%, 4px, 0) scale(0.42) rotate(-8deg); }
      18% { opacity: 1; }
      100% { opacity: 0; transform: translate3d(calc(-50% + var(--shoe-heart-drift)), -118px, 0) scale(1.18) rotate(12deg); }
    }

    @keyframes footrubFeetRub {
      0% { transform: translate3d(-0.3%, -1.1%, 0) scale(0.992); }
      42% { transform: translate3d(0.08%, 0.25%, 0) scale(1.008); }
      100% { transform: translate3d(0.42%, 1.85%, 0) scale(1.028); }
    }

    @keyframes footjobBodyShudder {
      0%, 100% { transform: translate3d(-0.24%, 0.18%, 0) rotate(-0.11deg); }
      50% { transform: translate3d(0.24%, -0.20%, 0) rotate(0.11deg); }
    }

    @keyframes footjobLegLeftAlternate {
      0%, 20%, 40%, 60%, 80%, 100% { transform: translate3d(0.3%, 4.6%, 0) scale(1.015) rotate(0.7deg); }
      10%, 30%, 50%, 70%, 90% { transform: translate3d(-0.6%, -5.8%, 0) scale(0.865) rotate(-1.6deg); }
    }

    @keyframes footjobLegRightAlternate {
      0%, 20%, 40%, 60%, 80%, 100% { transform: translate3d(0.6%, -5.8%, 0) scale(0.865) rotate(1.6deg); }
      10%, 30%, 50%, 70%, 90% { transform: translate3d(-0.3%, 4.6%, 0) scale(1.015) rotate(-0.7deg); }
    }

    @keyframes footjobLegTogether {
      0%, 20%, 40%, 60%, 80%, 100% { transform: translate3d(0, 4.6%, 0) scale(1.015) rotate(0deg); }
      10%, 30%, 50%, 70%, 90% { transform: translate3d(0, -5.8%, 0) scale(0.865) rotate(0deg); }
    }

    @keyframes footjobResponseCycle {
      0%, 20%, 40%, 60%, 80%, 100% { transform: translate3d(0, 5.8%, 0) scale(0.92, 0.86); }
      10%, 30%, 50%, 70%, 90% { transform: translate3d(0, -6.6%, 0) scale(1.11, 1.22); }
    }

    @keyframes shoesniffFrontLowerSandwich {
      0%, 100% { transform: translate3d(-0.4%, 7%, 0) scale(0.985) rotate(-0.5deg); }
      50% { transform: translate3d(0.5%, 4.5%, 0) scale(1.025) rotate(0.7deg); }
    }

    @keyframes shoesniffFrontUpperSandwich {
      0%, 100% { transform: translate3d(0.4%, -26%, 0) scale(0.985) rotate(0.5deg); }
      50% { transform: translate3d(-0.5%, -23.5%, 0) scale(1.025) rotate(-0.7deg); }
    }

    @keyframes shoesniffFrontResponse {
      0%, 100% { transform: translate3d(0, -8.3%, 0) scale(0.82, 0.75); }
      50% { transform: translate3d(0, -8.6%, 0) scale(0.74, 0.58); }
    }

    @keyframes footjobSteamDrift {
      0% { opacity: 0; transform: translate3d(-0.7%, 4%, 0) scale(1.03); }
      22% { opacity: 0.34; }
      58% { opacity: 0.48; transform: translate3d(0.8%, -1.5%, 0) scale(1.10); }
      100% { opacity: 0; transform: translate3d(-0.25%, -9%, 0) scale(1.18); }
    }

    @keyframes footrubParallelAura {
      0%, 100% { opacity: 0.52; transform: scale(0.98); }
      50% { opacity: 0.94; transform: scale(1.035); }
    }

    @keyframes footrubParallelParticle {
      0% { opacity: 0; transform: translate3d(0, 18px, 0) rotate(-12deg) scale(0.72); }
      18% { opacity: 0.88; }
      68% { opacity: 0.66; }
      100% { opacity: 0; transform: translate3d(18px, -360px, 0) rotate(18deg) scale(1.18); }
    }

    @keyframes losingPressureCGEntry {
      0% {
        opacity: 0;
        transform: translateX(var(--art-x)) translateY(4px) scale(0.985);
      }
      46% {
        opacity: 1;
        transform: translateX(var(--art-x)) translateY(-5px) scale(1.065);
      }
      100% {
        opacity: 1;
        transform: translateX(var(--art-x)) translateY(0) scale(var(--art-scale));
      }
    }

    @keyframes fatalBlunderMistakePulse {
      from { transform: translateZ(0) scale(0.985); }
      to { transform: translateZ(0) scale(1); }
    }

    @keyframes fatalBlunderTargetPulse {
      from { transform: translateZ(0) scale(0.98); }
      to { transform: translateZ(0) scale(1); }
    }

    @keyframes fatalBlunderTriangleFlow {
      0%, 100% { opacity: 0.24; scale: 0.84; }
      48% { opacity: 1; scale: 1.18; }
    }

    @keyframes fatalBlunderImpact {
      from { opacity: 0.45; scale: 0.72; }
      to { opacity: 1; scale: 1.5; }
    }

    @keyframes fatalBlunderKillerGhost {
      from { opacity: 0.48; scale: 0.9; }
      to { opacity: 0.9; scale: 1.08; }
    }

    @keyframes aiMoveBodyMotion {
      0% {
        opacity: 0;
        transform: translateX(var(--art-x)) translateY(3px) scale(var(--art-scale));
      }
      24% {
        opacity: 1;
        transform: translateX(var(--art-x)) translateY(-2px) scale(var(--art-scale));
      }
      100% {
        opacity: 1;
        transform: translateX(var(--art-x)) translateY(0) scale(var(--art-scale));
      }
    }

    @keyframes aiMoveHandReach {
      0% {
        opacity: 0;
        transform: translateX(calc(var(--art-x) + 16px)) translateY(-4px) scale(var(--art-scale));
      }
      28% {
        opacity: 1;
      }
      72% {
        transform: translateX(calc(var(--art-x) - 3px)) translateY(2px) scale(var(--art-scale));
      }
      100% {
        opacity: 1;
        transform: translateX(var(--art-x)) translateY(0) scale(var(--art-scale));
      }
    }

    @keyframes aiClockPress {
      0% {
        opacity: 0;
        transform: translateX(calc(var(--art-x) + 8px)) translateY(-2px) scale(var(--art-scale));
      }
      24% {
        opacity: 1;
      }
      58% {
        transform: translateX(calc(var(--art-x) - 3px)) translateY(2px) scale(var(--art-scale));
      }
      100% {
        opacity: 1;
        transform: translateX(var(--art-x)) translateY(0) scale(var(--art-scale));
      }
    }

    @keyframes imagePulse {
      0% {
        transform: translateX(var(--art-x)) scale(var(--art-scale));
      }
      50% {
        transform: translateX(var(--art-x)) scale(calc(var(--art-scale) + 0.06)) translateY(-3px);
      }
      100% {
        transform: translateX(var(--art-x)) scale(var(--art-scale));
      }
    }

    @keyframes portraitHitShake {
      0%,
      100% {
        transform: translateX(0);
      }
      14% {
        transform: translateX(-7px);
      }
      30% {
        transform: translateX(8px);
      }
      46% {
        transform: translateX(-5px);
      }
      64% {
        transform: translateX(3px);
      }
    }

    @keyframes imageHitShake {
      0% {
        transform: translateX(var(--art-x)) scale(var(--art-scale));
      }
      16% {
        transform: translateX(calc(var(--art-x) - 10px)) scale(calc(var(--art-scale) + 0.06)) rotate(-0.8deg);
      }
      34% {
        transform: translateX(calc(var(--art-x) + 9px)) scale(calc(var(--art-scale) + 0.05)) rotate(0.8deg);
      }
      54% {
        transform: translateX(calc(var(--art-x) - 4px)) scale(calc(var(--art-scale) + 0.02));
      }
      100% {
        transform: translateX(var(--art-x)) scale(var(--art-scale));
      }
    }

    @keyframes damageOverlayFlash {
      0% {
        opacity: 0;
      }
      16% {
        opacity: 1;
      }
      44% {
        opacity: 0.58;
      }
      100% {
        opacity: 0;
      }
    }

    @keyframes damageSweep {
      0% {
        opacity: 0;
        transform: translateX(-42%) skewX(-14deg);
      }
      24% {
        opacity: 0.95;
      }
      100% {
        opacity: 0;
        transform: translateX(42%) skewX(-14deg);
      }
    }

    @keyframes damageRingPop {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.28);
      }
      24% {
        opacity: 0.96;
      }
      100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.18);
      }
    }

    @keyframes damageSlash {
      0% {
        opacity: 0;
        transform: rotate(-18deg) scaleX(0);
      }
      22% {
        opacity: 1;
        transform: rotate(-18deg) scaleX(1);
      }
      100% {
        opacity: 0;
        transform: rotate(-18deg) translateX(42px) scaleX(1.08);
      }
    }

    @keyframes damageSpark {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.45);
      }
      24% {
        opacity: 1;
      }
      100% {
        opacity: 0;
        transform: translate(calc(-50% + 18px), calc(-50% - 52px)) scale(1.16);
      }
    }

    @keyframes playerScreenShake {
      0%,
      100% {
        transform: translate(0, 0);
      }
      12% {
        transform: translate(-12px, 5px);
      }
      28% {
        transform: translate(11px, -4px);
      }
      44% {
        transform: translate(-7px, -3px);
      }
      64% {
        transform: translate(5px, 2px);
      }
    }

    @keyframes playerDamageOverlayFlash {
      0% {
        opacity: 0;
      }
      12% {
        opacity: 1;
      }
      42% {
        opacity: 0.72;
      }
      100% {
        opacity: 0;
      }
    }

    @keyframes playerDamageSweep {
      0% {
        opacity: 0;
        transform: translateX(-36%) skewX(-16deg);
      }
      24% {
        opacity: 0.92;
      }
      100% {
        opacity: 0;
        transform: translateX(36%) skewX(-16deg);
      }
    }

    @keyframes playerDamageVignette {
      0% {
        opacity: 0;
      }
      15% {
        opacity: 1;
      }
      100% {
        opacity: 0;
      }
    }

    @keyframes playerDamageRing {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.28);
      }
      22% {
        opacity: 0.9;
      }
      100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.28);
      }
    }

    @keyframes playerDamageSlash {
      0% {
        opacity: 0;
        transform: rotate(-14deg) scaleX(0);
      }
      20% {
        opacity: 1;
        transform: rotate(-14deg) scaleX(1);
      }
      100% {
        opacity: 0;
        transform: rotate(-14deg) translateX(64px) scaleX(1.08);
      }
    }

    @keyframes boardDefeatPulse {
      0% {
        transform: scale(1);
      }
      28% {
        transform: scale(0.992);
      }
      100% {
        transform: scale(1);
      }
    }

    @keyframes losingPressureBoardMarquee {
      0% {
        transform: translate3d(-24%, 0, 0);
      }

      100% {
        transform: translate3d(24%, 0, 0);
      }
    }

    @keyframes checkmateBoardWash {
      0% {
        opacity: 0;
      }
      34% {
        opacity: 1;
      }
      100% {
        opacity: 0.82;
      }
    }

    @keyframes boardVictoryPulse {
      0% {
        transform: scale(0.994);
      }
      52% {
        transform: scale(1.004);
      }
      100% {
        transform: scale(1);
      }
    }

    @keyframes victoryBoardWash {
      0% {
        opacity: 0;
      }
      34% {
        opacity: 1;
      }
      100% {
        opacity: 0.88;
      }
    }

    @keyframes checkmateBannerEnter {
      0% {
        opacity: 0;
        transform: translate(-50%, -46%) scale(0.82);
      }
      72% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.03);
      }
      100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
      }
    }

    @keyframes defeatReplayEnter {
      0% {
        opacity: 0;
        translate: -50% 10px;
      }
      100% {
        opacity: 1;
        translate: -50% 0;
      }
    }

    @keyframes victoryBannerEnter {
      0% {
        opacity: 0;
        transform: translate(-50%, -45%) scale(0.84);
      }
      72% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.03);
      }
      100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
      }
    }

    @keyframes contractResultPulse {
      0% {
        opacity: 0;
        transform: translateY(-7px) scale(0.96);
      }
      18% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
      70% {
        opacity: 1;
      }
      100% {
        opacity: 0.92;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes cheatDeclarationImpact {
      0% {
        transform: scale(1);
      }
      18% {
        transform: scale(0.965);
      }
      42% {
        transform: scale(1.035);
      }
      100% {
        transform: scale(1);
      }
    }

    @keyframes cheatDeclarationPanelImpact {
      0% {
        transform: translate3d(0, 0, 0) scale(1);
      }
      18% {
        transform: translate3d(0, -2px, 0) scale(0.992);
      }
      42% {
        transform: translate3d(0, 1px, 0) scale(1.006);
      }
      100% {
        transform: translate3d(0, 0, 0) scale(1);
      }
    }

    @keyframes cheatDeclarationShellPressure {
      0% {
        transform: translate3d(0, 0, 0) scale(1);
      }
      16% {
        transform: translate3d(0, 0, 0) scale(0.986);
      }
      42% {
        transform: translate3d(0, 0, 0) scale(1.012);
      }
      100% {
        transform: translate3d(0, 0, 0) scale(1);
      }
    }

    @keyframes hostDeclarationPulse {
      0% {
        transform: translate3d(0, 0, 0) scale(1);
      }
      16% {
        transform: translate3d(0, -2px, 0) scale(1.012);
      }
      44% {
        transform: translate3d(0, 1px, 0) scale(0.996);
      }
      100% {
        transform: translate3d(0, 0, 0) scale(1);
      }
    }

    @keyframes aiMoveArrowSweep {
      0% {
        opacity: 0;
        stroke-dashoffset: 1.6;
      }
      34% {
        opacity: 1;
      }
      100% {
        opacity: 0.72;
        stroke-dashoffset: 0;
      }
    }

    @keyframes aiMoveArrivalPulse {
      0% {
        opacity: 0;
        transform: scale(0.78);
      }
      44% {
        opacity: 1;
        transform: scale(1.08);
      }
      100% {
        opacity: 1;
        transform: scale(1);
      }
    }

    @keyframes choiceTrapPulse {
      0% {
        opacity: 0;
        transform: translate3d(0, 10px, 0) scale(0.96);
      }
      58% {
        opacity: 1;
        transform: translate3d(0, -2px, 0) scale(1.012);
      }
      100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
      }
    }

    @keyframes choiceTrapSweep {
      0% {
        opacity: 0;
        transform: translate3d(-28%, 0, 0);
      }
      36% {
        opacity: 0.72;
      }
      100% {
        opacity: 0;
        transform: translate3d(32%, 0, 0);
      }
    }

    @keyframes choiceOptionEnter {
      0% {
        opacity: 0;
        transform: translate3d(0, 8px, 0);
      }
      100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
      }
    }

    @keyframes cheatDeclarationBoardWash {
      0% {
        opacity: 0;
      }
      18% {
        opacity: 0.9;
      }
      100% {
        opacity: 0;
      }
    }

    @keyframes cheatDeclarationGlitchSweep {
      0% {
        clip-path: inset(0 100% 0 0);
      }
      18% {
        clip-path: inset(0 0 0 0);
      }
      54% {
        clip-path: inset(0 0 0 0);
      }
      100% {
        clip-path: inset(0 0 0 100%);
      }
    }

    @keyframes cheatDeclarationStamp {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(-14deg) skewX(-8deg) scale(0.54);
      }
      16% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-8deg) skewX(-8deg) scale(1.16);
      }
      54% {
        opacity: 0.96;
        transform: translate(-50%, -50%) rotate(-8deg) skewX(-8deg) scale(1);
      }
      100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(-6deg) skewX(-8deg) scale(1.08);
      }
    }

    @keyframes cheatDeclarationSealCut {
      0%,
      9% {
        clip-path: polygon(8% 8%, 98% 0, 92% 86%, 0 100%);
      }
      10%,
      20% {
        clip-path: polygon(3% 0, 100% 4%, 96% 100%, 0 88%);
      }
      21%,
      100% {
        clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
      }
    }

    @keyframes defeatedPieceSink {
      0% {
        transform: translateY(0) rotate(0deg);
      }
      100% {
        transform: translateY(3px) rotate(-3deg);
      }
    }

    @keyframes switchCheatSealSpin {
      0% {
        opacity: 0;
        transform: rotate(-28deg) scale(0.52);
      }

      32% {
        opacity: 1;
        transform: rotate(8deg) scale(1.06);
      }

      100% {
        opacity: 0;
        transform: rotate(42deg) scale(1.22);
      }
    }

    @keyframes switchCheatLabelPop {
      0% {
        opacity: 0;
        transform: translateY(7px) scale(0.78);
      }

      18%,
      72% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }

      100% {
        opacity: 0;
        transform: translateY(-5px) scale(0.92);
      }
    }

    @keyframes switchCheatPieceRewrite {
      0% {
        transform: scale(0.82) rotate(-8deg);
        opacity: 0.68;
      }

      30% {
        transform: scale(1.16) rotate(5deg);
        opacity: 1;
      }

      62% {
        transform: scale(0.96) rotate(-2deg);
      }

      100% {
        transform: scale(1);
      }
    }

    @keyframes switchCheatPieceRing {
      0% {
        opacity: 0.25;
        transform: scale(0.72);
      }

      35% {
        opacity: 1;
        transform: scale(1.05);
      }

      100% {
        opacity: 0.3;
        transform: scale(1);
      }
    }

    @keyframes switchCheatPathPulse {
      0% {
        opacity: 0;
        transform: scaleX(0.18);
      }

      18%,
      72% {
        opacity: 0.96;
        transform: scaleX(1);
      }

      100% {
        opacity: 0;
        transform: scaleX(1.08);
      }
    }

    @keyframes selectedPieceHover {
      0%,
      100% {
        transform: translateY(0);
      }
      50% {
        transform: translateY(-4px);
      }
    }

    @keyframes boardMoveFlight {
      0% {
        transform: translate3d(0, 0, 0);
      }
      100% {
        transform: translate3d(var(--move-end-dx), var(--move-end-dy), 0);
      }
    }

    @keyframes boardMoveDiscPulse {
      0%, 100% {
        transform: scale(1);
      }
      50% {
        transform: scale(1.07);
      }
    }

    @keyframes boardMoveLandingCue {
      0%, 62% {
        opacity: 0;
        transform: scale(0.58);
      }
      78% {
        opacity: 0.96;
        transform: scale(1.02);
      }
      100% {
        opacity: 0;
        transform: scale(1.34);
      }
    }

    @keyframes boardCapturedPieceExit {
      0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
      }
      38% {
        opacity: 1;
        transform: translate3d(0, -0.7cqh, 0) rotate(-5deg) scale(1.08);
      }
      100% {
        opacity: 0;
        transform: translate3d(0, 2.8cqh, 0) rotate(18deg) scale(0.24);
      }
    }

    @keyframes captureImpactShake {
      0%, 100% { transform: translate3d(0, 0, 0); }
      18% { transform: translate3d(var(--capture-shake-positive, 1.5px), -0.5px, 0); }
      40% { transform: translate3d(var(--capture-shake-negative, -1.5px), 0.5px, 0); }
      62% { transform: translate3d(var(--capture-shake-positive, 1.5px), 0, 0); }
      82% { transform: translate3d(var(--capture-shake-negative, -1.5px), 0, 0); }
    }

    @keyframes switchCheatFlight {
      0% {
        opacity: 0;
        translate: -50% -50%;
        transform: translateY(0) scale(0.72) rotate(-10deg);
      }

      16% {
        opacity: 1;
        translate: -50% -50%;
        transform: translateY(-8%) scale(1.14) rotate(-4deg);
      }

      52% {
        opacity: 1;
        translate: calc(-50% + var(--mid-flight-dx)) calc(-50% + var(--mid-flight-dy));
        transform: translateY(-8%) scale(1.18) rotate(5deg);
      }

      82% {
        opacity: 1;
        translate: calc(-50% + var(--end-flight-dx)) calc(-50% + var(--end-flight-dy));
        transform: translateY(0) scale(1.08) rotate(2deg);
      }

      100% {
        opacity: 0;
        translate: calc(-50% + var(--end-flight-dx)) calc(-50% + var(--end-flight-dy));
        transform: translateY(0) scale(0.88) rotate(0deg);
      }
    }

    @keyframes reviveCheatSummonRing {
      0% {
        opacity: 0;
        transform: scale(0.32) rotate(-28deg);
      }

      28% {
        opacity: 1;
        transform: scale(1.06) rotate(10deg);
      }

      70% {
        opacity: 0.86;
        transform: scale(0.82) rotate(42deg);
      }

      100% {
        opacity: 0;
        transform: scale(1.35) rotate(86deg);
      }
    }

    @keyframes reviveCheatPathPulse {
      0% {
        opacity: 0;
        transform: scaleX(0.10);
      }

      20%,
      76% {
        opacity: 0.96;
        transform: scaleX(1);
      }

      100% {
        opacity: 0;
        transform: scaleX(1.08);
      }
    }

    @keyframes reviveCheatSourceFlare {
      0% {
        opacity: 0;
        transform: scale(0.46) rotate(-18deg);
      }

      14%,
      42% {
        opacity: 0.94;
        transform: scale(1.04) rotate(6deg);
      }

      72%,
      100% {
        opacity: 0;
        transform: scale(1.28) rotate(24deg);
      }
    }

    @keyframes reviveCheatArrivalSeal {
      0%,
      38% {
        opacity: 0;
        transform: scale(1.34) rotate(18deg);
      }

      58%,
      78% {
        opacity: 0.96;
        transform: scale(0.94) rotate(-6deg);
      }

      100% {
        opacity: 0;
        transform: scale(1.18) rotate(0deg);
      }
    }

    @keyframes reviveCheatRift {
      0% {
        opacity: 0;
        transform: scale(0.18) rotate(-22deg);
      }

      24%,
      74% {
        opacity: 1;
        transform: scale(1.04) rotate(10deg);
      }

      100% {
        opacity: 0;
        transform: scale(1.38) rotate(38deg);
      }
    }

    @keyframes reviveCheatPieceMaterialize {
      0%,
      54% {
        opacity: 0;
        transform: scale(0.62) rotate(10deg);
      }

      76% {
        opacity: 1;
        transform: scale(1.14) rotate(-4deg);
      }

      100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
      }
    }

    @keyframes reviveCheatFlight {
      0% {
        opacity: 0;
        translate: -50% -50%;
        transform: translateX(0) scale(0.58) rotate(14deg);
      }

      15% {
        opacity: 1;
        translate: -50% -50%;
        transform: translateX(-8%) scale(1.12) rotate(6deg);
      }

      54% {
        opacity: 1;
        translate: calc(-50% + var(--revive-mid-dx)) calc(-50% + var(--revive-mid-dy));
        transform: translateY(-10%) scale(1.20) rotate(-5deg);
      }

      82% {
        opacity: 1;
        translate: calc(-50% + var(--revive-end-dx)) calc(-50% + var(--revive-end-dy));
        transform: translateY(0) scale(1.08) rotate(2deg);
      }

      100% {
        opacity: 0;
        translate: calc(-50% + var(--revive-end-dx)) calc(-50% + var(--revive-end-dy));
        transform: translateY(0) scale(0.88) rotate(0deg);
      }
    }

    @keyframes advantageReversalBoardLurch {
      0% {
        transform: scale(1);
      }

      28% {
        transform: scale(0.992) rotate(-0.25deg);
      }

      54% {
        transform: scale(1.004) rotate(0.12deg);
      }

      82%,
      100% {
        transform: scale(1) rotate(0deg);
      }
    }

    @keyframes advantageReversalSweep {
      0% {
        opacity: 0;
        transform: translateX(-42%) skewX(-12deg);
      }

      28%,
      72% {
        opacity: 1;
      }

      100% {
        opacity: 0;
        transform: translateX(42%) skewX(-12deg);
      }
    }

    @keyframes advantageReversalMissingOutline {
      0%, 14% { opacity: 0; transform: scale(0.82); }
      26%, 86% { opacity: 0.88; transform: scale(1); }
      100% { opacity: 0; transform: scale(1.12); }
    }

    @keyframes advantageReversalAbsencePing {
      0% { opacity: 0; transform: scale(0.58) rotate(-10deg); }
      14% { opacity: 0.96; transform: scale(1.08) rotate(0deg); }
      34% { opacity: 0.70; transform: scale(0.96) rotate(4deg); }
      52%, 100% { opacity: 0; transform: scale(1.30) rotate(10deg); }
    }

    @keyframes advantageReversalArrivalSigil {
      0%, 56% { opacity: 0; transform: scale(1.38) rotate(14deg); }
      68% { opacity: 0.96; transform: scale(0.90) rotate(-4deg); }
      80% { opacity: 0.74; transform: scale(1.08) rotate(2deg); }
      92%, 100% { opacity: 0; transform: scale(1.22) rotate(0deg); }
    }

    /* Red piece is lifted off the board and carried into her captured tray. */
    @keyframes advantageReversalStolenGhost {
      0%, 6% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
      14% { opacity: 1; transform: translate(0, -8%) scale(1.16) rotate(4deg); animation-timing-function: cubic-bezier(.5, 0, .3, 1); }
      40% { opacity: 1; transform: translate(var(--ghost-dx, 0), var(--ghost-dy, 0)) scale(var(--tray-scale, .56)) rotate(-9deg); }
      45% { opacity: 1; transform: translate(var(--ghost-dx, 0), var(--ghost-dy, 0)) scale(var(--tray-scale, .56)) rotate(-9deg); }
      50%, 100% { opacity: 0; transform: translate(var(--ghost-dx, 0), var(--ghost-dy, 0)) scale(var(--tray-scale, .56)) rotate(-9deg); }
    }

    /* Her captured black piece leaves the tray and is set back on the board. */
    @keyframes advantageReversalReviveGhost {
      0%, 38% { opacity: 1; transform: translate(0, 0) scale(var(--tray-scale, .56)) rotate(-9deg); }
      44% { opacity: 1; transform: translate(0, -6%) scale(calc(var(--tray-scale, .56) * 1.18)) rotate(-4deg); animation-timing-function: cubic-bezier(.5, 0, .3, 1); }
      68% { opacity: 1; transform: translate(var(--ghost-dx, 0), var(--ghost-dy, 0)) scale(1.14) rotate(2deg); }
      74% { opacity: 1; transform: translate(var(--ghost-dx, 0), var(--ghost-dy, 0)) scale(1) rotate(0deg); }
      80%, 100% { opacity: 0; transform: translate(var(--ghost-dx, 0), var(--ghost-dy, 0)) scale(1) rotate(0deg); }
    }

    @keyframes advantageReversalUnderlyingArrival {
      0%, 70% { opacity: 0; transform: scale(0.9) rotate(0deg); }
      74% { opacity: 1; transform: scale(1.06) rotate(-2deg); }
      82%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    }

    .dead-piece.advantage-reversal-incoming {
      animation: advantageReversalTrayIncoming var(--advantage-duration, 2800ms) linear both;
    }

    @keyframes advantageReversalTrayIncoming {
      0%, 44% { opacity: 0; }
      46% { opacity: 1; }
    }

    @keyframes advantageReversalBoardLockStripes {
      from { background-position: calc(0px - var(--board-lock-stripe-step)) 0; }
      to { background-position: 0 0; }
    }

    @keyframes advantageReversalBoardLockPulse {
      0%, 100% { opacity: 0.58; transform: scale(0.96); }
      50% { opacity: 0.92; transform: scale(1.04); }
    }

    @keyframes timeCheatMarker {
      0% {
        opacity: 0;
        transform: translateY(-4px) scale(0.92);
      }

      20%,
      72% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }

      100% {
        opacity: 0;
        transform: translateY(4px) scale(0.96);
      }
    }

    @keyframes timeCheatStripSweep {
      0% {
        opacity: 0;
        transform: scaleX(0.62);
      }

      28%,
      72% {
        opacity: 1;
        transform: scaleX(1);
      }

      100% {
        opacity: 0;
        transform: scaleX(1.1);
      }
    }

    @keyframes timeCheatClockRewrite {
      0% {
        transform: translateY(0) scale(1);
      }

      18% {
        transform: translateY(-2px) scale(1.08);
      }

      32% {
        transform: translateY(1px) scale(0.98);
      }

      58% {
        transform: translateY(-1px) scale(1.03);
      }

      100% {
        transform: translateY(0) scale(1);
      }
    }

    @keyframes timeCheatDeltaStamp {
      0% {
        opacity: 0;
        transform: translateY(6px) scale(0.72) rotate(-8deg);
      }

      18%,
      68% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
      }

      100% {
        opacity: 0;
        transform: translateY(-5px) scale(1.05) rotate(4deg);
      }
    }

    @keyframes timeCheatDigitsGlitch {
      0%,
      100% {
        transform: translateX(0);
      }

      25% {
        transform: translateX(-2px);
      }

      50% {
        transform: translateX(2px);
      }

      75% {
        transform: translateX(-1px);
      }
    }

    @keyframes visionLabelScramble {
      0%,
      100% {
        transform: translate(0, 0) skewX(0deg);
      }

      22% {
        transform: translate(-1.2px, 0.8px) skewX(-6deg);
      }

      48% {
        transform: translate(1.4px, -0.9px) skewX(5deg);
      }

      72% {
        transform: translate(-0.8px, -0.7px) skewX(-4deg);
      }
    }

    @keyframes visionInterferenceScan {
      0%,
      100% {
        opacity: 0.18;
        transform: translateY(-50%) translateX(-0.22em) scaleX(0.36);
      }

      32% {
        opacity: 0.9;
        transform: translateY(-50%) translateX(0.04em) scaleX(1.18);
      }

      58% {
        opacity: 0.42;
        transform: translateY(-50%) translateX(0.22em) scaleX(0.78);
      }
    }

    @keyframes visionLabelGhost {
      0%,
      100% {
        opacity: 0.28;
        transform: translateX(-2.4px) translateY(0.4px);
      }

      50% {
        opacity: 0.84;
        transform: translateX(2.4px) translateY(-0.4px);
      }
    }

    @keyframes visionBoardScan {
      0%,
      100% {
        opacity: 0.24;
        transform: translateY(-16%);
      }

      48% {
        opacity: 0.68;
        transform: translateY(16%);
      }
    }

    @keyframes visionBoardGhost {
      0%,
      100% {
        opacity: 0.30;
        transform: translateX(-2px);
      }

      50% {
        opacity: 0.58;
        transform: translateX(2px);
      }
    }

    @keyframes pieceNameCorruptJitter {
      0%,
      100% {
        transform: translate(0, 0);
      }

      33% {
        transform: translate(-1px, 0.5px);
      }

      66% {
        transform: translate(1px, -0.5px);
      }
    }

    @keyframes pieceNameOverwriteSlash {
      0%,
      100% {
        opacity: 0.42;
        scale: 0.72 1;
      }

      48%,
      62% {
        opacity: 0.92;
        scale: 1.12 1;
      }
    }

    @keyframes pieceCorruptionSeal {
      0%,
      100% {
        opacity: 0.72;
        transform: rotate(0deg);
      }

      50% {
        opacity: 1;
        transform: rotate(7deg);
      }
    }

    @keyframes portraitEffectBadgeIn {
      0% {
        opacity: 0;
        transform: translateY(6px) scale(0.94);
      }

      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes pieceCorruptionBadge {
      0%,
      100% {
        transform: translateY(0) rotate(8deg);
      }

      50% {
        transform: translateY(-2px) rotate(8deg);
      }
    }

    @keyframes pieceCorruptionDiscPulse {
      0%,
      100% {
        opacity: 1;
        transform: scale(1);
      }

      50% {
        opacity: 0.96;
        transform: scale(1.025);
      }
    }

    .hostess-portrait.pulse .hostess-figure {
      animation: portraitPulse 420ms ease;
    }

    @media (max-width: 960px) {
      .app {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        padding: 12px;
      }

      .host-panel,
      .board-panel {
        height: auto;
      }

      .host-panel {
        grid-template-rows: auto auto;
      }

      .hostess-portrait {
        min-height: 430px;
      }

      .hostess-scene {
        --art-object-position: 50% 40%;
      }

      .hostess-art[data-fit="neutral"] {
        object-position: var(--art-object-position) !important;
      }

      .hostess-art[data-fit="blush"],
      .hostess-art[data-fit="damage"],
      .hostess-art[data-fit="defeated"] {
        object-position: 0% 44% !important;
      }

      .hostess-art[data-fit="smug"] {
        object-position: 0% 42% !important;
      }

      .hostess-figure {
        width: 232px;
        height: 330px;
        transform: translateX(-50%) translateY(8px) scale(0.86);
      }

      .board {
        width: min(100%, 540px);
        height: auto;
      }

      .board-panel {
        grid-template-rows: 52px auto;
        align-content: start;
      }

      .board-shell {
        height: auto;
        grid-template-columns: minmax(36px, 44px) minmax(0, 1fr) minmax(36px, 44px);
        grid-template-rows: auto;
        padding: 0;
      }
    }

    @media (max-width: 520px) {
      .app {
        padding: 8px;
        gap: 10px;
      }

      .host-panel,
      .board-panel {
        padding: 10px;
      }

      .brand-title,
      .board-title {
        font-size: 1.18rem;
      }

      .board-header {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        align-items: center;
        gap: 0;
        padding: 4px;
      }

      .board-state-stack {
        grid-column: 1;
        justify-self: stretch;
        place-items: stretch;
      }

      .clock-strip {
        gap: 3px;
      }

      .clock-box {
        gap: 5px;
        padding: 4px 8px;
      }

      .clock-label {
        font-size: 0.68rem;
      }

      .clock-time {
        font-size: clamp(1.08rem, 5.5vw, 1.38rem);
      }

      .hint-text {
        text-align: left;
        font-size: 0.86rem;
      }

      .hostess-portrait {
        min-height: 300px;
      }

      .portrait-callout {
        left: 10px;
        top: 20px;
        max-height: 70%;
        max-width: 76px;
        padding: 10px 7px;
        font-size: 0.82rem;
      }

      .portrait-callout.right {
        right: 10px;
        top: 44px;
        max-height: 66%;
      }

      .hostess-figure {
        transform: translateX(-50%) translateY(20px) scale(0.72);
      }

      .dialogue-box {
        min-height: 104px;
        font-size: 1rem;
        line-height: 1.55;
      }

      .meta-grid {
        grid-template-columns: 1fr;
      }

      .board-shell {
        padding: 0;
      }

      .captured-tray {
        min-width: 34px;
        max-width: 40px;
        min-height: 0;
        height: 100%;
        gap: 4px;
        padding: 4px;
      }

      .dead-piece {
        --captured-piece-size: 30px;
        border-width: 2px;
      }

      .piece {
        border-width: 2px;
      }

      .board::after, .board-river-labels {
        font-size: 1.05rem;
      }
    }

    /* Table UI: quiet lacquer, brushed brass and straight-cut menu controls. */
    :root {
      --ui-paper: #e6d8bf;
      --ui-muted: #aa9986;
      --ui-brass: #bc9b61;
      --ui-rule: #bc9b6138;
      --ui-lacquer: #21191d;
      --ui-serif: "Noto Serif TC", "PMingLiU", "Songti TC", Georgia, serif;
    }
    body {
      background:
        radial-gradient(ellipse at 50% 0, #51403324, transparent 68%),
        #151115;
      color: var(--ui-paper);
    }
    .app { gap: 24px; padding: 10px 14px; }
    .host-panel, .board-panel {
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      overflow: visible;
    }
    .host-panel { padding: 0; }
    .host-panel::before, .board-panel::after {
      inset: 0;
      border: 0;
      border-radius: 0;
      background: none;
      box-shadow: none;
    }
    .hostess-portrait {
      border-radius: 1px;
      box-shadow: 0 16px 36px #0005;
    }
    .hostess-portrait:hover { outline: none; }
    .hostess-portrait:focus-visible { outline: 2px solid var(--ui-brass); outline-offset: 4px; }
    .board-panel { padding: 0; }
    .board-header {
      padding: 0 0 7px;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }
    .clock-strip { gap: 0; }
    .clock-box {
      padding: 5px 16px 8px;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      color: var(--ui-muted);
    }
    .clock-box + .clock-box { border-left: 1px solid var(--ui-rule); }
    .clock-box.is-active {
      border-color: var(--ui-rule);
      background: #bc9b6107;
      box-shadow: none;
    }
    .clock-box.player:hover { background: #bc9b6110; }
    .clock-box.player:focus-visible { outline: 2px solid var(--ui-brass); outline-offset: -2px; }
    .clock-label { font-family: var(--ui-serif); font-size: 13px; letter-spacing: .12em; }
    .clock-time { font-family: Georgia, "Times New Roman", serif; font-weight: 400; color: var(--ui-paper); letter-spacing: .02em; }
    .clock-box .clock-reserve::after { height: 2px; background: #bc9b6121; border-radius: 0; }
    .clock-box .clock-reserve-fill::before { height: 2px; border-radius: 0; background: var(--clock-accent); box-shadow: none; }
    .clock-box .clock-reserve-fill::after { bottom: -1px; height: 5px; box-shadow: none; border-radius: 0; }
    .clock-box .clock-reserve-sheen { display: none; }
    .board-shell { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .board { border-radius: 1px; box-shadow: 0 12px 32px #0005, inset 0 0 0 5px var(--board-inset); }
    .captured-tray { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .cg-loading-screen { background: #151115; }
    .cg-loading-card { border: 0; border-radius: 0; background: none; box-shadow: none; }
    .cg-loading-title { font-family: var(--ui-serif); font-weight: 500; color: var(--ui-paper); }
    .cg-loading-status { color: var(--ui-muted); }
    .cg-loading-track { height: 2px; border-radius: 0; background: var(--ui-rule); box-shadow: none; }
    .cg-loading-bar { border-radius: 0; background: var(--ui-brass); box-shadow: none; }

    .choice-overlay { align-items: flex-end; padding-bottom: clamp(20px, 5vh, 52px); }
    .choice-panel {
      max-width: 620px;
      padding: 25px 30px 20px;
      border: 0;
      border-top: 1px solid var(--ui-brass);
      border-radius: 1px;
      background: #21191df5;
      box-shadow: 0 18px 60px #0008;
    }
    .choice-panel::before {
      inset: 6px 0 auto auto;
      width: 46px;
      height: 2px;
      background: var(--ui-brass);
      opacity: .3;
      animation: none;
    }
    .choice-speaker { color: var(--ui-brass); letter-spacing: .2em; font-family: var(--ui-serif); }
    .choice-line { color: var(--ui-paper); line-height: 1.8; margin-bottom: 19px; }
    .choice-options { gap: 0; }
    .choice-option, .content-event-choice {
      position: relative;
      min-height: 46px;
      padding: 12px 16px 12px 26px;
      border: 0;
      border-bottom: 1px solid var(--ui-rule);
      border-radius: 0;
      background: transparent;
      color: var(--ui-paper);
      font-family: var(--ui-serif);
      font-size: 15px;
      font-weight: 400;
      text-align: left;
      line-height: 1.6;
      transition: background .18s, color .18s, padding .18s;
    }
    .choice-option::before, .content-event-choice::before {
      content: "";
      position: absolute;
      left: 7px;
      top: calc(50% - 3px);
      width: 6px;
      height: 6px;
      border: 1px solid var(--ui-brass);
      rotate: 45deg;
      opacity: .5;
      transition: opacity .18s, background .18s;
    }
    .choice-option:hover, .choice-option:focus-visible,
    .content-event-choice:hover, .content-event-choice:focus-visible {
      padding-left: 31px;
      color: #f3e4c7;
      background: #bc9b610d;
      border-color: #bc9b6170;
      outline: none;
    }
    .choice-option:hover::before, .choice-option:focus-visible::before,
    .content-event-choice:hover::before, .content-event-choice:focus-visible::before {
      background: var(--ui-brass);
      opacity: 1;
    }
    .choice-option:focus-visible, .content-event-choice:focus-visible { box-shadow: inset 2px 0 var(--ui-brass); }
    .content-event-copy {
      border: 0;
      border-top: 1px solid var(--ui-brass);
      border-radius: 0;
      background: #21191def;
      box-shadow: 0 16px 36px #0006;
    }
    .content-event-meta strong { color: var(--ui-brass); font-family: var(--ui-serif); font-weight: 500; }
    .content-event-copy p { color: var(--ui-paper); font-weight: 500; line-height: 1.8; }
    .content-event-actions button, .action-button,
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog button {
      min-height: 40px;
      padding: 9px 18px;
      border: 1px solid var(--ui-rule);
      border-radius: 0;
      background: #bc9b6108;
      box-shadow: none;
      color: var(--ui-paper);
      text-shadow: none;
      font-family: var(--ui-serif);
      font-weight: 400;
      letter-spacing: .06em;
      transition: background .18s, border-color .18s, translate .18s;
    }
    .content-event-actions button:hover, .action-button:hover,
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog button:hover {
      border-color: var(--ui-brass);
      background: #bc9b6118;
      translate: 0 -1px;
    }
    .content-event-actions button:active, .action-button:active,
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog button:active { translate: 0 1px; }
    .content-event-actions button:focus-visible, .action-button:focus-visible,
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog button:focus-visible { outline: 2px solid var(--ui-brass); outline-offset: 3px; }
    [data-testid="content-event-skip"] { border-color: transparent; background: transparent; color: var(--ui-muted); }

    body .bridge-overlay:not(.bridge-accusing) { background: #0c090be0; }
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog {
      padding: 24px 28px;
      border: 1px solid #bc9b6170;
      border-top: 2px solid var(--ui-brass);
      border-radius: 1px;
      background: var(--ui-lacquer);
      box-shadow: 0 20px 80px #0008;
      color: var(--ui-paper);
    }
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog:focus { outline: none; }
    body .bridge-dialog h2 { font-family: var(--ui-serif); font-size: 22px; font-weight: 400; letter-spacing: .12em; }
    body .bridge-dialog header { padding-bottom: 14px; border-bottom: 1px solid var(--ui-rule); margin-bottom: 18px; }
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog [data-bridge="close"] { min-width: 40px; padding: 5px; border-color: transparent; background: transparent; }
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog [data-bridge="begin"], body .bridge-overlay:not(.bridge-accusing) .bridge-dialog [data-bridge="next"] {
      background: #75333c;
      border-color: #ae7370;
      color: #f7e6cd;
      padding-inline: 25px;
    }
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog [data-bridge="begin"]:hover, body .bridge-overlay:not(.bridge-accusing) .bridge-dialog [data-bridge="next"]:hover { background: #8c414a; }
    body .bridge-card { border: 0; border-bottom: 1px solid var(--ui-rule); border-radius: 0; background: none; padding: 14px 0; }
    body .bridge-verdict { background: none; border-left-color: var(--ui-brass); font-family: var(--ui-serif); }
    body .bridge-dialog select { border-radius: 0; background: #191318; border-color: var(--ui-rule); color: var(--ui-paper); min-height: 44px; }
    body .bridge-muted, body .bridge-card small { color: var(--ui-muted); }
    body .bridge-toolbar { border: 0; border-bottom: 1px solid var(--ui-rule); border-radius: 0; background: transparent; color: var(--ui-muted); }
    body .bridge-toolbar button { border: 0; border-radius: 0; background: transparent; color: var(--ui-paper); }
    @media(max-width:960px) {
      .app { gap: 18px; padding: 10px; }
      .host-panel, .board-panel { padding: 0; }
      .choice-overlay { padding: 12px 12px 22px; }
    }
    @media(max-width:520px) {
      .app { gap: 12px; padding: 8px; }
      .choice-panel { padding: 19px 20px 14px; }
      .choice-line { font-size: 1rem; }
      .clock-box { padding-inline: 10px; }
      body .bridge-overlay:not(.bridge-accusing) .bridge-dialog { padding: 18px; }
    }


    /* Physical chess: overhead ebony counters and plum lacquer, with one shared light direction. */
    :root, body[data-board-skin] {
      --ebony-counter: url("../content-assets/physical-chess-v1/counter-ebony.webp");
      --counter-art-left: -7.89%;
      --counter-art-top: -4.15%;
      --piece-red-text: #c45d73;
      --piece-black-text: #e4c58b;
      --piece-engraving: 0 -1px 1px #080407, 0 1px 0 #e2b89435;
    }
    :root, body[data-board-skin="classic"] {
      --board-bg: linear-gradient(135deg, #dfb57970, #8b593b95), var(--board-wood);
    }
    body[data-board-skin="queen"] {
      --board-bg: linear-gradient(135deg, #2b192cd6, #130e19e5 55%, #291422de), var(--board-wood);
      --board-border: #73533f;
      --board-line: #bc9b61a6;
      --board-river: #bea16a88;
    }
    body[data-board-skin="judgment"] {
      --board-bg: linear-gradient(135deg, #702b3b9e, #301421cf), var(--board-wood);
      --board-line: #cb9c7c99;
      --board-river: #d1a28199;
    }
    .board, .rule-art {
      background-size: 100% 100%;
      border-radius: 5px;
      border-color: #8c6b50 #3d2830 #231720 #75563f;
      box-shadow: inset 0 1px 0 #f3d3a15e, inset 0 0 0 5px #100913a6,
        inset 0 0 0 6px #c19b5f55, inset 0 0 23px #05030975,
        0 2px 0 #634331, 0 5px 0 #281820, 0 7px 0 #100b11,
        0 13px 21px #0008;
    }
    .board-grid-lines line, .board-palace-lines line { stroke-width: .024; stroke-linecap: butt; }
    .board-start-markers path {
      fill: none; stroke: var(--board-line); stroke-width: .018;
      stroke-linecap: square; stroke-linejoin: miter;
    }
    .board::after { font-family: "DFKai-SB", "KaiTi", serif; font-weight: 400; text-shadow: 0 -1px 0 #0008; letter-spacing: .2em; }
    :is(.piece, .board-move-fx-piece, .switch-cheat-flight-piece, .revive-cheat-flight-piece, .advantage-reversal-stolen-ghost, .advantage-reversal-revive-ghost, .dead-piece) {
      font-family: var(--counter-font);
      font-weight: var(--counter-weight);
      background: none;
      border-color: transparent;
      isolation: isolate;
    }
    .piece.red, .piece.black, .dead-piece.red, .dead-piece.black { background: none; border: 0; }
    .piece.general:not(.name-corrupted) { box-shadow: none; }
    :is(.piece, .board-move-fx-piece, .switch-cheat-flight-piece, .revive-cheat-flight-piece, .dead-piece)::before,
    .advantage-reversal-stolen-ghost::after, .advantage-reversal-revive-ghost::after {
      content: ""; position: absolute; inset: auto;
      left: var(--counter-art-left); top: var(--counter-art-top);
      width: 116%; height: 116%; z-index: -1;
      border: 0; outline: 0; border-radius: 50%; pointer-events: none;
      background: var(--ebony-counter) center / 100% 100% no-repeat;
    }
    .piece.name-corrupted::before { inset: auto; left: var(--counter-art-left); top: var(--counter-art-top); }
    .piece::after, .board-move-fx-piece::after { display: none; }
    .piece-label:not(.piece-name-corrupted), .board-move-fx-label,
    .switch-cheat-flight-piece > span, .revive-cheat-flight-piece > span,
    .advantage-reversal-stolen-ghost > span, .advantage-reversal-revive-ghost > span {
      text-shadow: var(--piece-engraving);
    }
    .piece-label { overflow: visible; }
    /* Optical baseline correction follows the selected counter font. */
    .piece-label, .board-move-fx-label,
    .switch-cheat-flight-piece > span, .revive-cheat-flight-piece > span,
    .advantage-reversal-stolen-ghost > span, .advantage-reversal-revive-ghost > span { translate: 0 var(--counter-label-y); }
    :is(.board-move-fx-piece, .switch-cheat-flight-piece, .revive-cheat-flight-piece, .advantage-reversal-stolen-ghost, .advantage-reversal-revive-ghost) { font-size: min(5.111111cqw, 4.6cqh); }
    .board-move-fx-piece, .switch-cheat-flight-piece, .revive-cheat-flight-piece { border: 0; text-shadow: none; }
    .board-move-fx-piece { box-shadow: none; }
    .switch-cheat-flight-piece::before, .revive-cheat-flight-piece::before { box-shadow: none; }
    .advantage-reversal-stolen-ghost, .advantage-reversal-revive-ghost { border: 0; }
    .dead-piece { text-shadow: var(--piece-engraving); box-shadow: none; }
    .dead-piece.red { color: var(--piece-red-text); }
    .dead-piece.black { color: var(--piece-black-text); }

    /* A bounded readability effect preserves ownership, selection and ARIA. */
    body[data-wager-colorblind="1"] .board {
      --piece-red-text: #987c74;
      --piece-black-text: #987c74;
    }
    body[data-wager-colorblind="1"] .board :is(.piece-label, .board-move-fx-label) {
      color: #987c74 !important;
      text-shadow: none;
    }
    body[data-wager-mode="1"] .board :is(.piece, .board-move-fx-piece, .piece-label, .board-move-fx-label) {
      transition: background-color 400ms ease, border-color 400ms ease;
    }
    body[data-colorblind-onset="1"] .board :is(.piece-label, .board-move-fx-label) {
      animation: wagerColorblindLabelCrossfade 400ms ease both;
    }
    @keyframes wagerColorblindLabelCrossfade {
      0% { opacity: 1; }
      48% { opacity: .28; }
      100% { opacity: 1; }
    }
    body:is([data-wager-tier="tier-4"], [data-wager-tier="tier-5"]) .hostess-background-layer {
      opacity: .94;
    }
    body:is([data-wager-tier="tier-6"], [data-wager-tier="tier-7"]) .hostess-background-layer {
      opacity: .88;
    }
    body:is([data-wager-tier="tier-8"], [data-wager-tier="tier-9"], [data-wager-tier="tier-10"]) .hostess-background-layer {
      opacity: .82;
    }

    /* Rose/violet lounge light over physical lacquer; geometry and input stay on the table. */
    :root {
      --counter-font: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
      --counter-weight: 600;
      --counter-label-y: -.065em;
      --ui-paper: #f0dce9;
      --ui-muted: #b9a0bb;
      --ui-brass: #e2b782;
      --ui-rule: #df72b344;
      --ui-lacquer: #241024;
      --table-frame-shadow: inset 0 1px 0 #ffc7ec80, inset 0 0 0 5px #140919b3,
        inset 0 0 0 6px #df9ac15c, inset 0 0 30px #ff337c13,
        0 2px 0 #74305b, 0 5px 0 #271329, 0 7px 0 #120916,
        -5px 0 28px #f3329829, 7px 2px 31px #8757f52b, 0 17px 34px #050308b3;
    }
    body {
      background:
        radial-gradient(ellipse at 12% 35%, #b61a6942, transparent 58%),
        radial-gradient(ellipse at 90% 12%, #6639ad4a, transparent 58%),
        radial-gradient(ellipse at 65% 100%, #c8297040, transparent 63%),
        #110a19;
    }
    :root, body[data-board-skin] {
      --piece-red-text: #e16d9b;
      --piece-black-text: #efcc91;
      --piece-engraving: 0 -1px 1px #100711, 0 1px 0 #e7acd63d, 0 0 5px #e5b26b29;
    }
    body[data-board-skin="queen"] {
      --board-bg: radial-gradient(ellipse at 0 12%, #ed42a82b, transparent 54%),
        radial-gradient(ellipse at 100% 90%, #8a57f52a, transparent 55%),
        linear-gradient(145deg, #27132ee3, #160c1fec 56%, #301226e3),
        var(--board-wood);
      --board-border: #a7689d;
      --board-line: #d9a3a3a8;
      --board-river: #d69ab2a1;
    }
    .board, .rule-art.rule-art {
      border-color: #d28ab4b3 #765187 #442244 #a96f9b;
      box-shadow: var(--table-frame-shadow);
    }
    :is(.piece, .board-move-fx-piece)::after {
      display: block; inset: 3%; border: 0; z-index: 0;
      background: radial-gradient(circle at 14% 12%, #ff56b52b, transparent 48%),
        radial-gradient(circle at 88% 82%, #9e71ff24, transparent 46%);
      pointer-events: none;
    }
    .piece.red, .board-move-fx-piece.red, .switch-cheat-flight-piece.red,
    .advantage-reversal-stolen-ghost, .dead-piece.red {
      --piece-engraving: 0 -1px 1px #200713, 0 1px 0 #f2a7c64d, 0 0 5px #ff3d892e;
    }
    .hostess-portrait {
      box-shadow: 0 0 0 1px #ed7eb571, -7px 0 32px #e5298b32,
        7px 0 32px #a15bfa2e, 0 20px 42px #08030c80;
    }
    .hostess-portrait::after {
      inset: 0; height: auto; border-radius: inherit; z-index: 5; opacity: 1;
      background: linear-gradient(90deg, #f02c9b24, transparent 27%, transparent 75%, #9a53f930),
        linear-gradient(0deg, #a41b5a21, transparent 32%);
      pointer-events: none;
    }
    .portrait-callout {
      background: #29112b99;
      border-color: #e583be6b;
      box-shadow: 0 0 20px #ea3f982e, inset 0 0 20px #bc3d8512;
    }
    .portrait-callout.right {
      background: #51123491;
      border-color: #f79ac87a;
      box-shadow: 0 0 24px #ec328d38, inset 0 0 20px #e5449517;
    }
    .clock-box { --clock-accent: #b191f6; }
    .clock-box.player { --clock-accent: #fa78b3; }
    .clock-box.is-active { background: linear-gradient(0deg, #db328e14, transparent 80%); }
    .clock-box.is-low, .clock-box.is-critical { --clock-accent: #ff4d8f; }
    .clock-time { color: #f7d8e8; text-shadow: 0 0 12px #f968b32e; }
    .clock-box .clock-reserve::after { background: #b87bba20; }
    .clock-box .clock-reserve-fill::before {
      height: 2px; background: var(--clock-accent);
      box-shadow: 0 0 7px color-mix(in srgb, var(--clock-accent) 65%, transparent);
    }
    .clock-box .clock-reserve-fill::after { box-shadow: 0 0 10px var(--clock-accent); }
    .choice-panel, body .bridge-overlay:not(.bridge-accusing) .bridge-dialog {
      border-top-color: #f17bad;
      background: linear-gradient(125deg, #34132cf5, #190e25f5);
      box-shadow: 0 20px 60px #08030cb3, 0 0 36px #df27861f;
    }
    .choice-speaker { color: #f18dbd; }
    .choice-option::before, .content-event-choice::before { border-color: #e689bd; }
    .choice-option:hover, .choice-option:focus-visible,
    .content-event-choice:hover, .content-event-choice:focus-visible {
      color: #ffe4f0; background: #dc348e17; border-color: #ef7eb180;
    }
    .content-event-actions button:hover, .action-button:hover,
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog button:hover {
      background: #a91f6b24; border-color: #f581bd91; color: #ffe3f0;
    }
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog [data-bridge="begin"],
    body .bridge-overlay:not(.bridge-accusing) .bridge-dialog [data-bridge="next"] {
      background: #76204f; border-color: #ce5e9a; color: #ffe2ef;
    }
    .cg-loading-screen { background: radial-gradient(ellipse at 65% 30%, #4e1a4655, transparent 68%), #140b1b; }

/* Reuse the wager padlock while looking away from the board. */
body:not([data-stroke-mode="on"]) .board.under-table-board-locked .wager-board-lock {
  display: grid;
}

/* Pose-specific face clearance within the static portrait camera. */
body[data-portrait-camera="1"] .hostess-portrait.fatal-blunder-active .portrait-callout.right {
  right: auto;
  width: max-content;
  left: calc(var(--portrait-content-inset, 0px) + 85px + var(--portrait-camera-offset, 0px));
}

body[data-portrait-camera="1"] .hostess-portrait.stroke-tabletop-active .portrait-callout.left {
  top: calc(350px + var(--portrait-table-drop, 0px));
}
