/* Bannerbruch 3.6.5: equal-size fourth action and mobile-only collapsing audio. */
/* The fourth action shares the same grid, spacing, and height on all screens. */
#controls { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items:stretch; }
#controls > button { width:100%; height:56px; min-height:56px; box-sizing:border-box; margin:0; }
#controls > .action-end-turn {
  display:flex; align-items:center; justify-content:center; gap:5px;
  font:inherit; font-size:12px; font-weight:800; line-height:1.25;
  padding:12px 9px; border-radius:10px; letter-spacing:.15px;
  background:linear-gradient(165deg,#f0d58e,#c19340);
  border:1px solid #ffe2a1; color:#1d262a;
  text-shadow:none; box-shadow:inset 0 1px 0 #fff9,0 3px 10px #0005;
}
#controls > .action-end-turn:disabled { opacity:.48; }
/* Desktop and tablet: always show controls, no collapse button. */
.sound-panel { display:flex; align-items:center; min-width:0; }
.sound-panel-toggle { display:none!important; }
.sound-panel .sound-controls { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:flex-end; }
.sound-panel .sound-controls #trackSelect { max-width:205px; }
/* Phone: compact header, closed by default. */
@media (max-width:720px) {
  .topbar { flex-wrap:wrap; align-items:center; }
  .topbar .header-right { display:flex; flex:1 1 auto; align-items:center; justify-content:flex-end; gap:7px; }
  .topbar .sound-panel { width:100%; display:flex; flex-direction:column; align-items:stretch; order:5; }
  .topbar .sound-panel-toggle {
    display:flex!important; width:100%; min-height:40px; align-items:center; justify-content:center;
    gap:14px; padding:8px 13px; border-radius:11px;
    font-size:13px; font-weight:800; letter-spacing:.2px;
    color:#ffe4ad; border:1px solid #a3834e;
    background:linear-gradient(165deg,#314657,#142631);
  }
  .sound-panel-chevron { display:inline-block; transition:transform .18s ease; }
  .sound-panel.expanded .sound-panel-chevron { transform:rotate(180deg); }
  .topbar .sound-panel .sound-controls { display:none!important; }
  .topbar .sound-panel.expanded .sound-controls {
    display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px; width:100%; padding:9px 0 1px;
    align-items:stretch;
  }
  .topbar #trackSelect {
    grid-column:1 / -1; width:100%; max-width:none!important; min-height:43px;
    font-size:13px; padding:8px 10px; text-overflow:ellipsis;
  }
  .topbar #musicToggle,.topbar #effectsToggle { width:100%; font-size:12px; min-height:41px; }
  #controls { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  #controls > button { height:56px; min-height:56px; font-size:12px; }
}
@media(prefers-reduced-motion:reduce) { .sound-panel-chevron { transition:none; } }
