:root {
  --paper: #e9f0ee;
  --paper-bright: #f7faf8;
  --ink: #10273a;
  --ink-soft: #49606d;
  --blue: #0b5f73;
  --blue-dark: #073e4e;
  --coin: #f5b82e;
  --coin-dark: #bd7418;
  --mark-green: #24865a;
  --mark-red: #ca443f;
  --mark-blue: #3477b7;
  --signal: #ef5b3f;
  --line: rgba(16, 39, 58, 0.18);
  --shadow: 0 24px 60px rgba(23, 55, 68, 0.14);
  --display: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  --utility: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(11, 95, 115, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 95, 115, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: var(--body);
  min-width: 320px;
}

button,
select,
input {
  font: inherit;
}

button,
select {
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 4px;
}

.page-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.wordmark strong {
  color: var(--blue);
  font-weight: 700;
}

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--utility);
  font-size: 12px;
  font-weight: 700;
}

.counter {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.counter-label,
.eyebrow {
  margin: 0;
  color: var(--blue);
  font-family: var(--utility);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.counter-value {
  display: flex;
  align-items: baseline;
  font-family: var(--utility);
}

.counter-value strong {
  font-size: 34px;
  line-height: 1;
}

.counter-value span {
  color: var(--ink-soft);
  font-size: 15px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 72px;
  align-items: end;
  padding: 80px 0 58px;
}

.intro h1 {
  max-width: 780px;
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: clamp(54px, 7.2vw, 98px);
  line-height: 0.87;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.brief {
  padding-bottom: 8px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

.brief p {
  margin: 0;
}

.brief .privacy-note {
  margin-top: 20px;
  padding-left: 16px;
  border-left: 3px solid var(--coin);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.workbench {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 39, 58, 0.16);
  border-radius: 4px;
  background: var(--paper-bright);
  box-shadow: var(--shadow);
}

.status-strip {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--utility);
  font-size: 12px;
}

.status-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coin);
  box-shadow: 0 0 0 4px rgba(245, 184, 46, 0.2);
}

.status-strip[data-tone="result"] .status-light {
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(239, 91, 63, 0.18);
}

.scale-stage {
  position: relative;
  min-height: 455px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(245, 184, 46, 0.13), transparent 24%),
    linear-gradient(180deg, #f9fbfa 0%, #edf4f1 100%);
}

.scale-stage::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 42px;
  height: 1px;
  background: var(--line);
}

.scale {
  --tilt: 0deg;
  --left-shift: 0px;
  --right-shift: 0px;
  position: relative;
  width: min(900px, 92%);
  height: 420px;
  margin: 0 auto;
}

.scale[data-result="left"] {
  --tilt: -3.4deg;
  --left-shift: 17px;
  --right-shift: -17px;
}

.scale[data-result="right"] {
  --tilt: 3.4deg;
  --left-shift: -17px;
  --right-shift: 17px;
}

.scale-beam-wrap {
  position: absolute;
  z-index: 3;
  top: 94px;
  left: 10%;
  right: 10%;
  height: 28px;
  transform: rotate(var(--tilt));
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.scale-beam {
  position: absolute;
  inset: 8px 0 auto;
  height: 10px;
  border-radius: 8px;
  background: var(--blue);
  box-shadow: inset 0 -3px 0 var(--blue-dark), 0 6px 12px rgba(7, 62, 78, 0.18);
}

.scale-beam::before,
.scale-beam::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 20px;
  height: 20px;
  border: 4px solid var(--blue);
  border-radius: 50%;
  background: var(--paper-bright);
}

.scale-beam::before {
  left: -4px;
}

.scale-beam::after {
  right: -4px;
}

.beam-pin {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border: 6px solid var(--paper-bright);
  border-radius: 50%;
  background: var(--coin);
  box-shadow: 0 0 0 4px var(--blue-dark);
}

.scale-column {
  position: absolute;
  z-index: 2;
  top: 102px;
  left: 50%;
  width: 58px;
  height: 250px;
  transform: translateX(-50%);
}

.scale-cap {
  position: absolute;
  top: 0;
  left: 50%;
  width: 38px;
  height: 38px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--blue-dark);
}

.scale-neck {
  position: absolute;
  top: 22px;
  bottom: 24px;
  left: 50%;
  width: 22px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--blue-dark), var(--blue) 46%, var(--blue-dark));
}

.scale-base {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 164px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 50% 50% 5px 5px;
  background: var(--blue-dark);
  box-shadow: 0 8px 0 rgba(7, 62, 78, 0.13);
}

.pan {
  position: absolute;
  z-index: 4;
  top: 132px;
  width: 34%;
  min-height: 150px;
  padding: 40px 14px 22px;
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pan-left {
  left: 0;
  transform: translateY(var(--left-shift));
}

.pan-right {
  right: 0;
  transform: translateY(var(--right-shift));
}

.pan::before,
.pan::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.pan::before {
  top: -28px;
  left: 50%;
  width: 70%;
  height: 92px;
  transform: translateX(-50%);
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid transparent;
  border-left: 2px solid var(--blue);
  clip-path: polygon(49% 0, 51% 0, 100% 100%, 0 100%);
}

.pan::after {
  left: 4%;
  right: 4%;
  bottom: 8px;
  height: 70px;
  border-bottom: 10px solid var(--blue);
  border-radius: 0 0 50% 50%;
  background: rgba(11, 95, 115, 0.07);
}

.pan-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-soft);
  font-family: var(--utility);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pan-coins {
  position: relative;
  z-index: 2;
  min-height: 72px;
  display: flex;
  flex-wrap: wrap-reverse;
  align-content: flex-end;
  justify-content: center;
  gap: 5px;
}

.coin {
  --coin-face: var(--coin);
  --coin-rim: #eaa323;
  --coin-edge: var(--coin-dark);
  --coin-shadow: #9c5c14;
  --coin-ink: #57350c;
  --coin-highlight: #ffe49a;
  --coin-inset: rgba(255, 235, 168, 0.52);
  --coin-etch: rgba(104, 59, 8, 0.5);
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 3px solid var(--coin-edge);
  border-radius: 50%;
  color: var(--coin-ink);
  background:
    radial-gradient(circle at 36% 29%, var(--coin-highlight) 0 4%, transparent 5%),
    radial-gradient(circle, var(--coin-face) 59%, var(--coin-rim) 60% 68%, var(--coin-face) 69%);
  box-shadow:
    inset 0 0 0 3px var(--coin-inset),
    0 5px 0 var(--coin-shadow),
    0 8px 12px rgba(82, 51, 14, 0.16);
  font-family: var(--utility);
  font-size: 15px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  user-select: none;
  -webkit-user-select: none;
}

.coin::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed var(--coin-etch);
  border-radius: 50%;
}

.coin[data-color="green"] {
  --coin-face: #3da875;
  --coin-rim: #2f9164;
  --coin-edge: #1d704b;
  --coin-shadow: #15583b;
  --coin-ink: #082d1e;
  --coin-highlight: #b9f1d3;
  --coin-inset: rgba(202, 255, 225, 0.42);
  --coin-etch: rgba(7, 66, 42, 0.55);
}

.coin[data-color="red"] {
  --coin-face: #e15c55;
  --coin-rim: #c94843;
  --coin-edge: #a83431;
  --coin-shadow: #7f2826;
  --coin-ink: #3f0e0d;
  --coin-highlight: #ffc4bd;
  --coin-inset: rgba(255, 218, 213, 0.42);
  --coin-etch: rgba(92, 17, 15, 0.55);
}

.coin[data-color="blue"] {
  --coin-face: #4f8fc8;
  --coin-rim: #3979b3;
  --coin-edge: #286296;
  --coin-shadow: #1c4a73;
  --coin-ink: #092641;
  --coin-highlight: #c6e6ff;
  --coin-inset: rgba(214, 239, 255, 0.44);
  --coin-etch: rgba(8, 55, 94, 0.55);
}

.coin:hover {
  transform: translateY(-3px);
}

.coin.is-selected {
  transform: translateY(-5px) scale(1.05);
  box-shadow:
    inset 0 0 0 3px var(--coin-inset),
    0 5px 0 var(--coin-shadow),
    0 0 0 5px var(--signal),
    0 12px 22px rgba(82, 51, 14, 0.18);
}

.coin.is-dragging {
  opacity: 0.42;
  filter: grayscale(0.25);
}

.pan .coin {
  width: 45px;
  height: 45px;
  border-width: 2px;
  font-size: 12px;
  box-shadow: inset 0 0 0 2px var(--coin-inset), 0 3px 0 var(--coin-shadow);
}

.drop-zone.is-drag-over {
  background-color: rgba(245, 184, 46, 0.1);
}

.measurement {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 40px 34px;
}

.primary-action,
.secondary-action,
.guess-button {
  border: 0;
  color: white;
  background: var(--signal);
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.primary-action:hover:not(:disabled),
.secondary-action:hover,
.guess-button:hover {
  transform: translateY(-2px);
  background: #d9472f;
}

.primary-action {
  min-width: 282px;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 24px;
  border-radius: 3px;
  font-size: 15px;
}

.primary-action:disabled {
  opacity: 0.38;
}

.button-index {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  font-family: var(--utility);
  font-size: 12px;
}

.measurement p {
  max-width: 360px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.coin-tray {
  padding: 34px 40px 36px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(11, 95, 115, 0.035) 25%, transparent 25%) 0 0 / 20px 20px,
    var(--paper-bright);
}

.tray-heading,
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.tray-heading h2,
.section-heading h2,
.guess-card h2,
.new-game-panel h2 {
  margin: 7px 0 0;
  font-family: var(--display);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.tray-heading > p {
  max-width: 360px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.coins {
  min-height: 94px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 17px;
  padding: 25px 0 12px;
}

.coin-marking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-top: 10px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(233, 240, 238, 0.62);
}

.control-label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-family: var(--utility);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.color-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.color-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-bright);
  font-size: 11px;
  font-weight: 700;
}

.color-button:hover:not(:disabled) {
  border-color: var(--ink-soft);
  transform: translateY(-1px);
}

.color-button[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: inset 0 -3px 0 currentColor;
}

.color-button:disabled {
  opacity: 0.38;
}

.color-help {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.color-swatch,
.legend-dot {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(16, 39, 58, 0.28);
  border-radius: 50%;
  background: currentColor;
}

.color-button-green .color-swatch,
.legend-dot-green {
  color: var(--mark-green);
}

.color-button-red .color-swatch,
.legend-dot-red {
  color: var(--mark-red);
}

.color-button-blue .color-swatch,
.legend-dot-blue {
  color: var(--mark-blue);
}

.coin-legend ul {
  display: flex;
  gap: 17px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.coin-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
}

.coin-legend strong {
  color: var(--ink);
}

.placement-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.placement-button,
.text-button {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.placement-button {
  min-width: 120px;
  padding: 11px 14px;
}

.placement-button:hover:not(:disabled),
.text-button:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(11, 95, 115, 0.06);
}

.placement-button:disabled {
  opacity: 0.35;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  padding: 24px 0;
}

.history-card,
.guess-card {
  min-height: 425px;
  padding: 34px 36px;
  border: 1px solid var(--line);
  background: rgba(247, 250, 248, 0.78);
}

.text-button {
  padding: 9px 12px;
}

.history-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.empty-history {
  min-height: 210px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

.history-entry {
  display: grid;
  grid-template-columns: 34px 1fr 80px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 78px;
  border-top: 1px solid var(--line);
  font-family: var(--utility);
  font-size: 11px;
}

.history-entry:last-child {
  border-bottom: 1px solid var(--line);
}

.history-number {
  color: var(--blue);
  font-weight: 800;
}

.history-coins {
  line-height: 1.55;
}

.history-result {
  padding: 7px 6px;
  border-radius: 2px;
  color: white;
  background: var(--blue);
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.history-coins:last-child {
  text-align: right;
}

.guess-card {
  background: var(--ink);
  color: white;
}

.guess-card .eyebrow {
  color: #72c4ce;
}

.guess-card h2 {
  font-size: 42px;
}

.guess-intro {
  margin: 14px 0 27px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset:disabled {
  opacity: 0.42;
}

.guess-card label,
.form-label {
  display: block;
  margin: 16px 0 8px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--utility);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "↓";
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  pointer-events: none;
}

select {
  width: 100%;
  height: 50px;
  padding: 0 42px 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  appearance: none;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

select option {
  color: var(--ink);
}

.weight-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.weight-choice label {
  margin: 0;
}

.weight-choice input {
  position: absolute;
  opacity: 0;
}

.weight-choice span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  color: white;
  cursor: pointer;
}

.weight-choice input:checked + span {
  border-color: var(--coin);
  color: var(--ink);
  background: var(--coin);
}

.weight-choice input:focus-visible + span {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

.guess-button {
  width: 100%;
  min-height: 50px;
  margin-top: 20px;
  border-radius: 2px;
}

.guess-result {
  display: none;
  margin-top: 18px;
  padding: 13px 14px;
  border-left: 3px solid var(--coin);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.5;
}

.guess-result.is-visible {
  display: block;
}

.guess-result.is-correct {
  border-color: #6ed3a5;
}

.new-game-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 60px;
  padding: 44px 48px;
  border: 1px solid var(--line);
  background: var(--coin);
}

.new-game-panel .eyebrow {
  color: #765019;
}

.secondary-action {
  min-height: 54px;
  padding: 0 22px;
  border-radius: 2px;
  color: white;
  background: var(--ink);
  white-space: nowrap;
}

.secondary-action:hover {
  background: var(--blue-dark);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 24px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--utility);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .brief {
    max-width: 620px;
  }

  .lower-grid {
    grid-template-columns: 1fr;
  }

  .history-card,
  .guess-card {
    min-height: auto;
  }

  .coins {
    gap: 12px;
  }

  .coin-marking {
    grid-template-columns: 1fr;
  }

  .coin-legend ul {
    flex-wrap: wrap;
  }

  .coin {
    width: 54px;
    height: 54px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 1240px);
  }

  .topbar {
    min-height: 78px;
  }

  .wordmark {
    font-size: 15px;
  }

  .wordmark-mark {
    width: 38px;
  }

  .counter-label {
    display: none;
  }

  .counter-value strong {
    font-size: 27px;
  }

  .intro {
    padding: 54px 0 40px;
  }

  .intro h1 {
    font-size: clamp(46px, 15vw, 72px);
  }

  .status-strip {
    padding: 0 16px;
  }

  .scale-stage {
    min-height: 380px;
  }

  .scale {
    width: 100%;
    height: 360px;
  }

  .scale-beam-wrap {
    top: 80px;
    left: 8%;
    right: 8%;
  }

  .scale-column {
    top: 88px;
    height: 220px;
  }

  .scale-base {
    width: 130px;
  }

  .pan {
    top: 118px;
    width: 40%;
    min-height: 135px;
    padding-inline: 5px;
  }

  .pan-left {
    left: 1%;
  }

  .pan-right {
    right: 1%;
  }

  .pan .coin {
    width: 35px;
    height: 35px;
    font-size: 10px;
  }

  .pan-coins {
    gap: 3px;
  }

  .measurement {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0 16px 24px;
  }

  .primary-action {
    min-width: 0;
    width: 100%;
  }

  .coin-tray,
  .history-card,
  .guess-card {
    padding: 28px 20px;
  }

  .tray-heading,
  .section-heading {
    align-items: flex-start;
  }

  .tray-heading > p {
    display: none;
  }

  .coins {
    justify-content: center;
    gap: 12px;
  }

  .placement-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .coin-marking {
    padding: 16px;
  }

  .color-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .color-button {
    justify-content: center;
    padding-inline: 7px;
    font-size: 10px;
  }

  .coin-legend ul {
    display: grid;
    gap: 8px;
  }

  .placement-button {
    min-width: 0;
    padding-inline: 6px;
    font-size: 10px;
  }

  .history-entry {
    grid-template-columns: 25px 1fr 58px 1fr;
    gap: 7px;
    font-size: 9px;
  }

  .new-game-panel {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 36px;
    padding: 34px 24px;
  }

  .new-game-panel h2 {
    font-size: 29px;
  }

  footer {
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
