:root {
  --ink: #f6ead2;
  --muted: #b39a86;
  --line: rgba(246, 234, 210, 0.12);
  --deep: #1d1428;
  --panel: rgba(43, 28, 52, 0.72);
  --gold: #ffcf6e;
  --rose: #e8925a;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--deep);
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--muted); text-decoration: none; }
a:hover { color: var(--ink); }

.haze {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 20% 8%, rgba(255, 207, 110, 0.08), transparent 55%),
    radial-gradient(700px 460px at 85% 90%, rgba(232, 146, 90, 0.07), transparent 60%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  font: 10px 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.maker { margin: 0; color: var(--muted); }
.maker strong { color: var(--gold); }

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(330px, 430px) 1fr;
  gap: clamp(20px, 3vw, 46px);
  padding: clamp(18px, 3vw, 42px);
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
}

.copy .eyebrow {
  font: 10px 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  margin: 6px 0 10px;
}
.copy h1 {
  font-size: clamp(40px, 5vw, 62px);
  line-height: 0.95;
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.copy h1 em { font-style: italic; color: var(--gold); }
.lede { color: var(--muted); line-height: 1.65; margin: 0 0 20px; max-width: 46ch; }

.transport { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
#play {
  border-radius: 999px;
  padding: 12px 26px;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(255, 207, 110, 0.25), rgba(255, 207, 110, 0.08));
}
#play[aria-pressed='true'] {
  background: linear-gradient(180deg, rgba(232, 146, 90, 0.3), rgba(232, 146, 90, 0.1));
}
.note-now { margin: 0; color: var(--gold); font: 14px 'DM Mono', ui-monospace, monospace; min-height: 18px; }

.sliders { display: grid; gap: 10px; margin-bottom: 14px; }
.sliders label, .selects label {
  display: grid;
  grid-template-columns: 64px 1fr 40px;
  align-items: center;
  gap: 10px;
  font: 10px 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.sliders output { font-size: 11px; color: var(--ink); text-align: right; }
input[type='range'] { accent-color: var(--gold); width: 100%; }

.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.selects label { grid-template-columns: 64px 1fr; }
select {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
}
select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
button {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 207, 110, 0.14), rgba(255, 207, 110, 0.04));
  color: var(--ink);
  padding: 9px 17px;
  transition: transform 120ms ease, border-color 120ms ease;
}
button:hover { transform: translateY(-1px); border-color: rgba(255, 207, 110, 0.5); }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button.ghost { background: none; color: var(--muted); }

.keys { list-style: none; padding: 0; margin: 18px 0 0; color: var(--muted); font-size: 12px; display: grid; gap: 6px; }
kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  font: 11px 'DM Mono', ui-monospace, monospace;
  color: var(--ink);
  background: var(--panel);
}
.hint { color: var(--muted); font-size: 12.5px; margin-top: 14px; }

.stage { position: relative; min-height: 64vh; }
#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  touch-action: none;
  cursor: pointer;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 44px);
  border-top: 1px solid var(--line);
  font: 10px 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .layout { grid-template-columns: 1fr; }
  .stage { order: -1; min-height: 54vh; }
}
