.portal-page {
  --bg-1: #efe4d3;
  --bg-2: #c6d8d3;
  --panel: rgba(255, 251, 245, 0.88);
  --ink: #142126;
  --accent: #0e6b61;
  --accent-2: #d17c36;
  --line: rgba(20, 33, 38, 0.12);
  --shadow: 0 18px 45px rgba(20, 33, 38, 0.18);
}

.portal-page,
.table-room-page,
.game-room-page {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
}

.portal-page * ,
.table-room-page *,
.game-room-page * {
  box-sizing: border-box;
}

.portal-page {
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.65), transparent 35%),
    radial-gradient(circle at bottom right, rgba(209,124,54,0.24), transparent 28%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  display: grid;
  place-items: center;
  padding: 24px;
}

.portal-page .shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.portal-page .hero,
.portal-page .panel {
  border-radius: 28px;
  padding: 32px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
}

.portal-page .hero {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.portal-page .hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(14,107,97,0.18), transparent 70%);
  transform: rotate(12deg);
}

.portal-page .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: rgba(20,33,38,0.62);
}

.portal-page h1 {
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.94;
  margin: 18px 0 16px;
  font-weight: 700;
}

.portal-page .lead {
  max-width: 32rem;
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
}

.portal-page .tiles {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.portal-page .tile {
  width: 74px;
  height: 132px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fefcf8, #efe7d8);
  border: 1px solid rgba(20,33,38,0.12);
  box-shadow: 0 14px 22px rgba(20,33,38,0.12);
  display: grid;
  place-items: center;
  font-size: 28px;
}

.portal-page .panel h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 30px;
}

.portal-page .muted {
  color: rgba(20,33,38,0.72);
  line-height: 1.5;
  margin-bottom: 22px;
}

.portal-page .stack,
.portal-page .lobby {
  display: grid;
  gap: 14px;
}

.portal-page label {
  font-size: 14px;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.portal-page select,
.portal-page input,
.portal-page button,
.table-room-page button,
.game-room-page button {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(20,33,38,0.15);
  font: inherit;
}

.portal-page select,
.portal-page input {
  background: rgba(255,255,255,0.92);
  padding: 14px 16px;
}

.portal-page button,
.table-room-page button,
.game-room-page button {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.portal-page button:hover,
.table-room-page button:hover {
  transform: translateY(-1px);
}

.platform-primary {
  color: white;
  background: linear-gradient(135deg, #0e6b61, #159b85);
  box-shadow: 0 14px 28px rgba(14,107,97,0.26);
  border: none;
}

.platform-secondary {
  background: linear-gradient(135deg, #fff, #f6efe4);
  color: inherit;
}

.portal-page .divider {
  margin: 8px 0;
  height: 1px;
  background: var(--line);
}

.portal-page .status {
  min-height: 24px;
  font-size: 14px;
  color: rgba(20,33,38,0.78);
}

.portal-page .lobby-head,
.portal-page .table-top,
.portal-page .table-actions-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-page .table-card {
  border-radius: 20px;
  border: 1px solid rgba(20,33,38,0.12);
  background: rgba(255,255,255,0.7);
  padding: 16px;
}

.portal-page .table-top {
  margin-bottom: 12px;
}

.portal-page .table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.portal-page .seat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.portal-page .seat {
  border-radius: 14px;
  padding: 12px;
  background: rgba(20,33,38,0.04);
  border: 1px solid rgba(20,33,38,0.08);
  display: grid;
  gap: 8px;
}

.portal-page .seat strong {
  font-size: 14px;
}

.portal-page .seat button {
  padding: 10px 12px;
}

.portal-page .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(209,124,54,0.12);
  color: #8a4a17;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.portal-page .me {
  display: none;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(14,107,97,0.08);
  border: 1px solid rgba(14,107,97,0.16);
}

.portal-page .section-title {
  margin: 0;
}

.table-room-page {
  --bg: #f1eadf;
  --board: #1e6b5f;
  --board-2: #11473f;
  --panel: rgba(255,255,255,0.82);
  --ink: #152126;
  --line: rgba(21,33,38,0.12);
  --accent: #d57d36;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.7), transparent 30%),
    linear-gradient(135deg, #efe5d5, #d8e4de);
  padding: 18px;
}

.table-room-page .layout {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.table-room-page .board-shell,
.table-room-page .side {
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 46px rgba(21,33,38,0.16);
  overflow: hidden;
}

.table-room-page .board-shell { padding: 20px; }

.table-room-page .board-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.table-room-page .board-top h1,
.game-room-page .topbar h1 {
  margin: 0;
  font-size: 32px;
}

.table-room-page .meta,
.game-room-page .meta {
  color: rgba(21,33,38,0.72);
  font-size: 14px;
}

.table-room-page .board {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.12), transparent 24%),
    linear-gradient(160deg, var(--board), var(--board-2));
  min-height: 680px;
  border-radius: 24px;
  padding: 24px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  grid-template-rows: 1fr 1.1fr 1fr;
  gap: 16px;
  color: white;
}

.table-room-page .seat-card {
  border-radius: 22px;
  padding: 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
  display: grid;
  gap: 8px;
  align-content: start;
}

.table-room-page .seat-card.mine {
  background: rgba(213,125,54,0.18);
  border-color: rgba(255,255,255,0.32);
}

.table-room-page .seat-card .tag {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.78;
}

.table-room-page .seat-card .name {
  font-size: 24px;
  font-weight: 700;
}

.table-room-page .seat-card .small {
  font-size: 14px;
  opacity: 0.88;
}

.table-room-page .center-zone {
  grid-column: 2;
  grid-row: 2;
  border-radius: 28px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
}

.table-room-page .board-track {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.table-room-page .center-zone .big {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 10px;
}

.table-room-page .north { grid-column: 2; grid-row: 1; }
.table-room-page .west { grid-column: 1; grid-row: 2; }
.table-room-page .east { grid-column: 3; grid-row: 2; }
.table-room-page .south { grid-column: 2; grid-row: 3; }

.table-room-page .side {
  padding: 22px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.table-room-page .side h2 {
  margin: 0;
  font-size: 28px;
}

.table-room-page .action-grid,
.table-room-page .score,
.table-room-page .hand-strip {
  display: grid;
  gap: 12px;
}

.table-room-page .matchup-line {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  padding: 12px 14px;
  background: rgba(21,33,38,0.04);
  border-radius: 14px;
}

.table-room-page .status-box {
  border-radius: 18px;
  background: rgba(21,33,38,0.04);
  border: 1px solid var(--line);
  padding: 14px;
  line-height: 1.5;
}

.table-room-page .domino {
  width: 66px;
  height: 116px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8, #eee4d1);
  color: #18252b;
  border: 1px solid rgba(24,37,43,0.12);
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 12px 22px rgba(21,33,38,0.14);
}

.table-room-page .domino .divider {
  width: 70%;
  height: 1px;
  background: rgba(24,37,43,0.18);
  margin: 0;
}

.table-room-page .score-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(21,33,38,0.04);
  border-radius: 12px;
}

.table-room-page .note,
.table-room-page .section-title {
  margin: 0;
}

.table-room-page .note {
  color: rgba(21,33,38,0.72);
}

.game-room-page {
  --felt-1: #1f6c60;
  --felt-2: #124740;
  --panel: rgba(255, 251, 244, 0.9);
  --ink: #172329;
  --line: rgba(23, 35, 41, 0.12);
  --accent: #d67d36;
  --shadow: 0 18px 40px rgba(23, 35, 41, 0.18);
  color: var(--ink);
  background: linear-gradient(135deg,#efe6d8,#dbe5e0);
  padding: 18px;
}

.game-room-page .layout {
  width: min(1800px, 100%);
  margin: 0 auto;
}

.game-room-page .stage {
  background: var(--panel);
  border-radius: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
  padding: 18px;
}

.game-room-page .topbar {
  display: grid;
  margin-bottom: 14px;
  gap: 12px;
}

.game-room-page .topbar-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 16px;
}

.game-room-page .topbar-title {
  min-width: 0;
}

.game-room-page .topbar-status {
  display: flex;
  justify-content: center;
  width: 100%;
}

.game-room-page .actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  width: auto;
  justify-self: end;
}

.game-room-page .actions .platform-secondary {
  width: auto;
  min-width: 0;
  padding: 10px 16px;
  flex: 0 0 auto;
}

.game-room-page #turn-box {
  width: min(100%, 560px);
}

.game-room-page .name {
  font-size: 24px;
  font-weight: 700;
}

.game-room-page .seat-wide {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 100%;
}

.game-room-page .seat-wide .name { margin: 0; }
.game-room-page .seat-wide .name-wrap { display: grid; align-content: start; justify-items: start; }
.game-room-page .seat-wide .tray { width: 100%; display: flex; justify-content: center; align-items: center; min-height: 86px; }

.game-room-page .board-track {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.game-room-page .end-target {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid rgba(214,125,54,0.96);
  background: rgba(255,255,255,0.2);
  box-shadow: 0 0 0 8px rgba(214,125,54,0.18);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.game-room-page .final-box {
  display: grid;
  gap: 10px;
  place-items: center;
  align-content: center;
  min-height: 320px;
  text-align: center;
  color: white;
}

.game-room-page .final-box .winner {
  font-size: 42px;
  font-weight: 700;
}

.game-room-page .game-center-subtitle {
  color: rgba(255,255,255,0.82);
}

@media (max-width: 980px) {
  .table-room-page .layout {
    grid-template-columns: 1fr;
  }

  .table-room-page .board {
    min-height: 560px;
  }
}

@media (max-width: 900px) {
  .portal-page .shell {
    grid-template-columns: 1fr;
  }
}

.game-room-page .center-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
}

.game-room-page .seat-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.78);
}

.game-room-page .revealed-tiles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.game-room-page .revealed-tiles.vertical {
  flex-direction: column;
}

.game-room-page .tile-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.16);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.game-room-page .summary-card {
  width: min(420px, 100%);
  border-radius: 24px;
  padding: 22px;
  text-align: center;
  color: white;
  background: rgba(16, 34, 31, 0.82);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 16px 30px rgba(9, 18, 17, 0.28);
}

.game-room-page .summary-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.72);
}

.game-room-page .summary-title {
  margin-top: 10px;
  font-size: 32px;
  font-weight: 700;
}

.game-room-page .summary-copy {
  margin-top: 10px;
  font-size: 15px;
  color: rgba(255,255,255,0.9);
}

.portal-page .portal-hero-simple {
  min-height: 520px;
}

.lobby-page {
  --bg-1: #efe4d3;
  --bg-2: #c6d8d3;
  --panel: rgba(255, 251, 245, 0.9);
  --ink: #142126;
  --line: rgba(20, 33, 38, 0.12);
  --shadow: 0 18px 45px rgba(20, 33, 38, 0.18);
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.65), transparent 35%),
    radial-gradient(circle at bottom right, rgba(209,124,54,0.24), transparent 28%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  padding: 24px;
}

.lobby-page * {
  box-sizing: border-box;
}

.lobby-shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.lobby-header-card,
.lobby-board-card {
  border-radius: 28px;
  padding: 28px 32px;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.lobby-header-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.lobby-header-card h1,
.lobby-board-title {
  margin: 0;
}

.lobby-header-card h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.95;
}

.lobby-toolbar {
  display: grid;
  gap: 14px;
  justify-items: end;
}

.lobby-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lobby-actions button {
  width: auto;
  min-width: 180px;
}

.lobby-top-button {
  width: auto;
  min-width: 0;
  padding: 10px 16px;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(20,33,38,0.15);
  box-shadow: none;
}

.lobby-me {
  display: block;
  margin: 0;
  min-width: 260px;
}

.lobby-board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.lobby-board-title {
  font-size: 30px;
}

.lobby-table-list {
  display: grid;
  gap: 14px;
}

.lobby-table-row {
  display: grid;
  grid-template-columns: 130px 1fr 84px 1fr 120px;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(20,33,38,0.1);
}

.lobby-table-number {
  font-size: 28px;
  font-weight: 700;
}

.lobby-team-column {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.lobby-team-title,
.lobby-versus {
  font-weight: 700;
}

.lobby-team-title {
  text-align: center;
  font-size: 28px;
}

.lobby-versus {
  text-align: center;
  font-size: 28px;
  color: #8a4a17;
}

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

.lobby-seat-slot {
  display: grid;
  gap: 6px;
}

.lobby-seat-button {
  width: 100%;
  min-height: 68px;
  border-radius: 18px;
  border: 1px solid rgba(20,33,38,0.12);
  background: linear-gradient(135deg, #fff, #f6efe4);
  font: inherit;
  font-weight: 700;
  padding: 12px 14px;
  cursor: pointer;
}

.lobby-seat-button.mine {
  background: linear-gradient(135deg, #fff7ea, #f1dfbf);
  border-color: rgba(138,74,23,0.28);
}

.lobby-seat-button.occupied {
  cursor: default;
  opacity: 1;
  background: linear-gradient(135deg, #f0eee9, #e3ddd0);
  color: rgba(20,33,38,0.72);
  border-color: rgba(20,33,38,0.1);
  box-shadow: none;
}

.lobby-seat-position {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(24, 33, 31, 0.58);
}

.lobby-table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.lobby-table-actions button {
  width: 100%;
}

.lobby-table-actions .reset-table {
  width: 54px;
  min-width: 54px;
  padding: 10px;
  font-size: 20px;
  line-height: 1;
}

.lobby-empty-state {
  border-radius: 22px;
  border: 1px solid rgba(20,33,38,0.1);
  background: rgba(255,255,255,0.72);
  padding: 28px;
  text-align: center;
  font-size: 18px;
}

@media (max-width: 1180px) {
  .lobby-header-card {
    grid-template-columns: 1fr;
  }

  .lobby-toolbar {
    justify-items: stretch;
  }

  .lobby-actions {
    justify-content: stretch;
  }

  .lobby-actions button {
    width: 100%;
  }

  .lobby-me {
    min-width: 0;
  }

  .lobby-table-row {
    grid-template-columns: 1fr;
  }

  .lobby-versus,
  .lobby-table-actions {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .lobby-team-seats {
    grid-template-columns: 1fr;
  }
}

/* Visual refresh: atmosfera de club de domino */

.portal-page,
.lobby-page,
.table-room-page,
.game-room-page {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

.portal-page {
  --bg-1: #e9ddc8;
  --bg-2: #8fa89b;
  --panel: rgba(255, 248, 239, 0.82);
  --ink: #18211f;
  --line: rgba(24, 33, 31, 0.1);
  --shadow: 0 28px 60px rgba(24, 33, 31, 0.18);
  background:
    radial-gradient(circle at 14% 18%, rgba(255,255,255,0.76), transparent 26%),
    radial-gradient(circle at 82% 22%, rgba(14, 58, 53, 0.12), transparent 18%),
    radial-gradient(circle at 78% 78%, rgba(191, 118, 52, 0.2), transparent 22%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

.portal-page .hero,
.portal-page .panel,
.lobby-header-card,
.lobby-board-card,
.table-room-page .board-shell,
.table-room-page .side,
.game-room-page .stage {
  position: relative;
  overflow: hidden;
}

.portal-page .hero::before,
.lobby-header-card::before,
.lobby-board-card::before,
.game-room-page .stage::before,
.table-room-page .board-shell::before,
.table-room-page .side::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.32), transparent 40%),
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 14px,
      rgba(24, 33, 31, 0.015) 14px,
      rgba(24, 33, 31, 0.015) 15px
    );
  pointer-events: none;
}

.portal-page .hero {
  min-height: 560px;
  padding: 38px;
  background:
    radial-gradient(circle at bottom left, rgba(14, 58, 53, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.22), transparent 45%),
    var(--panel);
}

.portal-page .hero-copy,
.lobby-heading {
  position: relative;
  z-index: 1;
}

.portal-page .eyebrow,
.lobby-page .eyebrow,
.table-room-page .seat-card .tag,
.game-room-page .table-kicker {
  letter-spacing: 0.18em;
}

.portal-page .portal-badge,
.portal-page .panel-kicker,
.lobby-page .lobby-kicker,
.lobby-page .lobby-board-label,
.lobby-page .legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(24, 33, 31, 0.06);
  border: 1px solid rgba(24, 33, 31, 0.08);
}

.portal-page .portal-badge,
.portal-page .panel-kicker,
.lobby-page .lobby-board-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(24, 33, 31, 0.72);
}

.portal-page .panel-kicker {
  margin-bottom: 12px;
}

.portal-page .lead,
.lobby-page .lead {
  max-width: 40rem;
  color: rgba(24, 33, 31, 0.82);
}

.portal-page .portal-atmosphere {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.portal-page .portal-chip {
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(14, 58, 53, 0.08);
  border: 1px solid rgba(14, 58, 53, 0.14);
  color: #21453f;
  font-size: 14px;
  font-weight: 700;
}

.portal-page .portal-domino-fan {
  position: absolute;
  right: 34px;
  bottom: 28px;
  width: 300px;
  height: 210px;
  pointer-events: none;
}

.portal-page .portal-domino-card {
  position: absolute;
  width: 96px;
  height: 164px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fffdf8, #eadfcf);
  border: 1px solid rgba(24, 33, 31, 0.12);
  box-shadow: 0 24px 38px rgba(24, 33, 31, 0.18);
  display: grid;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  justify-items: center;
  padding: 18px 0;
  font-size: 32px;
  font-weight: 700;
  color: #18302d;
}

.portal-page .portal-domino-card::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: calc(50% - 1px);
  height: 2px;
  background: rgba(24, 33, 31, 0.16);
}

.portal-page .card-a {
  right: 126px;
  bottom: 12px;
  transform: rotate(-18deg);
}

.portal-page .card-b {
  right: 58px;
  bottom: 0;
  transform: rotate(-4deg);
}

.portal-page .card-c {
  right: 0;
  bottom: 18px;
  transform: rotate(14deg);
}

.portal-page .panel {
  padding: 34px 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28), transparent 50%),
    var(--panel);
}

.portal-page select,
.portal-page input {
  border-radius: 16px;
  border-color: rgba(24, 33, 31, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.platform-primary {
  background: linear-gradient(135deg, #0d5249, #1c7a6a);
  box-shadow: 0 16px 28px rgba(13, 82, 73, 0.24);
}

.platform-secondary {
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(245,236,223,0.94));
  border-color: rgba(24, 33, 31, 0.12);
}

.portal-page .me,
.lobby-me {
  border-radius: 20px;
  background: rgba(14, 58, 53, 0.08);
  border: 1px solid rgba(14, 58, 53, 0.12);
}

.lobby-page {
  --bg-1: #eadfc9;
  --bg-2: #9cb1a6;
  --panel: rgba(255, 249, 241, 0.84);
  --shadow: 0 26px 60px rgba(24, 33, 31, 0.16);
  background:
    radial-gradient(circle at 10% 16%, rgba(255,255,255,0.72), transparent 24%),
    radial-gradient(circle at 85% 18%, rgba(14, 58, 53, 0.12), transparent 18%),
    radial-gradient(circle at 80% 84%, rgba(191, 118, 52, 0.16), transparent 22%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

.lobby-header-card,
.lobby-board-card {
  padding: 30px 34px;
}

.lobby-page .lobby-kicker {
  margin: 10px 0 14px;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(24, 33, 31, 0.82);
}

.lobby-page .lobby-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.lobby-page .legend-pill {
  font-size: 13px;
  font-weight: 700;
  color: #21453f;
  background: rgba(14, 58, 53, 0.08);
  border-color: rgba(14, 58, 53, 0.12);
}

.lobby-page .lobby-board-head {
  margin-bottom: 22px;
}

.lobby-page .lobby-board-title {
  font-size: 34px;
  line-height: 1;
}

.lobby-page .lobby-table-row {
  position: relative;
  grid-template-columns: 150px 1fr 92px 1fr 130px;
  min-height: 132px;
  padding: 20px 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.68), rgba(245,238,227,0.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.62);
}

.lobby-page .lobby-table-row::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(24, 33, 31, 0.12), transparent);
}

.lobby-page .lobby-table-number {
  align-self: center;
  font-size: 34px;
  color: #163634;
}

.lobby-page .lobby-team-title {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(24, 33, 31, 0.58);
}

.lobby-page .lobby-versus {
  align-self: center;
  font-size: 22px;
  letter-spacing: 0.18em;
}

.lobby-page .lobby-seat-button {
  min-height: 76px;
  border-radius: 20px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.lobby-page .lobby-seat-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(24, 33, 31, 0.14);
  border-color: rgba(13, 82, 73, 0.24);
}

.lobby-page .lobby-seat-button.mine {
  background: linear-gradient(135deg, #fff8eb, #ecd7ad);
}

.lobby-page .lobby-table-actions .platform-secondary {
  min-height: 54px;
}

.table-room-page {
  --bg: #efe2cd;
  --board: #185e55;
  --board-2: #0e3f3a;
  --panel: rgba(255, 248, 240, 0.82);
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,0.76), transparent 24%),
    radial-gradient(circle at 88% 80%, rgba(191, 118, 52, 0.14), transparent 22%),
    linear-gradient(135deg, #eadfc8, #a0b2a8);
}

.table-room-page .board-shell,
.table-room-page .side {
  box-shadow: 0 26px 58px rgba(24, 33, 31, 0.14);
}

.table-room-page .board {
  min-height: 720px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.08), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.14), transparent 60%),
    linear-gradient(160deg, var(--board), var(--board-2));
  box-shadow: inset 0 0 0 14px rgba(72, 42, 18, 0.18);
}

.table-room-page .center-zone {
  background: rgba(7, 28, 26, 0.18);
}

.table-room-page .side h2,
.portal-page .panel h2 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 0.95;
}

.game-room-page {
  --felt-1: #1a5d55;
  --felt-2: #0d3531;
  --panel: rgba(255, 248, 240, 0.9);
  --shadow: 0 28px 68px rgba(24, 33, 31, 0.2);
  background:
    radial-gradient(circle at 8% 16%, rgba(255,255,255,0.72), transparent 22%),
    radial-gradient(circle at 90% 18%, rgba(14, 58, 53, 0.12), transparent 18%),
    radial-gradient(circle at 82% 88%, rgba(191, 118, 52, 0.16), transparent 20%),
    linear-gradient(135deg, #e8dcc6, #9eaea5);
}

.game-room-page .stage {
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.34), transparent 22%),
    var(--panel);
}

.game-room-page .topbar {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
  padding: 8px 6px 0;
}

.game-room-page .table-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 58, 53, 0.08);
  border: 1px solid rgba(14, 58, 53, 0.12);
  color: rgba(24, 33, 31, 0.72);
  font-size: 12px;
  text-transform: uppercase;
}

.game-room-page .topbar h1 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 0.95;
  margin-top: 12px;
}

.game-room-page .meta {
  margin-top: 8px;
  font-size: 15px;
}

.game-room-page .board {
  position: relative;
  --table-surface-image: none;
  min-height: 900px;
  border-radius: 34px;
  padding: 20px 24px 24px;
  background:
    linear-gradient(180deg, rgba(9, 18, 17, 0.24), rgba(9, 18, 17, 0.24)),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.16), transparent 66%),
    var(--table-surface-image),
    linear-gradient(160deg, var(--felt-1), var(--felt-2));
  background-size: auto, auto, auto, cover, cover;
  background-position: center, center, center, center, center;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 0 0 16px rgba(79, 47, 20, 0.22),
    inset 0 0 0 17px rgba(255,255,255,0.05);
}

.game-room-page .table-glow {
  position: absolute;
  inset: 16% 24%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
  pointer-events: none;
}

.game-room-page .seat {
  background: linear-gradient(180deg, rgba(8, 24, 22, 0.34), rgba(8, 24, 22, 0.18));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.game-room-page .seat.active {
  background: linear-gradient(180deg, rgba(212, 126, 54, 0.2), rgba(8, 24, 22, 0.2));
  border-color: rgba(255,255,255,0.22);
}

.game-room-page .name {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1;
}

.game-room-page .seat-meta {
  margin-top: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.72);
}

.game-room-page .center {
  background: rgba(8, 24, 22, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.game-room-page .board-square {
  width: min(100%, 760px);
}

.game-room-page .end-target {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.28);
}

.game-room-page .summary-card {
  background: rgba(9, 27, 25, 0.86);
  border-color: rgba(255,255,255,0.14);
}

@media (max-width: 1180px) {
  .portal-page .portal-domino-fan {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 180px;
    margin-top: 24px;
  }

  .portal-page .card-a {
    left: 10%;
    right: auto;
  }

  .portal-page .card-b {
    left: calc(50% - 48px);
    right: auto;
  }

  .portal-page .card-c {
    left: auto;
    right: 10%;
  }
}

@media (max-width: 980px) {
  .portal-page .hero,
  .portal-page .panel,
  .lobby-header-card,
  .lobby-board-card {
    padding: 26px;
  }

  .lobby-page .lobby-table-row {
    min-height: 0;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .portal-page .portal-domino-fan {
    height: 150px;
  }

  .portal-page .portal-domino-card {
    width: 82px;
    height: 138px;
    font-size: 28px;
  }
}

@media (max-width: 760px) {
  .game-room-page .board {
    min-height: 760px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto auto;
  }

  .game-room-page .north,
  .game-room-page .west,
  .game-room-page .east,
  .game-room-page .south,
  .game-room-page .center {
    grid-column: 1;
    width: 100%;
    min-height: 0;
    justify-self: stretch;
  }

  .game-room-page .north { grid-row: 1; }
  .game-room-page .west { grid-row: 2; }
  .game-room-page .center { grid-row: 3; }
  .game-room-page .east { grid-row: 4; }
  .game-room-page .south { grid-row: 5; }

  .game-room-page .seat-wide {
    grid-template-columns: 1fr;
  }

  .game-room-page .actions {
    justify-content: stretch;
  }

  .game-room-page .actions .platform-secondary {
    flex: 1 1 140px;
  }
}
