.beat-panel{margin:0 0 24px;padding:24px;border:1px solid var(--line);border-radius:12px;background:var(--surface);scroll-margin-top:18px}
.beat-heading{display:flex;align-items:center;justify-content:space-between;gap:24px}.beat-heading h2{font-size:23px;line-height:1.4;letter-spacing:-.6px;margin:5px 0 7px}.beat-heading p:last-child{font-size:13px;line-height:1.8;color:var(--muted);max-width:650px}.beat-panel button{min-height:44px;padding:10px 14px;border:1px solid var(--line);border-radius:7px;background:var(--paper);color:var(--ink);font:inherit;font-size:12px;line-height:1.5;cursor:pointer}.beat-panel button:focus-visible,.beat-panel input:focus-visible{outline:2px solid var(--ink);outline-offset:3px}.beat-panel button:hover{border-color:var(--muted)}.beat-panel #beat-open{flex-shrink:0;font-weight:600}.beat-panel [hidden]{display:none!important}
.beat-body{max-width:860px;margin:22px auto 0;scroll-margin-top:20px}.beat-case-row{display:flex;gap:12px;align-items:center;justify-content:space-between}.beat-cases{display:flex;gap:8px}.beat-cases button[aria-pressed=true],.beat-guesses button[aria-pressed=true]{border-color:var(--ink);background:var(--ink);color:var(--paper)}#beat-progress{font-size:11px;color:var(--muted);white-space:nowrap}#beat-context{font-size:13px;line-height:1.8;margin:14px 0;color:var(--muted)}
.beat-boards{display:grid;grid-template-columns:1fr 1fr;gap:14px}.beat-boards article{min-width:0;padding:14px;background:#15251f;border:1px solid #466153;border-radius:10px;color:#e9efe9}.beat-boards h3{font-size:12px;line-height:1.6;font-weight:600;margin:0}.beat-boards svg{display:block;width:100%;max-height:250px;margin:auto;overflow:visible}.beat-boards svg text{fill:#c6d7cd;font:12px system-ui,sans-serif}.beat-ring,.beat-ticks line{fill:none;stroke:#6c8577;stroke-width:1.5}.beat-actual{stroke:#ffda86;stroke-width:4;stroke-linecap:round}.beat-neighbor{stroke:#9de3c2;stroke-width:4;stroke-linecap:round}.beat-solo{stroke:#c4cdca;stroke-width:2.5;stroke-dasharray:5 5}.beat-pin{fill:#ffda86;stroke:#15251f;stroke-width:2}.beat-legend{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:11px;color:var(--muted);line-height:1.7;margin:12px 0 16px}.beat-legend span{display:inline-flex;align-items:center;gap:6px}.beat-legend i{display:inline-block;width:15px;height:4px;background:#b77820}.beat-legend .legend-neighbor{background:#327e60}.beat-legend .legend-solo{height:0;background:none;border-top:2px dashed var(--muted)}
.beat-guess-panel>p{font-size:14px;font-weight:600;margin-bottom:10px}.beat-guesses{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.beat-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.beat-panel #beat-run{background:var(--ink);color:var(--paper);border-color:var(--ink);font-weight:600}.beat-result{padding:16px 18px;background:var(--soft);border:1px solid var(--line);border-radius:8px}.beat-result h3{font-size:16px;line-height:1.7;margin:0 0 7px;scroll-margin-top:18px}.beat-result p{font-size:12px;line-height:1.9}.beat-result #beat-numbers{font-variant-numeric:tabular-nums;font-weight:600;margin-bottom:5px;color:var(--ink)}.beat-timeline{margin-top:14px}.beat-timeline label{font-size:11px;color:var(--muted);display:flex;justify-content:space-between;gap:12px;line-height:1.7}.beat-timeline input{width:100%;min-height:32px;display:block;accent-color:var(--ink);touch-action:pan-y}.beat-ending{font-size:13px;line-height:1.9;margin:15px 0;color:var(--ink)}.beat-boundary{border-top:1px solid var(--line);margin-top:18px;padding-top:12px;font-size:11px;line-height:1.8;color:var(--muted)}.beat-boundary summary{cursor:pointer;min-height:32px}.beat-boundary p{max-width:760px}
:root[data-theme=dark] .beat-legend i{background:#ffda86}:root[data-theme=dark] .beat-legend .legend-neighbor{background:#9de3c2}:root[data-theme=dark] .beat-legend .legend-solo{background:none}
@media(max-width:760px){.beat-panel{padding:16px;margin-bottom:16px}.beat-heading{display:block}.beat-heading h2{font-size:21px}.beat-heading p:last-child{font-size:12px}.beat-panel #beat-open{margin-top:12px}.beat-body{margin-top:16px}.beat-case-row{display:block}.beat-cases{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.beat-cases button{padding:9px 4px;font-size:11px}#beat-progress{display:block;margin-top:9px}.beat-boards{gap:8px}.beat-boards article{padding:10px 6px}.beat-boards h3{font-size:10px}.beat-boards svg{max-height:210px}.beat-legend{font-size:10px;gap:6px 12px;margin:10px 0 14px}#beat-context{font-size:12px}.beat-guesses{gap:6px}.beat-guesses button{padding:8px 3px;font-size:11px}.beat-result{padding:12px}.beat-result h3{font-size:14px}.beat-result p{font-size:12px}.beat-timeline label{display:block}.beat-timeline output{display:block}.beat-ending{font-size:12px}}
@media(orientation:landscape) and (max-height:520px) and (min-width:700px){
 .beat-body{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:8px 16px}
 .beat-case-row,#beat-context,.beat-ending,.beat-boundary{grid-column:1/-1}
 #beat-context{margin:3px 0;font-size:12px}.beat-boards{grid-column:1;grid-row:3/6;gap:8px}.beat-boards article{padding:10px 6px}.beat-boards h3{font-size:10px}.beat-boards svg{max-height:180px}
 .beat-result,.beat-guess-panel{grid-column:2;grid-row:3}.beat-result{padding:10px}.beat-result h3{font-size:13px}.beat-result p{font-size:11px;line-height:1.7}
 .beat-actions{grid-column:2;grid-row:4;margin:0;gap:6px}.beat-actions button{padding:8px 10px;font-size:11px}.beat-timeline{grid-column:2;grid-row:5;margin:0}.beat-timeline label{display:block;font-size:10px}.beat-timeline output{display:block}
 .beat-legend{grid-column:1;grid-row:6;margin:0;font-size:10px;gap:5px 10px}.beat-ending{margin:4px 0;font-size:11px}.beat-boundary{margin-top:4px}
}
@media(forced-colors:active){.beat-boards article{background:Canvas;color:CanvasText;border-color:CanvasText}.beat-boards svg text{fill:CanvasText}.beat-ring,.beat-ticks line{stroke:GrayText}.beat-actual{stroke:CanvasText}.beat-neighbor{stroke:LinkText}.beat-solo{stroke:GrayText}.beat-pin{fill:CanvasText;stroke:Canvas}.beat-legend i{background:CanvasText}.beat-legend .legend-neighbor{background:LinkText}}

.cat-beat{grid-column:1/-1;min-width:0;margin-top:18px;padding:0 16px 2px;border:1px solid var(--line);border-radius:10px;background:var(--soft);color:var(--ink)}
.cat-beat[open]{padding-bottom:16px}
.cat-beat summary{min-height:44px;padding:12px 0;line-height:1.45;font-size:14px;font-weight:650;cursor:pointer}
.cat-beat summary:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.cat-beat-stage{display:grid;grid-template-columns:clamp(42px,10vw,78px) minmax(0,1fr);gap:0 12px;align-items:end;max-width:550px;margin:2px 0 10px}
.cat-beat-stage>p{grid-column:1/-1}
.cat-beat-stage img{display:block;width:100%;height:auto;max-height:96px;object-fit:contain;align-self:end}
.cat-beat p{font-size:13px;line-height:1.65;margin:8px 0;color:var(--ink)}
.cat-beat svg{display:block;width:100%;max-width:325px;height:auto;color:var(--ink);overflow:visible}
.cat-beat svg text{fill:currentColor;text-anchor:middle;font:650 20px system-ui,sans-serif}
.cat-beat-range{fill:var(--paper);stroke:var(--muted);stroke-dasharray:3 3}
.cat-beat-relay{fill:none;stroke:var(--ink);stroke-width:2;stroke-dasharray:2 3}
.cat-beat-source,.cat-beat-marker.heard{fill:var(--ink);stroke:var(--ink)}
.cat-beat-marker{fill:var(--paper);stroke:var(--ink);stroke-width:2}
.cat-beat #cat-beat-try{font-weight:650}
#cat-beat-status:empty{margin:0}
.cat-beat-table{width:100%;max-width:470px;border-collapse:collapse;margin:10px 0;font-size:13px;font-variant-numeric:tabular-nums}
.cat-beat-table caption{text-align:left;font-size:12px;margin:0 0 5px;font-weight:650}
.cat-beat-table :is(th,td){border-bottom:1px solid var(--line);padding:6px 8px;text-align:left}
.cat-beat-table :is(th,td):not(:first-child){white-space:nowrap}
.cat-beat-table th span{font-weight:400;color:var(--muted)}
.cat-beat .cat-beat-note{font-size:12px;color:var(--muted)}
@media(max-width:480px){.cat-beat{padding-inline:10px}.cat-beat-stage{column-gap:8px}.cat-beat-table :is(th,td){padding-inline:4px}.cat-beat-table th span{display:block;font-size:11px}}
@media(forced-colors:active){.cat-beat-range{fill:Canvas;stroke:GrayText}.cat-beat-relay{stroke:CanvasText}.cat-beat-marker{fill:Canvas;stroke:CanvasText}.cat-beat-source,.cat-beat-marker.heard{fill:CanvasText;stroke:CanvasText}}
