/* ===== Design Tokens — Refined Editorial & Publication Style ===== */
:root {
  /* Slate & Obsidian Dark Palette (Evening Broadside) */
  --bg: #14161a;
  --paper: #1c1f26;
  --paper-elevated: #242832;
  --paper-inset: #111216;
  --ink: #f4f1ea;
  --ink-strong: #ffffff;
  --muted: #9ba2b0;
  --muted-soft: #636b7b;
  --rule: #2a2f3a;
  --rule-strong: #444c5e;
  --accent: #e5a83b;
  --accent-warm: #db7634;
  --accent-gold: #e5a83b;
  --accent-burgundy: #a83636;
  --good: #4ba368;
  --bad: #d9534f;
  --btn-fg: #14161a;
  --btn-bg: #f4f1ea;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --radius-card: 12px;
  --radius-btn: 999px;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);
  --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.55), 0 3px 8px rgba(0, 0, 0, 0.3);

  /* Tycoon Board Deluxe Editorial Tokens */
  --ty-board-bg: #101217;
  --ty-felt: #151820;
  --ty-space-bg: #1b1e27;
  --ty-space-hover: #232733;
  --ty-gold: #e5a83b;
  --ty-gold-glow: rgba(229, 168, 59, 0.35);
  --ty-border: #2c313f;
  --ty-border-strong: #40485c;
}

/* ===== Light theme override — Archival Warm Newsprint (NYT Games Style) ===== */
:root[data-theme="light"] {
  --bg: #f7f4ee;
  --paper: #ffffff;
  --paper-elevated: #efeae0;
  --paper-inset: #e8e2d4;
  --ink: #1c1a17;
  --ink-strong: #000000;
  --muted: #6e675f;
  --muted-soft: #9c9489;
  --rule: #ded6c8;
  --rule-strong: #1c1a17;
  --accent: #1c1a17;
  --accent-warm: #b45309;
  --accent-gold: #b37415;
  --accent-burgundy: #8b2323;
  --good: #2a7a49;
  --bad: #b91c1c;
  --btn-fg: #f7f4ee;
  --btn-bg: #1c1a17;
  --card-shadow: 0 3px 14px rgba(28, 26, 23, 0.07), 0 1px 3px rgba(28, 26, 23, 0.04);
  --card-shadow-hover: 0 12px 28px rgba(28, 26, 23, 0.12), 0 3px 8px rgba(28, 26, 23, 0.06);

  --ty-board-bg: #e6dfd1;
  --ty-felt: #f0eae0;
  --ty-space-bg: #ffffff;
  --ty-space-hover: #f7f3eb;
  --ty-gold: #b37415;
  --ty-gold-glow: rgba(179, 116, 21, 0.25);
  --ty-border: #cfc6b5;
  --ty-border-strong: #3d352b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.45;
  transition: background .2s ease, color .2s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.hidden { display: none !important; }

/* ===== Masthead ===== */
.topbar {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 24px 0;
  text-align: center;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: .75rem;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.masthead-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  letter-spacing: .06em;
  font-weight: 600;
  text-transform: uppercase;
}

.edition-badge {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: .08em;
  padding: 2px 7px;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  font-size: .65rem;
}

.meta-dot {
  color: var(--muted-soft);
  opacity: .6;
}

.dateline {
  font-weight: 600;
  color: var(--muted);
}

.masthead-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  font-size: .75rem;
  opacity: .65;
  pointer-events: none;
}

#search-input {
  width: 190px;
  padding: 6px 12px 6px 30px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font: inherit;
  font-size: .8rem;
  color: var(--ink);
  background: var(--paper);
  transition: all .2s var(--ease);
}

#search-input:focus {
  outline: none;
  border-color: var(--ink);
  width: 220px;
  box-shadow: 0 0 0 3px rgba(229, 168, 59, 0.15);
}

:root[data-theme="light"] #search-input:focus {
  box-shadow: 0 0 0 3px rgba(28, 26, 23, 0.08);
}

.theme-toggle-btn {
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .18s var(--ease);
}

.theme-toggle-btn:hover {
  background: var(--paper-elevated);
  border-color: var(--rule-strong);
  transform: translateY(-1px);
}

.boss-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  font-weight: 600;
  color: var(--muted);
  cursor: help;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color .15s ease;
}

.boss-beacon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  display: inline-block;
  box-shadow: 0 0 6px var(--good);
}

.boss-hint kbd {
  font-family: var(--sans);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--ink);
  background: var(--paper);
  font-size: .72rem;
  font-weight: 700;
}

/* Masthead Classical Broadside */
.masthead-main {
  padding: 18px 0 8px;
}

.masthead-ornament-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
}

.ornament-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.ornament-rule.double {
  height: 3px;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  background: transparent;
}

.ornament-symbol {
  font-size: .7rem;
  color: var(--accent-gold);
  line-height: 1;
}

.masthead {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.2rem, 4.8vw, 3.4rem);
  letter-spacing: -.03em;
  line-height: 1.08;
  padding: 8px 0 6px;
  color: var(--ink);
  text-transform: none;
}

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(.88rem, 1.6vw, 1.02rem);
  color: var(--muted);
  letter-spacing: .01em;
  padding: 0 0 14px;
}

.bottom-bar {
  margin-top: 4px;
}

/* ===== Lobby ===== */
#lobby {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.stats-strip {
  display: flex;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 14px 20px;
  margin-bottom: 28px;
  box-shadow: var(--card-shadow);
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2px 14px;
}

.stat-label {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted-soft);
  margin-bottom: 2px;
}

.stat-val {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -.02em;
}

.stat-val.stat-val-text {
  font-size: 1.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.stat-sub {
  font-size: .7rem;
  color: var(--muted);
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 38px;
  background: var(--rule);
  opacity: .8;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 18px;
  border-bottom: 1.5px solid var(--rule-strong);
}

.section-title {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink);
}

.section-tagline {
  font-size: .75rem;
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
}

/* ===== Game Grid & Cards ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.game-card {
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .22s ease, transform .22s var(--ease), box-shadow .22s ease;
  animation: fadeUp .35s var(--ease) both;
  box-shadow: var(--card-shadow);
  position: relative;
}

.game-card:hover {
  border-color: var(--rule-strong);
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

:root[data-theme="light"] .game-card:hover {
  border-color: var(--ink);
}

.card-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-elevated);
}

.card-icon-seal {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform .25s var(--ease);
}

.card-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.game-card:hover .card-icon-seal {
  transform: scale(1.1) rotate(4deg);
}

.card-kicker {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  border: 1px solid var(--rule);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
}

.card-body {
  padding: 16px 18px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-headline-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}

.card-arrow {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent-gold);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s var(--ease);
}

.game-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.card-desc {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 14px;
  flex: 1;
}

.card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
}

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

.tag {
  font-size: .62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--paper-elevated);
  color: var(--muted);
  border: 1px solid var(--rule);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tag.tag-best {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  background: rgba(229, 168, 59, 0.08);
  font-weight: 800;
}

p.tag, div.tag, span.tag { display: inline-block; }
.tag-alert { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border-color: #f59e0b; }
.tag-bad { background: rgba(220, 53, 69, 0.15); color: #e05a4f; border-color: #e05a4f; }
.tag-jailfree { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-color: #3b82f6; }

/* Empty search state */
.lobby-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  background: var(--paper);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-card);
}

.empty-icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.lobby-empty-state h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.lobby-empty-state p {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 16px;
}

/* ===== Stage ===== */
.stage {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 24px 64px;
  animation: fadeUp .25s var(--ease) both;
  transition: max-width .2s var(--ease);
}

.stage.stage-wide,
.stage:has(.ty-layout) {
  max-width: 1420px;
  width: 96vw;
  padding: 12px 16px 64px;
}

.stage-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--rule-strong);
}

.stage-bar h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}

.stage-back-btn {
  font-weight: 700;
  letter-spacing: .02em;
}

.stage-status {
  color: var(--muted);
  margin-left: auto;
  font-size: .85rem;
  font-weight: 600;
  background: var(--paper-elevated);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--rule);
}

.stage-restart-btn {
  background: var(--paper-elevated);
  color: var(--ink);
  border: 1px solid var(--rule);
}

.stage-restart-btn:hover {
  border-color: var(--ink);
}

.game-root {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* ===== In-Game Instructions Accordion ===== */
.game-instructions {
  width: 100%;
  max-width: 460px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 12px 16px;
  line-height: 1.5;
  box-sizing: border-box;
  box-shadow: var(--card-shadow);
}

.game-instructions summary {
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-family: var(--serif);
  font-size: .95rem;
  color: var(--ink);
  outline: none;
  transition: color .15s ease;
}

.game-instructions summary:hover {
  color: var(--accent-gold);
}

.game-instructions .instructions-content {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  border-top: 1px dashed var(--rule);
  padding-top: 10px;
}

.game-instructions p {
  margin: 0;
}

/* ===== Buttons ===== */
.btn {
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bg);
  padding: 7px 18px;
  border-radius: 999px;
  transition: all .15s var(--ease);
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

:root[data-theme="light"] .btn:hover {
  box-shadow: 0 3px 10px rgba(28, 26, 23, 0.15);
}

.btn:active {
  transform: scale(.97);
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn.ghost {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
}

.btn.ghost:hover {
  background: var(--paper-elevated);
  border-color: var(--rule-strong);
}

.btn.alt {
  background: var(--good);
  border-color: var(--good);
  color: #fff;
}

.btn.small-btn {
  padding: 4px 10px;
  font-size: .74rem;
}

.banner {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  padding: 10px 20px;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  animation: pop .35s var(--ease);
}

/* ===== Shared keyframes ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@keyframes bounce { 40% { transform: translateY(-6px); } 70% { transform: translateY(1px); } }

/* ===== Uno ===== */
.uno-arena {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  user-select: none;
}

/* Arena Top Row (North seats) */
.uno-top-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  min-height: 84px;
}

/* Arena Middle Row: West Seat, Felt Table, East Seat */
.uno-middle-row {
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  gap: 14px;
  align-items: center;
}

@media (max-width: 768px) {
  .uno-middle-row {
    grid-template-columns: 90px 1fr 90px;
    gap: 8px;
  }
}

.uno-side-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Felt Gaming Table */
.uno-felt-table {
  background: radial-gradient(ellipse at center, var(--paper-elevated) 0%, var(--ty-felt, #151922) 100%);
  border: 2px solid var(--rule-strong);
  border-radius: 36px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.25);
  position: relative;
  min-height: 240px;
  justify-content: center;
  overflow: hidden;
}

:root[data-theme="light"] .uno-felt-table {
  background: radial-gradient(ellipse at center, #ffffff 0%, #ebe5d8 100%);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.06), 0 6px 20px rgba(0,0,0,0.08);
}

/* Table Orbit Direction Glow */
.uno-orbit-ring {
  position: absolute;
  width: 250px;
  height: 150px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.18);
  pointer-events: none;
  animation: unoSpinClockwise 16s linear infinite;
}
.uno-orbit-ring.counter {
  animation: unoSpinCounter 16s linear infinite;
}
@keyframes unoSpinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes unoSpinCounter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* Center piles layout */
.uno-table-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  position: relative;
  z-index: 2;
}

/* 3D Stacked Draw Pile */
.uno-pile-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.uno-pile-wrap .uno-card.pile {
  box-shadow: 1px 1px 0 #111, 2px 2px 0 #222, 3px 3px 0 #111, 4px 4px 0 #000, 0 8px 18px rgba(0,0,0,0.45);
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.uno-pile-wrap .uno-card.pile.playable:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 1px 1px 0 #111, 2px 2px 0 #222, 3px 3px 0 #111, 4px 4px 0 #000, 0 14px 24px var(--accent-gold);
}
.uno-pile-count {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .04em;
}

/* Discard Pile with Active Color Glow */
.uno-discard-spot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.uno-discard-glow {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  filter: blur(14px);
  opacity: .55;
  transition: background .3s var(--ease);
  pointer-events: none;
}
.uno-discard-spot .uno-card.played {
  transform: rotate(-3deg);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
}

/* Active color & direction pills */
.uno-table-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 2;
}
.uno-color-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--ink);
}
.uno-dir-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-size: .74rem;
  color: var(--muted);
  font-weight: 600;
}
.uno-pass-btn {
  padding: 4px 12px;
  font-size: .76rem;
  font-weight: 700;
  animation: pop .25s var(--ease);
}

/* Table action announcement */
.uno-action-banner {
  padding: 4px 14px;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 700;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  animation: fadeUp .2s var(--ease);
  max-width: 90%;
  text-align: center;
  z-index: 2;
}

/* Seats (Opponents and Local Player) */
.uno-seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1.5px solid var(--rule);
  transition: all .2s var(--ease);
  position: relative;
}
.uno-seat.active-turn {
  border-color: var(--accent-gold);
  box-shadow: 0 0 14px var(--accent-gold);
  transform: translateY(-2px);
}
.uno-seat.winner-seat {
  border-color: #f1c40f;
  background: rgba(241, 196, 15, 0.12);
}

.uno-seat-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}
.uno-seat-info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: .82rem;
}
.uno-seat-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uno-seat-count-tag {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
}
.uno-turn-beacon {
  color: #e74c3c;
  font-size: .72rem;
  font-weight: 800;
  animation: pulse 1s infinite alternate;
}

/* Card Fans for Opponents */
.uno-seat-hand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
}
.uno-fan {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.uno-mini-card-back {
  width: 38px;
  height: 56px;
  border-radius: 5px;
  background: #181922;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  display: grid;
  place-items: center;
  position: relative;
  transition: transform .2s var(--ease);
  user-select: none;
}
.uno-fan .uno-mini-card-back:not(:first-child) {
  margin-left: -22px;
}
.uno-mini-oval {
  width: 24px;
  height: 38px;
  border-radius: 50%;
  background: var(--c-red, #e05a4f);
  transform: rotate(-22deg);
  box-shadow: inset 0 0 2px rgba(0,0,0,0.3);
}
.uno-extra-pill {
  position: absolute;
  bottom: -4px;
  right: -6px;
  background: var(--ink);
  color: var(--btn-fg);
  font-size: .65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid var(--rule);
}

/* "UNO!" pulsating badge */
.uno-alert-badge {
  position: absolute;
  top: -12px;
  right: -8px;
  background: linear-gradient(135deg, #e05a4f 0%, #f59e0b 100%);
  color: #ffffff;
  font-family: var(--serif);
  font-size: .78rem;
  font-weight: 900;
  font-style: italic;
  padding: 2px 9px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(224, 90, 79, 0.7);
  z-index: 10;
  animation: unoPulse .7s infinite alternate ease-in-out;
  letter-spacing: .06em;
}
@keyframes unoPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 8px #e05a4f; }
  100% { transform: scale(1.15); box-shadow: 0 0 20px #f59e0b; }
}

/* Local Player's Seat (Bottom) */
.seat-bottom {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--paper);
}
.uno-player-hand {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  padding: 14px 10px 4px;
  min-height: 110px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}
.uno-player-hand .uno-card {
  margin-left: -12px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), opacity .2s;
  flex-shrink: 0;
}
.uno-player-hand .uno-card:first-child {
  margin-left: 0;
}
.uno-player-hand .uno-card.playable {
  transform: translateY(-8px);
  cursor: pointer;
}
.uno-player-hand .uno-card.playable:hover {
  transform: translateY(-22px) scale(1.12);
  z-index: 20 !important;
  box-shadow: 0 12px 24px rgba(0,0,0,0.35), 0 0 0 2px var(--accent-gold);
}
.uno-player-hand .uno-card.dim {
  opacity: .42;
  transform: translateY(0);
}

/* Authentic Uno Card Styles */
.uno-card {
  width: 64px;
  height: 96px;
  border-radius: 8px;
  border: 3.5px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3px 5px;
  position: relative;
  user-select: none;
  font-family: var(--sans);
  overflow: hidden;
}
.uno-card.red { background: var(--c-red); }
.uno-card.yellow { background: var(--c-yellow); }
.uno-card.green { background: var(--c-green); }
.uno-card.blue { background: var(--c-blue); }
.uno-card.wild { background: #16171d; }

.uno-card.back {
  background: #16171d;
  display: grid;
  place-items: center;
  padding: 0;
}
.uno-card.back .back-oval {
  width: 44px;
  height: 72px;
  border-radius: 50%;
  background: var(--c-red, #e05a4f);
  transform: rotate(-24deg);
  display: grid;
  place-items: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
}
.uno-back-logo {
  font-family: var(--serif);
  font-size: .95rem;
  font-weight: 900;
  font-style: italic;
  color: #f2c037;
  text-shadow: 1px 1px 2px #000;
  letter-spacing: .08em;
}

/* Card oval in center */
.uno-oval {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 68px;
  transform: translate(-50%, -50%) rotate(-24deg);
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 3px rgba(0,0,0,0.15);
  pointer-events: none;
}
.uno-card.wild .uno-oval {
  background: conic-gradient(var(--c-red) 0 25%, var(--c-blue) 0 50%, var(--c-green) 0 75%, var(--c-yellow) 0);
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
}

.uno-sym {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 900;
  font-style: italic;
  transform: rotate(24deg);
  line-height: 1;
}
.uno-card.red .uno-sym { color: var(--c-red); }
.uno-card.yellow .uno-sym { color: #d48a04; }
.uno-card.green .uno-sym { color: var(--c-green); }
.uno-card.blue .uno-sym { color: var(--c-blue); }
.uno-card.wild .uno-sym { color: #ffffff; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

/* Corner pips */
.uno-pip {
  font-size: .72rem;
  font-weight: 900;
  font-style: italic;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  pointer-events: none;
}
.pip-tl { align-self: flex-start; }
.pip-br { align-self: flex-end; transform: rotate(180deg); }

/* Played and Dealt Animations */
.uno-card.played {
  animation: cardPlay .28s var(--ease) both;
}
@keyframes cardPlay {
  from { opacity: 0; transform: translateY(35px) scale(0.8) rotate(10deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(-3deg); }
}
.uno-card.dealt {
  animation: cardDeal .3s var(--ease) both;
}
@keyframes cardDeal {
  from { opacity: 0; transform: translateY(-30px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.color-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-block; vertical-align: middle; transition: background .3s; }
.picker { display: flex; gap: 10px; animation: fadeUp .2s var(--ease); }
.picker button { width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid #fff; cursor: pointer; transition: transform .15s; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.picker button:hover { transform: scale(1.2); }

/* Uno Setup, Lobby & Multiplayer */
.uno-setup-card {
  max-width: 440px; margin: 0 auto; padding: 20px; background: var(--bg);
  border: 1px solid var(--rule); border-radius: 6px; display: flex; flex-direction: column; gap: 12px;
  animation: fadeUp .25s var(--ease);
}
.uno-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.uno-tabs .btn { flex: 1; text-align: center; font-size: .78rem; padding: 6px 10px; }
.uno-form-group { display: flex; flex-direction: column; gap: 4px; }
.uno-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.uno-input {
  padding: 6px 10px; font-family: inherit; font-size: .88rem; border: 1px solid var(--rule);
  background: var(--paper); color: var(--ink); border-radius: 4px; outline: none;
}
.uno-input:focus { border-color: var(--ink); }
.uno-code-input { font-family: monospace; font-size: 1.1rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; width: 110px; text-align: center; }
.uno-join-box { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--rule); display: flex; flex-direction: column; gap: 6px; }
.uno-join-row { display: flex; gap: 6px; }
.uno-code-pill {
  font-family: monospace; font-weight: 800; letter-spacing: .12em; background: var(--ink); color: var(--btn-fg);
  padding: 2px 8px; font-size: .95rem; border-radius: 3px;
}
.uno-room-header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.uno-player-roster { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.uno-roster-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; }
.uno-roster-badges { display: flex; gap: 4px; align-items: center; }
.uno-lobby-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; justify-content: center; }
.uno-opponents-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; width: 100%; margin-bottom: 10px; }
.uno-opp-card {
  padding: 6px 10px; background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; min-width: 90px;
  display: flex; flex-direction: column; gap: 2px; transition: all .15s; font-size: .78rem;
}
.uno-opp-card.active-turn { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--paper); transform: translateY(-1px); }
.uno-opp-card.winner-card { border-color: #f1c40f; background: rgba(241, 196, 15, 0.1); }
.uno-opp-header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; gap: 4px; }
.uno-turn-dot { color: #e74c3c; animation: bounce .8s infinite; }
.uno-opp-cards { display: flex; align-items: center; gap: 4px; font-weight: 700; color: var(--muted); }
.pile-count { font-size: .7rem; font-family: monospace; margin-top: 2px; }
.uno-table-info { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.uno-picker-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; z-index: 100; animation: fadeUp .15s; }
.uno-picker-box { background: var(--bg); border: 1px solid var(--rule-strong); border-radius: 6px; padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.uno-end-screen { margin: 12px auto; padding: 16px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 6px; text-align: center; max-width: 380px; }
.uno-toast { animation: shake .35s; font-size: .8rem; padding: 6px 12px; }

/* ===== Office Tycoon — Classic 40-Tile Corporate Board Game ===== */
:root {
  --ty-board-bg: #101318;
  --ty-felt: #151922;
  --ty-space-bg: #1b1f2b;
  --ty-space-hover: #242938;
  --ty-gold: #e5b842;
  --ty-gold-glow: rgba(229, 184, 66, 0.35);
  --ty-border: #2c3242;
  --ty-border-strong: #3d465c;
}
:root[data-theme="light"] {
  --ty-board-bg: #e5e0d3;
  --ty-felt: #f0ebe0;
  --ty-space-bg: #ffffff;
  --ty-space-hover: #f7f5ef;
  --ty-gold: #c28e18;
  --ty-gold-glow: rgba(194, 142, 24, 0.25);
  --ty-border: #cfc7b6;
  --ty-border-strong: #40362c;
}

.ty-game-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  position: relative;
}

.ty-topbar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 4px;
}

.ty-sound-btn {
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: .8rem;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .15s var(--ease);
}
.ty-sound-btn:hover {
  background: var(--bg);
  border-color: var(--rule-strong);
}

/* Master 2-Column Responsive Layout */
.ty-layout {
  display: grid;
  grid-template-columns: minmax(500px, 1.28fr) minmax(360px, 460px);
  gap: 20px;
  width: 100%;
  align-items: start;
}
@media (max-width: 1024px) {
  .ty-layout {
    grid-template-columns: 1fr;
  }
}

.ty-board-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.ty-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* Sidebar Panels */
.ty-panel {
  background: var(--paper);
  border: 1.5px solid var(--ty-border);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ty-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--ty-border);
  padding-bottom: 6px;
  font-weight: 800;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.ty-panel-header h4 {
  font-size: .85rem;
  color: var(--ink);
  margin: 0;
}

/* Action & Turn Console */
.ty-turn-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border: 1.5px solid var(--ty-border);
  border-radius: 8px;
}
.ty-turn-player-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .85rem;
}
.ty-turn-prompt {
  font-size: .75rem;
  color: var(--muted);
}

/* Master Board Container */
.ty-board {
  display: grid;
  grid-template-columns: 1.38fr repeat(9, 1fr) 1.38fr;
  grid-template-rows: 1.38fr repeat(9, 1fr) 1.38fr;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 1;
  border: 3px solid var(--ty-border-strong);
  border-radius: 12px;
  background: var(--ty-border-strong);
  gap: 1.5px;
  box-shadow: 0 16px 38px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.2);
  overflow: hidden;
  user-select: none;
  position: relative;
  font-family: var(--sans);
  margin: 0 auto;
}

/* Individual Spaces */
.ty-space {
  background: var(--ty-space-bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background .15s, transform .12s, box-shadow .12s;
  padding: 2px;
}
.ty-space:hover {
  background: var(--ty-space-hover);
  z-index: 20;
}
.ty-space:focus-visible {
  outline: 2px solid var(--ty-gold);
  z-index: 25;
}

/* Space Orientations (Facing Board Center) */
/* Bottom row: color band on top */
.ty-space.side-bottom {
  flex-direction: column;
  justify-content: space-between;
}
.ty-space.side-bottom .ty-deed-band {
  width: 100%;
  height: 9px;
  border-bottom: 1.5px solid rgba(0,0,0,.25);
  margin-bottom: 2px;
}
.ty-space.side-bottom .ty-space-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 1px;
}

/* Top row: color band on bottom (facing inward) */
.ty-space.side-top {
  flex-direction: column;
  justify-content: space-between;
}
.ty-space.side-top .ty-deed-band {
  width: 100%;
  height: 9px;
  border-top: 1.5px solid rgba(0,0,0,.25);
  margin-top: 2px;
  order: 3;
}
.ty-space.side-top .ty-space-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 1px;
  order: 1;
}

/* Left column: color band on right (facing inward) */
.ty-space.side-left {
  flex-direction: row;
  align-items: stretch;
}
.ty-space.side-left .ty-deed-band {
  width: 9px;
  height: 100%;
  border-left: 1.5px solid rgba(0,0,0,.25);
  order: 2;
  margin-left: 2px;
}
.ty-space.side-left .ty-space-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 11px);
  padding: 2px 1px;
  order: 1;
}

/* Right column: color band on left (facing inward) */
.ty-space.side-right {
  flex-direction: row;
  align-items: stretch;
}
.ty-space.side-right .ty-deed-band {
  width: 9px;
  height: 100%;
  border-right: 1.5px solid rgba(0,0,0,.25);
  order: 1;
  margin-right: 2px;
}
.ty-space.side-right .ty-space-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 11px);
  padding: 2px 1px;
  order: 2;
}

/* Space Typography & Details */
.ty-prop-name {
  font-size: .56rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  text-align: center;
  word-break: break-word;
  padding: 0 1px;
}
.ty-price-tag {
  font-size: .52rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--muted);
  text-align: center;
  letter-spacing: -.02em;
}
.ty-special-icon {
  font-size: 1.1rem;
  line-height: 1;
  margin: 1px 0;
  text-align: center;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}
.ty-special-sub {
  font-size: .48rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: .03em;
  text-align: center;
}

/* Ownership Indicators */
.ty-space.is-owned {
  box-shadow: inset 0 0 0 1.5px var(--owner-border, rgba(255,255,255,0.2));
}
.ty-owner-ribbon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: .5rem;
  font-weight: 800;
  color: #fff;
  background: var(--owner-bg, #3b82f6);
  padding: 0 4px;
  border-radius: 999px;
  line-height: 1.3;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
  white-space: nowrap;
}
.ty-monopoly-crown {
  position: absolute;
  top: 1px;
  right: 1px;
  font-size: .65rem;
  line-height: 1;
  z-index: 5;
  filter: drop-shadow(0 0 3px #f59e0b);
  animation: crownPulse 2.5s infinite ease-in-out;
}
@keyframes crownPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}

/* Corner Spaces */
.ty-corner {
  text-align: center;
  align-items: center;
  justify-content: center;
  background: var(--ty-felt);
  padding: 4px;
}
.corner-go {
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.22) 0%, var(--ty-felt) 85%);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.corner-go .corner-arrow {
  font-size: 1.3rem;
  color: #10b981;
  line-height: 1;
  animation: pulseArrow 1.6s infinite ease-in-out;
}
@keyframes pulseArrow {
  0%, 100% { transform: translateX(0); opacity: .8; }
  50% { transform: translateX(3px); opacity: 1; }
}
.corner-jail {
  background: var(--ty-felt);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  padding: 0;
}
.jail-in-cell {
  grid-column: 2;
  grid-row: 1;
  background: repeating-linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0 3px, transparent 3px 7px), rgba(0,0,0,.35);
  border-left: 2px solid #ef4444;
  border-bottom: 2px solid #ef4444;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .52rem;
  font-weight: 800;
  color: #f87171;
}
.jail-visiting {
  grid-column: 1 / 3;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .52rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.jail-visiting-side {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.corner-park {
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.2) 0%, var(--ty-felt) 85%);
}
.corner-tojail {
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.25) 0%, var(--ty-felt) 85%);
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.corner-tojail .corner-icon {
  animation: sirenFlash .9s infinite alternate ease-in-out;
}
@keyframes sirenFlash {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px #ef4444); }
  100% { transform: scale(1.18); filter: drop-shadow(0 0 8px #ef4444); }
}

.corner-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 2px;
}
.corner-name {
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .03em;
  color: var(--ink);
  line-height: 1.1;
}
.corner-sub {
  font-size: .5rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 1px;
}

/* Executive 3D Enamel Tokens */
.ty-tokens {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  z-index: 15;
  pointer-events: none;
}
.ty-token {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e2e8f0 70%, #94a3b8 100%);
  border: 2px solid var(--token-color, #3b82f6);
  display: grid;
  place-items: center;
  font-size: .75rem;
  box-shadow: 0 3px 6px rgba(0,0,0,.5), inset 0 1px 1px rgba(255,255,255,0.8);
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.ty-token.hopping {
  animation: tokenHop .18s ease-in-out;
}
@keyframes tokenHop {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.35); box-shadow: 0 8px 14px rgba(0,0,0,.6); }
  100% { transform: translateY(0) scale(1); }
}

/* Boardroom Center Command Table */
.ty-center {
  grid-row: 2 / 11;
  grid-column: 2 / 11;
  background: var(--ty-felt);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 16px 14px;
  gap: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 28px rgba(0,0,0,.5);
}

/* Boardroom Header Crest */
.ty-crest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-bottom: 1.5px solid var(--ty-border);
  padding-bottom: 6px;
}
.ty-crest-left {
  text-align: left;
}
.ty-crest-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: .08em;
  color: var(--ink);
  line-height: 1.1;
}
.ty-crest-sub {
  font-size: .65rem;
  font-weight: 700;
  color: var(--ty-gold);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 1px;
}
.ty-crest-badge {
  background: var(--paper);
  border: 1px solid var(--ty-border);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
}

/* 3D Chance & HR Chest Deck Piles in Center */
.ty-decks-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 80%;
  margin: 4px 0;
  perspective: 600px;
}
.ty-deck-pile {
  width: 105px;
  height: 64px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  user-select: none;
}
.ty-deck-pile:hover {
  transform: translateY(-3px) rotate(0deg) !important;
}
.ty-deck-chance {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1505;
  border: 2px solid #fbbf24;
  box-shadow: 2px 2px 0 #92400e, 4px 4px 0 #78350f, 6px 6px 14px rgba(0,0,0,.45);
  transform: rotate(-6deg);
}
.ty-deck-chest {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #04252b;
  border: 2px solid #67e8f9;
  box-shadow: -2px 2px 0 #155e75, -4px 4px 0 #164e63, -6px 6px 14px rgba(0,0,0,.45);
  transform: rotate(6deg);
}
.ty-deck-pile span.deck-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 2px;
}

/* Center Board Notification Banner */
.ty-center-banner {
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--ty-border);
  border-radius: 6px;
  padding: 6px 12px;
  width: 90%;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Circular Player Avatar in Dossiers */
.ty-player-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50% !important;
  display: inline-grid;
  place-items: center;
  font-size: .85rem;
  box-shadow: 0 2px 5px rgba(0,0,0,.35);
  flex-shrink: 0;
  border-width: 2px;
  border-style: solid;
}

/* Themed Corporate Trade Deal Button */
.ty-btn-trade {
  background: var(--bg);
  border: 1.5px solid var(--ty-gold);
  color: var(--ty-gold);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .03em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .15s var(--ease);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.ty-btn-trade:hover {
  background: var(--ty-gold);
  color: #101318;
  box-shadow: 0 0 10px var(--ty-gold-glow);
  transform: translateY(-1px);
}

/* Executive Player Dossiers & Cards in Sidebar */
.ty-players-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ty-player-card {
  padding: 12px 14px;
  background: var(--bg);
  border: 1.5px solid var(--ty-border);
  border-radius: 10px;
  font-size: .75rem;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.ty-player-card.active {
  border-color: var(--player-color);
  box-shadow: 0 0 14px var(--player-color-glow, rgba(59, 130, 246, 0.4)), 0 2px 6px rgba(0,0,0,.25);
}
.ty-player-card.bankrupt-player {
  opacity: .35;
  filter: grayscale(1);
}
.ty-player-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ty-player-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ty-player-card-name {
  font-weight: 800;
  color: var(--ink);
  font-size: .88rem;
}
.ty-player-card-wealth {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 2px;
}
.ty-player-portfolio {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--ty-border);
}

/* Property Detail Row in Dossiers */
.ty-prop-card {
  background: var(--paper);
  border: 1px solid var(--ty-border);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s;
}
.ty-prop-card:hover {
  border-color: var(--ty-border-strong);
}
.ty-prop-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ty-prop-title-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: .74rem;
  color: var(--ink);
  cursor: pointer;
}
.ty-prop-title-wrap:hover {
  color: var(--ty-gold);
}
.ty-prop-rent-badge {
  font-size: .68rem;
  font-weight: 800;
  font-family: monospace;
  padding: 1px 6px;
  border-radius: 4px;
}
.rent-collect {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.rent-pay {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.ty-prop-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .66rem;
  color: var(--muted);
}
.ty-prop-dev-actions {
  display: flex;
  gap: 5px;
  margin-top: 2px;
}
.ty-dev-btn {
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--ty-border);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: all .12s var(--ease);
}
.ty-dev-btn:hover:not(:disabled) {
  border-color: var(--ty-gold);
  color: var(--ty-gold);
  background: var(--paper);
}
.ty-dev-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

/* Houses and Hotels on Board Space */
.ty-houses-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: .52rem;
  line-height: 1;
  margin: 1px 0;
}
.house-pip {
  font-size: .52rem;
}

/* Sidebar Wall Street Activity Log */
.ty-sidebar-log {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--ty-border);
  border-radius: 6px;
  font-size: .72rem;
  line-height: 1.4;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.35);
}
.prop-chip {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  display: inline-block;
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
}

/* 3D Dice Display */
.ty-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ty-dice-container {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 2px 0;
  perspective: 400px;
}
.ty-die-3d {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #f1f0eb 75%, #dedbcf 100%);
  border: 1px solid #c9c5b5;
  box-shadow: 0 4px 8px rgba(0,0,0,.35), inset 0 1px 1px #fff;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 4px;
  gap: 1.5px;
  transition: transform .2s var(--ease);
}
.ty-die-3d .pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin: auto;
  transition: background .1s;
}
.ty-die-3d .pip.on {
  background: #18181b;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.7);
}
.ty-die-3d.rolling {
  animation: diceTumble .45s infinite linear;
}
@keyframes diceTumble {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1.1); }
  50% { transform: rotateX(180deg) rotateY(270deg) rotateZ(90deg) scale(1.2); }
  100% { transform: rotateX(360deg) rotateY(540deg) rotateZ(180deg) scale(1.1); }
}

/* Action Controls Buttons */
.ty-turn-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.ty-action-btn {
  font-size: .88rem;
  font-weight: 700;
  padding: 7px 22px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .15s var(--ease), box-shadow .15s;
}
.ty-action-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}

/* Floating Transaction FX */
.ty-float-fx {
  position: absolute;
  pointer-events: none;
  font-weight: 900;
  font-size: .95rem;
  letter-spacing: .02em;
  padding: 2px 8px;
  border-radius: 4px;
  z-index: 80;
  animation: floatUp 1.3s cubic-bezier(.22, 1, .36, 1) forwards;
}
.ty-float-good {
  color: #10b981;
  text-shadow: 0 2px 6px rgba(0,0,0,.8);
}
.ty-float-bad {
  color: #ef4444;
  text-shadow: 0 2px 6px rgba(0,0,0,.8);
}
@keyframes floatUp {
  0% { transform: translate(-50%, 0) scale(.8); opacity: 0; }
  20% { transform: translate(-50%, -10px) scale(1.2); opacity: 1; }
  80% { transform: translate(-50%, -35px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -55px) scale(.9); opacity: 0; }
}

/* Drawn Card (Chance / Chest) */
.ty-drawn-card {
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.25);
  animation: cardDeal .32s var(--ease);
}
@keyframes cardDeal {
  0% { transform: scale(.7) rotate(-8deg); opacity: 0; }
  70% { transform: scale(1.05) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.ty-card-chance {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.12)), var(--paper);
  border: 2px solid #f59e0b;
}
.ty-card-chest {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(13, 148, 136, 0.12)), var(--paper);
  border: 2px solid #06b6d4;
}
.ty-card-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ty-card-badge {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}
.ty-card-chance .ty-card-badge {
  background: #f59e0b;
  color: #1a1505;
}
.ty-card-chest .ty-card-badge {
  background: #06b6d4;
  color: #04252b;
}
.ty-card-title {
  font-family: var(--serif);
  font-size: .92rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}
.ty-card-desc {
  font-size: .75rem;
  line-height: 1.4;
  color: var(--ink);
  opacity: .95;
}

/* Title Deed Decision & Inspection Card */
.ty-deed-modal {
  background: var(--paper);
  border: 2px solid var(--ty-border-strong);
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  max-width: 250px;
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
  animation: pop .22s var(--ease);
}
.deed-header {
  padding: 8px 10px;
  color: #ffffff;
  text-align: center;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,.2);
}
.deed-header h4 {
  font-family: var(--serif);
  font-size: .95rem;
  margin-top: 2px;
  letter-spacing: normal;
}
.deed-body {
  padding: 10px 12px;
  font-size: .74rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.deed-rent-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted var(--ty-border);
  padding-bottom: 2px;
}
.deed-flavor-quote {
  font-style: italic;
  color: var(--muted);
  font-size: .65rem;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--ty-border);
  line-height: 1.35;
  text-align: center;
}

/* Click-To-Inspect Space Modal Overlay */
.ty-inspector-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  z-index: 90;
  animation: fadeUp .18s var(--ease);
  padding: 12px;
}
.ty-inspector-card {
  background: var(--paper);
  border: 2px solid var(--ty-gold);
  border-radius: 10px;
  width: min(320px, 94%);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0,0,0,.6);
  animation: pop .22s var(--ease);
}
.ty-inspector-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--ty-border);
}

/* Live Wall Street Ticker Log */
.ty-log {
  background: var(--bg);
  border: 1px solid var(--ty-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: .7rem;
  color: var(--muted);
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  line-height: 1.35;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.3);
}
.ty-log-line {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ty-log-line:first-child {
  color: var(--ink);
  font-weight: 700;
}

/* Pending Trade Alert in Center */
.ty-pending-trade-box {
  background: var(--bg);
  border: 2px solid #3b82f6;
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  max-width: 310px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: pop .22s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ty-trade-alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ty-trade-alert-title {
  font-size: .82rem;
  font-weight: 800;
  color: #60a5fa;
}
.ty-trade-alert-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: .7rem;
  line-height: 1.35;
}
.ty-trade-detail-col {
  background: var(--paper);
  border: 1px solid var(--ty-border);
  border-radius: 6px;
  padding: 6px 8px;
}
.ty-trade-col-title {
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 3px;
  font-size: .66rem;
  text-transform: uppercase;
}

/* Corporate Trade & Merger Negotiation Dialog */
.ty-trade-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 100;
  animation: pop .2s var(--ease);
  padding: 10px;
}
.ty-trade-dialog {
  background: var(--paper);
  border: 2px solid var(--ty-gold);
  border-radius: 12px;
  width: min(560px, 98%);
  max-height: 94%;
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  gap: 10px;
  box-shadow: 0 20px 48px rgba(0,0,0,.65);
  overflow-y: auto;
}
.ty-trade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid var(--ty-border);
  padding-bottom: 8px;
}
.ty-trade-header h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--ink);
}
.ty-trade-partner-select {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
}
.ty-trade-partner-select select {
  font-size: .75rem;
  padding: 3px 8px;
  background: var(--bg);
  border: 1px solid var(--ty-border);
  color: var(--ink);
  border-radius: 4px;
}
.ty-trade-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ty-trade-col {
  background: var(--bg);
  border: 1px solid var(--ty-border);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ty-trade-col h4 {
  font-size: .82rem;
  font-weight: 800;
  border-bottom: 1px solid var(--ty-border);
  padding-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ty-trade-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ty-trade-label {
  font-size: .65rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ty-trade-cash-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ty-trade-cash-bar input[type="number"] {
  width: 80px;
  font-size: .82rem;
  font-weight: 800;
  padding: 4px 6px;
  background: var(--paper);
  border: 1px solid var(--ty-border);
  border-radius: 4px;
  color: #10b981;
}
.ty-cash-btn {
  background: var(--paper);
  border: 1px solid var(--ty-border);
  color: var(--ink);
  font-size: .65rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.ty-cash-btn:hover {
  background: var(--ty-border);
}
.ty-trade-prop-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 125px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--ty-border);
  border-radius: 6px;
  background: var(--paper);
}
.ty-trade-prop-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  user-select: none;
  transition: background .12s;
}
.ty-trade-prop-item:hover {
  background: var(--bg);
}
.ty-trade-prop-item input {
  margin: 0;
  cursor: pointer;
}
.ty-trade-empty-hint {
  font-size: .68rem;
  color: var(--muted);
  font-style: italic;
  padding: 8px;
  text-align: center;
}
.ty-trade-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--ty-border);
  border-radius: 6px;
  font-size: .72rem;
}
.ty-trade-summary-val {
  font-weight: 800;
  color: var(--ty-gold);
}

/* Winner Banner */
.ty-winner-banner {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 900;
  padding: 12px 18px;
  border-radius: 8px;
  text-align: center;
  background: linear-gradient(135deg, rgba(229, 184, 66, 0.25), rgba(16, 185, 129, 0.15)), var(--paper);
  border: 2px solid var(--ty-gold);
  color: var(--ink);
  animation: pop .35s var(--ease);
}

/* ===== 2048 ===== */
.g2048 { display: grid; grid-template-columns: repeat(4, 68px); gap: 6px; padding: 6px; background: #262832; border-radius: 6px; }
:root[data-theme="light"] .g2048 { background: #bbada0; }
.g2048 div {
  width: 68px; height: 68px; border-radius: 4px; display: grid; place-items: center;
  font-size: 1.45rem; font-weight: 800; background: #353844; color: var(--ink); transition: background .12s;
}
:root[data-theme="light"] .g2048 div { background: #cdc1b4; }
.g2048 .new { animation: pop .2s var(--ease); }
.g2048 .merged { animation: merge .18s ease-out; }
.g2048.shake { animation: shake .3s; }
@keyframes merge { 50% { transform: scale(1.15); } }

/* ===== Minesweeper ===== */
.mines { display: grid; gap: 2px; padding: 2px; background: var(--rule); border: 1px solid var(--rule-strong); }
.mines button {
  width: 32px; height: 32px; border: none; font: inherit; font-size: 1rem; font-weight: 800;
  background: #2a2c38; color: var(--ink); cursor: pointer; transition: background .1s;
}
.mines button:hover { background: #363948; }
.mines button.open { background: var(--bg); cursor: default; }
:root[data-theme="light"] .mines button { background: #c9c9c4; color: var(--ink); }
:root[data-theme="light"] .mines button:hover { background: #b9b9b3; }
:root[data-theme="light"] .mines button.open { background: var(--bg); }
.mines button.reveal { animation: reveal .3s var(--ease) both; }
.mines button.boom { background: var(--bad); }
.mines button.flagged { animation: pop .25s var(--ease); }
.mines.shake { animation: shake .4s; }
@keyframes reveal { from { transform: scale(.4); opacity: 0; } }

/* ===== Memory ===== */
.memory { display: grid; grid-template-columns: repeat(4, 68px); gap: 8px; perspective: 700px; animation: fadeUp .35s var(--ease) both; }
.mem-card { width: 68px; height: 68px; cursor: pointer; position: relative; transform-style: preserve-3d; transition: transform .4s var(--ease); }
.mem-card.flipped { transform: rotateY(180deg); }
.mem-card > div { position: absolute; inset: 0; border-radius: 6px; display: grid; place-items: center; backface-visibility: hidden; font-size: 1.6rem; }
.mem-card .front { background: #262937; background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,.07) 6px 12px); }
.mem-card .face { background: var(--paper); border: 1px solid var(--rule); transform: rotateY(180deg); color: var(--ink); }
.mem-card.matched .face { background: #1c3325; border-color: var(--good); }
:root[data-theme="light"] .mem-card.matched .face { background: #e4f1e1; border-color: var(--good); }
.mem-card.matched { animation: bounceFlipped .45s var(--ease); }
.mem-card.miss .face { border-color: var(--bad); }
.mem-card.miss { animation: shakeFlipped .35s; }
@keyframes shakeFlipped { 0%, 100% { transform: rotateY(180deg); } 25%, 75% { transform: rotateY(180deg) translateX(-4px); } 50% { transform: rotateY(180deg) translateX(4px); } }
@keyframes bounceFlipped { 0%, 100% { transform: rotateY(180deg); } 40% { transform: rotateY(180deg) translateY(-8px); } 70% { transform: rotateY(180deg) translateY(1px); } }

/* ===== Boss screen ===== */
.boss-screen { position: fixed; inset: 0; background: white; color: #222; z-index: 1000; font-family: Arial, sans-serif; font-size: 13px; overflow: auto; }
.boss-toolbar { background: #217346; color: white; padding: 8px 12px; }
.boss-screen table { border-collapse: collapse; }
.boss-screen td, .boss-screen th { border: 1px solid #d4d4d4; padding: 3px 10px; min-width: 90px; }
.boss-screen th { background: #f3f3f3; font-weight: normal; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (max-width: 760px) {
  .topbar, #lobby, .stage { padding-left: 16px; padding-right: 16px; }
  .topbar-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .masthead-meta-left { justify-content: center; }
  .masthead-meta-right { justify-content: space-between; width: 100%; margin-left: 0; }
  .search-wrapper { flex: 1; }
  #search-input { width: 100% !important; }
  .boss-hint { display: none; }
  .stats-strip { flex-wrap: wrap; gap: 12px; padding: 12px 14px; }
  .stat-divider { display: none; }
  .stat { min-width: 42%; padding: 4px 6px; }
  .game-grid { grid-template-columns: 1fr; gap: 14px; }
  .masthead { font-size: 2rem; }
}
