/* Get Them Out: the Blockstep look (docs/design/blockstep-style.md), as in the sister games: white cards with a thin,
   even border all the way round and a soft shadow, pill buttons, deep navy words, one blue for the main action, Plus
   Jakarta Sans for headings and Inter for everything else. Light only. Phone first: the site on top, your hands below;
   side by side on a wide screen. Never a coloured stripe down one side of anything. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --ink: #0e1b33;
  --ink-2: #45526e;
  --muted: #6b7690;
  --line: #e3e8f2;
  --brand: #2563eb;
  --brand-ink: #1d4ed8;
  --brand-soft: #e8f0ff;
  --ok: #15803d;
  --ok-soft: #e7f6ec;
  --warn: #a16207;
  --warn-soft: #fef6e0;
  --bad: #b91c1c;
  --bad-soft: #fdecec;
  --shadow: 0 1px 2px rgba(14, 27, 51, 0.05), 0 10px 30px rgba(14, 27, 51, 0.09);
  --shadow-sm: 0 1px 2px rgba(14, 27, 51, 0.06), 0 4px 12px rgba(14, 27, 51, 0.07);
  --display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--body);
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}
button,
input {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}

/* ---- Layout ---- */
.app {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(220px, 44dvh) minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .app {
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: minmax(0, 1fr) clamp(380px, 33vw, 480px);
  }
  .bench {
    border-top: 0 !important;
    border-left: 1px solid var(--line);
  }
}
.site {
  position: relative;
  overflow: hidden;
  background: #eef3fa;
  min-height: 0;
  min-width: 0;
}
.site-canvas {
  position: absolute;
  inset: 0;
  display: block;
  cursor: grab;
}
.site-canvas:active {
  cursor: grabbing;
}
.site-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}
#photo-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  pointer-events: none;
}
.bench {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}
.bench-scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 12px 12px;
  overscroll-behavior: contain;
}

/* ---- Pills and chips ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pill small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip.ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: #bfe3cb;
}
.chip.bad {
  background: var(--bad-soft);
  color: var(--bad);
  border-color: #f5c2c2;
}
.chip.warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: #f3e2b3;
}
.chip.link {
  cursor: pointer;
  min-height: 32px;
  background: #fff;
}
.chip.link:hover {
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.draft {
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid #f3e2b3;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---- The HUD over the site ---- */
.hud {
  position: absolute;
  inset: 10px 10px auto 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  z-index: 4;
}
.hud > * {
  pointer-events: auto;
}
.hud-right {
  display: flex;
  gap: 6px;
  align-items: center;
}
.mycard {
  cursor: pointer;
  padding: 3px 12px 3px 3px;
  text-align: left;
  line-height: 1.15;
  min-width: 0;
}
.mycard img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--brand-soft);
}
.mycard b {
  display: block;
  font-size: 12.5px;
}
.mycard small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.clock {
  gap: 7px;
}
.clock b {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.clock .beat {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px #fde2e2;
  animation: beat 1s ease infinite;
}
.clock.done .beat {
  background: #22c55e;
  box-shadow: 0 0 0 3px #d5f5e0;
  animation: none;
}
.clock.soon b {
  color: var(--warn);
}
.clock.late b {
  color: var(--bad);
}
.clock.done small {
  color: var(--ok);
}
@keyframes beat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.35);
  }
  30% {
    transform: scale(1);
  }
}
.icon-btn {
  cursor: pointer;
  padding: 0;
  width: 38px;
  justify-content: center;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.streak b {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
}
.streak.hot {
  background: var(--warn-soft);
  border-color: #f3e2b3;
}
.statusbar {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 54px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 3;
  pointer-events: none;
}
.site > .statusbar .chip {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}
.site > .statusbar .chip.ok {
  background: #effaf2;
}
.site > .statusbar .chip.bad {
  background: #fff3f3;
}
.site > .statusbar .chip.warn {
  background: #fffaee;
}
.site-foot {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}
.site-foot > * {
  pointer-events: auto;
}
.looks {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  padding: 2px;
}
.looks::-webkit-scrollbar {
  display: none;
}
.look {
  flex: none;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.look:hover {
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.site .draft-tag {
  position: absolute;
  right: 10px;
  bottom: 52px;
  z-index: 2;
  font-size: 11px;
}

/* ---- Things over the 3D view: bubbles, the radio, the flash, toasts ---- */
.bubble {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 220px;
  padding: 6px 11px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  will-change: transform;
  animation: bubble-in 0.25s ease;
}
.bubble.shout {
  border: 2px solid #dc2626;
  color: var(--bad);
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
  animation: shout 0.35s ease infinite alternate;
}
@keyframes bubble-in {
  from {
    opacity: 0;
    margin-top: 6px;
  }
}
@keyframes shout {
  to {
    background: #fff4f4;
  }
}
.radio {
  position: absolute;
  left: 50%;
  top: 92px;
  transform: translateX(-50%);
  z-index: 4;
  display: grid;
  gap: 2px;
  width: min(440px, calc(100% - 20px));
  padding: 9px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  line-height: 1.4;
  animation: radio-in 0.3s ease;
  pointer-events: none;
}
.radio b {
  display: block;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
@keyframes radio-in {
  from {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
}
.flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.flash.on {
  animation: flash 0.5s ease-out;
}
@keyframes flash {
  0% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
  }
}
.toast {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 30;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  max-width: calc(100% - 24px);
  text-align: center;
  line-height: 1.3;
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, -6px);
}

/* ---- The bench: the coach line, the panel, the tray ---- */
.coachbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
}
.coach {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.35;
}
.coach.on {
  color: var(--brand-ink);
}
.btn.small {
  min-height: 36px;
  font-size: 13px;
  padding: 0 12px;
}
.tray {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
}
.tray-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 10px;
}
.tray-btn b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tray-btn.stop {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
  flex: 2 1 0;
  animation: stop 0.5s ease infinite alternate;
}
.tray-btn.pulse {
  animation: stop 0.5s ease 4 alternate;
}
@keyframes stop {
  to {
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.25);
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.15;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
}
.btn:active {
  transform: scale(0.97);
}
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.primary:hover {
  background: var(--brand-ink);
}
.btn.ghost {
  color: var(--ink-2);
}
.btn.chosen {
  border-color: var(--brand);
  color: var(--brand-ink);
  background: var(--brand-soft);
}
.btn.shock {
  background: #f59e0b;
  border-color: #d97706;
  color: #1d1500;
  animation: shockbtn 0.45s ease infinite alternate;
}
@keyframes shockbtn {
  to {
    background: #fcd34d;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.25);
  }
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
.btn .key,
.lever-half .key {
  display: none;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.7;
  margin-left: 6px;
}
@media (hover: hover) and (pointer: fine) {
  .btn .key,
  .lever-half .key {
    display: inline;
  }
}
.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.row > .btn {
  flex: 1 1 140px;
}
.row.wrap {
  flex-wrap: wrap;
}

/* ---- Panels ---- */
.panel {
  display: grid;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px;
  animation: panel-in 0.25s ease;
  min-width: 0;
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.panel-head h3 {
  font-size: 17px;
  font-weight: 800;
}
.panel-head .sub {
  color: var(--ink-2);
  font-size: 13.5px;
  margin-top: 2px;
}
.note {
  color: var(--ink-2);
  font-size: 13.5px;
}
.note.ok {
  color: var(--ok);
  font-weight: 600;
}
.note.bad {
  color: var(--bad);
  font-weight: 600;
}
.note.warn {
  color: var(--warn);
  font-weight: 600;
}
.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow.bad {
  color: var(--bad);
}
.eyebrow.warn {
  color: var(--warn);
}
.status {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  min-height: 1.4em;
}
.status.ok {
  color: var(--ok);
}
.status.bad {
  color: var(--bad);
}
.status.warn {
  color: var(--warn);
}
.device {
  width: 100%;
  height: auto;
  max-height: 42dvh;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.device.small {
  max-height: 30dvh;
}
.device .switch,
.device .tester,
.device .tool,
.device [role="button"] {
  cursor: pointer;
}
.device .hot {
  cursor: pointer;
}
.device .sparks {
  animation: sparks 0.12s steps(2) infinite;
}
@keyframes sparks {
  50% {
    opacity: 0.2;
  }
}
.signboard {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  text-align: center;
}
.signboard b {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
}
.signboard span {
  color: var(--ink-2);
  font-size: 14px;
}
.bar {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand);
  transition: width 0.2s;
}
.speed,
.rate {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.speed .band {
  position: absolute;
  left: 10%;
  width: 40%;
  top: 0;
  bottom: 0;
  background: #d5f5e0;
  border-radius: 999px;
}
.speed i,
.rate i {
  position: absolute;
  top: -4px;
  width: 6px;
  height: 22px;
  border-radius: 3px;
  background: var(--ink);
  transform: translateX(-3px);
  left: 0;
  transition: left 0.15s;
}
.speed.bad i {
  background: var(--bad);
}
.dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.dots i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.dots i.on {
  background: var(--ok);
  border-color: var(--ok);
}
.feet .btn.foot {
  min-height: 64px;
  font-size: 15px;
}
.karabiner {
  display: grid;
  gap: 6px;
}

/* The EWP's controls. */
.winchdev {
  max-height: 30dvh;
}
.boompath {
  max-height: 30dvh;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.ctl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 10px;
  align-items: center;
}
.levers {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.levers.off {
  opacity: 0.4;
  pointer-events: none;
}
.lever {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px 6px;
  text-align: center;
}
.lever .eyebrow {
  grid-column: 1 / -1;
  text-align: left;
}
.lever-half {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.lever-half.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* The phone. */
.phone-screen {
  min-height: 52px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #0e1b33;
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.key-btn {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.key-btn:active {
  background: var(--brand-soft);
}
.btn.call {
  background: var(--ok);
  border-color: var(--ok);
}
.choices {
  display: grid;
  gap: 8px;
}
.choices .btn {
  justify-content: flex-start;
  text-align: left;
  min-height: 46px;
  padding: 8px 16px;
  border-radius: 16px;
}
.choices.tight .btn {
  min-height: 40px;
}
.radio-line {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-weight: 600;
}
.radio-line.ok {
  background: var(--ok-soft);
  border-color: #bfe3cb;
  color: var(--ok);
}

/* First response. */
.drsabcd {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.drsabcd li {
  display: grid;
  place-items: center;
  gap: 0;
  padding: 4px 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
}
.drsabcd b {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
}
.drsabcd span {
  font-size: 9.5px;
  line-height: 1.1;
  text-align: center;
  padding: 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  white-space: nowrap;
}
.drsabcd li.done {
  background: var(--ok-soft);
  border-color: #bfe3cb;
  color: var(--ok);
}
.drsabcd li.now {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-ink);
}
.fr-body {
  display: grid;
  gap: 10px;
}
.cpr {
  display: grid;
  gap: 8px;
}
.cpr-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}
.count {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}
.rate {
  height: 18px;
}
.rate .band {
  position: absolute;
  left: 40%;
  width: 20%;
  top: 0;
  bottom: 0;
  background: #d5f5e0;
  border-radius: 999px;
}
.rate small {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.rate.good i {
  background: var(--ok);
}
.cpr-pad {
  cursor: pointer;
  max-height: 30dvh;
  margin-top: 10px;
}
.aed-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.aed-screen {
  padding: 10px 12px;
  border-radius: 10px;
  background: #10291a;
  color: #86efac;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}
.aed-screen.warn {
  background: #3d2e06;
  color: #fde68a;
}
.aed-screen.bad {
  background: #3f0d0d;
  color: #fecaca;
}

/* ---- Modals ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 16px;
  background: rgba(14, 27, 51, 0.32);
  animation: fade 0.25s ease;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.sheet {
  width: min(620px, 100%);
  justify-self: center;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(14, 27, 51, 0.25);
  padding: 20px;
  display: grid;
  gap: 14px;
  animation: sheet-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
}
@media (max-width: 599px) {
  .modal {
    place-items: end stretch;
    padding: 0;
  }
  .sheet {
    width: 100%;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  }
}
.sheet h2 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
}
.sheet h2.title {
  font-size: clamp(30px, 7vw, 40px);
  line-height: 1.05;
}
.lead {
  color: var(--ink-2);
  font-size: 15.5px;
}
.today {
  font-weight: 600;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid #c9dafc;
}
.how {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: var(--ink-2);
  font-size: 14px;
}
.sheet .buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sheet .buttons .btn {
  flex: 1 1 180px;
}
.sheet > .buttons {
  position: sticky;
  bottom: -20px;
  margin-bottom: -20px;
  padding: 10px 0 20px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 12px);
}
@media (max-width: 599px) {
  .sheet > .buttons {
    bottom: calc(-16px - env(safe-area-inset-bottom));
    margin-bottom: calc(-16px - env(safe-area-inset-bottom));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}
.credit {
  color: var(--muted);
  font-size: 12px;
}
.sheet .chip {
  white-space: normal;
}
.my,
.brief {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
}
.my img,
.brief img {
  width: 70px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--brand-soft);
}
.my b,
.brief b {
  font-family: var(--display);
  font-size: 16px;
  display: block;
}
.my span,
.brief span {
  color: var(--ink-2);
  font-size: 13.5px;
  display: block;
}
.brief small {
  color: var(--muted);
  font-size: 12.5px;
  display: block;
  margin-top: 2px;
}
.levels {
  display: grid;
  gap: 8px;
}
.level {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.level.locked {
  opacity: 0.6;
}
.level .num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.lv-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.lv-text b {
  font-size: 14.5px;
}
.lv-text span {
  color: var(--ink-2);
  font-size: 13px;
}
.level .btn {
  min-height: 40px;
}
.stars {
  display: inline-flex;
  gap: 2px;
}
.stars svg {
  width: 18px;
  height: 18px;
}
.stars.big svg {
  width: 40px;
  height: 40px;
}
.stars.big svg.got {
  animation: star 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}
.stars.big svg:nth-child(2) {
  animation-delay: 0.15s;
}
.stars.big svg:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes star {
  from {
    transform: scale(0) rotate(-40deg);
  }
}
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.facts > div {
  display: grid;
  gap: 1px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  min-width: 0;
}
.facts small {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.facts b {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
}
.facts span {
  font-size: 12px;
  color: var(--ink-2);
}
.facts span.ok {
  color: var(--ok);
}
.facts span.bad {
  color: var(--bad);
}
.moved {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--ok-soft);
  border: 1px solid #bfe3cb;
  animation: levelup 1.2s ease;
}
.moved b {
  color: var(--ok);
}
@keyframes levelup {
  0% {
    transform: scale(0.96);
  }
  40% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}
.slips {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 14px;
  color: var(--ink-2);
}
.slips b {
  color: var(--ink);
}

/* ---- Rules ---- */
.rule {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.rule .plain {
  font-weight: 600;
  color: var(--ink);
}
.rule blockquote {
  margin: 0;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 13.5px;
}
.rule .src {
  color: var(--muted);
  font-size: 12px;
}

/* ---- Phones ---- */
@media (max-width: 899px), (max-aspect-ratio: 5/4) {
  .coach {
    font-size: 13px;
  }
}
@media (max-width: 599px) {
  .radio {
    top: 84px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.3;
    width: min(330px, calc(100% - 20px));
  }
  .site .draft-tag {
    font-size: 10px;
    padding: 1px 8px;
    bottom: 50px;
  }
  .tray-btn .long {
    display: none;
  }
  .tray .tray-btn .short {
    display: inline;
  }
  .boompath {
    max-height: 26dvh;
  }
  .winchdev {
    max-height: 22dvh;
  }
  .cpr-pad {
    max-height: 22dvh;
    margin-top: 6px;
  }
  .drsabcd span {
    display: none;
  }
  .drsabcd b {
    font-size: 15px;
    padding: 2px 0;
  }
  .toast {
    font-size: 12.5px;
    padding: 6px 12px;
    bottom: 50px;
  }
  .bubble {
    font-size: 12px;
    max-width: 170px;
    padding: 5px 9px;
  }
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tray {
    gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }
  .tray-btn {
    min-height: 46px;
    font-size: 13.5px;
    padding: 0 8px;
  }
  .panel {
    padding: 12px;
  }
}
@media (max-width: 430px) {
  .streak small {
    display: none;
  }
  .mycard small {
    display: none;
  }
  .clock small {
    font-size: 10.5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.tray-btn .short {
  display: none;
}
