:root {
  color-scheme: light;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  color: #242424;
  background: #fff;
  font-size: 14px;
  --paper: #242424;
  --ink: #fff;
  --mute: #777;
  --line: #e3e3e3;
  --panel: #fff;
  --panel-soft: #f7f7f7;
  --accent: #1d2a4a;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: #fff; }
body { letter-spacing: .01em; }
button, select, input { font: inherit; }
button, select { color: var(--paper); }
button { cursor: pointer; }
.replica-shell { max-width: 1220px; margin: 0 auto; padding: 26px 32px 58px; }
.replica-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 0 0 28px;
}
.back-link { color: var(--paper); text-decoration: none; }
.back-link:hover { color: var(--accent); }
.kicker {
  margin: 0;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.header-note { margin: 4px 0 0; color: var(--mute); font-size: 12px; text-align: right; }
.replica-main {
  display: grid;
  grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.replica-stage {
  position: sticky;
  top: 20px;
  padding: 22px;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(25, 32, 48, .06);
}
.stage-topline, .control-title-row, .section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.stage-topline {
  color: var(--mute);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: .08em;
}
.stage-topline span:last-child { color: var(--accent); }
.stage-disk {
  display: grid;
  width: min(100%, 330px);
  aspect-ratio: 1;
  margin: 24px auto 20px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #f0f0f0;
  background: #fff;
  box-shadow: inset 0 -18px 40px rgba(40, 40, 40, .025), 0 24px 60px rgba(0, 0, 0, .08);
}
.replica-character { width: 73%; aspect-ratio: 1; }
.replica-character svg { display: block; width: 100%; height: 100%; overflow: visible; }
.readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 14px;
  color: #858585;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.readout b { color: var(--paper); font-weight: 500; }
.stage-actions { display: flex; gap: 8px; margin-top: 20px; }
.stage-actions button,
.preset-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--paper);
}
.stage-actions button { padding: 7px 12px; }
.stage-actions button[aria-pressed="true"],
.preset-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
}
.stage-actions button:hover, .preset-button:hover { border-color: #9aa3b5; }
.stage-note, .section-note { color: var(--mute); font-size: 12px; line-height: 1.7; }
.stage-note { margin: 17px 0 0; }
.replica-controls { min-width: 0; }
.control-section {
  margin: 0 0 22px;
  padding: 20px;
  border: 1px solid #e6e6e6;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(25, 32, 48, .035);
}
.control-section:first-child { padding: 22px 20px; }
.section-heading h1 { margin: 0; font-size: 19px; font-weight: 560; }
.section-heading span, .count-label { color: var(--mute); font-size: 11px; }
.section-note { max-width: 66ch; margin: 10px 0 0; }
h2 {
  margin: 0 0 14px;
  color: var(--mute);
  font-size: 11px;
  font-weight: 560;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.select-row label, .range-row label {
  display: grid;
  gap: 6px;
  color: var(--mute);
  font-size: 10px;
  letter-spacing: .08em;
}
select {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--paper);
  background: #fff;
}
select:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.preset-grid { display: grid; gap: 8px; }
.eye-grid { grid-template-columns: repeat(auto-fill, minmax(106px, 1fr)); }
.preset-button {
  min-height: 43px;
  padding: 7px 8px;
  text-align: left;
  font-size: 11px;
}
.preset-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; }
.eye-thumb { width: 74px; height: 39px; }
.eye-thumb path { fill: #242424; }
.mode-buttons {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f7f7;
}
.mode-buttons button {
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  color: #777;
  background: transparent;
  font-size: 10px;
  letter-spacing: .04em;
}
.mode-buttons button[aria-selected="true"] {
  color: var(--ink);
  background: var(--accent);
}
.color-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.color-button {
  display: grid;
  min-width: 0;
  gap: 4px;
  justify-items: center;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #777;
  background: transparent;
  font-size: 10px;
}
.color-button:hover { border-color: #9aa3b5; }
.color-button[aria-pressed="true"] { border-color: var(--accent); color: var(--paper); }
.color-swatch {
  display: block;
  width: 31px;
  height: 31px;
  border: 2px solid rgba(0, 0, 0, .08);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-start), var(--color-end));
  box-shadow: 0 3px 8px rgba(0, 0, 0, .2);
}
.color-button[data-color="spectrum"] .color-swatch {
  background: conic-gradient(#ef3349, #f3a51b, #0bb678, #2f82e5, #9568e5, #ef3349);
}
.color-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.color-inputs label {
  display: grid;
  gap: 6px;
  color: #777;
  font-size: 10px;
  letter-spacing: .06em;
}
.color-inputs label > span { display: flex; align-items: center; gap: 8px; }
.color-inputs input[type="color"] {
  width: 32px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}
.color-inputs output {
  color: #333;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  text-transform: uppercase;
}
.spring-section { margin-bottom: 0; }
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.range-row output { justify-self: end; color: var(--paper); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
@media (max-width: 860px) {
  .replica-main { grid-template-columns: 1fr; }
  .replica-stage { position: static; }
  .stage-disk { width: min(100%, 370px); }
}
@media (max-width: 540px) {
  .replica-shell { padding: 20px 16px 42px; }
  .replica-header { align-items: flex-start; flex-direction: column-reverse; gap: 8px; }
  .header-note { text-align: left; }
  .replica-stage, .control-section { padding: 16px; }
  .select-row, .range-row { grid-template-columns: 1fr; }
  .eye-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .color-inputs { grid-template-columns: 1fr; }
}
