:root {
  color-scheme: light;
  --ink: #142321;
  --paper: #f3eddf;
  --card: #fffaf0;
  --orange: #ef5b2a;
  --lime: #d9ee67;
  --line: #9e9b8d;
  --muted: #686d67;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Arial Narrow", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(rgba(20,35,33,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,35,33,.045) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0 24px; }
.masthead { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; border-bottom: 3px solid var(--ink); padding-bottom: 22px; }
.brand-mark { width: 78px; height: 78px; display: grid; place-content: center; color: var(--card); background: var(--orange); transform: rotate(-2deg); box-shadow: 5px 5px 0 var(--ink); text-align: center; line-height: .85; }
.brand-mark span { font: 800 37px/1 Georgia, serif; }
.brand-mark small { font-size: 11px; letter-spacing: .22em; margin-left: .2em; }
.eyebrow, .step-label { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
h1 { margin: 0; font: 800 clamp(32px, 5vw, 54px)/.95 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.lede { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.best-badge { min-width: 110px; border: 1px solid var(--ink); background: var(--lime); padding: 10px 14px; text-align: right; }
.best-badge span { display: block; font-size: 11px; letter-spacing: .08em; }
.best-badge strong { font: 700 23px/1.2 Georgia, serif; }
.control-strip { display: grid; grid-template-columns: minmax(170px, 1fr) auto auto; gap: 24px; align-items: end; padding: 22px 0; border-bottom: 1px solid var(--line); }
.control-strip label > span, legend { display: block; margin-bottom: 7px; padding: 0; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
select { width: 100%; min-height: 44px; border: 1px solid var(--ink); border-radius: 0; background: var(--card); color: var(--ink); padding: 0 38px 0 12px; }
fieldset { border: 0; margin: 0; padding: 0; }
.segmented { display: flex; border: 1px solid var(--ink); background: var(--card); }
.segmented button { min-height: 42px; border: 0; border-right: 1px solid var(--ink); background: transparent; padding: 0 16px; color: var(--ink); }
.segmented button:last-child { border-right: 0; }
.segmented button.active { color: var(--card); background: var(--ink); }
.start-button, .finish-button { min-height: 44px; border: 2px solid var(--ink); background: var(--orange); color: #fff; padding: 0 18px; box-shadow: 3px 3px 0 var(--ink); font-weight: 800; }
.start-button:hover, .finish-button:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); }
.start-button span { padding-left: 16px; }
.stage { margin-top: 28px; min-height: 480px; border: 1px solid var(--ink); background: var(--card); box-shadow: 9px 9px 0 rgba(20,35,33,.18); }
.hidden { display: none !important; }
.intro-panel { min-height: 480px; display: grid; grid-template-columns: 1.2fr .8fr; }
.intro-copy { padding: clamp(34px, 6vw, 72px); }
.intro-copy h2, .observe-head h2, .recall-head h2 { margin: 0; font: 700 clamp(30px, 5vw, 55px)/1.03 Georgia, serif; letter-spacing: -.035em; }
.intro-copy > p:not(.step-label) { max-width: 600px; color: var(--muted); line-height: 1.8; }
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 38px; }
.rules span { border-top: 2px solid var(--ink); padding: 12px 6px 0 0; font-size: 12px; }
.rules b { display: block; margin-bottom: 5px; color: var(--orange); font: 700 20px Georgia, serif; }
.kit-preview { display: grid; place-content: center; overflow: hidden; background: var(--ink); position: relative; }
.kit-preview::before, .kit-preview::after { content: ""; position: absolute; width: 210px; height: 35px; background: var(--lime); transform: rotate(-35deg); }
.kit-preview::before { top: 35px; right: -70px; }
.kit-preview::after { bottom: 50px; left: -75px; }
.handle { width: 110px; height: 55px; margin: 0 auto -20px; border: 16px solid var(--orange); border-bottom: 0; border-radius: 18px 18px 0 0; }
.bag { z-index: 1; width: min(280px, 68vw); height: 220px; position: relative; border: 8px solid #b94320; background: var(--orange); box-shadow: 10px 12px 0 rgba(0,0,0,.35); }
.cross { position: absolute; left: 26px; top: 28px; color: white; font: 800 70px/1 Arial, sans-serif; }
.bag-label { position: absolute; right: 25px; bottom: 25px; color: var(--ink); font-weight: 900; font-size: 23px; line-height: .85; text-align: right; }
.zip { position: absolute; left: 0; right: 0; top: 18px; border-top: 3px dashed var(--ink); }
.observe-panel, .recall-panel, .result-panel { padding: clamp(25px, 5vw, 58px); }
.observe-head, .recall-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.timer, .progress-note { min-width: 105px; text-align: right; }
.timer strong, .progress-note strong { display: block; font: 800 52px/.9 Georgia, serif; color: var(--orange); }
.timer span, .progress-note span { font-size: 11px; letter-spacing: .08em; }
.item-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 34px 0 22px; }
.kit-item { min-height: 82px; border: 1px solid var(--ink); background: #f9f2e3; padding: 14px; position: relative; }
.kit-item::after { content: attr(data-number); position: absolute; right: 10px; top: 8px; color: #b9b6aa; font: 700 17px Georgia, serif; }
.kit-item strong { display: block; padding-right: 24px; font-size: 18px; }
.kit-item span { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.kit-item.critical { border-left: 6px solid var(--orange); }
.text-button, .quiet-button { border: 0; border-bottom: 1px solid currentColor; padding: 4px 0; color: var(--muted); background: transparent; }
.recall-head p:not(.step-label) { margin: 12px 0 0; color: var(--muted); }
.recall-form { display: flex; max-width: 720px; margin-top: 35px; }
.recall-form input { min-width: 0; flex: 1; min-height: 55px; border: 2px solid var(--ink); border-right: 0; background: #fff; padding: 0 16px; font-size: 18px; }
.recall-form input:focus { outline: 3px solid var(--lime); outline-offset: 2px; }
.recall-form button { border: 2px solid var(--ink); background: var(--lime); padding: 0 22px; font-weight: 800; }
.input-message { min-height: 20px; margin: 8px 0 0; color: var(--orange); font-size: 13px; }
.memory-list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 9px; min-height: 100px; margin-top: 12px; }
.memory-chip { border: 1px solid var(--ink); background: var(--paper); padding: 8px 10px; }
.memory-chip button { margin-left: 9px; border: 0; background: transparent; color: var(--muted); padding: 0; }
.recall-actions, .result-actions { display: flex; gap: 24px; align-items: center; margin-top: 25px; }
.finish-button { min-width: 210px; }
.result-panel { display: grid; grid-template-columns: 300px 1fr; gap: 45px; }
.score-card { border-right: 1px solid var(--line); padding-right: 35px; }
.score-line { margin-top: 25px; white-space: nowrap; }
.score-line strong { font: 800 86px/.8 Georgia, serif; color: var(--orange); }
.score-line span { color: var(--muted); }
.score-card h2 { margin: 30px 0 8px; font: 700 29px Georgia, serif; }
.score-card > p:not(.step-label) { color: var(--muted); line-height: 1.6; }
.score-meter { height: 10px; margin-top: 24px; border: 1px solid var(--ink); background: var(--paper); }
.score-meter span { display: block; width: 0; height: 100%; background: var(--lime); transition: width .5s; }
.result-details h3 { margin: 0 0 13px; font: 700 18px Georgia, serif; }
.result-details section + section { margin-top: 30px; }
.hit-list { display: flex; flex-wrap: wrap; gap: 7px; }
.hit-list span { background: var(--lime); border: 1px solid var(--ink); padding: 6px 9px; font-size: 13px; }
.missed-groups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.missed-group { border-top: 2px solid var(--ink); padding: 10px 4px 4px; }
.missed-group strong { display: block; margin-bottom: 7px; color: var(--orange); font-size: 12px; letter-spacing: .08em; }
.missed-group p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 13px; }
.result-actions { grid-column: 1 / -1; margin-top: 0; }
footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 35px; color: var(--muted); font-size: 11px; letter-spacing: .09em; text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 620px); padding-top: 18px; }
  .masthead { grid-template-columns: auto 1fr; gap: 14px; }
  .brand-mark { width: 58px; height: 58px; }
  .brand-mark span { font-size: 27px; }
  .best-badge { grid-column: 1 / -1; display: flex; justify-content: space-between; text-align: left; }
  .control-strip { grid-template-columns: 1fr; gap: 15px; }
  .control-strip .start-button { width: 100%; }
  .segmented button { flex: 1; padding: 0 8px; }
  .intro-panel { grid-template-columns: 1fr; }
  .kit-preview { min-height: 300px; }
  .intro-copy { padding: 30px 22px; }
  .rules { grid-template-columns: 1fr; }
  .rules span { display: grid; grid-template-columns: 35px 1fr; align-items: center; }
  .rules b { margin: 0; }
  .observe-panel, .recall-panel, .result-panel { padding: 27px 18px; }
  .observe-head, .recall-head { align-items: start; }
  .observe-head h2, .recall-head h2 { font-size: 30px; }
  .timer strong, .progress-note strong { font-size: 40px; }
  .item-grid { grid-template-columns: 1fr 1fr; }
  .kit-item { min-height: 76px; }
  .recall-form button { padding: 0 13px; }
  .result-panel { grid-template-columns: 1fr; gap: 30px; }
  .score-card { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 27px; }
  .missed-groups { grid-template-columns: 1fr; }
  .result-actions { grid-column: auto; flex-direction: column; align-items: stretch; }
  .result-actions .quiet-button { align-self: center; }
}

@media (max-width: 410px) {
  .item-grid { grid-template-columns: 1fr; }
  .lede { display: none; }
  .recall-head { display: block; }
  .progress-note { margin-top: 20px; text-align: left; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
