/* Turquoise Play's page around one Daily Rounds game. The play wrapper already shows the game's name and the way back to
   the shelf, so the page shows only the game: the card centred in the frame, its step counter above it, and the
   countdown and sound buttons in the frame's top right corner. The name stays in the page for screen readers. Loaded
   after daily-rounds-game.v1.css, so these rules win over the hub header styles. */
/* --tq-play-exit: the Play wrapper's fullscreen exit button over this corner (play/README.md "Full screen") */
.pv-header.dr-top { position: absolute; top: 0; right: var(--tq-play-exit, 0px); left: auto; z-index: 40; max-width: none; margin: 0; padding: 12px 16px;
  background: transparent; backdrop-filter: none; box-shadow: none; }
.dr-top.scrolled { box-shadow: none; }
.dr-top .pv-header-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dr-top .pv-actions { flex: none; }

/* The game fills the public page's stage edge to edge: the frame is the surface, with no card inside it and no gray
   around one. A scroll that reaches the frame's end stops there instead of carrying on into the page around it. */
html { overscroll-behavior: contain; }
html, body { background: var(--pv-card); }
.dr-q { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.rr-desk { box-shadow: none; }   /* Rate Radar's console sits in the stage, not floating above it */

.dr-main { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 64px 24px 32px; box-sizing: border-box; }
#view-play.on { margin: auto 0; width: 100%; }
/* A laptop's short window: Lineup's column is narrow and centred, so on a wide frame it never sits under the sound
   buttons in the top right corner and can give back the room kept for them, and its five cards fit with Check. */
@media (min-width: 1000px) and (max-height: 720px) {
  .dr-main:has(#view-play.on .dr-lu-q) { padding-block: 20px 12px; }
}

.dr-stage-head { justify-content: center; margin-bottom: 14px; min-height: 6px; }
.dr-steps { margin-left: 0; }

/* the share row under the score (TQResult.shareBlock), as wide as the rows above it */
.dr-share-slot { max-width: 520px; margin: 18px auto 0; text-align: left; }
.dr-share-slot:empty { display: none; }
/* The way on, under everything else: the next game's countdown (plain text, it is not a button), Next centered on a row
   of its own under it, then the result's links (Review, and staff's) on the row under that. The ::before is the line
   break before the links. */
.dr-result .dr-result-foot { margin: 18px auto 0; flex-wrap: wrap; justify-content: center; gap: 10px 20px; }
.dr-result-foot::before { content: ""; flex-basis: 100%; height: 0; }
.dr-result-foot .dr-count-row { order: -2; flex-basis: 100%; display: flex; justify-content: center; }
.dr-result-foot .dr-count-row:not(:has(.dr-countdown:not([hidden]))) { display: none; }
.dr-result-foot .dr-countdown { height: auto; padding: 0; border: 0;
  border-radius: 0; background: none; box-shadow: none; font-size: 14px; color: var(--pv-text-muted, #5b6b69); }
.dr-result-foot .dr-countdown .lb { display: inline; }
.dr-result-foot .dr-next { order: -1; }
.dr-result-foot > :not(.dr-next, .dr-count-row) { order: 1; }
.dr-result-foot:not(:has(> :not(.dr-next, .dr-count-row)))::before { display: none; }
/* the white Subscribe button in the corner, beside the sound toggles; its fields open as a sheet (TQResult.formBlock) */
.dr-top .tqr-form { margin: 0; padding: 0; border: 0; max-width: none; }
.dr-top .tqr-form-cta h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dr-top .tqr-form-cta .tqr-form-open { flex: none; height: 38px; padding: 0 16px; font-size: 14px; }
/* the countdown's corner copy, under the corner's buttons: a phone's (below); the foot's copy shows otherwise */
.dr-top .dr-countdown--corner { display: none; }
/* A frame wider than a phone fits the whole result without a scroll, the share text included. Down to a 620px frame (a
   laptop's Chrome window) it is one column, as wide as the rows: the score, its rows, the share row and the way on,
   compact enough for the tallest (Deep Cuts, about 600px), with its kicker up in the corner's row, whose buttons sit at
   the right edge, clear of a 520px column. A shorter frame puts the score and its rows on the left and the share row on
   the right, with the way on centered under both. */
@media (min-width: 761px) {
  /* the whole result fits, so the way on sits in place instead of riding the frame's bottom edge */
  #view-play .dr-result > .dr-result-foot { position: static; background: none; box-shadow: none; margin-bottom: 0; padding: 0; }
}
@media (min-width: 761px) and (min-height: 501px) {
  .dr-main:has(#view-play.on .dr-result) { padding-top: 16px; }
  #view-play .dr-result .tqr-share-text { display: block; }   /* TQResult drops it in a frame under 640px; here it fits */
}
@media (min-width: 761px) and (min-height: 620px) {
  #view-play .dr-q.dr-result { max-width: 520px; margin-inline: auto; padding-block: 0; }
  #view-play .dr-q.dr-result > .dr-q-kicker:first-child { justify-content: center; padding-inline: 0; min-height: 0; margin-bottom: 4px; }
  #view-play .dr-result .dr-big-score { font-size: 52px; line-height: 1; }
  #view-play .dr-result-line { margin-top: 4px; font-size: 15px; }
  #view-play .dr-result-rows { margin-top: 12px; gap: 4px; }
  #view-play .dr-result-row { padding: 7px 14px; }
  #view-play .dr-share-slot { margin-top: 12px; }
  #view-play .dr-result .dr-result-foot { margin-top: 12px; row-gap: 6px; }
}
@media (min-width: 761px) and (max-height: 619px) {
  /* the score on top and the way on at the bottom, both across the width; between them the rows and the share row side by
     side, both from the same top edge (the main block opens up so its rows can take the left column) */
  .dr-result:has(.dr-result-side .tqr-share) {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-items: start;
    max-width: 1040px; margin-inline: auto; padding-block: 8px 0; }
  .dr-result:has(.dr-result-side .tqr-share) > .dr-result-main { display: contents; }
  .dr-result:has(.dr-result-side .tqr-share) > .dr-q-kicker { grid-column: 1 / -1; justify-content: center; padding-inline: 0; }
  .dr-result:has(.dr-result-side .tqr-share) > .dr-result-main > * { grid-column: 1 / -1; justify-self: center; }
  .dr-result:has(.dr-result-side .tqr-share) > .dr-result-main > .dr-result-rows { grid-column: 1; justify-self: stretch; align-self: start; }
  .dr-result:has(.dr-result-side .tqr-share) > .dr-result-side { grid-column: 2; align-self: start; }
  #view-play .dr-result:has(.dr-result-side .tqr-share) > .dr-result-foot { grid-column: 1 / -1; width: auto; margin-inline: 0; }
  #view-play .dr-result:has(.dr-result-side .tqr-share) .dr-share-slot { margin-top: 0; }
  #view-play .dr-result:has(.dr-result-side .tqr-share) .dr-result-line { margin-bottom: 14px; }
  #view-play .dr-result:has(.dr-result-side .tqr-share) .dr-result-rows { margin-top: 0; }
  .dr-result-side .tqr-share { border-top: 0; padding-top: 0; }   /* the column is its own edge */
  .dr-result .dr-big-score { font-size: 64px; }
  .dr-result-line { margin-top: 6px; font-size: 15px; }
  .dr-result-rows { margin-top: 14px; gap: 6px; }
  .dr-result-row { padding: 8px 14px; }
  .dr-result .dr-result-foot { margin-top: 16px; }
}
@media (min-width: 761px) {
  .dr-result-row span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }   /* a long row (Deep Cuts' prompts) keeps to one line */
}
/* a phone on its side: smaller again, and the share text goes */
@media (min-width: 761px) and (max-height: 500px) {
  .dr-result:has(.dr-result-side .tqr-share) { column-gap: 24px; }
  #view-play .dr-result .dr-big-score { font-size: 48px; }
  #view-play .dr-result-line { font-size: 14px; margin-top: 2px; }
  #view-play .dr-result:has(.dr-result-side .tqr-share) .dr-result-line { margin-bottom: 8px; }
  #view-play .dr-result-rows { grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 8px; }
  #view-play .dr-result-row { grid-template-columns: 1fr; gap: 0; padding: 5px 10px; font-size: 12px; line-height: 1.3; }
  #view-play .dr-result-row b { font-size: 14px; }
  #view-play .dr-result-side .tqr-share-text { display: none; }
  #view-play .dr-result .dr-result-foot { margin-top: 10px; row-gap: 4px; }
}

/* Lineup's reveal fits the frame: each card closes to one line, its name and its value, with no clue and no arrows, and
   the try dots go (the result screen lists every try). Wide, the reveal's text sits beside the list. */
#view-play .dr-lu-done .dr-lu-text > span:not(.val), #view-play .dr-lu-done .dr-lu-moves, #view-play .dr-lu-done .dr-lu-status { display: none; }
#view-play .dr-lu-done .dr-lu-card { grid-template-columns: 30px minmax(0, 1fr); padding-block: 5px; }
#view-play .dr-lu-done .dr-lu-text { display: flex; align-items: baseline; gap: 12px; }
#view-play .dr-lu-done .dr-lu-text .val { margin: 0 0 0 auto; flex: none; }
#view-play .dr-lu-reveal .dr-actions { margin-top: 14px; position: static; background: none; box-shadow: none; padding: 0; }
#view-play .dr-q.dr-lu-reveal > .dr-q-kicker:first-child { min-height: 0; padding: 0; }
#view-play .dr-lu-reveal .dr-takeaway { margin-top: 12px; }
@media (min-width: 761px) {
  #view-play .dr-stage:has(.dr-lu-done) { max-width: 1040px; }
  #view-play .dr-body.dr-lu-done { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-items: center; }
  #view-play .dr-lu-done .dr-lu-reveal { margin-top: 0; }
}

/* A phone shows the result in the middle of the space under the corner (the menu button, the Subscribe button and the
   sound toggles, with the next game's countdown under them), so its kicker is centered and never beside them. */
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  #view-play.on > .dr-stage:has(> .dr-result) { margin-block: auto; padding-top: 64px; box-sizing: border-box; }
  #view-play .dr-q.dr-result > .dr-q-kicker:first-child { justify-content: center; padding-inline: 0; }
  .dr-top .tqr-form-cta .tqr-form-open { height: 34px; padding: 0 12px; }
  /* the countdown moves to the corner, right under its buttons, and Next is centered on its row alone */
  #view-play .dr-result-foot .dr-count-row { display: none; }
  .dr-top .dr-countdown--corner:not([hidden]) { display: inline-flex; position: absolute; top: 100%; right: 10px; height: auto; padding: 0;
    border: 0; background: none; box-shadow: none; gap: 5px; font-size: 13px; color: var(--pv-text-muted, #5b6b69); white-space: nowrap; }
  .dr-top .dr-countdown--corner .lb { display: inline; }
}
/* on its side, the corner is beside the right column only, so the result takes the full height */
@media (min-width: 761px) and (max-height: 500px) and (pointer: coarse) {
  #view-play.on > .dr-stage:has(> .dr-result) { padding-top: 0; }
}

/* A phone held upright: one column. The score, its rows (two to a line), the post's text and its share row, then the way on. */
@media (max-width: 760px) {
  #view-play .dr-result { display: flex; flex-direction: column; }
  #view-play .dr-result-side { display: contents; }
  #view-play .dr-result > *, #view-play .dr-result-side > * { width: 100%; box-sizing: border-box; }
  #view-play .dr-q.dr-result > .dr-result-foot { order: 1; max-width: none; margin-inline: 0; padding-inline: 0; }
  /* Next is centered on its row, at least as wide as Copy text */
  #view-play .dr-result-foot .dr-next { min-width: calc(50% - 4px); box-sizing: border-box; justify-content: center; }
  #view-play .dr-result-rows { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  #view-play .dr-result-row { grid-template-columns: 1fr; gap: 0; font-size: 12.5px; line-height: 1.3; }
  #view-play .dr-result-row b { font-size: 15px; }
}

/* Phones. The play wrapper shows the game filling the screen, with its menu button floating over the top left corner
   (play-landing play.css .stage__burger: 34px, 8px in). The aim is one screen with no scrolling: the card's first row
   sits between that button and the sound buttons instead of under them, and each game sheds what it can.
   A phone on its side is wider than 760px, so the query matches the wrapper's own (assets/game.js PHONE). */
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  .pv-header.dr-top { padding: 6px 8px; }
  .dr-top .pv-actions { gap: 6px; }
  .dr-top .dr-audio-btn { width: 34px; height: 34px; }
  .dr-main { padding: 10px 12px 0; }
  #view-play.on { margin: 0; flex: 1; display: flex; flex-direction: column; }
  #view-play.on > * { margin-block: 0 auto; width: 100%; }   /* from the top, so the first row is always the one beside the buttons */
  #view-play .dr-stage-head { min-height: 26px; margin-bottom: 8px; padding: 0 84px 0 38px; justify-content: flex-start; }
  /* no step counter and no Replay chip: the row goes, and the card's kicker takes its place beside the sound buttons */
  #view-play .dr-stage-head:has(.dr-steps:empty):not(:has(.dr-replay-chip)) { display: none; }
  #view-play .dr-q > .dr-q-kicker:first-child { min-height: 26px; display: flex; align-items: center; padding: 0 84px 0 38px; }
  #view-play .dr-q { padding: 4px 4px 0; overflow: visible; }   /* no card edge to clip to here, and a clip cuts the buttons' shadows */
  /* the score: the number, its rows, the share card and the way on, on one screen */
  #view-play .dr-result { padding: 4px 4px 0; }
  /* the result's kicker sits under the corner's row, so it needs no room beside the buttons (see above) */
  #view-play .dr-result > .dr-q-kicker:first-child { white-space: nowrap; overflow: hidden; }
  /* the step row is showing: it is the one beside the buttons, so the kicker under it keeps the card's own edge */
  #view-play:has(.dr-stage-head .dr-steps:not(:empty)) :is(.dr-q, .dr-result) > .dr-q-kicker:first-child,
  #view-play:has(.dr-stage-head .dr-replay-chip) :is(.dr-q, .dr-result) > .dr-q-kicker:first-child { padding: 0; }
  #view-play .dr-result-row span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  #view-play .dr-result .dr-big-score { font-size: 60px; }
  #view-play .dr-result-line { margin-top: 6px; font-size: 15px; }
  #view-play .dr-result-rows { margin-top: 12px; gap: 5px; }
  #view-play .dr-result-row { padding: 7px 12px; }
  #view-play .dr-share-slot, #view-play .dr-result .dr-result-foot { margin-top: 10px; }
  #view-play .dr-q .dr-actions, #view-play .dr-reveal .dr-actions { margin: 10px -16px 0; padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); }
  #view-play .dr-q h2 { margin: 8px 0; }

  /* Sticker Shock: the end tick labels stay inside the screen; once the answer is in, the context chips and the scale
     hint step aside and the score sits beside the answer, so the reveal reads without scrolling. */
  #view-play .dr-ss .dr-flap-host { margin: 12px 0 4px; text-align: center; }
  #view-play .dr-track { margin-inline: 16px; }
  #view-play .dr-ss:has(.dr-reveal) .dr-ctx, #view-play .dr-ss:has(.dr-reveal) .dr-hint { display: none; }
  #view-play .dr-ss .dr-reveal { margin-top: 8px; }
  #view-play .dr-ss .dr-reveal-top { flex-wrap: nowrap; align-items: center; gap: 14px; }
  #view-play .dr-ss .dr-reveal-top .dr-big-score { font-size: 46px; flex: none; }
  #view-play .dr-ss .dr-reveal-answer { font-size: 14px; line-height: 1.4; }
  #view-play .dr-ss .dr-reveal-answer b { font-size: 17px; }
  #view-play .dr-ss .dr-strip { margin: 12px 36px 4px; }   /* a guess at either end keeps its flag on the screen */
  #view-play .dr-ss .dr-takeaway { margin-top: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.4; }
  #view-play .dr-ss .dr-source { margin-top: 6px; }

  /* Rate Radar: the desk fills the screen and the page never scrolls. The console's signal bars count the stages, so the
     step counter goes and the sound buttons sit on the console's top row. The clues scroll inside their own panel when
     they run long, the map takes what is left, and the picks stay pinned along the bottom. */
  .dr-main:has(#view-play.on .rr-funnel) { height: 100vh; height: 100dvh; }
  #view-play.on:has(.rr-funnel) { min-height: 0; }
  #view-play.on > .dr-stage:has(.rr-funnel) { flex: 1; margin-block: 0 8px; display: flex; flex-direction: column; min-height: 0; }
  #view-play .dr-stage:has(.rr-funnel) > .dr-stage-head:not(:has(.dr-replay-chip)) { display: none; }
  #view-play .rr-desk.rr-funnel { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 14px; }
  #view-play .rr-funnel .rr-console { flex: none; padding: 9px 12px 8px; }
  #view-play .rr-funnel .rr-console-top { padding: 0 84px 0 26px; min-height: 22px; gap: 10px; }
  #view-play .dr-stage:has(.dr-replay-chip) .rr-console-top { padding: 0; }
  #view-play .rr-funnel .rr-rail { margin-top: 10px; }
  #view-play .rr-funnel .rr-status { margin-top: 6px; font-size: 13px; min-height: 17px; }
  #view-play .rr-funnel .rr-tabletop { flex: 1; min-height: 0; height: auto; }
  #view-play .rr-funnel .rr-scroll { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 12px 10px; }
  #view-play .rr-funnel .rr-map-host { flex: 1 1 0; height: auto; min-height: 150px; }
  #view-play .rr-funnel .rr-actions { position: static; flex: none; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  #view-play .rr-funnel .rr-fhead { top: -8px; margin: -8px -12px 0; padding: 8px 12px 4px; }
  #view-play .rr-funnel .rr-title { font-size: 17px; margin: 2px 0; }
  #view-play .rr-funnel .rr-prompt { font-size: 17px; margin: 2px 0 6px; }
  #view-play .rr-funnel .rr-p { font-size: 13.5px; line-height: 1.4; margin: 6px 0; }
  #view-play .rr-funnel .rr-rules { font-size: 13px; line-height: 1.35; gap: 3px; }
  #view-play .rr-funnel .rr-small { margin-top: 6px; }
  #view-play .rr-funnel .rr-svc { margin: 0 0 6px; font-size: 12.5px; }
  #view-play .rr-ev { padding: 8px 10px; }
  #view-play .rr-ev-t { font-size: 13.5px; margin-bottom: 6px; }
  #view-play .rr-ev-bars { gap: 5px; }
  #view-play .rr-ev:not(.rr-ev-rates) .rr-evb { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); align-items: center; gap: 8px; }
  #view-play .rr-ev:not(.rr-ev-rates) .rr-evb-row { margin-top: 0; }
  #view-play .rr-ev:not(.rr-ev-rates) .rr-evb-v { min-width: 40px; }
  #view-play .rr-ev-facts { margin-top: 6px; gap: 4px 12px; }
  #view-play .rr-ev-facts dt { font-size: 10.5px; }
  #view-play .rr-ev-facts dd { font-size: 12.5px; }
  #view-play .rr-ev-src { margin-top: 6px; }
  #view-play .rr-cbs { gap: 6px; flex: 1; }
  #view-play .rr-cb { min-height: 44px; padding: 5px 8px; }
  #view-play .rr-verdict { margin: 4px 0; padding: 10px 14px; }
  #view-play .rr-verdict-pts { font-size: 32px; }
  #view-play .rr-verdict-txt b { font-size: 16px; }

  /* Lineup: five cards, the status and the buttons on one screen. Without a step counter the kicker sits on the
     sound buttons' row. */
  #view-play .dr-lu-q h2 { font-size: 19px; line-height: 1.25; margin: 6px 0; }
  #view-play .dr-lu-ends { margin: 6px 2px 5px; }
  #view-play .dr-lu-ends--end { margin: 5px 2px 0; }
  #view-play .dr-lu-list { gap: 5px; }
  #view-play .dr-lu-card { padding: 5px 6px 5px 10px; }
  #view-play .dr-lu-text b { line-height: 1.25; }
  #view-play .dr-lu-text span { font-size: 12.5px; line-height: 1.3; margin-top: 1px; }
  #view-play .dr-lu-moves button { height: 27px; }
  #view-play .dr-lu-list:not(:has(.dr-lu-card:not(.locked))) .dr-lu-moves { display: none; }   /* all placed: nothing left to move */
  #view-play .dr-lu-status { margin-top: 8px; font-size: 13px; gap: 2px 10px; }
  #view-play .dr-lu-status > span:nth-child(n+3) { flex-basis: auto; }   /* the facts share lines: two at most */

  /* Deep Cuts: the elevator fills the screen, top to bottom: display, doors (they take the spare height), answer bar.
     When the keyboard opens the wrapper shrinks the frame to what is left, and the doors give up the height. */
  #view-play.on > .dr-stage:has(.dr-lift) { flex: 1; margin-block: 0 10px; display: flex; flex-direction: column; min-height: 0; }
  #view-play .dr-lift { flex: 1; display: flex; flex-direction: column; min-height: 0; max-height: 560px; padding: 8px; gap: 8px; }
  #view-play .dr-car { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
  #view-play .dr-lift-display { min-height: 48px; padding: 4px 10px 4px 14px; }
  #view-play .dr-lift-frame { flex: 1; min-height: 132px; display: grid; }
  #view-play .dr-lift-stage, #view-play .dr-lift-behind { position: absolute; inset: 8px; margin: 0; padding: 8px; min-height: 0; overflow-y: auto; }
  #view-play .dr-placard { padding: 12px 14px 14px; max-height: 100%; overflow-y: auto; }
  #view-play .dr-placard h2 { font-size: 19px; }
  #view-play .dr-lift-bar { padding: 8px; gap: 6px; min-height: 0; }
  #view-play .dr-lift-bar .dr-answer-row input { font-size: 17px; padding: 10px 12px; }
  #view-play .dr-lift-bar .dr-tried { flex-wrap: nowrap; overflow: hidden; }
  #view-play .dr-lift-bar .dr-tried span { flex: none; }
  #view-play .dr-lift-bar .dr-tried:empty { display: none; }

  /* Rate Radar on a phone: the console already shows the clock and the trace, so the call's kicker row goes; the
     evidence reads as one-line bars and a row of three facts; the map shows named pins without zoom buttons and they
     are the picks for stages 1 to 3, so the A-D buttons hide until a keyboard tabs into them; stage 4 has no pins,
     so it keeps its buttons and drops the map */
  #view-play .rr-funnel .rr-fhead:has(.rr-fclock) { display: none; }
  #view-play .rr-funnel .rr-scroll { padding-top: 6px; }
  #view-play .rr-funnel .rr-prompt { margin: 0 0 5px; }
  #view-play .rr-ev { padding: 6px 9px; }
  #view-play .rr-ev-k { margin-bottom: 1px; }
  #view-play .rr-ev-t { font-size: 13px; margin-bottom: 4px; }
  #view-play .rr-ev-bars { gap: 3px; }
  #view-play .rr-ev:not(.rr-ev-rates) .rr-evb-l { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #view-play .rr-ev:not(.rr-ev-rates) .rr-evb-track { height: 8px; }
  #view-play .rr-ev:not(.rr-ev-rates) .rr-evb-v b { font-size: 12.5px; }
  #view-play .rr-ev-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 8px; margin-top: 5px; }
  #view-play .rr-ev-facts dt { font-size: 9.5px; letter-spacing: .03em; line-height: 1.2; }
  #view-play .rr-ev-facts dd { font-size: 12px; line-height: 1.25; }
  #view-play .rr-compare .rr-ev-facts { grid-template-columns: 1fr; }
  #view-play .rr-ev-src { margin-top: 4px; font-size: 10px; }
  #view-play .rr-funnel .rr-terms { margin-top: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #view-play .rr-funnel .rr-term { flex: none; }
  #view-play .rr-funnel .rr-crumbs { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
  #view-play .rr-funnel .rr-crumb { flex: 0 1 auto; min-width: 2.5em; overflow: hidden; text-overflow: ellipsis; }
  #view-play .rr-funnel .rr-crumbs .pv-icon, #view-play .rr-funnel .rr-crumbs svg { flex: none; }
  /* stage 4: the bill is the clue and the map only marks the hospital, so the chart gets the room */
  #view-play .rr-funnel:has(.rr-ev-rates) .rr-map-host { display: none; }
  #view-play .rr-ev-rates .rr-ev-bars { gap: 3px; }
  #view-play .rr-ev-rates .rr-evb-track { height: 10px; }
  #view-play .rr-ev-rates .rr-evb-v b { font-size: 13px; line-height: 1.15; }
  #view-play .rr-ev-rates .rr-evb-v small { font-size: 10px; line-height: 1.1; }
  #view-play .rr-funnel .rr-svc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #view-play .rr-funnel .pvsm-ctrls { display: none; }
  #view-play .rr-funnel .fm-txt > span { display: block; width: max-content; max-width: 14ch; white-space: normal; line-height: 1.15; }
  #view-play .rr-funnel .fm-mk-metro .fm-head { border-radius: 14px; }
  #view-play .rr-funnel .rr-cbs:not(.rr-cbs-rates):not(:focus-within) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #view-play .rr-funnel .rr-actions:has(> .rr-cbs:not(.rr-cbs-rates):not(:focus-within)) { padding: 0; border: 0; box-shadow: none; }
  /* stage 4's payers: one per row, logo beside the name, so a long plan name does not leave its neighbour half empty */
  #view-play .rr-funnel .rr-cbs-rates { grid-template-columns: 1fr; }
  #view-play .rr-funnel .rr-cbs-rates .rr-cb { min-height: 44px; }
  #view-play .rr-funnel .rr-cbs-rates .pv-payer { flex-direction: row; align-items: center; gap: 8px; font-size: 13.5px; }
  #view-play .rr-funnel .fm-credit { font-size: 9.5px; bottom: 3px; left: 4px; }
  #view-play .rr-funnel .rr-actions { padding-block: 6px; }
  #view-play .rr-cbs { gap: 5px; }
  #view-play .rr-cb { min-height: 40px; padding: 3px 7px; gap: 6px; border-radius: 10px; }
  #view-play .rr-cb-id { width: 22px; height: 22px; font-size: 11.5px; }
  #view-play .rr-cb-main b { font-size: 13px; line-height: 1.2; }
  #view-play .rr-cb-main small { font-size: 10.5px; line-height: 1.2; }
}
/* a phone with its keyboard up, or on its side: the step counter and the roomy paddings go first */
@media (max-width: 760px) and (max-height: 420px), (max-height: 420px) and (pointer: coarse) {
  .dr-main { padding-top: 4px; }
  #view-play .dr-stage-head { min-height: 0; height: 0; margin: 0; overflow: hidden; }
  #view-play.on > .dr-stage:has(.dr-lift) { margin-bottom: 4px; }
  #view-play .dr-lift { padding: 6px; gap: 6px; }
  #view-play .dr-car { gap: 6px; }
  #view-play .dr-lift-display { min-height: 40px; padding-right: 92px; }
  #view-play .dr-lift-frame { min-height: 96px; }
  #view-play .dr-lift-stage, #view-play .dr-lift-behind { inset: 4px; padding: 4px; }
  #view-play .dr-placard { padding: 8px 12px; }
  #view-play .dr-placard h2 { font-size: 17px; margin: 2px 0; }
  #view-play .dr-placard p { font-size: 13px; margin-top: 2px; line-height: 1.35; }
  #view-play .dr-dc-callout { display: none; }
  #view-play .dr-saved { margin-top: 6px; }
  #view-play .dr-saved-more, #view-play .dr-saved:not(:has(b)) { display: none; }
  /* a screen this short scrolls, so the buttons stay in the flow instead of covering a third of it */
  #view-play .dr-q .dr-actions, #view-play .dr-result .dr-actions { position: static; background: none; box-shadow: none; margin-bottom: 0; }
}
/* Deep Cuts with the keyboard up on a phone held upright: the elevator stays where it was, under the step row beside
   the corner's buttons, and only the doors give up height, so the display never slides under the menu and sound buttons */
@media (max-width: 760px) and (max-height: 420px) {
  .dr-main:has(#view-play.on .dr-lift) { padding-top: 10px; }
  #view-play .dr-stage:has(.dr-lift) > .dr-stage-head { min-height: 26px; height: auto; margin-bottom: 8px; overflow: visible; }
  #view-play .dr-lift-display { padding-right: 10px; }
}
/* the narrowest phones: the split-flap board has nine cells to fit */
@media (max-width: 350px) {
  #view-play .dr-flap-cell { width: 27px; height: 40px; }
  #view-play .dr-flap-cell b { font-size: 21px; }
}
/* Rate Radar on a phone's side: the map and the clue panel sit side by side, the picks under the clues. */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 760px), (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
  #view-play.on > .dr-stage:has(.rr-funnel) { margin-bottom: 4px; }
  #view-play .rr-funnel .rr-console { padding: 6px 12px 5px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; }
  #view-play .rr-funnel .rr-console-top { grid-column: 1 / -1; }
  #view-play .rr-funnel .rr-rail { margin-top: 5px; grid-column: 1 / -1; }
  #view-play .rr-funnel .rr-status { margin-top: 3px; grid-column: 1 / -1; }
  #view-play .rr-funnel .rr-tabletop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 48%); grid-template-rows: minmax(0, 1fr); }
  #view-play .rr-funnel .rr-panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--pv-stroke); }
  #view-play .rr-funnel .rr-map-host { order: 0; height: 100%; min-height: 0; }
  #view-play .rr-funnel .rr-scroll { flex: 1 1 0; }
  #view-play .rr-funnel .rr-actions { padding: 6px 10px; box-shadow: none; border-top: 1px solid var(--pv-stroke); }
  #view-play .rr-cb { min-height: 38px; padding: 3px 8px; }
}
/* Lineup on touch: when the whole game fits the screen there is nothing to scroll, so a finger drags a card from
   anywhere on it (game.js sets .dr-lu-fit); when it does not fit, the card scrolls and the number badge drags. */
@media (pointer: coarse) {
  .dr-lu-fit .dr-lu-card:not(.locked) { touch-action: none; }
}
