@font-face { font-family: "Unbounded"; src: url("/machine/font/Unbounded-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url("/machine/font/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url("/machine/font/JetBrainsMono-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ground: #040306;
  --ink: #EDEAF2;
  --dim: rgba(237, 234, 242, .56);
  --line: rgba(237, 234, 242, .16);
  --press: #A8FF3E;
  --kind: #FF6FA8;
  --mono: "JB Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--ground); color: var(--ink); font: 13px/1.45 var(--mono); overflow: hidden; }
body { -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }

#vat { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; cursor: crosshair; }

.top { position: fixed; top: 0; left: 0; right: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: max(16px, env(safe-area-inset-top)) 20px 0; pointer-events: none; z-index: 3;
  padding-bottom: 22px; background: linear-gradient(to bottom, rgba(4, 3, 6, .82), rgba(4, 3, 6, .5) 60%, rgba(4, 3, 6, 0)); }
.mark { pointer-events: auto; font: 800 16px/1 var(--display); letter-spacing: -.02em; text-decoration: none; }
.where { color: var(--kind); letter-spacing: .12em; text-transform: uppercase; font-size: 11px; font-weight: 700; transition: color .8s; }
.seed { margin-left: auto; color: var(--dim); font-size: 11px; letter-spacing: .04em; pointer-events: auto; cursor: pointer; background: none; border: 0; border-bottom: 1px dotted rgba(237, 234, 242, .35); padding: 0 0 1px; text-align: right; }
.seed:hover { color: var(--ink); }
.seed:focus-visible { outline: 2px solid var(--press); outline-offset: 3px; }
.sky { flex-basis: 100%; text-align: right; color: var(--dim); font-size: 11px; letter-spacing: .04em; opacity: .75; }
.share { pointer-events: auto; border: 1px solid var(--line); background: rgba(4, 3, 6, .55); color: var(--ink);
  border-radius: 999px; padding: 5px 13px; font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.share:hover { border-color: rgba(237, 234, 242, .5); }
.share:focus-visible { outline: 2px solid var(--press); outline-offset: 2px; }
.top, .hint, .left, .soon, .sky { text-shadow: 0 0 12px #040306, 0 0 4px #040306, 0 0 1px #040306; }

.stage { position: fixed; inset: 0 0 var(--dock-h, 250px) 0; display: grid; place-items: center; align-content: center; gap: 16px; pointer-events: none; z-index: 2; padding: 64px 16px 12px; }
.word { margin: 0; font: 800 clamp(76px, 21vw, 320px)/.82 var(--display); letter-spacing: -.06em; color: transparent;
  -webkit-text-stroke: 1.5px rgba(237, 234, 242, .85); mix-blend-mode: difference; user-select: none; white-space: nowrap;
  opacity: var(--surf, 1); transform: scale(calc(.92 + .12 * var(--surf, 1))); transition: opacity .25s linear; }
.playing .word { -webkit-text-stroke-color: var(--kind); }
.focus.playing .word { opacity: 0; }
.left { margin: 0; min-height: 0; font: 800 clamp(44px, 12vw, 140px)/1 var(--display); letter-spacing: -.04em; color: rgba(237, 234, 242, .22); font-variant-numeric: tabular-nums; display: none; }
.playing .left:not(:empty) { display: block; }
.trip.playing .left { font-size: 15px; font-family: var(--mono); letter-spacing: .1em; color: var(--dim); font-weight: 400; }
.focus.playing .left { order: -1; }

.go { pointer-events: auto; min-width: 132px; height: 132px; padding: 0 18px; border-radius: 66px; border: 0; background: var(--press); color: #07090a; font-weight: 700; letter-spacing: .04em; cursor: pointer;
  box-shadow: 0 0 0 0 rgba(168, 255, 62, .5); animation: breathe 3.2s ease-in-out infinite; transition: transform .2s, background .3s, width .3s, height .3s; }
.go:hover { transform: scale(1.04); }
.go:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
.go[disabled] { opacity: .5; cursor: wait; animation: none; }
.playing .go { background: rgba(4, 3, 6, .6); color: var(--ink); border: 1.5px solid var(--line); animation: none; min-width: 64px; height: 64px; border-radius: 32px; font-weight: 400; }
@keyframes breathe { 50% { box-shadow: 0 0 0 26px rgba(168, 255, 62, 0); } }
.hint { margin: 0; color: var(--ink); max-width: 36ch; text-align: center; transition: opacity .6s; }
.playing .hint { opacity: 0; }

.dock { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(820px, 100vw); z-index: 3;
  padding: 26px 18px max(14px, env(safe-area-inset-bottom)); display: grid; gap: 10px;
  background: linear-gradient(to top, rgba(4, 3, 6, .95) 72%, rgba(4, 3, 6, 0)); }
.row { display: flex; gap: 6px; flex-wrap: wrap; }
.faces { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.face { display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 3, 6, .55); padding: 9px 12px; cursor: pointer; }
.face b { font: 800 17px/1.05 var(--display); letter-spacing: -.02em; }
.face small { color: var(--dim); font-size: 11px; }
.face.on { border-color: var(--ink); background: rgba(237, 234, 242, .08); }
.face:focus-visible, .chip:focus-visible { outline: 2px solid var(--press); outline-offset: 2px; }
.chip { border: 1px solid var(--line); background: rgba(4, 3, 6, .55); border-radius: 999px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.chip:hover, .face:hover { border-color: rgba(237, 234, 242, .5); }
.chip.on { background: var(--ink); color: #07090a; border-color: var(--ink); font-weight: 700; }
.kinds .chip { display: inline-flex; align-items: center; gap: 7px; }
.kinds .chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.kinds .chip.on { background: var(--c); border-color: var(--c); }
.kinds .chip.on i { background: #07090a; box-shadow: none; }
.kinds .chip.drift { border-color: var(--c); }
.timer .sleep { margin-left: 0; }
.timer .sleep.on { background: #8B5CFF; border-color: #8B5CFF; color: var(--ink); }
.tilt, .range { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tilt label, .range label { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; color: var(--dim); }
input[type=range] { width: 100%; accent-color: var(--kind); height: 22px; margin: 0; }
.soon { margin: 2px 0 0; color: var(--dim); font-size: 11px; }

@media (max-width: 620px) {
  .top { padding-left: 14px; padding-right: 14px; }
  .seed { margin-left: 0; flex-basis: 100%; }
  .sky { text-align: left; }
  .dock { padding: 22px 12px max(10px, env(safe-area-inset-bottom)); gap: 8px; }
  .kinds, .timer { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .timer { grid-template-columns: 1.5fr 1fr 1fr 1fr 1.15fr 1.1fr; }
  .timer .sleep { margin-left: 0; }
  .chip { padding: 7px 2px; font-size: 11.5px; text-align: center; justify-content: center; }
  .kinds .chip { gap: 0; }
  .kinds .chip i { display: none; }
  .kinds .chip:not(.on) { border-color: color-mix(in srgb, var(--c) 45%, transparent); color: var(--c); }
  .face { padding: 8px 10px; }
  .face b { font-size: 15px; }
  .face small { font-size: 10px; }
  .tilt, .range { gap: 10px; }
  .tilt label, .range label { grid-template-columns: 1fr; gap: 0; font-size: 11px; }
  .go { min-width: 116px; height: 116px; border-radius: 58px; }
}
@media (max-height: 560px) {
  .soon, .face small { display: none; }
  .hint { display: none; }
}
/* a phone on its side: the dock takes the right half, the stage the left, so the dock never covers the start */
@media (max-height: 560px) and (orientation: landscape) {
  .top { z-index: 4; }
  .dock { left: auto; right: 0; top: 0; transform: none; width: min(460px, 56vw); overflow-y: auto; align-content: center;
    padding: 58px max(14px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) 14px; gap: 8px;
    background: linear-gradient(to left, rgba(4, 3, 6, .95) 80%, rgba(4, 3, 6, 0)); }
  .stage { inset: 0 min(460px, 56vw) 0 0; padding: 52px 12px 12px; gap: 10px; }
  .word { font-size: clamp(48px, 11vw, 120px); }
  .left { font-size: clamp(36px, 8vw, 96px); }
  .go { min-width: 96px; height: 96px; border-radius: 48px; }
  .kinds, .timer { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .timer { grid-template-columns: 1.5fr 1fr 1fr 1fr 1.15fr 1.1fr; }
  .timer .sleep { margin-left: 0; }
  .chip { padding: 6px 2px; font-size: 11px; text-align: center; justify-content: center; }
  .kinds .chip { gap: 0; }
  .kinds .chip i { display: none; }
  .kinds .chip:not(.on) { border-color: color-mix(in srgb, var(--c) 45%, transparent); color: var(--c); }
  .tilt label, .range label { grid-template-columns: 1fr; gap: 0; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .go { animation: none; } }

/* the mixer and kept sounds (beams/money/P1-the-mixer-and-kept-sounds) */
.kinds .chip, .kept .chip { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.kinds .chip.in { box-shadow: 0 0 14px color-mix(in srgb, var(--c) 55%, transparent); }
.mix { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 10px; padding: 2px 0; }
.mix.full { animation: nudge .35s; }
@keyframes nudge { 30% { transform: translateX(-5px); } 70% { transform: translateX(5px); } }
.mixer { display: grid; gap: 2px; min-width: 0; }
.mixer span { display: flex; align-items: center; gap: 6px; color: var(--c); font-size: 11px; letter-spacing: .06em; }
.mixer span i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }
.mixer input[type=range] { accent-color: var(--c); }
.drop { margin-left: auto; border: 0; background: none; color: var(--dim); font-size: 15px; line-height: 1; padding: 0 4px; cursor: pointer; }
.drop:hover { color: var(--ink); }
.drop:focus-visible { outline: 2px solid var(--press); outline-offset: 1px; border-radius: 4px; }
.kept { flex-wrap: nowrap; overflow-x: auto; align-items: center; scrollbar-width: none; padding: 3px 1px; }
.kept::-webkit-scrollbar { display: none; }
.kept .chip { flex: none; padding: 6px 11px; font-size: 11.5px; }
.kept .keep { border-style: dashed; color: var(--press); border-color: rgba(168, 255, 62, .45); }
.kept .keep b { color: var(--ink); font-weight: 700; margin-left: 4px; }
.kept .saved { display: inline-flex; align-items: center; gap: 6px; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; }
.kept .saved i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.kept .saved.on { background: var(--c); border-color: var(--c); color: #07090a; }
.kept .saved.on i { background: #07090a; }
.kept .ok { background: var(--press); border-color: var(--press); color: #07090a; font-weight: 700; }
.kept .how { color: var(--dim); font-size: 11px; white-space: nowrap; padding-left: 4px; }
#kept-name { flex: 1 1 8ch; min-width: 8ch; font: 13px var(--mono); color: var(--ink); background: rgba(237, 234, 242, .06);
  border: 1px solid rgba(237, 234, 242, .4); border-radius: 999px; padding: 6px 12px; outline: none; }
#kept-name:focus { border-color: var(--press); }
@media (max-width: 620px) {
  .mix { gap: 8px; }
  .kept .chip { padding: 6px 9px; }
  #kept-name { font-size: 16px; padding: 4px 10px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .mix { gap: 8px; }
}
input[type=range] { color-scheme: dark; }
.kept { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 24px; }

/* the range and the seed (beams/money/P2-open-ranges-and-any-days-seed) */
.chip.custom { padding: 0 11px 0 0; display: inline-flex; align-items: center; border-style: dashed; }
.chip.custom.on { background: rgba(4, 3, 6, .55); border: 1px solid var(--kind); color: var(--kind); font-weight: 700; }
.chip.custom input { box-sizing: content-box; width: 6.5ch; min-width: 0; border: 0; background: none; color: inherit; font: inherit; text-align: center; padding: 7px 0 7px 11px; outline: none; -moz-appearance: textfield; appearance: textfield; }
.chip.custom input::-webkit-outer-spin-button, .chip.custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.chip.custom input::placeholder { color: var(--dim); }
.chip.custom span { display: none; margin-left: 3px; }
.chip.custom.on span { display: inline; }
.chip.custom:focus-within { outline: 2px solid var(--press); outline-offset: 2px; }
.range label span { white-space: nowrap; }
.seedrow { align-items: center; }
.datechip { position: relative; overflow: hidden; }
#seed-date { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; color-scheme: dark; font-size: 16px; }
#seed-date:focus-visible { outline: none; }
.datechip:focus-within { outline: 2px solid var(--press); outline-offset: 2px; }
.seedrow .how { color: var(--dim); font-size: 11px; }
#seed-hold.on { background: var(--press); border-color: var(--press); color: #07090a; font-weight: 700; }
.seedrow .chip { padding: 7px 14px; }
.range input:disabled { opacity: .45; }
@media (max-width: 620px) {
  .chip.custom, .timer .chip.custom { padding: 0 6px 0 0; justify-content: center; }
  .chip.custom input { padding: 7px 0 7px 6px; font-size: 11.5px; }
  .chip.custom span { margin-left: 5px; }
  .seedrow .chip { padding: 7px 12px; font-size: 12px; }
}
