:root {
  color-scheme: dark;
  --amber: #ffad32;
  --amber-hot: #ffd176;
  --brass: #c9943f;
  --ink: #f5e4bd;
  --muted: #9d927c;
  --night: #080609;
  --panel: #151116;
  --red: #8e2631;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  background: var(--night);
  color: var(--ink);
}

body,
button,
input {
  font-family: "Trebuchet MS", system-ui, sans-serif;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.machine {
  width: 100%;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(circle at 50% -20%, #46291e 0, #171014 28%, #070608 68%),
    #080609;
}

.backbox {
  position: relative;
  z-index: 5;
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(390px, 820px) minmax(260px, 1fr);
  gap: clamp(12px, 2vw, 28px);
  align-items: center;
  padding:
    max(12px, env(safe-area-inset-top))
    max(16px, calc((100vw - 1540px) / 2 + 16px), env(safe-area-inset-right))
    12px
    max(16px, calc((100vw - 1540px) / 2 + 16px), env(safe-area-inset-left));
  border-bottom: 2px solid #684a27;
  background:
    linear-gradient(90deg, #100b0c, #211315 45%, #100b0c),
    #140e10;
  box-shadow: 0 12px 35px #000d, inset 0 -4px #080608;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  justify-self: start;
}

.crest {
  width: 64px;
  flex: 0 0 64px;
  aspect-ratio: 0.88;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 93% 15%, 84% 78%, 50% 100%, 16% 78%, 7% 15%);
  background: linear-gradient(145deg, #b73a3e, #5b1720);
  box-shadow: inset 0 0 0 4px #d6a34d;
  color: #ffda81;
  font: 900 21px Georgia, serif;
}

.brand__copy {
  min-width: 0;
  line-height: 0.91;
}

.brand__copy span,
.brand__copy small {
  display: block;
}

.brand__copy span {
  color: #e1bb68;
  font: 800 15px Georgia, serif;
  letter-spacing: 0.08em;
}

.brand__copy strong {
  display: block;
  color: #fff0c6;
  font: 1000 clamp(25px, 2.5vw, 39px) / 0.92 Impact, Haettenschweiler, sans-serif;
  letter-spacing: 0.045em;
  text-shadow: 3px 3px #8d2731;
}

.brand__copy small {
  margin-top: 7px;
  color: var(--muted);
  font: italic 11px Georgia, serif;
}

.display-bezel {
  width: 100%;
  max-width: 820px;
  height: 88px;
  justify-self: center;
  overflow: hidden;
  padding: 5px;
  border: 1px solid #6e5032;
  border-radius: 8px;
  background: #030202;
  box-shadow: inset 0 0 0 4px #0b0909, 0 0 20px #ff610012;
}

.dot-display {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 3px;
  background: #120803;
}

.machine-actions {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 7px;
  justify-self: end;
}

.settings-menu {
  position: relative;
}

.settings-button,
.scores-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.settings-button > span:first-child,
.scores-button > span:first-child {
  font-size: 15px;
  line-height: 1;
}

.settings-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  max-height: calc(100dvh - 92px);
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #8a6839;
  border-radius: 9px;
  background: #100d11f5;
  box-shadow: 0 18px 45px #000d, inset 0 1px #ffffff12;
  overflow-y: auto;
}

.settings-panel[hidden] {
  display: none;
}

#edit-button[hidden],
.machine-actions #start-button[hidden],
.machine-actions #scores-button[hidden],
.update-ready[hidden],
.editor[hidden] {
  display: none;
}

.settings-panel .button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.settings-control {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #403729;
  border-radius: 7px;
  background: #171315;
}

.settings-control__label,
.volume-control__value,
.graphics-quality-scale {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.settings-control__label {
  color: var(--ink);
}

.graphics-quality-picker {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 6px;
}

.graphics-quality-picker output {
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.graphics-quality-arrow {
  min-height: 30px;
  border: 1px solid #6c5636;
  border-radius: 6px;
  background: linear-gradient(#33291f, #1d1716);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.graphics-quality-arrow:hover:not(:disabled) {
  border-color: #d2a75d;
}

.graphics-quality-arrow:disabled {
  opacity: 0.32;
  cursor: default;
}

.graphics-quality-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 7px;
}

.volume-control {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.volume-control__value {
  color: var(--amber);
}

.volume-control input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--amber);
}

.settings-panel .settings-resume {
  justify-content: center;
  margin-top: 2px;
  text-align: center;
}

.settings-controller-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 3px 0 1px;
  color: #b7a98f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

html.gamepad-input-active .settings-controller-hint {
  display: flex;
}

.settings-controller-hint kbd {
  min-width: 42px;
  padding: 3px 6px;
}

.button,
.icon-button,
.tool-grid button {
  min-height: 38px;
  border: 1px solid #564832;
  border-radius: 7px;
  background: linear-gradient(#29211e, #171315);
  color: var(--ink);
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.button {
  padding: 8px 12px;
}

.button:hover,
.icon-button:hover,
.tool-grid button:hover {
  border-color: #c79b51;
  background: linear-gradient(#3b2d25, #20171a);
}

.button:active,
.icon-button:active,
.tool-grid button:active {
  transform: translateY(1px);
}

.button--gold {
  border-color: #f0ce7c;
  background: linear-gradient(#e5bd65, #a26725);
  color: #170e07;
  box-shadow: inset 0 1px #fff8;
}

.button--gold:hover,
.button--gold:focus-visible {
  border-color: #ffe7a4;
  background: linear-gradient(#f5d27d, #bd7a2c);
  color: #211006;
}

.button--danger {
  width: 100%;
  margin-top: 4px;
  border-color: #7b3439;
  color: #f4a5a0;
}

.update-ready {
  position: fixed;
  z-index: 60;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 38px;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid #d3a24f;
  border-radius: 11px;
  background: #171116f5;
  box-shadow: 0 20px 55px #000e, inset 0 1px #ffffff14;
}

.update-ready div {
  min-width: 0;
}

.update-ready strong,
.update-ready span {
  display: block;
}

.update-ready strong {
  color: var(--amber-hot);
  font: 900 14px Georgia, serif;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.update-ready span {
  margin-top: 3px;
  color: #c9b996;
  font-size: 11px;
  line-height: 1.3;
}

.update-ready .button {
  min-height: 38px;
  white-space: nowrap;
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 17px;
}

.table-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #030304;
  isolation: isolate;
}

.game-canvas,
.game-canvas canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.game-canvas {
  touch-action: none;
}

.launch-callout {
  position: absolute;
  z-index: 4;
  right: clamp(14px, 3vw, 42px);
  bottom: clamp(75px, 10vh, 115px);
  min-width: 280px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0 10px;
  align-items: center;
  padding: 10px 13px;
  border: 1px solid #d59b45;
  border-radius: 9px;
  background: #130c0cde;
  box-shadow: 0 12px 35px #000b, inset 0 0 25px #7e271824;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.launch-callout.is-hidden {
  opacity: 0;
  transform: translateY(8px);
}

.launch-callout__icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border: 1px solid #be7a31;
  border-radius: 6px;
  color: #ffca67;
  background: #20110d;
  font: 900 25px/1 monospace;
  animation: load-cannon 1.15s ease-in-out infinite;
}

.launch-callout.is-attract .launch-callout__icon {
  animation: none;
  font-size: 19px;
}

.launch-callout strong,
.launch-callout small {
  display: block;
}

.launch-instruction-touch {
  display: none !important;
}

.launch-callout strong {
  color: #ffcf75;
  font: 900 13px Georgia, serif;
  letter-spacing: 0.09em;
}

.launch-callout small {
  margin-top: 3px;
  color: #d1c09d;
  font-size: 10px;
}

.charge-meter {
  grid-column: 1 / -1;
  height: 4px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 2px;
  background: #3a2119;
}

.charge-meter i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #d9892d, #ffe184);
  box-shadow: 0 0 9px #ff9c32;
}

@keyframes load-cannon {
  50% { transform: translateY(4px); }
}

.control-hints {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 13px;
  width: min(680px, calc(100% - 30px));
  display: flex;
  justify-content: space-between;
  gap: 12px;
  transform: translateX(-50%);
  color: #aa9c83;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.control-hints[hidden] {
  display: none;
}

html.is-mobile-device .control-hints {
  display: none;
}

html.is-mobile-device.gamepad-input-active .control-hints {
  display: flex;
}

html.is-mobile-device.gamepad-input-active .touch-controls {
  display: none;
}

html.is-mobile-device.gamepad-input-active .launch-instruction-keyboard {
  display: block !important;
}

html.is-mobile-device.gamepad-input-active .launch-instruction-touch {
  display: none !important;
}

kbd {
  display: inline-block;
  min-width: 26px;
  padding: 5px 7px;
  border: 1px solid #5e4c34;
  border-bottom-width: 3px;
  border-radius: 5px;
  background: #151116cc;
  color: #f4ce7d;
  font: 800 9px monospace;
  text-align: center;
}

.touch-controls {
  display: none;
  position: absolute;
  z-index: 5;
  right: 14px;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 14px;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  pointer-events: none;
  transition: opacity 150ms ease;
}

html.is-mobile-device .touch-controls {
  display: grid;
}

html.is-mobile-device .launch-instruction-keyboard {
  display: none !important;
}

html.is-mobile-device .launch-instruction-touch {
  display: block !important;
}

.touch-controls span {
  min-height: 48px;
  display: grid;
  align-content: center;
  padding: 8px 12px;
  border: 1px solid #d49c4c;
  border-radius: 9px;
  background: #151116a8;
  color: #ffe0a1;
  font-size: 9px;
  text-transform: uppercase;
}

.touch-controls span:last-child {
  text-align: right;
}

.touch-controls b,
.touch-controls small {
  display: block;
}

.touch-controls b {
  font-size: 10px;
}

.touch-controls small {
  margin-top: 2px;
  color: #bcae90;
  font-size: 8px;
}

.table-stage.is-touching-left .touch-controls span:first-child,
.table-stage.is-touching-right .touch-controls span:last-child {
  border-color: #ffe0a1;
  background: #69431dcc;
  box-shadow: 0 0 20px #ffb53e55;
}

.table-stage.is-launch-ready .touch-controls {
  opacity: 0.2;
}

.editor {
  position: absolute;
  z-index: 8;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(370px, 94vw);
  overflow-y: auto;
  padding: 19px;
  border-left: 1px solid #72512e;
  background: #100e12f5;
  box-shadow: -25px 0 65px #000c;
  backdrop-filter: blur(13px);
  transform: translateX(102%);
  transition: transform 180ms ease;
}

.editor.is-open {
  transform: translateX(0);
}

.editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor h2 {
  margin: 4px 0 0;
  color: #f3d89a;
  font: 800 24px Georgia, serif;
}

.eyebrow {
  margin: 0;
  color: #bd8d47;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.editor__help {
  margin: 14px 0;
  color: #a69a85;
  font-size: 11px;
  line-height: 1.45;
}

.logic-test-controls {
  margin: 0 0 13px;
  padding: 10px;
  border: 1px solid #514025;
  border-radius: 7px;
  background: #16120e;
}

.logic-test-actions {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 7px;
}

.logic-test-flippers {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 7px;
}

.logic-test-ball-actions {
  display: none;
  margin-top: 7px;
}

.logic-test-mode .logic-test-ball-actions {
  display: block;
}

.logic-test-ball-actions .button {
  width: 100%;
  min-height: 34px;
  padding: 7px;
  border-color: #654a2c;
  font-size: 9px;
}

#logic-test-drop-ball.is-active {
  border-color: #86ef8e;
  background: linear-gradient(#285d35, #15341d);
  color: #e2ffe5;
  box-shadow: 0 0 18px #5ce56d33;
}

.logic-test-mode .logic-test-flippers {
  display: grid;
}

.logic-test-flippers .button {
  min-height: 34px;
  padding: 7px;
  border-color: #654a2c;
  font-size: 8px;
}

.logic-test-actions .button {
  min-height: 34px;
  padding: 7px;
  font-size: 9px;
}

.logic-test-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

#logic-test-toggle.is-active {
  border-color: #66e3ff;
  background: linear-gradient(#205467, #102d38);
  color: #d8f9ff;
  box-shadow: 0 0 18px #42cde733;
}

#logic-test-status {
  margin: 8px 1px 0;
  color: #9b8f7b;
  font-size: 9px;
  line-height: 1.4;
}

.logic-test-mode #logic-test-status {
  color: #84deee;
}

.logic-test-mode .tool-grid,
.logic-test-mode .editor-shortcuts,
.logic-test-mode .editor-grid-toggle,
.logic-test-mode .table-size-controls,
.logic-test-mode .properties,
.logic-test-mode .editor__footer {
  pointer-events: none;
  opacity: 0.3;
}

.tool-grid {
  display: block;
}

.tool-grid > button[data-tool="select"] {
  width: 100%;
  margin-bottom: 8px;
}

.tool-category {
  overflow: hidden;
  margin-top: 7px;
  border: 1px solid #40353a;
  border-radius: 7px;
  background: #100d12;
}

.tool-category summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 11px;
  color: #d8ba7d;
  font: 800 11px Georgia, serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.tool-category summary::-webkit-details-marker {
  display: none;
}

.tool-category summary::after {
  content: "+";
  color: #847b77;
  font: 800 16px/1 Arial, sans-serif;
}

.tool-category[open] summary {
  border-bottom: 1px solid #40353a;
  background: #18131a;
  color: #f0cc83;
}

.tool-category[open] summary::after {
  content: "−";
}

.tool-category__buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 8px;
}

.editor.has-selection .tool-grid,
.editor.has-selection .editor-shortcuts,
.editor.has-selection .editor-grid-toggle {
  display: none;
}

.tool-grid button {
  padding: 9px 7px;
}

.tool-grid .is-active {
  border-color: #e59b59;
  background: #762630;
  color: #fff;
}

.editor-shortcuts {
  margin: 12px 0 0;
  padding: 10px 11px;
  border: 1px solid #3e3544;
  border-radius: 7px;
  background: #111018;
  color: #8995aa;
  font-size: 9px;
  line-height: 1.65;
}

.editor-shortcuts b {
  color: #d8b671;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.level-file-controls {
  margin: 12px 0;
  padding: 11px;
  border: 1px solid #3c3239;
  border-radius: 7px;
  background: #100d12;
}

.editor.has-selection .level-file-controls,
.editor.has-selection .table-size-controls {
  display: none;
}

.level-file-controls h3 {
  margin: 0 0 8px;
  color: #d8ba7d;
  font: 800 11px Georgia, serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.level-file-controls label {
  display: grid;
  gap: 6px;
  color: #918779;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.level-file-controls input {
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 1px solid #40353a;
  border-radius: 5px;
  outline: none;
  background: #141116;
  color: #f0d69d;
  font-size: 11px;
}

.level-file-actions {
  display: grid;
  grid-template-columns: 1fr 0.65fr;
  gap: 7px;
  margin-top: 8px;
}

.level-file-actions .button {
  min-height: 34px;
  padding: 7px;
  font-size: 9px;
}

.level-file-status {
  margin: 8px 0 5px;
  color: #c1aa82;
  font-size: 9px;
  line-height: 1.4;
}

.level-version-history {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #342a31;
}

.level-version-history summary {
  margin-bottom: 8px;
  color: #d8ba7d;
  cursor: pointer;
  font: 800 10px Georgia, serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.level-version-history .button,
.level-version-history select {
  width: 100%;
  min-height: 34px;
}

.level-version-history label,
.level-version-actions + .level-version-folder-status + label {
  margin-top: 8px;
}

.level-version-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.level-version-folder-status {
  margin: 7px 0 0;
  color: #bda77f;
  font-size: 9px;
  line-height: 1.4;
}

.level-version-history select {
  padding: 7px;
  border: 1px solid #40353a;
  border-radius: 5px;
  outline: none;
  background: #141116;
  color: #f0d69d;
  font-size: 10px;
}

.level-version-details {
  min-height: 28px;
  margin: 7px 0;
  color: #a99a83;
  font-size: 9px;
  line-height: 1.45;
}

.table-size-controls {
  margin: 14px 0 0;
  padding: 12px 14px 5px;
  border: 1px solid #3e3544;
  border-radius: 7px;
  background: #121018;
}

.editor-grid-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin: 11px 0 0;
  padding: 10px 12px;
  border: 1px solid #3e3544;
  border-radius: 7px;
  background: #121018;
  color: #d6c39e;
  cursor: pointer;
}

.editor-grid-toggle input {
  width: auto;
  margin: 0;
  accent-color: #d99a46;
}

.editor-grid-toggle span,
.editor-grid-toggle small {
  display: block;
}

.editor-grid-toggle b {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.editor-grid-toggle small {
  margin-top: 3px;
  color: #847b77;
  font-size: 8px;
  line-height: 1.35;
}

.table-size-controls h3 {
  margin: 0 0 8px;
  color: #c9a15d;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.table-size-controls label {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 9px 0;
  color: #918779;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.properties {
  margin: 17px 0;
  padding: 15px;
  border: 1px solid #332b31;
  border-radius: 9px;
  background: #09080b;
}

.properties__empty {
  color: #786f63;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.properties__multiple {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid rgba(97, 230, 194, 0.34);
  border-radius: 9px;
  color: #b8aa96;
  background: rgba(25, 54, 50, 0.34);
  font-size: 11px;
  line-height: 1.5;
}

.properties__multiple[hidden] {
  display: none;
}

.properties__multiple strong {
  color: #78efd0;
  font-family: Georgia, serif;
  font-size: 15px;
}

.selected-part {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.selected-part span {
  color: #b47f3d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.selected-part strong {
  overflow: hidden;
  color: #eed59f;
  font: 700 14px Georgia, serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transform-help {
  margin: 8px 0 12px;
  color: #8492a9;
  font-size: 9px;
  line-height: 1.45;
}

.curve-heading {
  margin: 14px 0 2px;
  color: #bd8d47;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.curve-instructions {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #3d3546;
  border-radius: 6px;
  background: #111018;
  color: #9ba6bd;
  font-size: 10px;
  line-height: 1.45;
}

.curve-instructions b {
  color: #d9e5ff;
}

.curve-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 0 0 7px;
}

.curve-actions .button {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 9px;
}

.curve-actions .button.is-active {
  border-color: #75a9ff;
  background: #18355e;
  color: #dceaff;
}

.curve-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.curve-actions .curve-action-wide {
  grid-column: 1 / -1;
}

.curve-point-status {
  min-height: 15px;
  margin: 0 0 12px;
  color: #8190a8;
  font-size: 9px;
  line-height: 1.4;
}

.properties label {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 10px 0;
  color: #918779;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.properties label[hidden] {
  display: none;
}

.properties input,
.properties select {
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 1px solid #40353a;
  border-radius: 5px;
  outline: none;
  background: #141116;
  color: #f0d69d;
  font-size: 11px;
}

.properties input:focus,
.properties select:focus {
  border-color: #b68042;
}

.properties input[readonly] {
  color: #a9b7cc;
  font-family: Consolas, monospace;
  cursor: text;
}

.properties .sound-picker-field {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.properties .sound-picker-field > label {
  margin: 0;
}

.completion-sound-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}

.properties .completion-sound-preview {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid #564832;
  border-radius: 5px;
  background: linear-gradient(#29211e, #171315);
  color: #f0d69d;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}

.properties .completion-sound-preview:hover:not(:disabled) {
  border-color: #c79b51;
  background: linear-gradient(#3b2d25, #20171a);
}

.properties .completion-sound-preview:active:not(:disabled) {
  transform: translateY(1px);
}

.properties .completion-sound-preview:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.light-link-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin: 12px 0 7px;
}

.light-link-actions .button.is-active {
  border-color: #59dbff;
  background: #17323c;
  color: #b9f4ff;
}

.light-link-status {
  margin: 0 0 8px;
  color: #8da4b7;
  font-size: 9px;
  line-height: 1.4;
}

.properties input[type="color"] {
  height: 38px;
  padding: 4px;
  cursor: pointer;
}

.logic-help {
  margin: -2px 0 10px;
  color: #8190a8;
  font-size: 9px;
  line-height: 1.45;
}

.group-rules-editor {
  margin: 14px 0 12px;
  padding: 11px;
  border: 1px solid #4a3b2d;
  border-radius: 7px;
  background: #121016;
}

.group-rules-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.group-rules-heading b,
.group-rules-heading small {
  display: block;
}

.group-rules-heading b {
  color: #dfbd7b;
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.group-rules-heading small {
  margin-top: 3px;
  color: #7fcbe0;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.group-rules-heading .button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 8px;
}

.group-rule-list {
  display: grid;
  gap: 8px;
}

.group-rule-empty {
  margin: 3px 0 9px;
  color: #766f72;
  font-size: 9px;
  line-height: 1.4;
}

.group-rule-card {
  padding: 9px;
  border: 1px solid #39333d;
  border-radius: 6px;
  background: #0a090d;
}

.properties .group-rule-action,
.properties .group-rule-reset {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(64px, 0.7fr);
  align-items: center;
  gap: 7px;
  margin: 6px 0;
  color: #b8aa93;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.properties .group-rule-reset {
  grid-template-columns: auto 1fr;
  margin-top: 9px;
}

.properties .group-rule-subaction {
  padding-left: 20px;
}

.properties .group-rule-action input[type="checkbox"],
.properties .group-rule-reset input[type="checkbox"] {
  width: auto;
  accent-color: #c98b3f;
}

.properties .group-rule-action input[type="number"],
.properties .group-rule-action input[type="text"],
.properties .group-rule-action select {
  padding: 6px;
  font-size: 10px;
}

.properties .group-rule-sound {
  grid-template-columns: minmax(0, 1fr) minmax(64px, 0.7fr);
  padding-left: 25px;
}

.completion-sound-field {
  margin-left: 25px !important;
}

.group-rule-remove {
  width: 100%;
  min-height: 28px;
  margin-top: 5px;
  padding: 5px 8px;
  border-color: #69383d;
  color: #e59a98;
  font-size: 8px;
}

.group-rules-editor > .logic-help {
  margin: 10px 0 0;
}

.polygon-image-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 8px 0 6px;
}

.polygon-image-actions .button {
  min-height: 34px;
  margin: 0;
  padding: 7px 8px;
  font-size: 9px;
}

.polygon-image-name {
  margin: 0 0 10px;
  overflow: hidden;
  color: #c1aa82;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.properties input[type="range"] {
  padding: 0;
  accent-color: #c98b3f;
}

.properties .checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.properties .checkbox-row input {
  width: auto;
  accent-color: #c98b3f;
}

.range-value {
  position: absolute;
  top: 0;
  right: 0;
  color: #e0b86d;
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.editor__footer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.file-button {
  display: grid;
  place-items: center;
}

.file-button input {
  display: none;
}

.graphics-dialog,
.score-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: min(760px, calc(100dvh - 28px));
  padding: 0;
  border: 1px solid #a67838;
  border-radius: 13px;
  background: #151116;
  color: var(--ink);
  box-shadow: 0 35px 100px #000;
}

.score-dialog {
  overflow: hidden;
}

.graphics-dialog {
  width: min(640px, calc(100% - 28px));
}

.graphics-dialog::backdrop,
.score-dialog::backdrop {
  background: #050407d9;
  backdrop-filter: blur(8px);
}

.graphics-dialog__panel {
  display: grid;
  max-height: min(780px, calc(100dvh - 28px));
  grid-template-rows: auto minmax(0, 1fr);
}

.graphics-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 17px;
  border-bottom: 1px solid #4b3925;
  background:
    radial-gradient(circle at 12% 0, #934a252c, transparent 45%),
    #1b1518;
}

.graphics-dialog__header .eyebrow {
  margin: 0 0 4px;
}

.graphics-dialog h2 {
  margin: 0;
  color: #f3d693;
  font: 800 25px Georgia, serif;
}

.graphics-dialog__body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 22px;
  overflow-y: auto;
}

.graphics-preset-control,
.graphics-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(126px, 0.55fr);
  gap: 14px;
  align-items: center;
}

.graphics-preset-control {
  padding: 14px;
  border: 1px solid #9b7139;
  border-radius: 9px;
  background: linear-gradient(145deg, #2d211a, #171315);
  box-shadow: inset 0 1px #ffffff12;
}

.graphics-preset-control > span,
.graphics-option > span {
  min-width: 0;
}

.graphics-preset-control strong,
.graphics-option strong,
.graphics-preset-control small,
.graphics-option small {
  display: block;
}

.graphics-preset-control strong,
.graphics-option strong {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.graphics-preset-control small,
.graphics-option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
}

.graphics-preset-control select,
.graphics-option select {
  width: 100%;
  min-height: 36px;
  padding: 7px 29px 7px 9px;
  border: 1px solid #6c5636;
  border-radius: 6px;
  background: #100d11;
  color: var(--amber);
  font: 900 10px system-ui, sans-serif;
  text-transform: uppercase;
}

.graphics-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.graphics-option {
  min-height: 66px;
  grid-template-columns: minmax(0, 1fr) 112px;
  padding: 10px 11px;
  border: 1px solid #403729;
  border-radius: 7px;
  background: #171315;
}

.graphics-option--switch {
  grid-template-columns: minmax(0, 1fr) auto;
}

.graphics-option--switch input {
  width: 44px;
  height: 24px;
  margin: 0;
  appearance: none;
  border: 1px solid #65543e;
  border-radius: 999px;
  background: #09080a;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.graphics-option--switch input::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 2px;
  border-radius: 50%;
  background: #756958;
  box-shadow: 0 2px 5px #0008;
  transition: transform 120ms ease, background 120ms ease;
}

.graphics-option--switch input:checked {
  border-color: #d59b45;
  background: #6b361d;
}

.graphics-option--switch input:checked::before {
  transform: translateX(20px);
  background: #ffd176;
}

.graphics-option--switch input:focus-visible,
.graphics-preset-control select:focus-visible,
.graphics-option select:focus-visible {
  outline: 2px solid #ffd176;
  outline-offset: 2px;
}

.graphics-option select:disabled {
  opacity: 0.42;
}

.graphics-dialog__status {
  min-height: 16px;
  margin: -2px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.graphics-dialog__done {
  justify-content: center;
}

.score-dialog [hidden] {
  display: none;
}

.score-entry-panel {
  position: relative;
}

.score-entry-close {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
}

.score-entry-panel form {
  display: grid;
  gap: 16px;
  padding: 28px;
  text-align: center;
}

.score-dialog h2 {
  margin: 0;
  color: #f3d693;
  font: 800 27px Georgia, serif;
}

.score-dialog label {
  display: grid;
  gap: 7px;
  color: #a99c86;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.score-dialog input {
  padding: 11px;
  border: 1px solid #57452f;
  border-radius: 6px;
  background: #08070a;
  color: #ffc86a;
  text-align: center;
  font: 900 17px monospace;
}

.score-save-status {
  min-height: 1em;
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.score-controller-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  color: #b7a98f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

html.gamepad-input-active .score-controller-hint {
  display: flex;
}

.score-controller-hint kbd {
  min-width: 23px;
  padding: 3px 6px;
}

.high-score-celebration {
  position: relative;
  min-height: min(460px, calc(100dvh - 28px));
  overflow: hidden;
  isolation: isolate;
  padding: 34px 28px 28px;
  background:
    radial-gradient(circle at 50% 23%, #ffce6970 0, #7d341f42 27%, transparent 55%),
    linear-gradient(160deg, #211318, #0b090c 72%);
  text-align: center;
}

.celebration-rays {
  position: absolute;
  z-index: -2;
  inset: -75%;
  background: repeating-conic-gradient(from 0deg, #ffc85913 0deg 8deg, transparent 8deg 18deg);
  animation: celebration-rays 18s linear infinite;
}

.celebration-sparks {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.celebration-spark {
  position: absolute;
  top: -18px;
  left: var(--spark-left);
  width: var(--spark-size);
  height: calc(var(--spark-size) * 1.8);
  border-radius: 2px;
  background: var(--spark-color);
  box-shadow: 0 0 9px var(--spark-color);
  opacity: 0;
  transform: rotate(var(--spark-rotation));
  animation: celebration-spark var(--spark-duration) var(--spark-delay) ease-in infinite;
}

.celebration-content {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.celebration-crown {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
  border: 2px solid #f5cc71;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #f4c967, #8f521f 65%, #3c1b15);
  box-shadow: 0 0 0 7px #b6813824, 0 0 42px #ffac3c55, inset 0 2px #fff5b8;
  color: #29120c;
  font: 900 43px/1 Georgia, serif;
  animation: celebration-crown 900ms cubic-bezier(0.2, 1.5, 0.35, 1) both;
}

.high-score-celebration .eyebrow {
  margin: 0;
  color: #dfae5f;
}

.high-score-celebration h2 {
  color: #ffe7a8;
  font-size: clamp(29px, 7vw, 43px);
  line-height: 0.95;
  letter-spacing: 0.025em;
  text-shadow: 0 3px #742a29, 0 0 25px #ffb44366;
  text-transform: uppercase;
}

.celebration-score {
  margin: 2px 0 0;
  color: #ffbd4a;
  font: 900 19px monospace;
}

.celebration-copy {
  margin: 0 0 3px;
  color: #cfc0a0;
  font: italic 13px/1.4 Georgia, serif;
}

.celebration-achievements {
  width: min(100%, 390px);
  display: grid;
  gap: 7px;
  margin-block: 6px 9px;
}

.celebration-achievement {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid #b9873f;
  border-radius: 9px;
  background: linear-gradient(100deg, #422718e8, #25171be8);
  box-shadow: inset 3px 0 #ffd36f, 0 8px 25px #0005;
  text-align: left;
  animation: celebration-medal 480ms var(--achievement-delay) ease-out both;
}

.celebration-achievement-rank {
  color: #ffd477;
  font: 900 18px monospace;
}

.celebration-achievement strong,
.celebration-achievement small {
  display: block;
}

.celebration-achievement strong {
  color: #fff0c2;
  font: 900 12px/1.2 Georgia, serif;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.celebration-achievement small {
  margin-top: 2px;
  color: #bba98a;
  font-size: 10px;
}

.celebration-button {
  width: min(100%, 390px);
  min-height: 44px;
}

@keyframes celebration-rays {
  to { transform: rotate(360deg); }
}

@keyframes celebration-spark {
  0% { opacity: 0; transform: translate3d(0, -18px, 0) rotate(var(--spark-rotation)); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--spark-drift), 520px, 0) rotate(calc(var(--spark-rotation) + 540deg)); }
}

@keyframes celebration-crown {
  from { opacity: 0; transform: scale(0.35) rotate(-12deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes celebration-medal {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.leaderboard-panel {
  max-height: min(760px, calc(100dvh - 28px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
}

.leaderboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.leaderboard-head .eyebrow {
  margin-bottom: 5px;
}

.leaderboard-switches {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid #3a3025;
  border-radius: 9px;
  background: #09080a;
}

.leaderboard-periods {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 8px;
}

.leaderboard-switch {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #9d927c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.leaderboard-switch:hover,
.leaderboard-switch.is-active {
  border-color: #876635;
  background: #2b2019;
  color: #ffd176;
}

.rank-message {
  margin: 17px 0 0;
  padding: 11px 13px;
  border: 1px solid #88662e;
  border-radius: 8px;
  background: linear-gradient(100deg, #382114, #24171a);
  color: #ffe0a0;
  font: 800 13px/1.35 Georgia, serif;
  text-align: center;
}

.leaderboard-status {
  min-height: 17px;
  margin: 13px 0 6px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.leaderboard-table-head {
  min-height: 28px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 11px;
  color: #91846e;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.leaderboard-score-column {
  justify-self: end;
}

.leaderboard-score-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0 4px 8px;
  border: 0;
  background: transparent;
  color: #ffc45d;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.leaderboard-score-sort:hover,
.leaderboard-score-sort:focus-visible {
  color: #ffe1a0;
}

.leaderboard-score-sort:focus-visible {
  outline: 2px solid #ffd176;
  outline-offset: 2px;
  border-radius: 3px;
}

.leaderboard-score-sort__arrow {
  font-size: 13px;
  line-height: 1;
}

.leaderboard-list {
  min-height: 0;
  flex: 0 1 auto;
  max-height: min(430px, 46dvh);
  display: grid;
  gap: 5px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-more {
  width: 100%;
  min-height: 42px;
  margin-top: 9px;
}

.leaderboard-more[hidden] {
  display: none;
}

.leaderboard-row {
  min-height: 49px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid #332a25;
  border-radius: 7px;
  background: #0d0b0e;
}

.leaderboard-row.is-current-player {
  border-color: #d8a84e;
  background: #392415;
  box-shadow: inset 3px 0 #ffd176;
}

.leaderboard-position {
  color: #b8904c;
  font: 900 13px monospace;
}

.leaderboard-name {
  overflow: hidden;
  color: #f5e4bd;
  font: 900 14px monospace;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-player {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.leaderboard-date {
  color: #91846e;
  font: 700 9px/1.2 monospace;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.leaderboard-points {
  color: #ffc45d;
  font: 900 14px monospace;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body.editor-open .launch-callout,
body.editor-open .control-hints,
body.editor-open .touch-controls {
  display: none;
}

@media (max-width: 980px) {
  .backbox {
    grid-template-columns: minmax(190px, 1fr) minmax(300px, 1.25fr) minmax(190px, 1fr);
    gap: 10px;
  }

  .brand__copy small {
    display: none;
  }

  .brand__copy strong {
    font-size: 20px;
  }

  .machine-actions {
    grid-template-columns: repeat(2, auto);
  }

  .machine-actions #start-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px), (pointer: coarse) {
  .backbox {
    min-height: 126px;
    grid-template-columns: 1fr auto;
    padding:
      max(8px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      8px
      max(10px, env(safe-area-inset-left));
  }

  .brand {
    gap: 8px;
  }

  .crest {
    width: 43px;
    flex-basis: 43px;
  }

  .brand__copy span {
    font-size: 10px;
  }

  .brand__copy strong {
    font-size: 22px;
  }

  .display-bezel {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 58px;
  }

  .machine-actions {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: auto 42px;
  }

  .machine-actions #start-button {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .settings-button-label {
    display: none;
  }

  .scores-button {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    min-height: 42px;
    padding-inline: 11px;
  }

  .settings-menu {
    grid-column: 2;
    grid-row: 1;
  }

  .settings-button {
    width: 42px;
    min-height: 42px;
    padding-inline: 0;
  }

  .settings-panel {
    width: min(300px, calc(100vw - 20px));
    gap: 8px;
    padding: 10px;
  }

  .settings-panel .button {
    min-height: 44px;
    font-size: 12px;
  }

  .settings-control {
    gap: 8px;
    padding: 10px 12px;
  }

  .settings-control__label,
  .volume-control__value {
    font-size: 11px;
  }

  .graphics-dialog {
    width: min(560px, calc(100% - 18px));
    max-height: calc(100dvh - 18px);
  }

  .graphics-dialog__panel {
    max-height: calc(100dvh - 18px);
  }

  .graphics-dialog__header {
    padding: 17px 16px 13px;
  }

  .graphics-dialog__body {
    gap: 11px;
    padding: 13px 14px 16px;
  }

  .graphics-options {
    grid-template-columns: 1fr;
  }

  .graphics-preset-control,
  .graphics-option {
    min-height: 70px;
  }

  .graphics-preset-control strong,
  .graphics-option strong {
    font-size: 12px;
  }

  .graphics-preset-control small,
  .graphics-option small,
  .graphics-dialog__status {
    font-size: 10px;
  }

  .graphics-preset-control select,
  .graphics-option select {
    min-height: 42px;
    font-size: 11px;
  }

  .graphics-quality-picker output {
    font-size: 13px;
  }

  .graphics-quality-arrow {
    min-height: 38px;
    font-size: 20px;
  }

  .graphics-quality-scale {
    font-size: 9px;
  }

  .control-hints {
    display: none;
  }

  .touch-controls {
    display: grid;
  }

  .launch-instruction-keyboard {
    display: none !important;
  }

  .launch-instruction-touch {
    display: block !important;
  }

  .launch-callout {
    right: 10px;
    bottom: 78px;
    left: 10px;
    min-width: 0;
    padding: 12px 14px;
  }

  .launch-callout strong {
    font-size: 16px;
  }

  .launch-callout small {
    margin-top: 5px;
    font-size: 13px;
  }

  .touch-controls span {
    min-height: 56px;
  }

  .touch-controls b {
    font-size: 12px;
  }

  .touch-controls small {
    font-size: 10px;
  }

  .leaderboard-panel {
    padding: 18px;
  }

  .high-score-celebration {
    padding: 24px 16px 18px;
  }

  .leaderboard-periods .leaderboard-switch {
    padding-inline: 4px;
    font-size: 10px;
  }

  .score-dialog label,
  .leaderboard-switch,
  .leaderboard-status {
    font-size: 12px;
  }

  .leaderboard-name {
    font-size: 15px;
  }

  .update-ready {
    right: 10px;
    bottom: max(78px, calc(env(safe-area-inset-bottom) + 68px));
    left: 10px;
    width: auto;
    grid-template-columns: minmax(0, 1fr) auto 40px;
  }

  .update-ready strong {
    font-size: 15px;
  }

  .update-ready span {
    font-size: 12px;
  }
}

@media (orientation: portrait) and (max-width: 720px) {
  .brand__copy small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
