/* Keep the excavation surface scrollable and the decision buttons accessible. */
#pvpLobbyContainer .ah-lobby-grid {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; align-items:stretch;
}
.ah-game-card.sr-lobby-card {
  grid-column:auto; display:flex; flex-direction:column; align-items:center; justify-content:space-between;
  width:100%; gap:5px; padding:10px 8px; text-align:center; color:#eee7d4; cursor:pointer;
  border:1px solid #9d8054; border-radius:14px; background:linear-gradient(120deg,#172323,#15181b 62%,#23201b);
  font-family:inherit; box-sizing:border-box;
}
.sr-lobby-art { width:54px; height:54px; aspect-ratio:1; object-fit:contain; order:0; }
.sr-lobby-copy { display:contents; }
.sr-lobby-copy small {
  order:-1; display:inline-block; align-self:center; max-width:100%; margin:-2px 0 2px; padding:1.5px 7px;
  font-size:9.5px; font-weight:800; line-height:1.25; border-radius:999px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  background:linear-gradient(135deg,#0d9488,#14b8a6); color:#fff;
}
.sr-board-heading strong { color:#83e7d8; }
.sr-lobby-copy strong { order:1; font-size:13.5px; font-weight:900; line-height:1.25; color:#fff; }
.sr-lobby-copy > span {
  order:2; font-size:10.5px; line-height:1.32; color:#cbd5e1;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.sr-lobby-copy b {
  order:3; margin-top:auto; border-radius:999px; padding:4px 12px; color:#241c12; background:linear-gradient(135deg,#fde047,#f59e0b); font-size:11px; font-weight:900;
}
.sr-decode-portal-btn { margin-top:4px; border-radius:6px; padding:4px 12px; color:#241c12; background:#ebc675; font-size:12px; }
.sr-decode-portal,.sr-decode-portal-left { display:flex; align-items:center; gap:10px; }
.sr-decode-portal { margin:0 0 10px; padding:8px 12px; justify-content:space-between; border:1px solid #937b50; border-radius:12px; background:#172022; cursor:pointer; }
.sr-decode-portal-ico { width:42px; height:42px; object-fit:contain; }
.sr-decode-portal-title { color:#f8e6b2; font-weight:800; }
.sr-decode-portal-sub { font-size:12px; color:#d1d5d2; }
.sr-decode-portal-btn { flex:none; }
#pvpPane-scratch { flex:1 1 0%; min-width:0; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; justify-content:flex-start; gap:3px; padding:0 2px 3px; box-sizing:border-box; }
#pvpPane-scratch > * { flex-shrink:0; min-width:0; }
#pvpPane-scratch > .ss-universal-plaque { order:-10 !important; margin-bottom:1px; }
.sr-submode-bar,.sr-seats-row,.sr-board-grid,.sr-dual-btns { display:grid; }
.sr-submode-bar { grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
.sr-submode-btn,.sr-seat-card { background:#142023; color:#e2e7e3; border:1px solid #455253; border-radius:7px; }
.sr-submode-btn { min-height:30px; padding:2px 3px; font-family:inherit; font-size:11.5px; font-weight:700; line-height:1.15; cursor:pointer; }
.sr-submode-btn small { display:block; font-size:9px; color:#aec1bd; }
.sr-submode-btn.active { border-color:#74ddcf; background:#193839; color:#f6e2ac; }
.sr-submode-btn:disabled { cursor:default; }
.sr-pool-box,.sr-activity { border:1px solid #4e5047; background:#121c20; border-radius:8px; padding:3px 6px; }
.sr-pool-top,.sr-pool-main,.sr-pool-counts,.sr-pool-counts > span,.sr-board-heading { display:flex; align-items:center; flex-wrap:wrap; gap:4px; }
.sr-pool-top,.sr-board-heading { justify-content:space-between; }
.sr-pool-main { color:#f3dca4; min-width:0; font-size:11.5px; overflow-wrap:anywhere; }
.sr-pool-main b { font-size:13px; }
.sr-pool-counts { font-size:11.5px; color:#d6dfdc; gap:6px; }
.sr-pool-counts img { height:14px; width:14px; object-fit:contain; }
.sr-guide-strip { color:#e9e2cc; font-size:11px; line-height:1.25; font-weight:700; overflow-wrap:anywhere; }
.sr-board-heading { font-size:11.5px; padding:0 2px; }
.sr-board-heading small { color:#b7c9c5; font-size:10px; }
.sr-seats-row { grid-template-columns:repeat(5,minmax(0,1fr)); gap:3px; }
.sr-seat-card { min-width:0; text-align:center; padding:2px 1px; }
.sr-seat-card.is-me,.sr-seat-card.seat-acting { border-color:#dfbd70; color:#ffe5a8; }
.sr-seat-card.seat-locked,.sr-seat-card.seat-shared { border-color:#57acaf; }
.sr-seat-card.seat-out,.sr-seat-card.seat-shield { color:#d6a6ae; }
.sr-seat-top { display:flex; justify-content:center; align-items:center; gap:2px; }
.sr-seat-ship { width:13px; height:13px; object-fit:contain; }
.sr-seat-name { font-size:10.5px; font-weight:700; }
.sr-seat-status { font-size:9.5px; line-height:1.15; }
.sr-seat-name,.sr-seat-status { overflow-wrap:anywhere; }
.sr-board-grid {
  width:min(100%,clamp(164px,26.5vh,228px));
  width:min(100%,clamp(164px,calc(var(--app-vh, 100vh) * 0.265),228px));
  width:min(100%,clamp(164px,26.5dvh,228px)); aspect-ratio:1; align-self:center; box-sizing:border-box;
  grid-template:repeat(4,minmax(0,1fr)) / repeat(4,minmax(0,1fr)); gap:2.5px; padding:3px;
  border-radius:8px; border:1px solid #a88d60; background:#131718;
}
.sr-cell { appearance:none; position:relative; padding:0; margin:0; border:1px solid #685a44; border-radius:4px; background:#20282b; color:#f7e9c4; overflow:hidden; cursor:pointer; user-select:none; touch-action:pan-y; }
.sr-cell:focus-visible { outline:2px solid #fff; outline-offset:-2px; z-index:2; }
.sr-cell:active:not(.is-revealed) { transform:scale(.98); }
.sr-cell.is-target,.sr-cell.is-shared,.sr-cell.is-locked-other { border-color:#7ff1de; }
.sr-foil-cvs,.sr-cell-under { position:absolute; inset:0; height:100%; width:100%; }
.sr-cell-under { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:1px; }
.sr-u-ico { width:52%; height:52%; object-fit:contain; }
.sr-u-val { font-size:10px; font-weight:800; line-height:1.05; }
.sr-cell-no,.sr-cell-badge { position:absolute; z-index:2; color:#fff1cf; border-radius:3px; background:#111a1deb; font-weight:750; pointer-events:none; }
.sr-cell-no { left:2px; top:2px; padding:0 3px; font:700 11px/1.3 var(--mono,monospace); }
.sr-cell-badge { bottom:1px; left:1px; right:1px; font-size:10px; line-height:1.15; overflow-wrap:anywhere; color:#b8fff3; }
.sr-cell.is-revealed .sr-cell-badge { top:2px; bottom:auto; right:1px; left:auto; font-size:9px; }
.sr-cell.out-gem { background:#153c39; }
.sr-cell.out-crown { background:#504127; }
.sr-cell.out-rift { background:#412431; }
.sr-cell.is-dimmed { opacity:.55; }
.sr-activity { font-size:11px; color:#e4e9e5; }
.sr-activity strong { color:#c9b78c; }
#srActionLog { list-style:none; padding:0; margin:2px 0 0; max-height:2.7em; overflow-y:auto; }
#srActionLog:empty { margin:0; }
#srActionLog li { padding:1px 0; line-height:1.28; overflow-wrap:anywhere; }
#pvpPane-scratch .jp-telemetry-row { display:flex; flex-wrap:wrap; padding:3px 4px; }
#pvpPane-scratch .jp-tel-card { flex:1 1 88px; min-width:0; }
#pvpPane-scratch .jp-tel-card .v { display:block; white-space:normal; overflow-wrap:anywhere; overflow:visible; font-size:12px; }
.sr-dual-btns { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.sr-dual-btns button { min-height:38px; height:auto; white-space:normal; overflow-wrap:anywhere; }
.sr-btn-evac { color:#dcfff8; border:1px solid #65c6b3; border-radius:8px; background:#194d47; padding:3px 6px; font-weight:800; }
.sr-btn-evac small { display:block; font-size:10px; }
.sr-dual-btns button:disabled { opacity:.62; }
#srMainBtn { font-size:12.5px; padding:4px; line-height:1.15; }
#srMainBtn .btn-title-row { white-space:normal; overflow-wrap:anywhere; display:inline; }
.sr-mode .pvp-console-box { flex:none; }
.sr-mode.sr-in-round #pvpStakeRow { display:none; }
#srIntroReplay { min-height:26px; padding:1px 6px; border:1px solid #658378; border-radius:6px; background:#172725; color:#b7e6da; font:inherit; font-size:11px; cursor:pointer; }
#srIntroReplay:disabled { opacity:.55; }
#pvpPane-scratch[data-phase=betting] .sr-guide-strip { order:-3; }
#pvpPane-scratch[data-phase=betting] .sr-board-grid { order:-2; }
#pvpPane-scratch[data-phase=betting] .sr-board-heading { order:-1; }
#pvpPane-scratch[data-phase=playing] .sr-guide-strip { order:-4; }
#pvpPane-scratch[data-phase=playing] .sr-seats-row { order:-3; }
#pvpPane-scratch[data-phase=playing] .sr-board-grid { order:-2; }
#pvpPane-scratch[data-phase=playing] .sr-activity { order:-1; }
.sr-guide-strip { background:#192927; border:1px solid #64644c; border-radius:7px; padding:3px 6px; }
@media (max-height:700px) {
  #pvpPane-scratch[data-phase=playing] .sr-board-grid {
    width:min(100%,clamp(150px,24vh,210px));
    width:min(100%,clamp(150px,calc(var(--app-vh, 100vh) * 0.24),210px));
    width:min(100%,clamp(150px,24dvh,210px));
  }
  .sr-seat-ship { width:11px; height:11px; }
}
@media (prefers-reduced-motion:reduce) {
  .sr-cell,.sr-foil-cvs { transition:none!important; transform:none!important; }
}
