@font-face {
  font-family: "DSEG7 Classic";
  src: url("assets/fonts/DSEG7Classic-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0d0e0c;
  --display: #050604;
  --panel: #151613;
  --panel-strong: #1d1e1b;
  --paper: #e1e1dd;
  --muted: #aaa9a4;
  --line: #8e8e89;
  --amber: #ffb000;
  --alert-red: #ff2b1c;
  --focus: #ffd36a;
  --success: #ffd36a;
  --chassis: #242522;
  --chassis-light: #454741;
  --chassis-dark: #10110f;
  --radius-small: 2px;
  --radius-medium: 4px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  background: #090a08;
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--paper);
  background: #090a08;
  font-family: "Atkinson Hyperlegible Next", "Roboto Condensed", Arial, sans-serif;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

button,
select,
input,
summary,
a[href] {
  font: inherit;
}

button:not(:disabled),
select:not(:disabled),
summary,
a[href] {
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
}

button,
select,
input {
  min-height: 48px;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  inset: 8px auto auto 8px;
  z-index: 10;
  padding: 12px 16px;
  color: var(--display);
  background: var(--paper);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
footer {
  width: min(100%, 1180px);
  margin-inline: auto;
}

.site-header {
  min-height: 86px;
  padding: 18px clamp(18px, 4vw, 48px);
  border: 1px solid #454741;
  border-top: 0;
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 2%) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #292a27 0%, #1b1c19 55%, #11120f 100%);
  box-shadow: inset 0 -3px 0 #060705, inset 0 2px 0 #454741, 0 4px 0 #040503;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.temperature-toggle {
  min-height: 48px;
  padding: 4px;
  border: 2px solid #282722;
  border-radius: var(--radius-small);
  display: grid;
  grid-template-columns: auto 42px 42px;
  align-items: center;
  gap: 2px;
  background: #11100c;
  box-shadow: inset 0 3px 8px #000, 0 2px 0 #9a9991;
}

.temperature-toggle > span {
  padding-inline: 8px 6px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.temperature-toggle button {
  min-height: 38px;
  padding: 0;
  border: 1px solid #55534c;
  border-radius: 2px;
  color: var(--muted);
  background: linear-gradient(180deg, #3f3e39, #24231f);
  box-shadow: inset 0 1px 0 #696861, 0 2px 0 #080705;
  font-weight: 800;
}

.temperature-toggle button:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--panel-strong);
}

.temperature-toggle button:active {
  box-shadow: inset 0 2px 4px #000;
  transform: translateY(2px);
}

.temperature-toggle button[aria-pressed="true"] {
  border-color: var(--amber);
  color: var(--display);
  background: var(--amber);
  box-shadow: inset 0 1px 0 #ffd36a, 0 2px 0 #5d3e00, 0 0 9px rgb(255 176 0 / 28%);
}

.run-meta p,
.instruction-kicker,
.time-label,
.source-note,
.privacy-note {
  margin: 0;
}

.wordmark-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  color: var(--paper);
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
}

.wordmark-button:hover {
  color: var(--amber);
}

.wordmark-button:active {
  transform: translateY(1px);
}

.header-note {
  margin-top: 5px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

[data-temperature-label] {
  font-family: "DSEG7 Classic", ui-monospace, monospace;
  font-weight: 700;
}

main {
  display: grid;
}

.setup-screen {
  width: 100%;
  padding: clamp(32px, 6vw, 82px) clamp(18px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  grid-template-areas:
    "copy form"
    "note form";
  gap: 32px clamp(40px, 8vw, 112px);
  align-content: center;
}

.setup-copy {
  grid-area: copy;
}

h1 {
  margin: 0;
  max-width: 12ch;
  color: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(2.4rem, 5.8vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.setup-copy > p {
  max-width: 48ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.25vw, 1.02rem);
  line-height: 1.5;
}

.setup-howto {
  max-width: 48ch;
  margin: 14px 0 0;
  padding-left: 1.25em;
  color: var(--muted);
  font-size: clamp(0.84rem, 1.1vw, 0.94rem);
  line-height: 1.5;
  display: grid;
  gap: 6px;
}

.setup-howto strong {
  color: var(--paper);
}

.complete-screen > p:not(.complete-mark) {
  max-width: 52ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.55;
}

.contribution-link {
  width: fit-content;
  min-height: 44px;
  margin-top: 22px;
  padding: 12px 16px;
  border: 1px solid #555751;
  color: var(--paper);
  background: linear-gradient(180deg, #242522, #151613);
  box-shadow: inset 0 1px 0 #454741, 0 3px 0 #050604;
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.contribution-link:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.contribution-link:active {
  box-shadow: inset 0 2px 5px #000, 0 1px 0 #050604;
  transform: translateY(2px);
}

.recipe-form {
  grid-area: form;
  align-self: center;
  position: relative;
  padding: 24px clamp(16px, 2vw, 24px) 28px;
  border: 2px solid #454741;
  border-bottom-color: #262521;
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 2%) 0 1px, transparent 1px 3px),
    linear-gradient(135deg, #262724 0%, #191a17 52%, #0f100e 100%);
  box-shadow: 0 14px 28px rgb(0 0 0 / 52%), inset 0 2px 0 #454741, inset 0 -3px 0 #080906;
}

.recipe-form::before,
.recipe-form::after {
  position: absolute;
  top: 9px;
  width: 8px;
  height: 8px;
  border: 1px solid #25241f;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #777972 0 12%, #3c3d39 24% 50%, #11120f 52% 100%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 22%);
  content: "";
}

.recipe-form::before {
  left: 9px;
}

.recipe-form::after {
  right: 9px;
}

.field-group {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid #26251f;
  border-bottom-color: #8d8b82;
  background: #201d17;
  box-shadow: inset 0 2px 7px #090806, 0 1px 0 rgb(255 255 255 / 18%);
}

.field-group label {
  color: var(--paper);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000;
}

.field-group label span {
  margin-right: 12px;
  color: var(--muted);
  font-family: "DSEG7 Classic", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

select,
input {
  width: 100%;
  border: 2px solid #15140f;
  border-bottom-color: #77756d;
  border-radius: var(--radius-small);
  color: var(--paper);
  background: var(--display);
  box-shadow: inset 0 3px 8px #000, 0 1px 0 #5f5d56;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

select {
  padding: 0 42px 0 14px;
}

select:hover:not(:disabled),
input:hover {
  border-color: var(--amber);
  background: #100d07;
}

select:disabled {
  color: #96723d;
  background: #110e09;
}

.time-editor {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  border-inline: 1px solid var(--line);
  background: #201d17;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.mix-recipe {
  padding: 24px;
  border: 1px solid var(--line);
  background: repeating-linear-gradient(0deg, rgb(255 176 0 / 2%) 0 1px, transparent 1px 4px), var(--display);
  color: var(--amber);
  box-shadow: inset 0 0 20px rgb(255 176 0 / 7%);
}

.mix-label,
.mix-formula,
.mix-note {
  margin: 0;
}

.mix-label {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 800;
}

.mix-formula {
  margin-top: 8px;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.18;
  white-space: pre-line;
  text-shadow: 0 0 10px rgb(255 176 0 / 24%);
}

.mix-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.time-label {
  color: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
}

.source-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.source-note a {
  margin-left: 8px;
  color: var(--amber);
  text-underline-offset: 3px;
}

.time-inputs {
  display: grid;
  grid-template-columns: 72px auto 72px;
  gap: 8px;
  align-items: end;
}

.time-inputs label {
  color: var(--muted);
  font-size: 0.75rem;
}

.time-inputs input {
  margin-top: 5px;
  padding: 8px;
  text-align: center;
  font-family: "DSEG7 Classic", ui-monospace, monospace;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.time-inputs > span {
  padding-bottom: 12px;
  font-size: 1.3rem;
}

.primary-button,
.secondary-button,
.quiet-button {
  border-radius: var(--radius-small);
  font-weight: 800;
}

.primary-button {
  width: 100%;
  margin-top: 24px;
  padding: 16px 22px;
  border: 2px solid #e7e5de;
  color: var(--display);
  background: #c9c7c0;
  font-size: 1.08rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #34332f;
}

.primary-button:hover:not(:disabled) {
  border-color: var(--amber);
  background: #deddd7;
}

.primary-button:active:not(:disabled) {
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 #34332f;
  transform: translateY(2px);
}

.primary-button:disabled {
  border-color: #5f4828;
  color: #9b7842;
  background: #282016;
  box-shadow: none;
}

#startButton {
  border-color: #f06a62 #730a08 #590604;
  color: #fff;
  background: linear-gradient(180deg, #d12f27 0%, #b51612 54%, #850a08 100%);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 24%),
    inset 0 -3px 0 rgb(68 4 3 / 48%),
    0 6px 0 #4b0706,
    0 9px 16px rgb(0 0 0 / 48%);
  text-shadow: 0 1px 1px #4b0706;
}

#startButton:hover:not(:disabled) {
  border-color: #ff8a82 #810c09 #650705;
  background: linear-gradient(180deg, #dd3a31 0%, #c41c17 54%, #930d09 100%);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 28%),
    inset 0 -3px 0 rgb(68 4 3 / 42%),
    0 7px 0 #4b0706,
    0 11px 18px rgb(0 0 0 / 52%);
  transform: translateY(-1px);
}

#startButton:active:not(:disabled) {
  background: linear-gradient(180deg, #9e100d 0%, #b51612 100%);
  box-shadow:
    inset 0 3px 5px rgb(54 3 2 / 62%),
    0 1px 0 #4b0706,
    0 3px 7px rgb(0 0 0 / 45%);
  transform: translateY(5px);
}

#startButton:disabled {
  border-color: #64211e #36100f #2a0a09;
  color: #b88682;
  background: #4b1816;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 7%),
    0 2px 0 #210706;
  text-shadow: none;
}

.quiet-button,
.secondary-button {
  padding: 11px 16px;
  border: 1px solid var(--line);
  color: var(--paper);
  background: #241d14;
  box-shadow: inset 0 1px 0 #473821, 0 2px 0 #080604;
}

.quiet-button:hover,
.secondary-button:hover {
  border-color: var(--paper);
  color: var(--paper);
  background: #2d2417;
}

.quiet-button:active,
.secondary-button:active {
  box-shadow: inset 0 1px 3px #000;
  background: var(--panel-strong);
  transform: translateY(2px);
}

.form-error {
  margin: 18px 0 0;
  color: #ffd36a;
  line-height: 1.4;
}

.push-pull-note {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #17130d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.45;
}

.catalog-status {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #17130d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.catalog-status .quiet-button {
  flex: 0 0 auto;
}

.data-note {
  grid-area: note;
  align-self: end;
  max-width: 52ch;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.data-note summary {
  min-height: 44px;
  padding-block: 12px;
  color: var(--paper);
  font-weight: 700;
}

.data-note p {
  margin: 10px 0;
}

.data-note ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.data-note a {
  color: var(--amber);
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}

.data-note a:hover {
  text-decoration-thickness: 2px;
}

.timer-screen {
  min-height: calc(100dvh - 142px);
  padding: clamp(20px, 4vw, 48px);
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto auto auto;
  gap: clamp(18px, 3vh, 34px);
  border-inline: 2px solid #454741;
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 1.8%) 0 1px, transparent 1px 3px),
    linear-gradient(135deg, #242522 0%, #171815 46%, #0d0e0c 100%);
  box-shadow: inset 0 0 0 1px #070806, inset 0 2px 0 #454741;
}

.run-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.run-meta p:first-child {
  color: var(--alert-red);
  font-weight: 800;
}

.timer-display {
  align-self: center;
  justify-self: center;
  width: min(100%, 960px);
  padding: clamp(18px, 4vw, 38px) clamp(12px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  color: var(--amber);
  background: repeating-linear-gradient(0deg, rgb(255 176 0 / 2.5%) 0 1px, transparent 1px 5px), var(--display);
  box-shadow: inset 0 0 42px rgb(255 176 0 / 8%), inset 0 3px 12px #000, 0 5px 16px rgb(0 0 0 / 38%);
  font-family: "DSEG7 Classic", ui-monospace, monospace;
  font-size: clamp(4.4rem, 17vw, 12rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.015em;
  text-align: center;
  text-shadow: 0 0 7px rgb(255 176 0 / 72%), 0 0 24px rgb(255 176 0 / 24%);
  font-variant-numeric: tabular-nums;
}

.tank-stage {
  appearance: none;
  position: relative;
  isolation: isolate;
  width: min(62vw, 520px);
  aspect-ratio: 4 / 3;
  min-height: 0;
  justify-self: center;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 10px solid #1d1e1b;
  border-radius: 34px / 26px;
  background: radial-gradient(ellipse at center, #0b2115 0%, #06100a 48%, #010302 82%);
  box-shadow:
    inset 0 0 0 3px #050604,
    inset 0 0 32px 12px #000,
    0 0 0 3px #3a3c37,
    0 0 0 9px #11120f,
    0 16px 28px rgb(0 0 0 / 58%);
}

.tank-stage:hover {
  border-color: #292a26;
}

.tank-stage:active {
  box-shadow:
    inset 0 0 0 3px #050604,
    inset 0 0 38px 16px #000,
    0 0 0 3px #3a3c37,
    0 0 0 9px #11120f,
    0 12px 22px rgb(0 0 0 / 64%);
}

.tank-stage::before,
.tank-stage::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.tank-stage::before {
  z-index: 2;
  background: repeating-linear-gradient(0deg, rgb(116 255 171 / 3%) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

.tank-stage::after {
  z-index: 3;
  border-radius: 24px / 18px;
  background:
    radial-gradient(ellipse at center, transparent 45%, rgb(0 0 0 / 58%) 100%),
    linear-gradient(155deg, rgb(255 255 255 / 6%) 0 12%, transparent 32% 100%);
  box-shadow: inset 0 0 22px #000;
}

.tank-stage img {
  z-index: 1;
  grid-area: 1 / 1;
  width: min(48%, 250px);
  height: auto;
  opacity: 1;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform 220ms ease-out, opacity 90ms linear;
}

.tank-stage .tank-image-reward {
  display: none;
  opacity: 0;
}

.tank-stage.is-rewarded {
  background: radial-gradient(ellipse at center, #221024 0%, #100811 48%, #030103 82%);
}

.tank-stage.is-rewarded .tank-image-normal {
  display: none;
  opacity: 0;
}

.tank-stage.is-rewarded .tank-image-reward {
  display: block;
  opacity: 1;
}

.tank-stage.is-agitating:not(.is-rewarded) .tank-image-normal,
.tank-stage.is-agitating.is-rewarded .tank-image-reward {
  will-change: transform;
  animation: tank-agitation 1.2s ease-in-out infinite;
}

.tank-stage.is-flipping:not(.is-rewarded) .tank-image-normal,
.tank-stage.is-flipping.is-rewarded .tank-image-reward {
  will-change: transform;
  animation: tank-easter-egg 1s cubic-bezier(0.45, 0, 0.2, 1) both;
}

.tank-stage.is-degaussing:not(.is-rewarded) .tank-image-normal,
.tank-stage.is-degaussing.is-rewarded .tank-image-reward {
  will-change: transform, filter;
  animation: crt-degauss 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tank-stage.is-dvd-bouncing img {
  opacity: 0 !important;
}

.dvd-tank {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  pointer-events: none;
  will-change: transform, filter;
}

.dvd-tank img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform 220ms ease-out;
}

.dvd-tank.is-agitating img {
  will-change: transform;
  animation: tank-agitation 1.2s ease-in-out infinite;
}

@keyframes crt-degauss {
  0% {
    transform: scale(1) skewX(0deg);
    filter: none;
  }
  12% {
    transform: scale(1.045, 0.96) skewX(-6deg);
    filter: hue-rotate(90deg) saturate(2.4) brightness(1.45) contrast(1.25);
  }
  26% {
    transform: scale(0.965, 1.035) skewX(5deg);
    filter: hue-rotate(-110deg) saturate(2.1) brightness(1.3);
  }
  42% {
    transform: scale(1.025, 0.98) skewX(-3deg);
    filter: hue-rotate(48deg) saturate(1.7) brightness(1.18);
  }
  62% {
    transform: scale(0.99, 1.012) skewX(1.8deg);
    filter: hue-rotate(-22deg) saturate(1.3) brightness(1.08);
  }
  82% {
    transform: scale(1.005, 0.996) skewX(-0.6deg);
    filter: hue-rotate(6deg) brightness(1.02);
  }
  100% {
    transform: scale(1) skewX(0deg);
    filter: none;
  }
}

@keyframes tank-agitation {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-45deg);
  }
  50% {
    transform: rotate(0deg);
  }
  75% {
    transform: rotate(45deg);
  }
}

@keyframes tank-easter-egg {
  0% {
    transform: rotate(0deg) scale(1);
  }
  48% {
    transform: rotate(180deg) scale(0.9);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

.instruction-panel {
  max-width: 820px;
  width: 100%;
  margin-inline: auto;
  padding: 22px 24px;
  border: 1px solid var(--alert-red);
  background: #1c170f;
  box-shadow: inset 0 1px 0 #4b4943;
}

.instruction-panel.is-resting {
  border-color: var(--line);
}

.instruction-panel.is-resting .instruction-kicker {
  color: var(--muted);
}

.instruction-kicker {
  color: var(--alert-red);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.instruction-panel h2 {
  margin: 6px 0 4px;
  font-size: clamp(1.45rem, 4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.instruction-panel > p:last-child {
  margin: 0;
  color: var(--muted);
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.timer-controls .icon-button {
  width: 52px;
  min-height: 52px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-color: var(--line);
  color: var(--paper);
  background: #211a10;
}

#soundButton[aria-pressed="true"] {
  color: var(--amber);
}

#resetButton {
  color: var(--alert-red);
}

.control-icon {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control-icon .filled-icon {
  fill: currentColor;
  stroke: none;
}

.sound-off-icon,
.play-icon,
#soundButton[aria-pressed="false"] .sound-on-icon,
.pause-control[data-paused="true"] .pause-icon {
  display: none;
}

#soundButton[aria-pressed="false"] .sound-off-icon,
.pause-control[data-paused="true"] .play-icon {
  display: block;
}

.complete-screen {
  align-self: center;
  justify-self: center;
  width: min(100%, 760px);
  padding: 48px 24px;
  text-align: center;
}

.complete-screen h1 {
  max-width: none;
}

.complete-mark {
  margin: 0 0 30px;
  padding: 24px;
  border: 1px solid var(--line);
  color: var(--amber);
  background: var(--display);
  box-shadow: inset 0 0 30px rgb(255 176 0 / 9%);
  font-family: "DSEG7 Classic", ui-monospace, monospace;
  font-size: clamp(4rem, 16vw, 9rem);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px rgb(255 176 0 / 62%);
}

.complete-screen > p:not(.complete-mark) {
  margin-inline: auto;
}

.complete-screen .primary-button {
  width: min(100%, 360px);
  margin-top: 32px;
}

footer {
  padding: 18px clamp(18px, 4vw, 48px);
  border: 1px solid #454741;
  border-bottom: 0;
  color: var(--muted);
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 2%) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #1f201d, #10110f);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78rem;
}

.privacy-note {
  line-height: 1.4;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.github-link {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #555751;
  border-radius: var(--radius-small);
  color: var(--paper);
  background: linear-gradient(180deg, #242522, #151613);
  box-shadow: inset 0 1px 0 #454741, 0 2px 0 #050604;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.github-link:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.github-link:active {
  box-shadow: inset 0 2px 5px #000, 0 1px 0 #050604;
  transform: translateY(2px);
}

.github-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

.hidden {
  display: none !important;
}

@media (max-width: 840px) {
  .setup-screen {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "form"
      "note";
    gap: 34px;
  }

  .setup-copy {
    max-width: 680px;
  }

  .recipe-form {
    max-width: 680px;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .site-header {
    min-height: 72px;
    gap: 12px;
  }

  .header-note {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .temperature-toggle {
    grid-template-columns: 38px 38px;
  }

  .temperature-toggle > span {
    display: none;
  }

  .setup-screen {
    padding-block: 28px 38px;
  }

  .setup-copy > p {
    margin-top: 18px;
  }

  .field-group {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 17px 0;
  }

  .time-editor {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .mix-recipe {
    padding: 18px;
  }

  .time-inputs {
    grid-template-columns: minmax(76px, 1fr) auto minmax(76px, 1fr);
  }

  .timer-screen {
    min-height: calc(100dvh - 128px);
    padding: 18px;
    grid-template-rows: auto minmax(128px, 1fr) auto auto auto;
  }

  .run-meta {
    display: block;
  }

  .run-meta p + p {
    margin-top: 5px;
  }

  .instruction-panel {
    padding: 18px;
  }

  .tank-stage {
    width: min(86vw, 420px);
    min-height: 0;
    border-width: 7px;
    border-radius: 24px / 18px;
    box-shadow:
      inset 0 0 0 2px #050604,
      inset 0 0 24px 8px #000,
      0 0 0 2px #3a3c37,
      0 0 0 6px #11120f,
      0 12px 22px rgb(0 0 0 / 56%);
  }

  .tank-stage img {
    width: 52%;
  }

}

@media (prefers-reduced-motion: no-preference) {
  button,
  select,
  input,
  .instruction-panel,
  .skip-link {
    transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
  }
}

@media (forced-colors: active) {
  .instruction-panel {
    border: 2px solid CanvasText;
  }
}

