/* =========================================================
   Shared in-game shell & components
   ========================================================= */
body.in-game .toast-root { top: 146px; }
.game-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #051d17;
  color: var(--cream);
  overflow: hidden;
}
.game-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 44%, rgba(0, 0, 0, .22) 100%);
}

/* ---------------------------------------------------------
   Game top bar
   --------------------------------------------------------- */
.game-topbar {
  position: relative;
  z-index: 60;
  height: 62px;
  flex: 0 0 62px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: linear-gradient(180deg, rgba(3, 20, 16, .97), rgba(3, 22, 18, .78) 70%, rgba(3, 22, 18, .55));
  border-bottom: 1px solid rgba(226, 192, 121, .14);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}
.game-topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(237, 204, 134, .24) 22%, rgba(237, 204, 134, .24) 78%, transparent);
}
.game-back {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(238, 220, 184, .75);
  border: 1px solid rgba(230, 198, 131, .2);
  background: rgba(255, 255, 255, .03);
  transition: .2s;
  flex: 0 0 auto;
}
.game-back:hover { color: #fff3d2; border-color: rgba(230, 198, 131, .5); background: rgba(255, 255, 255, .07); }
.game-back svg { width: 18px; height: 18px; }
.game-brand-mini { display: flex; align-items: center; gap: 8px; min-width: 0; }
.game-brand-mini .brand-coin { width: 32px; height: 32px; box-shadow: 0 0 0 1px #51300c, 0 0 0 2px rgba(240, 207, 129, .45), 0 4px 9px rgba(0, 0, 0, .35); }
.game-brand-mini .brand-coin::before { inset: 9px; }
.game-brand-mini .brand-coin span { font-size: 11px; }
.game-brand-mini .brand-coin i { top: 6px; left: 9px; width: 8px; height: 4px; }
.game-brand-mini > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.game-brand-mini h2 { font-family: var(--font-display); font-size: 20px; font-weight: 400; letter-spacing: 1.5px; color: #f6e4bd; line-height: 1; white-space: nowrap; }
.game-brand-mini p { font-size: 7px; letter-spacing: 1.5px; color: rgba(214, 195, 157, .4); white-space: nowrap; }
.game-divider-v { width: 1px; height: 28px; background: linear-gradient(transparent, rgba(234, 200, 130, .16), transparent); flex: 0 0 auto; }
.game-room-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.game-room-info b { font-size: 11px; color: #e6d6b6; font-weight: 500; letter-spacing: .3px; white-space: nowrap; }
.game-room-info span { font-size: 8px; color: rgba(200, 187, 159, .45); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.game-room-info span i { width: 4px; height: 4px; border-radius: 50%; background: #65d7ad; display: inline-block; }
.game-top-center { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.game-top-stat {
  min-height: 34px;
  padding: 4px 14px;
  border-radius: 8px;
  border: 1px solid rgba(228, 194, 124, .12);
  background: rgba(255, 255, 255, .027);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 72px;
}
.game-top-stat span { font-size: 7px; color: rgba(194, 187, 164, .45); letter-spacing: .5px; line-height: 1; white-space: nowrap; }
.game-top-stat b { font-size: 12px; color: #eed8a8; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.game-top-stat.highlight b { color: #ffd57b; text-shadow: 0 0 14px rgba(243, 197, 104, .22); }
.game-top-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: 0 0 auto; }
.game-top-actions .icon-btn { width: 32px; height: 32px; }
.game-top-actions .icon-btn svg { width: 18px; height: 18px; }
.opp-count.is-one, .wsk-opp-count.is-one { color: #ffb073; font-weight: 700; }
.seat.is-one-card .seat-avatar, .wsk-seat.is-one-card .seat-avatar { box-shadow: 0 0 0 2px rgba(255, 170, 105, .35), 0 0 18px rgba(255, 130, 80, .22); }
.game-top-actions .fs-exit { display: none; }
body.is-fullscreen .game-top-actions .fs-enter { display: none; }
body.is-fullscreen .game-top-actions .fs-exit { display: block; }
.game-bean-pill {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 15px;
  padding: 0 10px 0 7px;
  border: 1px solid rgba(225, 190, 120, .18);
  background: rgba(3, 23, 18, .72);
  font-size: 10px;
  color: #eedcb2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.game-bean-pill .coin-icon { width: 17px; height: 17px; }
.game-bean-pill .coin-icon::before { inset: 5px; }

/* ---------------------------------------------------------
   Table background helpers
   --------------------------------------------------------- */
.game-body { position: relative; flex: 1; min-height: 0; overflow: hidden; z-index: 2; }
.felt {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(34, 128, 97, .4), transparent 63%),
    radial-gradient(ellipse at 50% 110%, rgba(4, 24, 19, .8), transparent 55%),
    linear-gradient(155deg, #0b3b2e, #06291f 55%, #041c16);
}
.felt::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 42%, transparent 0 28%, rgba(205, 171, 102, .06) 28.2%, transparent 28.7%),
    radial-gradient(circle at 50% 42%, transparent 0 42%, rgba(205, 171, 102, .05) 42.2%, transparent 42.7%),
    linear-gradient(45deg, transparent 49.8%, rgba(229, 194, 123, .02) 50%, transparent 50.2%),
    linear-gradient(-45deg, transparent 49.8%, rgba(229, 194, 123, .02) 50%, transparent 50.2%);
  background-size: 100% 100%, 100% 100%, 46px 46px, 46px 46px;
  pointer-events: none;
}
.felt::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
  opacity: .12;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.table-rim {
  position: absolute;
  inset: 9% 7% 5%;
  border-radius: 48% 48% 42% 42% / 34% 34% 58% 58%;
  border: 1px solid rgba(226, 190, 118, .16);
  box-shadow: inset 0 0 110px rgba(0, 0, 0, .25), 0 0 0 10px rgba(2, 15, 12, .15);
  pointer-events: none;
}
.table-rim::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  border: 1px solid rgba(226, 190, 118, .08);
}
.table-center-mark {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: min(26vw, 290px);
  aspect-ratio: 1;
  border: 1px solid rgba(230, 195, 125, .08);
  border-radius: 50%;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: .55;
}
.table-center-mark::before { content: ""; position: absolute; inset: 12%; border: 1px dashed rgba(230, 195, 125, .07); border-radius: 50%; }
.table-center-mark span { font-family: var(--font-display); font-size: clamp(54px, 8vw, 100px); color: rgba(238, 207, 143, .035); letter-spacing: 12px; transform: translateX(6px); }

/* ---------------------------------------------------------
   Seats & avatars
   --------------------------------------------------------- */
.seat { display: flex; align-items: center; gap: 10px; position: relative; z-index: 25; }
.seat-avatar-wrap { position: relative; width: 68px; height: 68px; flex: 0 0 auto; }
.seat-avatar {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(231, 196, 125, .48);
  background: #0a2e26;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 226, 165, .2);
}
.seat-avatar .avatar { border-radius: 50%; }
.seat-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(230, 194, 124, .15);
  pointer-events: none;
}
.seat.is-turn .seat-avatar { border-color: rgba(255, 222, 146, .95); box-shadow: 0 0 0 3px rgba(240, 199, 113, .15), 0 0 22px rgba(240, 199, 113, .24), 0 6px 14px rgba(0, 0, 0, .4); }
.seat.is-turn .seat-ring { border-color: rgba(243, 205, 126, .48); animation: seatRingPulse 1.6s infinite; }
@keyframes seatRingPulse { 0%, 100% { transform: scale(1); opacity: .6; } 50% { transform: scale(1.04); opacity: 1; } }
.seat-time-ring {
  --progress: 1;
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: conic-gradient(rgba(249, 210, 130, .94) calc(var(--progress) * 360deg), rgba(255, 255, 255, .07) 0);
  mask: radial-gradient(circle, transparent 66%, #000 67%);
  -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%);
  opacity: 0;
  transition: opacity .2s;
}
.seat.is-turn .seat-time-ring { opacity: 1; }
.seat-avatar-wrap .level-pill { bottom: -4px; height: 16px; padding: 0 6px; font-size: 8px; }
.seat-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.seat-name-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.seat-name { font-size: 12px; color: #f0e2c8; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 126px; }
.seat-badge { font-size: 7px; border-radius: 3px; padding: 2px 4px; color: #f4dcaa; border: 1px solid rgba(228, 192, 121, .22); background: rgba(255, 255, 255, .035); flex: 0 0 auto; }
.seat-badge.landlord { color: #4b2b08; background: linear-gradient(180deg, #f7de9e, #d9a94d); border-color: rgba(255, 241, 194, .6); font-weight: 700; }
.seat-badge.team { color: #b7e8ff; border-color: rgba(112, 188, 229, .25); background: rgba(44, 116, 152, .18); }
.seat-meta { display: flex; align-items: center; gap: 5px; font-size: 8.5px; color: rgba(195, 188, 166, .52); }
.seat-meta .coin-icon { width: 12px; height: 12px; }
.seat-meta .coin-icon::before { inset: 3.5px; }
.seat-score { color: #f0cf8e; }
.seat-tag { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); font-size: 7px; color: rgba(214, 196, 160, .5); white-space: nowrap; }
.seat.bottom { flex-direction: row-reverse; }
.seat.bottom .seat-info { align-items: flex-end; }
.seat.vertical { flex-direction: column; }
.seat.vertical .seat-info { align-items: center; }
.seat.vertical .seat-name-row { justify-content: center; }

.speech-bubble {
  position: absolute;
  z-index: 45;
  min-width: 54px;
  max-width: 168px;
  padding: 7px 11px;
  border-radius: 10px 10px 10px 2px;
  background: linear-gradient(180deg, #fbf2d9, #e9dbb9);
  color: #45331a;
  font-size: 10px;
  line-height: 1.5;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .3);
  animation: bubbleIn .25s var(--ease-out) both;
  text-align: left;
}
.speech-bubble::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  border-width: 0 8px 7px 0;
  border-style: solid;
  border-color: transparent #e9dbb9 transparent transparent;
}
.speech-bubble.right { border-radius: 10px 10px 2px 10px; }
.speech-bubble.right::after { left: auto; right: 0; border-width: 0 0 7px 8px; border-color: transparent transparent transparent #e9dbb9; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(5px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
.speech-bubble.hide { animation: bubbleOut .3s ease forwards; }
@keyframes bubbleOut { to { opacity: 0; transform: translateY(-5px) scale(.96); } }

.turn-banner {
  position: absolute;
  z-index: 42;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 10px;
  border-radius: 16px;
  background: rgba(5, 30, 24, .7);
  border: 1px solid rgba(232, 198, 128, .18);
  color: rgba(238, 220, 182, .8);
  font-size: 9px;
  white-space: nowrap;
  backdrop-filter: blur(7px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .24);
  pointer-events: none;
}
.turn-banner i { width: 5px; height: 5px; border-radius: 50%; background: #efd18e; animation: pulseDot 1.8s infinite; }
.turn-banner b { color: #f5daa0; font-weight: 500; }

/* ---------------------------------------------------------
   Game action bar
   --------------------------------------------------------- */
.game-actionbar {
  position: absolute;
  z-index: 55;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  pointer-events: none;
}
.game-actionbar > * { pointer-events: auto; }
.action-btn {
  min-width: 88px;
  height: 40px;
  border-radius: 20px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  color: #e9d8b6;
  border: 1px solid rgba(230, 196, 126, .26);
  background: linear-gradient(180deg, rgba(25, 73, 59, .93), rgba(8, 39, 31, .95));
  box-shadow: 0 4px 0 rgba(3, 17, 13, .65), 0 8px 18px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 241, 203, .08);
  transition: transform .16s, filter .2s, box-shadow .16s;
  white-space: nowrap;
}
.action-btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); border-color: rgba(239, 207, 141, .5); }
.action-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(3, 17, 13, .65); }
.action-btn:disabled { opacity: .35; cursor: not-allowed; filter: grayscale(.4); }
.action-btn.primary {
  color: #4b2c08;
  border-color: rgba(255, 242, 199, .65);
  background: linear-gradient(180deg, #fff1b9, #f2d078 35%, #d8a846 100%);
  box-shadow: 0 4px 0 #7a5217, 0 8px 18px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .75);
  font-weight: 800;
}
.action-btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.action-btn.danger {
  color: #ffe8d5;
  border-color: rgba(255, 185, 150, .35);
  background: linear-gradient(180deg, #c34a3e, #8f2621);
  box-shadow: 0 4px 0 #571512, 0 8px 18px rgba(0, 0, 0, .3);
}
.action-btn.ghost { background: rgba(8, 33, 27, .78); }
.action-btn .kbd { font-size: 7px; opacity: .5; border: 1px solid currentColor; border-radius: 3px; padding: 1px 3px; margin-left: 3px; }
.action-btn svg { width: 14px; height: 14px; }
.action-hint { font-size: 8px; color: rgba(191, 195, 172, .4); white-space: nowrap; margin-left: 2px; }
.action-btn.danger .badge { margin-left: 3px; }
.action-timer {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Georgia", serif;
  font-size: 14px;
  color: #f0d69e;
  border: 1px solid rgba(234, 201, 133, .28);
  background: rgba(5, 27, 22, .76);
  position: relative;
  flex: 0 0 auto;
}
.action-timer::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(rgba(241, 203, 125, .8) calc(var(--p, 1) * 360deg), rgba(255, 255, 255, .06) 0);
  mask: radial-gradient(circle, transparent 65%, #000 66%);
  -webkit-mask: radial-gradient(circle, transparent 65%, #000 66%);
}

/* ---------------------------------------------------------
   Chat / quick phrase
   --------------------------------------------------------- */
.game-chat-btn { position: relative; }
.chat-drawer {
  position: absolute;
  right: 20px;
  bottom: 64px;
  z-index: 80;
  width: 278px;
  border-radius: 12px;
  border: 1px solid rgba(230, 195, 125, .24);
  background: linear-gradient(160deg, rgba(12, 55, 44, .97), rgba(5, 28, 23, .98));
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: .2s var(--ease-out);
}
.chat-drawer.open { opacity: 1; visibility: visible; transform: translateY(0); }
.chat-drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid rgba(225, 191, 121, .1); }
.chat-drawer-head b { font-size: 11px; color: #e8d7b8; font-weight: 500; }
.chat-drawer-head button { color: #8e8676; }
.chat-quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 8px; }
.chat-quick { min-height: 30px; border-radius: 6px; border: 1px solid rgba(225, 191, 122, .12); background: rgba(255, 255, 255, .025); color: #cfc1a5; font-size: 9px; transition: .15s; }
.chat-quick:hover { border-color: rgba(236, 203, 135, .35); background: rgba(255, 255, 255, .055); color: #f2e2bf; }

/* ---------------------------------------------------------
   Generic result overlay
   --------------------------------------------------------- */
.result-screen {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(1, 12, 9, .76);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fadeIn .35s ease both;
  overflow: auto;
  padding: 24px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.result-card {
  position: relative;
  width: min(530px, calc(100vw - 32px));
  border-radius: 18px;
  border: 1px solid rgba(235, 199, 126, .4);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(74, 140, 107, .26), transparent 50%),
    linear-gradient(165deg, #0e4033 0%, #082820 55%, #051c17 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .68), inset 0 1px 0 rgba(255, 246, 210, .12);
  padding: 26px 28px 22px;
  animation: resultUp .5s var(--ease-spring) both;
  overflow: hidden;
}
@keyframes resultUp { from { opacity: 0; transform: translateY(25px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
.result-card::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(237, 205, 137, .1); border-radius: 12px; pointer-events: none; }
.result-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  opacity: .09;
  mix-blend-mode: overlay;
}
.result-rays {
  position: absolute;
  top: -150px;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translateX(-50%);
  background: repeating-conic-gradient(from 0deg, rgba(240, 207, 134, .06) 0deg 7deg, transparent 7deg 18deg);
  mask-image: radial-gradient(circle, #000 10%, transparent 65%);
  pointer-events: none;
  opacity: .8;
}
.result-emblem {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 38px;
  color: #4b2c08;
  background: radial-gradient(circle at 35% 28%, #fff8db, #f6db96 38%, #d8a94d 72%, #a46d20);
  border: 2px solid rgba(255, 244, 202, .65);
  box-shadow: 0 0 0 5px rgba(239, 203, 129, .07), 0 0 40px rgba(240, 201, 115, .2), 0 8px 20px rgba(0, 0, 0, .3);
  position: relative;
  z-index: 1;
}
.result-card.lose .result-emblem { color: #f0ddc2; background: radial-gradient(circle at 35% 28%, #6f7e75, #3c5149 45%, #22352e 75%, #15241e); border-color: rgba(210, 210, 190, .22); box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.result-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 37px;
  font-weight: 400;
  letter-spacing: 5px;
  color: #fae7b9;
  background: linear-gradient(180deg, #fff7d9, #f0d38d 55%, #c59239 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(48, 29, 7, .65));
  position: relative;
  z-index: 1;
}
.result-card.lose .result-title { background: linear-gradient(180deg, #f0e5cf, #b9b3a5 55%, #7c7c6f); -webkit-background-clip: text; background-clip: text; }
.result-sub { text-align: center; font-size: 9px; letter-spacing: 2px; color: rgba(215, 200, 166, .48); margin-top: 5px; position: relative; z-index: 1; }
.result-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 18px 0 14px;
  position: relative;
  z-index: 1;
}
.result-score .coin-icon { width: 27px; height: 27px; }
.result-score b { font-family: "Georgia", serif; font-size: 31px; font-weight: 600; color: #ffe2a0; letter-spacing: .5px; text-shadow: 0 0 20px rgba(246, 201, 113, .2); }
.result-score b.negative { color: #c7bb9f; }
.result-score span { font-size: 10px; color: #9f947d; }
.result-stats { display: flex; border-top: 1px solid rgba(233, 199, 129, .1); border-bottom: 1px solid rgba(233, 199, 129, .1); padding: 11px 0; margin-bottom: 16px; position: relative; z-index: 1; }
.result-stat { flex: 1; text-align: center; border-left: 1px solid rgba(233, 199, 129, .08); }
.result-stat:first-child { border-left: 0; }
.result-stat span { display: block; font-size: 7.5px; color: rgba(198, 188, 165, .42); letter-spacing: .4px; margin-bottom: 4px; }
.result-stat b { font-size: 12px; color: #e9d6ad; font-weight: 500; }
.result-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; margin-bottom: 15px; position: relative; z-index: 1; }
.result-badge { font-size: 7.5px; color: #e9cf94; border: 1px solid rgba(230, 195, 124, .22); background: rgba(255, 255, 255, .03); border-radius: 10px; padding: 3px 8px; display: inline-flex; gap: 3px; align-items: center; }
.result-badge.fan { color: #bfe7d4; border-color: rgba(111, 208, 166, .2); background: rgba(63, 147, 111, .1); }
.result-actions { display: flex; gap: 9px; justify-content: center; position: relative; z-index: 1; }
.result-actions .gold-btn, .result-actions .ghost-btn { min-height: 38px; padding: 0 22px; font-size: 11px; }
.result-note { text-align: center; font-size: 7.5px; color: rgba(176, 168, 146, .3); margin-top: 12px; position: relative; z-index: 1; }

/* ---------------------------------------------------------
   Small utilities used by games
   --------------------------------------------------------- */
.btn-round {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(230, 196, 126, .2);
  background: rgba(7, 35, 28, .75);
  color: rgba(238, 218, 179, .72);
  transition: .2s;
}
.btn-round:hover { color: #f9e7c2; border-color: rgba(236, 203, 136, .45); background: rgba(255, 255, 255, .06); }
.btn-round svg { width: 17px; height: 17px; }
.game-toast {
  position: absolute;
  left: 50%;
  top: 19%;
  z-index: 150;
  transform: translateX(-50%);
  padding: 8px 20px;
  border-radius: 20px;
  background: rgba(4, 24, 19, .88);
  border: 1px solid rgba(234, 200, 130, .28);
  color: #f2e0ba;
  font-size: 11px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  animation: gameToastIn .3s ease both;
  white-space: nowrap;
  pointer-events: none;
}
@keyframes gameToastIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.game-toast.out { animation: gameToastOut .3s ease both; }
@keyframes gameToastOut { to { opacity: 0; transform: translate(-50%, -8px); } }
.countdown-warning { color: #ffb48c !important; }
.is-shaking { animation: shake .35s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(5px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(3px)} }

@media (max-width: 900px) {
  .game-topbar { height: 54px; flex-basis: 54px; padding: 0 12px; gap: 9px; }
  .game-brand-mini h2 { font-size: 17px; }
  .game-brand-mini p { display: none; }
  .game-room-info span { display: none; }
  .game-divider-v { display: none; }
  .game-top-stat { min-width: 58px; padding: 3px 9px; min-height: 30px; }
  .game-top-stat b { font-size: 10.5px; }
  .game-top-actions .icon-btn[data-ddz-chat],
  .game-top-actions .icon-btn[data-wsk-chat] { display: none; }
  .game-bean-pill { padding-right: 7px; }
  .seat-avatar-wrap { width: 56px; height: 56px; }
  .seat-name { font-size: 10.5px; max-width: 96px; }
  .speech-bubble { font-size: 9px; padding: 6px 9px; }
  .action-btn { min-width: 74px; height: 36px; padding: 0 16px; font-size: 10.5px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .result-screen { place-items: start center; padding: 8px; }
  .result-card {
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    margin: 8px 0;
    padding: 14px 18px 12px;
  }
  .result-emblem { width: 52px; height: 52px; font-size: 27px; margin-bottom: 4px; }
  .result-title { font-size: 29px; letter-spacing: 4px; }
  .result-sub { font-size: 7px; margin-top: 3px; }
  .result-score { margin-top: 7px; }
  .result-score b { font-size: 28px; }
  .result-stats { margin-top: 9px; }
  .result-stat { padding: 6px 5px; }
  .result-badges { margin-top: 6px; }
  .result-actions {
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin-top: 9px;
    padding: 7px 0 2px;
    background: linear-gradient(180deg, rgba(6, 39, 30, 0), #06271e 38%);
  }
  .result-actions .gold-btn, .result-actions .ghost-btn { min-height: 34px; font-size: 10px; }
  .result-note { display: none; }
}
@media (max-width: 900px) {
  .game-topbar {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}
@media (max-width: 640px) {
  .game-topbar {
    gap: 5px;
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }
  .game-brand-mini .brand-coin { width: 27px; height: 27px; }
  .game-brand-mini h2 { font-size: 15px; letter-spacing: .5px; }
  .game-top-center { gap: 4px; }
  .game-top-stat { min-width: 46px; padding: 3px 5px; border-color: rgba(228, 194, 124, .09); }
  .game-top-stat span { font-size: 6px; }
  .game-top-stat b { font-size: 9.5px; }
  .game-top-actions .icon-btn { width: 28px; height: 28px; }
  .game-bean-pill { font-size: 9px; height: 27px; }
  .game-bean-pill .coin-icon { width: 15px; height: 15px; }
  .game-room-info b { font-size: 9.5px; }
  .turn-banner { top: 8px; font-size: 8px; }
  .game-actionbar { gap: 5px; bottom: 10px; }
  .action-btn { min-width: 62px; height: 33px; padding: 0 12px; font-size: 9.5px; }
  .action-timer { width: 30px; height: 30px; font-size: 12px; }
  .seat-avatar-wrap { width: 48px; height: 48px; }
  .seat-info { gap: 2px; }
  .seat-name { font-size: 9px; max-width: 76px; }
  .seat-meta { font-size: 7px; }
  .result-card { padding: 20px 18px 18px; }
  .result-title { font-size: 30px; letter-spacing: 3px; }
  .result-emblem { width: 62px; height: 62px; font-size: 31px; margin-bottom: 9px; }
  .result-score { margin: 14px 0 11px; }
  .result-score b { font-size: 25px; }
  .result-score .coin-icon { width: 23px; height: 23px; }
  .result-stats { padding: 9px 0; margin-bottom: 12px; }
  .result-stat b { font-size: 10.5px; }
  .result-actions .gold-btn, .result-actions .ghost-btn { min-height: 35px; padding: 0 16px; font-size: 10px; }
}
