/* The remote entry and table reuse the shared paper, ink, card art and shell. */
.remote-lobby { max-width: 1100px; margin: 8px auto; padding: clamp(16px, 2vw, 28px); text-align: center; }
body[data-remote-role][data-screen="menu"] .brand { display: none; }
body[data-remote-role][data-screen="menu"] #main-menu { max-width: 1100px; width: 100%; }
.remote-heading { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 20px; }
.remote-lobby-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.remote-lobby-status { flex: 1 0 100%; margin: 8px 0; }
@media (min-width: 900px) {
  body[data-remote-role="display"] .remote-lobby { display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 24px; align-items: start; }
  body[data-remote-role="display"] .remote-heading { grid-column: 1 / -1; }
  body[data-remote-role="display"] .remote-access { grid-column: 1; grid-row: 2 / 5; }
  body[data-remote-role="display"] .remote-seats { grid-column: 2; grid-row: 2; margin: 0; }
  body[data-remote-role="display"] .remote-setup { grid-column: 2; grid-row: 3; width: 100%; margin: 10px 0; }
  body[data-remote-role="display"] .remote-lobby-actions { grid-column: 2; grid-row: 4; }
  body[data-remote-role="display"] .remote-lifetime { grid-column: 1 / -1; }
}
.remote-heading h2 { font: 400 clamp(26px, 5vw, 46px)/1.1 var(--font-ui); margin: 0; text-align: left; }
@media (max-width: 560px) {
  .remote-heading { gap: 8px; }
  .remote-heading .brand-mark { width: 54px; height: 54px; }
}
.remote-access { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.remote-access p { margin: 4px; }
.remote-access a { overflow-wrap: anywhere; color: var(--pop-ink); }
.remote-qr { width: min(24vh, 200px); height: auto; border: 3px solid var(--pop-ink); border-radius: 8px; }
.remote-code { font-size: 22px; }
.remote-join { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 380px; margin: 20px auto; text-align: left; }
.remote-join input { width: 100%; min-height: 46px; padding: 8px 12px; font: 20px var(--font-ui); border: 2px solid var(--pop-ink); border-radius: 8px; }
.remote-seats { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 0; margin: 22px 0; }
.remote-seats li { min-width: 130px; display: grid; gap: 6px; padding: 10px 18px; border-bottom: 3px dashed var(--pop-ink); }
.remote-seats .connected { border-bottom-style: solid; }
.remote-lifetime { font-size: 14px; margin-top: 20px; }
.remote-setup { margin: 18px auto; }
.remote-configuration-summary { font-size: 22px; margin: 12px 0; }
.remote-configuration { display: flex; flex-wrap: wrap; align-items: end; justify-content: center; gap: 16px; }
.remote-configuration label { display: grid; gap: 6px; text-align: left; }
.remote-configuration select { min-height: 44px; min-width: 100px; padding: 5px 12px; font: 22px var(--font-ui); border: 2px solid var(--pop-ink); border-radius: 6px; background: var(--pop-paper); color: var(--pop-ink); }
.remote-catalog { margin-top: 24px; }
.remote-catalog .game-boxes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.remote-catalog .game-box { min-height: 200px; padding: 18px 12px 28px; grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; text-align: center; }
.remote-catalog .box-name { font-size: 28px; }
.remote-catalog .box-art { grid-column: 1; grid-row: 2; height: 85px; }
.remote-catalog .box-art .card-art { width: 46px; left: calc(50% - 23px); }
.remote-catalog .box-action { font-size: 18px; }
.remote-catalog .box-session { left: 4px; right: 4px; font-size: 12px; }
.remote-catalog .game-box.incompatible { filter: grayscale(1); --box-color: #d1cfc9; }
.remote-catalog .game-box[aria-pressed="true"] { outline: 4px solid var(--pop-ink); outline-offset: 4px; }
.remote-choice-message { max-width: 580px; margin: 18px auto 0; font-size: 19px; }
.remote-choice-message:empty { display: none; }
@media (max-width: 560px) {
  .remote-lobby { padding: 16px 12px; }
  .remote-catalog .game-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .remote-catalog .box-name { font-size: 24px; }
}
.remote-strip { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 14px; }
.remote-identity { max-width: 230px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.remote-connection { max-width: 320px; }
body[data-remote-role] .local-badge { display: none; }
body[data-remote-role][data-screen="game"] .topbar { flex-wrap: wrap; }
body[data-remote-role][data-screen="game"] .remote-strip { flex: 1 0 100%; justify-content: center; min-height: 22px; }
body[data-remote-role][data-screen="game"] .remote-strip .button { min-height: 32px; padding: 3px 10px; font-size: 14px; }
body[data-remote-role] .game-cinquillo .opponents { justify-content: center; }
body[data-remote-role] .game-cinquillo .cpu-badge { display: inline !important; font-size: 10px; margin-left: 3px; }
body[data-remote-role="display"][data-screen="game"] .table-scene { grid-template-rows: 38px minmax(0, 1fr); }
body[data-remote-role="display"] .controller, body[data-remote-role="display"] .control-strip,
body[data-remote-role="display"] #inspect-cards { display: none !important; }
body[data-remote-role="display"] #game-table { height: 100%; }
body[data-remote-role="display"] .game-cinquillo .card-slots { --sequence-card: min(160px, calc((100cqh - 32px) * 110 / 624)); }
body[data-remote-role="display"] #turn-status { font-size: clamp(20px, 2vw, 30px) !important; }
body[data-remote-role="display"] .opponent-detail strong { font-size: clamp(18px, 1.8vw, 28px) !important; }
body[data-remote-role="display"] .opponent-count { font-size: 20px !important; }
body[data-remote-role="controller"][data-remote-surface="hand"] #game-table { display: none; }
body[data-remote-role="controller"][data-remote-surface="hand"] .table-scene { grid-template-rows: 26px minmax(0, 1fr); }
body[data-remote-role="controller"][data-remote-surface="hand"] .controller { align-self: center; width: 100%; }
body[data-remote-role="controller"][data-remote-surface="hand"] .table-game { --hand-card: clamp(96px, 35dvh, 210px); }
body[data-remote-role="controller"][data-remote-surface="table"] .table-game { --hand-card: 62px; }
body[data-remote-role="controller"][data-remote-surface="table"] .hand { height: 98px; }
body[data-remote-role="controller"][data-remote-surface="table"]:not([data-remote-group-selection="true"]) .hand-card { --fan-x: 0px !important; --fan-y: 0px !important; --fan-angle: 0deg !important; }
body[data-remote-role="controller"][data-remote-surface="table"][data-remote-selected="false"] .controller { display: none; }
body[data-remote-role="controller"] .game-cinquillo .foundation { grid-template-columns: 22px minmax(0,1fr); }
body[data-remote-role="controller"] .game-cinquillo .card-slots { --sequence-card: min(80px, calc((100cqh - 20px) * 110 / 624)); }
body[data-remote-role] .game-cinquillo .card-slot { min-height: 0; }
@media (max-height: 450px) and (orientation: landscape) {
  body[data-remote-role][data-screen="game"] .brand h1 { font-size: 18px; }
  body[data-remote-role][data-screen="game"] .topbar { gap: 2px 8px; }
  body[data-remote-role][data-screen="game"] .remote-strip { min-height: 18px; font-size: 12px; }
  body[data-remote-role="controller"][data-remote-surface="hand"] .opponent-detail strong { font-size: 12px !important; }
  body[data-remote-role="controller"] .game .opponents { min-height: 22px; }
  body[data-remote-role="controller"][data-remote-surface="hand"] .table-scene { padding: 0 6px !important; }
}
@media (max-width: 550px) and (orientation: portrait) {
  .remote-strip { flex-wrap: wrap; }
  body[data-remote-role="controller"] .brand { display: none; }
  body[data-remote-role="controller"] .top-actions { width: 100%; justify-content: space-between; }
}
body[data-remote-role="controller"] .controller { justify-self: center; margin-inline: auto; }
body[data-remote-role="controller"][data-screen="game"] .table-game .table-scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: 26px minmax(0, 1fr) auto; }
body[data-remote-role="controller"][data-screen="game"][data-remote-surface="hand"] .table-game .table-scene { grid-template-rows: 26px minmax(0, 1fr); }
body[data-remote-role="controller"][data-screen="game"] .table-game .controller { grid-column: 1; width: 100%; align-self: end; }
body[data-remote-role="controller"][data-screen="game"][data-remote-surface="hand"] .table-game .controller { align-self: center; }
body[data-remote-role="controller"] .card-slot::after { content: ''; position: absolute; inset: 0; min-width: 44px; min-height: 44px; }
body[data-remote-role="controller"][data-remote-surface="table"]:not([data-remote-group-selection="true"]) .hand .hand-card:is(:hover,:focus-visible,.selected) { transform: translate(0, -20px) rotate(0deg) !important; }
body[data-remote-role] .table-game .opponents .opponent { flex: 0 0 auto; }
/* The radial No val table uses the same available surface in both audiences. */
body[data-remote-role] .game-tableau .opponents { justify-content: center; }
body[data-remote-role="display"][data-screen="game"] .game-tableau .tableau-table { width: min(100%, 1300px); }
body[data-remote-role="display"][data-screen="game"] .game-tableau .table-scene { grid-template-columns: minmax(0, 1fr); }
body[data-remote-role="controller"][data-remote-surface="table"] .game-tableau .controller { pointer-events: none; }
body[data-remote-role="controller"][data-remote-surface="table"] .game-tableau .hand-card { pointer-events: auto; }
