:root {
  color-scheme: light;
  --paper: #fbfcf8;
  --ink: #202a38;
  --muted: #687267;
  --line: #dce0d5;
  --lavender: #b8b1ec;
  --cobalt: #4769e4;
  --chartreuse: #d9e978;
  --vermillion: #ef8a70;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #325bd7; outline-offset: 5px; }
[hidden] { display: none !important; }
.page-shell { width: min(100%, 1680px); min-height: 100svh; margin: 0 auto; padding: 0 4.2%; display: flex; flex-direction: column; }
.masthead { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand h1 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .13em; font-weight: 700; white-space: nowrap; }
.brand-mark { flex-shrink: 0; }
.masthead-note { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.progress { display: flex; list-style: none; gap: 12px; padding: 0; margin: 0; position: absolute; left: 50%; transform: translateX(-50%); }
.progress li { width: 21px; height: 21px; border: 1px solid #cdd2c6; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-variant-numeric: tabular-nums; color: #77806f; }
.progress .current { border-color: var(--ink); color: var(--ink); outline: 1px solid var(--ink); outline-offset: 3px; }
.progress .done { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.game-main { flex: 1; display: flex; flex-direction: column; }
.heading-row { display: flex; justify-content: space-between; align-items: end; padding-top: 29px; gap: 28px; }
.intro h2 { font-size: clamp(28px, 3vw, 42px); font-weight: 500; letter-spacing: -.045em; line-height: 1.1; margin: 0 0 10px; }
.intro p { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0; }
.mobile-break { display: none; }
.phase-legend { display: flex; gap: 14px; align-items: center; padding-bottom: 4px; color: #687267; }
.legend-label { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; margin-right: 3px; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; font-variant-numeric: tabular-nums; }
.legend-item svg { width: 23px; height: 23px; overflow: visible; }
.legend-item circle { fill: none; stroke: #9fa997; stroke-width: .7; }
.legend-item path { fill: #89947c; stroke: var(--paper); stroke-width: .5; }
.playfield { flex: 1; position: relative; min-height: 360px; display: flex; align-items: center; justify-content: center; padding: 5px 0 24px; }
.field-heading { position: absolute; left: 0; right: 0; top: 29px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; letter-spacing: .055em; }
#arrangement-label { text-transform: uppercase; }
#circle-count { letter-spacing: .01em; }
.scene { position: relative; flex: 0 0 auto; width: min(calc(48svh * var(--scene-ratio, 1)), 760px, 100%); aspect-ratio: 400 / 410; }
#field-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.circle-controls { position: absolute; inset: 0; pointer-events: none; }
.circle-button { position: absolute; transform: translate(-50%, -50%); width: 56px; height: 56px; padding: 4px 0; border: 1px solid rgb(32 42 56 / 38%); border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; line-height: 1; gap: 4px; background: var(--circle-color); pointer-events: auto; touch-action: manipulation; transition: box-shadow 150ms, filter 150ms; }
.circle-button:hover { box-shadow: 0 0 0 5px rgb(251 252 248 / 50%); filter: brightness(1.045); }
.circle-button:active { box-shadow: 0 0 0 4px rgb(32 42 56 / 12%); }
.circle-button:focus-visible { outline-color: var(--ink); outline-offset: 6px; box-shadow: 0 0 0 4px var(--paper); }
.circle-button[data-color="1"] { color: white; border-color: rgb(255 255 255 / 65%); }
.circle-number { font-size: 21px; font-weight: 500; letter-spacing: -.04em; }
.circle-phase { font-size: 10px; letter-spacing: .02em; }
.envelope { fill: none; stroke: var(--ink); stroke-width: .7; stroke-opacity: .18; stroke-dasharray: 1.5 4; }
.disk { stroke: var(--ink); stroke-opacity: .45; stroke-width: .65; }
.phase-tick { stroke: var(--ink); stroke-width: .8; stroke-opacity: .28; }
.phase-tick.active { stroke-width: 2; stroke-opacity: .9; }
.phase-arc { fill: none; stroke: var(--ink); stroke-width: 1; stroke-opacity: .75; stroke-linecap: round; }
.witness-ring { fill: none; stroke: #a63d29; stroke-width: 2; stroke-dasharray: 5 3; }
.witness-mark { fill: #a63d29; stroke: var(--paper); stroke-width: 1; }
.witness-link { stroke: #a63d29; stroke-width: 1; stroke-dasharray: 2 4; opacity: .65; }
.arrangement-hint { position: absolute; bottom: 10px; left: 0; right: 0; margin: 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.5; }
.controls { width: min(100%, 980px); align-self: center; padding: 0 0 26px; }
.transport { width: min(100%, 540px); min-height: 63px; display: flex; gap: 15px; align-items: center; margin: 0 auto 10px; }
.play-button, .reset-button { min-width: 64px; min-height: 44px; border: 0; padding: 0 4px; display: flex; align-items: center; justify-content: center; gap: 6px; background: transparent; font-size: 11px; }
.play-button { justify-content: start; }
.play-button svg { fill: var(--ink); }
.reset-button svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.play-button:hover, .reset-button:hover { color: #325bd7; }
.timeline-wrap { flex: 1; min-width: 0; position: relative; height: 44px; display: flex; align-items: center; padding-bottom: 8px; }
#timeline { --position: 0%; width: 100%; min-width: 0; height: 44px; margin: 0; appearance: none; -webkit-appearance: none; cursor: pointer; background: transparent; touch-action: none; }
#timeline::-webkit-slider-runnable-track { height: 2px; border: 0; background: linear-gradient(to right, var(--ink) var(--position), #cdd2c6 var(--position)); }
#timeline::-moz-range-track { height: 2px; border: 0; background: #cdd2c6; }
#timeline::-moz-range-progress { height: 2px; background: var(--ink); }
#timeline::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; height: 12px; width: 12px; margin-top: -5px; border: 2px solid var(--paper); outline: 1px solid var(--ink); border-radius: 50%; background: var(--ink); }
#timeline::-moz-range-thumb { height: 8px; width: 8px; border: 2px solid var(--paper); outline: 1px solid var(--ink); border-radius: 50%; background: var(--ink); }
.timeline-tick { position: absolute; top: 34px; font-size: 8px; font-variant-numeric: tabular-nums; color: #77806f; pointer-events: none; }
.timeline-tick.start { left: 0; }
.timeline-tick.middle { left: 50%; transform: translateX(-50%); }
.timeline-tick.end { right: 0; }
.angle { width: 35px; color: var(--muted); font-size: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.control-bottom { border-top: 1px solid var(--line); padding-top: 17px; display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.feedback { display: flex; align-items: center; gap: 11px; min-height: 49px; }
.feedback-symbol { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #b9c1ad; border-radius: 50%; font-size: 17px; flex-shrink: 0; }
#feedback-title { font-size: 13px; line-height: 1.4; margin: 0 0 4px; font-weight: 500; }
#feedback-detail { font-size: 11px; color: var(--muted); line-height: 1.45; margin: 0; }
.feedback[data-result="unsafe"] .feedback-symbol { border-color: #b65540; color: #a13c27; }
.feedback[data-result="safe"] .feedback-symbol { border-color: #697946; background: var(--chartreuse); }
.actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.primary-button, .next-button { min-height: 48px; border: 1px solid var(--ink); padding: 0 18px; display: inline-flex; gap: 15px; align-items: center; justify-content: center; font-size: 12px; white-space: nowrap; font-weight: 500; border-radius: 3px; transition: background-color 150ms, color 150ms; touch-action: manipulation; }
.primary-button { background: var(--ink); color: var(--paper); }
.primary-button:hover { background: #394354; }
.next-button { color: var(--ink); background: var(--chartreuse); border-color: #bfcc70; gap: 5px; }
.next-button:hover:enabled { background: #cbde58; }
.next-button:disabled { background: transparent; color: #77806f; border-color: var(--line); }
.ending { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 12px 0 25px; }
.mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 65px; width: min(100%, 800px); margin: 0 auto; }
.mosaic-piece { margin: 0; text-align: center; }
.mini-scene { width: min(100%, 180px); aspect-ratio: 400 / 410; display: block; margin: 0 auto; overflow: visible; }
.mosaic-piece figcaption { font-size: 10px; color: var(--muted); padding-top: 3px; letter-spacing: .04em; }
.mosaic-piece figcaption span { color: var(--ink); padding-right: 7px; }
.ending-note { display: flex; align-items: center; justify-content: center; gap: 30px; padding-top: 26px; }
.ending-note p { color: var(--muted); font-size: 12px; }
footer { min-height: 50px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 10px; }
footer a { color: inherit; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
footer a:hover { color: var(--ink); }
.footer-center { font-size: 10px; }
footer time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript-note { text-align: center; font-size: 14px; padding: 20px; }
@media (min-width: 1600px) { .progress { position: static; transform: none; } }
@media (max-width: 1000px) {
  .masthead-note { display: none; }
  .progress { position: static; transform: none; }
  .control-bottom { gap: 15px; }
  .desktop-word { display: none; }
  .phase-legend { gap: 10px; }
  .legend-label { display: none; }
}
@media (max-width: 620px) {
  .page-shell { padding: 0 20px; }
  .masthead { min-height: 64px; gap: 12px; }
  .brand { gap: 7px; }
  .brand h1 { font-size: 11px; letter-spacing: .09em; }
  .brand-mark { width: 27px; height: 20px; }
  .progress { gap: 9px; }
  .progress li { width: 17px; height: 17px; font-size: 8px; }
  .progress .current { outline-offset: 2px; }
  .heading-row { align-items: start; gap: 10px; padding-top: 23px; flex-wrap: wrap; }
  .intro { width: 100%; }
  .intro h2 { font-size: 32px; margin-bottom: 8px; }
  .intro p { font-size: 12px; line-height: 1.55; }
  .mobile-break { display: block; }
  .phase-legend { width: 100%; gap: 14px; padding: 2px 0 0; }
  .legend-label { display: inline; font-size: 8px; margin-right: 0; }
  .legend-item { font-size: 9px; gap: 4px; }
  .legend-item svg { width: 19px; height: 19px; }
  .playfield { min-height: 0; padding: 21px 0 25px; }
  .field-heading { top: 13px; font-size: 8px; }
  #circle-count { font-size: 8px; }
  .scene { width: min(43svh, 100%, 360px); }
  .circle-button { width: 44px; height: 44px; gap: 3px; }
  .circle-number { font-size: 17px; }
  .circle-phase { font-size: 8px; }
  .arrangement-hint { font-size: 10px; bottom: 3px; max-width: 100%; padding: 0 5px; }
  .controls { padding-bottom: 16px; }
  .transport { min-height: 53px; gap: 10px; margin-bottom: 5px; }
  .play-button { min-width: 53px; gap: 4px; font-size: 10px; }
  .play-button svg { width: 17px; }
  .reset-button { min-width: 47px; font-size: 10px; gap: 3px; }
  .reset-button svg { width: 14px; }
  .angle { width: 29px; font-size: 9px; }
  .control-bottom { padding-top: 10px; display: flex; flex-direction: column; align-items: stretch; gap: 11px; }
  .feedback { min-height: 44px; gap: 9px; }
  .feedback-symbol { width: 25px; height: 25px; font-size: 14px; }
  #feedback-title { font-size: 12px; margin-bottom: 3px; }
  #feedback-detail { font-size: 10px; }
  .actions { justify-content: space-between; gap: 9px; }
  .primary-button, .next-button { min-height: 46px; padding: 0 15px; font-size: 12px; }
  .actions .primary-button { flex: 1; }
  .next-button { min-width: 82px; }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin-top: 8px; }
  .mini-scene { width: min(100%, 135px, 18svh); }
  .mosaic-piece figcaption { font-size: 9px; }
  .ending-note { flex-direction: column; gap: 5px; padding-top: 18px; }
  .ending-note p { margin: 0 0 10px; }
  footer { font-size: 9px; gap: 10px; min-height: 47px; }
  .footer-center { display: none; }
}
@media (max-width: 350px) {
  .page-shell { padding: 0 16px; }
  .brand h1 { font-size: 10px; letter-spacing: .06em; }
  .brand { gap: 5px; }
  .brand-mark { width: 23px; }
  .progress { gap: 7px; }
  .masthead { min-height: 60px; }
  .heading-row { padding-top: 16px; gap: 9px; }
  .intro h2 { font-size: 29px; }
  .intro p { font-size: 11px; }
  .scene { width: min(37svh, 100%); }
  .playfield { padding-top: 20px; padding-bottom: 25px; }
  .field-heading { top: 12px; font-size: 7px; }
  #circle-count { font-size: 7px; }
  .arrangement-hint { font-size: 9px; padding: 0; bottom: 7px; }
  .transport { gap: 6px; }
  .actions .primary-button { gap: 8px; padding: 0 11px; font-size: 11px; }
  .next-button { min-width: 74px; font-size: 11px; }
  #feedback-title { font-size: 11px; }
  #feedback-detail { font-size: 9px; }
  .mosaic { gap: 12px 15px; }
  .mini-scene { width: min(100%, 116px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Focused cold-critic polish. */
.circle-phase { font-size: 11px; }
.timeline-tick { font-size: 10px; color: #59634f; }
.mini-scene .phase-arc { stroke-width: 2; }
.ending-note { flex-wrap: wrap; }
@media (min-width: 621px) {
.arrangement-hint { bottom: 20px; }
.controls { margin-top: -6px; }
}
@media (max-width: 620px) {
.field-heading, #circle-count { font-size: 9px; letter-spacing: .01em; }
.circle-phase { font-size: 10px; }
.timeline-tick { font-size: 9px; }
.mini-scene { width: min(100%, 158px); }
.mosaic { gap: 12px 18px; }
.ending-note { gap: 10px; }
.ending-note p { width: 100%; text-align: center; }
}
@media (max-width: 350px) {
.field-heading, #circle-count { font-size: 8px; }
.mini-scene { width: 100%; }
}
