/* Classic keeps style.css. All scene styling below is explicitly opt-in. */
.view-picker {
  display: inline-flex;
  flex-shrink: 0;
  padding: 2px;
  gap: 2px;
  border: 1px solid #555063;
  border-radius: 9px;
  background: #171820;
}
.view-picker button {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #d1cedb;
  font: 600 12px var(--font);
  cursor: pointer;
}
.view-picker button[aria-pressed="true"] { background: #6051cf; color: #fff; }
.view-picker button:hover { box-shadow: inset 0 0 0 1px #c0b4f3; }
.view-picker button:focus-visible { outline: 3px solid #ffe2a6; outline-offset: 2px; }
.view-picker-home { margin-bottom: 20px; }

body[data-table-view="25d"] {
  height: auto;
  min-height: 100%;
  overflow-x: clip;
  --accent: #8b6ce0;
  --accent-light: #d7c7ff;
  --text-dim: #bdc9cc;
  --text-dimmer: #a7b8bb;
  background: radial-gradient(ellipse at 50% 25%, #1c3540, #101c26 60%, #0a111b);
  background-attachment: fixed;
}
body[data-table-view="25d"] .screen {
  padding-bottom: 28px;
}
body[data-table-view="25d"] :is(.home-container, .lobby-container, .bidding-container, .partner-container, .gameover-container, .stats-container) {
  position: relative;
  margin: 24px 12px;
  border: 1px solid #586477;
  border-top-color: #9c9baa;
  border-radius: 22px;
  background: linear-gradient(155deg, #2c3547, #182732 70%);
  box-shadow: 0 5px 0 #101922, 0 7px 0 #45505f, 0 18px 32px #0007, inset 0 1px 0 #ffffff16;
  backdrop-filter: none;
}
body[data-table-view="25d"] :is(.bidding-container, .partner-container) {
  border-bottom: 7px solid #51413d;
  background: radial-gradient(ellipse at top, #274d4c, #172f34 75%);
}
body[data-table-view="25d"] :is(.bid-grid, .partner-grid) {
  background: #0b1926a8;
  border: 1px solid #63767a;
  box-shadow: inset 0 3px 10px #0006;
}
body[data-table-view="25d"] :is(.bid-btn, .partner-card-btn) {
  min-height: 40px;
  border-bottom: 3px solid #111e28;
  box-shadow: inset 0 1px 0 #ffffff1c, 0 2px 2px #0005;
}
body[data-table-view="25d"] :is(.btn, .chat-send-btn) {
  box-shadow: inset 0 1px 0 #ffffff26, 0 3px 0 #070d18, 0 5px 8px #0004;
}
body[data-table-view="25d"] :is(button, input, select):focus-visible {
  outline: 3px solid #ffe2a6;
  outline-offset: 3px;
}
body[data-table-view="25d"] .card:focus-visible { outline: 3px solid #ffe2a6; outline-offset: 3px; z-index: 11; }
body[data-table-view="25d"] :is(.player-list .player-item, .score-item, .fullboard-row, .gameover-hand-row, .replay-breakdown-section) {
  border: 1px solid #68757e;
  background-color: #14242dbd;
  box-shadow: 0 3px 0 #09131d, inset 0 1px 0 #ffffff12;
}
body[data-table-view="25d"] .player-list .seat-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #afa1c8;
  background: #30314a;
  box-shadow: 0 3px 0 #070f1c;
}
body[data-table-view="25d"] :is(.room-code-display, .game-info-bar, .inline-chat, .replay-controls) {
  background: linear-gradient(#273446, #182531);
  border: 1px solid #536273;
  box-shadow: 0 4px 0 #0a1420, inset 0 1px 0 #ffffff12;
}
body[data-table-view="25d"] .play-container { max-width: 960px; padding: 18px 20px; }
body[data-table-view="25d"] .game-info-bar {
  margin: 0 auto 16px;
  font-size: 0.85rem;
}

/* The felt and native drop surface tilt together; labels stay upright. */
body[data-table-view="25d"] .table {
  isolation: isolate;
  aspect-ratio: 1.9;
  min-height: 330px;
  max-height: none;
  margin-bottom: 18px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body[data-table-view="25d"] .table-surface {
  position: absolute;
  z-index: -2;
  inset: 9% 3% 12%;
  border: 12px solid #604f49;
  border-top-color: #a38d7c;
  border-bottom-color: #423330;
  border-radius: 42%;
  background: radial-gradient(ellipse at 50% 40%, #336d63, #16413f 70%);
  transform: perspective(900px) rotateX(26deg);
  box-shadow: 0 10px 0 #291e22, 0 13px 0 #74605a, 0 24px 0 #17202b, 0 32px 18px #0009,
    inset 0 0 0 2px #b6a17a66, inset 0 0 0 7px #0e323a, inset 0 0 30px #0006;
  pointer-events: none;
}
body[data-table-view="25d"] .table-surface .card-drop-zone {
  /* Inner felt curve follows the rim's padding edge, in the same plane. */
  border-radius: calc(42% - 1.92px);
}
body[data-table-view="25d"] .table.practice .table-surface {
  background: radial-gradient(ellipse at 50% 40%, #594077, #2c2145 70%);
}
body[data-table-view="25d"] .table::before {
  inset: 17% 11% 19%;
  border-radius: 45%;
  z-index: -1;
  transform: perspective(900px) rotateX(26deg);
}
body[data-table-view="25d"] .seat-label {
  min-width: 86px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid #7c8a92;
  background: linear-gradient(#293c4c, #182535);
  color: #e4eaf0;
  box-shadow: 0 4px 0 #0a1420, 0 7px 12px #0005;
}
body[data-table-view="25d"] .seat-label.active-turn {
  border-color: #f5d798;
  background: linear-gradient(#624c81, #382a52);
  box-shadow: 0 4px 0 #1c1830, 0 0 0 2px #e8c888, 0 5px 20px #e8c88845;
}
body[data-table-view="25d"] .seat-top { top: 0; }
body[data-table-view="25d"] .seat-bottom { bottom: 0; }
body[data-table-view="25d"] .seat-left { left: 1%; top: 47%; }
body[data-table-view="25d"] .seat-right { right: 1%; top: 47%; }
body[data-table-view="25d"] .seat-card { display: none; } /* Empty placeholder; trick cards remain in trick-area. */
body[data-table-view="25d"] .trick-area { width: 44%; height: 68%; top: 46%; gap: 0; }
body[data-table-view="25d"] .trick-card-top .card-mini { transform: perspective(600px) rotateX(12deg) rotate(-5deg); }
body[data-table-view="25d"] .trick-card-left .card-mini { transform: rotate(-12deg); }
body[data-table-view="25d"] .trick-card-right .card-mini { transform: rotate(12deg); }
body[data-table-view="25d"] .trick-card-bot .card-mini { transform: rotate(4deg); }
body[data-table-view="25d"] :is(.card, .card-mini):not(.card-trump-fire, .card-partner-glow) {
  box-shadow: 0 2px 0 #b6b1aa, 1px 4px 0 #757b80, 2px 8px 12px #0006;
}
body[data-table-view="25d"] .hand-display {
  padding-top: 8px;
  border-radius: 16px;
  background: linear-gradient(#0d1a25cc, #223441cc);
  border-top: 1px solid #72858c;
  box-shadow: 0 5px 0 #0b1420, 0 12px 20px #0005;
}
body[data-table-view="25d"] .hand-display h3 { color: #c3cfd4; }
body[data-table-view="25d"] .last-trick-panel { bottom: 3%; right: 3%; background: #112331; }
body[data-table-view="25d"] .inline-chat { border-radius: 12px; margin-top: 18px; }
body[data-table-view="25d"] .gameover-hand-row { border-radius: 10px; padding: 8px; }
body[data-table-view="25d"] .gameover-container.outcome-win { border-color: #81c59b; }
body[data-table-view="25d"] .gameover-container.outcome-loss { border-color: #df979d; }

@media (max-width: 767px) {
  body[data-table-view="25d"] .play-container { padding: 16px 10px; }
  body[data-table-view="25d"] { background-attachment: scroll; }
  body[data-table-view="25d"] .table { aspect-ratio: 1.12; min-height: 300px; }
  body[data-table-view="25d"] .table-surface { inset: 11% 3% 13%; border-width: 9px; transform: perspective(700px) rotateX(17deg); }
  body[data-table-view="25d"] .table-surface .card-drop-zone { border-radius: calc(42% - 1.44px); }
  body[data-table-view="25d"] .seat-label { min-width: 64px; max-width: 86px; padding: 6px; }
  body[data-table-view="25d"] .seat-name-row { max-width: 72px; }
  body[data-table-view="25d"] :is(.seat-left, .seat-right) .seat-label { width: 72px; min-width: 0; }
  body[data-table-view="25d"] .seat-left { left: 0; }
  body[data-table-view="25d"] .seat-right { right: 0; }
  body[data-table-view="25d"] .trick-area { width: 53%; height: 60%; }
  body[data-table-view="25d"] .game-info-bar { gap: 5px; padding: 9px 5px; font-size: 0.75rem; }
  body[data-table-view="25d"] .game-info-bar span { padding: 4px 6px; }
  body[data-table-view="25d"] :is(.bidding-container, .partner-container, .lobby-container, .gameover-container) { padding: 20px 12px; }
  body[data-table-view="25d"] .last-trick-panel { position: relative; bottom: auto; right: auto; top: calc(100% + 5px); width: max-content; margin-left: auto; }
  body[data-table-view="25d"] .table:has(.last-trick-panel:not(.hidden)) { margin-bottom: 145px; }
}
@media (max-width: 360px) {
  .view-picker button { padding: 0 6px; }
  body[data-table-view="25d"] .trick-area { width: 48%; }
  body[data-table-view="25d"] :is(.seat-left, .seat-right) .seat-label { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-table-view="25d"] *, body[data-table-view="25d"] *::before, body[data-table-view="25d"] *::after {
    animation: none !important;
    transition: none !important;
  }
}
