:root { --bg:#f7f7f9; --panel:#fff; --ink:#1d1d1f; --muted:#666; --accent:#2b6cb0; --ok:#2f855a; --warn:#b7791f; --bad:#c53030; }
* { box-sizing: border-box; }
body { margin:0; font-family: -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; background:var(--bg); color:var(--ink); }
header { display:flex; align-items:center; gap:12px; padding:14px 22px; background:#fff; border-bottom:1px solid #e5e5ea; }
h1 { font-size:18px; margin:0; } h2 { font-size:15px; margin:0 0 10px; color:var(--accent); } h3 { font-size:13px; margin:14px 0 6px; color:var(--muted); }
main { max-width: 1040px; margin: 0 auto; padding: 16px; display:flex; flex-direction:column; gap:14px; }
.panel { background:var(--panel); border:1px solid #e5e5ea; border-radius:10px; padding:16px; }
.row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:8px 0; }
.row.small { font-size:12px; color:var(--muted); }
select, textarea, button { font-size:14px; padding:8px 10px; border-radius:8px; border:1px solid #ccc; }
select#sentenceSelect { flex:1; min-width:280px; }
textarea { width:100%; }
button { background:var(--accent); color:#fff; border:none; cursor:pointer; }
button.secondary { background:#eee; color:#333; }
button:disabled { opacity:.45; cursor:default; }
#recBtn { background:var(--bad); } #stopBtn { background:#444; }
.status { color:var(--muted); font-size:13px; }
.badge { font-size:12px; padding:3px 8px; border-radius:999px; background:#eee; color:#555; }
.badge.on { background:#e6fffa; color:#2c7a7b; }
.karaoke { font-size:22px; line-height:1.7; min-height:40px; margin-top:8px; }
.karaoke span { padding:2px 4px; border-radius:6px; transition: background .08s; }
.karaoke span.active { background:#fefcbf; }
.scores { display:flex; gap:10px; flex-wrap:wrap; }
.score { flex:1; min-width:120px; background:#f3f6fb; border-radius:10px; padding:10px; text-align:center; }
.score .label { font-size:12px; color:var(--muted); } .score .value { font-size:28px; font-weight:600; }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; }
.chip { padding:6px 10px; border-radius:8px; font-size:16px; cursor:pointer; border:1px solid transparent; }
.chip.ok { background:#e6f4ea; color:#1e4620; } .chip.warn { background:#fff3cd; color:#5c4400; } .chip.bad { background:#fde2e2; color:#7a1d1d; }
.chip.skipped { text-decoration: line-through; opacity:.7; }
.chip .sub { display:block; font-size:10px; color:#555; }
.chip.selected { border-color:#333; }
.flags { margin:8px 0; padding-left:18px; } .flags li { margin:3px 0; }
.flags li.pitch_direction, .flags li.pitch_level { color:#7b341e; } .flags li.monotone { color:#7b341e; font-weight:600; }
.flags li.skipped, .flags li.pronunciation { color:#7a1d1d; } .flags li.unexpected_pause, .flags li.missing_pause, .flags li.duration { color:#5c4400; }
canvas { width:100%; height:auto; background:#fbfbfd; border:1px solid #e5e5ea; border-radius:8px; }
pre { font-size:11px; white-space:pre-wrap; background:#f6f6f6; padding:10px; border-radius:8px; max-height:340px; overflow:auto; }
.feedback { margin-top:12px; padding:12px; background:#f0fff4; border-radius:8px; font-size:14px; white-space:pre-wrap; }

.flags li.linking_ok { color:#276749; } .flags li.linking_hint, .flags li.reduction_hint { color:#2c5282; }

.flags li.mismatch { color:#7a1d1d; font-weight:600; }

.score-sheet { background:#fff; border:1px solid #e5e5ea; border-radius:8px; padding:6px; overflow-x:auto; }
.score-sheet svg { max-width:100%; }
.abcjs-note.hl path, .abcjs-note.hl { fill:#dd6b20 !important; stroke:#dd6b20 !important; }
.abcjs-note.dev-late path, .abcjs-note.dev-late { fill:#c53030 !important; }
.abcjs-note.dev-early path, .abcjs-note.dev-early { fill:#2b6cb0 !important; }
#metroBtn.on { background:#2f855a; color:#fff; }

.chip.playing { outline: 2px solid #dd6b20; }
#playbar button { padding:6px 10px; }

.speedrow { background:#f3f6fb; border-radius:8px; padding:6px 10px; }
.speedrow input[type=range] { width:140px; vertical-align:middle; }
.speedquick button { padding:4px 8px; margin:0 2px; font-size:12px; }
.speedquick button.on { background:var(--accent); color:#fff; }
.ladder { display:inline-flex; gap:4px; margin-left:6px; }
.ladder span { padding:3px 7px; border-radius:999px; font-size:12px; background:#e9ecf3; color:#555; }
.ladder span.cleared { background:#c6f6d5; color:#1e4620; }
.ladder span.current { outline:2px solid var(--accent); font-weight:600; }
