/* ═══════════════════════════════════════════════════════════════════════
   DBTS MOBILE — SPECTATOR APP (V 0.454)
   Pairs with scripts/mobile/dbts-mobile.js. Every rule except the small
   "Phone Layout" setting at the bottom is scoped to html.dbts-mobile, which
   is only ever set on a phone, so the PC game is untouched.

   Unlike the PC (one 2048×964 stage scaled to fit), the phone UI is authored
   in real CSS pixels so text and touch targets are native size.
   ═══════════════════════════════════════════════════════════════════════ */
html.dbts-mobile {
  --m-safe-t: env(safe-area-inset-top, 0px);
  --m-safe-b: env(safe-area-inset-bottom, 0px);
  --m-safe-l: env(safe-area-inset-left, 0px);
  --m-safe-r: env(safe-area-inset-right, 0px);
  --m-bar-h: 40px;
  --m-dock-h: 56px;
  --m-red: 255, 59, 79;
  --m-blue: 47, 141, 255;
  --m-accent: var(--m-red);
  --m-panel: linear-gradient(180deg, rgba(22, 36, 82, .96), rgba(7, 12, 32, .98));
  --m-line: rgba(140, 185, 255, .28);
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}
html.dbts-mobile[data-m-seat="p2"] { --m-accent: var(--m-blue); }
html.dbts-mobile, html.dbts-mobile body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
html.dbts-mobile body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#mSafeProbe { position: fixed; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none; padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); }

/* ── Take the PC chrome away ─────────────────────────────────────────── */
html.dbts-mobile #gameComposition {
  left: 0 !important; top: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important;
  transform: none !important;
}
html.dbts-mobile #gameComposition #viewport { width: 100% !important; height: 100% !important; touch-action: none; }
html.dbts-mobile #gameComposition > :not(#viewport),
html.dbts-mobile #handBrowserOverlay,
html.dbts-mobile #opponentHandDock,
html.dbts-mobile #spectatorHud,
html.dbts-mobile .playmat-build,
html.dbts-mobile #stackTooltip,
html.dbts-mobile #titleScreen > *,
html.dbts-mobile .player-profile-overlay,
html.dbts-mobile #settingsOverlay,
html.dbts-mobile #multiplayerOverlay,
html.dbts-mobile #changeSeatOverlay,
html.dbts-mobile .context-menu { display: none !important; }
html.dbts-mobile #titleScreen { background: #05060a; }
html.dbts-mobile #app { background: radial-gradient(ellipse 80% 60% at 50% 45%, rgba(var(--m-accent), .16), transparent 70%), linear-gradient(180deg, #050a1c, #060d24 55%, #04081a); transition: background .3s ease; }
html.dbts-mobile #table { box-shadow: none !important; border-color: transparent !important; background: none !important; }
html.dbts-mobile #table .card { cursor: default; }
html.dbts-mobile #toast { z-index: 100050 !important; top: calc(var(--m-bar-h) + var(--m-safe-t) + 10px) !important; max-width: calc(100vw - 24px); font-size: 15px !important; }
html.dbts-mobile.m-swap-anim #table { animation: mSwapIn .34s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes mSwapIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Shared pieces ───────────────────────────────────────────────────── */
#dbtsM { font-family: var(--f-ui, 'Barlow Condensed', Arial, sans-serif); color: #eef3ff; }
#dbtsM [hidden] { display: none !important; }
#dbtsM button { font-family: inherit; color: inherit; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; clip-path: none; min-height: 0; width: auto; text-transform: none; letter-spacing: 0; filter: none; -webkit-appearance: none; appearance: none; }
#dbtsM svg { display: block; }
.m-icon-btn {
  flex: none; display: grid !important; place-items: center; width: 40px !important; height: 34px !important; padding: 0 !important;
  background: rgba(255, 255, 255, .07) !important; box-shadow: inset 0 0 0 1px var(--m-line) !important;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
}
.m-icon-btn:active { background: rgba(120, 180, 255, .3) !important; }
.m-icon-btn svg { width: 20px; height: 20px; }
.m-icon-btn.is-spin svg { animation: mSpin .6s ease-out; }
@keyframes mSpin { to { transform: rotate(360deg); } }
.m-live-pill {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  background: rgba(255, 255, 255, .08); color: #a9bbdc;
  font: 800 12px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.m-live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #6f82a8; }
.m-live-pill.is-live { background: rgba(255, 64, 88, .2); color: #fff; }
.m-live-pill.is-live i { background: #ff4058; box-shadow: 0 0 8px #ff4058; animation: mBlink 1.2s ease-in-out infinite; }
@keyframes mBlink { 50% { opacity: .35; } }
.m-btn {
  min-height: 46px !important; padding: 0 22px !important;
  background: linear-gradient(180deg, rgba(64, 94, 160, .7), rgba(26, 42, 88, .9)) !important; color: #fff !important;
  box-shadow: inset 0 0 0 1px var(--m-line) !important;
  font: 800 17px/1 var(--f-ui) !important; letter-spacing: .12em !important; text-transform: uppercase !important;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px) !important;
}
.m-btn.is-primary { background: linear-gradient(180deg, #ffc047, #ff8d1f 48%, #f06200) !important; color: #2a0e00 !important; box-shadow: none !important; }
.m-btn:active { filter: brightness(1.2) !important; }

/* ── HOME ────────────────────────────────────────────────────────────── */
#mHome {
  position: fixed; inset: 0; z-index: 100005; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(12px + var(--m-safe-t)) calc(16px + var(--m-safe-r)) calc(18px + var(--m-safe-b)) calc(16px + var(--m-safe-l));
  /* Same artwork as the PC title screen, behind a light scrim so the room
     cards stay readable. Painted on a fixed layer so it does not scroll. */
  background: #05060a;
  isolation: isolate;
}
#mHome::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 5, 12, .38) 0%, rgba(3, 5, 12, .58) 45%, rgba(3, 5, 12, .8) 100%),
    #05060a url("../assets/dbts-main-menu-bg.jpg?v=0.417") center center / cover no-repeat;
}
.m-logo { display: block; height: 104px; width: auto; max-width: 82vw; object-fit: contain; object-position: center; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .7)); }
.m-logo[hidden] { display: none; }
@media (orientation: landscape) and (max-height: 480px) { .m-logo { height: 64px; } .m-brand b { font-size: 40px; } }
.m-home-head { display: flex; justify-content: center; }
.m-brand { display: grid; justify-items: center; gap: 8px; min-width: 0; text-align: center; }
.m-brand b { font: italic 900 56px/1 var(--f-ui); letter-spacing: .04em; color: #fff; text-shadow: 0 0 22px rgba(255, 150, 40, .7); }
.m-brand span { color: #fff; font: 800 15px/1 var(--f-ui); letter-spacing: .34em; text-transform: uppercase; text-shadow: 0 2px 8px #000; padding-left: .34em; }
.m-home-title { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--m-line); }
.m-home-title h1 { margin: 0; font: italic 800 26px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.m-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.m-room {
  display: flex !important; flex-direction: column; gap: 12px; width: 100% !important; padding: 14px 14px 12px !important; text-align: left;
  background: linear-gradient(180deg, rgba(18, 20, 28, .9), rgba(6, 7, 12, .94)) !important; box-shadow: inset 0 0 0 1px var(--m-line), inset 0 3px 0 rgba(255, 190, 80, .8) !important;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px) !important;
  transition: transform .12s ease, filter .12s ease;
}
.m-room:active { transform: scale(.985); filter: brightness(1.15) !important; }
.m-room:disabled { opacity: .55; }
.m-room.is-joining { opacity: 1; box-shadow: inset 0 0 0 2px #ffc53d !important; }
.m-room-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.m-room-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 20px/1.1 var(--f-ui); letter-spacing: .04em; color: #fff; }
.m-room-tags { flex: none; display: flex; align-items: center; gap: 5px; }
.m-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; background: rgba(255, 255, 255, .08); color: #a9bbdc; font: normal 800 11px/1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; }
.m-tag.is-live { background: rgba(70, 230, 120, .16); color: #7dffb0; }
.m-tag.is-lock { padding: 0 5px; color: #ffc53d; }
.m-tag svg { width: 12px; height: 12px; }
.m-versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.m-versus em { font: italic 900 18px/1 var(--f-ui); color: #ffc53d; letter-spacing: .06em; }
.m-side { display: grid; gap: 3px; min-width: 0; padding: 8px 10px; background: rgba(0, 0, 0, .28); }
.m-side.is-red { box-shadow: inset 3px 0 0 rgb(var(--m-red)); }
.m-side.is-blue { box-shadow: inset -3px 0 0 rgb(var(--m-blue)); text-align: right; }
.m-side b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 16px/1.1 var(--f-ui); color: #fff; }
.m-side small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 12px/1.1 var(--f-ui); color: #8fa3cc; }
.m-play-mode { display:inline-block; margin-left:5px; padding:2px 4px; border-radius:3px; background:rgba(255,255,255,.08); color:#9fe8ff; font:900 9px/1 var(--f-ui); letter-spacing:.08em; text-transform:uppercase; vertical-align:1px; }
.m-room-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-room-viewers { display: inline-flex; align-items: center; gap: 6px; color: #8fa3cc; font: 700 14px/1 var(--f-num, monospace); }
.m-room-viewers svg { width: 16px; height: 16px; }
.m-watch {
  display: inline-flex; align-items: center; justify-content: center; min-width: 108px; height: 36px; padding: 0 16px;
  background: linear-gradient(180deg, #ffc047, #ff8d1f 48%, #f06200); color: #2a0e00;
  font: 800 16px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.m-empty { grid-column: 1 / -1; display: grid; gap: 8px; justify-items: center; padding: 44px 16px; text-align: center; background: rgba(6, 7, 12, .78); box-shadow: inset 0 0 0 1px rgba(140, 185, 255, .14); }
.m-empty b { font: italic 800 22px/1.1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.m-empty span { font: 600 15px/1.35 var(--f-ui); color: #8fa3cc; }
.m-home-foot { margin: 16px 0 0; text-align: center; font: 600 13px/1.4 var(--f-ui); color: #b4bccd; letter-spacing: .03em; text-shadow: 0 1px 4px #000; }

/* ── WATCH ───────────────────────────────────────────────────────────── */
.m-bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 9500;
  display: flex; align-items: center; gap: 8px; height: calc(var(--m-bar-h) + var(--m-safe-t));
  padding: var(--m-safe-t) calc(8px + var(--m-safe-r)) 0 calc(8px + var(--m-safe-l));
  background: linear-gradient(180deg, rgba(4, 8, 22, .98), rgba(4, 8, 22, .9));
  box-shadow: 0 1px 0 var(--m-line);
}
.m-bar .m-icon-btn { height: 30px !important; width: 38px !important; }
.m-turn { flex: none; padding: 4px 9px; background: rgba(255, 255, 255, .08); font: 700 13px/1 var(--f-num, monospace); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.m-turn[data-seat="p1"] { box-shadow: inset 0 -2px 0 rgb(var(--m-red)); }
.m-turn[data-seat="p2"] { box-shadow: inset 0 -2px 0 rgb(var(--m-blue)); }
.m-ticker { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px/1 var(--f-ui); color: #a9bbdc; letter-spacing: .02em; }
.m-ticker b { font-weight: 800; color: #fff; }
.m-ticker[data-seat="p1"] b { color: rgb(var(--m-red)); }
.m-ticker[data-seat="p2"] b { color: rgb(var(--m-blue)); }
.m-ticker.is-new { animation: mTick .5s ease-out; }
@keyframes mTick { from { opacity: 0; } to { opacity: 1; } }
.m-viewers { flex: none; display: inline-flex; align-items: center; gap: 5px; color: #7dffb0; font: 700 13px/1 var(--f-num, monospace); }
.m-viewers svg { width: 16px; height: 16px; }

.m-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9500;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 6px;
  height: calc(var(--m-dock-h) + var(--m-safe-b));
  padding: 5px calc(6px + var(--m-safe-r)) calc(5px + var(--m-safe-b)) calc(6px + var(--m-safe-l));
  background: linear-gradient(0deg, rgba(4, 8, 22, .97), rgba(4, 8, 22, .78));
  box-shadow: 0 -1px 0 var(--m-line);
}
.m-player {
  --seat: var(--m-red);
  display: flex !important; align-items: center; gap: 10px; min-width: 0; padding: 0 10px !important; text-align: left;
  background: linear-gradient(100deg, rgba(var(--seat), .16), rgba(10, 16, 40, .7) 60%) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--seat), .32) !important;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px) !important;
  opacity: .62; transition: opacity .2s ease, box-shadow .2s ease;
}
.m-player[data-seat="p2"] { --seat: var(--m-blue); flex-direction: row-reverse; text-align: right; background: linear-gradient(260deg, rgba(var(--seat), .16), rgba(10, 16, 40, .7) 60%) !important; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%) !important; }
.m-player.is-shown { opacity: 1; box-shadow: inset 0 0 0 2px rgb(var(--seat)), inset 0 0 22px rgba(var(--seat), .3) !important; }
.m-player-id { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; flex-direction: inherit; }
.m-gem { flex: none; width: 11px; height: 11px; rotate: 45deg; background: rgb(var(--seat)); box-shadow: 0 0 10px rgb(var(--seat)); }
.m-player-names { display: grid; gap: 3px; min-width: 0; }
.m-player-names b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 17px/1 var(--f-ui); letter-spacing: .03em; color: #fff; }
.m-player-names small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 11px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: rgb(var(--seat)); }
.m-player-names u { text-decoration: none; color: #ffc53d; }
.m-life { flex: none; display: grid; justify-items: center; gap: 1px; min-width: 40px; padding: 3px 8px; background: rgba(0, 0, 0, .34); }
.m-life small, .m-stats small { font: 800 9px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: #8fa3cc; }
.m-life b { font: 700 24px/.95 var(--f-num, monospace); color: #fff; }
.m-life[data-tier="high"] b { color: #7dffb0; }
.m-life[data-tier="mid"] b { color: #ffce3c; }
.m-life[data-tier="low"] b { color: #ff5a6c; }
.m-stats { flex: none; display: flex; gap: 4px; }
.m-stats span { display: grid; justify-items: center; gap: 3px; min-width: 36px; padding: 5px 5px 4px; background: rgba(0, 0, 0, .26); }
.m-stats b { font: 700 14px/1 var(--f-num, monospace); color: #fff; }
.m-player-cam { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: rgba(0, 0, 0, .3); color: rgb(var(--seat)); }
.m-player-cam svg { width: 18px; height: 18px; }
.m-player-cam small { font: 800 11px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.m-swap {
  display: grid !important; place-items: center; align-content: center; gap: 2px; width: 62px !important; padding: 0 !important;
  background: linear-gradient(180deg, #ffc047, #ff8d1f 48%, #f06200) !important; color: #2a0e00 !important;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px) !important;
}
.m-swap:active { filter: brightness(1.2) !important; }
.m-swap svg { width: 22px; height: 22px; }
.m-swap span { font: 800 10px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; }
@media (max-width: 780px) {
  .m-stats span:nth-child(n+3) { display: none; }
  .m-ticker { font-size: 13px; }
}
@media (max-width: 620px) {
  .m-stats { display: none; }
}
.m-hint {
  position: fixed; left: 50%; top: calc(var(--m-bar-h) + var(--m-safe-t) + 8px); z-index: 9501; transform: translateX(-50%);
  max-width: calc(100vw - 24px); padding: 8px 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(4, 8, 22, .92); box-shadow: inset 0 0 0 1px rgba(255, 197, 61, .7); color: #ffe6a8;
  font: 700 13px/1 var(--f-ui); letter-spacing: .06em; pointer-events: none; animation: mTick .4s ease-out;
}

/* Webcam panels: the PC's hover-only buttons are always available by touch. */
html.dbts-mobile .dbts-cam-tools { opacity: 1; }
html.dbts-mobile .dbts-cam-tool { height: 30px !important; }
html.dbts-mobile .dbts-cam-tool[data-cam-act="expand"] { display: none !important; }

/* ── Card details (the game's own inspector, as a full-screen sheet) ─── */
html.dbts-mobile #cardInspector {
  left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important;
  width: auto !important; height: auto !important; min-width: 0 !important; min-height: 0 !important; max-width: none !important; max-height: none !important;
  transform: none !important; clip-path: none !important; animation: mSheetIn .18s ease-out both !important;
  z-index: 100020 !important; gap: 14px !important; flex-direction: row !important; align-items: stretch !important;
  padding: calc(10px + var(--m-safe-t)) calc(12px + var(--m-safe-r)) calc(10px + var(--m-safe-b)) calc(12px + var(--m-safe-l)) !important;
  background: rgba(3, 6, 16, .94) !important; box-shadow: none !important;
}
@keyframes mSheetIn { from { opacity: 0; } to { opacity: 1; } }
html.dbts-mobile #cardInspector::before, html.dbts-mobile #inspectorDevBar, html.dbts-mobile #inspectorResizeHandle { display: none !important; }
html.dbts-mobile .inspector-card-col { flex: 0 0 auto !important; width: auto !important; max-width: 42% !important; height: 100%; gap: 6px !important; justify-content: center; }
html.dbts-mobile #inspectorImage { flex: 1 1 auto; min-height: 0; width: auto !important; height: auto !important; max-width: 100% !important; max-height: 100% !important; object-fit: contain; border-radius: 9px; box-shadow: 0 10px 30px rgba(0, 0, 0, .7) !important; }
html.dbts-mobile #inspectorSubtitle { flex: none; font-size: 12px !important; }
html.dbts-mobile #inspectorFaceFlip { flex: none; min-width: 0 !important; min-height: 36px !important; padding: 0 18px !important; font-size: 14px !important; }
html.dbts-mobile .inspector-info { padding: 2px 52px 2px 0 !important; gap: 10px !important; -webkit-overflow-scrolling: touch; -webkit-user-select: none; user-select: none; }
html.dbts-mobile #inspectorTitle { font-size: 24px !important; line-height: 1.05 !important; }
html.dbts-mobile .inspector-meta-strip { gap: 5px !important; }
html.dbts-mobile .inspector-meta-strip > * { font-size: 13px !important; }
html.dbts-mobile .inspector-skill-panel { padding: 10px 12px !important; gap: 8px !important; min-height: 0; }
html.dbts-mobile .inspector-section-title { font-size: 11px !important; }
html.dbts-mobile .inspector-skill-body { font-size: 16px !important; line-height: 1.42 !important; overflow: visible !important; padding-right: 0 !important; }
html.dbts-mobile #inspectorClose { top: calc(8px + var(--m-safe-t)) !important; right: calc(10px + var(--m-safe-r)) !important; width: 42px !important; height: 42px !important; }
@media (orientation: portrait) {
  html.dbts-mobile #cardInspector { flex-direction: column !important; }
  html.dbts-mobile .inspector-card-col { max-width: none !important; height: 44%; }
}

/* ── Sheets ──────────────────────────────────────────────────────────── */
.m-sheet-wrap { position: fixed; inset: 0; z-index: 100025; display: grid; place-items: center; padding: 16px; background: rgba(2, 5, 14, .82); }
.m-sheet { display: grid; gap: 12px; width: min(420px, 100%); padding: 20px; background: var(--m-panel); box-shadow: inset 0 0 0 1px var(--m-line), inset 0 3px 0 #ffc53d; clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); }
.m-sheet h2 { margin: 0; font: italic 800 24px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.m-sheet p { margin: 0; font: 600 15px/1.35 var(--f-ui); color: #a9bbdc; }
.m-sheet input { width: 100%; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 0; background: rgba(2, 5, 16, .9); color: #fff; box-shadow: inset 0 0 0 1px rgba(150, 200, 255, .42); font: 600 18px/1.2 var(--f-ui); outline: none; -webkit-user-select: text; user-select: text; }
.m-sheet input:focus { box-shadow: inset 0 0 0 2px #3cd2ff; }
.m-sheet-error { min-height: 18px; color: #ff9aa8 !important; }
.m-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.m-rotate { position: fixed; inset: 0; z-index: 100030; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; background: #040816; }
.m-rotate b { font: italic 800 26px/1.1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.m-rotate > span { font: 600 16px/1.3 var(--f-ui); color: #a9bbdc; }
.m-rotate .m-btn { margin-top: 10px !important; }
.m-rotate-phone { width: 58px; height: 100px; border: 3px solid #ffc53d; border-radius: 12px; display: grid; place-items: end center; padding-bottom: 6px; animation: mRotate 2.2s ease-in-out infinite; }
.m-rotate-phone span { width: 16px; height: 3px; background: #ffc53d; border-radius: 2px; }
@keyframes mRotate { 0%, 25% { transform: rotate(0); } 60%, 100% { transform: rotate(90deg); } }

/* Connecting overlay reads fine at phone size with a little trimming. */
html.dbts-mobile .board-sync-window { max-width: calc(100vw - 32px) !important; }

/* Phone Layout setting (only injected on touch devices; unscoped on purpose
   so a touch-screen PC that sees the setting gets it styled too). */
.dbts-phone-layout-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dbts-phone-layout-setting select {
  min-width: 120px; padding: 6px 10px; font: inherit; color: #fff;
  background: rgba(8, 16, 40, .9); border: 1px solid rgba(120, 170, 255, .45); border-radius: 0;
}

.m-home-title .m-icon-btn { margin-left: auto !important; }

/* V0.510 — allow the DEV identity particles to remain visible in the mobile player dock. */
.m-player-names b.dbts-dev-identity { color:#ffc83d !important; overflow:visible; }

/* V0.518 — actual DBTS site build shown on mobile lobby cards. */
.m-tag.is-build.current { color: #8fe8ff; }
.m-tag.is-build.older { color: #ffb45f; background: rgba(255, 126, 24, .14); }
.m-tag.is-build.newer { color: #c99cff; background: rgba(145, 83, 255, .14); }
.m-tag.is-build.unknown { color: #7f8daa; }
