.acoustics-page { --paper: #fff; --shadow-soft: 0 8px 24px rgba(20,55,54,.07); }
[hidden] { display: none !important; }
.mobile-home { display: none; }
.lab-hero { padding-block: 44px 36px; }
.lab-hero .eyebrow { margin-bottom: 12px; }
.lab-hero h1 { font-size: clamp(36px,3.6vw,52px); }
.hero-aside { color: var(--ink-soft); line-height: 1.9; font-size: 13px; margin-bottom: 8px; }
.lab-gallery { height: 330px; }
.lab-gallery .gallery-card { min-width: 0; }
.lab-gallery .gallery-card.is-active { min-width: 320px; }
.lab-gallery .card-bottom { left: 24px; right: 24px; bottom: 26px; }
.lab-gallery .card-bottom h2 { display: none; white-space: normal; text-wrap: balance; }
.lab-gallery .is-active h2 { display: block; font-size: clamp(24px,2.1vw,31px); }
.lab-gallery .card-detail > p { white-space: normal; font-size: 12px; margin-top: 12px; }
.lab-gallery .card-detail .source-line { font-size: 10px; color: #c6d9d4; line-height: 1.6; margin-top: 8px; }
.lab-gallery .card-actions { margin-top: 18px; gap: 8px; flex-wrap: wrap; }
.lab-gallery .card-action { min-height: 44px; gap: 12px; padding-inline: 15px; }
.lab-gallery .card-number { position: absolute; top: 20px; left: 23px; font: 20px "Songti SC",serif; opacity: .7; pointer-events: none; }
.card-compact-title { writing-mode: vertical-rl; position: absolute; left: 50%; bottom: 27px; transform: translateX(-50%); font-size: 18px; letter-spacing: .12em; pointer-events: none; }
.is-active .card-compact-title { display: none; }
.lab-gallery .signal-lines { position: absolute; top: 30px; right: 16px; width: 160px; height: 70px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.lab-gallery .is-active .signal-lines { opacity: .38; }
.lab-gallery .gallery-card:nth-child(4n) .gallery-image { object-position: 25% 50%; }
.lab-gallery .gallery-card:nth-child(5n) .gallery-image { object-position: 75% 35%; }
.lab-gallery .gallery-card:nth-child(n+4) { animation-delay: .18s; }
.workbench { padding-top: 42px; margin-bottom: 64px; scroll-margin-top: 24px; }
.bench-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.bench-heading h2 { font-size: 28px; font-weight: 550; letter-spacing: -.03em; margin-top: 8px; }
.bench-heading p:not(.eyebrow) { font-size: 13px; color: var(--ink-soft); margin-top: 12px; line-height: 1.8; }
.bench-heading > button { flex-shrink: 0; }
.bench-grid { display: grid; grid-template-columns: minmax(280px,.85fr) minmax(0,1.15fr); gap: 24px; align-items: start; }
.parameter-panel,.sound-panel { padding: 24px; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-soft); min-width: 0; }
.matching-intro { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.matching-intro span:first-child { color: var(--teal-700); }
.field { margin-bottom: 24px; }
.field > label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 13px; font-weight: 550; }
.field > label > span { font-weight: 400; color: var(--muted); }
input,select { font: inherit; color: var(--ink); max-width: 100%; }
select,input[type=number] { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); background: var(--canvas); border-radius: 10px; font-size: 14px; }
input[type=range] { width: 100%; height: 32px; margin: 8px 0 0; accent-color: var(--teal-700); cursor: pointer; }
.realtime-mode input[type=range] { height: 44px; }
input[type=file] { width: 100%; font-size: 12px; }
.file-picker { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; align-items: center; }
.file-picker span { font-size: 12px; overflow-wrap: anywhere; color: var(--ink-soft); }
.file-picker #selectedFilename { font-size: 13px; color: var(--ink); line-height: 1.6; }
.file-picker-actions { display: flex; align-items: center; gap: 12px; }
.file-picker-actions > button { white-space: nowrap; }
.frequency-input { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.frequency-input input { min-height: 60px; font-size: 40px; line-height: 1.2; font-weight: 400; letter-spacing: -.04em; border: 0; border-radius: 0; background: transparent; padding: 4px 0; font-variant-numeric: tabular-nums; }
.frequency-input span { color: var(--muted); font-size: 14px; }
.matching-mode .frequency-input input { font-size: clamp(40px,3.8vw,56px); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.frequency-ticks { position: relative; height: 22px; margin-inline: 8px; color: var(--muted); font-size: 10px; }
.frequency-ticks span { position: absolute; transform: translateX(-50%); padding-top: 7px; font-variant-numeric: tabular-nums; }
.frequency-ticks span::before { content: ''; position: absolute; top: 0; left: 50%; height: 4px; width: 1px; background: var(--line); }
.frequency-ticks + .range-labels { margin-top: -15px; pointer-events: none; }
.field-note { font-size: 11px; line-height: 1.8; color: var(--muted); margin-top: 10px; overflow-wrap: anywhere; }
.parameter-note { font-size: 12px; line-height: 1.8; padding: 12px; border-radius: 10px; background: var(--canvas); color: var(--ink-soft); margin-bottom: 24px; }
.parameter-note p + p { margin-top: 8px; }
.primary-button,.quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 10px 15px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1.5; border: 1px solid transparent; transition: background .18s,transform .16s var(--motion-ease); }
.primary-button { background: var(--teal-900); color: white; }
.primary-button:hover { background: var(--teal-700); }
.quiet-button { background: var(--paper); border-color: var(--line); color: var(--teal-900); }
.quiet-button:hover { background: var(--teal-100); }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .4; cursor: not-allowed; }
.generate-actions { display: flex; gap: 12px; }
.generate-actions .primary-button { flex: 1; justify-content: space-between; }
.player-console { overflow-wrap: anywhere; }
.player-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.player-mark { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--canvas); color: var(--teal-700); }
.player-mark svg { width: 28px; height: 28px; stroke-width: 1.8; }
.player-heading-copy { flex: 1; min-width: 0; }
.player-heading h3 { font-size: 18px; font-weight: 600; line-height: 1.5; letter-spacing: -.02em; }
.player-heading p { font-size: 12px; line-height: 1.6; color: var(--ink-soft); margin-top: 4px; }
.player-signal { display: flex; align-items: center; gap: 3px; height: 28px; flex: none; opacity: .45; transition: opacity .18s; }
.player-signal i { display: block; width: 3px; height: 24px; border-radius: 2px; background: var(--teal-700); transform: scaleY(.12); transform-origin: center; }
.player-console.is-playing .player-signal { opacity: 1; }
.player-console.is-playing .player-mark { background: var(--teal-100); }
.player-source { padding: 8px 12px; margin-bottom: 12px; background: var(--canvas); border-radius: 10px; }
.player-source > label { font-size: 11px; margin-bottom: 4px; color: var(--ink-soft); }
.player-source .field-note { margin-top: 4px; }
.player-mode { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 10px; background: var(--canvas); }
.player-mode button { min-width: 0; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--ink-soft); background: transparent; transition: background .18s,transform .16s var(--motion-ease); }
.player-mode button:hover:not(:disabled) { background: var(--teal-100); color: var(--teal-900); }
.player-mode button[aria-pressed=true] { background: var(--paper); color: var(--teal-900); box-shadow: 0 1px 3px rgba(20,55,54,.08); font-weight: 600; }
.player-progress { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 16px; }
.player-progress span { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--teal-700); transform: scaleX(0); transform-origin: left; }
.player-console :focus-visible,.parameter-panel :focus-visible { outline: 2px solid var(--teal-700); outline-offset: 3px; }
.chart-heading,.waveform-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.chart-heading h3,.waveform-heading h3 { font-size: 13px; font-weight: 550; }
.chart-heading > span,.waveform-heading > span { font-size: 10px; color: var(--muted); }
.spectrum-chart { display: block; width: 100%; height: auto; max-height: 240px; margin-top: 12px; overflow: visible; }
.spectrum-chart text { fill: var(--muted); stroke: none; font: 13px "PingFang SC",sans-serif; font-variant-numeric: tabular-nums; }
.spectrum-grid { stroke: var(--line); stroke-width: 1; }
.spectrum-bars { fill: none; stroke: var(--teal-700); stroke-width: 2; }
.spectrum-reference { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 4 5; }
.spectrum-status { color: var(--ink-soft); font-size: 11px; line-height: 1.8; min-height: 20px; }
.spectrum-note { color: var(--muted); font-size: 10px; line-height: 1.8; margin-top: 4px; }
.spectrum-panel.is-active #spectrumState { color: var(--teal-700); }
.band-details { margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.band-details summary { cursor: pointer; min-height: 44px; color: var(--teal-700); font-size: 12px; padding-block: 12px; }
.band-details summary span:last-child { font-size: 10px; color: var(--muted); margin-left: 12px; }
.band-chart { width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.band-chart text { stroke: none; fill: var(--ink-soft); font: 12px "PingFang SC",sans-serif; }
.band-chart .band-fill { fill: var(--teal-100); stroke: none; }
.band-chart .band-line { stroke: var(--teal-700); stroke-width: 2; }
.band-chart .chart-grid { stroke: var(--line); stroke-width: 1; }
.band-caption { color: var(--ink-soft); font-size: 12px; line-height: 1.8; min-height: 22px; }
.waveform-heading { margin-top: 16px; }
.waveform { width: 100%; height: 64px; color: var(--teal-700); margin-top: 8px; }
.wave-baseline { stroke: var(--line); stroke-width: 1; }
.wave-data { stroke: var(--teal-700); stroke-width: 1; }
.audio-status { font-size: 12px; line-height: 1.8; color: var(--ink-soft); min-height: 24px; overflow-wrap: anywhere; }
.audio-status.is-error { color: #a53636; }
.live-matching { margin-top: 12px; }
.live-controls,.player-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 12px; align-items: center; }
.live-controls #liveStartButton,.player-controls #playButton { grid-column: 1 / -1; min-width: 0; width: 100%; }
.live-controls:has(#liveOriginalButton:not([hidden])) #liveStartButton,.player-controls:has(#originalButton:not([hidden])) #playButton { grid-column: 2; }
#liveOriginalButton,#originalButton { grid-column: 1; min-width: 0; width: 100%; }
#liveStopButton,#stopButton { grid-column: 1; justify-self: start; min-width: 76px; }
#liveTime,#playTime { grid-column: 2; justify-self: end; }
.live-status { min-height: 32px; padding-top: 8px; font-size: 12px; line-height: 1.8; color: var(--ink-soft); }
.is-playing .live-status { color: var(--teal-700); }
.is-playing #liveStartButton:disabled { opacity: 1; background: var(--teal-900); cursor: default; }
.live-status.is-error { color: #a53636; }
.match-status { font-size: 11px; line-height: 1.8; color: var(--teal-700); margin-top: 8px; }
.player-controls { margin-top: 12px; }
.live-controls [aria-pressed=true],.player-controls [aria-pressed=true] { box-shadow: 0 0 0 3px var(--teal-100); }
#liveOriginalButton[aria-pressed=true],#originalButton[aria-pressed=true] { background: var(--teal-100); border-color: var(--teal-700); opacity: 1; cursor: default; }
.play-time { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.volume-control { margin-top: 16px; }
.volume-control label { display: flex; justify-content: space-between; font-size: 12px; }
.volume-control output { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.volume-control p { font-size: 10px; color: var(--muted); line-height: 1.8; }
.matching-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.matching-actions .quiet-button { min-width: 0; font-size: 11px; padding-inline: 8px; }
.matching-actions p { flex-basis: 100%; color: var(--teal-700); font-size: 11px; line-height: 1.8; }
.export-panel { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.export-panel h3 { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.export-generate-row { display: grid; grid-template-columns: minmax(104px,.4fr) minmax(0,1fr); align-items: end; gap: 12px; }
.duration-field { margin: 0; }
.duration-field label { font-size: 11px; font-weight: 400; color: var(--ink-soft); margin-bottom: 8px; }
.duration-field select { font-size: 12px; }
.export-generate-row .generate-actions { min-width: 0; gap: 8px; }
.export-generate-row .primary-button { min-width: 0; }
.export-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-top: 8px; }
.export-actions > span { flex-basis: 100%; font-size: 10px; color: var(--muted); }
.text-button { background: transparent; border: 0; color: var(--teal-900); padding: 8px 0; min-height: 44px; font-size: 12px; text-decoration: underline; text-underline-offset: 5px; }
.implementation-details { margin-top: 12px; color: var(--ink-soft); font-size: 11px; line-height: 1.9; }
.implementation-details summary { min-height: 44px; cursor: pointer; display: list-item; padding-block: 12px; color: var(--teal-700); }
.implementation-details p { margin-top: 8px; }
.evidence-dialog,.reading-dialog { border: 0; border-radius: 20px; background: var(--canvas); color: var(--ink); box-shadow: 0 24px 80px rgba(5,42,39,.2); }
.evidence-dialog { width: min(840px,calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 32px; }
.evidence-dialog::backdrop,.reading-dialog::backdrop { background: rgba(7,34,32,.45); backdrop-filter: blur(6px); }
dialog[open] { animation: dialog-enter .22s var(--motion-ease); }
.dialog-close { width: 44px; height: 44px; }
.evidence-dialog h2 { font-size: 26px; margin-top: 16px; font-weight: 550; }
.evidence-dialog h3 { font-size: 16px; margin-top: 28px; }
.evidence-dialog p { font-size: 13px; line-height: 1.9; color: var(--ink-soft); margin-top: 10px; }
.evidence-dialog a { color: var(--teal-700); text-decoration: underline; text-underline-offset: 4px; }
.evidence-paper { padding: 20px; background: white; border-radius: 12px; margin-top: 16px; }
.evidence-paper h4 { font-size: 15px; font-weight: 550; line-height: 1.6; margin: 0; }
.evidence-paper .paper-meta { font-size: 11px; }
.paper-links { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 12px; }
.reading-dialog { width: min(1280px,calc(100vw - 24px)); height: calc(100dvh - 32px); padding: 16px; max-height: none; }
.reading-dialog .dialog-heading { margin-bottom: 12px; }
.reading-dialog h2 { font-size: 17px; margin: 0; }
.reading-dialog iframe { display: block; width: 100%; height: calc(100% - 56px); border: 0; border-radius: 10px; background: white; }
body:has(dialog[open]) { overflow: hidden; }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media(max-width:1100px) {
  .lab-gallery { height: 310px; }
  .lab-gallery .gallery-card.is-active { min-width: 290px; }
  .lab-gallery .card-bottom { left: 20px; right: 20px; }
  .card-compact-title { font-size: 15px; }
  .lab-gallery .card-number { left: 15px; }
  .parameter-panel,.sound-panel { padding: 24px; }
  .bench-grid { gap: 16px; }
}
@media(max-width:760px) {
  .mobile-home { display: block; font-size: 12px; color: var(--teal-700); padding-block: 14px; }
  .lab-hero { padding: 32px 0 28px; }
  .lab-hero h1 { font-size: clamp(32px,8vw,46px); }
  .hero-aside { display: none; }
  .lab-gallery { height: auto; gap: 8px; }
  .lab-gallery .gallery-card { min-height: 76px; flex: none; }
  .lab-gallery .gallery-card.is-active { min-height: 276px; min-width: 0; }
  .card-compact-title { writing-mode: horizontal-tb; transform: none; left: 58px; right: 20px; bottom: 26px; font-size: 16px; letter-spacing: 0; }
  .lab-gallery .card-number { top: 27px; left: 20px; font-size: 16px; }
  .lab-gallery .is-active .card-number { top: 20px; }
  .lab-gallery .is-active h2 { font-size: 27px; }
  .lab-gallery .card-bottom { left: 24px; right: 24px; bottom: 24px; }
  .lab-gallery .is-active .card-bottom { bottom: 24px; }
  .gallery-footer { gap: 8px; font-size: 9px; }
  .gallery-footer > span { display: none; }
  .workbench { padding-top: 28px; margin-bottom: 36px; }
  .bench-heading { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .bench-heading h2 { font-size: 25px; }
  .bench-heading p:not(.eyebrow) { font-size: 12px; }
  .bench-heading > button { font-size: 12px; }
  .bench-grid { grid-template-columns: 1fr; gap: 16px; }
  .frequency-ticks [data-frequency="8000"] { display: none; }
  .spectrum-chart text { font-size: 23px; }
  .spectrum-chart .spectrum-unit { font-size: 20px; }
  .parameter-panel,.sound-panel { padding: 24px; }
  .player-heading { margin-bottom: 16px; }
  .player-heading h3 { font-size: 16px; }
  .player-heading p { font-size: 11px; }
  .player-mark { width: 40px; height: 40px; }
  .player-signal { gap: 2px; }
  .file-picker:has(#useDefaultMusic:not([hidden])) { grid-template-columns: 1fr; }
  .file-picker-actions { gap: 12px; }
  .export-generate-row { grid-template-columns: minmax(92px,.4fr) minmax(0,1fr); gap: 8px; }
  .export-generate-row .generate-actions:has(#cancelButton:not([hidden])) { flex-wrap: wrap; }
  .export-generate-row #cancelButton { flex: 1; }
  .band-chart { min-height: 110px; }
  .evidence-dialog { padding: 24px; }
  .evidence-dialog h2 { font-size: 23px; }
  .evidence-paper { padding: 16px; }
  .reading-dialog { width: 100vw; max-width: 100vw; height: 100dvh; padding: 0; border-radius: 0; }
  .reading-dialog .dialog-heading { padding: 12px 16px; margin-bottom: 0; }
  .reading-dialog iframe { height: calc(100% - 68px); border-radius: 0; }
}
@media(max-width:360px) { .parameter-panel,.sound-panel { padding: 16px; } .play-time { font-size: 11px; } .lab-gallery .is-active h2 { font-size: 24px; } .player-signal { display: none; } .matching-actions { gap: 4px; } .matching-actions .quiet-button { padding-inline: 4px; font-size: 10px; } }
@media(prefers-reduced-motion:reduce) { dialog[open] { animation: none; } .player-console button,.player-signal { transition: none; } .player-console button:active:not(:disabled) { transform: none; } }
