.challenge { min-height:100vh; background:radial-gradient(ellipse at 34% 50%, #14342c 0, transparent 56%),var(--bg); }
.challenge > header { border-bottom:1px solid var(--line); }
.challenge-bar, .bench { width:min(1220px,100%); margin:auto; padding-inline:clamp(18px,4vw,56px); }
.challenge-bar { min-height:78px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.locale-picker { position:relative; font-size:.94rem; z-index:2; }
.locale-picker summary { cursor:pointer; padding:9px 5px; }
.locale-picker summary span { color:var(--mint); }
.locale-picker nav { position:absolute; inset-inline-end:0; top:100%; min-width:190px; padding:8px; border:1px solid #536b5f; background:#102922; border-radius:12px; box-shadow:0 12px 32px #0006; }
.locale-picker nav a { display:block; padding:7px 12px; border-radius:6px; }
.locale-picker a:hover, .locale-picker a[aria-current] { background:#294239; color:#ffe1ad; }
.bench { display:grid; grid-template-columns:minmax(0,.82fr) minmax(0,1.3fr); gap:clamp(32px,5vw,78px); align-items:start; padding-block:clamp(36px,7vw,100px); }
.case-file h1 { font-size:clamp(2.3rem,4.2vw,4.25rem); line-height:1.04; letter-spacing:-.05em; text-wrap:balance; margin-bottom:22px; }
.brief { color:#bcd0c4; font-size:clamp(1rem,1.5vw,1.15rem); line-height:1.6; margin-bottom:26px; }
.board { margin:0; border-radius:14px; border:1px solid #536353; overflow:hidden; }
.board img { width:100%; height:clamp(150px,17vw,224px); object-fit:cover; object-position:50% 48%; }
.instrument { background:#112822; border:1px solid #446052; border-radius:22px; overflow:hidden; box-shadow:0 16px 42px #04100c55; }
.face, .controls { padding:clamp(16px,2.4vw,29px); }
.face { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-block:16px; }
.face h2 { font-size:1.1rem; line-height:1.3; margin:0; letter-spacing:0; }
.time-scale { font:600 .85rem var(--mono); color:var(--mint); }
.display { background:#091714; margin:0; border-block:1px solid #42594b; }
.display svg { width:100%; height:auto; }
.baseline { fill:none; stroke:#708476; opacity:.5; stroke-dasharray:3 7; }
.trace { fill:none; stroke:currentColor; stroke-width:3; stroke-linejoin:round; stroke-linecap:round; }
.channel { fill:currentColor; font:600 16px var(--mono); paint-order:stroke; stroke:#091714; stroke-width:5px; }
.input { color:#aadfc4; }
.output { color:#ffd18a; }
.controls h3, .dial-label label { font-size:1.22rem; font-weight:650; letter-spacing:-.02em; line-height:1.3; margin:0 0 16px; }
.actions { display:flex; gap:10px; flex-wrap:wrap; }
.actions button, .store-link { display:inline-flex; align-items:center; justify-content:center; min-height:45px; text-align:center; border-radius:9px; padding:10px 15px; font-size:.95rem; line-height:1.35; font-weight:650; }
.actions button { color:var(--paper); background:#243c32; border:1px solid #5f7565; }
.actions button:hover { border-color:var(--mint); }
.actions .adjust, .store-link { color:#102218; background:var(--copper); border:1px solid var(--copper); }
fieldset { margin:0 0 16px; padding:0; border:0; min-width:0; }
.controls legend, #drawer label { display:block; font-size:.94rem; font-weight:700; margin-bottom:8px; color:#d5e6db; }
.actions button[aria-pressed="true"], .actions #verify { color:#102218; background:var(--copper); border-color:var(--copper); }
#levels button { flex:1 1 77px; }
.scale, .diagram summary, .help summary { cursor:pointer; color:var(--mint); font-weight:650; }
.scale { background:#203b30; border:1px solid #536e61; border-radius:8px; min-width:48px; min-height:44px; }
.diagram { margin-top:14px; grid-column:1/-1; }
.diagram summary, .help summary { padding:10px 0; }
.diagram figure { margin:0; padding:15px; background:#142c24; border:1px solid #466053; border-radius:9px; }
.branch { display:flex; align-items:center; font:600 .85rem var(--mono); color:#f7d99d; }
.branch i { flex:1; min-width:6px; border-top:2px solid currentColor; }
.branch span { border:2px solid currentColor; padding:4px 8px; }
.diagram figcaption, .help p { margin:10px 0 0; line-height:1.55; color:#c7d7cc; }
.pcb { display:grid; grid-template-columns:1fr 1fr; position:relative; isolation:isolate; border:1px solid #4e7460; border-radius:12px; background:#164c3b; margin-top:12px; padding:8px; gap:9px; }
.pcb::before { content:""; position:absolute; z-index:-1; inset:29px 20% auto; border-top:3px solid #ca954d; }
.pcb button { display:flex; flex-direction:column; align-items:center; gap:8px; background:transparent; color:#f3f8e9; padding:8px 4px; font-size:.88rem; line-height:1.3; border:1px solid transparent; border-radius:7px; }
.pcb button:hover, .pcb button:focus-visible { background:#12382bcc; border-color:#86bfa7; }
.part { display:inline-flex; align-items:stretch; gap:4px; width:74px; height:23px; margin-block:1px; border-radius:10px; padding:0 8px; background:linear-gradient(#ac895d,#eed3a5 37%,#c9a279); box-shadow:0 2px 3px #0007; }
.part i { width:5px; }
.part i:last-child { margin-left:auto; }
.pad { width:27px; height:27px; display:grid; place-items:center; border-radius:50%; background:#28403a; border:3px solid #e6bd77; color:white; font:700 .8rem var(--mono); }
#meter:not(:empty) { display:block; width:fit-content; background:#c5d292; color:#1b311e; border-radius:6px; padding:6px 12px; margin-top:10px; font:650 1.05rem var(--mono); }
#drawer { padding:13px; background:#1c342a; border:1px solid #506e5b; border-radius:10px; margin-bottom:14px; }
#bands { color:#f5d399; margin:0 0 10px; }
#spare { background:#10251c; color:white; border:1px solid #72977c; padding:8px; border-radius:6px; font:inherit; }
#feedback { border-inline-start:3px solid var(--copper); padding-inline-start:12px; margin:14px 0 4px; line-height:1.5; }
.reference { fill:none; stroke:#d4dfd8; stroke-width:2; stroke-dasharray:6 6; opacity:.72; }
.axis { fill:#c4ccb9; text-anchor:end; font:13px var(--mono); }
.store-link { gap:12px; margin-top:16px; }
.restart { display:block; margin-top:12px; min-height:44px; padding:4px; color:var(--mint); background:none; }
:lang(ja) .case-file h1, :lang(zh-Hant) .case-file h1 { line-height:1.22; letter-spacing:-.025em; }
@media (max-width:760px) {
  .challenge-bar { min-height:64px; }
  .bench { grid-template-columns:minmax(0,1fr); gap:20px; padding-block:26px 40px; }
  .case-file { display:grid; grid-template-columns:minmax(0,1fr) clamp(77px,18vw,112px); column-gap:15px; align-items:center; }
  .case-file h1 { font-size:clamp(1.7rem,6.6vw,2.6rem); margin:0; }
  .board { grid-column:2; grid-row:1; }
  .board img { height:clamp(73px,17vw,98px); }
  .brief { grid-column:1 / -1; margin:12px 0 0; }
  .instrument { border-radius:15px; }
  .channel { font-size:19px; }
}
@media (max-width:380px) {
  .challenge-bar .brand { font-size:15px; gap:6px; }
  .challenge-bar .brand img { width:28px; height:28px; }
  .locale-picker { font-size:.83rem; }
}
.board svg { display:block; width:100%; height:auto; }
.branch + .branch { margin-top:12px; }
.pcb { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (max-width:480px) {
  .pcb { gap:3px; padding:6px; }
  .pcb button { overflow-wrap:anywhere; }
  .part { width:58px; }
}
#comparison { margin:16px; padding:13px 15px; border-inline-start:3px solid var(--mint); background:#19382d; line-height:1.55; }
#comparison p { margin:0; }
@media (max-width:480px) {
  .channel { font-size:25px; }
  .axis { font-size:20px; }
}

.challenge [hidden] { display:none !important; }
.bench { padding-block:clamp(24px,4vw,58px); gap:clamp(24px,4vw,60px); grid-template-columns:minmax(0,1fr) minmax(0,1.08fr); }
.case-file h1 { margin-bottom:13px; font-size:clamp(2rem,4vw,3.8rem); }
.brief { margin-bottom:15px; }
.board { position:relative; isolation:isolate; border-color:#547968; background:#103523; }
.board svg { display:block; }
#board-probe { position:absolute; top:46%; left:18%; transform:translate(-17px,-50%); display:flex; align-items:center; gap:7px; padding:3px 10px 3px 3px; border-radius:24px; color:#1e241c; background:#ffce85; box-shadow:0 0 0 3px #58391f88,0 3px 10px #0008; font-weight:750; min-height:44px; }
#board-probe span { display:grid; place-items:center; min-width:27px; height:27px; border-radius:50%; background:#26291b; color:#ffdf9a; }
.readout { position:absolute; inset:auto 8px 8px auto; display:grid; gap:2px; padding:6px 10px; background:#15251c; color:#c8f19d; border:1px solid #90ab75; border-radius:6px; }
.readout output { font:650 clamp(20px,3vw,32px)/1 var(--mono); font-variant-numeric:tabular-nums; }
.readout small, .spec-pair small, .spare-key small { font-size:.8rem; }
.spec-pair { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.spec-pair div { padding:8px 12px; border-inline-start:2px solid #5b8071; display:grid; gap:3px; color:#bcd3c9; }
.spec-pair strong { color:#f8e7c7; font:650 1.08rem var(--mono); }
.decision { margin:13px 0; line-height:1.45; }
.parts { display:flex; flex-wrap:wrap; gap:7px; }
.spare-key { display:grid; justify-items:center; flex:1 1 77px; gap:3px; padding:10px 5px; background:#233830; color:#fff0d4; border:1px solid #6c8374; border-radius:10px; }
.spare-key:hover:not(:disabled), .spare-key:focus-visible { background:#344c3f; border-color:#ffcf88; }
.spare-key:disabled { opacity:.5; }
.spare-key .part { width:52px; height:15px; gap:3px; padding:0 6px; margin-bottom:3px; }
.spare-key .part i { width:4px; }
#auto { display:block; margin-top:8px; line-height:1.45; color:#b4c8bd; }
.test-key { color:#1a271b; background:#ffd090; font-weight:700; padding:12px 20px; border-radius:9px; }
.manual { margin:12px 16px; }
.manual summary, .film-link { color:var(--mint); cursor:pointer; padding:9px 0; }
.manual .controls { padding:14px 0; }
#complete { border-top:1px solid #506e60; margin-top:14px; padding-top:14px; }
#complete strong { font-size:1.3rem; }
#complete p { margin:7px 0; }
.film-link { display:inline-block; margin:0 12px; }
.restart { margin:4px 16px 10px; }
@media (max-width:760px) {
  .bench { grid-template-columns:minmax(0,1fr); gap:16px; padding-block:18px 30px; }
  .case-file { display:block; }
  .case-file h1 { font-size:clamp(1.7rem,6.6vw,2.6rem); margin:0 0 7px; }
  .brief { margin:0 0 10px; line-height:1.45; }
  .board { max-width:540px; }
}
.listen { display:flex; flex-wrap:wrap; gap:8px; padding:12px 16px 0; }
.listen button { color:#eff6ed; background:#243c32; border:1px solid #587362; border-radius:20px; min-height:42px; padding:7px 14px; }
.listen button::before { content:"♫ "; color:#ffcf88; }
.listen button:disabled { opacity:.5; }
