:root {
  --ink: #05070a;
  --panel: rgba(9, 13, 18, 0.82);
  --line: rgba(160, 200, 220, 0.16);
  --paper: #e6ecef;
  --dim: #8b98a3;
  --ice: #7fe3ff;
  --amber: #ffb347;
  --red: #ff4d4d;
  --green: #7dea8a;
  --cond: 'Avenir Next Condensed', 'Roboto Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--cond);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
[hidden] {
  display: none !important;
}
#game {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  cursor: crosshair;
}
kbd {
  font: 600 11px/1 var(--mono);
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  margin-right: 2px;
}

/* ------------------------------------------------------------- screens */
.screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 90% at 50% 110%, #0d1a20 0%, #05070a 60%);
  overflow: auto;
  padding: 24px;
}
.screen .box {
  position: relative;
  width: min(560px, 100%);
}
/* The title: the painting fills the screen, the words sit in its dark half. */
#title {
  place-items: center start;
  padding-left: clamp(24px, 8vw, 150px);
  background: #05070a;
}
#title .art {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
#title .art::before {
  content: '';
  position: absolute;
  inset: -3%;
  background: url(/assets/art_key.jpg) 72% center / cover no-repeat;
  animation: drift 40s ease-in-out infinite alternate;
}
#title .art::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.97) 0%, rgba(5, 7, 10, 0.86) 30%, rgba(5, 7, 10, 0.25) 58%, rgba(5, 7, 10, 0) 78%),
    linear-gradient(0deg, rgba(5, 7, 10, 0.7) 0%, rgba(5, 7, 10, 0) 30%);
}
@keyframes drift {
  from {
    transform: scale(1) translateX(0);
  }
  to {
    transform: scale(1.06) translateX(-1.2%);
  }
}
/* A little more rain over the painting's own. */
.rain {
  position: fixed;
  inset: -10% 0 0 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    repeating-linear-gradient(100deg, transparent 0 46px, rgba(170, 200, 230, 0.16) 46px 47px, transparent 47px 113px),
    repeating-linear-gradient(100deg, transparent 0 91px, rgba(170, 200, 230, 0.1) 91px 92px, transparent 92px 171px);
  background-size: 100% 240px, 100% 310px;
  animation: fall 0.55s linear infinite;
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
}
@keyframes fall {
  to {
    background-position: -42px 240px, -54px 310px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #title .art::before,
  .rain {
    animation: none;
  }
}
#lobby {
  background:
    linear-gradient(rgba(5, 7, 10, 0.55), rgba(5, 7, 10, 0.88)),
    url(/assets/art_floor0.jpg) center / cover no-repeat #05070a;
}
.screen .box.panel {
  background: rgba(8, 12, 16, 0.78);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 30px 26px;
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.eyebrow {
  font: 600 12px/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
  margin: 0 0 14px;
}
h1 {
  font-size: clamp(72px, 15vw, 148px);
  line-height: 0.84;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h2 {
  font-size: 44px;
  line-height: 1;
  margin: 0 0 6px;
  font-weight: 800;
}
h2 span {
  font-family: var(--mono);
  color: var(--ice);
  letter-spacing: 0.08em;
}
.tag {
  font-size: 20px;
  color: var(--dim);
  margin: 14px 0 26px;
}
.fine {
  font-size: 14px;
  color: var(--dim);
  margin: 18px 0 0;
}
label {
  display: block;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
input {
  font: 600 18px/1 var(--cond);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
input:focus-visible,
button:focus-visible {
  border-color: var(--ice);
  box-shadow: 0 0 0 3px rgba(127, 227, 255, 0.18);
}
label input {
  display: block;
  width: 100%;
  margin-top: 8px;
}
#code {
  width: 108px;
  text-transform: uppercase;
  font-family: var(--mono);
  letter-spacing: 0.12em;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}
.row #link {
  flex: 1;
  min-width: 0;
  font: 500 14px/1 var(--mono);
}
.or {
  color: var(--dim);
  font-size: 14px;
}
button {
  font: 700 17px/1 var(--cond);
  letter-spacing: 0.02em;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 18px;
  cursor: pointer;
}
button:hover {
  background: rgba(255, 255, 255, 0.12);
}
button.primary {
  background: var(--ice);
  color: #04222c;
  border-color: transparent;
}
button.primary:hover {
  background: #a5ecff;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.err {
  color: var(--red);
  font-size: 15px;
  min-height: 18px;
  margin: 10px 0 0;
}
#roster {
  list-style: none;
  padding: 0;
  margin: 22px 0;
  display: grid;
  gap: 8px;
}
#roster li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
}
#roster li i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
#roster li small {
  margin-left: auto;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.12em;
  color: var(--dim);
}
#roster li.empty {
  color: var(--dim);
  font-weight: 500;
  border-style: dashed;
}
.keys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--dim);
}

/* ---------------------------------------------------------------- HUD */
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
#phone {
  position: absolute;
  top: 16px;
  left: 16px;
  width: min(340px, 44vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px 10px;
  backdrop-filter: blur(6px);
}
#phone header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  letter-spacing: 0.1em;
}
#phone header span {
  font: 500 11px/1 var(--mono);
  color: var(--dim);
  letter-spacing: 0.04em;
}
#temp {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 8px;
}
#tempBar {
  position: relative;
  flex: 1;
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
#tempFill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--ice), var(--amber) 62%, var(--red));
  background-size: 100vw 100%;
  transition: width 0.4s;
}
#tempNum {
  font: 700 22px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ice);
  min-width: 92px;
  text-align: right;
}
#temp.warm #tempNum {
  color: var(--amber);
}
#temp.hot #tempNum {
  color: var(--red);
  animation: blink 0.8s steps(2) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.45;
  }
}
#objective {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}
#objective small {
  display: block;
  font: 500 12px/1.4 var(--mono);
  color: var(--dim);
  margin-top: 2px;
}
#feed {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 6px;
}
#feed li {
  font: 500 12px/1.4 var(--mono);
  color: #b9c6cf;
  background: rgba(127, 227, 255, 0.07);
  border-radius: 10px 10px 10px 2px;
  padding: 7px 9px;
  animation: pop 0.25s ease-out;
}
#feed li.old {
  opacity: 0.45;
}
@keyframes pop {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
}
#right {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 232px;
  display: grid;
  gap: 8px;
}
#mini {
  width: 232px;
  height: 135px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
#floor {
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.12em;
  color: var(--dim);
  text-align: right;
}
#team {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}
#team li {
  display: grid;
  grid-template-columns: 10px 1fr 70px;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
}
#team li i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
#team li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#team li em {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
#team li em b {
  display: block;
  height: 100%;
  background: var(--green);
}
#team li.down {
  border-color: var(--red);
  color: var(--red);
}
#team li.dead {
  opacity: 0.4;
}
#vitals {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}
#hpBar {
  width: 190px;
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
#hpFill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--green);
  transition: width 0.2s;
}
#vitals.hurt #hpFill {
  background: var(--amber);
}
#vitals.crit #hpFill {
  background: var(--red);
}
#hpNum {
  font: 700 20px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  min-width: 40px;
}
.pill {
  font: 700 14px/1 var(--mono);
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(125, 234, 138, 0.12);
  color: var(--green);
}
.pill.cool {
  background: rgba(127, 227, 255, 0.12);
  color: var(--ice);
}
#weapon {
  position: absolute;
  right: 16px;
  bottom: 16px;
  text-align: right;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 170px;
}
#wname {
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
#ammo b {
  font: 800 46px/1 var(--cond);
  font-variant-numeric: tabular-nums;
}
#ammo span {
  font: 600 18px/1 var(--mono);
  color: var(--dim);
  margin-left: 6px;
}
#ammo.low b {
  color: var(--red);
}
#ammo.reloading b {
  color: var(--amber);
}
#keys {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  margin-bottom: 8px;
  min-height: 16px;
}
#keys i {
  width: 24px;
  height: 15px;
  border-radius: 3px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.25);
}
#carry {
  margin-top: 6px;
  font: 600 10px/1.3 var(--mono);
  letter-spacing: 0.08em;
  color: var(--ice);
}
#prompt,
#toast,
#room {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}
#prompt {
  bottom: 22%;
  font-size: 19px;
  font-weight: 700;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
}
#prompt:empty,
#toast:empty,
#room:empty {
  display: none;
}
#toast {
  bottom: 31%;
  font-size: 17px;
  font-weight: 700;
  color: var(--amber);
  text-shadow: 0 2px 8px #000;
}
#room {
  top: 18px;
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  text-shadow: 0 2px 6px #000;
}
#hold {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--red);
  border-radius: 12px;
  padding: 10px 22px;
}
#hold span {
  display: block;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.2em;
  color: var(--red);
}
#hold b {
  font: 800 54px/1 var(--cond);
  font-variant-numeric: tabular-nums;
}
#down {
  position: absolute;
  inset: auto 0 40% 0;
  text-align: center;
  text-shadow: 0 2px 12px #000;
}
#down b {
  display: block;
  font-size: 54px;
  font-weight: 800;
  color: var(--red);
}
#down span {
  font-size: 18px;
  color: var(--paper);
}

/* --------------------------------------------------------------- cards */
#card,
#help {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 5, 8, 0.78);
  padding: 24px;
  overflow: auto;
}
#card.intro {
  background: #05070a;
  animation: fadeout 0.9s ease-in 2.6s forwards;
  pointer-events: none;
}
@keyframes fadeout {
  to {
    opacity: 0;
  }
}
#card .box,
#help .box {
  width: min(620px, 100%);
}
#card .big {
  font-size: clamp(54px, 10vw, 104px);
  font-weight: 800;
  line-height: 0.9;
  margin: 0;
}
#card .big.bad {
  color: var(--red);
}
#card .big.good {
  color: var(--ice);
}
#card table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 17px;
}
#card th {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: right;
  padding: 6px 8px;
}
#card th:first-child,
#card td:first-child {
  text-align: left;
}
#card td {
  padding: 8px;
  border-top: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
#card td i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}
#card .quote {
  font: 500 14px/1.5 var(--mono);
  color: #b9c6cf;
  background: rgba(127, 227, 255, 0.07);
  border-radius: 12px 12px 12px 2px;
  padding: 10px 12px;
  margin: 14px 0;
}
.rules {
  padding-left: 18px;
  font-size: 16px;
  line-height: 1.45;
  color: #c5d0d8;
  display: grid;
  gap: 8px;
}
.rules b {
  color: var(--paper);
}
.vol {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vol + .vol {
  margin-right: auto;
}
.vol input {
  width: 110px;
}
.vol input {
  padding: 0;
  accent-color: var(--ice);
}
@media (max-width: 760px) {
  #right {
    width: 170px;
  }
  #mini {
    width: 170px;
    height: 99px;
  }
  #hpBar {
    width: 110px;
  }
}

.stars {
  color: var(--amber);
  letter-spacing: 0.1em;
}
#carry kbd {
  font-size: 9px;
  padding: 2px 4px;
}

/* ------------------------------------------------------ painted touches */
#card {
  place-items: center start;
  padding-left: clamp(24px, 8vw, 150px);
  background-color: rgba(3, 5, 8, 0.82);
  background-size: cover;
  background-position: center;
}
#card.intro {
  background-color: #05070a;
}
#card .big {
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.7);
}
.ico {
  height: 18px;
  width: auto;
  vertical-align: -4px;
  margin-right: 6px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.ico.key {
  height: 26px;
  margin: 0 0 0 4px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.pill .ico {
  height: 20px;
  vertical-align: 0;
}
.pill kbd {
  margin: 0 0 0 7px;
  font-size: 9px;
  padding: 2px 4px;
  opacity: 0.7;
}
#phone header b {
  display: inline-flex;
  align-items: center;
}
#keys {
  min-height: 26px;
  align-items: center;
}
h1 {
  text-shadow: 0 8px 50px rgba(0, 0, 0, 0.8);
}

/* ---------------------------------------------------------------- phones */
html,
body {
  overscroll-behavior: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
#game {
  height: 100dvh;
  touch-action: none;
}
.touch-only,
#rotate {
  display: none;
}
.touch .touch-only {
  display: revert;
}
.touch .keys.touch-only {
  display: grid;
}
.touch .key-only,
.touch kbd {
  display: none;
}
.keys b {
  color: var(--paper);
  margin-right: 6px;
}
.thumbs {
  color: var(--dim);
  line-height: 1.45;
  margin: 0 0 14px;
}
.thumbs b {
  color: var(--paper);
}

/* The layer that takes the thumbs, and what sits on it. */
#touch {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  touch-action: none;
}
.stick {
  position: absolute;
  left: max(34px, calc(env(safe-area-inset-left) + 22px));
  bottom: 30px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 2px solid rgba(200, 225, 235, 0.16);
  background: radial-gradient(circle, rgba(127, 227, 255, 0.05) 0%, rgba(9, 13, 18, 0.22) 70%);
  pointer-events: none;
  display: grid;
  place-items: center;
}
.stick.aim {
  left: auto;
  right: max(34px, calc(env(safe-area-inset-right) + 22px));
  border-style: dashed;
}
.stick i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(200, 225, 235, 0.16);
  border: 1px solid rgba(200, 225, 235, 0.3);
}
.stick span {
  position: absolute;
  bottom: -18px;
  font: 600 9px/1 var(--mono);
  letter-spacing: 0.18em;
  color: rgba(200, 225, 235, 0.35);
  white-space: nowrap;
}
.stick.held {
  border-color: rgba(200, 225, 235, 0.4);
}
.stick.held span {
  display: none;
}
.stick.held i {
  background: rgba(127, 227, 255, 0.4);
  border-color: var(--ice);
}
.stick.hot {
  border-color: var(--ice);
}
.stick.aim.hot {
  border-color: var(--red);
  border-style: solid;
}
.stick.aim.hot i {
  background: rgba(255, 77, 77, 0.55);
  border-color: var(--red);
}
#tbar {
  position: absolute;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
#touch button {
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 64px;
  height: 46px;
  padding: 0 12px;
  touch-action: none;
}
#touch button:active {
  background: rgba(127, 227, 255, 0.25);
  border-color: var(--ice);
}
#tDrop {
  color: var(--ice) !important;
}
#tMenu {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  right: calc(max(8px, env(safe-area-inset-right)) + 148px);
  min-width: 46px !important;
  height: 34px !important;
  opacity: 0.75;
}

/* The HUD, moved out from under the thumbs. */
.touch #phone {
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  width: min(250px, 36vw);
  padding: 8px 10px 7px;
  border-radius: 12px;
}
.touch #phone header span,
.touch #feed li.old,
.touch #objective small,
.touch #floor {
  display: none;
}
.touch #feed {
  margin: 0;
  gap: 0;
}
/* Dispatch says its line, then gets out of the way of your thumb. */
.touch #feed li {
  margin-top: 8px;
  overflow: hidden;
  animation:
    pop 0.25s ease-out,
    hush 0.5s ease-in 7s forwards;
}
@keyframes hush {
  to {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
  }
}
.touch #right {
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  width: 140px;
  gap: 6px;
}
.touch #mini {
  width: 140px;
  height: 81px;
}
.touch #vitals,
.touch #weapon {
  position: static;
  background: none;
  border: 0;
  padding: 0;
  min-width: 0;
  backdrop-filter: none;
}
.touch #vitals {
  margin-top: 8px;
  gap: 8px;
}
.touch #hpBar {
  width: auto;
  flex: 1;
  height: 9px;
}
.touch #hpNum {
  font-size: 15px;
  min-width: 28px;
}
.touch .pill {
  pointer-events: auto;
  touch-action: none;
  padding: 9px 10px;
  border: 1px solid currentColor;
}
.touch #weapon {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
}
.touch #ammo b {
  font-size: 30px;
}
.touch #ammo span {
  font-size: 14px;
}
.touch #keys {
  margin-bottom: 2px;
  min-height: 0;
}
.touch #keys:empty {
  display: none;
}
.touch #room {
  top: max(14px, calc(env(safe-area-inset-top) + 6px));
  font-size: 10px;
}
.touch #hold {
  top: 34px;
  padding: 6px 16px;
}
.touch #hold b {
  font-size: 34px;
}
.touch #prompt {
  bottom: 74px;
  pointer-events: auto;
  touch-action: none;
  font-size: 16px;
  padding: 12px 16px;
  border-color: var(--ice);
}
#prompt em {
  font: 700 10px/1 var(--mono);
  font-style: normal;
  letter-spacing: 0.14em;
  color: var(--ink);
  background: var(--ice);
  border-radius: 4px;
  padding: 3px 5px;
  margin-right: 6px;
  vertical-align: 2px;
}
.touch #toast {
  bottom: 132px;
  font-size: 15px;
}
.touch #down b {
  font-size: 38px;
}

/* A short screen: the title, lobby and cards have to fit a phone on its side. */
@media (max-height: 520px) {
  .screen,
  #card,
  #help {
    padding: 14px max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
    place-items: start center;
  }
  h1 {
    font-size: clamp(44px, 19vh, 96px);
    line-height: 0.86;
  }
  h1 br {
    display: none;
  }
  .eyebrow {
    margin-bottom: 8px;
  }
  .tag {
    font-size: 16px;
    margin: 8px 0 14px;
  }
  input {
    padding: 9px 12px;
  }
  .fine {
    margin-top: 10px;
    font-size: 12px;
  }
  .screen .box.panel {
    padding: 14px 18px;
    width: min(680px, 100%);
  }
  /* The lobby: everything the host needs without scrolling. */
  h2 {
    font-size: 30px;
  }
  #lobby .tag {
    display: none;
  }
  #lobby .eyebrow {
    margin-bottom: 4px;
  }
  #lobby .row {
    margin-top: 8px;
  }
  #roster {
    grid-template-columns: 1fr 1fr;
    margin: 10px 0;
    gap: 6px;
  }
  #roster li {
    padding: 8px 10px;
    font-size: 16px;
  }
  button {
    padding: 10px 16px;
  }
  #card {
    place-items: center start;
  }
  #card .big {
    font-size: clamp(44px, 20vh, 84px);
  }
  .keys {
    margin-top: 14px;
    padding-top: 12px;
    font-size: 13px;
    gap: 5px 14px;
  }
  .rules {
    font-size: 14px;
    gap: 5px;
  }
}
@media (max-width: 560px) {
  .keys {
    grid-template-columns: 1fr;
  }
  .screen .row {
    flex-wrap: wrap;
  }
}
/* Sideways only, once the delivery has started. */
@media (orientation: portrait) {
  .touch body[data-screen='game'] #rotate {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-content: center;
    gap: 8px;
    text-align: center;
    background: var(--ink);
    padding: 24px;
  }
  #rotate b {
    font-size: 28px;
  }
  #rotate span {
    color: var(--dim);
  }
}
