/* Shared channel & topbar refinements */
.topbar-actions .games-shortcut.active {
  border-color: var(--lime);
  color: var(--lime);
  background: color-mix(in srgb, var(--lime) 14%, transparent);
}

[data-theme="light"] .topbar-actions .games-shortcut.active {
  color: #3a5c14;
  border-color: #6b9a2e;
  background: color-mix(in srgb, var(--lime) 26%, transparent);
}

body.in-blackjack .games-view>.section-heading {
  display: none;
}

#code-button {
  width: auto;
  padding: 0 11px;
  gap: 6px;
  font: 600 12px var(--mono);
  white-space: nowrap;
}

#code-button[hidden],
#code-tab[hidden],
#active-blackjack[hidden],
#xox-rematch-prompt[hidden] {
  display: none;
}

body.in-blackjack .content-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.in-blackjack .right-rail {
  display: none;
}

/* Game Hub */
.games-view .section-heading {
  align-items: center;
  gap: 14px;
}

.game-hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.game-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--lime) 48%, var(--line));
}

.game-card-bj {
  background:
    radial-gradient(circle at 88% 16%, rgba(22, 138, 81, 0.22), transparent 52%),
    radial-gradient(circle at 14% 92%, rgba(216, 180, 84, 0.12), transparent 45%),
    var(--panel);
}

.game-card-xox {
  background:
    radial-gradient(circle at 88% 18%, rgba(197, 242, 115, 0.12), transparent 52%),
    var(--panel);
}

.game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.bj-live-tag {
  background: rgba(22, 138, 81, 0.22);
  color: #82f0b5;
  border-color: rgba(130, 240, 181, 0.35);
}

[data-theme="light"] .bj-live-tag {
  background: rgba(22, 138, 81, 0.14);
  color: #0e6339;
  border-color: rgba(14, 99, 57, 0.3);
}

.bj-card-emblem {
  font: 700 22px Georgia, serif;
  letter-spacing: 2px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(11, 56, 36, 0.65);
  color: #f6e29f;
  border: 1px solid rgba(216, 180, 84, 0.4);
}

.game-card .mini-board {
  transform: rotate(-5deg) scale(0.76);
  transform-origin: right center;
}

.game-card h3 {
  font-size: 22px;
  line-height: 1.25;
}

.game-card p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.game-card small {
  margin-top: auto;
  padding-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.xox-diff-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.xox-diff-row select {
  width: auto;
  min-width: 148px;
  padding: 6px 10px;
  font-size: 12.5px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

/* Upgraded XOX Arena */
.xox-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.xox-starter-pill,
.xox-score-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.game-player {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.game-player.is-turn {
  border-color: color-mix(in srgb, var(--lime) 60%, var(--line));
  background: color-mix(in srgb, var(--lime) 10%, var(--panel-2));
}

.player-score {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}

.game-status.my-turn {
  color: var(--lime);
  font-weight: 600;
}

[data-theme="light"] .game-status.my-turn {
  color: #466b18;
}

.xox-rematch-prompt {
  margin: 0 auto 18px;
  max-width: 440px;
}

.rematch-card {
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.rematch-card.incoming {
  border-color: var(--lime);
  background: color-mix(in srgb, var(--lime) 11%, var(--panel-2));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.rematch-card.declined {
  border-color: rgba(235, 96, 96, 0.45);
}

.rematch-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.xox-board-stage {
  position: relative;
  width: min(100%, 336px);
  margin: 0 auto;
  perspective: 900px;
}

.game-board {
  position: relative;
  width: 100%;
  padding: 10px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel-2) 85%, #000);
  border: 1px solid var(--line);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: rotateX(4deg);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.game-board.is-my-turn {
  border-color: color-mix(in srgb, var(--lime) 45%, var(--line));
}

.game-cell {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 13px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 10px rgba(0, 0, 0, 0.16);
  transition:
    transform 0.14s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.game-cell:not(:disabled):hover {
  transform: translateY(-2px);
}

.game-cell:not(:disabled):active {
  transform: scale(0.96);
}

.cell-ghost {
  opacity: 0;
  font: 40px var(--mono);
  color: var(--lime);
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.game-board[data-my-mark="O"] .cell-ghost {
  color: #c0a7e1;
}

@media (hover: hover) {
  .game-cell:not(:disabled):hover .cell-ghost {
    opacity: 0.34;
  }
}

.xox-svg {
  width: 58%;
  height: 58%;
}

.xox-svg-x line {
  stroke: var(--lime);
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.game-cell.is-new .xox-svg-x line {
  stroke-dashoffset: 100;
  animation: xox-draw 0.16s ease forwards;
}

.game-cell.is-new .xox-svg-x line:nth-child(2) {
  animation-delay: 0.06s;
}

[data-theme="light"] .xox-svg-x line {
  stroke: #4c701d;
}

.xox-svg-o circle {
  stroke: #c0a7e1;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.game-cell.is-new .xox-svg-o circle {
  stroke-dashoffset: 100;
  animation: xox-draw 0.2s ease forwards;
}

[data-theme="light"] .xox-svg-o circle {
  stroke: #7a52a8;
}

.xox-strike-overlay {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  pointer-events: none;
  z-index: 3;
}

.xox-strike-overlay line {
  stroke: var(--lime);
  stroke-width: 9;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(197, 242, 115, 0.7));
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.xox-strike-overlay.is-new line {
  stroke-dashoffset: 100;
  animation: xox-draw 0.24s ease forwards;
}

.xox-strike-overlay.o line {
  stroke: #c0a7e1;
  filter: drop-shadow(0 0 8px rgba(192, 167, 225, 0.7));
}

@keyframes xox-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* 3D Blackjack Table */
.active-blackjack {
  margin-bottom: 24px;
}

.bj-lobby-avatar {
  background: linear-gradient(135deg, #0d5a38, #143625) !important;
  color: #f6df96 !important;
  border: 1px solid rgba(216, 180, 84, 0.45);
}

.bj-shell {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #0c1410;
  color: #f0f3ec;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}

.bj-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: #121c16;
  border-bottom: 1px solid #26362c;
}

.bj-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.bj-table-name {
  font-size: 14px;
  color: #f3f6ef;
}

.bj-meta-pill {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #1a2820;
  color: #bfd0c3;
  border: 1px solid #2c3f34;
}

.bj-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.bj-cam-pills {
  display: inline-flex;
  background: #0d1510;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid #283a2f;
}

.bj-pill-btn {
  border: 0;
  background: transparent;
  color: #a8baa9;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.bj-pill-btn.active {
  background: #c5f273;
  color: #101511;
}

.bj-stage {
  position: relative;
  width: 100%;
  height: clamp(390px, 59dvh, 620px);
  background: radial-gradient(circle at 50% 35%, #13281d, #080f0b);
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.bj-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.bj-status-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(11, 18, 14, 0.84);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(197, 242, 115, 0.28);
  color: #eef4ec;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 4;
}

.bj-status-banner.countdown {
  border-color: #f6c85f;
  color: #ffe7a3;
}

.bj-status-banner.my-turn {
  border-color: #c5f273;
  color: #c5f273;
  box-shadow: 0 0 18px rgba(197, 242, 115, 0.25);
}

.bj-model-badge {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 24, 19, 0.78);
  color: #b7c8ba;
  font-size: 11px;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 3;
}

.bj-model-badge.fade-out {
  opacity: 0;
}

.bj-overlays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.bj-dealer-pill {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(13, 21, 16, 0.86);
  border: 1px solid rgba(232, 198, 112, 0.55);
  color: #f8e5ab;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

.bj-seat-pill {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  min-width: 76px;
  max-width: 118px;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(13, 21, 16, 0.86);
  backdrop-filter: blur(6px);
  color: #eef4ec;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bj-seat-pill:disabled {
  opacity: 1;
  cursor: default;
}

.bj-seat-pill.empty {
  border-style: dashed;
  border-color: rgba(197, 242, 115, 0.48);
  color: #c5f273;
  cursor: pointer;
}

.bj-seat-pill.empty:hover {
  background: rgba(197, 242, 115, 0.18);
}

.bj-seat-pill.is-me {
  border-color: #c5f273;
}

.bj-seat-pill.is-turn {
  border-color: #c5f273;
  box-shadow: 0 0 0 2px rgba(197, 242, 115, 0.35);
}

.bj-seat-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bj-seat-score {
  font-size: 10.5px;
  color: #c9d8cb;
}

.bj-seat-reaction {
  position: absolute;
  top: -18px;
  right: -6px;
  font-size: 19px;
  animation: bj-pop 0.35s ease;
}

@keyframes bj-pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }

  70% {
    transform: scale(1.22);
  }

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

/* 2D Graceful Fallback Table */
.bj-fallback-2d {
  position: absolute;
  inset: 0;
  padding: 54px 16px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  overflow-y: auto;
  background: radial-gradient(circle at 50% 25%, #12613f, #083220);
}

.bj2d-dealer {
  text-align: center;
}

.bj2d-label {
  font-weight: 700;
  color: #f7e3a8;
  margin-bottom: 8px;
}

.bj2d-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.bj2d-card {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 62px;
  padding: 0 8px;
  border-radius: 7px;
  background: #fbf8f0;
  color: #151a17;
  font: 700 15px Georgia, serif;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.bj2d-card.red {
  color: #be1f2d;
}

.bj2d-card.back {
  background: #172d22;
  color: #d8b454;
  border: 2px solid #d8b454;
}

.bj2d-seats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bj2d-seat {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 10px;
  background: rgba(11, 20, 15, 0.72);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.bj2d-seat.is-me {
  border-color: #c5f273;
}

.bj2d-seat.is-turn {
  box-shadow: 0 0 0 2px rgba(197, 242, 115, 0.45);
}

.bj2d-sit-btn {
  width: 100%;
  min-height: 44px;
  border: 1px dashed rgba(197, 242, 115, 0.55);
  background: transparent;
  color: #c5f273;
  border-radius: 8px;
  font-weight: 600;
}

/* Thumb-friendly Bottom Dock */
.bj-dock {
  background: #121c16;
  border-top: 1px solid #26362c;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bj-dock-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.bj-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.bj-chip-dot {
  color: #f0c95c;
  font-size: 15px;
}

.bj-balance small {
  color: #a8baa9;
  font-size: 12px;
  margin-left: 4px;
}

.bj-react-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bj-react-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #293b30;
  background: #18251e;
  font-size: 16px;
  cursor: pointer;
}

.bj-react-btn:hover {
  border-color: #c5f273;
}

.bj-dock-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.bj-chip-bar,
.bj-play-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.bj-chip-btn {
  min-width: 44px;
  height: 38px;
  padding: 0 11px;
  border-radius: 999px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  background: #1b2c23;
  color: #f3f6ef;
  font: 700 12px var(--mono);
  cursor: pointer;
}

.bj-chip-btn.active {
  background: #c5f273;
  color: #101511;
  border-style: solid;
  border-color: #fff;
}

.bj-chip-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bj-start-btn {
  min-height: 42px;
  margin-left: auto;
}

.bj-play-bar {
  width: 100%;
}

.bj-play-bar .button {
  flex: 1 1 110px;
  min-height: 44px;
  justify-content: center;
}

.bj-wait-note {
  font-size: 13px;
  color: #bfd0c3;
  padding: 6px 0;
}

/* Responsive Mobile Experience */
@media (max-width: 900px) {
  .game-hub {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .bj-stage {
    height: clamp(320px, 50dvh, 450px);
  }

  .bj2d-seats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bj-start-btn {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 570px) {
  .hide-xs {
    display: none;
  }

  .topbar-actions .games-shortcut {
    padding: 6px 8px;
    font-size: 11.5px;
  }

  #code-button {
    padding: 0 9px;
    font-size: 11.5px;
  }

  .bj-topbar {
    padding: 10px 12px;
  }

  .bj-dock {
    padding: 10px 12px;
  }

  .bj-seat-pill {
    min-width: 62px;
    max-width: 88px;
    padding: 3px 6px;
    font-size: 10px;
  }

  .bj-play-bar .button {
    flex: 1 1 calc(50% - 6px);
  }
}

@media (max-width: 400px) {
  .topbar-actions .games-shortcut {
    padding: 6px 7px;
    font-size: 11px;
  }

  .topbar #join-top {
    padding: 6px 8px;
    font-size: 11px;
  }
}

/* Phase 2 & 3: 4-card Game Hub, Satranç 3D, Blackjack, Zar Düellosu, XOX */
.game-hub {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-card-chess {
  border-color: rgba(139, 198, 255, 0.34);
  background: linear-gradient(155deg, rgba(139, 198, 255, 0.11), rgba(168, 223, 110, 0.05) 75%);
}

.chess-live-tag {
  background: rgba(139, 198, 255, 0.18);
  color: #a9d6ff;
  border-color: rgba(139, 198, 255, 0.42);
}

[data-theme="light"] .chess-live-tag {
  color: #164e87;
  background: rgba(139, 198, 255, 0.25);
}

.chess-card-emblem {
  font-size: 24px;
  line-height: 1;
  letter-spacing: 3px;
  color: #a9d6ff;
}

[data-theme="light"] .chess-card-emblem {
  color: #164e87;
}

.chess-lobby-avatar {
  background: rgba(139, 198, 255, 0.2) !important;
  color: #a9d6ff !important;
  font-size: 20px;
}

.chess-spec-tag {
  background: rgba(168, 223, 110, 0.16);
  color: #b7ef85;
  border-color: rgba(168, 223, 110, 0.4);
}

[data-theme="light"] .chess-spec-tag {
  color: #2f5b10;
}

.game-hub .game-card {
  min-width: 0;
}

.game-hub .xox-diff-row {
  flex-wrap: wrap;
  gap: 6px;
}

.game-hub .xox-diff-row select {
  flex: 1 1 130px;
  min-width: 0;
  max-width: 100%;
}

.game-card-dice {
  border-color: rgba(226, 178, 86, 0.34);
  background: linear-gradient(155deg, rgba(226, 178, 86, 0.11), rgba(191, 34, 48, 0.05) 75%);
}

.dice-live-tag {
  background: rgba(226, 178, 86, 0.18);
  color: #f3ca78;
  border-color: rgba(226, 178, 86, 0.42);
}

[data-theme="light"] .dice-live-tag {
  color: #8a5a00;
  background: rgba(226, 178, 86, 0.22);
}

.dice-card-emblem {
  font-size: 24px;
  line-height: 1;
  letter-spacing: 2px;
  color: #f3ca78;
}

[data-theme="light"] .dice-card-emblem {
  color: #9e6804;
}

.dice-lobby-avatar {
  background: rgba(226, 178, 86, 0.2) !important;
  color: #f3ca78 !important;
  font-size: 18px;
}

.xox-infinite-tag {
  background: rgba(168, 223, 110, 0.18);
  color: var(--accent, #a8df6e);
  border-color: rgba(168, 223, 110, 0.45);
}

[data-theme="light"] .xox-infinite-tag {
  color: #366412;
}

@keyframes xoxVanishPulse {

  0%,
  100% {
    opacity: 0.92;
    box-shadow: inset 0 0 0 2px rgba(255, 193, 94, 0.72);
  }

  50% {
    opacity: 0.46;
    box-shadow: inset 0 0 0 2px rgba(255, 193, 94, 0.22);
  }
}

.game-cell.is-fading {
  position: relative;
  animation: xoxVanishPulse 1.25s ease-in-out infinite;
}

.cell-vanish-badge {
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(20, 24, 21, 0.88);
  color: #ffd07b;
  border: 1px solid rgba(255, 208, 123, 0.45);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}

/* 3D Zar Düellosu Arena */
.dice-shell .bj-title-wrap,
.dice-shell .bj-top-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dice-shell .bj-top-right {
  margin-left: auto;
}

.dice-shell .bj-phase-tag,
.dice-shell .bj-chips-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #1a2820;
  color: #dbe8de;
  border: 1px solid #2c3f34;
}

.dice-stage {
  height: clamp(320px, 50dvh, 490px);
}

.dice-stage .bj-canvas-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dice-stage .bj-action-banner:not([hidden]) {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(11, 18, 14, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(197, 242, 115, 0.3);
  color: #eef4ec;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 4;
}

.dice-stage .bj-timer-pill:not([hidden]) {
  position: absolute;
  top: 46px;
  right: 12px;
  z-index: 4;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(246, 200, 95, 0.22);
  border: 1px solid rgba(246, 200, 95, 0.6);
  color: #ffe7a3;
  font-size: 11.5px;
  font-weight: 700;
  pointer-events: none;
}

.dice-seats-hud {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: calc(100% - 20px);
  padding: 2px;
  pointer-events: none;
  scrollbar-width: none;
}

.dice-seats-hud::-webkit-scrollbar {
  display: none;
}

.dice-seat-pill {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  display: grid;
  gap: 2px;
  pointer-events: auto;
  flex: 0 0 auto;
  min-width: 98px;
  max-width: 146px;
}

.dice-seat-pill strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dice-seat-pill.mine {
  border-color: #c5f273;
}

.dice-seat-pill.turn {
  border-color: #f6c85f;
  box-shadow: 0 0 0 2px rgba(246, 200, 95, 0.4);
}

.dice-seat-pill.win {
  border-color: #ffd07b;
  box-shadow: 0 0 0 2px rgba(255, 208, 123, 0.48);
}

.dice-dock {
  display: grid;
  gap: 10px;
}

.dice-tray-bar {
  display: grid;
  gap: 8px;
}

.dice-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.dice-face-chip {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 54px;
  min-height: 58px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(18, 24, 20, 0.85);
  color: #f4f5ef;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.dice-face-chip:disabled {
  cursor: default;
}

.dice-face-chip.playable:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: #a8df6e;
}

.dice-face-chip.dead {
  opacity: 0.42;
}

.dice-face-chip.selected {
  border-color: #a8df6e;
  background: rgba(168, 223, 110, 0.18);
  box-shadow: 0 0 0 2px rgba(168, 223, 110, 0.34);
  transform: translateY(-3px);
}

.die-pip-val {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}

.dice-face-chip small {
  font-size: 10px;
  opacity: 0.82;
}

.dice-combo-info {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.dice-combo-info {
  color: #e8efe7;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.dice-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dice-preset-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dice-big-btn,
.dice-start-btn {
  min-width: 170px;
}

.dice-2d-board:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 46px 14px 72px;
  background: radial-gradient(circle at center, rgba(22, 68, 43, 0.92), rgba(10, 17, 13, 0.96));
}

.dice2d-empty {
  color: rgba(244, 245, 239, 0.82);
  font-size: 13.5px;
  text-align: center;
}

.dice2d-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 360px;
}

.dice2d-die {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 2px solid #d9ceb4;
  background: #f5efe2;
  color: #151a17;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.dice2d-die.selected {
  border-color: #a8df6e;
  box-shadow: 0 0 0 3px rgba(168, 223, 110, 0.45);
  transform: translateY(-3px);
}

.dice2d-die.dead {
  opacity: 0.45;
}

@media (max-width: 1100px) {
  .game-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .game-hub {
    grid-template-columns: 1fr;
  }

  .dice-stage {
    height: clamp(250px, 38dvh, 330px);
  }

  .dice-seats-hud {
    justify-content: flex-start;
  }

  .dice-seat-pill {
    min-width: 78px;
    max-width: 115px;
    padding: 4px 6px;
    font-size: 10px;
  }

  .dice-face-chip {
    min-width: 48px;
    min-height: 54px;
    padding: 5px 6px;
  }

  .dice-controls-row .button {
    flex: 1 1 calc(50% - 6px);
  }

  .dice-controls-row .dice-start-btn,
  .dice-controls-row .dice-big-btn {
    flex: 1 1 100%;
  }

  .cell-vanish-badge {
    font-size: 7.5px;
    bottom: 3px;
  }
}

/* =========================================
   Phase 3: 3D Satranc, Lobby Filter, Zar Popup, Mini Sohbet & Mentions
   ========================================= */
.lobby-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.lobby-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lobby-chip {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  color: var(--ink, var(--text, #f4f5ef));
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lobby-chip:hover {
  border-color: var(--accent, #a8df6e);
}

.lobby-chip.active {
  background: var(--accent, #a8df6e);
  color: #111612;
  border-color: var(--accent, #a8df6e);
}

#lobby-search {
  flex: 1 1 180px;
  max-width: 260px;
  min-width: 0;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--surface-2, rgba(255, 255, 255, 0.05));
  color: var(--ink, var(--text, #f4f5ef));
  font-size: 13px;
}

.lobby-room-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* 3D Satranç Arena */
.chess-shell {
  display: grid;
  gap: 12px;
}

.chess-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 340px);
  gap: 12px;
  align-items: start;
}

.chess-stage {
  position: relative;
  height: clamp(360px, 64dvh, 620px);
  min-height: 320px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: #0c110e;
}

.chess-canvas-wrap,
.chess-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chess-banner {
  top: 10px;
  font-size: 12.5px;
  max-width: calc(100% - 24px);
}

.chess-cam-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 4;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(12, 17, 14, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(244, 245, 239, 0.85);
  font-size: 11px;
  white-space: nowrap;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.chess-promo-modal:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 16px;
  background: rgba(9, 13, 10, 0.86);
  backdrop-filter: blur(8px);
  text-align: center;
}

.chess-promo-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chess-side-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--surface, rgba(255, 255, 255, 0.03));
  min-width: 0;
}

.chess-players-box {
  display: grid;
  gap: 8px;
}

.chess-player-card {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
}

.chess-player-card.active-turn {
  border-color: var(--accent, #a8df6e);
  box-shadow: 0 0 0 1px rgba(168, 223, 110, 0.35);
  background: rgba(168, 223, 110, 0.08);
}

.chess-player-card.winner {
  border-color: #f3ca78;
  background: rgba(243, 202, 120, 0.12);
}

.chess-player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.chess-player-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chess-clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.25);
}

.chess-captured-row {
  font-size: 13px;
  opacity: 0.85;
  min-height: 18px;
  word-break: break-word;
}

.chess-moves-wrap {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  padding-top: 8px;
}

.chess-moves-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
}

.chess-moves-list {
  display: grid;
  gap: 3px;
  max-height: 155px;
  overflow-y: auto;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--surface-2, rgba(0, 0, 0, 0.18));
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.chess-move-pair {
  display: grid;
  grid-template-columns: 28px 1fr 1fr;
  gap: 6px;
}

.chess-move-num {
  opacity: 0.55;
}

.chess-spectators-strip,
.chess-spec-note,
.chess-wait-hint {
  margin: 0;
  font-size: 12px;
  opacity: 0.86;
  line-height: 1.4;
}

.chess-controls-box {
  display: grid;
  gap: 8px;
}

.chess-bot-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chess-draw-banner,
.chess-result-banner {
  display: grid;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(243, 202, 120, 0.14);
  border: 1px solid rgba(243, 202, 120, 0.45);
  font-size: 13px;
  font-weight: 600;
}

.chess-2d-fallback:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 40px 10px 36px;
}

.chess-2d-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(88vw, 380px);
  aspect-ratio: 1;
  border: 2px solid #9b7a3c;
  border-radius: 6px;
  overflow: hidden;
}

.chess-2d-sq {
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: clamp(18px, 4vw, 26px);
  cursor: pointer;
}

.chess-2d-sq.light {
  background: #e9ddc4;
  color: #161816;
}

.chess-2d-sq.dark {
  background: #4e6e58;
  color: #161816;
}

.chess-2d-sq.last {
  box-shadow: inset 0 0 0 3px rgba(242, 209, 75, 0.72);
}

.chess-2d-sq.selected {
  box-shadow: inset 0 0 0 3px #a8df6e;
}

.chess-2d-sq.legal {
  box-shadow: inset 0 0 0 3px rgba(168, 223, 110, 0.82);
}

/* Illustrated Zar Help Modal */
.dice-help-modal {
  max-width: 640px;
  width: min(94vw, 640px);
}

.dice-help-lead {
  font-size: 13.5px;
  line-height: 1.5;
  opacity: 0.9;
  margin-bottom: 14px;
}

.dice-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.dice-rule-card {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  font-size: 12.5px;
  line-height: 1.45;
}

.dice-rule-hot {
  border-color: rgba(243, 202, 120, 0.42);
  background: rgba(243, 202, 120, 0.08);
}

.dice-svg-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dice-mini-svg {
  width: 30px;
  height: 30px;
}

.dice-mini-svg .die-bg {
  fill: #f6efe0;
  stroke: #cbbca0;
  stroke-width: 2;
}

.dice-mini-svg .die-pip {
  fill: #1b221e;
}

.dice-combo-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(168, 223, 110, 0.18);
  color: var(--accent, #a8df6e);
  font-weight: 700;
  font-size: 11.5px;
}

[data-theme="light"] .dice-combo-badge {
  color: #2c5b10;
  background: rgba(114, 173, 56, 0.18);
}

.dice-combo-badge.hot {
  background: rgba(243, 202, 120, 0.2);
  color: #f3ca78;
}

[data-theme="light"] .dice-combo-badge.hot {
  color: #9e5c00;
  background: rgba(226, 178, 86, 0.25);
}

body.in-games .toast-stack {
  top: 64px;
  bottom: auto;
}

body.in-blackjack .games-view {
  padding-bottom: 68px;
}

.chess-topbar .bj-phase-tag {
  color: #d6efb8;
  border-color: rgba(168, 223, 110, 0.35);
  background: rgba(168, 223, 110, 0.12);
}

.chess-topbar .chess-spec-tag {
  background: rgba(168, 223, 110, 0.22);
  color: #dbffb5;
  border-color: rgba(168, 223, 110, 0.55);
}

.dice-help-steps {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  font-size: 12.5px;
}

/* Masa Ici Mini Sohbet Cekmecesi & @Mention Highlight */
.message.is-mentioned {
  background: rgba(168, 223, 110, 0.11);
  border-left: 3px solid var(--accent, #a8df6e);
  padding-left: 10px;
  border-radius: 10px;
}

.mini-chat-shell:not([hidden]) {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 45;
  display: grid;
  justify-items: end;
  gap: 8px;
  max-width: calc(100vw - 24px);
}

.mini-chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(168, 223, 110, 0.4);
  background: rgba(18, 24, 20, 0.88);
  color: #f4f5ef;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

[data-theme="light"] .mini-chat-toggle {
  background: rgba(255, 255, 255, 0.92);
  color: #161a17;
  border-color: rgba(45, 92, 18, 0.35);
}

.mini-chat-toggle.has-mention {
  border-color: #f3ca78;
  box-shadow: 0 0 0 3px rgba(243, 202, 120, 0.28), 0 10px 26px rgba(0, 0, 0, 0.45);
}

.mini-chat-badge:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent, #a8df6e);
  color: #111612;
  font-size: 11px;
  font-weight: 800;
}

.mini-chat-badge.is-mention {
  background: #f3ca78;
  color: #1c1405;
}

.mini-chat-drawer:not([hidden]) {
  width: min(350px, calc(100vw - 24px));
  height: min(380px, 60dvh);
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 20, 17, 0.86);
  backdrop-filter: blur(14px);
  color: #f4f5ef;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52);
  overflow: hidden;
}

[data-theme="light"] .mini-chat-drawer:not([hidden]) {
  background: rgba(250, 252, 249, 0.92);
  border-color: rgba(0, 0, 0, 0.14);
  color: #151816;
}

.mini-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .mini-chat-head {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.mini-chat-tabs {
  display: flex;
  gap: 4px;
}

.mini-tab {
  border: 0;
  border-radius: 8px;
  padding: 4px 8px;
  background: transparent;
  color: inherit;
  opacity: 0.72;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mini-tab.active {
  opacity: 1;
  background: rgba(168, 223, 110, 0.2);
  color: var(--accent, #a8df6e);
}

[data-theme="light"] .mini-tab.active {
  color: #2f5b10;
}

.mini-chat-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-mention-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(243, 202, 120, 0.22);
  color: #f3ca78;
}

.mini-chat-messages {
  overflow-y: auto;
  padding: 8px 10px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.mini-chat-empty {
  text-align: center;
  opacity: 0.7;
  font-size: 12px;
  padding: 24px 10px;
}

.mini-msg {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
  line-height: 1.38;
  word-break: break-word;
}

[data-theme="light"] .mini-msg {
  background: rgba(0, 0, 0, 0.04);
}

.mini-msg.is-self {
  background: rgba(168, 223, 110, 0.09);
}

.mini-msg.is-mentioned {
  border-left: 3px solid #f3ca78;
  background: rgba(243, 202, 120, 0.14);
}

.mini-msg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.mini-msg-author {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent, #a8df6e);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

[data-theme="light"] .mini-msg-author {
  color: #2f5b10;
}

.mini-msg-time {
  font-size: 10.5px;
  opacity: 0.6;
}

.mini-chat-form {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .mini-chat-form {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.mini-chat-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 12.5px;
}

[data-theme="light"] .mini-chat-form input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.18);
}

@media (max-width: 960px) {
  .chess-main-grid {
    grid-template-columns: 1fr;
  }

  .chess-stage {
    height: clamp(320px, 50dvh, 460px);
  }
}

@media (max-width: 720px) {
  .game-hub {
    grid-template-columns: 1fr;
  }

  .dice-help-grid {
    grid-template-columns: 1fr;
  }

  .lobby-controls {
    align-items: stretch;
  }

  #lobby-search {
    max-width: 100%;
    width: 100%;
  }

  .mini-chat-shell:not([hidden]) {
    right: 10px;
    bottom: 10px;
  }

  .chess-cam-hint {
    font-size: 10px;
  }
}

/* ============================
   Modern Oyun Merkezi & Lobi
   ============================ */
.games-hero-bar {
  padding-bottom: 12px !important;
  margin-bottom: 12px;
}

.games-hero-bar h2 {
  font-size: 23px !important;
  margin-top: 0 !important;
}

.games-hero-bar p {
  font-size: 12.5px;
  margin-top: 3px;
}

.lobby-dock {
  border: 1px solid color-mix(in srgb, var(--lime) 24%, var(--line));
  border-radius: 16px;
  padding: 13px 15px;
  margin-bottom: 18px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--panel) 94%, var(--lime) 6%),
    var(--panel)
  );
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.lobby-dock .lobby-heading {
  padding-bottom: 9px;
  margin-bottom: 9px;
}

.lobby-dock .lobby-controls {
  margin-bottom: 10px;
  gap: 8px;
  align-items: center;
}

.lobby-dock #lobby-search {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  padding: 7px 11px;
  min-width: 190px;
  flex: 0 1 230px;
}

.lobby-dock #lobby-search:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--lime) 60%, var(--line));
}

.lobby-dock .game-lobby {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(335px, 1fr));
  gap: 10px;
}

.lobby-dock .lobby-empty {
  grid-column: 1 / -1;
  margin-top: 0;
  padding: 11px 14px;
  font-size: 12.5px;
  text-align: left;
  border-style: dashed;
}

.lobby-dock .lobby-room {
  margin-top: 0;
  padding: 11px 13px;
  border-radius: 12px;
}

.lobby-room.is-waiting {
  border-color: color-mix(in srgb, var(--lime) 55%, var(--line));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--panel) 90%, var(--lime) 10%),
    var(--panel)
  );
}

#game-intro.game-hub {
  gap: 14px;
  margin-bottom: 12px;
}

@media (min-width: 1180px) {
  #game-intro.game-hub {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#game-intro .game-card {
  padding: 17px 18px;
  gap: 9px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#game-intro .game-card .game-buttons {
  margin-top: auto;
  padding-top: 6px;
}

#game-intro .game-card > small {
  min-height: 2.8em;
}

#game-intro .game-card h3 {
  font-size: 18.5px;
}

#game-intro .game-card p {
  font-size: 12.6px;
  line-height: 1.5;
}

.game-card-okey {
  border-color: rgba(84, 189, 130, 0.36);
  background:
    radial-gradient(circle at 90% 14%, rgba(22, 138, 81, 0.18), transparent 55%),
    var(--panel);
}

.game-card-okey101 {
  border-color: rgba(243, 202, 120, 0.4);
  background:
    radial-gradient(circle at 90% 14%, rgba(226, 178, 86, 0.2), transparent 55%),
    var(--panel);
}

.okey-live-tag {
  background: rgba(22, 138, 81, 0.22);
  color: #8df0bc;
  border-color: rgba(84, 189, 130, 0.45);
}

[data-theme="light"] .okey-live-tag {
  color: #0e6339;
  background: rgba(22, 138, 81, 0.14);
}

.okey101-live-tag {
  background: rgba(226, 178, 86, 0.2);
  color: #f3ca78;
  border-color: rgba(226, 178, 86, 0.45);
}

[data-theme="light"] .okey101-live-tag {
  color: #8c5600;
  background: rgba(226, 178, 86, 0.22);
}

.okey-card-emblem {
  font: 800 18px "Segoe UI", Arial, sans-serif;
  padding: 5px 10px;
  border-radius: 10px;
  background: #f5eedb;
  color: #b92727;
  border: 1px solid #cbbda0;
  box-shadow: 0 3px 0 #b8a888;
}

.okey-card-emblem.gold {
  color: #164e87;
  border-color: #d6b05c;
}

.okey-lobby-avatar {
  background: linear-gradient(135deg, #165b36, #0d3a22) !important;
  color: #f6e7c2 !important;
  font-size: 19px;
}

.okey101-lobby-avatar {
  background: linear-gradient(135deg, #754c12, #382208) !important;
  color: #f6df96 !important;
  font-weight: 800;
  font-size: 13px !important;
}

.okey-demo-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 38px;
  border-radius: 6px;
  background: linear-gradient(180deg, #fcf9f0, #eadfc7);
  border: 1px solid #cbbda0;
  border-bottom: 3px solid #baa885;
  font-weight: 900;
  font-size: 16px;
}

.tile-c-R { color: #c92a2a; }
.tile-c-K { color: #1b1f23; }
.tile-c-B { color: #1864ab; }
.tile-c-Y { color: #c48400; }
.tile-c-F { color: #6d28d9; }

/* ============================
   3D Klasik Okey & 101 Arena
   ============================ */
.okey-shell {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.okey-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 13px;
  background: #101712;
  color: #f4f5ef;
  border: 1px solid rgba(168, 223, 110, 0.25);
}

.okey-title-wrap,
.okey-cam-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.okey-cam-bar .active {
  background: var(--lime);
  color: #161d0f;
}

.okey-wild-pill {
  background: rgba(243, 202, 120, 0.18);
  color: #f6df96;
  border-color: rgba(243, 202, 120, 0.5);
}

.okey-topbar .bj-phase-tag {
  color: #d6efb8;
  border-color: rgba(168, 223, 110, 0.35);
  background: rgba(168, 223, 110, 0.12);
}

.okey-topbar .chess-spec-tag {
  background: rgba(168, 223, 110, 0.22);
  color: #dbffb5;
  border-color: rgba(168, 223, 110, 0.55);
}

.okey-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.okey-stage {
  position: relative;
  height: clamp(320px, 47dvh, 460px);
  border-radius: 16px;
  overflow: hidden;
  background: #0c140e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-width: 0;
}

.okey-canvas-wrap,
.okey-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.okey-banner {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 16px);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(12, 18, 14, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f4f5ef;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 4;
}

.okey-banner.is-my-turn {
  border-color: var(--lime);
  color: var(--lime);
  box-shadow: 0 0 18px rgba(197, 242, 115, 0.28);
}

.okey-seats-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.okey-seat-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 10px;
  background: rgba(14, 21, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f4f5ef;
  font-size: 11px;
  max-width: 175px;
}

.okey-seat-chip strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.okey-seat-chip small {
  color: #b6c4b0;
  font-size: 10.5px;
  white-space: nowrap;
}

.okey-seat-chip.active {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px rgba(197, 242, 115, 0.25);
}

.okey-seat-chip.empty {
  opacity: 0.72;
}

.okey-seat-chip.pos-top { top: 44px; left: 50%; transform: translateX(-50%); }
.okey-seat-chip.pos-left { left: 8px; top: 50%; transform: translateY(-50%); }
.okey-seat-chip.pos-right { right: 8px; top: 50%; transform: translateY(-50%); }
.okey-seat-chip.pos-bottom { bottom: 8px; left: 50%; transform: translateX(-50%); }

.okey-seat-react {
  font-size: 15px;
  line-height: 1;
}

.okey-mini-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 25px;
  padding: 0 3px;
  border-radius: 4px;
  background: #f8f2e2;
  border: 1px solid #cbbda0;
  border-bottom: 2px solid #b5a37e;
  font-weight: 900;
  font-size: 11.5px;
  line-height: 1;
}

.okey-mini-tile.is-wild {
  box-shadow: 0 0 0 1.5px #d4a017;
  background: #fff4ce;
}

.okey-melds-overlay {
  position: absolute;
  bottom: 38px;
  left: 8px;
  right: 8px;
  max-height: 44%;
  overflow-y: auto;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(11, 28, 18, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 223, 110, 0.28);
  z-index: 5;
  display: grid;
  gap: 5px;
}

.okey-melds-head {
  font-size: 11px;
  font-weight: 700;
  color: #cfe8be;
}

.okey-melds-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.okey-meld-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f4f5ef;
}

.okey-meld-group.can-layoff {
  border-color: var(--lime);
  background: rgba(197, 242, 115, 0.18);
  box-shadow: 0 0 0 2px rgba(197, 242, 115, 0.35);
  cursor: pointer;
}

.okey-meld-owner {
  font-size: 10px;
  color: #b6c4b0;
}

.okey-meld-tiles {
  display: inline-flex;
  gap: 2px;
}

.okey-wait-overlay,
.okey-summary-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 14, 10, 0.8);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 14px;
  z-index: 8;
  overflow-y: auto;
}

.okey-wait-card,
.okey-summary-card {
  width: min(460px, 100%);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
  text-align: center;
}

.okey-wait-seats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.okey-wait-seat.filled {
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--lime) 14%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--lime) 45%, var(--line));
  font-weight: 700;
  font-size: 13px;
}

.okey-summary-rows {
  display: grid;
  gap: 7px;
  max-height: 220px;
  overflow-y: auto;
}

.okey-summary-row {
  padding: 7px 9px;
  border-radius: 10px;
  background: var(--panel-2);
  display: grid;
  gap: 5px;
  text-align: left;
}

.okey-summary-row > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.okey-summary-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.okey-side-rail {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.okey-side-rail .button:disabled {
  opacity: 0.48;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
  cursor: not-allowed;
}

.okey-analysis-pill {
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--panel-2);
  border: 1px solid var(--line);
  text-align: center;
}

.okey-analysis-pill.ready {
  background: rgba(168, 223, 110, 0.16);
  border-color: rgba(168, 223, 110, 0.5);
  color: var(--lime);
}

[data-theme="light"] .okey-analysis-pill.ready {
  color: #365c12;
}

.okey-draw-box,
.okey-play-box {
  display: grid;
  gap: 6px;
}

.okey-selection-info {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  min-height: 16px;
}

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

.okey-score-item {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 11.5px;
}

.okey-score-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.okey-react-bar {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.okey-react-btn {
  flex: 1;
  padding: 5px 2px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 15px;
}

.okey-timer-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #e6f2d8;
  border: 1px solid rgba(197, 242, 115, 0.28);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.okey-timer-pill.active {
  background: rgba(197, 242, 115, 0.18);
  color: #dfffaa;
  border-color: rgba(197, 242, 115, 0.65);
}

.okey-timer-pill.warn {
  background: rgba(220, 38, 38, 0.25);
  color: #ffd3d3;
  border-color: rgba(248, 113, 113, 0.8);
  animation: okeyPulseWarn 1s ease-in-out infinite;
}

.okey-timer-pill.bot {
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.45);
}

@keyframes okeyPulseWarn {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

.okey-seat-chip.is-bot {
  border-color: rgba(56, 189, 248, 0.45);
}

.okey-seat-chip.is-bot-joinable {
  cursor: pointer;
  border-color: rgba(197, 242, 115, 0.72);
  background: rgba(18, 42, 24, 0.92);
  box-shadow: 0 0 0 1px rgba(197, 242, 115, 0.22);
}

.okey-seat-chip.is-bot-joinable:hover {
  border-color: #c5f273;
  transform: translateY(-1px);
}

.okey-seat-sit-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: #c5f273;
  color: #101610;
  font-size: 10px;
  font-weight: 800;
  margin-left: 4px;
}

.okey-take-bot-btn {
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(197, 242, 115, 0.28);
}

/* Tactile 2-Tier Wooden Istaka */
.okey-rack-dock {
  border-radius: 16px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, #5d371e, #3f2311);
  border: 1px solid #8a5a32;
  box-shadow: inset 0 2px 0 rgba(255, 225, 175, 0.18), 0 12px 26px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 8px;
}

.okey-rack-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.okey-rack-tools-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.okey-rack-hint {
  font-size: 11.5px;
  color: #e6d5bc;
}

.okey-istaka {
  display: grid;
  gap: 6px;
}

.okey-istaka-row {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 4px;
  padding: 5px 6px 6px;
  border-radius: 10px;
  background: rgba(20, 11, 5, 0.42);
  border-bottom: 3px solid #754624;
}

.okey-slot {
  height: 52px;
  padding: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 232, 195, 0.12);
  display: grid;
  place-items: center;
  transition: transform 0.1s ease, border-color 0.15s ease;
}

.okey-slot.drag-over {
  border-color: var(--lime);
  background: rgba(197, 242, 115, 0.22);
}

.okey-slot.is-group {
  box-shadow: inset 0 -3px 0 #55d68a;
}

.okey-slot.is-pair {
  box-shadow: inset 0 -3px 0 #70c4ff;
}

.okey-slot.selected {
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px var(--lime);
}

.okey-tile-chip {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(180deg, #fcfaf2, #ebe0c8);
  border: 1px solid #c9ba99;
  border-bottom: 3px solid #b3a17b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  user-select: none;
}

.okey-tile-chip.is-wild {
  background: linear-gradient(180deg, #fff9d8, #f7df94);
  border-color: #d4a017;
}

.okey-tile-num {
  font-weight: 900;
  font-size: 19px;
}

.okey-tile-pip {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin-top: 2px;
  opacity: 0.85;
}

@media (max-width: 960px) {
  body.in-okey main {
    padding-bottom: 50px !important;
  }

  .okey-topbar {
    padding: 6px 9px;
    gap: 6px;
  }

  .okey-main {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .okey-stage {
    height: clamp(175px, 24dvh, 215px);
  }

  .okey-side-rail {
    padding: 6px 8px;
    gap: 5px;
  }

  .okey-side-rail .button {
    padding: 7px 8px;
    font-size: 12px;
  }

  .okey-analysis-pill {
    padding: 4px 7px;
    font-size: 11px;
  }

  .okey-draw-box,
  .okey-play-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .okey-selection-info {
    display: none;
  }

  .okey-score-mini {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .okey-score-item {
    padding: 3px 5px;
    font-size: 10.5px;
  }

  .okey-react-btn {
    padding: 3px 2px;
    font-size: 13px;
  }

  .okey-slot {
    height: 36px;
  }

  .okey-tile-num {
    font-size: 14px;
  }

  .okey-tile-pip {
    font-size: 6px;
  }

  .okey-istaka-row {
    gap: 2px;
    padding: 3px;
  }

  .okey-rack-dock {
    padding: 6px 6px 7px;
    gap: 5px;
  }
}

@media (max-width: 560px) {
  .okey-seat-chip {
    font-size: 10px;
    padding: 3px 6px;
    max-width: 132px;
  }
}

/* ============================
   Mobile Landscape (Yatay Ekran)
   ============================ */
@media (max-height: 540px) and (orientation: landscape) and (max-width: 1024px) {
  .sidebar:not(.open) {
    transform: translateX(-100%);
  }

  .main-shell {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .mobile-menu {
    display: grid !important;
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  #game-intro.game-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.in-okey .topbar {
    height: 36px;
    padding: 3px 10px;
  }

  body.in-okey main {
    padding: 4px 8px !important;
  }

  .okey-shell {
    gap: 4px;
  }

  .okey-topbar {
    padding: 3px 8px;
    font-size: 11px;
    gap: 4px;
  }

  .okey-topbar .button {
    padding: 4px 8px;
    font-size: 11px;
  }

  .okey-main {
    grid-template-columns: minmax(0, 1fr) 232px !important;
    gap: 6px;
  }

  .okey-stage {
    height: clamp(150px, 44dvh, 178px) !important;
  }

  .okey-side-rail {
    padding: 4px 5px;
    gap: 3px;
    max-height: clamp(150px, 44dvh, 178px);
    overflow-y: auto;
  }

  .okey-side-rail .button {
    padding: 5px 6px;
    font-size: 10.5px;
  }

  .okey-analysis-pill {
    padding: 3px 5px;
    font-size: 10px;
  }

  .okey-draw-box,
  .okey-play-box {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 3px;
  }

  .okey-score-mini {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 3px;
  }

  .okey-react-bar {
    display: none;
  }

  .okey-rack-dock {
    padding: 4px 6px 5px;
    gap: 3px;
  }

  .okey-rack-tools .button {
    padding: 4px 8px;
    font-size: 11px;
  }

  .okey-istaka {
    gap: 3px;
  }

  .okey-istaka-row {
    gap: 2px;
    padding: 2px 3px;
  }

  .okey-slot {
    height: 28px !important;
  }

  .okey-tile-num {
    font-size: 12.5px;
  }

  .okey-tile-pip {
    display: none;
  }

  .okey-rack-hint {
    display: none;
  }

  .dice-stage {
    height: clamp(175px, 48dvh, 220px) !important;
  }

  .bj-stage {
    height: clamp(185px, 50dvh, 230px) !important;
  }

  .chess-stage {
    height: clamp(185px, 50dvh, 230px) !important;
  }
}

@media (max-width: 960px) {
  body.in-okey main {
    padding-bottom: 62px !important;
  }

  .okey-cam-bar {
    gap: 4px;
  }

  .okey-cam-bar .button {
    padding: 4px 8px;
    font-size: 11px;
  }

  .okey-stage {
    height: clamp(150px, 23dvh, 185px) !important;
  }

  .okey-slot {
    height: 40px;
  }
}

@media (max-width: 560px) {
  .okey-timer-pill,
  .okey-take-bot-btn {
    font-size: 10.5px;
    padding: 4px 7px;
  }

  .okey-seat-sit-badge {
    font-size: 9px;
    padding: 1px 5px;
  }
}

/* Landscape must come AFTER max-width:960px so landscape phones (e.g. 844x390) always win */
@media (max-height: 540px) and (orientation: landscape) {
  body.in-okey main {
    padding: 4px 8px 34px !important;
  }

  .okey-stage {
    height: clamp(128px, 35dvh, 148px) !important;
  }

  .okey-slot {
    height: 28px !important;
  }

  .okey-rack-dock {
    padding: 4px 6px 5px !important;
    gap: 3px !important;
  }

  .okey-rack-tools .button {
    padding: 3px 7px;
    font-size: 10.5px;
  }

  body.in-okey .mini-chat-shell:not([hidden]) {
    right: 8px;
    bottom: 3px;
  }

  body.in-okey .mini-chat-toggle {
    padding: 3px 9px;
    font-size: 10.5px;
  }

  .okey-timer-pill,
  .okey-take-bot-btn {
    font-size: 10.5px;
    padding: 3px 7px;
  }
}

.chess-player-card.disconnected {
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.08);
}

.chess-grace-tag {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.55);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  font-weight: 700;
}

/* ===== Modern Game Card Subtle Polish & Tavla 3D Card ===== */
.game-card {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(183, 236, 93, 0.34);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.game-card-tavla {
  border-color: rgba(218, 174, 98, 0.4);
  background: linear-gradient(155deg, rgba(66, 36, 18, 0.42), rgba(20, 29, 20, 0.65));
}

[data-theme="light"] .game-card-tavla {
  border-color: rgba(164, 114, 38, 0.34);
  background: linear-gradient(155deg, #fbf4e6, #f2e5cb);
  color: #1d1a14;
}

.tavla-live-tag {
  background: rgba(218, 174, 98, 0.2);
  color: #f3d28f;
  border: 1px solid rgba(218, 174, 98, 0.44);
}

[data-theme="light"] .tavla-live-tag {
  background: rgba(164, 114, 38, 0.14);
  color: #7a4b10;
  border-color: rgba(164, 114, 38, 0.35);
}

.tavla-card-emblem {
  font-size: 20px;
  letter-spacing: 2px;
  color: #f3d28f;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .tavla-card-emblem {
  color: #8a5612;
}

/* ===== Tavla 3D Arena ===== */
.tavla-arena {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.tavla-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tavla-players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.tavla-seat-pill {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 11px;
  background: var(--panel-2, rgba(0, 0, 0, 0.28));
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  color: var(--text);
  font-size: 12.5px;
}

.tavla-seat-pill.active-turn {
  border-color: var(--lime);
  background: rgba(183, 236, 93, 0.14);
  box-shadow: 0 0 0 1px rgba(183, 236, 93, 0.28);
}

[data-theme="light"] .tavla-seat-pill.active-turn {
  border-color: #5b8622;
  background: #edf5dd;
}

.tavla-seat-pill.disconnected {
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.1);
}

.tavla-seat-pill .disc,
.tavla-2d-pt .disc {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  flex-shrink: 0;
}

.disc.w {
  background: radial-gradient(circle at 35% 30%, #fffaf0, #d8c8a4);
  border: 1.5px solid #9b8864;
  color: #1c1710;
}

.disc.b {
  background: radial-gradient(circle at 35% 30%, #484e57, #16181d);
  border: 1.5px solid #6b7280;
  color: #f3f4f6;
}

.tavla-score {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(218, 174, 98, 0.18);
  color: #f4d38b;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

[data-theme="light"] .tavla-score {
  background: rgba(164, 114, 38, 0.16);
  color: #7c4c10;
}

.tavla-pip {
  font-size: 11px;
  opacity: 0.78;
  font-variant-numeric: tabular-nums;
}

.tavla-match-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--panel-2, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  color: var(--text);
  white-space: nowrap;
}

.tavla-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tavla-status-bar {
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(218, 174, 98, 0.08);
  border: 1px solid rgba(218, 174, 98, 0.22);
  font-size: 13px;
  font-weight: 500;
  min-height: 34px;
  display: flex;
  align-items: center;
}

.tavla-stage-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(218, 174, 98, 0.28);
  background: radial-gradient(circle at 50% 45%, #162218, #0a0e09);
  box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.55);
}

.tavla-stage {
  width: 100%;
  height: clamp(320px, 52dvh, 520px);
  display: block;
  touch-action: none;
}

.tavla-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.tavla-dice-hud {
  position: absolute;
  left: 12px;
  top: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 12px;
  background: rgba(11, 16, 11, 0.8);
  color: #f4f5ef;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.tavla-dice-hud:empty {
  display: none;
}

.tavla-dice-side {
  font-size: 11.5px;
  font-weight: 600;
  color: #f4f5ef;
}

.tavla-die-badge {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(145deg, #fbf7ee, #dfd4bd);
  border: 1px solid #9d8b69;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  transition: opacity 150ms ease, transform 150ms ease;
}

.tavla-die-badge.used {
  opacity: 0.34;
  transform: scale(0.9);
}

.tavla-die-grid {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 1.5px;
}

.tavla-die-grid .pip {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
}

.tavla-die-grid .pip.on {
  background: #1c1914;
}

.tavla-double-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--lime);
}

.tavla-controls {
  display: grid;
  gap: 8px;
}

.tavla-target-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tavla-turn-hint {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lime);
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(183, 236, 93, 0.1);
}

.tavla-react-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tavla-fallback:not([hidden]) {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.tavla-2d-grid {
  display: grid;
  gap: 8px;
  background: #2c1b10;
  padding: 10px;
  border-radius: 12px;
  border: 2px solid #7d562d;
}

.tavla-2d-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
}

.tavla-2d-pt {
  min-height: 112px;
  padding: 4px 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: #cbb38b;
  color: #161816;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.tavla-2d-pt:nth-child(odd) {
  background: #61261c;
  color: #f4ebd8;
}

.tavla-2d-pt.movable {
  box-shadow: inset 0 0 0 2px #b7ec5d;
}

.tavla-2d-pt.selected {
  box-shadow: inset 0 0 0 3px #b7ec5d;
  transform: translateY(-2px);
}

.tavla-2d-pt.target {
  box-shadow: inset 0 0 0 3px #f4c44e;
}

.tavla-2d-pt .pt-num {
  font-size: 9.5px;
  font-weight: 700;
  opacity: 0.72;
}

.tavla-2d-pt .pt-stack {
  display: grid;
  gap: 2px;
  place-items: center;
}

.tavla-2d-side {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 960px) {
  body.in-tavla main {
    padding-bottom: 62px !important;
  }

  .tavla-stage {
    height: clamp(240px, 42dvh, 360px);
  }

  .tavla-seat-pill {
    padding: 5px 8px;
    font-size: 11.5px;
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  body.in-tavla main {
    padding: 4px 8px 34px !important;
  }

  .tavla-stage {
    height: clamp(190px, 54dvh, 255px) !important;
  }

  .tavla-topbar {
    gap: 4px;
  }

  .tavla-top-actions .button {
    padding: 3px 7px;
    font-size: 10.5px;
  }

  body.in-tavla .mini-chat-shell:not([hidden]) {
    right: 8px;
    bottom: 3px;
  }

  body.in-tavla .mini-chat-toggle {
    padding: 3px 9px;
    font-size: 10.5px;
  }
}

/* ==================== 3D EUROPEAN CASINO ROULETTE ==================== */
.game-card-roulette {
  border-color: rgba(227, 184, 87, 0.34);
  background: radial-gradient(circle at top right, rgba(20, 92, 56, 0.24), transparent 58%),
    linear-gradient(155deg, rgba(20, 26, 22, 0.96), rgba(12, 16, 14, 0.98));
}

.roulette-live-tag {
  background: rgba(227, 184, 87, 0.16);
  color: #f4d378;
  border-color: rgba(227, 184, 87, 0.42);
}

.roulette-card-emblem {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: #f4d378;
  font-weight: 800;
}

.roulette-arena {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  color: #f2f5f3;
}

.roulette-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(19, 26, 22, 0.96), rgba(12, 17, 14, 0.98));
  border: 1px solid rgba(227, 184, 87, 0.28);
}

.roulette-top-left,
.roulette-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.rl-phase-pill,
.rl-timer-pill,
.rl-meta-pill,
.rl-bank-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rl-phase-pill.phase-betting {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}

.rl-phase-pill.phase-spinning {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fde68a;
}

.rl-phase-pill.phase-settled {
  background: rgba(234, 179, 8, 0.24);
  border-color: rgba(250, 204, 21, 0.65);
  color: #fef08a;
}

.rl-timer-pill {
  min-width: 38px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: rgba(227, 184, 87, 0.16);
  border-color: rgba(227, 184, 87, 0.4);
  color: #f7dc88;
}

.rl-timer-pill.urgent {
  background: rgba(239, 68, 68, 0.26);
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

.rl-bank-pill {
  color: #d9f99d;
  border-color: rgba(163, 230, 53, 0.34);
}

.rl-history-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 100%;
}

.rl-hist-dot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.rl-hist-dot.red {
  background: #b91c1c;
}

.rl-hist-dot.black {
  background: #181c24;
}

.rl-hist-dot.green {
  background: #15803d;
}

.rl-hist-dot.latest {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px #facc15;
}

.rl-hist-stats,
.rl-hist-empty {
  font-size: 11px;
  color: #cbd5e1;
  padding: 0 4px;
}

.rl-cam-group {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.rl-cam-btn {
  padding: 5px 8px;
  font-size: 11.5px;
  font-weight: 700;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  color: #d5ded8;
  cursor: pointer;
}

.rl-cam-btn.active {
  background: #d4af37;
  color: #14120c;
}

.roulette-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 8px;
  align-items: stretch;
}

.roulette-stage {
  position: relative;
  height: clamp(270px, 42dvh, 430px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(227, 184, 87, 0.3);
  background: #0b100e;
}

.rl-canvas-3d,
.rl-canvas-2d {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.rl-stage-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rl-win-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13.5px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(250, 204, 21, 0.8);
  white-space: nowrap;
}

.rl-win-banner.red {
  background: rgba(185, 28, 28, 0.92);
}

.rl-win-banner.black {
  background: rgba(20, 24, 33, 0.94);
}

.rl-win-banner.green {
  background: rgba(21, 128, 61, 0.94);
}

.rl-hover-chip {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(12, 17, 15, 0.92);
  border: 1px solid #f4d378;
  color: #fef3c7;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.roulette-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: clamp(270px, 42dvh, 430px);
}

.rl-side-section {
  background: rgba(15, 21, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rl-feed-section {
  flex: 1 1 auto;
  min-height: 0;
}

.rl-side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #f4d378;
}

.rl-side-sub {
  font-size: 11px;
  color: #b7c4bc;
}

.rl-seats-list,
.rl-feed-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  max-height: 185px;
}

.rl-seat-row,
.rl-feed-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border-radius: 8px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.04);
}

.rl-seat-row.me {
  border: 1px solid rgba(183, 236, 93, 0.4);
  background: rgba(183, 236, 93, 0.08);
}

.rl-seat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.rl-seat-name,
.rl-feed-who {
  font-weight: 700;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rl-seat-bet {
  margin-left: auto;
  font-size: 11px;
  color: #fde68a;
}

.rl-seat-win {
  color: #4ade80;
  font-weight: 800;
}

.rl-seat-chips,
.rl-feed-amt {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #d9f99d;
}

.rl-feed-who {
  max-width: 78px;
}

.rl-feed-arrow {
  opacity: 0.55;
}

.rl-feed-spot {
  flex: 1 1 auto;
  color: #dbe4de;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rl-feed-empty {
  font-size: 11.5px;
  color: #93a39a;
  padding: 6px 2px;
}

.roulette-dock {
  background: linear-gradient(180deg, rgba(13, 30, 22, 0.96), rgba(9, 20, 15, 0.98));
  border: 1px solid rgba(227, 184, 87, 0.3);
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roulette-dock.is-locked .rl-felt-2d,
.roulette-dock.is-locked .rl-panel-racetrack {
  opacity: 0.7;
  pointer-events: none;
}

.rl-dock-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rl-chip-rack {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rl-chip-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px dashed var(--chip-accent, #fff);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.25), transparent 52%), var(--chip-bg, #2563eb);
  color: var(--chip-accent, #fff);
  font-weight: 900;
  font-size: 11.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.rl-chip-btn.active {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 0 0 2.5px #facc15, 0 8px 16px rgba(0, 0, 0, 0.55);
}

.rl-dock-tabs {
  display: flex;
  gap: 4px;
}

.rl-tab-btn {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #dce4df;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.rl-tab-btn.active {
  background: rgba(227, 184, 87, 0.22);
  border-color: #e3b857;
  color: #fde68a;
}

.rl-tab-feed {
  display: none;
}

.rl-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Interactive 2D Roulette Felt Mirror */
.rl-felt-2d {
  display: flex;
  flex-direction: column;
  gap: 4px;
  user-select: none;
}

.rl-felt-main-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 3px;
}

.rl-zero-col {
  display: grid;
  grid-template-rows: 1fr 24px;
  gap: 3px;
}

.rl-nums-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(3, 36px);
  gap: 3px;
}

.rl-num-wrap {
  position: relative;
  display: flex;
}

.rl-cols-bar {
  display: grid;
  grid-template-rows: repeat(3, 36px);
  gap: 3px;
}

.rl-dozens-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

.rl-outside-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
}

.rl-cell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(227, 184, 87, 0.55);
  color: #fffdf5;
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 74, 46, 0.88);
  transition: transform 0.1s ease, filter 0.1s ease;
}

.rl-cell:hover {
  filter: brightness(1.18);
  box-shadow: inset 0 0 0 1.5px #fde047;
}

.rl-cell.red {
  background: #b91c1c;
}

.rl-cell.black {
  background: #141720;
}

.rl-cell.green {
  background: #0d8f46;
}

.rl-cell.is-winner {
  box-shadow: 0 0 0 2.5px #facc15, 0 0 14px rgba(250, 204, 21, 0.85);
  z-index: 4;
}

.rl-split-mini {
  border-radius: 5px;
  border: 1px solid rgba(227, 184, 87, 0.5);
  background: rgba(13, 86, 52, 0.9);
  color: #fde68a;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  position: relative;
}

/* Invisible touch/click hotspots between cells for Splits, Corners, Streets & SixLines */
.rl-hot-split-h,
.rl-hot-split-v,
.rl-hot-corner,
.rl-hot-street,
.rl-hot-sixline {
  position: absolute;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 3;
  padding: 0;
}

.rl-hot-split-h {
  right: -5px;
  top: 6px;
  bottom: 6px;
  width: 9px;
}

.rl-hot-split-v {
  left: 6px;
  right: 6px;
  bottom: -5px;
  height: 9px;
}

.rl-hot-corner {
  right: -6px;
  bottom: -6px;
  width: 11px;
  height: 11px;
  z-index: 4;
}

.rl-hot-street {
  left: 6px;
  right: 6px;
  bottom: -5px;
  height: 9px;
}

.rl-hot-sixline {
  right: -6px;
  bottom: -6px;
  width: 11px;
  height: 11px;
  z-index: 4;
}

.rl-hot-split-h:hover,
.rl-hot-split-v:hover,
.rl-hot-corner:hover,
.rl-hot-street:hover,
.rl-hot-sixline:hover {
  background: rgba(250, 204, 21, 0.65);
  border-radius: 999px;
}

.rl-spot-badges {
  position: absolute;
  top: -5px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  pointer-events: none;
  z-index: 5;
}

.rl-spot-total {
  padding: 1px 4px;
  border-radius: 999px;
  background: #facc15;
  color: #14120c;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.rl-spot-owner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid #fff;
  display: inline-block;
}

/* RaceTrack & French Calls */
.rl-racetrack-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.rl-french-calls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  flex: 1 1 420px;
}

.rl-call-btn {
  padding: 6px 8px;
  border-radius: 9px;
  border: 1px solid rgba(227, 184, 87, 0.45);
  background: rgba(16, 70, 44, 0.72);
  color: #fef9c3;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 11.5px;
}

.rl-call-btn small {
  font-size: 10px;
  color: #b7d7c6;
}

.rl-call-btn:hover {
  background: rgba(227, 184, 87, 0.25);
}

.rl-neighbor-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #e2e8f0;
}

.rl-rad-btn {
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.rl-rad-btn.active {
  background: #d4af37;
  color: #111;
  border-color: #facc15;
}

.rl-wheel-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.rl-strip-num {
  flex: 1 0 26px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(227, 184, 87, 0.4);
  color: #fff;
  font-weight: 800;
  font-size: 11.5px;
  cursor: pointer;
}

.rl-strip-num.red {
  background: #b91c1c;
}

.rl-strip-num.black {
  background: #141720;
}

.rl-strip-num.green {
  background: #0d8f46;
}

@media (max-width: 960px) {
  body.in-roulette main {
    padding-bottom: 62px !important;
  }

  .roulette-main {
    grid-template-columns: 1fr;
  }

  .roulette-side {
    display: none;
  }

  .rl-tab-feed {
    display: inline-flex;
  }

  .roulette-stage {
    height: clamp(220px, 34dvh, 300px);
  }

  .rl-felt-main-row {
    grid-template-columns: 34px minmax(0, 1fr) 32px;
  }

  .rl-nums-grid,
  .rl-cols-bar {
    grid-template-rows: repeat(3, 30px);
  }

  .rl-cell {
    font-size: 10.5px;
    min-height: 26px;
  }

  .rl-chip-btn {
    width: 34px;
    height: 34px;
    font-size: 10.5px;
  }

  .rl-french-calls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  body.in-roulette main {
    padding: 4px 8px 34px !important;
  }

  .roulette-stage {
    height: clamp(185px, 46dvh, 235px) !important;
  }

  .rl-nums-grid,
  .rl-cols-bar {
    grid-template-rows: repeat(3, 25px);
  }
}

.roulette-topbar {
  position: relative;
  overflow: hidden;
  padding-bottom: 11px;
}

.rl-cycle-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.rl-cycle-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981, #eab308);
  transition: width 0.25s linear;
}

.rl-cycle-fill.phase-spinning {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.rl-cycle-fill.phase-settled {
  background: linear-gradient(90deg, #eab308, #4ade80);
}

.rl-hint-pill {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(9, 14, 12, 0.78);
  border: 1px solid rgba(227, 184, 87, 0.3);
  color: #e6e2d0;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.rl-hotcold-box {
  gap: 5px;
}

.rl-hc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #cbd5e1;
}

.rl-hc-label {
  font-weight: 700;
  margin-right: 2px;
  color: #f4d378;
}

.rl-hc-chip {
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.rl-hc-chip.red { background: #b91c1c; }
.rl-hc-chip.black { background: #181c24; }
.rl-hc-chip.green { background: #15803d; }

.rl-react-strip {
  display: flex;
  gap: 4px;
  padding-top: 2px;
}

.rl-react-btn {
  flex: 1 1 0;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 13px;
  transition: transform 0.12s ease, background 0.12s ease;
}

.rl-react-btn:hover {
  transform: scale(1.08);
  background: rgba(227, 184, 87, 0.22);
}

.rl-seat-react {
  font-size: 13px;
  animation: rlPop 0.25s ease;
}

@keyframes rlPop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.rl-rack-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rl-erase-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.rl-erase-btn.active {
  background: #dc2626;
  color: #fff;
  border-color: #fca5a5;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.45);
}

.roulette-arena.is-erase-mode .rl-cell:hover {
  box-shadow: inset 0 0 0 2px #f87171;
}

@media (max-width: 960px) {
  .rl-hint-pill {
    display: none;
  }
}

/* ==================== 3D LAS VEGAS VIP SLOT MACHINE ==================== */
.game-card-slot {
  border-color: rgba(217, 70, 239, 0.36);
  background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.22), transparent 58%),
    linear-gradient(155deg, rgba(24, 15, 34, 0.96), rgba(14, 11, 20, 0.98));
}

.slot-live-tag {
  background: rgba(250, 204, 21, 0.16);
  color: #fde047;
  border-color: rgba(250, 204, 21, 0.45);
}

.slot-card-emblem {
  font-size: 15px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.04em;
}

.slot-arena {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  color: #f8fafc;
}

.slot-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(28, 16, 40, 0.96), rgba(16, 10, 24, 0.98));
  border: 1px solid rgba(250, 204, 21, 0.34);
}

.slot-top-left,
.slot-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.sl-jackpot-pill,
.sl-rtp-pill,
.sl-bank-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.sl-jackpot-pill {
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.35), rgba(162, 28, 175, 0.35));
  border: 1px solid rgba(250, 204, 21, 0.65);
  color: #fef08a;
  font-variant-numeric: tabular-nums;
}

.sl-rtp-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

.sl-bank-pill {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.42);
  color: #bbf7d0;
}

.sl-cam-group {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.sl-cam-btn {
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 700;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  cursor: pointer;
}

.sl-cam-btn.active {
  background: #eab308;
  color: #141008;
}

.slot-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 8px;
  align-items: stretch;
}

.slot-stage {
  position: relative;
  height: clamp(290px, 46dvh, 465px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(250, 204, 21, 0.34);
  background: #0b0812;
}

.sl-canvas-3d,
.sl-canvas-2d {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.sl-stage-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sl-fs-banner {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #16a34a, #0ea5e9);
  border: 1.5px solid #fef08a;
  color: #fff;
  font-weight: 900;
  font-size: 12.5px;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.sl-win-overlay {
  position: absolute;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(15, 10, 24, 0.92);
  border: 2px solid #facc15;
  color: #fef08a;
  font-weight: 900;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

.sl-win-overlay.tier-mega,
.sl-win-overlay.tier-jackpot {
  background: linear-gradient(90deg, #991b1b, #a21caf);
  border-color: #fde047;
  font-size: 17px;
}

.sl-hint-pill {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(12, 8, 20, 0.8);
  border: 1px solid rgba(250, 204, 21, 0.3);
  color: #f1e8ce;
  font-size: 11px;
  font-weight: 600;
}

.slot-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: clamp(290px, 46dvh, 465px);
}

.sl-side-section {
  background: rgba(18, 12, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sl-wins-section {
  flex: 1 1 auto;
  min-height: 0;
}

.sl-side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #facc15;
}

.sl-side-sub {
  font-size: 11px;
  color: #cbd5e1;
}

.sl-players-list,
.sl-wins-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  max-height: 175px;
}

.sl-player-row,
.sl-win-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 11.5px;
}

.sl-player-row.me {
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: rgba(250, 204, 21, 0.09);
}

.sl-p-name {
  font-weight: 700;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sl-p-fs {
  color: #4ade80;
  font-weight: 800;
}

.sl-p-chips {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #fef08a;
}

.sl-win-row {
  justify-content: space-between;
}

.sl-win-row.tier-mega,
.sl-win-row.tier-jackpot {
  background: rgba(217, 70, 239, 0.2);
  border: 1px solid rgba(250, 204, 21, 0.4);
}

.sl-win-empty {
  font-size: 11.5px;
  color: #94a3b8;
  padding: 6px 2px;
}

.sl-react-strip {
  display: flex;
  gap: 4px;
}

.sl-react-btn {
  flex: 1 1 0;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 13px;
}

.slot-console {
  background: linear-gradient(180deg, rgba(28, 16, 40, 0.96), rgba(14, 9, 22, 0.98));
  border: 1px solid rgba(250, 204, 21, 0.34);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sl-gamble-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(185, 28, 28, 0.24), rgba(15, 23, 42, 0.6));
  border: 1px solid rgba(250, 204, 21, 0.5);
}

.sl-gamble-label {
  font-weight: 800;
  font-size: 12.5px;
  color: #fef08a;
}

.sl-gamble-actions {
  display: flex;
  gap: 6px;
}

.sl-gamble-red {
  background: #b91c1c;
  color: #fff;
  border: 1px solid #f87171;
}

.sl-gamble-black {
  background: #18181b;
  color: #fff;
  border: 1px solid #71717a;
}

.sl-console-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sl-stakes-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sl-stake-btn {
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
}

.sl-stake-btn.active {
  background: #eab308;
  color: #141008;
  border-color: #fef08a;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.45);
}

.sl-mid-controls,
.sl-auto-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sl-mode-btn {
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.sl-mode-btn.active {
  background: rgba(56, 189, 248, 0.24);
  border-color: #38bdf8;
  color: #bae6fd;
}

.sl-auto-stop {
  background: rgba(239, 68, 68, 0.24);
  border-color: #f87171;
  color: #fecaca;
}

.sl-spin-btn {
  min-width: 170px;
  padding: 10px 22px;
  border-radius: 12px;
  border: 2px solid #fef08a;
  background: linear-gradient(180deg, #facc15, #ca8a04);
  color: #161004;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(234, 179, 8, 0.4);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.sl-spin-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.sl-spin-btn.is-spinning {
  opacity: 0.7;
  cursor: wait;
}

.sl-spin-btn.is-free-spin {
  background: linear-gradient(180deg, #4ade80, #16a34a);
  color: #fff;
  border-color: #bbf7d0;
}

.sl-spin-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.sl-spin-sub {
  font-size: 10.5px;
  font-weight: 700;
  opacity: 0.85;
}

.sl-status-strip {
  font-size: 11.5px;
  color: #cbd5e1;
  text-align: center;
}

.slot-paytable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.sl-pt-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(250, 204, 21, 0.25);
  font-size: 12px;
}

.sl-pt-card img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

@media (max-width: 960px) {
  body.in-slot main {
    padding-bottom: 58px !important;
  }

  .slot-topbar {
    padding: 6px 8px;
    gap: 5px;
  }

  .sl-jackpot-pill,
  .sl-rtp-pill,
  .sl-bank-pill {
    font-size: 11px;
    padding: 3px 8px;
  }

  .slot-main {
    grid-template-columns: 1fr;
  }

  .slot-side {
    display: none;
  }

  .slot-stage {
    height: clamp(205px, 34dvh, 285px);
  }

  .sl-hint-pill {
    display: none;
  }

  .slot-console {
    padding: 8px;
    gap: 6px;
  }

  .sl-gamble-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 6px 8px;
  }

  .sl-gamble-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sl-stake-btn {
    padding: 5px 9px;
    font-size: 12px;
  }

  .sl-spin-btn {
    width: 100%;
    padding: 9px 14px;
  }

  .sl-status-strip {
    font-size: 10.5px;
    line-height: 1.25;
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  body.in-slot .topbar {
    display: none !important;
  }

  body.in-slot main {
    padding: 4px 8px 6px !important;
  }

  .slot-arena {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 6px;
    align-items: stretch;
  }

  .slot-topbar {
    grid-column: 1 / -1;
    padding: 4px 8px;
    gap: 5px;
  }

  .slot-topbar .sl-rtp-pill {
    display: none;
  }

  .slot-stage {
    height: calc(100dvh - 68px) !important;
    min-height: 230px;
  }

  .sl-win-overlay {
    bottom: 12px;
    font-size: 13px;
    padding: 5px 12px;
  }

  .slot-console {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 6px 8px;
  }

  .sl-console-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .sl-spin-btn {
    min-width: 0;
    padding: 8px 10px;
  }

  .sl-status-strip {
    display: none;
  }
}

/* ==================== 3D KIRAATHANE CARD ARENAS (PAPAZ, PİŞTİ, BATAK) ==================== */
.game-card-papaz {
  border-color: rgba(16, 185, 129, 0.34);
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.16), transparent 55%),
    linear-gradient(155deg, rgba(12, 26, 20, 0.96), rgba(9, 16, 13, 0.98));
}

.game-card-pisti {
  border-color: rgba(244, 63, 94, 0.36);
  background: radial-gradient(circle at top right, rgba(244, 63, 94, 0.16), transparent 55%),
    linear-gradient(155deg, rgba(30, 12, 18, 0.96), rgba(16, 9, 13, 0.98));
}

.game-card-batak {
  border-color: rgba(56, 189, 248, 0.36);
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 55%),
    linear-gradient(155deg, rgba(12, 20, 38, 0.96), rgba(9, 13, 24, 0.98));
}

.papaz-live-tag {
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.45);
}

.pisti-live-tag {
  background: rgba(244, 63, 94, 0.16);
  color: #fecdd3;
  border-color: rgba(244, 63, 94, 0.45);
}

.batak-live-tag {
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.45);
}

.card-emblem-tr {
  font-size: 14px;
  font-weight: 900;
  color: #a7f3d0;
  letter-spacing: 0.04em;
}

.card-emblem-tr.crimson { color: #fda4af; }
.card-emblem-tr.gold { color: #fde047; }

.papaz-lobby-avatar { background: linear-gradient(135deg, #065f46, #047857); color: #fef08a; }
.pisti-lobby-avatar { background: linear-gradient(135deg, #9f1239, #e11d48); color: #fef08a; }
.batak-lobby-avatar { background: linear-gradient(135deg, #1e3a8a, #0284c7); color: #fef08a; }

.card-arena {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  color: #f8fafc;
}

.card-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 22, 34, 0.96), rgba(10, 14, 22, 0.98));
  border: 1px solid rgba(227, 184, 87, 0.34);
}

.card-top-left,
.card-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cg-title-pill,
.cg-meta-pill,
.cg-turn-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cg-title-pill {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #a7f3d0;
}
.cg-title-pill.pisti {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.48);
  color: #fecdd3;
}
.cg-title-pill.batak {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: #bae6fd;
}

.cg-meta-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}

.cg-meta-pill.gold {
  background: rgba(234, 179, 8, 0.16);
  border-color: rgba(250, 204, 21, 0.42);
  color: #fef08a;
}

.cg-meta-pill.red-suit {
  color: #fda4af;
}

.cg-turn-pill {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
}

.cg-turn-pill.is-my-turn {
  background: linear-gradient(90deg, #eab308, #10b981);
  color: #09110d;
  border-color: #fef08a;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.45);
}

.cg-cam-group {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.cg-cam-btn {
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 700;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  cursor: pointer;
}

.cg-cam-btn.active {
  background: #eab308;
  color: #141008;
}

.cg-seats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 6px;
}

.cg-seat-chip {
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cg-seat-chip.is-me {
  border-color: rgba(56, 189, 248, 0.45);
}

.cg-seat-chip.is-turn {
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.45);
}

.cg-seat-chip.is-donor {
  border-color: #10b981;
  background: rgba(6, 78, 59, 0.42);
}

.cg-seat-chip.is-loser {
  border-color: #ef4444;
  background: rgba(127, 29, 29, 0.45);
}

.cg-seat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 12.5px;
}

.cg-seat-chip small,
.cg-seat-empty {
  font-size: 11px;
  color: #cbd5e1;
}

.cg-react-pop {
  font-size: 14px;
}

.cg-stage-wrap {
  position: relative;
  height: clamp(240px, 38dvh, 390px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(227, 184, 87, 0.36);
  background: #081110;
}

.cg-canvas-3d,
.cg-canvas-2d {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.cg-stage-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cg-action-banner {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.84);
  border: 1px solid rgba(250, 204, 21, 0.32);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cg-last-trick-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 16, 30, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  font-size: 11px;
  font-weight: 700;
}

.cg-pisti-flash,
.cg-result-banner {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 15px;
  white-space: nowrap;
  background: linear-gradient(90deg, #b91c1c, #d97706);
  border: 2px solid #fef08a;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
}

.cg-pisti-flash.vale {
  background: linear-gradient(90deg, #9333ea, #f59e0b);
}

.cg-summary-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: min(440px, calc(100% - 24px));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(9, 13, 22, 0.94);
  border: 2px solid #facc15;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cg-sum-title {
  font-size: 14.5px;
  font-weight: 900;
  color: #fef08a;
  text-align: center;
  margin-bottom: 2px;
}

.cg-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.cg-controls-dock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 22, 34, 0.96), rgba(9, 13, 22, 0.98));
  border: 1px solid rgba(227, 184, 87, 0.34);
}

.cg-lobby-controls,
.cg-finish-controls,
.cg-bid-bar,
.cg-trump-bar,
.cg-donor-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(250, 204, 21, 0.28);
}

.cg-donor-slots,
.cg-bid-choices,
.cg-trump-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cg-donor-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 54px;
  border-radius: 8px;
  border: 1.5px solid #34d399;
  background: linear-gradient(160deg, #065f46, #064e3b);
  color: #fef08a;
  font-weight: 800;
  cursor: pointer;
}

.cg-donor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.45);
}

.cg-donor-card small {
  font-size: 9.5px;
  color: #d1fae5;
}

.cg-bid-label,
.cg-donor-prompt {
  font-size: 12.5px;
  font-weight: 800;
  color: #fef08a;
}

.cg-bid-btn,
.cg-trump-btn {
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.cg-bid-btn:hover,
.cg-trump-btn:hover {
  background: #eab308;
  color: #141008;
  border-color: #fef08a;
}

.cg-bid-btn.pass {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}

.cg-trump-btn.red {
  color: #fda4af;
}

.cg-hand-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.cg-hand-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cg-hint-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.4);
  color: #fef08a;
  font-size: 11.5px;
  font-weight: 800;
}

.cg-react-row {
  display: flex;
  gap: 4px;
}

.cg-react-btn {
  height: 28px;
  width: 30px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 14px;
}

.cg-hand-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-end;
}

.cg-hand-card {
  position: relative;
  width: 56px;
  height: 78px;
  padding: 0;
  border-radius: 9px;
  border: 1.5px solid #d6ccb4;
  background: linear-gradient(180deg, #fffdf6, #f2ead7);
  color: #151a18;
  opacity: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: Georgia, serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.cg-hand-card:disabled:not(.locked) {
  opacity: 0.94;
  cursor: default;
}

.cg-hand-card.compact {
  width: 48px;
  height: 68px;
}

.cg-hand-card.playable {
  cursor: pointer;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.45), 0 6px 14px rgba(0, 0, 0, 0.45);
}

.cg-hand-card.playable:hover {
  transform: translateY(-6px);
}

.cg-hand-card.locked {
  opacity: 0.44;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.cg-hand-card.is-black-king {
  background: linear-gradient(180deg, #1b1121, #0b0810);
  border-color: #f59e0b;
}

.cg-hand-card.is-black-king .cg-card-rank {
  color: #fde047;
}

.cg-hand-card.pisti-hint {
  border-color: #facc15;
  box-shadow: 0 0 0 2.5px #facc15, 0 8px 18px rgba(250, 204, 21, 0.45);
}

.cg-card-rank {
  font-size: 19px;
  font-weight: 900;
  color: #151a18;
  line-height: 1;
}

.cg-hand-card.compact .cg-card-rank {
  font-size: 16px;
}

.cg-card-suit {
  font-size: 19px;
  line-height: 1;
}

.cg-card-suit.red { color: #c41e2e; }
.cg-card-suit.blk { color: #151a18; }
.cg-card-suit.kp { color: #ef4444; }

.cg-card-badge {
  position: absolute;
  top: -7px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #10b981;
  color: #032217;
  font-family: system-ui, sans-serif;
  font-size: 8.5px;
  font-weight: 900;
  white-space: nowrap;
}

.cg-card-badge.gold {
  background: #facc15;
  color: #141008;
}

.cg-card-badge.trump {
  background: #0ea5e9;
  color: #fff;
}

@media (max-width: 960px) {
  body.in-card-game main {
    padding-bottom: 58px !important;
  }

  .card-topbar {
    padding: 6px 8px;
    gap: 5px;
  }

  .cg-title-pill,
  .cg-meta-pill,
  .cg-turn-pill {
    font-size: 11px;
    padding: 3px 8px;
  }

  .cg-stage-wrap {
    height: clamp(200px, 31dvh, 270px);
  }

  .cg-seats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .cg-seat-chip {
    padding: 5px 8px;
  }

  .cg-hand-card {
    width: 48px;
    height: 68px;
  }

  .cg-hand-card.compact {
    width: 42px;
    height: 60px;
  }

  .cg-card-rank,
  .cg-card-suit {
    font-size: 15px;
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  body.in-card-game .topbar {
    display: none !important;
  }

  body.in-card-game main {
    padding: 4px 8px 8px !important;
  }

  .cg-stage-wrap {
    height: clamp(175px, 46dvh, 235px) !important;
  }
}

/* ================= BLÖF 3D (LIAR'S BAR) ================= */
.game-card-blof {
  background: linear-gradient(155deg, rgba(58, 16, 18, 0.42), rgba(20, 12, 10, 0.85));
  border-color: rgba(217, 119, 6, 0.42) !important;
}

.blof-live-tag {
  background: rgba(220, 38, 38, 0.22) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
}

.blof-card-emblem,
.blof-lobby-avatar {
  font-size: 20px;
}

.blof-lobby-avatar {
  background: linear-gradient(135deg, #7f1d1d, #b45309) !important;
  color: #fef3c7 !important;
}

.active-blof {
  display: grid;
  gap: 8px;
}

.blof-arena {
  display: grid;
  gap: 8px;
  background: radial-gradient(circle at top, #1f120e 0%, #0d0705 100%);
  border: 1px solid rgba(212, 164, 74, 0.25);
  border-radius: 16px;
  padding: 10px;
  color: #faf5ea;
}

.blof-arena .button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f3e8d8;
  border: 1px solid rgba(212, 164, 74, 0.34);
}

.blof-arena .button.secondary:hover:not(:disabled) {
  background: rgba(212, 164, 74, 0.2);
  border-color: #fbbf24;
}

.blof-arena .button.danger-soft {
  background: rgba(153, 27, 27, 0.28);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.blof-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.blof-top-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.blof-badge-main {
  font-weight: 900;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #991b1b, #d97706);
  color: #fff7ed;
}

.blof-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e7dccb;
}

.blof-tabletype-pill {
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(28, 16, 12, 0.92);
  border: 1.5px solid rgba(212, 164, 74, 0.55);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 0 18px rgba(217, 119, 6, 0.22);
}

.blof-tt-lbl {
  color: #cbb697;
  font-weight: 600;
  margin-right: 4px;
}

.blof-stage-wrap {
  position: relative;
  width: 100%;
  height: clamp(340px, 52dvh, 490px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(212, 164, 74, 0.28);
  background: #0b0604;
}

.blof-arena.has-overlay .blof-stage-wrap {
  height: auto;
  min-height: clamp(430px, 72dvh, 620px);
}

.blof-canvas3d,
.blof-canvas2d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.blof-stage-timer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 6;
  pointer-events: none;
}

.blof-stage-timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  transition: width 0.2s linear;
}

.blof-stage-timer-fill.hot {
  background: linear-gradient(90deg, #dc2626, #f87171);
}

.blof-stage-hud-top {
  position: absolute;
  top: 9px;
  left: 9px;
  right: 9px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 4;
}

.blof-timer-pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(18, 12, 10, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.blof-timer-pill.hot {
  background: rgba(153, 27, 27, 0.94);
  border-color: #fca5a5;
  color: #fff;
  animation: blofPulse 0.7s ease-in-out infinite alternate;
}

.blof-turn-tag {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(18, 12, 10, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 800;
}

.blof-turn-tag.mine {
  background: rgba(180, 83, 9, 0.92);
  border-color: #fbbf24;
  color: #fffbeb;
}

.blof-turn-tag.danger {
  background: rgba(153, 27, 27, 0.94);
  border-color: #f87171;
  color: #fff;
  animation: blofPulse 0.85s ease-in-out infinite alternate;
}

.blof-last-msg {
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(12, 8, 6, 0.78);
  font-size: 12px;
  color: #f3e8d8;
}

.blof-reveal-strip {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 9, 8, 0.92);
  border: 1.5px solid #f59e0b;
  border-radius: 14px;
  padding: 8px 14px;
  display: grid;
  gap: 6px;
  text-align: center;
  z-index: 6;
  max-width: 92%;
}

.blof-rev-title {
  font-weight: 900;
  font-size: 13px;
  color: #fde68a;
}

.blof-rev-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.blof-rev-chip {
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
}

.blof-rev-chip.truth { background: #065f46; color: #d1fae5; border: 1px solid #34d399; }
.blof-rev-chip.lie { background: #7f1d1d; color: #fee2e2; border: 1px solid #f87171; }
.blof-rev-chip.devil { background: #4c0519; color: #fecdd3; border: 1px solid #fb7185; }

.blof-shot-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 22px;
  border-radius: 16px;
  font-weight: 900;
  font-size: clamp(18px, 3vw, 26px);
  z-index: 7;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.blof-shot-overlay.danger {
  background: rgba(153, 27, 27, 0.94);
  border: 2px solid #fca5a5;
  color: #fff;
}

.blof-shot-overlay.safe {
  background: rgba(6, 95, 70, 0.92);
  border: 2px solid #6ee7b7;
  color: #ecfdf5;
}

.blof-lobby-overlay {
  position: relative;
  min-height: inherit;
  background: rgba(10, 6, 5, 0.84);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 12px;
  z-index: 10;
}

.blof-char-head {
  display: flex;
  align-items: center;
  gap: 5px;
}

.blof-char-emblem {
  font-size: 15px;
  line-height: 1;
}

.blof-lobby-card {
  width: min(720px, 100%);
  background: linear-gradient(165deg, #21130e, #120b09);
  border: 1.5px solid rgba(212, 164, 74, 0.45);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

.blof-lobby-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.blof-lobby-head h2 {
  margin: 0;
  font-size: 16px;
  color: #fde68a;
}

.blof-countdown-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.35), rgba(220, 38, 38, 0.35));
  border: 1.5px solid #fbbf24;
  font-weight: 900;
  color: #fffbeb;
}

.blof-countdown-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f59e0b;
  color: #1a0d05;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.blof-lobby-seats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.blof-lobby-seat {
  padding: 7px 9px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  gap: 2px;
  font-size: 11.5px;
}

.blof-lobby-seat.empty {
  opacity: 0.55;
  text-align: center;
}

.blof-lobby-seat.me {
  box-shadow: 0 0 0 1.5px rgba(251, 191, 36, 0.45);
}

.blof-lseat-top {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  align-items: center;
}

.blof-ready-dot {
  font-size: 10.5px;
  color: #cbb697;
}

.blof-ready-dot.ok {
  color: #4ade80;
  font-weight: 800;
}

.blof-char-grid-title {
  font-size: 12px;
  font-weight: 700;
  color: #e2cfb3;
}

.blof-char-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.blof-char-card {
  text-align: left;
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #faf5ea;
  cursor: pointer;
  display: grid;
  gap: 3px;
  transition: transform 0.14s, border-color 0.14s, background 0.14s;
}

.blof-char-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--char-accent);
  background: rgba(255, 255, 255, 0.1);
}

.blof-char-card.active {
  border-color: var(--char-accent);
  background: color-mix(in srgb, var(--char-accent) 22%, #190e0a);
  box-shadow: 0 0 16px color-mix(in srgb, var(--char-accent) 30%, transparent);
}

.blof-char-card.taken {
  opacity: 0.45;
  cursor: not-allowed;
}

.blof-char-name {
  font-weight: 900;
  font-size: 13px;
  color: var(--char-accent);
}

.blof-char-sub {
  font-size: 10.5px;
  font-weight: 700;
  color: #f3e4cd;
}

.blof-char-tag {
  font-size: 10px;
  color: #bfa98e;
  line-height: 1.25;
}

.blof-char-status {
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 800;
  color: #fde68a;
}

.blof-lobby-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.blof-ready-btn {
  font-weight: 900;
  padding-inline: 18px;
}

.blof-lobby-hint {
  margin: 0;
  font-size: 11px;
  color: #bfa98e;
  text-align: center;
}

.blof-seats-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.blof-seat-chip {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 2px;
}

.blof-seat-chip.turn {
  border-color: #f59e0b;
  background: rgba(180, 83, 9, 0.25);
}

.blof-seat-chip.roulette {
  border-color: #ef4444;
  background: rgba(153, 27, 27, 0.35);
}

.blof-seat-chip.eliminated {
  opacity: 0.45;
  text-decoration: line-through;
}

.blof-schip-top,
.blof-schip-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  gap: 4px;
}

.blof-schip-sub {
  color: #d6c3a5;
  font-size: 11px;
}

.blof-schip-char {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blof-cyl-dots {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.blof-cyl-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(212, 164, 74, 0.35);
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.blof-cyl-dot.spent {
  background: #f59e0b;
  border-color: #fde68a;
}

.blof-cyl-dot.lethal {
  background: #ef4444;
  border-color: #fca5a5;
  box-shadow: 0 0 6px #ef4444;
}

.blof-odds-pill {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  font-size: 10.5px;
}

.blof-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(212, 164, 74, 0.25);
}

.blof-hand-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 2px;
  min-height: 92px;
}

.blof-hand-card {
  position: relative;
  width: 68px;
  height: 96px;
  border-radius: 11px;
  border: 2px solid #a8824c;
  background: linear-gradient(170deg, #f8efe0, #dfd0b1);
  color: #1e130c;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 5px 4px 7px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
  transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s;
  flex-shrink: 0;
}

.blof-hand-card.truth {
  border-color: rgba(16, 185, 129, 0.78);
}

.blof-hand-card.joker {
  background: linear-gradient(170deg, #0c3b2c, #072219);
  border-color: #34d399;
  color: #ecfdf5;
}

.blof-hand-card.devil {
  background: linear-gradient(170deg, #520916, #240409);
  border-color: #ef4444;
  color: #fee2e2;
}

.blof-hand-card.selected {
  transform: translateY(-9px);
  box-shadow: 0 0 0 3px #fbbf24, 0 10px 18px rgba(0, 0, 0, 0.55);
}

.blof-hand-card:disabled {
  opacity: 0.68;
  cursor: default;
}

.blof-hc-rank {
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
}

.blof-hc-title {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.blof-hc-tag {
  padding: 1.5px 6px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.blof-hc-tag.truth { background: #10b981; color: #022c22; }
.blof-hc-tag.bluff { background: #f59e0b; color: #1c1003; }
.blof-hc-tag.devil { background: #ef4444; color: #fff; }

.blof-actions-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.blof-liar-btn,
.blof-trigger-btn {
  background: linear-gradient(135deg, #dc2626, #991b1b) !important;
  color: #fff !important;
  border: 1.5px solid #fca5a5 !important;
  font-weight: 900 !important;
}

.blof-trigger-btn {
  animation: blofPulse 0.75s ease-in-out infinite alternate;
  padding: 10px 20px !important;
  font-size: 15px !important;
}

.blof-finish-card {
  width: min(460px, 100%);
  text-align: center;
}

.blof-winner-name {
  font-size: 24px;
  font-weight: 900;
}

.blof-fin-list {
  display: grid;
  gap: 6px;
}

.blof-fin-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
}

.blof-fin-row.winner {
  border: 1px solid #f59e0b;
  background: rgba(180, 83, 9, 0.25);
}

@keyframes blofPulse {
  from { box-shadow: 0 0 8px rgba(239, 68, 68, 0.45); }
  to { box-shadow: 0 0 24px rgba(252, 165, 165, 0.85); }
}

@media (max-width: 820px) {
  body.in-card-game .games-head,
  body.in-card-game .lobby-toolbar,
  body.in-card-game .game-hub {
    margin-bottom: 4px;
  }
  .blof-arena {
    padding: 7px;
    gap: 6px;
    border-radius: 13px;
  }
  .blof-topbar {
    gap: 5px;
  }
  .blof-top-left {
    flex: 1 1 auto;
  }
  .blof-mode-pill {
    display: none;
  }
  .blof-tabletype-pill {
    padding: 4px 10px;
    font-size: 12px;
  }
  .blof-top-right {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 4px;
  }
  .blof-top-right .blof-pill {
    white-space: nowrap;
    padding: 3px 7px;
    font-size: 10.5px;
  }
  .blof-topbar .button.compact {
    padding: 5px 8px;
    font-size: 11px;
    min-height: 30px;
    white-space: nowrap;
  }
  .blof-hide-xs {
    display: none;
  }
  .blof-lobby-card {
    padding: 11px 12px;
    gap: 8px;
  }
  .blof-lobby-head h2 {
    font-size: 14.5px;
  }
  .blof-lobby-seats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .blof-char-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .blof-char-card {
    padding: 7px 8px;
  }
  .blof-arena.has-overlay .blof-stage-wrap {
    min-height: clamp(460px, 74dvh, 660px);
  }
  .blof-stage-wrap {
    height: clamp(275px, 43dvh, 390px);
  }
  .blof-stage-hud-top {
    top: 7px;
    left: 7px;
    right: 7px;
    gap: 4px;
  }
  .blof-turn-tag {
    font-size: 11px;
    padding: 3px 9px;
  }
  .blof-last-msg {
    font-size: 11px;
    padding: 3px 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .blof-reveal-strip {
    bottom: 8px;
    padding: 6px 10px;
    max-width: 95%;
  }
  .blof-rev-title {
    font-size: 11.5px;
  }
  .blof-shot-overlay {
    width: max-content;
    max-width: 90%;
    text-align: center;
    font-size: clamp(14px, 4.2vw, 19px);
    padding: 9px 14px;
  }
  .blof-seats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .blof-seat-chip {
    padding: 5px 8px;
  }
  .blof-cyl-dots {
    display: none;
  }
  .blof-controls-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 7px 8px 8px;
    gap: 8px;
  }
  .blof-hand-wrap {
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 86px;
    padding: 10px 4px 2px;
    gap: 6px;
  }
  .blof-hand-card {
    width: 56px;
    height: 78px;
    padding: 4px 3px 6px;
  }
  .blof-hc-rank {
    font-size: 22px;
  }
  .blof-hc-title {
    font-size: 8.5px;
  }
  .blof-actions-wrap {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 7px;
    width: 100%;
  }
  .blof-actions-wrap .button {
    min-height: 44px;
    font-size: 13.5px;
    justify-content: center;
    width: 100%;
  }
  .blof-trigger-btn {
    grid-column: 1 / -1;
    min-height: 48px !important;
  }
}

@media (max-width: 420px) {
  .blof-stage-wrap {
    height: clamp(255px, 40dvh, 340px);
  }
  .blof-hand-card {
    width: 52px;
    height: 74px;
  }
  .blof-hc-rank {
    font-size: 20px;
  }
}

