:root {
  color-scheme: dark;
  --bg: #0d0b09;
  --ink: #efe9de;
  --dim: #a39b8d;
  --faint: #665f54;
  --line: rgba(239, 233, 222, 0.14);
  --card: #16130f;
  --card2: #1d1913;
  --acc: #ffb454;
  --acc-ink: #1a1006;
  --bad: #ff7a66;
  --f-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --f-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  -webkit-text-size-adjust: 100%;
}
a {
  color: inherit;
}
.wrap {
  max-width: var(--ob-page-max);
  margin: 0 auto;
  padding: 20px var(--ob-gutter) 48px;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.kick {
  font: 500 10.5px var(--f-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.kick b {
  color: var(--acc);
  font-weight: 500;
}
h1 {
  font: italic 400 clamp(44px, 7vw, 72px)/0.95 var(--f-display);
  margin: 8px 0 10px;
  letter-spacing: -0.01em;
}
.tag {
  margin: 0;
  color: var(--dim);
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.45;
}
.rt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.back {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 15px;
  text-decoration: none;
  font-size: 13px;
  background: var(--card);
}
.back:hover {
  border-color: var(--acc);
}
#pagevisits {
  font: 400 11px var(--f-mono);
  color: var(--dim);
}
#pagevisits::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #58d68d;
  margin-right: 6px;
  vertical-align: 1px;
}
.tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 12px;
  flex-wrap: wrap;
}
.tab {
  font: 500 12.5px var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--dim);
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
}
.tab:hover {
  border-color: var(--acc);
  color: var(--ink);
}
.tab[aria-selected='true'] {
  background: var(--acc);
  color: var(--acc-ink);
  border-color: var(--acc);
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}
.grid.nopanel {
  grid-template-columns: minmax(0, 1fr);
}
.grid.nopanel .panel {
  display: none;
}
.stage {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.cvbox {
  display: none;
}
.cvbox.on {
  display: block;
}
canvas.cv {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #0a0908;
}
.sq {
  max-width: 640px;
  margin: 0 auto;
}
.stat {
  margin-top: 10px;
  font: 400 11.5px var(--f-mono);
  color: var(--dim);
  min-height: 1.4em;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.bar {
  height: 3px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}
.bar.on {
  opacity: 1;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--acc);
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.seg button {
  background: transparent;
  color: var(--dim);
  border: 0;
  padding: 7px 14px;
  font: 500 11.5px var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.seg button[aria-pressed='true'] {
  background: var(--acc);
  color: var(--acc-ink);
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px 14px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
}
.seedrow {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.seedrow label {
  font: 500 10.5px var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  width: 100%;
}
input[type='number'] {
  background: var(--card2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: 500 13px var(--f-mono);
  width: 92px;
}
button.b {
  background: var(--card2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 13px;
  font: 500 12.5px var(--f-body);
  cursor: pointer;
}
button.b:hover {
  border-color: var(--acc);
}
button.b.pri {
  background: var(--acc);
  color: var(--acc-ink);
  border-color: var(--acc);
  font-weight: 600;
}
button.b:disabled {
  opacity: 0.5;
  cursor: wait;
}
#ctl h3 {
  font: 500 10.5px var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acc);
  margin: 14px 0 6px;
  font-weight: 500;
}
.row {
  display: block;
  margin: 8px 0;
}
.row .rl {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--dim);
  margin-bottom: 3px;
}
.row .rl output {
  font: 400 11.5px var(--f-mono);
  color: var(--ink);
}
.row input[type='range'] {
  width: 100%;
  accent-color: var(--acc);
  margin: 0;
}
.row select {
  width: 100%;
  background: var(--card2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  font: 400 13px var(--f-body);
}
.row.chk {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink);
}
.row.chk input {
  accent-color: var(--acc);
  width: 16px;
  height: 16px;
  margin: 0;
}
#exp {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#exp h3 {
  font: 500 10.5px var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acc);
  margin: 0 0 2px;
  font-weight: 500;
}
#exp .b {
  width: 100%;
  text-align: left;
}
.note {
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.45;
  margin: 2px 0 0;
}
details.how {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
}
details.how summary {
  cursor: pointer;
  font: 500 11px var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acc);
}
details.how p,
details.how li {
  color: var(--dim);
  font-size: 14px;
  line-height: 1.55;
}
details.how ul {
  padding-left: 18px;
  margin: 8px 0;
}
.foot {
  margin-top: 22px;
  font: 500 11px var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.foot a {
  color: var(--dim);
  text-decoration: none;
}
.foot a:hover {
  color: var(--acc);
}
.keys {
  font: 400 11px var(--f-mono);
  color: var(--faint);
  margin-top: 8px;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .panel {
    position: static;
    max-height: none;
  }
  .rt {
    align-items: flex-start;
  }
}

/* Wide screens: previews are as large as the window height allows, next to the panel,
   with the status line under them still on the first screen. */
@media (min-width: 901px) {
  .grid {
    grid-template-columns: minmax(0, 1fr) var(--ob-panel);
  }
  .sq {
    max-width: max(480px, calc(100dvh - 320px));
  }
  #boxSky {
    max-width: max(640px, calc((100dvh - 370px) * 16 / 9));
    margin: 0 auto;
  }
}
