/* ============================================================
   MahjongSensei — board.css
   Top-down 2D mahjong table layout.
   Everything fits inside a fixed rectangular screen.
   ============================================================ */

/* ----------------------------------------------------------
   0. GAME CONTAINER — board stacked above action bar
   ---------------------------------------------------------- */
.game-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: calc(100vh - 100px);
  padding: 0.25rem;
}

/* ----------------------------------------------------------
   1. BOARD (TABLE)
   ---------------------------------------------------------- */
.board {
  position: relative;
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  background-color: var(--board-bg, #0c1a12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: background-color var(--transition-normal);
}

/* ----------------------------------------------------------
   2. CENTER SQUARE — round, scores, dora, turn
   ---------------------------------------------------------- */
.board__center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  padding: 0.4rem;
  background-color: var(--board-center, #10221a);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  z-index: 2;
  aspect-ratio: 1;
}

.center__wind {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}
.center__round {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}
.center__scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 0.5rem;
  font-size: 0.55rem;
  font-weight: 600;
  width: 100%;
  text-align: center;
}
.cs { color: var(--color-text-muted); }
.cs--bottom { color: var(--color-primary); } /* player's score highlighted */
.center__wall {
  font-size: 0.9rem;
  font-weight: 700;
}
.center__wall small {
  font-size: 0.5rem;
  font-weight: 400;
  color: var(--color-text-muted);
}
.center__dora {
  display: flex;
  gap: 2px;
  justify-content: center;
}
.center__turn {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}
.center__turn--you {
  background: var(--color-primary);
  color: #fff;
  animation: pulse-turn 1.5s ease-in-out infinite;
}

@keyframes pulse-turn {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.65; }
}

/* ----------------------------------------------------------
   3. PLAYER SEATS — positioned absolutely at each edge
   ---------------------------------------------------------- */
.seat {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

/* — Bottom (human player) — horizontal, 0° — */
.seat--bottom {
  bottom: 2.5%;
  left: 50%;
  transform: translateX(-50%);
  width: 94%;
  max-width: 880px;
  flex-direction: row;
  justify-content: center;
  gap: 8px;
}
/* S info badge now positioned via .board__info--bottom on the board */
.seat--bottom .mj-hand {
  justify-content: center;
  flex-wrap: nowrap;
  gap: 2px;
  flex-shrink: 1;
  min-width: 0;
}
.seat--bottom .mj-hand .mj-tile {
  flex-shrink: 1;
  min-width: 0;
}
/* Drawn tile separator — standard mahjong convention: gap before the last-drawn tile */
.hand__draw-gap {
  width: 8px;
  flex-shrink: 0;
}
.mj-tile--drawn {
  filter: drop-shadow(0 0 5px rgba(46, 204, 113, 0.7)) drop-shadow(0 0 2px rgba(46, 204, 113, 0.5));
  flex-shrink: 1;
  min-width: 0;
}

/* N/S face-down tile spacing */
.seat--top .mj-facedown-hand,
.seat--bottom .mj-facedown-hand {
  display: inline-flex !important;
  flex-wrap: nowrap;
  gap: 2px !important;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.seat--top .mj-facedown-hand .mj-tile,
.seat--bottom .mj-facedown-hand .mj-tile,
.seat--top .mj-facedown-hand svg,
.seat--bottom .mj-facedown-hand svg {
  margin: 0 !important;
  flex: 0 0 auto;
}

/* — Top (across from human) — horizontal, 180° — */
.seat--top {
  top: 3%;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: row;
  justify-content: center;
  gap: 8px;
  width: 80%;
  max-width: 700px;
}
/* N info badge now positioned via .board__info--top on the board */

/* — Right — vertical column, 90° CCW — */
.seat--right {
  right: 1%;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 44px;
  max-height: 80%;
  overflow: visible;
}
/* E info badge now positioned via .board__info--right on the board */
.seat--right .seat__hand {
  overflow: visible;
}

/* — Left — vertical column, 90° CW — */
.seat--left {
  left: 1%;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 44px;
  max-height: 80%;
  overflow: visible;
}
/* W info badge now positioned via .board__info--left on the board */
.seat--left .seat__hand {
  overflow: visible;
}

/* Vertical hand tiles: slot-based spacing — dimensions set in JS */
.seat--right .mj-facedown-hand .mj-tile,
.seat--left .mj-facedown-hand .mj-tile,
.seat--right .mj-facedown-hand svg,
.seat--left .mj-facedown-hand svg {
  margin: 0 !important;
  display: block;
}

/* Reset margins on all facedown tiles globally */
.mj-facedown-hand .mj-tile,
.mj-facedown-hand svg {
  margin: 0 !important;
}

/* ----------------------------------------------------------
   4. PLAYER INFO BADGE
   ---------------------------------------------------------- */
.seat__info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.2rem 0.5rem;
  background-color: var(--color-surface);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  font-size: 0.65rem;
  white-space: nowrap;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.seat__wind {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.6rem;
}
.seat__name {
  font-weight: 600;
  color: var(--color-text);
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seat__score {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

/* ----------------------------------------------------------
   4b. INFO BADGES — positioned on the board, independent of seats
   Each badge can be moved without affecting hand/wall positions.
   ---------------------------------------------------------- */
.board__info {
  position: absolute;
  z-index: 3;
}
/* Badges: equidistant from center, fixed dimensions for uniformity.
   N/S = 128 × 26,  E/W = 26 × 128 (same box, rotated). */
.board__info--bottom,
.board__info--top {
  width: 128px;
  height: 26px;
  left: 50%;
  transform: translateX(-50%);
}
.board__info--bottom { top: calc(50% + 80px + 10px); }
.board__info--top { bottom: calc(50% + 80px + 10px); }

.board__info--right,
.board__info--left {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  width: 26px;
  height: 128px;
  top: 50%;
  transform: translateY(-50%);
}
.board__info--right  { left: calc(50% + 80px + 10px); }
.board__info--left  {
  writing-mode: vertical-lr;
  right: calc(50% + 80px + 10px);
}

/* Active seat glow */
.board__info--active {
  border-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(61, 168, 120, 0.4);
  animation: active-pulse 1s ease-in-out infinite;
}
@keyframes active-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(61, 168, 120, 0.3); }
  50%      { box-shadow: 0 0 14px rgba(61, 168, 120, 0.6); }
}

/* Riichi indicator */
.seat--riichi .seat__info::after {
  content: "";
  width: 8px; height: 8px;
  background: var(--color-danger);
  border-radius: 50%;
  animation: riichi-glow 1.2s ease-in-out infinite;
}
@keyframes riichi-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(217, 64, 64, 0.4); }
  50%      { box-shadow: 0 0 10px rgba(217, 64, 64, 0.7); }
}

/* ----------------------------------------------------------
   4b. INLINE MELDS — displayed within each seat, right of hand
   ---------------------------------------------------------- */
.seat__melds {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  flex-shrink: 0;
}
.seat__melds .mj-tile {
  width: 20px !important;
  height: 28px !important;
}
/* Slight overlap between tiles within a meld */
.mj-meld .mj-tile:not(:first-child) {
  margin-left: -3px;
}
/* Vertical seats: stack melds vertically */
.seat__melds--vertical {
  flex-direction: column;
  gap: 4px;
}
.seat__melds--vertical .mj-meld {
  flex-direction: column;
}
.seat__melds--vertical .mj-meld .mj-tile:not(:first-child) {
  margin-left: 0;
  margin-top: -3px;
}

/* ----------------------------------------------------------
   5. DISCARD ZONES — between hands and center
   Uniform tile size, gap, and distance-from-center on all 4 sides.
   ---------------------------------------------------------- */
.discard-zone {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: 4px;
  justify-content: center;
  align-content: center;
}
/* Uniform discard tile size — identical on all sides */
.discard-zone .mj-tile {
  width: 20px !important;
  height: 28px !important;
}

/* N/S: horizontal flow, centered per row */
.discard-zone--bottom,
.discard-zone--top {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  left: 50%;
  transform: translateX(-50%);
  max-width: 284px;
  max-height: 60px;
  overflow: hidden;
}
.discard-zone--bottom { bottom: 23.3%; }
.discard-zone--top { top: 23.3%; }

/* E/W: vertical flow — 6 rows, then wrap to next column (up to 3 cols) */
.discard-zone--right,
.discard-zone--left {
  display: grid;
  grid-template-rows: repeat(6, auto);
  grid-auto-flow: column;
  top: 50%;
  max-width: 68px;
  overflow: hidden;
}
.discard-zone--right { left: 77%; transform: translate(-50%, -50%); }
.discard-zone--left { left: 23%; transform: translate(-50%, -50%); }

/* ----------------------------------------------------------
   6. WALL SEGMENTS — square border of face-down tiles
   ---------------------------------------------------------- */
.wall-segment {
  position: absolute;
  z-index: 0;
  opacity: 0.7;
  cursor: pointer;
}
.wall-segment--bottom {
  bottom: 11.5%;
  left: 50%;
  transform: translateX(-50%);
}
.wall-segment--top {
  top: 11.5%;
  left: 50%;
  transform: translateX(-50%);
}
.wall-segment--right {
  right: 9.5%;
  top: 50%;
  transform: translateY(-50%);
}
.wall-segment--left {
  left: 9.5%;
  top: 50%;
  transform: translateY(-50%);
}

/* ----------------------------------------------------------
   7. ACTION PANEL — horizontal bar below the board
   ---------------------------------------------------------- */
.game-actions {
  flex-shrink: 0;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  height: calc(46px * var(--board-scale, 1));
  max-height: calc(46px * var(--board-scale, 1));
  gap: calc(5px * var(--board-scale, 1));
  width: auto;
  max-width: 100%;
  padding: 0 calc(12px * var(--board-scale, 1));
  background: var(--color-surface);
  border-radius: calc(10px * var(--board-scale, 1));
  box-sizing: border-box;
  overflow: visible;
  z-index: 55;
}

.action-panel__turn {
  font-size: calc(0.63rem * var(--board-scale, 1));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  padding: 0 calc(8px * var(--board-scale, 1));
  /* Match .action-btn exactly — same height, line-height, border */
  height: calc(29px * var(--board-scale, 1)) !important;
  max-height: calc(29px * var(--board-scale, 1)) !important;
  border-radius: calc(7px * var(--board-scale, 1));
  border: 1px solid var(--color-border);
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
  line-height: calc(29px * var(--board-scale, 1));
  display: inline-flex;
  align-items: center;
}
.action-panel__turn--you {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  animation: pulse-turn 1.5s ease-in-out infinite;
}

/* Call-context badge — tells the player WHO discarded, WHAT tile, and
   WHICH call types are available. Appears only during call_check when
   the human has a real call opportunity. */
.action-panel__ctx {
  display: inline-flex;
  align-items: center;
  gap: calc(6px * var(--board-scale, 1));
  padding: 0 calc(11px * var(--board-scale, 1));
  height: calc(29px * var(--board-scale, 1));
  max-height: calc(29px * var(--board-scale, 1));
  border-radius: calc(7px * var(--board-scale, 1));
  background: rgba(212, 168, 83, 0.10);
  border: 1px solid rgba(212, 168, 83, 0.32);
  color: #d4a853;
  font-size: calc(0.63rem * var(--board-scale, 1));
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.action-panel__ctx-text {
  opacity: 0.92;
}
.action-panel__ctx-tile {
  display: inline-block;
  width: calc(13px * var(--board-scale, 1)) !important;
  height: calc(18px * var(--board-scale, 1)) !important;
  vertical-align: middle;
}
.action-panel__ctx-tile-fallback {
  font-weight: 700;
  color: #f0c473;
  letter-spacing: 0.03em;
}
.action-panel__ctx-action {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f0c473;
}

.action-btn,
.game-actions .btn.action-btn {
  position: relative;
  min-width: unset !important;
  min-height: unset !important;
  max-width: 100%;
  box-sizing: border-box;
  font-size: calc(0.66rem * var(--board-scale, 1)) !important;
  padding: 0 calc(11px * var(--board-scale, 1)) !important;
  height: calc(29px * var(--board-scale, 1)) !important;
  max-height: calc(29px * var(--board-scale, 1)) !important;
  line-height: calc(28px * var(--board-scale, 1));
  white-space: nowrap;
  text-align: center;
  border-radius: calc(7px * var(--board-scale, 1));
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 600;
  transition: all 0.15s;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0 !important;
}
.action-btn:hover:not(:disabled) {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.action-btn--inactive {
  opacity: 0.45;
  cursor: help;
}
.action-btn--inactive:hover {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
/* Available action — gold pulse with background throb */
.action-btn--available {
  border-color: #d4a853;
  color: #d4a853;
  background: rgba(212, 168, 83, 0.1);
  animation: pulse-available 1.4s ease-in-out infinite;
}
.action-btn--available:hover {
  background: #d4a853;
  color: #fff;
  border-color: #d4a853;
  animation: none;
}
@keyframes pulse-available {
  0%, 100% { box-shadow: 0 0 4px rgba(212, 168, 83, 0.3); background: rgba(212, 168, 83, 0.08); }
  50%      { box-shadow: 0 0 14px rgba(212, 168, 83, 0.7); background: rgba(212, 168, 83, 0.22); }
}
/* Pass button — grey pulse with background throb */
.action-btn--pass {
  border-color: #8b95a5;
  color: #b0b8c8;
  background: rgba(139, 149, 165, 0.08);
  animation: pulse-pass 1.6s ease-in-out infinite;
}
.action-btn--pass:hover {
  background: #6b7280;
  color: #fff;
  border-color: #6b7280;
  animation: none;
}
@keyframes pulse-pass {
  0%, 100% { box-shadow: 0 0 4px rgba(139, 149, 165, 0.3); background: rgba(139, 149, 165, 0.06); }
  50%      { box-shadow: 0 0 12px rgba(139, 149, 165, 0.55); background: rgba(139, 149, 165, 0.18); }
}
/* Ron available — vivid crimson glow to stand out */
.action-btn--ron {
  border-color: #e53e3e;
  color: #fff;
  background: rgba(229, 62, 62, 0.25);
  animation: pulse-ron 1.0s ease-in-out infinite;
  font-weight: 700;
  text-shadow: 0 0 4px rgba(229, 62, 62, 0.6);
}
.action-btn--ron:hover {
  background: #e53e3e;
  color: #fff;
  border-color: #e53e3e;
  animation: none;
}
@keyframes pulse-ron {
  0%, 100% { box-shadow: 0 0 6px rgba(229, 62, 62, 0.4); background: rgba(229, 62, 62, 0.18); }
  50%      { box-shadow: 0 0 20px rgba(229, 62, 62, 0.9); background: rgba(229, 62, 62, 0.35); }
}
/* Sensei recommended — deep blue pulse with background throb */
.action-btn--sensei {
  border-color: #4a6fa5;
  background: rgba(55, 80, 130, 0.15);
  color: #7ba3d4;
  animation: pulse-sensei 1.2s ease-in-out infinite;
}
.action-btn--sensei:hover {
  background: #4a6fa5;
  color: #fff;
  animation: none;
}
@keyframes pulse-sensei {
  0%, 100% { box-shadow: 0 0 6px rgba(74, 111, 165, 0.35); background: rgba(55, 80, 130, 0.12); }
  50%      { box-shadow: 0 0 18px rgba(74, 111, 165, 0.8); background: rgba(55, 80, 130, 0.3); }
}

/* Action tooltip — appears on click of disabled buttons */
.action-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  padding: 0.6rem 0.75rem;
  background: #0a1f14;
  border: 1.5px solid #3da878;
  border-radius: var(--radius-sm);
  font-size: 0.6rem;
  font-weight: 400;
  color: #e8dcc8;
  line-height: 1.45;
  z-index: 100;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 8px rgba(61, 168, 120, 0.2);
  pointer-events: none;
  animation: tooltip-in 0.15s ease;
}
.action-tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #3da878;
}
@keyframes tooltip-in {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.action-panel__info {
  font-size: 0.55rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 0.3rem 0.5rem;
  border-left: 1px solid var(--color-border);
  margin-left: auto;
  white-space: nowrap;
}

/* ── Eval Bar (hand strength meter in top bar) ── */
.eval-bar {
  position: relative;
  width: clamp(50px, 9vw, 137px);
  height: calc(16px * var(--board-scale, 1));
  background: rgba(74, 111, 165, 0.15);
  border-radius: calc(8px * var(--board-scale, 1));
  overflow: hidden;
  flex-shrink: 1;
  min-width: 40px;
  cursor: help;
}
.eval-bar__fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, #e74c3c 0%, #f39c12 30%, #27ae60 60%, #1abc9c 100%);
  border-radius: calc(6px * var(--board-scale, 1));
  transition: width 0.4s ease;
}
.eval-bar__label {
  font-size: calc(0.55rem * var(--board-scale, 1));
  font-weight: 700;
  color: rgba(210, 215, 225, 0.7);
  line-height: calc(16px * var(--board-scale, 1));
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Grade Flash (chess.com-style move evaluation popup) ── */
.grade-flash {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  background: rgba(10, 15, 25, 0.92);
  border: 2px solid var(--grade-color, #7ba3d4);
  box-shadow: 0 0 30px rgba(0,0,0,0.5), 0 0 15px color-mix(in srgb, var(--grade-color) 40%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: grade-flash-in 0.3s ease-out, grade-flash-out 0.4s ease-in 1.6s forwards;
  pointer-events: none;
}
.grade-flash__emoji {
  font-size: 1.8rem;
}
.grade-flash__label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--grade-color, #fff);
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px color-mix(in srgb, var(--grade-color) 50%, transparent);
}
@keyframes grade-flash-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes grade-flash-out {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to   { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}

/* ── Post-Game Review Panel ── */
.ge-review-hdr {
  font-size: 0.75rem;
  font-weight: 700;
  color: #7ba3d4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.ge-review-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(74, 111, 165, 0.2);
}
.ge-review-stat {
  font-size: 0.7rem;
  font-weight: 700;
}
.ge-review-moves {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ge-review-move {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6rem;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
}
.ge-review-num {
  color: #6b7890;
  font-weight: 600;
  min-width: 24px;
}
.ge-review-tile {
  font-weight: 700;
  color: #d0daea;
}
.ge-review-best {
  font-size: 0.5rem;
  color: #27ae60;
  opacity: 0.8;
}
.ge-review-sh {
  font-size: 0.45rem;
  color: #6b7890;
  margin-left: auto;
}
.ge-review-empty {
  color: #6b7890;
  font-size: 0.6rem;
  font-style: italic;
}
.ge-btn--review {
  border-color: rgba(74, 111, 165, 0.5) !important;
  color: #7ba3d4 !important;
}
.ge-btn--review:hover {
  background: #4a6fa5 !important;
  color: #fff !important;
}

/* Tenpai flash indicator */
.action-panel__tenpai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(21px * var(--board-scale, 1));
  padding: 0 calc(10px * var(--board-scale, 1));
  font-size: calc(0.51rem * var(--board-scale, 1));
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  border: 1px solid rgba(46, 204, 113, 0.6);
  border-radius: calc(5px * var(--board-scale, 1));
  animation: tenpai-flash 0.9s ease-in-out infinite;
  margin-left: auto;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.4);
}
@keyframes tenpai-flash {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.4);
    background: linear-gradient(135deg, #2ecc71, #27ae60);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 18px rgba(46, 204, 113, 0.85), 0 0 4px rgba(46, 204, 113, 0.5) inset;
    background: linear-gradient(135deg, #27ae60, #1e8449);
  }
}

/* ----------------------------------------------------------
   TOP INFO BAR — above the board
   ---------------------------------------------------------- */
.game-top-bar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(0.4rem * var(--board-scale, 1));
  height: calc(46px * var(--board-scale, 1));
  max-height: calc(46px * var(--board-scale, 1));
  padding: 0 calc(12px * var(--board-scale, 1));
  font-size: calc(0.85rem * var(--board-scale, 1));
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: calc(10px * var(--board-scale, 1));
  position: relative;
  flex-wrap: nowrap;
  overflow: visible;
  width: auto;
  max-width: 100%;
}
/* Round badge — prominent pill */
.top-bar__round-badge {
  font-weight: 700;
  font-size: calc(0.74rem * var(--board-scale, 1));
  color: #fff;
  background: var(--color-primary, #5a8a5a);
  padding: 0 calc(11px * var(--board-scale, 1));
  height: calc(29px * var(--board-scale, 1));
  max-height: calc(29px * var(--board-scale, 1));
  border-radius: calc(7px * var(--board-scale, 1));
  white-space: nowrap;
  letter-spacing: 0.03em;
  line-height: calc(29px * var(--board-scale, 1));
  display: inline-flex;
  align-items: center;
}
.top-bar__meta {
  font-size: calc(0.68rem * var(--board-scale, 1));
  color: var(--color-text-muted);
  white-space: nowrap;
}
/* Detail items — game info not shown on board */
/* Spacer pushes controls to the right */
.top-bar__spacer {
  flex: 1 1 0;
  min-width: calc(4px * var(--board-scale, 1));
}
/* Status tags row */
.top-bar__status {
  display: flex;
  gap: calc(5px * var(--board-scale, 1));
  flex-wrap: nowrap;
  align-items: center;
}
.top-bar__tag {
  font-size: calc(0.66rem * var(--board-scale, 1));
  font-weight: 700;
  padding: 0 calc(10px * var(--board-scale, 1));
  height: calc(25px * var(--board-scale, 1));
  max-height: calc(25px * var(--board-scale, 1));
  border-radius: calc(6px * var(--board-scale, 1));
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: calc(25px * var(--board-scale, 1));
  display: inline-flex;
  align-items: center;
}
.top-bar__tag--tenpai {
  background: rgba(100, 200, 100, 0.2);
  color: #6ac66a;
  border: 1px solid rgba(100, 200, 100, 0.3);
}
.top-bar__tag--shanten {
  background: rgba(200, 170, 100, 0.12);
  color: var(--color-accent, #c8aa64);
  border: 1px solid rgba(200, 170, 100, 0.2);
}
.top-bar__tag--furiten {
  background: rgba(220, 80, 80, 0.2);
  color: #d46060;
  border: 1px solid rgba(220, 80, 80, 0.35);
  animation: pulse-furiten 1.5s ease-in-out infinite;
}
@keyframes pulse-furiten {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.top-bar__tag--riichi {
  background: rgba(74, 111, 165, 0.2);
  color: #7ba3d4;
  border: 1px solid rgba(74, 111, 165, 0.35);
}
.top-bar__tag--waits {
  font-size: calc(0.51rem * var(--board-scale, 1));
  font-weight: 600;
  text-transform: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
/* Tag explain tooltip */
.tag-explain {
  position: fixed;
  z-index: 1000;
  max-width: 280px;
  padding: 8px 12px;
  background: rgba(25, 28, 32, 0.95);
  border: 1px solid rgba(160, 165, 175, 0.25);
  border-radius: 8px;
  color: #d2d7e1;
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: tag-explain-in 0.15s ease-out;
}
@keyframes tag-explain-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.top-bar__tag[data-explain] {
  cursor: help;
}
.top-bar__tag[data-explain]:hover {
  filter: brightness(1.2);
}

.top-bar__scores {
  display: flex;
  gap: 0.75rem;
}
.top-bar__score {
  white-space: nowrap;
}
.top-bar__score--you {
  color: var(--color-primary);
}
/* NOTE: .top-bar__yaku-btn / __zoom-btn / __help-btn were dead CSS with
   hardcoded sizes that did not scale with --board-scale. The actual buttons
   now use .gc-btn and its variants (see below), which scale properly. */

/* Help popup */
.help-popup {
  position: fixed;
  z-index: 999;
  width: 260px;
  max-height: 400px;
  overflow-y: auto;
  background: #0a1f14;
  border: 1px solid rgba(200, 200, 200, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.help-popup__suggestion {
  background: rgba(74, 111, 165, 0.15);
  border: 1px solid rgba(74, 111, 165, 0.3);
  border-radius: 6px;
  padding: 6px 8px;
}
.help-popup__label {
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(200, 200, 200, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.help-popup__tip {
  font-size: 0.6rem;
  line-height: 1.35;
  color: #7ba3d4;
  font-weight: 500;
}
.help-popup__text {
  font-size: 0.55rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}
.help-popup__text strong {
  color: var(--color-text);
}
.help-popup__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 2px 0;
}
.help-popup__version {
  font-size: 0.45rem;
  color: rgba(200, 200, 200, 0.35);
  text-align: center;
  letter-spacing: 0.03em;
}

/* Tile zoom preview tooltip */
.tile-zoom-preview {
  position: fixed;
  z-index: 1000;
  background: #0a1f14;
  border: 2px solid var(--color-primary);
  border-radius: calc(10px * var(--board-scale, 1));
  padding: calc(8px * var(--board-scale, 1)) calc(10px * var(--board-scale, 1)) calc(4px * var(--board-scale, 1));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(4px * var(--board-scale, 1));
}
.tile-zoom-label {
  font-size: calc(0.7rem * var(--board-scale, 1));
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  text-align: center;
}
.tile-zoom-category {
  font-size: calc(0.55rem * var(--board-scale, 1));
  font-weight: 500;
  color: #7ba3d4;
  white-space: nowrap;
  text-align: center;
  letter-spacing: 0.03em;
}
.tile-zoom-sensei-badge {
  font-size: calc(0.5rem * var(--board-scale, 1));
  font-weight: 600;
  color: #7ba3d4;
  background: rgba(74, 111, 165, 0.12);
  border: 1px solid rgba(74, 111, 165, 0.4);
  border-radius: 4px;
  padding: calc(2px * var(--board-scale, 1)) calc(6px * var(--board-scale, 1));
  margin-top: 2px;
  text-align: center;
}
.tile-zoom-uke-badge {
  font-size: calc(0.48rem * var(--board-scale, 1));
  font-weight: 500;
  color: #8bc6ec;
  background: rgba(139, 198, 236, 0.08);
  border: 1px solid rgba(139, 198, 236, 0.3);
  border-radius: 4px;
  padding: calc(2px * var(--board-scale, 1)) calc(6px * var(--board-scale, 1));
  margin-top: 2px;
  text-align: center;
  line-height: 1.3;
}
.tile-zoom-danger-badge {
  font-size: calc(0.5rem * var(--board-scale, 1));
  font-weight: 600;
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.4);
  border-radius: 4px;
  padding: calc(2px * var(--board-scale, 1)) calc(6px * var(--board-scale, 1));
  margin-top: 2px;
  text-align: center;
  line-height: 1.3;
}
.tile-zoom-drawn-badge {
  font-size: calc(0.55rem * var(--board-scale, 1));
  font-weight: 700;
  color: #4a6fa5;
  background: rgba(74, 111, 165, 0.15);
  border: 1px solid rgba(74, 111, 165, 0.4);
  border-radius: 4px;
  padding: calc(2px * var(--board-scale, 1)) calc(8px * var(--board-scale, 1));
  margin-top: 2px;
  text-align: center;
  letter-spacing: 0.04em;
}
/* Meld zoom: tiles in a row */
.tile-zoom-preview--meld {
  padding: 8px 12px 6px;
}
.tile-zoom-meld-tiles {
  display: flex;
  gap: 3px;
  align-items: flex-end;
}
.tile-zoom-preview--meld .tile-zoom-label {
  font-size: 0.65rem;
  color: #7ba3d4;
  margin-top: 2px;
}
.game-info__speed {
  font-size: 0.55rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.game-info__speed:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ----------------------------------------------------------
   YAKU POPUP — possible winning hands overlay
   ---------------------------------------------------------- */
.yaku-popup {
  position: fixed;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: #0a1f14;
  border: 1.5px solid #4a6fa5;
  border-radius: 8px;
  padding: 0.5rem;
  z-index: 50;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  font-size: 0.6rem;
}
.yaku-popup__empty {
  color: var(--color-text-muted);
  text-align: center;
  padding: 1rem;
}
.yaku-popup__recommend {
  background: rgba(55, 80, 130, 0.25);
  border: 1px solid #4a6fa5;
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.5rem;
  color: #7ba3d4;
  line-height: 1.4;
}
.yaku-popup__item {
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.25rem;
  border-left: 3px solid transparent;
  transition: background 0.15s;
}
.yaku-popup__item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.yaku-popup__item--recommended {
  border-left-color: #4a6fa5;
  background: rgba(55, 80, 130, 0.1);
}
.yaku-popup__item--likely {
  color: var(--color-text);
}
.yaku-popup__item--possible {
  color: var(--color-text-muted);
}
.yaku-popup__item--unlikely {
  color: var(--color-text-muted);
  opacity: 0.65;
}
.yaku-popup__name {
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.yaku-popup__han {
  font-weight: 400;
  color: #d4a853;
  margin-left: 0.25rem;
}
.yaku-popup__progress {
  font-size: 0.55rem;
  color: var(--color-primary);
  margin-bottom: 0.1rem;
}
.yaku-popup__desc {
  font-size: 0.5rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}
.yaku-popup__section {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: 0.4rem 0.2rem 0.2rem;
}
.yaku-popup__divider {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 0.4rem 0;
}
.yaku-popup__search {
  width: 100%;
  padding: 0.3rem 0.5rem;
  font-size: 0.55rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: var(--color-text);
  outline: none;
  margin-bottom: 0.35rem;
}
.yaku-popup__search:focus {
  border-color: #4a6fa5;
}
.yaku-popup__all-list {
  max-height: 200px;
  overflow-y: auto;
}
.yaku-popup__ref-item {
  padding: 0.3rem 0.4rem;
  border-radius: 3px;
  margin-bottom: 0.15rem;
  border-left: 3px solid transparent;
  opacity: 0.55;
}
.yaku-popup__ref-item--active {
  opacity: 1;
  border-left-color: var(--color-primary);
  background: rgba(61, 168, 120, 0.1);
}

/* ----------------------------------------------------------
   8. SCORE ANIMATION
   ---------------------------------------------------------- */
@keyframes score-change {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); color: var(--color-primary); }
  100% { transform: scale(1); }
}

/* ----------------------------------------------------------
   9. HELPER OVERLAY (game-helpers, kept for data)
   ---------------------------------------------------------- */
.game-helpers {
  display: none !important; /* data only, action panel replaces UI */
}

/* ----------------------------------------------------------
   10. RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .game-container {
    height: calc(100vh - 70px);
  }
  .board {
    flex: 1;
  }
  .action-panel__info {
    border-left: none;
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
  /* Wall segments and E/W seats kept visible — board scaling handles small screens */
  .board__center { width: 130px; height: 130px; padding: 0.3rem; }
  .center__wind { font-size: 1rem; }
}

/* ----------------------------------------------------------
   11. BOARD SCALING WRAPPER
   ---------------------------------------------------------- */
.mj-board-wrapper {
  position: fixed;
  top: var(--topbar-h, 56px); /* below topbar — JS sets actual height */
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  z-index: 50;
  background: var(--board-bg, #0c1a12);
  padding: 0 8px 0;
}

/* Top bar slot — outside scaled board, always visible */
.game-top-bar-slot {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 100%;
  z-index: 55;
}

/* Center area holds the scaled board */
.mj-board-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  min-height: 0;
}

@media (max-width: 768px) {
  .mj-board-wrapper {
    bottom: 0;
    padding-bottom: var(--mobile-nav-h, 56px);  /* flush with mobile nav top */
  }
}

.mj-board {
  transform-origin: center center;
  width: 700px;
  height: 770px;
}

/* Override default game-container constraints — use fixed design dimensions for scaling */
.mj-board-wrapper .game-container {
  width: 700px;
  height: 770px;
  max-height: none;
}

/* ----------------------------------------------------------
   12. SIZE WARNING OVERLAY
   ---------------------------------------------------------- */
.mj-size-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 20, 0.92);
  color: #e8dcc8;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  z-index: 9999;
  text-align: center;
  padding: 2rem;
}

.mj-size-warning.active {
  display: flex;
}

/* ----------------------------------------------------------
   SIDE UI — Chi panel + mini tile box (left of board)
   ---------------------------------------------------------- */
.mj-lower-ui {
  position: fixed;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 200px;
}

/* ─── Game Controls Box (right of board, top) ───────────────────────────── */
.mj-game-controls {
  position: fixed;
  z-index: 60;
  background: rgba(30, 32, 36, 0.88);
  border: 1px solid rgba(160, 165, 175, 0.18);
  border-radius: 8px;
  padding: 8px 10px 9px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  opacity: 0.65;
  transition: opacity 0.25s ease, box-shadow 0.25s ease;
  max-width: 200px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.mj-game-controls:hover {
  opacity: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.game-controls__title {
  font-size: 0.5rem;
  font-weight: 700;
  color: rgba(190, 195, 205, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(160, 165, 175, 0.12);
  margin-bottom: 1px;
}

.gc-btn-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.gc-btn {
  font-size: calc(0.68rem * var(--board-scale, 1));
  font-weight: 600;
  padding: 0 calc(9px * var(--board-scale, 1));
  height: calc(29px * var(--board-scale, 1)) !important;
  max-height: calc(29px * var(--board-scale, 1)) !important;
  min-height: unset !important;
  min-width: unset !important;
  border-radius: calc(7px * var(--board-scale, 1));
  border: 1px solid rgba(160, 165, 175, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(210, 215, 225, 0.85);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  line-height: calc(28px * var(--board-scale, 1));
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
}
.gc-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(200, 205, 215, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.gc-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.1);
}
/* Yaku button — Sensei blue theme */
.gc-btn--yaku {
  border-color: rgba(74, 111, 165, 0.5);
  background: rgba(55, 80, 130, 0.2);
  color: #7ba3d4;
}
.gc-btn--yaku:hover {
  background: #4a6fa5;
  color: #fff;
  border-color: #4a6fa5;
  box-shadow: 0 1px 6px rgba(74, 111, 165, 0.35);
}
.gc-btn--active {
  background: rgba(90, 138, 90, 0.45);
  color: #b8e6b8;
  border-color: rgba(90, 138, 90, 0.5);
  box-shadow: 0 0 6px rgba(90, 138, 90, 0.2);
}
.gc-btn--active:hover {
  background: rgba(90, 138, 90, 0.6);
  color: #fff;
  border-color: rgba(90, 138, 90, 0.7);
}
.gc-btn--help {
  width: calc(29px * var(--board-scale, 1)) !important;
  min-width: calc(29px * var(--board-scale, 1)) !important;
  height: calc(29px * var(--board-scale, 1)) !important;
  max-height: calc(29px * var(--board-scale, 1)) !important;
  line-height: calc(28px * var(--board-scale, 1));
  text-align: center;
  padding: 0;
  border-radius: 50%;
  font-size: calc(0.66rem * var(--board-scale, 1));
  font-weight: 700;
  border: 1px solid rgba(160, 165, 175, 0.25);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(190, 195, 205, 0.7);
  margin-left: auto;
}
.gc-btn--help:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(200, 205, 215, 0.4);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
}

/* Sensei settings box — compact, ~40% height of tile box */
.mj-sensei-settings {
  background: rgba(14, 25, 42, 0.75);
  border: 1px solid rgba(75, 111, 165, 0.25);
  border-radius: 4px;
  padding: 4px 6px 5px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.mj-sensei-settings:hover { opacity: 1; }

.sensei-settings__title {
  font-size: 0.55rem;
  font-weight: 700;
  color: #7ba3d4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}
.sensei-toggle--master {
  width: 100%;
  padding-bottom: 3px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(74, 111, 165, 0.25);
}

.sensei-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-size: 0.5rem;
  line-height: 1;
  color: rgba(123, 163, 212, 0.7);
  white-space: nowrap;
  height: 12px;
}

.sensei-toggle input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 7px;
  height: 7px;
  min-width: 7px;
  min-height: 7px;
  max-width: 7px;
  max-height: 7px;
  padding: 0;
  border: 1px solid rgba(75, 111, 165, 0.5);
  border-radius: 1px;
  background: transparent;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  display: block;
}
.sensei-toggle input[type="checkbox"]:checked {
  background: #4a6fa5;
  border-color: #4a6fa5;
}

.sensei-toggle:hover { color: #7ba3d4; }
.sensei-audio-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding-top: 3px;
  margin-top: 2px;
  border-top: 1px solid rgba(74, 111, 165, 0.25);
}
.sensei-volume-slider {
  width: 50px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(75, 111, 165, 0.3);
  border-radius: 2px;
  cursor: pointer;
}
.sensei-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a6fa5;
  cursor: pointer;
}

/* ── Yaku Paths Box — left side of board ── */
.yaku-paths {
  position: absolute;
  /* Horizontally: centered in the gap left of the board, shifted slightly right */
  left: calc(var(--board-left-edge, 160px) * 0.55);
  transform: translateX(-50%);
  width: calc(var(--board-left-edge, 160px) * 0.6);
  max-width: 160px;
  min-width: 100px;
  /* Vertically: starts at board top, grows with content, never past board bottom */
  top: var(--board-top, 100px);
  max-height: calc(100% - var(--board-top, 100px) - var(--board-bottom, 100px));
  overflow-y: auto;
  background: rgba(14, 25, 42, 0.88);
  border: 1px solid rgba(74, 111, 165, 0.35);
  border-radius: 6px;
  padding: 6px 8px;
  z-index: 60;
  font-size: 0.55rem;
  color: #c0cde0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.yaku-paths__header {
  font-size: 0.6rem;
  font-weight: 700;
  color: #7ba3d4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(74, 111, 165, 0.25);
}
.yaku-paths__entry {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(74, 111, 165, 0.12);
}
.yaku-paths__entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.yaku-paths__title-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 3px;
}
.yaku-paths__medal {
  font-size: 0.65rem;
  line-height: 1;
}
.yaku-paths__name {
  font-weight: 700;
  color: #d0daea;
  flex: 1;
}
.yaku-paths__han {
  font-size: 0.48rem;
  font-weight: 600;
  color: #7ba3d4;
  white-space: nowrap;
}
.yaku-paths__bar-wrap {
  position: relative;
  height: 6px;
  background: rgba(74, 111, 165, 0.15);
  border-radius: 3px;
  margin-bottom: 4px;
  overflow: hidden;
}
.yaku-paths__bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, #4a6fa5, #7ba3d4);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.yaku-paths__bar-label {
  position: absolute;
  right: 3px;
  top: -1px;
  font-size: 0.4rem;
  font-weight: 700;
  color: #c0cde0;
  line-height: 8px;
}
/* Structural meld pattern — Kemono APK reference card style */
.yaku-paths__structure {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 3px;
}
.yaku-paths__meld {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 3px;
  border-radius: 2px;
  font-size: 0.42rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  border: 1px solid rgba(74, 111, 165, 0.3);
  background: rgba(74, 111, 165, 0.08);
  color: #7ba3d4;
}
.yaku-paths__meld--seq {
  color: #27ae60;
  border-color: rgba(39, 174, 96, 0.35);
  background: rgba(39, 174, 96, 0.08);
}
.yaku-paths__meld--tri {
  color: #e67e22;
  border-color: rgba(230, 126, 34, 0.35);
  background: rgba(230, 126, 34, 0.08);
}
.yaku-paths__meld--pair {
  color: #9b59b6;
  border-color: rgba(155, 89, 182, 0.35);
  background: rgba(155, 89, 182, 0.08);
}
.yaku-paths__meld--any {
  color: #6b7890;
  border-color: rgba(107, 120, 144, 0.25);
  background: rgba(107, 120, 144, 0.06);
}
.yaku-paths__rule {
  font-size: 0.42rem;
  color: #8899aa;
  line-height: 1.3;
  margin-bottom: 3px;
  font-style: italic;
}
.yaku-paths__shed-info {
  font-size: 0.4rem;
  color: #e67e22;
  font-weight: 600;
  margin-bottom: 2px;
}
/* Tiles view (original style) */
.yaku-paths__tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-bottom: 3px;
}
.yaku-paths__tile {
  width: 14px !important;
  height: 19px !important;
  flex-shrink: 0;
}
.yaku-paths__discard {
  font-size: 0.48rem;
  color: #9ab0cc;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}
.yaku-paths__discard-tile {
  width: 14px !important;
  height: 19px !important;
  flex-shrink: 0;
  opacity: 0.85;
  filter: drop-shadow(0 0 2px rgba(229, 62, 62, 0.4));
}

.yaku-paths__view-toggle {
  cursor: pointer;
  font-size: 0.55rem;
  margin-left: 3px;
  vertical-align: middle;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.yaku-paths__view-toggle:hover {
  opacity: 1;
}
.yaku-paths__help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(123, 163, 212, 0.5);
  font-size: 0.4rem;
  font-weight: 700;
  color: #7ba3d4;
  cursor: pointer;
  margin-left: 4px;
  vertical-align: middle;
  transition: all 0.15s;
}
.yaku-paths__help:hover {
  background: #4a6fa5;
  color: #fff;
  border-color: #4a6fa5;
}
.yaku-paths__tooltip {
  background: rgba(10, 18, 30, 0.96);
  border: 1px solid rgba(74, 111, 165, 0.4);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.48rem;
  line-height: 1.5;
  color: #b0c4de;
  margin-top: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
/* Large hover popup for meld explanations — like tile zoom but for meld types */
.meld-hover-popup {
  position: fixed;
  z-index: 1000;
  background: #0a1f14;
  border: 2px solid #4a6fa5;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  min-width: 160px;
  max-width: 240px;
  animation: meld-popup-in 0.12s ease-out;
}
@keyframes meld-popup-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.meld-hover-popup__title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #7ba3d4;
  margin-bottom: 3px;
}
.meld-hover-popup__desc {
  font-size: 0.55rem;
  color: #b0c4de;
  line-height: 1.4;
  margin-bottom: 6px;
}
.meld-hover-popup__label {
  font-size: 0.48rem;
  font-weight: 600;
  color: #6b7890;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.meld-hover-popup__tiles {
  display: flex;
  gap: 3px;
  margin-bottom: 5px;
}
.yaku-paths__tooltip strong {
  color: #d0daea;
}
.yaku-paths__tooltip em {
  color: #7ba3d4;
  font-style: normal;
  font-weight: 600;
}

/* Hide on tiny screens where there's no room */
@media (max-width: 600px) {
  .yaku-paths { display: none; }
}

/* Sensei tile annotations */
.sensei-tile-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.sensei-badge {
  position: absolute;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  pointer-events: auto;
  cursor: help;
  z-index: 2;
}
.sensei-badge--best {
  top: -4px;
  right: -2px;
  color: #7ba3d4;
  text-shadow: 0 0 4px rgba(74, 111, 165, 0.8);
}
.sensei-badge--danger {
  top: -4px;
  left: -1px;
  color: #ff4444;
  text-shadow: 0 0 3px rgba(255, 68, 68, 0.8);
}
.sensei-badge--caution {
  color: #e67e22;
  text-shadow: 0 0 3px rgba(230, 126, 34, 0.7);
}
.sensei-badge--uke {
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  color: #8bc6ec;
  background: rgba(0, 0, 0, 0.6);
  padding: 0 2px;
  border-radius: 2px;
}

/* ── Show Waits Bar ── */
.seat__waits {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  padding: 2px 6px;
  background: rgba(74, 111, 165, 0.15);
  border: 1px solid rgba(74, 111, 165, 0.3);
  border-radius: 4px;
  width: fit-content;
}
.waits__label {
  font-size: 0.5rem;
  font-weight: 600;
  color: #7ba3d4;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 2px;
}
.seat__waits .mj-tile {
  filter: drop-shadow(0 0 3px rgba(123, 163, 212, 0.6));
}

/* ── Furiten Badge ── */
.furiten-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  background: rgba(220, 60, 60, 0.85);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 3px;
  animation: furiten-pulse 1.5s ease-in-out infinite;
}
@keyframes furiten-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Meld labels */
.mj-meld-labeled {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.mj-meld-label {
  font-size: 0.45rem;
  font-weight: 700;
  color: #7ba3d4;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}
.mj-meld-help {
  display: inline-block;
  font-size: 0.4rem;
  color: rgba(123, 163, 212, 0.5);
  margin-left: 2px;
  cursor: help;
  font-weight: 400;
}

/* Mini tile box */
.mj-mini-tile-box {
  background: rgba(10, 31, 20, 0.95);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  min-width: 180px;
}
.mj-mini-tile-box:empty { display: none; }
.mini-tile-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}
.mini-tile-header__title {
  font-size: 0.5rem;
  font-weight: 700;
  color: #27ae60;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mini-tile-header__help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(123, 163, 212, 0.5);
  font-size: 0.4rem;
  font-weight: 700;
  color: #7ba3d4;
  cursor: pointer;
  transition: all 0.15s;
}
.mini-tile-header__help:hover {
  background: #4a6fa5;
  color: #fff;
}
.mini-tile-tooltip {
  grid-column: 1 / -1;
  background: rgba(10, 18, 30, 0.96);
  border: 1px solid rgba(74, 111, 165, 0.4);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.48rem;
  line-height: 1.5;
  color: #b0c4de;
}
.mini-tile-tooltip strong {
  color: #d0daea;
}
.mj-mini-slot {
  width: 32px;
  height: 44px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mj-mini-slot--empty {
  opacity: 0.3;
}

/* Chi choice panel */
.mj-chi-panel {
  background: rgba(10, 31, 20, 0.95);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
}
.mj-chi-panel:empty { display: none; }
.mj-chi-panel__label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.mj-chi-panel__options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.mj-chi-option {
  display: flex;
  gap: 2px;
  padding: 4px 6px;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.15s;
}
.mj-chi-option:hover {
  border-color: var(--color-primary);
  background: rgba(61, 168, 120, 0.1);
  box-shadow: 0 0 8px rgba(61, 168, 120, 0.2);
}
.mj-chi-option .mj-tile--called {
  outline: 2px solid #d4a853;
  outline-offset: 1px;
  border-radius: 3px;
}
.mj-chi-cancel {
  font-size: 0.55rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.mj-chi-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Sensei recommendation star — blue themed */
.sensei-star {
  color: #7ba3d4;
  font-size: 14px;
  margin-right: 2px;
  filter: drop-shadow(0 0 3px rgba(123, 163, 212, 0.5));
  align-self: center;
}

@media (max-width: 768px) {
  .mj-lower-ui {
    max-width: 180px;
  }
}

/* ----------------------------------------------------------
   GAME END OVERLAY
   ---------------------------------------------------------- */
.ge-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-surface, rgba(20, 30, 20, 0.96));
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 18px 22px;
  max-width: 370px;
  width: 85%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  z-index: 60;
}
.ge-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-heading, #e8dcc8);
  margin-bottom: 2px;
}
.ge-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted, #9e9e80);
  margin-bottom: 12px;
}
.ge-scores {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
}
.ge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
}
.ge-row--you {
  background: rgba(200, 170, 100, 0.12);
  border: 1px solid rgba(200, 170, 100, 0.2);
}
.ge-place {
  font-weight: 700;
  color: var(--color-heading, #e8dcc8);
  width: 22px;
  text-align: right;
}
.ge-wind {
  font-weight: 600;
  color: var(--color-accent, #c8aa64);
  width: 18px;
}
.ge-name {
  flex: 1;
  text-align: left;
  color: var(--color-text, #d4c8a8);
}
.ge-pts {
  font-weight: 600;
  color: var(--color-text, #d4c8a8);
  min-width: 48px;
  text-align: right;
}
.ge-net { min-width: 54px; text-align: right; font-size: 0.75rem; }
.ge-net--up { color: #6ac66a; }
.ge-net--dn { color: #d46060; }
.ge-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.ge-btn { min-width: 76px; font-size: 0.8rem; }
.ge-btn--sensei {
  border-color: #4a6fa5;
  color: #7ba3d4;
  background: rgba(55, 80, 130, 0.15);
}
.ge-btn--sensei:hover {
  background: #4a6fa5;
  color: #fff;
}

/* Sensei tips panel */
.ge-tips {
  text-align: left;
  margin-top: 14px;
  border-top: 1px solid rgba(74, 111, 165, 0.3);
  padding-top: 12px;
}
.ge-sensei-hdr {
  font-size: 0.95rem;
  font-weight: 700;
  color: #7ba3d4;
  margin-bottom: 8px;
}
.ge-tips-hdr {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(123, 163, 212, 0.8);
  margin: 10px 0 6px;
}
.ge-tip {
  font-size: 0.75rem;
  color: var(--color-text, #d4c8a8);
  padding: 5px 8px;
  margin-bottom: 4px;
  border-radius: 4px;
  background: rgba(55, 80, 130, 0.08);
  border-left: 3px solid rgba(74, 111, 165, 0.3);
  line-height: 1.4;
}
.ge-tip--good {
  background: rgba(55, 80, 130, 0.12);
  border-left: 3px solid #4a6fa5;
}
.ge-kanji { font-size: 1.8rem; }

/* ----------------------------------------------------------
   HAND END (ROUND-OVER) OVERLAY
   ---------------------------------------------------------- */
.he-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-surface, rgba(20, 30, 20, 0.96));
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 18px 22px;
  max-width: 370px;
  width: 85%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  z-index: 60;
}
.he-round {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-accent, #c8aa64);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.he-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-heading, #e8dcc8);
  margin-bottom: 8px;
}
.he-detail {
  font-size: 0.8rem;
  color: var(--color-text-muted, #9e9e80);
  margin-bottom: 6px;
}
.he-yaku {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 8px;
}
.he-yaku-item {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(200, 170, 100, 0.12);
  border: 1px solid rgba(200, 170, 100, 0.2);
  color: var(--color-accent, #c8aa64);
}
.he-score-line {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-heading, #e8dcc8);
  margin-bottom: 10px;
}
.he-hand {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  margin-bottom: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}
.he-scores {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
}
.he-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
}
.he-row--you {
  background: rgba(200, 170, 100, 0.12);
  border: 1px solid rgba(200, 170, 100, 0.2);
}
.he-row--winner { font-weight: 600; }
.he-wind {
  font-weight: 600;
  color: var(--color-accent, #c8aa64);
  width: 18px;
}
.he-name {
  flex: 1;
  text-align: left;
  color: var(--color-text, #d4c8a8);
}
.he-pts {
  font-weight: 600;
  color: var(--color-text, #d4c8a8);
  min-width: 48px;
  text-align: right;
}
.he-delta { min-width: 54px; text-align: right; font-size: 0.75rem; }
.he-delta--up { color: #6ac66a; }
.he-delta--dn { color: #d46060; }
.he-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.he-btn { min-width: 100px; font-size: 0.85rem; }

/* ========================================================================
   WIN/LOSS RESULT ANIMATIONS (chess.com-inspired)
   All animations use transform + opacity only (GPU composited).
   Respects prefers-reduced-motion.
   ======================================================================== */

@keyframes result-dim {
  to { opacity: 0.6; }
}
@keyframes result-tile-glow-gold {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 0 18px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.3); }
}
@keyframes result-tile-glow-red {
  0%, 100% { box-shadow: 0 0 6px rgba(220, 60, 60, 0.4); }
  50% { box-shadow: 0 0 18px rgba(220, 60, 60, 0.8), 0 0 30px rgba(220, 60, 60, 0.3); }
}
@keyframes result-score-fly {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes result-banner-slide {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes result-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Badge/achievement unlock: overshoot bounce (chess.com style) */
@keyframes badge-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Hand-end card with animation */
.he-card--animated .he-title {
  animation: result-banner-slide 300ms ease-out both;
}
.he-card--animated .he-detail {
  animation: result-fade-in 300ms ease-out 100ms both;
}
.he-card--animated .he-yaku {
  animation: result-fade-in 300ms ease-out 150ms both;
}
.he-card--animated .he-scores {
  animation: result-score-fly 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275) 200ms both;
}
.he-card--animated .he-hand .mj-tile {
  animation: result-tile-glow-gold 1.2s ease-in-out infinite;
}
.he-card--animated.he-card--ron .he-hand .mj-tile {
  animation: result-tile-glow-red 1.2s ease-in-out infinite;
}

/* Game-end card with animation */
.ge-card--animated .ge-title {
  animation: result-banner-slide 300ms ease-out both;
}
.ge-card--animated .ge-sub {
  animation: result-fade-in 300ms ease-out 100ms both;
}
.ge-card--animated .ge-scores {
  animation: result-score-fly 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275) 200ms both;
}

/* Achievement toast */
.achievement-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 2000;
  background: var(--color-surface, #0a1f14);
  border: 2px solid var(--color-primary, #4a6fa5);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: badge-pop 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.achievement-toast__icon {
  font-size: 1.8rem;
}
.achievement-toast__text {
  color: var(--color-text, #e8dcc8);
  font-weight: 600;
  font-size: 0.85rem;
}
.achievement-toast__sub {
  color: #7ba3d4;
  font-size: 0.7rem;
  margin-top: 2px;
}

/* Streak flame display */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.8rem;
}
.streak-badge--new { color: #e67e22; }
.streak-badge--building { color: #f39c12; }
.streak-badge--blazing { color: #e74c3c; text-shadow: 0 0 8px rgba(231, 76, 60, 0.5); }

/* Reduced motion: disable all result animations */
@media (prefers-reduced-motion: reduce) {
  .he-card--animated .he-title,
  .he-card--animated .he-detail,
  .he-card--animated .he-yaku,
  .he-card--animated .he-scores,
  .he-card--animated .he-hand .mj-tile,
  .ge-card--animated .ge-title,
  .ge-card--animated .ge-sub,
  .ge-card--animated .ge-scores,
  .achievement-toast {
    animation: none !important;
  }
}
