@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #0b1d33;
  --ink-2: #0f2744;
  --paper: #133a63;
  --paper-2: #174571;
  --line: rgba(214, 232, 255, 0.11);
  --line-strong: rgba(214, 232, 255, 0.32);
  --chalk: #eaf2fb;
  --muted: #9cb8d6;
  --amber: #ffc04d;
  --coral: #ff8d77;
  --mint: #8fe3c2;
  --alarm: #ff5d52;
  --pit: #06111f;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 3px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 80% at 70% -10%, rgba(40, 96, 156, 0.35), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--ink);
  color: var(--chalk);
  font: 16px/1.5 var(--body);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px calc(28px + env(safe-area-inset-bottom));
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 24px;
}

.wordmark {
  font: 700 30px/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.wordmark span {
  color: var(--amber);
}

.topnav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.topnav a,
.linklike {
  font: 500 17px/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 12px 10px;
  min-height: 44px;
  cursor: pointer;
}
.topnav a:hover,
.linklike:hover,
.topnav a[aria-current] {
  color: var(--chalk);
}
.topnav a[aria-current] {
  box-shadow: inset 0 -2px 0 var(--amber);
}

/* ---------- shared ---------- */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

.eyebrow,
.tb-label,
.sheet-no {
  font: 500 12px/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(234, 242, 251, 0.04);
  color: var(--chalk);
  font: 700 17px/1 var(--display);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover:not(:disabled) {
  background: rgba(234, 242, 251, 0.1);
  border-color: var(--chalk);
}
.btn:disabled {
  opacity: 0.38;
  cursor: default;
}
.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}
.btn-primary:hover:not(:disabled) {
  background: #ffd27f;
  border-color: #ffd27f;
}
.btn kbd {
  font: 500 10px/1 var(--mono);
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 3px 4px;
  text-transform: none;
  letter-spacing: 0;
}

kbd {
  font-family: var(--mono);
  font-size: 0.85em;
}

.star {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
}
.star svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--muted);
  stroke-width: 6;
  stroke-linejoin: round;
}
.star.on svg {
  fill: var(--amber);
  stroke: var(--amber);
}

/* SVG paint classes used by art.js */
.fill-chalk { fill: var(--chalk); }
.fill-ink { fill: var(--ink); }
.fill-alarm { fill: var(--alarm); }
.fill-amber { fill: var(--amber); }
.fill-coral { fill: var(--coral); }
.fill-pit { fill: var(--pit); }
.stroke-ink { stroke: var(--ink); }
.stroke-chalk { stroke: var(--chalk); }
.stroke-mint { stroke: var(--mint); }
.stroke-amber { stroke: var(--amber); }

/* ---------- home ---------- */

#view-home {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 28px;
  align-items: start;
}

.daily-sheet {
  position: sticky;
  top: 20px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 22px;
  display: grid;
  gap: 18px;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
}
.daily-sheet h1 {
  font-size: clamp(40px, 6vw, 60px);
  margin-top: 6px;
}
.daily-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font: 500 13px/1.4 var(--mono);
}
.daily-foot {
  display: grid;
  gap: 14px;
}
.daily-status {
  margin: 0;
  color: var(--muted);
}
.daily-foot .btn {
  justify-self: start;
  min-width: 200px;
}

.mini-board {
  border: 1px solid var(--line-strong);
  padding: 10px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 12px 12px,
    var(--paper-2);
}
.mini {
  display: grid;
  grid-template-columns: repeat(var(--w), 1fr);
  gap: 2px;
  max-width: 340px;
  margin: 0 auto;
}
.mini .m {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: rgba(234, 242, 251, 0.03);
}
.mini .m svg {
  width: 70%;
  height: 70%;
}
.mini .wall {
  background: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(234, 242, 251, 0.35);
}

.register-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--chalk);
  padding-bottom: 8px;
}
.register-head h2 {
  font-size: 34px;
}
.register-total {
  margin: 0;
  font: 500 13px var(--mono);
  color: var(--muted);
}

.chapter {
  border-bottom: 1px solid var(--line-strong);
  padding: 18px 0;
}
.chapter-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 12px;
  align-items: baseline;
}
.chapter-head h3 {
  font-size: 24px;
}
.chapter-head p {
  grid-column: 1 / -1;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 15px;
}
.chapter-stars {
  font: 500 13px var(--mono);
  color: var(--amber);
}
.chapter.locked .chapter-head h3,
.chapter.locked .chapter-stars {
  color: var(--muted);
}

.jobs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}
.job {
  display: grid;
  grid-template-columns: 2.2em 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 4px;
  border-bottom: 1px dashed var(--line);
  text-decoration: none;
}
a.job:hover .job-name {
  color: var(--amber);
}
.job-no {
  font: 500 13px var(--mono);
  color: var(--muted);
}
.job-name {
  font: 500 19px/1.1 var(--display);
  letter-spacing: 0.02em;
}
.job-stars {
  font-size: 13px;
  white-space: nowrap;
}
.job.next .job-name::after {
  content: " ←";
  color: var(--amber);
}
.job.locked {
  opacity: 0.35;
}

/* ---------- play ---------- */

.play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.board-area {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.board-frame {
  padding: 30px 14px 14px 32px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: 0 30px 70px -36px rgba(0, 0, 0, 0.9);
  width: min(100%, 640px, calc(100dvh - 190px));
}

.board {
  --w: 7;
  --h: 7;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--w), minmax(0, 1fr));
  grid-template-rows: repeat(var(--h), minmax(0, 1fr));
  aspect-ratio: var(--w) / var(--h);
  border: 2px solid var(--chalk);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / calc(100% / var(--w) / 4) calc(100% / var(--h) / 4),
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / calc(100% / var(--w) / 4) calc(100% / var(--h) / 4),
    var(--paper-2);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.board:focus-visible {
  outline: 1px dashed var(--amber);
  outline-offset: 8px;
}
.row {
  display: contents;
}

.cell {
  position: relative;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.cell {
  min-width: 0;
  min-height: 0;
}
.cell .art {
  position: absolute;
  inset: 18%;
  display: grid;
  place-items: center;
  z-index: 1;
}
.cell .art svg {
  width: 100%;
  height: 100%;
}

.cell.wall {
  background:
    repeating-linear-gradient(45deg, rgba(234, 242, 251, 0.13) 0 1px, transparent 1px 5px),
    var(--ink);
  box-shadow: inset 0 0 0 1px rgba(234, 242, 251, 0.4);
  cursor: default;
}
.cell.exit {
  background: rgba(143, 227, 194, 0.1);
}
.cell.exit .art {
  inset: 11%;
}
.cell.pit {
  background: var(--pit);
}
.cell.pit .art {
  inset: 0;
}
.cell.crumble {
  background: rgba(234, 242, 251, 0.05);
  outline: 1px dashed rgba(234, 242, 251, 0.45);
  outline-offset: -6px;
}
.cell.has-gem .art {
  inset: 22%;
  animation: glint 3.2s ease-in-out infinite;
}
.cell.gate .art {
  inset: 6%;
}
.cell.gate.closed {
  background: rgba(234, 242, 251, 0.07);
}
.cell.sentry {
  background: rgba(255, 192, 77, 0.12);
  cursor: default;
}
.cell.lit {
  background-color: rgba(255, 192, 77, 0.22);
  box-shadow: inset 0 0 18px rgba(255, 192, 77, 0.35);
}
.cell.unsafe::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, rgba(255, 93, 82, 0.55) 0 2.5px, transparent 2.5px 8px);
  pointer-events: none;
  z-index: 2;
}
.cell.hinted::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 3px solid var(--mint);
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
  z-index: 3;
}

.facing {
  position: absolute;
  inset: 0;
  transform: rotate(calc(var(--dir) * 90deg));
  pointer-events: none;
}
.facing::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  translate: -50% 0;
  border: 7px solid transparent;
  border-bottom: 9px solid var(--amber);
  border-top: 0;
}
.spin {
  position: absolute;
  right: -14%;
  bottom: -14%;
  font: 700 clamp(12px, 1.6vw, 18px)/1 var(--mono);
  color: var(--amber);
}
.spin.cw::before {
  content: "↻";
}
.spin.ccw::before {
  content: "↺";
}

.trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}
.trail polyline {
  fill: none;
  stroke: var(--chalk);
  stroke-width: 0.06;
  stroke-dasharray: 0.14 0.12;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}

.token {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / var(--w));
  height: calc(100% / var(--h));
  transform: translate(calc(var(--c, 0) * 100%), calc(var(--r, 0) * 100%));
  transition: transform 0.14s ease-out;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 4;
}
.token svg {
  width: 66%;
  height: 66%;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45));
}
.token.thief {
  z-index: 5;
}
.token.thief.bump svg {
  animation: bump 0.22s ease-out;
}
.token.thief.caught svg {
  animation: caught 0.5s ease-out forwards;
}
.token.guard .heading {
  position: absolute;
  inset: 0;
  transform: rotate(var(--a, 0rad));
}
.token.guard .heading::before {
  content: "";
  position: absolute;
  right: 1px;
  top: 50%;
  translate: 0 -50%;
  border: 6px solid transparent;
  border-left: 8px solid var(--alarm);
  border-right: 0;
}

.axis {
  position: absolute;
  display: grid;
  font: 500 11px/1 var(--mono);
  color: var(--muted);
  pointer-events: none;
}
.axis-x {
  left: 0;
  right: 0;
  top: -22px;
  grid-template-columns: repeat(var(--w), 1fr);
  text-align: center;
}
.axis-y {
  top: 0;
  bottom: 0;
  left: -24px;
  grid-template-rows: repeat(var(--h), 1fr);
  align-items: center;
}

.status {
  min-height: 1.5em;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.status[data-tone="good"] {
  color: var(--mint);
}
.status[data-tone="warn"] {
  color: var(--coral);
}

/* The job sheet is drawn as an architect's title block. */
.titleblock {
  border: 2px solid var(--chalk);
  background: var(--ink-2);
  display: grid;
}
.tb-row,
.tb-cell,
.objectives,
.tip,
.controls,
.toggle {
  padding: 12px 14px;
}
.tb-title {
  border-bottom: 1px solid var(--line-strong);
  display: grid;
  gap: 6px;
}
.tb-title h1 {
  font-size: 34px;
}
.tb-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  border-bottom: 1px solid var(--line-strong);
}
.tb-cell {
  display: grid;
  gap: 4px;
  align-content: start;
}
.tb-cell + .tb-cell {
  border-left: 1px solid var(--line-strong);
}
.tb-value {
  font: 700 28px/1 var(--display);
  font-variant-numeric: tabular-nums;
}
.tb-value small {
  font-size: 17px;
  color: var(--muted);
  margin-left: 2px;
}
.fuse {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 4px;
}
.fuse i {
  width: 6px;
  height: 10px;
  background: var(--amber);
  transition: background 0.2s;
}
.fuse i.spent {
  background: rgba(234, 242, 251, 0.14);
}
.energy-cell.low .tb-value b,
.energy-cell.low .fuse i:not(.spent) {
  color: var(--coral);
  background-color: var(--coral);
}
.energy-cell.low .tb-value b {
  background: none;
}

.objectives {
  list-style: none;
  margin: 0;
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line-strong);
}
.objectives li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 15px;
}
.objectives li.met {
  color: var(--chalk);
}
.objectives li.lost {
  text-decoration: line-through;
  opacity: 0.6;
}
.objectives .star {
  font-size: 18px;
}

.tip {
  margin: 0;
  border-bottom: 1px solid var(--line-strong);
  font-size: 15px;
  color: var(--chalk);
  background: rgba(255, 192, 77, 0.08);
}
.tip::before {
  content: "Note · ";
  font: 500 12px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-bottom: 1px solid var(--line-strong);
}

.tools {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-strong);
  display: grid;
  gap: 8px;
}
.tool-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}
.tool {
  gap: 6px;
  padding: 8px 8px;
  font-size: 15px;
}
.tool-glyph {
  flex: none;
  width: 22px;
  height: 22px;
  display: inline-block;
}
.tool-glyph svg {
  display: block;
  width: 22px;
  height: 22px;
}
.tool-n {
  font: 500 13px/1 var(--mono);
  color: var(--amber);
}
.tool.passive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font: 700 15px/1 var(--display);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.tool.passive.spent {
  opacity: 0.38;
}
.tool-state {
  margin: 0;
  font-size: 14px;
  color: var(--mint);
}
.tool-state:empty {
  display: none;
}

.token.thief.cloaked svg {
  opacity: 0.45;
  filter: drop-shadow(0 0 10px rgba(234, 242, 251, 0.9));
}
.token.thief.cloaked::after {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 2px dashed rgba(234, 242, 251, 0.75);
  animation: drift 2.4s linear infinite;
}
.board.frozen .token.guard svg,
.board.frozen .cell.sentry .art svg {
  filter: grayscale(0.6) drop-shadow(0 0 6px rgba(255, 192, 77, 0.9));
}
.board.frozen .token.guard::after {
  content: "?";
  position: absolute;
  top: 2%;
  right: 10%;
  font: 700 clamp(13px, 1.8vw, 20px)/1 var(--display);
  color: var(--amber);
}
.board.frozen .token.guard .heading {
  display: none;
}

.toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  min-height: 44px;
}
.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--amber);
}

/* ---------- dialogs ---------- */

.sheet-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  border: 2px solid var(--chalk);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--chalk);
  padding: 26px 26px 22px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95);
}
.sheet-dialog::backdrop {
  background: rgba(6, 17, 31, 0.72);
  backdrop-filter: blur(2px);
}
.sheet-dialog h2 {
  font-size: 44px;
  margin: 6px 0 10px;
}
.sheet-dialog h3 {
  font-size: 22px;
  margin: 18px 0 6px;
}
.result-stars {
  font-size: 44px;
  display: flex;
  gap: 8px;
}
.result-stars:empty {
  display: none;
}
.result-body {
  color: var(--chalk);
}
.result-figures {
  display: flex;
  gap: 0;
  margin: 14px 0 20px;
  border: 1px solid var(--line-strong);
}
.result-figures div {
  flex: 1;
  padding: 10px 12px;
}
.result-figures div + div {
  border-left: 1px solid var(--line-strong);
}
.result-figures dt {
  font: 500 11px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.result-figures dd {
  margin: 4px 0 0;
  font: 700 28px/1 var(--display);
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.share-note {
  margin: 12px 0 0;
  color: var(--mint);
  font-size: 14px;
}
.share-note:empty {
  display: none;
}
.share-note pre {
  font: 13px/1.4 var(--mono);
  color: var(--chalk);
  background: var(--ink);
  padding: 10px;
  white-space: pre-wrap;
  user-select: all;
}

.rules .lede {
  margin-top: 0;
}
.legend {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.legend li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 15px;
}
.glyph {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
}
.glyph svg {
  width: 70%;
  height: 70%;
}
.glyph-hatch {
  background: repeating-linear-gradient(-45deg, rgba(255, 93, 82, 0.6) 0 2.5px, transparent 2.5px 8px), var(--paper-2);
}
.inline-glyph {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.25em;
}
.star-rules {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 4px;
}
.keys {
  color: var(--muted);
  font-size: 15px;
}
.keys kbd {
  color: var(--chalk);
}

.noscript {
  text-align: center;
  padding: 40px;
}

/* ---------- motion ---------- */

@keyframes glint {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
}
@keyframes bump {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-8%); }
  60% { transform: translateX(6%); }
}
@keyframes drift {
  to { transform: rotate(360deg); }
}
@keyframes caught {
  to { transform: scale(0.7); opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  #view-home,
  .play {
    grid-template-columns: 1fr;
  }
  .daily-sheet {
    position: static;
  }
  .play {
    gap: 16px;
  }
  .board-frame {
    width: min(100%, 560px);
  }
  .titleblock {
    width: min(100%, 560px);
    justify-self: center;
  }
}

@media (max-width: 560px) {
  .shell {
    padding: 0 12px calc(20px + env(safe-area-inset-bottom));
  }
  .topbar {
    margin-bottom: 14px;
    padding: 10px 0 8px;
  }
  .wordmark {
    font-size: 24px;
  }
  .topnav a,
  .linklike {
    font-size: 15px;
    padding: 12px 7px;
  }
  .board-frame {
    padding: 24px 8px 8px 24px;
  }
  .axis-x {
    top: -18px;
  }
  .axis-y {
    left: -18px;
  }
  .jobs {
    grid-template-columns: 1fr;
  }
  .tb-title h1 {
    font-size: 28px;
  }
  .controls {
    grid-template-columns: repeat(4, 1fr);
    position: sticky;
    bottom: 0;
    background: var(--ink-2);
    padding: 10px;
    order: -1;
    border-bottom: 1px solid var(--line-strong);
    z-index: 5;
  }
  .controls .btn {
    padding: 8px 4px;
    font-size: 15px;
  }
  .controls kbd,
  .tools kbd {
    display: none;
  }
  .tools {
    order: -1;
    padding: 10px;
  }
  .tools > .tb-label {
    display: none;
  }
  .sheet-dialog {
    padding: 20px 18px 18px;
  }
  .sheet-dialog h2 {
    font-size: 36px;
  }
}

@media (pointer: coarse) {
  .btn kbd {
    display: none;
  }
}
