.life-player.is-yours:focus {
  outline: 3px solid #ffe49a;
  outline-offset: 3px;
}

.life-player.life-changed {
  animation: life-pulse .42s ease;
}

.life-change-status {
  display: block;
  min-height: 1.2em;
  margin-top: 4px;
  color: #ffe49a;
  font-weight: 800;
}

.game-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid #6e542d;
  border-radius: 8px;
  background: #17120c;
}
.game-room-actions { flex-wrap: wrap; align-items: center; }
.game-room-free-note { align-self: center; margin-right: auto; color: #f1d695; font-size: .88rem; font-weight: 750; }
.game-connection-error { margin: 14px 0 0; padding: 12px 15px; border: 1px solid #ce7062; border-radius: 8px; color: #ffe0d5; background: #421f1b; line-height: 1.45; }

.game-tools.is-collapsed,
.livekit-tile.camera-hidden {
  display: none;
}

.game-coin {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  perspective: 500px;
}

.game-coin img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.game-coin.is-flipping img {
  animation: coin-flip .9s cubic-bezier(.2,.7,.2,1);
}

@keyframes coin-flip {
  0% { transform: rotateY(0) translateY(0) scale(1); }
  35% { transform: rotateY(540deg) translateY(-24px) scale(1.25); }
  70% { transform: rotateY(1080deg) translateY(-5px) scale(1.08); }
  100% { transform: rotateY(1440deg) translateY(0) scale(1); }
}

.game-tool-result {
  display: grid;
  min-width: 230px;
  margin-right: auto;
}

.game-tool-result small,
.coin-label {
  color: #bfa879;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .08em;
}

.game-tool-result strong {
  color: #fff0c9;
  font-size: .92rem;
}

.game-room-live .livekit-container {
  height: calc(100% - 209px);
}

.game-room-live.coin-panel-collapsed .livekit-container {
  height: calc(100% - 145px);
}

.camera-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #6e542d;
  border-radius: 8px;
  background: #17120c;
}

.camera-check div { display: grid; gap: 2px; }
.camera-check strong { color: #fff0c9; }
.camera-check small { color: #bfa879; }
.owner-studio-login,.owner-studio-option { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; padding: 11px 13px; border: 1px solid #5e4930; border-radius: 8px; background: #14110d; }
.owner-studio-login[hidden],.owner-studio-option[hidden] { display: none; }
.owner-studio-login div,.owner-studio-option span { display: grid; gap: 3px; }
.owner-studio-login strong,.owner-studio-option strong { color: #f2d08d; }
.owner-studio-login small,.owner-studio-option small { color: #bfa879; }
.owner-studio-option { justify-content: flex-start; cursor: pointer; border-color: #9b7138; background: #241b10; }
.studio-backgrounds { margin: 12px 0 0; padding: 14px; border: 1px solid #806139; border-radius: 9px; background: #100e0a; }
.studio-backgrounds legend { padding: 0 7px; color: #f1cf7b; font-weight: 900; }
.studio-backgrounds > p { margin: 0 0 11px; color: #b9aa8e; font-size: .84rem; }
.studio-backgrounds > small { display: block; margin-top: 10px; color: #ab9a78; }
.studio-background-grid { display: grid; grid-template-columns: repeat(4,minmax(120px,1fr)); gap: 9px; }
.studio-background-grid label { position: relative; display: grid; min-height: 92px; overflow: hidden; border: 2px solid #43351f; border-radius: 8px; cursor: pointer; background: #050604; }
.studio-background-grid label:has(input:checked) { border-color: #e4b95f; box-shadow: 0 0 0 2px #e4b95f33; }
.studio-background-grid input { position: absolute; z-index: 2; top: 7px; left: 7px; accent-color: #e4b95f; }
.studio-background-grid img { width: 100%; height: 92px; object-fit: cover; }
.studio-background-grid span { position: absolute; inset: auto 0 0; padding: 6px 8px; color: #fff0ca; background: #070806dc; font-size: .77rem; font-weight: 850; text-align: center; }
.studio-background-grid .background-none,.studio-background-grid .background-blur { position: static; display: grid; height: 92px; place-items: center; background: linear-gradient(135deg,#171a17,#050605); }
.studio-background-grid .background-blur { background: linear-gradient(135deg,#43624399,#121712),radial-gradient(circle,#c99a48,#243024); filter: blur(.3px); }
@media (max-width: 720px) { .studio-background-grid { grid-template-columns: repeat(2,1fr); } }
.owner-studio-option input { width: 20px; height: 20px; accent-color: #d7aa50; }

.camera-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.studio-dock { position: sticky; z-index: 40; top: 8px; display: grid; grid-template-columns: 12px minmax(220px,1fr) auto auto; gap: 12px; align-items: center; margin: 8px 14px; padding: 12px 14px; border: 1px solid #c89c4d; border-radius: 9px; background: #17120cf2; box-shadow: 0 8px 28px #0009; }
.studio-dock[hidden] { display: none; }
.studio-dock div { display: grid; gap: 2px; }
.studio-dock strong { color: #f5d68e; }
.studio-dock small { color: #bfa879; }
@media (max-width:720px) { .studio-dock { grid-template-columns: 12px 1fr; } .studio-dock button { grid-column: 2; } }

.camera-preview-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 2px solid #c89c4d;
  border-radius: 9px;
  background: #050604;
}

.camera-preview-tile video { width: 100%; height: 100%; display: block; object-fit: cover; }
.camera-preview-tile span { position: absolute; left: 10px; bottom: 10px; padding: 5px 9px; border-radius: 6px; color: #fff2cf; background: #090806dc; font-weight: 800; }
.local-camera-tile { border: 2px solid #d5a84f; }

.livekit-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #4e3b21;
  border-radius: 10px;
  background: #050604;
}
.livekit-container.owner-studio-fixed { display: flex; align-items: center; justify-content: flex-end; min-height: 520px; padding: 32px; background-color: #07100a; background-repeat: no-repeat; }
.livekit-container.owner-studio-fixed.studio-regin { background-image: url('studio-regin-cutout.webp'),radial-gradient(circle at 28% 45%,#243d25 0,#09110b 48%,#030504 100%); background-position: 4% center,center; background-size: auto 88%,cover; }
.livekit-container.owner-studio-fixed.studio-lair { background-image: linear-gradient(90deg,transparent 0 38%,#030504 49%),url('studio-background-lair.webp'); background-position: center,left center; background-size: cover,43% auto; }
.livekit-container.owner-studio-fixed .livekit-tile,.livekit-container.owner-studio-fixed.camera-stage .livekit-tile,.livekit-container.owner-studio-fixed.camera-stage .livekit-tile.is-main-camera { width: min(66%,980px); height: min(78%,650px); min-height: 260px; grid-column: auto; grid-row: auto; border: 4px solid #d0a355; border-radius: 8px; opacity: 1; box-shadow: 0 18px 45px #000c; }
.livekit-container.owner-studio-fixed .livekit-tile video { object-fit: contain; }
.livekit-container.owner-studio-fixed .livekit-tile[data-camera-role="face"] { display: none; }
@media (max-width: 720px) { .livekit-container.owner-studio-fixed { min-height: 420px; padding: 18px; } .livekit-container.owner-studio-fixed.studio-regin { background-size: auto 65%,cover; } .livekit-container.owner-studio-fixed.studio-lair { background-size: cover,54% auto; } .livekit-container.owner-studio-fixed .livekit-tile,.livekit-container.owner-studio-fixed.camera-stage .livekit-tile,.livekit-container.owner-studio-fixed.camera-stage .livekit-tile.is-main-camera { width: 75%; height: 300px; } }

.camera-stage-help {
  margin: 0 0 6px;
  color: #d9c797;
  font-size: .82rem;
  font-weight: 750;
  text-align: right;
}

.livekit-container.camera-stage {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 22%);
  grid-auto-rows: minmax(100px, 1fr);
}

.livekit-container.camera-stage .livekit-tile {
  grid-column: 2;
  min-height: 0;
  cursor: pointer;
  border: 2px solid #70572e;
  opacity: .88;
  transition: border-color .16s ease, opacity .16s ease, transform .16s ease;
}

.livekit-container.camera-stage .livekit-tile:hover,
.livekit-container.camera-stage .livekit-tile:focus-visible {
  border-color: #f0c96e;
  opacity: 1;
  outline: none;
}

.livekit-container.camera-stage .livekit-tile.is-main-camera {
  grid-column: 1;
  grid-row: 1 / span 4;
  min-height: 100%;
  cursor: default;
  border-color: #c89c4d;
  opacity: 1;
}

.livekit-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  background: #080a08;
}

.livekit-tile video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.livekit-tile span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border: 1px solid #c89c4d88;
  border-radius: 6px;
  color: #fff2cf;
  background: #090806d9;
  font-size: .82rem;
  font-weight: 800;
}

.tile-hide-camera {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid #dfbd72;
  border-radius: 6px;
  color: #fff2cf;
  background: #090806e8;
  font: inherit;
  font-size: .76rem;
  font-weight: 850;
  cursor: pointer;
}

.tile-hide-camera:hover,
.tile-hide-camera:focus-visible {
  color: #171008;
  background: #f0c96e;
  outline: none;
}

.stream-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  color: #c9b98f;
  background: #19140e;
  font-size: .76rem;
  font-weight: 850;
}

.stream-status.is-live {
  color: #fff;
  background: #a91521;
  box-shadow: 0 0 18px #d8293766;
}
.commentator-presence { display: inline-flex; align-items: center; gap: 7px; width: max-content; margin-top: 7px; padding: 5px 9px; border: 1px solid #ef4454; border-radius: 999px; color: #fff; background: #8f1221; box-shadow: 0 0 14px #f3345277; font-size: .8rem; font-weight: 850; }
.commentator-presence[hidden] { display: none; }
.commentator-presence > span { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #fff1f1; box-shadow: 0 0 9px #fff; animation: commentator-glow 2s ease-in-out infinite; }
@keyframes commentator-glow { 50% { opacity: .48; box-shadow: 0 0 3px #fff; } }
@media (prefers-reduced-motion: reduce) { .commentator-presence > span { animation: none; } }

.stream-consent-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 3px 10px;
  padding: 10px 13px;
  border: 1px solid #755a31;
  border-radius: 8px;
  background: #17120c;
  color: #f5e5bf;
}
.stream-consent-panel label { display: flex; align-items: center; gap: 9px; font-weight: 750; cursor: pointer; }
.stream-consent-panel input { width: 18px; height: 18px; accent-color: #d7aa50; }
.stream-consent-panel span { color: #c9b78f; font-size: .86rem; }
@media (max-width: 760px) { .stream-consent-panel { align-items: flex-start; flex-direction: column; } }

.game-room-live { position: relative; }
.game-card-lookup { position: absolute; z-index: 40; top: 58px; right: 12px; width: min(440px, calc(100% - 24px)); max-height: calc(100% - 72px); overflow: auto; padding: 17px; border: 1px solid #c99b4b; border-radius: 10px; color: #eee3cd; background: #11100ded; box-shadow: 0 18px 55px #000d; backdrop-filter: blur(9px); }
.game-card-lookup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.game-card-lookup-head small { color: #d7aa50; font-size: .7rem; font-weight: 850; letter-spacing: .12em; }
.game-card-lookup-head h2 { margin: 3px 0 0; font: 700 1.45rem Georgia,serif; }
.game-card-search { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 14px; }
.game-card-search input { width: 100%; min-height: 40px; padding: 8px 10px; }
.game-card-note { margin: 8px 0 12px; color: #bdae91; font-size: .78rem; line-height: 1.4; }
.game-card-results { display: grid; gap: 6px; max-height: 235px; overflow: auto; }
.game-card-results>p { margin: 6px 0; color: #bdae91; }
.game-card-result { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px; border: 1px solid #403625; border-radius: 6px; color: #eee3cd; background: #1a1711; text-align: left; cursor: pointer; }
.game-card-result:hover,.game-card-result:focus-visible { border-color: #d7aa50; background: #292117; outline: none; }
.game-card-result img { width: 42px; height: 59px; flex: 0 0 42px; border-radius: 3px; object-fit: cover; }
.game-card-result span,.game-card-result strong,.game-card-result small { display: block; min-width: 0; }
.game-card-result small { margin-top: 3px; color: #bdae91; font-size: .7rem; }
.game-card-detail { display: grid; grid-template-columns: 145px minmax(0,1fr); gap: 13px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #5b482c; }
.game-card-detail>img { width: 145px; border-radius: 7px; box-shadow: 0 8px 20px #000a; }
.game-card-detail small { color: #d7aa50; font-size: .65rem; font-weight: 800; letter-spacing: .08em; }
.game-card-detail h3 { margin: 3px 0 5px; font: 700 1.2rem Georgia,serif; }
.game-card-detail strong { color: #d1bf9d; font-size: .75rem; }
.game-card-detail p { white-space: pre-line; margin: 11px 0; padding: 10px; border: 1px solid #403625; border-radius: 6px; color: #f2eadc; background: #080806; font-size: .82rem; line-height: 1.45; }
.game-card-detail a { color: #efc77f; font-size: .78rem; font-weight: 750; }
@media (max-width: 560px) { .game-card-lookup { inset: 8px; width: auto; max-height: calc(100% - 16px); } .game-card-detail { grid-template-columns: 100px minmax(0,1fr); } .game-card-detail>img { width: 100px; } }

@keyframes life-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.055); background: #65471f; box-shadow: 0 0 26px #f3c35a99; }
  100% { transform: scale(1); }
}

.game-room-live:fullscreen,
.game-room-live.pseudo-fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  background: #0b0906;
  padding: 12px;
}

.game-room-live.pseudo-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.game-room-live:fullscreen .livekit-container,
.game-room-live.pseudo-fullscreen .livekit-container {
  height: calc(100vh - 209px);
}

.game-room-live.coin-panel-collapsed:fullscreen .livekit-container,
.game-room-live.coin-panel-collapsed.pseudo-fullscreen .livekit-container {
  height: calc(100vh - 145px);
}

/* Keep the controls available while letting the camera use the whole screen. */
.game-room-live:fullscreen,.game-room-live.pseudo-fullscreen { display:flex; flex-direction:column; overflow:auto; }
.game-room-live:fullscreen .livekit-container,.game-room-live.pseudo-fullscreen .livekit-container,.game-room-live.coin-panel-collapsed:fullscreen .livekit-container,.game-room-live.coin-panel-collapsed.pseudo-fullscreen .livekit-container { flex:1 1 auto; min-height:160px; height:auto; }
.game-room-live.focus-camera #gameInvite,.game-room-live.focus-camera #streamConsentPanel,.game-room-live.focus-camera #gameTools,.game-room-live.focus-camera .camera-stage-help { display:none !important; }
.game-room-live.focus-camera .game-live-bar { flex:0 0 auto; align-items:center; margin-bottom:8px; padding:5px 8px; border:1px solid #796139; border-radius:8px; background:#171812ee; }
.game-room-live.focus-camera .game-live-bar #restoreRemoteCameras,.game-room-live.focus-camera .game-live-bar #toggleOwnCameras,.game-room-live.focus-camera .game-live-bar #toggleCoinPanel,.game-room-live.focus-camera .game-live-bar #toggleCardLookup,.game-room-live.focus-camera .game-live-bar #toggleScreenShare,.game-room-live.focus-camera .game-live-bar #startTwitchStream { display:none !important; }
.game-room-live.focus-camera .livekit-container { min-height: min(65dvh,500px); height: min(75dvh,840px); }
.game-room-live.focus-camera:fullscreen .livekit-container,.game-room-live.focus-camera.pseudo-fullscreen .livekit-container { min-height:160px; height:auto; }
.game-room-live.focus-camera .livekit-container.owner-studio-fixed { justify-content:flex-end; padding:12px; }
.game-room-live.focus-camera .livekit-container.owner-studio-fixed .livekit-tile,.game-room-live.focus-camera .livekit-container.owner-studio-fixed.camera-stage .livekit-tile.is-main-camera { width:min(57%,1000px); height:96%; min-height:0; }
@media(max-width:760px){.game-room-live.focus-camera .game-live-bar{align-items:flex-start;flex-wrap:wrap}.game-room-live.focus-camera .livekit-container.owner-studio-fixed .livekit-tile{width:72%}}

@media (max-width: 760px) {
  .camera-check { align-items: stretch; flex-direction: column; }
  .game-tools { flex-wrap: wrap; }
  .game-tool-result { width: 100%; min-width: 0; }
  .game-room-live .livekit-container { height: 55dvh; grid-template-columns: 1fr; }
  .game-room-live.coin-panel-collapsed .livekit-container { height: 65dvh; }
  .game-room-live .livekit-container.camera-stage { grid-template-columns: minmax(0, 1fr) minmax(105px, 28%); }
  .game-room-live .livekit-container.camera-stage .livekit-tile { grid-column: 2; }
  .game-room-live .livekit-container.camera-stage .livekit-tile.is-main-camera { grid-column: 1; }
  .camera-stage-help { text-align: left; }
}
body.game-room-mode .topbar,
body.game-room-mode .app-shell {
  display: none !important;
}

body.game-room-mode .game-room-screen {
  min-height: 100vh;
}

.game-room-live.invite-collapsed #gameInvite,.game-room-live.life-collapsed #lifeOverlay{display:none !important}
.game-room-live #gameInvite[hidden]{display:none !important}
.game-room-live.focus-camera .game-live-bar #toggleInvitePanel,.game-room-live.focus-camera .game-live-bar #toggleLifePanel{display:none !important}
.game-room-live:fullscreen .game-live-bar,.game-room-live.pseudo-fullscreen .game-live-bar{position:sticky;top:0;z-index:20;max-height:35dvh;overflow:auto;padding:8px 170px 8px 10px;background:#171812f5;border:1px solid #796139;border-radius:8px}
.game-room-live:fullscreen #toggleGameFullscreen,.game-room-live.pseudo-fullscreen #toggleGameFullscreen{position:fixed;top:18px;right:20px;z-index:30;background:#d4a14e;color:#1b1107;border:2px solid #f4cf83;box-shadow:0 4px 15px #000a}
.game-room-live:fullscreen #toggleGameFullscreen::after,.game-room-live.pseudo-fullscreen #toggleGameFullscreen::after{content:' · Esc'}
.game-room-live.focus-camera #toggleCameraFocus{background:#d4a14e;color:#1b1107;border-color:#f4cf83}
@media(max-width:600px){.game-room-live:fullscreen .game-live-bar,.game-room-live.pseudo-fullscreen .game-live-bar{padding-right:12px;padding-top:65px;max-height:42dvh}}

/* Two illustrated seats in the mine beside the join form. */
.game-room-setup-area{display:grid;grid-template-columns:minmax(0,820px) minmax(280px,1fr);gap:18px;align-items:start}
.game-room-setup-area:has(.game-room-setup[hidden]){display:none}
.game-room-setup-area .game-room-setup{width:100%;max-width:none}
.table-board{position:relative;padding:18px;border:1px solid #a57840;border-radius:12px;background:linear-gradient(#101a16e8,#101a16e8),url('/mine-game-arena.webp') center/cover;color:#f3e6c8;box-shadow:0 12px 35px #0009}
.table-board-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px}
.table-board-heading small{color:#efbb66;font-size:.75rem;letter-spacing:.14em;font-weight:850}
.table-board-heading h2{font:700 clamp(1.2rem,2vw,1.65rem)/1.15 Georgia,serif;margin:5px 0}
.table-board-heading [role=status]{font-size:.75rem;color:#d6c7aa;text-align:right}
.table-board-list{display:grid;gap:15px}
.mine-table-card{border:1px solid #755d37;background:#10120fe8;border-radius:10px;padding:12px 15px 14px;box-shadow:inset 0 0 0 1px #e9c77b19}
.mine-table-title{display:flex;justify-content:space-between;gap:9px;align-items:center;font-weight:800;font-size:.95rem}
.mine-table-title strong{font-family:Georgia,serif;font-size:1.1rem;color:#f5d690}
.mine-table-state{font-size:.75rem;color:#98c7a7}.mine-table-card.is-playing .mine-table-state{color:#f1bd70}.mine-table-card.is-live .mine-table-state{color:#ff857c}
.mine-table-scene{position:relative;min-height:154px;display:grid;grid-template-rows:1fr 70px 1fr;justify-items:center;align-items:center;margin:9px 0 2px;background:radial-gradient(ellipse at center,#40605428 0%,transparent 72%)}
.mine-table-felt{grid-row:2;width:min(86%,270px);height:68px;border:8px ridge #75512b;border-radius:48%;background:radial-gradient(ellipse,#2c5648,#152c24);box-shadow:0 8px 0 #241509,0 15px 18px #000a,inset 0 0 0 2px #d0a76055;display:grid;place-items:center;font:bold .78rem Georgia,serif;letter-spacing:.12em;color:#f9deaa;text-shadow:0 2px 2px #000}
.mine-table-seat{max-width:95%;min-width:140px;padding:4px 12px;border:2px solid #8a6539;border-radius:9px;background:#352414;box-shadow:0 5px 0 #1b120b;text-align:center;font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mine-table-seat.occupied{border-color:#dfaa59;color:#fff4d5;background:#4b3020}
.mine-table-seat.top{grid-row:1}.mine-table-seat.bottom{grid-row:3}
.table-board-private{margin:17px 0 8px;padding-top:12px;border-top:1px solid #8b704a;color:#f0d9a7;font-weight:750;font-size:.88rem}
.table-board>small{color:#d7c7a5;font-size:.77rem;line-height:1.4;display:block}
@media(max-width:1100px){.game-room-setup-area{grid-template-columns:minmax(0,1fr)}.table-board{max-width:820px}.table-board-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.table-board-list{grid-template-columns:1fr}.game-room-setup-area{gap:14px}}

.studio-live-choice{display:inline-grid;gap:2px;color:#e7c889;font-size:.75rem;font-weight:800}.studio-live-choice[hidden]{display:none}.studio-live-choice select{min-height:34px;padding:4px 8px;border:1px solid #846638;border-radius:6px;color:#fff0d1;background:#121a16}

.mine-table-seat.return-seat{cursor:pointer;color:#fff4d5;border-color:#dfaa59;font:inherit;font-size:14px;min-height:44px;white-space:normal}.mine-table-seat.return-seat:hover{background:#665024}.mine-table-seat.return-seat:focus-visible{outline:3px solid #ffe09a;outline-offset:4px}

.table-reset-seat{display:block;margin:12px auto 0;min-height:44px;padding:8px 16px;border:1px solid #dfaa59;border-radius:8px;background:#352414;color:#fff4d5;font-size:14px;cursor:pointer}.table-reset-seat:hover{background:#665024}.table-reset-seat:disabled{opacity:.5;cursor:wait}

/* Keep interactive life controls in the fullscreen element, even in camera focus. */
.game-room-live:fullscreen:not(.life-collapsed) #lifeOverlay,.game-room-live.pseudo-fullscreen:not(.life-collapsed) #lifeOverlay{display:grid !important;flex:0 0 auto;position:relative;z-index:21}
.game-room-live:fullscreen .life-button,.game-room-live.pseudo-fullscreen .life-button{min-width:44px;min-height:44px}

/* A stable row outside camera images, including fullscreen. */
.tournament-match-panel{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:10px 14px;margin:8px 0;background:#151d15;border:1px solid #b59a53;border-radius:9px;color:#f6e6bd}
.tournament-match-panel>div:first-child{display:grid;gap:3px;min-width:210px}.tournament-match-panel [data-clock]{font-size:1.3rem;font-variant-numeric:tabular-nums}.tournament-match-panel .is-warning{color:#ffb478}.tournament-report-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.tournament-match-panel p{width:100%;margin:0;font-size:.85rem}.tournament-match-panel [data-stream]{font-size:.75rem}.tournament-match-panel select{color:#f6e6bd;background:#192218;padding:6px;border:1px solid #b59a53}.tournament-match-panel button:disabled{opacity:.55}
.tournament-orb-view{display:grid;justify-items:center;gap:10px;width:100%;perspective:700px}.tournament-orb-view[hidden]{display:none}.tournament-orb{position:relative;width:126px;height:176px;transform-style:preserve-3d;transform:rotateY(var(--orb-finish,0deg))}.orb-face{position:absolute;inset:0;border:3px solid #b69a57;border-radius:8px;backface-visibility:hidden;background:#24201a url('https://cards.scryfall.io/normal/front/6/b/6bec436c-2869-432a-b3cf-633a58af6d4c.jpg') center/cover}.orb-back{transform:rotateY(180deg)}.orb-face span{position:absolute;left:0;right:0;bottom:14px;padding:8px 3px;background:#101b10ee;color:#fff0b7;font-weight:900;text-align:center;overflow-wrap:anywhere}.tournament-orb.is-flipping{animation:tournament-orb-flip 2.2s ease-out both}@keyframes tournament-orb-flip{from{transform:rotateY(0) translateY(0)}35%{transform:rotateY(760deg) translateY(-22px)}to{transform:rotateY(var(--orb-finish)) translateY(0)}}
@media(prefers-reduced-motion:reduce){.tournament-orb.is-flipping{animation:none}}

/* Group existing controls without replacing their nodes or event bindings. */
.table-control-bar{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.table-control-menu{flex:0 1 auto;min-width:0}
.table-control-menu>summary{cursor:pointer;min-height:42px;box-sizing:border-box;padding:10px 12px;border:1px solid #78613e;border-radius:7px;background:#202b25;color:#ecd6a6;font-weight:700}
.table-control-menu>summary:hover,.table-control-menu>summary:focus-visible{background:#315346;outline:2px solid #d9b978;outline-offset:2px}
.table-control-menu[open]{flex-basis:100%;order:10}
.table-control-menu[open]>summary{background:#315346}
.table-control-items{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 0}
.table-control-items>[hidden]{display:none!important}
.game-room-live.focus-camera .table-control-menu[open]{display:block}
@media(max-width:600px){.table-control-items>.button{flex:1 1 145px}.table-control-menu>summary{font-size:12px;padding:10px}}
.deck-control-menu{margin:8px 0;border:1px solid #675334;border-radius:7px;background:#191e18}
.deck-control-menu>summary{cursor:pointer;padding:12px;color:#e6ca92;font-weight:800;min-height:44px;box-sizing:border-box}
.deck-control-menu>summary:focus-visible{outline:2px solid #dfbd78;outline-offset:2px}
.deck-control-menu .deck-file-actions,.deck-control-menu .builder-file-actions{padding:10px;margin:0;display:flex;flex-wrap:wrap;gap:8px}
.game-live-bar{flex-wrap:wrap}
/* Keep the camera return route above the tools, in flow rather than over cards. */
.studio-dock{position:relative;top:auto;display:flex;flex-wrap:wrap;gap:8px;margin:8px 14px;padding:10px 12px}
.studio-dock>div{flex:1 1 240px}
.studio-dock #returnToStudio{order:-1;min-height:44px}
@media(max-width:720px){.studio-dock>button{flex:1 1 140px}.studio-dock>div{flex-basis:calc(100% - 30px)}}

/* Visible broadcast controls stay outside collapsible menus and camera focus. */
.table-broadcast-banner{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 16px;align-items:center;padding:10px 14px;margin-bottom:8px;border:2px solid #efb353;border-radius:9px;background:#39280f;color:#ffe7b8;flex-shrink:0}
.table-broadcast-banner[hidden]{display:none!important}.table-broadcast-banner>strong{font-size:1rem;letter-spacing:.04em}.broadcast-hint{font-size:.8rem;grid-column:1}.broadcast-actions{grid-column:2;grid-row:1/3;display:flex;gap:8px}.broadcast-actions #startTwitchStream{min-height:46px;padding:10px 20px;font-size:.95rem;background:#f3ba55;color:#171107;border:2px solid #ffe0a0;display:inline-block!important}.broadcast-actions #startTwitchStream[hidden]{display:none!important}.broadcast-actions #startTwitchStream:disabled{background:#514329;color:#d3c5a7;opacity:1;border-color:#9d8759;cursor:not-allowed}.table-broadcast-banner .stream-consent-panel{grid-column:1/-1;margin:4px 0 0;padding:6px 0;background:transparent;border:0;flex-wrap:wrap}.table-broadcast-banner.broadcast-live{border-color:#f06b5d;background:#391816}.broadcast-live>strong{color:#ffb1a8}.broadcast-live .stream-consent-panel{display:none!important}.game-room-live.focus-camera .table-broadcast-banner #streamConsentPanel{display:flex!important}.game-room-live.focus-camera .table-broadcast-banner.broadcast-live #streamConsentPanel{display:none!important}
body.game-room-mode:has(.two-player-view:not([hidden])) .game-room-head{display:none}
.game-room-live.two-player-view{height:var(--table-height,90dvh)!important;min-height:0!important;display:flex;flex-direction:column;overflow:auto;box-sizing:border-box;padding:8px}
.two-player-view>.game-live-bar{flex-shrink:0;padding:2px 0 6px;gap:6px}.two-player-view>.life-overlay{flex-shrink:0;margin-bottom:5px}.two-player-view .life-player{padding:4px 10px}.two-player-view .life-player strong{font-size:2rem}.two-player-view .life-button{min-height:32px;min-width:36px}.two-player-view .camera-stage-help{flex-shrink:0;margin:3px 0 6px;font-size:.72rem}.two-player-view>.game-invite,.two-player-view>#gameTools{flex-shrink:0}
.game-room-live.two-player-view .livekit-container{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:minmax(0,1fr);grid-auto-rows:68px;gap:8px;flex:1 1 0;min-height:100px!important;height:auto!important;overflow:hidden;padding:0}
.two-player-view .livekit-container .livekit-tile{grid-column:auto!important;grid-row:1!important;min-width:0;min-height:0!important;width:100%!important;height:100%!important;position:relative!important;border-radius:7px;overflow:hidden}
.two-player-view .livekit-container .livekit-tile[data-camera-role=face]{grid-row:2!important;max-height:68px}.two-player-view .livekit-container .livekit-tile[data-camera-owner=local]{grid-column:1!important}.two-player-view .livekit-container .livekit-tile[data-camera-owner=remote]{grid-column:2!important}
.two-player-view .livekit-container .livekit-tile video{width:100%;height:100%;object-fit:contain!important;background:#080b09}.two-player-view .livekit-container .camera-hidden{display:none!important}.two-player-view .livekit-container:has(>.livekit-tile:not(.camera-hidden):only-of-type){grid-template-columns:minmax(0,1fr)!important}.two-player-view .livekit-container:has(>.livekit-tile:not(.camera-hidden):only-of-type)>.livekit-tile{grid-column:1!important}
.two-player-view .livekit-container.private-table-focus{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}.two-player-view .livekit-container.private-table-focus>.livekit-tile:not(.viewer-selected){display:none!important}.two-player-view .livekit-container.private-table-focus>.viewer-selected{grid-column:1!important;grid-row:1!important;max-height:none;outline:2px solid #dfb35f;outline-offset:-2px}
.two-player-view:fullscreen .game-live-bar,.two-player-view.pseudo-fullscreen .game-live-bar{position:relative;padding:3px!important;max-height:none}.two-player-view:fullscreen #toggleGameFullscreen,.two-player-view.pseudo-fullscreen #toggleGameFullscreen{position:static}.two-player-view:fullscreen .life-button{min-height:36px}
@media(max-width:650px){.table-broadcast-banner{gap:5px;padding:7px 9px}.broadcast-hint{font-size:.72rem}.broadcast-actions #startTwitchStream{padding:8px;font-size:.8rem}.two-player-view .game-live-bar strong,.two-player-view .game-live-bar small{font-size:.72rem}.two-player-view .life-help small{display:none}.two-player-view .life-overlay{grid-template-columns:1fr 1fr}.two-player-view .life-help{padding:0}.two-player-view .livekit-container .livekit-tile>span{font-size:.65rem}}

/* The play area owns the viewport; expanded controls float above it. */
body.game-room-mode:has(.two-player-view:not([hidden])){overflow:hidden}
.game-room-live.two-player-view:not([hidden]){position:fixed!important;inset:0!important;z-index:1000;width:100%!important;height:100dvh!important;max-width:none!important;margin:0!important;border:0!important;border-radius:0!important;padding:5px!important;overflow:hidden!important;background:#090c0a}
.game-room-live.two-player-view[hidden]{display:none!important}
.two-player-view>.game-live-bar{order:0;position:relative!important;z-index:40;padding:0 2px 4px!important;margin:0!important;gap:3px!important;flex:0 0 auto;overflow:visible!important;max-height:none!important}
.two-player-view .game-live-bar>div:first-child{gap:6px;font-size:11px}.two-player-view #gameParticipantCount{font-size:10px}.two-player-view #gameRoomStatus{max-width:180px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px}.two-player-view .table-control-bar{gap:4px}.two-player-view .table-control-bar>.button,.two-player-view .table-control-menu>summary{min-height:34px;padding:6px 9px;font-size:12px;line-height:20px;box-sizing:border-box}.two-player-view .table-control-bar>.button[aria-pressed=true]{background:#d9b15f;color:#15120a;border-color:#f5d995}.two-player-view .table-control-bar>[hidden]{display:none!important}.two-player-view .table-control-menu{position:relative;flex:0 0 auto!important;order:0!important}.two-player-view .table-control-menu[open]{flex-basis:auto!important;order:0!important}.two-player-view .table-control-menu .table-control-items{position:absolute;right:0;top:100%;z-index:60;display:flex;gap:8px;width:285px;max-width:85vw;max-height:65dvh;overflow:auto;padding:12px;border:1px solid #a58650;border-radius:8px;background:#17221afc;box-shadow:0 10px 25px #000b}.two-player-view .table-control-menu .match-actions{display:flex;gap:8px;flex-wrap:wrap}.two-player-view .table-control-menu:has(#toggleScreenShare[hidden]):has(#useDeckToolsLive[hidden]){display:none}
.two-player-view>.table-broadcast-banner{order:1;display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;margin:0 0 4px!important;padding:4px 9px!important;border-width:1px;min-height:0!important}.two-player-view .table-broadcast-banner>strong{font-size:12px;letter-spacing:.02em}.two-player-view .broadcast-actions{margin-left:auto}.two-player-view .broadcast-actions #startTwitchStream,.two-player-view .broadcast-actions #stopTwitchStream{min-height:32px;padding:5px 12px;font-size:12px;line-height:18px}.two-player-view .broadcast-hint{font-size:11px}.two-player-view .table-broadcast-banner .stream-consent-panel{display:flex;flex-basis:100%;gap:10px;margin:0!important;padding:0!important;min-height:0;font-size:11px;line-height:18px}.two-player-view .stream-consent-panel label{font-size:11px;letter-spacing:normal;display:flex;gap:7px;align-items:center}.two-player-view .stream-consent-panel input{width:17px;height:17px;margin:0}.two-player-view .stream-consent-panel>span{font-size:11px}.two-player-view .broadcast-live{min-height:28px!important}.two-player-view .broadcast-live .broadcast-hint{display:none}
.two-player-view>.life-overlay{order:2;display:grid!important;grid-template-columns:minmax(100px,1fr) auto minmax(100px,1fr)!important;gap:5px;align-items:center;flex:0 0 auto;padding:0!important;margin:0 0 4px!important;min-height:0}.two-player-view .life-player{display:flex!important;gap:9px;align-items:center;padding:3px 8px!important;min-height:36px;box-sizing:border-box;box-shadow:none}.two-player-view .life-player small{font-size:11px;letter-spacing:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.two-player-view .life-player strong{font-size:26px!important;line-height:1}.two-player-view .life-button{min-height:28px!important;min-width:30px!important;height:28px;width:30px}.two-player-view .life-help{display:block;grid-row:auto!important;grid-column:auto!important;padding:0!important;min-height:0}.two-player-view .life-help>b{font-size:12px}.two-player-view .life-help>small,.two-player-view .life-help .life-change-status{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.two-player-view>.camera-stage-help{display:none!important}.two-player-view>#gameTools{position:absolute;top:100px;left:12px;z-index:45;max-width:90%;background:#18241af5;border:1px solid #a58650;border-radius:8px;padding:10px}.two-player-view>#gameTools.is-collapsed{display:none!important}
.two-player-view>#gameInvite:not([hidden]){position:absolute;z-index:50;top:48px;left:12px;right:12px;margin:0!important;padding:12px;background:#1c251afc;box-shadow:0 10px 30px #000b}.two-player-view.invite-collapsed>#gameInvite{display:none!important}
.game-room-live.two-player-view .livekit-container{order:3;flex:1 1 0!important;min-height:0!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:minmax(0,1fr)!important;grid-auto-rows:0;align-items:stretch;align-content:stretch}
.game-room-live.two-player-view .livekit-container.has-face-cameras{grid-template-rows:minmax(0,1fr) 48px!important}.two-player-view .livekit-container .livekit-tile[data-camera-role=face]{max-height:48px}
.game-room-live.two-player-view .livekit-container.opponent-only,.game-room-live.two-player-view .livekit-container.private-table-focus{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}.two-player-view .livekit-container.opponent-only>.livekit-tile{display:none!important}.two-player-view .livekit-container.opponent-only>.livekit-tile[data-camera-owner=remote][data-camera-role=play-area]{display:block!important;grid-column:1!important;grid-row:1!important}.two-player-view .livekit-container.opponent-only>.camera-hidden{display:none!important}.two-player-view .livekit-container.opponent-only:not(:has([data-camera-owner=remote][data-camera-role=play-area]:not(.camera-hidden)))::after{content:'Waiting for opponent’s table camera…';display:grid;place-items:center;color:#e1cd9d;grid-column:1;grid-row:1}
.two-player-view .livekit-container .livekit-tile>span{font-size:11px;padding:4px 7px;bottom:5px;left:5px;letter-spacing:normal}.two-player-view .tile-hide-camera{opacity:0;pointer-events:none}.two-player-view .livekit-tile:hover .tile-hide-camera,.two-player-view .livekit-tile:focus-within .tile-hide-camera{opacity:1;pointer-events:auto}
@media(max-width:650px){.two-player-view .game-live-bar>div:first-child{display:none}.two-player-view .table-control-bar>.button,.two-player-view .table-control-menu>summary{padding:4px 6px;font-size:11px;min-height:30px}.two-player-view .broadcast-hint{display:none}.two-player-view .life-player{gap:4px;padding:3px 5px!important}.two-player-view .life-player small{max-width:70px}.two-player-view .life-player strong{font-size:22px!important}.two-player-view .table-control-menu .table-control-items{position:fixed;top:70px;right:8px}.two-player-view .stream-consent-panel>span{display:none}}
.game-room-live.two-player-view .livekit-container:not(:has(.livekit-tile[data-camera-owner=remote][data-camera-role=play-area]:not(.camera-hidden))),.game-room-live.two-player-view .livekit-container:not(:has(.livekit-tile[data-camera-owner=local][data-camera-role=play-area]:not(.camera-hidden))){grid-template-columns:minmax(0,1fr)!important}
.two-player-view .livekit-container:not(:has(.livekit-tile[data-camera-owner=local][data-camera-role=play-area]:not(.camera-hidden)))>.livekit-tile[data-camera-owner=remote]{grid-column:1!important}
.stream-social-button{border-color:#daba73;box-shadow:0 0 0 1px #efd58a33}.stream-social-dialog{width:min(560px,94vw);max-height:90dvh;overflow:auto;border:1px solid #e0ba6a;border-radius:12px;padding:25px;background:#14271e;color:#f0e6cf;text-align:left}.stream-social-dialog::backdrop{background:#000b}.stream-social-dialog h2{font:700 27px Georgia;margin:0 0 12px}.stream-social-dialog p{font-size:14px;line-height:1.6}.stream-social-dialog textarea{display:block;width:100%;min-height:125px;font-size:14px;line-height:1.6;padding:12px;background:#0b1811;color:#f5e7c9;border:1px solid #86784d}.stream-social-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.stream-social-actions a{text-decoration:none;display:inline-flex;align-items:center}.stream-social-button:disabled{opacity:.6}
/* Adjust games won where the score is displayed, including full-screen view. */
.match-score-adjust{display:flex;align-items:flex-end;justify-content:center;gap:5px;color:#f0ce83;white-space:nowrap}.match-score-adjust[hidden]{display:none}.match-score-label{font-size:11px;align-self:center;margin-right:3px}.match-score-column{display:grid;justify-items:center;gap:0}.match-score-arrows{display:flex;gap:2px}.match-score-arrows button{display:inline-flex;align-items:center;justify-content:center;width:24px;height:22px;min-height:22px;padding:0;border:1px solid #b69b5e77;border-radius:4px;background:#293d2d;color:#f4d58e;font-size:11px;cursor:pointer;touch-action:manipulation}.match-score-arrows button:hover:not(:disabled){background:#526343}.match-score-arrows button:disabled{opacity:.3;cursor:default}.match-score-arrows button:focus-visible{outline:2px solid #f3d58d;outline-offset:2px}.match-score-column>b{font:bold 22px/1.15 Georgia,serif;min-width:22px;text-align:center}.match-score-dash{font:bold 20px/1.3 Georgia,serif}.two-player-view .match-score-adjust{padding:1px 2px}.match-score-adjust~#lifeControlHint{margin-top:2px}
