:root { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #193942; background: #f1f6f6; line-height: 1.6; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); }
header { background: #104c58; color: #fff; padding: 32px 0; border-bottom: 5px solid #58c6b0; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: auto; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.2; margin: 8px 0; }
h2 { font-size: 1.15rem; margin: 0; }
.eyebrow { letter-spacing: .15em; font-size: .75rem; font-weight: 700; }
main { padding: 18px 0 40px; }
html { scroll-padding-top: 110px; }
main > * { min-width: 0; }
[hidden] { display: none !important; }
details > summary { cursor: pointer; font-weight: 700; padding: 4px 0; min-height: 36px; }
details[open] > summary { margin-bottom: 16px; }
.transport { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: #fff; padding: 10px 0; border-bottom: 1px solid #e1e9eb; }
.transport-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 14px; margin: 12px 0 18px; }
.transport-buttons { display: flex; gap: 8px; }
.transport-buttons button { flex: 1; min-height: 48px; min-width: 80px; white-space: nowrap; }
.score-panel { padding-top: 0; }
.score-panel h1 { font-size: 1.15rem; margin: 0; }
.score-panel .brand { font-size: .85rem; color: #096e5f; letter-spacing: .08em; margin: 0 0 6px; }
.language-picker { display: flex; justify-content: center; gap: 10px; align-items: center; margin: 20px 0 12px; font-size: .9rem; }
.score-picker { display: flex; align-items: center; gap: 8px; min-width: 0; }
.score-picker > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.score-picker select { width: clamp(125px, 25vw, 230px); font-weight: 650; }
.transport > .toolbar { flex-wrap: nowrap; gap: 8px; }
.score-panel #score { margin-top: 8px; }
.transport-grid > label, .option-grid > label { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; }
.range-control { display: flex; align-items: center; gap: 8px; min-width: 0; }
.range-control input[type=range] { flex: 1; min-width: 0; width: 100%; margin: 0; min-height: 44px; }
.range-control output { min-width: 58px; font-size: .9rem; }
.transport .live { margin: 8px 0 0; padding: 7px 10px; font-size: .9rem; }
.playback-status { display: flex; gap: 8px; align-items: center; min-height: 42px; }
.playback-status .live { flex: 1; min-width: 0; margin: 0; }
.spinner { width: 18px; height: 18px; flex: 0 0 18px; border: 2px solid #d5e2e3; border-top-color: #096e5f; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-style: dotted; } }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.option-grid .checkbox-label { flex-direction: row; align-items: center; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: #096e5f; flex-shrink: 0; }
.panel { background: #fff; border: 1px solid #d5e2e3; border-radius: 14px; padding: 22px; margin-bottom: 18px; box-shadow: 0 4px 20px #123e4806; }
.toolbar, .controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.toolbar { justify-content: space-between; }
label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
input, select, button { font: inherit; }
input[type=range] { accent-color: #087866; width: 130px; }
input[type=file] { max-width: 100%; font-size: .85rem; }
select { max-width: 100%; padding: 7px; border: 1px solid #a7bfc4; border-radius: 6px; }
button { border: 1px solid #9dbabf; background: #fff; color: #154e59; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; min-height: 44px; min-width: 44px; }
select, input[type=file] { min-height: 44px; font-size: 1rem; }
button:hover:enabled { background: #e7f4f1; }
button.primary { background: #096e5f; color: white; border-color: #096e5f; }
button.primary:hover:enabled { background: #075548; }
button:disabled, input:disabled, select:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 3px solid #bf6806; outline-offset: 3px; }
output { min-width: 65px; font-variant-numeric: tabular-nums; }
#status { margin: 0 0 14px; padding: 12px; background: #eaf5f3; border-radius: 7px; overflow-wrap: anywhere; }
#status.error { background: #fff0ec; color: #942e19; }
#score { margin-top: 20px; min-height: 160px; overflow-x: auto; }
#score svg { max-width: none; }
.playback { margin-top: 16px; }
.muted { color: #506a72; font-size: .88rem; }
.live { background: #edf6f5; border-left: 3px solid #11917c; padding: 12px; }
.tablewrap { overflow: auto; margin-top: 20px; }
.noteswrap { max-height: 530px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
caption { text-align: left; color: #506a72; padding: 0 0 10px; }
td, th { padding: 9px 12px; border-bottom: 1px solid #e1e9eb; text-align: left; white-space: nowrap; }
th { background: #ecf3f4; position: sticky; top: 0; }
tr.active { background: #d7efe8; }
td button { padding: 3px 10px; }
a { color: #076954; }
.details { font-size: .92rem; }
.check-list { padding-left: 24px; }
.check-list li { padding: 7px 0; overflow-wrap: anywhere; }
.check-list .pass { color: #096e5f; }
.check-list .fail { color: #942e19; }
.diagnostic-summary { font-weight: 650; }
@media (max-width: 600px) {
  header { padding: 18px 0; }
  header p:last-child { font-size: .9rem; }
  .panel { padding: 14px; }
  .wrap { width: calc(100% - 20px); }
  .controls { gap: 10px; }
  .file { display: block; max-width: 100%; }
  input[type=range] { width: 110px; }
  .transport { padding: 8px 0; }
  .transport-buttons button { min-width: 64px; padding: 8px 12px; }
  .score-panel { padding-top: 0; }
  .transport-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; margin-top: 8px; }
  .transport-buttons { grid-column: 1 / -1; }
  .transport-grid > label { font-size: .85rem; gap: 0; }
  .range-control { gap: 4px; }
  .range-control output { min-width: 52px; font-size: .8rem; }
  .option-grid { grid-template-columns: minmax(0, 1fr); }
  .zoom-controls { gap: 8px; }
  .zoom-controls label { gap: 5px; }
  .tablewrap { overscroll-behavior-x: contain; }
}
@media (max-height: 450px) { .transport { position: static; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

#status:empty { display: none; }
.update-button { margin-bottom: 16px; }
.credits { color: #506a72; font-size: .8rem; text-align: center; padding: 8px 0; }
