html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body.phone {
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

input {
  -webkit-user-select: text;
  user-select: text;
  width: 100%;
  font: inherit;
  font-size: 1.25rem; /* 16px or more stops iPhone zooming in on focus */
  font-weight: 700;
  color: var(--dark);
  background: #fff;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  outline: 3px solid transparent;
}
input:focus {
  outline-color: var(--yellow);
}

#app,
#join,
#gate {
  min-height: 100cqh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) 14px calc(14px + env(safe-area-inset-bottom));
  max-width: 520px;
  margin: 0 auto;
}

/* join */
#join h1 {
  text-align: center;
  font-size: 2rem;
  margin: 28px 0 8px;
}
#join label {
  display: block;
  font-weight: 800;
  color: var(--dim);
  margin: 18px 0 8px;
}
#swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 8px;
}
.swatch {
  width: 64px;
  height: 64px;
  justify-self: center;
  border-radius: 50%;
  border: 4px solid transparent;
  background: var(--c);
  padding: 0;
}
.swatch.on {
  border-color: #fff;
  box-shadow: 0 0 0 4px var(--c);
  outline: 3px solid var(--bg);
  outline-offset: -7px;
}
.swatch:disabled {
  opacity: 0.18;
}
#joinerr {
  color: var(--yellow);
  font-weight: 700;
  min-height: 1.4em;
  margin: 12px 0 4px;
}

/* buttons */
.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 16px;
  min-height: 64px;
  font-size: 1.2rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.16);
  color: var(--ink);
  margin-top: 10px;
}
.btn:active {
  transform: scale(0.97);
}
.btn.primary {
  background: var(--yellow);
  color: var(--dark);
}
.btn.good {
  background: var(--green);
  color: var(--dark);
}
.btn.bad,
.btn.danger {
  background: var(--red);
  color: var(--dark);
}
.btn.ghost {
  background: transparent;
  border: 2px solid var(--line);
  color: var(--dim);
}
.btn.small {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 0.95rem;
  width: auto;
  margin-top: 0;
}
.btn.huge {
  min-height: 34cqh;
  font-size: 2.2rem;
}
.btn:disabled {
  opacity: 0.4;
}

/* my name and score along the top */
.me {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 2px;
  font-size: 1.1rem;
}
.me i,
.row i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c);
  flex: none;
}
.me em,
.row em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--yellow);
  color: var(--dark);
  border-radius: 999px;
  padding: 2px 8px;
}
.me .pts {
  margin-left: auto;
  font-weight: 800;
  color: var(--yellow);
}

.body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 12px 0;
}
.hero {
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1.15;
  text-wrap: balance;
}
.dim {
  color: var(--dim);
  margin: 0;
  font-weight: 600;
}
.pad {
  padding: 6px 2px;
}
.card {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
}
.card h3 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}
.card p {
  margin: 0 0 8px;
}
.optrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-weight: 700;
  color: var(--dim);
  font-size: 0.9rem;
}
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.optbtn {
  border: 0;
  border-radius: 999px;
  min-width: 64px;
  min-height: 64px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
  font-size: 0.9rem;
}
.optbtn.on {
  background: #fff;
  color: var(--dark);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
}
.row.off {
  opacity: 0.45;
}
.row .nm {
  flex: 1;
}
.row b {
  color: var(--yellow);
}
.row .x {
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  font-weight: 900;
}

/* host controls stay at the bottom, under the thumb */
.hostbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: auto;
}
.hostlabel {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: auto;
}

/* trivia */
.buzz {
  flex: 1;
  width: 100%;
  min-height: 50cqh;
  border: 0;
  border-radius: 36px;
  background: var(--c);
  color: var(--dark);
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.35);
  touch-action: none;
}
.buzz:active {
  transform: translateY(8px);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.answerbox {
  background: var(--green);
  color: var(--dark);
  border-radius: 18px;
  padding: 14px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 900;
}
.answerbox small {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* bluff */
.qtext {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 4px 2px;
}
.btn.pick {
  text-align: left;
  text-transform: uppercase;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}
.rowline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.timer {
  font-size: 1rem;
}

/* draw */
.board {
  background: #fff;
  border-radius: 14px;
  display: block;
  touch-action: none;
  width: min(100%, 54cqh);
  aspect-ratio: 1;
  margin: 0 auto;
}
.word {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--yellow);
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}
.tool {
  width: min(40px, calc((100cqw - 28px - 48px) / 9));
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  background: var(--c, rgba(255, 255, 255, 0.14));
  padding: 0;
  font-weight: 900;
  display: grid;
  place-items: center;
}
.tool.on {
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--yellow);
}
.tool.wide {
  width: auto;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 0.9rem;
}
.tool .dot {
  background: #fff;
  border-radius: 50%;
  display: block;
}
.feedback {
  min-height: 1.5em;
  font-weight: 800;
  color: var(--yellow);
  text-align: center;
}

#toast {
  pointer-events: none;
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  background: #fff;
  color: var(--dark);
  font-weight: 800;
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  z-index: 20;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
#conn, #back-in {
  position: fixed;
  top: var(--controller-safe-top, env(safe-area-inset-top));
  left: 0;
  right: 0;
  background: var(--red);
  color: var(--dark);
  font-weight: 800;
  text-align: center;
  padding: 2px 8px;
  z-index: 30;
  font-size: 0.75rem;
  pointer-events: none;
}
#back-in { background: var(--green); }

/* feedback */
.fb h3 {
  margin-bottom: 8px;
}
.fbrow {
  display: grid;
  grid-template-rows: repeat(3, minmax(64px, 1fr));
  gap: 12px;
}
.in-feedback { justify-content: center; }
.mood {
  flex: 1; display: grid; grid-template-rows: auto 1fr;
  gap: 1rem; width: 100%; text-align: center;
}
.mood h2 { margin: 0; font-size: clamp(1.8rem, 9cqi, 3rem); line-height: 1.1; text-wrap: balance; }
.fbbtn {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 24px;
  min-height: 88px;
  padding: 12px;
  font-weight: 900;
  font-size: clamp(1.3rem, 6cqi, 1.8rem);
  text-align: left;
  color: var(--dark);
  box-shadow: inset 0 -4px rgba(0, 0, 0, 0.16);
  touch-action: manipulation;
}
.fbbtn span { justify-self: end; font-size: clamp(3rem, 17cqmin, 5rem); line-height: 1; }
.fbbtn.r0 { background: var(--green); }
.fbbtn.r1 { background: var(--yellow); }
.fbbtn.r2 { background: #d6b9ff; }
.fb h3 small { font-size: 0.85rem; font-weight: 600; color: var(--dim); }
.fbchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.fbchips .optbtn {
  min-height: 44px;
  font-size: 1rem;
  padding: 8px 14px;
}
.fb input {
  margin-bottom: 4px;
}
.in-lobby > .voice { grid-column: 1 / -1; }
.voice p { margin: 0; }
.voice .voice-quote { font-weight: 800; overflow-wrap: anywhere; }
.voice .dim { margin-top: 5px; }
.voice-actions, .voice-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.voice-actions .btn, .voice-choices .btn {
  width: auto;
  flex: 1 1 auto;
  min-height: 48px;
  margin: 0;
  padding: 8px 12px;
  font-size: 1rem;
}
.voice-choices .btn { flex-basis: 28%; }
.voice-status { flex: 1 1 auto; font-size: 1.25rem; font-weight: 900; }
.voice-status [data-voice-count] { font-variant-numeric: tabular-nums; }
[data-voice="hold"] { touch-action: none; -webkit-touch-callout: none; }

/* --- polish pass --- */
.btn, .optbtn, .gpick, .fbbtn { transition: transform 0.08s, filter 0.15s; }
.btn:active, .optbtn:active, .gpick:active, .fbbtn:active { transform: scale(0.95); filter: brightness(1.15); }
.btn.primary { box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3), 0 0 24px rgba(255, 210, 63, 0.25); }
.btn.primary:active { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); transform: translateY(4px); }
.btn.big { min-height: 64px; font-size: 1.3rem; }
.me {
  margin: 0 0 8px; padding: 2px 0;
  border-bottom: 1px solid var(--line);
}
.me i { width: 22px; height: 22px; box-shadow: 0 0 12px var(--c); }
.me .pts small { color: var(--dim); font-weight: 800; margin-right: 4px; }
.sect { margin: 14px 2px 0; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.center-text { text-align: center; }
.center.tight { flex: none; padding: 18px 0 6px; }
.gpicks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tonight { display: grid; gap: 8px; grid-column: 1 / -1; }
.tonight .sect { margin-top: 0; font-size: 1rem; color: var(--yellow); }
.tonight-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tonight .tonight-pick { display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center; overflow-wrap: anywhere; }
.tonight-pick:disabled { opacity: 0.55; }
.tonight-cover {
  position: relative; display: grid; place-items: center; width: 2.7rem; aspect-ratio: 1;
  border-radius: 0.45rem; color: var(--ink); background: radial-gradient(circle at 30% 25%, var(--k), var(--bg2) 78%);
}
.tonight-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.tonight-why { font-size: .94rem; font-weight: 600; }
@container (min-width: 590px) {
  .tonight-picks { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.gpick {
  border: 2px solid transparent; border-radius: 14px; min-height: 62px; padding: 6px;
  background: var(--card); font-weight: 900; font-size: 0.95rem; line-height: 1.15;
}
.gpick.on { background: #3a3040; color: var(--ink); border-color: var(--yellow); }
.card.game { animation: cardin 0.2s both; border: 1px solid var(--line); }
@keyframes cardin { from { opacity: 0; transform: translateY(8px); } }
.row {
  position: relative; overflow: hidden;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 42%, transparent) var(--w, 0%), transparent var(--w, 0%)), var(--card);
}
.row .rk { width: 1.4em; text-align: center; color: var(--dim); font-weight: 900; }
.row small { color: var(--dim); font-weight: 700; }
.row.me-row { outline: 2px solid #fff; }
.hero { text-shadow: 0 0 30px rgba(255, 210, 63, 0.25); }

/* --- Rumpus: characters, profile, shelves, landscape --- */
.me .avatar { width: 30px; height: 30px; filter: drop-shadow(0 0 8px var(--c)); flex: none; }
.btn .avatar { width: 28px; height: 28px; vertical-align: middle; margin-right: 6px; }
.gpick { position: relative; border-bottom: 4px solid var(--k, transparent); }
.gpick.played { opacity: 0.7; }
.gpick i { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 0.55rem; font-weight: 900; text-transform: uppercase; color: var(--dark); background: var(--green); border-radius: 99px; padding: 0 5px; }
.mystery { border-radius: 18px; padding: 16px; background: linear-gradient(120deg, #7b6cff, #ff4f8b); display: flex; flex-direction: column; gap: 2px; text-align: center; animation: cardin 0.3s both; }
.mystery small { text-transform: uppercase; letter-spacing: 0.16em; font-weight: 900; font-size: 0.75rem; }
.mystery b { font-size: 1.8rem; font-weight: 900; }
.mystery span { font-size: 0.85rem; font-weight: 700; opacity: 0.9; }
.prof { display: flex; flex-direction: column; gap: 12px; }
.swrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.sw { aspect-ratio: 1; border-radius: 50%; border: 4px solid transparent; background: var(--c); padding: 0; }
.sw.on { border-color: #fff; }
.sw:disabled { opacity: 0.15; }
.shrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sh { border: 3px solid transparent; border-radius: 16px; background: rgba(255,255,255,0.08); padding: 8px; }
.sh.on { border-color: #fff; background: rgba(255,255,255,0.2); }
.sh .avatar { width: 100%; display: block; }
@container (orientation: landscape) and (max-height: 520px) {
  #app, #join { max-width: none; padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .gpicks { grid-template-columns: repeat(6, 1fr); }
  .gpick { min-height: 48px; }
  .shrow { grid-template-columns: repeat(8, 1fr); }
  .swrow { grid-template-columns: repeat(10, 1fr); }
  .mood h2 { font-size: clamp(1.6rem, 8cqh, 2.5rem); }
  .fbrow { grid-template: 1fr / repeat(3, minmax(0, 1fr)); }
  .fbrow .fbbtn { grid-template-columns: 1fr; align-content: center; min-height: 64px; text-align: center; }
  .fbbtn span { justify-self: center; }
  .body.in-lobby { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; align-content: start; }
  .body.in-lobby > .gpicks, .body.in-lobby > .card, .body.in-lobby > p, .body.in-lobby > .mystery, .body.in-lobby > h4 { grid-column: 1 / -1; }
}

.ghead { display: flex; gap: 0.8rem; align-items: center; text-align: left; }
.ghead h3 { margin: 0 0 0.2rem; }
.ghead p { margin: 0; }
.gart { width: 5.5rem; height: 5.5rem; border-radius: 1rem; object-fit: cover; flex: none; box-shadow: 0 0.3rem 1rem rgba(0,0,0,0.4); }

.in-lobby > .game { margin: 0; }
.gpick:has(> i) { padding-top: 1.3rem; }
.lobby-filters { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.lobby-filters button {
  min-height: 44px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 99px; background: var(--card); font-weight: 800;
}
.lobby-filters button[aria-pressed="true"] { background: var(--yellow); color: var(--dark); }
.picker-grid {
  grid-column: 1 / -1; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.picker-tile {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: center; align-content: center; gap: 6px 8px;
  padding: 10px; text-align: left; overflow-wrap: anywhere;
}
.picker-grid .picker-tile, .tonight .tonight-pick { min-height: 64px; }
.picker-tile .tonight-cover { width: 2.2rem; }
.picker-tile small { grid-column: 1 / -1; font-size: .94rem; font-weight: 600; }
.picker-start {
  position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; margin-top: 8px;
  margin-inline: calc(-12px - var(--controller-safe-left)) calc(-12px - var(--controller-safe-right));
  padding: 8px calc(12px + var(--controller-safe-right)) calc(12px + var(--controller-safe-bottom)) calc(12px + var(--controller-safe-left));
  background: var(--bg); border-top: 1px solid var(--line);
}
.picker-start strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.picker-start .btn { flex: none; width: auto; min-width: 5rem; min-height: 64px; max-width: 48%; padding: 8px 14px; margin: 0; }
/* --- the shell: one box the whole controller lives in, which can be turned --- */
html, body.phone { height: 100%; overflow: hidden; overscroll-behavior: none; }
#screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; transform-origin: 0 0; container-type: size; overflow: hidden auto; -webkit-overflow-scrolling: touch; }
#screen {
  --controller-safe-top: env(safe-area-inset-top);
  --controller-safe-right: env(safe-area-inset-right);
  --controller-safe-bottom: env(safe-area-inset-bottom);
  --controller-safe-left: env(safe-area-inset-left);
}
body[data-controller-turn="cw"] #screen {
  --controller-safe-top: env(safe-area-inset-right);
  --controller-safe-right: env(safe-area-inset-bottom);
  --controller-safe-bottom: env(safe-area-inset-left);
  --controller-safe-left: env(safe-area-inset-top);
}
body[data-controller-turn="ccw"] #screen {
  --controller-safe-top: env(safe-area-inset-left);
  --controller-safe-right: env(safe-area-inset-top);
  --controller-safe-bottom: env(safe-area-inset-right);
  --controller-safe-left: env(safe-area-inset-bottom);
}
body[data-controller] #screen {
  overflow: hidden;
  overflow: clip;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
body[data-controller] #screen #app {
  height: 100%;
  min-height: 0;
  padding: calc(12px + var(--controller-safe-top)) calc(12px + var(--controller-safe-right))
    calc(12px + var(--controller-safe-bottom)) calc(12px + var(--controller-safe-left));
}
body[data-controller] #screen #app .body { user-select: none; -webkit-user-select: none; }
body[data-controller] #screen #app .body :is(button, a[href], select, textarea, input:not([type="hidden"]),
    summary, [role="button"], [role="slider"], [tabindex="0"], [data-fast]) {
  min-inline-size: 64px;
  min-block-size: 64px;
  touch-action: none;
}
body[data-controller] #screen #app .body :is(input, textarea, select) { font-size: max(16px, 1em); }
body[data-controller] #screen #app .body :is(.hostbar, :has(> button + button):not(:has(> :nth-child(5 of button)))) {
  gap: 12px;
}
body[data-controller] #screen #app .body [data-pg-pressed] {
  outline: 3px solid #fff;
  outline-offset: -4px;
  filter: brightness(1.2);
}
@container (max-width: 420px) {
  body[data-controller] #screen #app .body .draw-toolrow,
  body[data-controller] #screen #app .body .draw-toolrow :is(.draw-brushes, .draw-edits) {
    gap: 5px;
  }
  body[data-controller] #screen #app .body .draw-edits { padding-inline-start: 0; }
  body[data-controller] #screen #app .wordforge-alphabet {
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(64px, 1fr);
  }
}
.turnbtn { min-width: 64px; min-height: 64px; display: inline-flex; align-items: center; justify-content: center; gap: 0.35em; margin-left: 8px; padding: 4px 10px; border-radius: 99px; border: 1.5px solid var(--line); background: none; color: var(--dim); font: inherit; font-size: 16px; font-weight: 700; }
#gate { align-items: center; justify-content: center; text-align: center; gap: 4px; }
#gate[hidden] { display: none; }
.gateicon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
#gate h1 { margin: 10px 0 0; font-size: 34px; letter-spacing: 0.2em; text-transform: uppercase; }
.gatelead { margin: 6px 0 14px; font-size: 18px; font-weight: 700; max-width: 18em; }
.gatesteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: 100%; max-width: 360px; text-align: left; }
.gatesteps li { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 14px 16px; font-size: 17px; }
.gatesteps span { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: var(--dark); font-weight: 900; display: grid; place-items: center; }
.gatesteps svg { vertical-align: -0.35em; color: var(--yellow); }
.gatefoot { margin-top: 14px; color: var(--dim); font-size: 14px; }
.gpick i { width: 9px; height: 9px; padding: 0; font-size: 0; top: 7px; right: 7px; }

.intro-move img.move-demo { display: block; width: 100%; max-height: 36cqh; object-fit: contain; }

/* The guest can put the phone down until the room has a game. */
.body.in-lobby:has(> .guest-lobby) { display: flex; }
.guest-lobby {
  --guest-cover: min(76cqi, 38cqh, 19rem);
  gap: 12px; overflow-wrap: anywhere;
}
.guest-lobby :is(h2, p) { margin: 0; }
.guest-lobby h2 { font-size: clamp(2rem, 11cqi, 3.4rem); line-height: 1.05; text-wrap: balance; }
.guest-lobby p { font-size: clamp(1.25rem, 6cqi, 1.6rem); color: #e2dfee; font-weight: 650; }
.guest-lobby .ghead { flex: 1; flex-direction: column; justify-content: center; gap: 1.2rem; text-align: center; }
.guest-lobby .gart, .phone .in-lobby .guest-lobby .ghead:not(:has(img))::before {
  width: var(--guest-cover); height: var(--guest-cover);
}
.guest-lobby .ghead p { margin-top: .4rem; }
.guest-lobby .show-how { align-self: center; width: min(100%, 22rem); height: 80px; font-size: 1.6rem; }
@container (orientation: landscape) and (max-height: 520px) {
  .guest-lobby:has(.ghead) {
    --guest-cover: min(34cqi, 56cqh);
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    align-content: center; justify-items: center; gap: 8px 20px;
  }
  .guest-lobby .ghead { display: contents; }
  .guest-lobby :is(.hero, p, .show-how), .guest-lobby .ghead > div { grid-column: 2; }
  .guest-lobby .gart, .guest-lobby .ghead::before { grid-area: 1 / 1 / span 4 / 2; }
  .guest-lobby h2 { font-size: clamp(2rem, 10cqh, 3rem); }
}
.me em, .row em { font-size: .88rem; }
.me .identity { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; }
.me :is(b, .identity) { min-width: 0; overflow-wrap: anywhere; }
.me :is(.pts, .turnbtn) { flex-shrink: 0; }
.me .pts { color: var(--ink); }
#screen :is(#app, #join) {
  padding-inline: calc(12px + var(--controller-safe-left)) calc(12px + var(--controller-safe-right));
  padding-block: calc(8px + var(--controller-safe-top)) calc(12px + var(--controller-safe-bottom));
}
#join :is(input:not([type="checkbox"]), label:has(input), button),
#app :is(.in-lobby, .in-feedback, .in-over, .picker-start) :is(button, a.btn, input:not([type="checkbox"])) {
  min-block-size: 64px;
  min-inline-size: 64px;
}
#screen :is(#join, .me, .in-lobby, .in-feedback, .intro-controls, .hostbar, .picker-start) button:active { transform: none; }
#join label:has(input) { align-content: center; }
#joinerr:empty { display: none; }
#join h1 { margin-top: 8px; }
.in-lobby .optrow { flex-wrap: wrap; }
.in-lobby .opts { max-width: 100%; }
.in-lobby :is(.swrow, .shrow) { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
#screen #app:has(> .picker-start) { padding-bottom: 0; }
.game-return { justify-content: center; }
.game-return .btn { width: 100%; max-width: none; }
.game-return .dim { text-align: center; color: var(--ink); padding-block: 12px; }

/* Rotation and temporary help share a strip. Its size survives the help timeout. */
body[data-controller] #screen #app:has(> .play-help) {
  display: grid;
  grid-template: 64px minmax(0, 1fr) / minmax(0, 1fr) auto;
  gap: 4px 8px;
}
body[data-controller] #screen #app > .me {
  padding: 0; margin: 0; border: 0;
}

.play-help { grid-area: 1 / 2; align-self: center; }
#app:has(> .play-help) > .body { grid-area: 2 / 1 / 3 / -1; min-width: 0; }
#screen #app .hostbar { border: 0; padding-top: 0; justify-content: flex-end; }
#screen #app .hostbar .hostlabel { display: none; }
#screen #app .hostbar :is([data-act="skip"], [data-core="end"]) {
  background: var(--card); color: #e2dfee; border: 1px solid var(--line);
  box-shadow: none; font-size: 16px; font-weight: 650; padding: 4px 10px;
}
@container (min-width: 760px) and (max-height: 520px) {
  body[data-controller] #screen #app:has(> .play-help:not(.move-help)) {
    max-width: none;
    grid-template: auto 1fr / minmax(0, 1fr) 92px;
  }
  #app:has(> .play-help:not(.move-help)) > .body { grid-area: 1 / 1 / -1 / 2; }
  #app:has(> .play-help:not(.move-help)) > .me { grid-area: 1 / 2; flex-direction: column; }
  #app:has(> .play-help:not(.move-help)) > .me .turnbtn { flex-direction: column; width: 100%; padding-inline: 4px; }
  .play-help:not(.move-help) { grid-area: 2 / 2; align-self: start; }
  .play-help:not(.move-help) .show-how { width: 100%; padding-inline: 4px; }
}

.move-button {
  min-width: 64px; min-height: 64px; padding: 4px 8px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: #e2dfee;
  font: inherit; font-size: 16px; font-weight: 700; line-height: 1.15;
}
.intro-move-options {
  display: flex; align-items: center; gap: 8px;
  color: #e2dfee; font-size: 16px;
}
.move-play-tools, .move-edit-tools { display: flex; gap: 4px; }
.intro-move-options .move-button, .move-play-tools .show-how, .move-play-tools .move-button {
  width: 80px; padding-inline: 4px; font-size: 16px; line-height: 1.15;
}
.intro-move-options .move-button { flex: none; }
.move-hint, .move-edit-tools, #app[data-arranging] .move-play-tools { display: none; }
#app[data-arranging] .move-edit-tools { display: flex; }
#app[data-arranging] .move-hint { display: block; position: absolute; font-size: 16px; font-weight: 800; }
#app[data-arranging] .me { position: relative; }
#app[data-arranging] .me button { visibility: hidden; }
#app[data-arranging] .hostbar { opacity: .45; }
#app[data-arranging] [data-move-done] { background: var(--yellow); color: var(--dark); }
#app [data-move]:active { transform: none; }
#app[data-arranging] [data-move] {
  position: relative;
  outline: 2px dashed #fff; outline-offset: -4px;
}
#app[data-arranging] [data-move]::after {
  content: ''; position: absolute; top: 7px; left: 50%; translate: -50% 0;
  width: 24px; height: 7px; border: 1px solid #fff; border-radius: 6px;
  background: #27213c;
}
#app[data-arranging] [data-move-dragging] { outline: 3px solid var(--yellow); }

@container (max-width: 365px) {
  .move-play-tools .show-how, .move-play-tools .move-button { width: 72px; }
  #app:has(> .move-help) > .me:has([data-forget]) { gap: 4px; }
  #app:has(> .move-help) > .me:has([data-forget]) .turnbtn { width: 64px; font-size: 0; }
  #app:has(> .move-help) > .me:has([data-forget]) .turnbtn svg { width: 20px; height: 20px; }
  #app:has(> .move-help) > .me [data-forget] { min-width: 64px; padding-inline: 4px; }
}
@container (min-width: 500px) and (max-height: 380px) {
  .intro-card:has(.intro-move-options) .move-demo { max-height: 22cqh; }
}

@container (min-width: 560px) and (max-height: 520px) {
  #joinform { display: grid; grid-template-columns: 3fr 2fr; align-items: start; align-content: start; gap: 4px 18px; }
  #joinform > div:is(#newplayer, #recoverprofile) { grid-area: 1 / 1 / span 5 / 2; }
  #joinform > :is(#codewrap, #joinerr, button) { grid-column: 2; }
  .intro-move img.move-demo { max-height: 29cqh; }
}

/* =====================================================================
   System pass. Sizes, radii, colours and motion come from base.css.
   One primary (accent) action per screen; everything else is quiet.
   ===================================================================== */
input { border-radius: var(--r2); }
.btn { border-radius: var(--r2); background: var(--card-2); }
.btn.ghost { border: 1.5px solid var(--line); color: var(--ink-2); }
.btn.link {
  background: none; border: 0; box-shadow: none; color: var(--dim);
  font-size: var(--t2); font-weight: 700; text-decoration: underline; text-underline-offset: 4px;
}
.card, .mystery { border-radius: var(--r3); }
.row, .gpick, #toast { border-radius: var(--r2); }
.optbtn { background: var(--card-2); }
.btn, .optbtn, .gpick, .fbbtn, .show-how, .move-button, .turnbtn, .swatch {
  transition: transform var(--fast) var(--ease), filter var(--fast), background-color var(--fast), border-color var(--fast);
}
:is(.btn, .optbtn, .gpick, .fbbtn, .show-how, .move-button, .turnbtn):focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .btn, .optbtn, .gpick, .fbbtn, .show-how, .move-button, .turnbtn, .swatch { transition: none; }
  .card.game, .mystery, #toast { animation: none; }
}

/* ---- join: a name, a colour, one button ---- */
#join h1 {
  margin: 20px 0 24px; font-size: var(--t3); font-weight: 900;
  letter-spacing: 0.3em; text-indent: 0.3em; text-transform: uppercase; color: var(--dim);
}
#newplayer, #recoverprofile { display: grid; gap: var(--s4); }
#recoverprofile p { margin: 0; color: var(--dim); font-weight: 600; }
#name, #recoveremail, #code { min-height: 68px; font-size: var(--t4); font-weight: 800; padding-inline: 20px; }
#name::placeholder, #recoveremail::placeholder, #code::placeholder { color: #8d8a9c; font-weight: 700; }
#swatches { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3) var(--s2); }
.swatch { border: 0; box-shadow: inset 0 -5px rgba(0, 0, 0, 0.14); }
.swatch.on {
  border: 0; box-shadow: inset 0 -5px rgba(0, 0, 0, 0.14);
  outline: 4px solid #fff; outline-offset: 3px;
}
/* A taken colour steps back instead of looking like a smudge. */
.swatch:disabled { opacity: 0.3; transform: scale(0.42); box-shadow: none; }
#join label.check {
  display: flex; align-items: center; gap: var(--s3); margin: 0;
  color: var(--ink-2); font-size: var(--t2); font-weight: 700;
}
.check input {
  -webkit-appearance: none; appearance: none; flex: none; width: 28px; height: 28px; margin: 0; padding: 0;
  border: 2px solid var(--dim); border-radius: 8px; background: transparent center / 18px no-repeat;
}
.check input:checked {
  border-color: var(--accent); background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141227' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
#join #codewrap label { margin: var(--s4) 0 var(--s2); }
#joinerr { margin: var(--s3) 0 0; }
#joinform > .btn.primary { margin-top: var(--s4); font-size: var(--t4); min-height: 68px; }
#joinform > .btn.link { margin-top: var(--s1); }

/* ---- my strip along the top ---- */
.me {
  min-height: 48px; gap: var(--s2); margin: 0 0 var(--s3); padding: 0;
  font-size: var(--t3); border-bottom: 1px solid var(--line);
}
.me > b, .me .identity > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; font-weight: 800; }
.me .identity { position: relative; min-height: 44px; color: inherit; font: inherit; }
.me .turnbtn {
  position: relative; flex: none; height: 40px; min-height: 40px; margin: 0 0 0 auto; padding: 0 12px;
  border: 1.5px solid var(--line); color: var(--ink-2); font-size: 14px;
}
/* The pill is small to look at and 64px to hit. The extra reach goes up into the margin, never down into the game. */
.me :is(.turnbtn, .identity)::after { content: ''; position: absolute; inset: -12px -4px; }

body[data-controller] #screen #app > .me { min-height: 0; margin: 0 0 var(--s2); }
body[data-controller] #screen #app:has(> .play-help) > .me { margin: 0; }

/* ---- Show how: asked for from the lobby; in a game it is a small mark ---- */
.show-how {
  flex: none; align-self: flex-end; padding: .3rem .85rem; min-height: 64px; min-width: 64px;
  border: 1.5px solid var(--line); border-radius: var(--r2); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 800; touch-action: none;
}

/* ---- host lobby: every game is the same tile; tonight's first pick leads ---- */
.tonight .sect { font-size: var(--t1); letter-spacing: 0.14em; color: var(--accent); }
.tonight-picks, .picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.gpick, .gpick.picker-tile { border: 2px solid transparent; background: var(--card); color: var(--ink); }
.picker-tile, .tonight .tonight-pick.picker-tile {
  display: grid; grid-template-columns: auto minmax(0, 1fr); justify-items: start;
  align-items: center; align-content: center; gap: 6px 10px; padding: 10px; text-align: left; min-height: 96px;
}
.picker-tile b { font-size: 1rem; line-height: 1.15; }
.picker-tile small, .tonight-why { grid-column: 1 / -1; font-size: var(--t2); font-weight: 600; line-height: 1.25; color: var(--ink-2); }
.picker-tile .tonight-cover { width: 2.6rem; border-radius: 10px; }
.tonight-pick.lead { grid-column: 1 / -1; grid-template-rows: auto auto; column-gap: 14px; min-height: 0; }
.tonight-pick.lead .tonight-cover { grid-row: 1 / 3; width: 4.6rem; border-radius: var(--r1); }
.tonight-pick.lead b { align-self: end; font-size: var(--t4); }
.tonight-pick.lead small { grid-column: 2; align-self: start; }
.gpick.on { background: color-mix(in srgb, var(--accent) 14%, var(--card)); border-color: var(--accent); }
.gpick.played { opacity: 1; }
.gpick.played b { color: var(--ink-2); }
@container (min-width: 590px) {
  .tonight-picks, .picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tonight-pick.lead { grid-column: span 2; }
}
.picker-start { flex-wrap: wrap; gap: var(--s2) var(--s3); padding-top: var(--s2); background: #17142c; }
.picker-start strong { font-size: var(--t3); line-height: 1.15; }
.picker-start .show-how { align-self: center; }
.picker-options { flex: 1 0 100%; }
.picker-options .optrow { margin: 0 0 var(--s1); }
.picker-options .optbtn { min-height: 48px; min-width: 64px; }
#app .picker-start .picker-options .optbtn { min-block-size: 48px; }

/* ---- rating: three answers, nothing else ---- */
.mood.card { background: none; padding: 0; }
.fbbtn { border-radius: var(--r3); }

/* ---- standings ---- */
.row { background: linear-gradient(90deg, var(--c-tint) var(--w, 0%), transparent var(--w, 0%)), var(--card); min-height: 52px; }
.row .nm { min-width: 0; overflow-wrap: anywhere; }
.row b { font-variant-numeric: tabular-nums; }
.row.me-row { outline: 2px solid #fff; outline-offset: -2px; }
.game-return .dim { font-size: var(--t3); font-weight: 700; }
.in-over .hero { font-size: var(--t6); }

/* ---- guest lobby: you are in, look up ---- */
.guest-lobby .hero { font-size: clamp(2rem, 10cqi, 3rem); }
.guest-lobby p { text-wrap: balance; }
.guest-lobby .show-how { margin-top: var(--s5); height: 64px; font-size: var(--t3); width: min(100%, 16rem); }
.in-lobby > .btn.link { margin: 0; }

/* ---- host lobby, below the shelf: who is here, then the rarely used extras ---- */
.row .x { position: relative; width: 40px; height: 40px; background: var(--card-2); color: var(--ink-2); }
#app .in-lobby .row .x { min-block-size: 40px; min-inline-size: 40px; }
.row .x::after { content: ''; position: absolute; inset: -8px -12px; }
.row:has(.x) { padding-right: var(--s2); }
.extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); grid-column: 1 / -1; }
.extras > * { margin: 0; }
.extras > .btn { width: 100%; padding: 8px 10px; font-size: var(--t2); font-weight: 800; line-height: 1.2; }
.extras > :is(form, .btn:last-child:nth-child(odd)) { grid-column: 1 / -1; }

.share-card {
  display: grid;
  gap: var(--s4);
  margin-block: var(--s4);
  padding: var(--s4);
  border: 1px solid var(--line);
}
.share-group {
  display: grid;
  gap: var(--s3);
  min-width: 0;
}
.share-group + .share-group {
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}
.share-group h3 {
  margin: 0;
  font-size: var(--t3);
}
.share-group input {
  min-width: 0;
  padding: var(--s3);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
}
.share-qr {
  display: block;
  justify-self: center;
}
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.share-card .btn {
  min-height: 48px;
  margin: 0;
  padding: var(--s2) var(--s3);
  font-size: var(--t2);
}
.share-actions .btn {
  display: grid;
  flex: 1 1 8rem;
  place-items: center;
  width: auto;
  text-align: center;
  text-decoration: none;
}
@container (orientation: landscape) and (max-height: 520px) {
  .body.in-lobby > * { grid-column: 1 / -1; }
  .extras { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.row .avatar { width: 28px; height: 28px; flex: none; }

/* ---- Show how on the phone: the TV teaches, the phone is one READY button ---- */
.body.in-howto { gap: 0; }
.intro-card { flex: 1; display: flex; flex-direction: column; gap: var(--s3); min-height: 0; }
.intro-card .intro-ready {
  flex: 1; margin: 0; min-height: 96px; border-radius: var(--r3);
  font-size: clamp(2.6rem, 16cqi, 4.5rem); letter-spacing: 0.04em; touch-action: none;
}
.intro-card .intro-ready:disabled { opacity: 1; background: var(--green); box-shadow: none; }
.intro-controls { display: flex; gap: var(--s2); justify-content: space-between; }
.intro-controls:not(:has(button)) { display: none; }
.intro-controls .btn { width: auto; margin: 0 0 0 auto; min-height: 48px; touch-action: none; }
.intro-controls .move-button { min-height: 48px; padding-inline: 14px; }

/* ---- in a game the strip is three small marks: turn, help, move. Nothing to read. ---- */
body[data-controller] #screen #app:has(> .play-help) { grid-template: 32px minmax(0, 1fr) / minmax(0, 1fr) auto; gap: var(--s2); }
body[data-controller] #screen #app > .me .turnbtn,
.play-help .mark {
  position: relative; display: grid; place-items: center; width: 44px; min-width: 44px; height: 32px; min-height: 32px;
  margin: 0; padding: 0; border: 1.5px solid var(--line); border-radius: var(--r-pill);
  background: none; color: var(--dim); font-size: 0; line-height: 0;
}
body[data-controller] #screen #app > .me .turnbtn svg { width: 18px; height: 18px; }
.play-help .mark span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.play-help .show-how.mark::before { content: '?'; font-size: 18px; font-weight: 900; line-height: 1; }
/* Small to see, 64 by 52 to hit: the reach grows sideways and up into the margin, never into the game. */
body[data-controller] #screen #app > .me .turnbtn::after,
.play-help .mark::after { content: ''; position: absolute; inset: -12px -10px -8px; }
.move-play-tools, .move-edit-tools { gap: var(--s5); }
.play-help { align-self: center; }
#app[data-arranging] .move-edit-tools { gap: var(--s2); }
#app[data-arranging] .move-edit-tools .move-button { height: 32px; min-height: 32px; padding: 0 14px; border-radius: var(--r-pill); font-size: 14px; }
#app[data-arranging] .move-hint { font-size: 14px; color: var(--ink-2); }
@container (min-width: 760px) and (max-height: 520px) {
  body[data-controller] #screen #app:has(> .play-help:not(.move-help)) { grid-template: auto 1fr / minmax(0, 1fr) 44px; }
  #app:has(> .play-help:not(.move-help)) > .me .turnbtn { width: 44px; height: 44px; min-height: 44px; }
  .play-help:not(.move-help) .show-how.mark { width: 44px; height: 44px; min-height: 44px; }
  #app:has(> .play-help:not(.move-help)) > .me .turnbtn::after,
  .play-help:not(.move-help) .mark::after { inset: -10px; }
}

/* ---- after the face: an optional note, then eyes up ---- */
textarea {
  display: block; width: 100%; resize: none; -webkit-user-select: text; user-select: text;
  font: inherit; font-size: var(--t4); font-weight: 700; line-height: 1.25; color: var(--dark);
  background: #fff; border: 0; border-radius: var(--r2); padding: 14px 16px; outline: 3px solid transparent;
}
textarea:focus { outline-color: var(--accent); }
textarea::placeholder { color: #8d8a9c; font-weight: 600; }
.note { display: grid; gap: var(--s3); padding-top: var(--s4); }
.note label { font-size: var(--t5); font-weight: 900; line-height: 1.1; text-align: center; }
.note .two .btn { margin: 0; min-height: 72px; font-size: var(--t4); }
.fb textarea { font-size: var(--t3); margin-bottom: var(--s2); }
.lookup { margin: 0; font-size: clamp(2rem, 10cqi, 3rem); font-weight: 900; }
.game-return .btn:disabled { opacity: 1; background: var(--card); color: var(--ink-2); box-shadow: none; }
.picker-start strong { min-width: 5.5rem; overflow-wrap: break-word; }
.picker-start .btn { white-space: nowrap; }

/* ---- host lobby: a remote for the picker on the TV ---- */
.reconnect p { margin: 0; font-weight: 750; }
.reconnect .btn { width: min(100%, 16rem); }
.body.in-lobby:has(> .remote) { display: flex; }
.remote { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--s4); min-height: 0; }
.remote-find { display: flex; flex: none; align-items: center; gap: var(--s2); width: 100%; min-width: 0; }
#find {
  flex: 1; min-width: 0; min-height: 64px; padding: 10px 20px; border-radius: var(--r-pill);
  background: var(--card); color: var(--ink); font-size: var(--t3); font-weight: 700; -webkit-appearance: none; appearance: none;
}
#find::placeholder { color: var(--dim); font-weight: 600; }
.remote .surprise-btn { min-height: 64px; padding-inline: var(--s3); border-radius: var(--r-pill); white-space: nowrap; }
.pad {
  flex: 1; display: grid; grid-template: repeat(3, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr)); gap: var(--s2);
  width: min(100%, 58cqh); max-height: min(100cqw - 24px, 58cqh); aspect-ratio: 1; margin-block: auto;
}
.pad[inert] { opacity: 0.3; }
.nav {
  display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--r3);
  background: var(--card-2); color: var(--ink); box-shadow: inset 0 -5px rgba(0, 0, 0, 0.22); touch-action: none;
  transition: background-color var(--fast), transform var(--fast) var(--ease);
}
.nav:active { background: var(--accent); color: var(--on-accent); transform: scale(0.96); }
.nav.up { grid-area: 1 / 2; } .nav.left { grid-area: 2 / 1; } .nav.right { grid-area: 2 / 3; } .nav.down { grid-area: 3 / 2; }
.direct { position: absolute; left: 0; bottom: 0; display: flex; opacity: 0; }
.direct i { display: block; width: 3px; height: 3px; }
/* [cast] put the TV page on the TV: below the pad, never above the game controls */
.tvwin { flex: none; width: 100%; }
.tvwin .btn { margin: 0; min-height: 64px; font-size: var(--t3); color: var(--ink-2); }
.tvwin .btn:disabled { opacity: 0.5; }
.tvnote { margin: var(--s2) 2px 0; font-size: var(--t2); line-height: 1.3; color: var(--ink-2); text-align: center; }
.tvwin > .tvnote:first-child { margin: 0 2px var(--s2); }
.tvmore { display: flex; gap: var(--s2); }
.tvmore .btn { flex: 1 1 0; min-width: 0; padding-inline: var(--s2); font-size: var(--t2); line-height: 1.15; overflow-wrap: anywhere; }
.picker-start .btn.primary { flex: 1; max-width: none; min-height: 72px; font-size: var(--t4); }
.picker-start .show-how { min-height: 72px; }
@container (orientation: portrait) and (max-height: 650px) {
  .remote { gap: var(--s2); }
  .remote:has(> .tvwin) .pad { width: min(100%, clamp(220px, 100cqh - 330px, 300px)); }
}
@container (min-width: 560px) and (max-height: 520px) {
  .remote { display: grid; grid-template: auto minmax(0, 1fr) / auto minmax(0, 1fr); gap: var(--s2) var(--s4); }
  .remote-find { grid-area: 1 / 2; }
  .pad { grid-area: 1 / 1 / 3 / 2; width: auto; height: clamp(220px, 50cqh, 254px); max-height: none; margin: 0; }
  .remote .tvwin { grid-area: 2 / 2; align-self: start; width: auto; min-width: 0; }
}
/* Short landscape leaves room for two rows of arrows between the name row and Start. */
@container (min-width: 560px) and (max-height: 444px) {
  .pad {
    grid-template: repeat(2, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr));
    height: clamp(148px, 48cqh, 200px); aspect-ratio: 3 / 2; max-width: 46cqw;
  }
  .nav.left { grid-area: 2 / 1; } .nav.down { grid-area: 2 / 2; } .nav.right { grid-area: 2 / 3; }
}
.radar-card { display: flex; flex-direction: column; gap: var(--s2); }
.radar-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.radar-badge { font-size: var(--t1); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--yellow); }
.radar-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.radar-tabs .btn { margin: 0; min-height: 44px; }
.radar-svg { width: 100%; max-width: 280px; margin: 0 auto; display: block; overflow: visible; }
.radar-traits { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; font-size: var(--t2); color: var(--ink-2); }
