.nav { gap: 1rem; }
.nav .brand { margin-right: auto; }
.mode-switch, .passage-control { font: 500 .875rem/1.25 system-ui, sans-serif; letter-spacing: normal; }
.mode-switch { display: inline-flex; gap: 2px; border: 1px solid #ccc6b9; border-radius: 24px; padding: 2px; }
.mode-switch button { border: 0; background: transparent; color: #514c43; padding: .42rem .85rem; border-radius: 20px; cursor: pointer; }
.mode-switch button[aria-pressed=true] { background: #302d28; color: white; }
.mode-switch button:focus-visible, .passage-control select:focus-visible { outline: 2px solid #8c552a; outline-offset: 2px; }
.music-player { max-width: 1120px; margin: auto; padding: clamp(14px,3vh,30px) clamp(16px,4vw,44px) 26px; }
.player-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: clamp(12px,2vh,22px); }
.player-heading h1 { font-size: clamp(1.65rem,4vw,3rem); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -.045em; }
.passage-control { position: relative; color: #443e34; }
.passage-control select { width: 100%; max-width: 17rem; font: inherit; color: inherit; background: #fff; border: 1px solid #d5d0c6; border-radius: 5px; padding: .6rem 1.65rem .6rem .7rem; appearance: none; cursor: pointer; }
.passage-control::after { position: absolute; pointer-events: none; content: ''; right: .72rem; top: 43%; width: .38rem; height: .38rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.performance { text-align: center; }
.projection { position: relative; width: 100%; aspect-ratio: 16 / 9; background: white; border: 1px solid #dedbd4; overflow: hidden; }
#music-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; }
.lyric-space { min-height: 4.65rem; display: grid; place-items: center; padding: .6rem .45rem; }
#lyric { margin: 0; font: 400 clamp(1.2rem,2.7vw,2rem)/1.27 Georgia, 'Times New Roman', serif; text-wrap: balance; color: #26231f; }
#song { width: 100%; display: block; margin: 0 auto; }
#player-error { font: 1rem/1.4 system-ui,sans-serif; text-align:center; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
[hidden] { display:none !important; }
@media(max-width:600px) {
  .nav { flex-wrap:wrap; gap:.55rem; }
  .nav .brand { flex: 1 0 calc(100% - 100px); font-size:.72rem; }
  .nav .lang { order: 0; }
  .mode-switch { order: 1; }
  .player-heading { align-items:flex-start; flex-direction:column; gap:.65rem; }
  .lyric-space { min-height:5.35rem; }
  .chapter { scroll-margin-top: 110px; }
}
@media(max-height:530px) and (orientation:landscape) {
  .music-player { padding-top:8px; padding-bottom:8px; }
  .player-heading { margin-bottom:6px; }
  .player-heading h1 { font-size:1.35rem; }
  .projection { max-width: min(83.556svh, 568.889px); margin-inline: auto; }
  .lyric-space { min-height:2.8rem; }
}
