/* Satin champagne-metal knobs; lighting stays fixed while the index rotates. */
.radio .twin-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 64px;
  width: 100%;
}
.radio .twin-controls .knob-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.radio .twin-controls .rotary-unit {
  position: relative;
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  max-width: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.radio .twin-controls .knob {
  position: relative;
  inset: auto;
  width: 76%;
  height: 76%;
  margin: 0;
  border-radius: 50%;
  border: 1px solid #9b907d;
  background: #c5bcaa !important;
  cursor: grab;
  touch-action: none;
  isolation: isolate;
  transform: none;
  box-shadow:
    0 8px 12px #55473430,
    0 2px 3px #3c322744,
    0 0 0 3px #b9ad9333;
}
.radio .twin-controls .knob::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: 50%;
  transform: none;
  background: conic-gradient(
    from 25deg,
    #b5aa95,
    #f4eee1 18%,
    #a19784 32%,
    #d1c7b4 47%,
    #faf4e7 65%,
    #aa9f8b 82%,
    #b5aa95
  );
  box-shadow:
    inset 0 1px 1px #fff9,
    inset 0 -1px 1px #63584577;
  pointer-events: none;
}
.radio .twin-controls .knob::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid #eae1ce;
  background:
    radial-gradient(ellipse at 32% 20%, #ffffff50, transparent 65%),
    linear-gradient(145deg, #e4dfd3, #c4bdaf 55%, #ded6c6);
  box-shadow:
    inset 0 1px 3px #fff8,
    inset 0 -2px 4px #76695133,
    0 1px 2px #5d514733;
  pointer-events: none;
}
.radio .twin-controls .knob .pointer {
  position: absolute;
  z-index: 2;
  inset: 14%;
  border-radius: 50%;
  background: none;
  opacity: 1;
  pointer-events: none;
}
.radio .twin-controls .knob .pointer::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: calc(50% - 1.5px);
  width: 3px;
  height: 17%;
  border-radius: 3px;
  background: #c77e27;
  box-shadow:
    1px 0 1px #fff9,
    -1px 0 1px #54433255;
}
.radio .twin-controls #content-pointer::before {
  background: #276786;
}
.radio .twin-controls .knob:focus-visible {
  outline: 2px solid #9d713a;
  outline-offset: 5px;
}
.radio .twin-controls .knob.turning {
  cursor: grabbing;
  box-shadow:
    0 5px 9px #55473435,
    0 2px 3px #3c322744,
    0 0 0 3px #b9ad9333;
}
.radio .twin-controls .knob-scale {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.radio .twin-controls .knob-scale line {
  stroke: #897d67;
  stroke-width: 0.7;
}
.radio .twin-controls .knob-scale .ring-major {
  stroke: #544b3b;
  stroke-width: 1.3;
}
.radio .twin-controls .knob-scale text {
  fill: #63563f;
  font:
    8px Arial,
    sans-serif;
  text-anchor: middle;
}
.wheel-label {
  color: #372f24;
  font:
    400 11px/1.3 "Segoe UI",
    Arial,
    sans-serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 1px #fff6;
}
.night-mode .radio .twin-controls .knob::after {
  background: conic-gradient(
    from 25deg,
    #a18b65,
    #ddc69e 18%,
    #8c7858 32%,
    #c5ae86 47%,
    #e6d1ab 65%,
    #98805b 82%,
    #a18b65
  );
}
.night-mode .radio .twin-controls .knob::before {
  background:
    radial-gradient(ellipse at 32% 20%, #ffe6ac44, transparent 65%),
    linear-gradient(145deg, #d3c2a0, #afa084 55%, #cebb96);
  border-color: #d8c7a6;
}
.night-mode .wheel-label {
  color: #392c1c;
}
@media (max-width: 600px), (pointer: coarse) {
  .radio .twin-controls .rotary-unit {
    width: min(36vw, 150px);
    height: min(36vw, 150px);
  }
}
@media (max-height: 600px) {
  .radio .twin-controls .rotary-unit {
    width: 112px;
    height: 112px;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.night-mode .control-value {
  color: #664b28;
  text-shadow: 0 1px #eac68d66;
}
@media (pointer: coarse),
  (max-width: 600px),
  (max-width: 950px) and (max-height: 500px) {
  .radio {
    grid-template-rows: auto minmax(140px, 1fr) auto auto;
  }

  .control-value {
    font-size: 9px;
  }
  .radio .printed-numbers span:nth-child(even) {
    visibility: visible;
  }
}

@media (max-height: 600px) and (orientation: landscape) and (max-width: 950px) {
  .radio {
    grid-template-rows: auto minmax(100px, 1fr) auto;
  }
  .radio .double-dial {
    grid-row: 2;
  }
  .radio .lower {
    grid-row: 2;
  }
  .radio-bottom-row {
    grid-row: 3;
  }
}
/* The two carriages meet the same scale from opposite sides. */
.radio .shared-dial {
  height: 230px;
}
.radio .unified-scale {
  height: 100%;
}
.radio .unified-scale .graduations {
  top: 54%;
  bottom: auto;
  height: 24px;
}
.radio .unified-scale .printed-numbers {
  top: calc(54% + 32px);
  bottom: auto;
}
.radio .unified-scale #band-needle {
  left: 50%;
  top: 0;
  bottom: calc(46% - 12px);
  background: #c77e27;
  color: #c77e27;
}
.radio .unified-scale #needle {
  top: calc(54% + 12px);
  bottom: 0;
  background: #276786;
  color: #276786;
}
.radio .unified-scale .needle {
  box-shadow: 1px 0 2px #49361822;
  opacity: 0.78;
}
.radio[data-control="topics"] .unified-scale #band-needle,
.radio[data-control="content"] .unified-scale #needle {
  opacity: 1;
  width: 3px;
}
.night-mode .on .unified-scale #band-needle {
  background: #e7a346;
  color: #8c461c;
  box-shadow: 0 0 6px #dd914555;
}
.night-mode #topics-pointer::before {
  background: #e7a346;
}
.motion-toggle,
.motion-help {
  display: none;
}
@media (pointer: coarse),
  (max-width: 600px),
  (max-width: 950px) and (max-height: 500px) {
  .radio .motion-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-height: 30px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #ab967345;
    border-radius: 20px;
    background: transparent;
    color: #796b55;
    font:
      8px/1.3 Arial,
      sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    max-width: 100%;
    cursor: pointer;
  }
  .motion-toggle::before {
    content: "";
    flex: 0 0 5px;
    height: 5px;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
  }
  .motion-toggle[aria-pressed="true"]::before {
    background: #ffc075;
    box-shadow: 0 0 8px #ffa04455;
  }
  .motion-toggle[aria-busy="true"]::before {
    border-style: dotted;
  }
  .motion-toggle[aria-pressed="true"] {
    color: #835025;
    border-color: #9c855655;
  }
  .night-mode .radio .motion-toggle {
    color: #835025;
    border-color: #9c855655;
  }
  .radio .motion-toggle:hover {
    border-color: currentColor;
  }
  .motion-toggle:focus-visible {
    outline: 2px solid #a66527;
    outline-offset: 2px;
  }
  .motion-help {
    display: block;
    margin-bottom: 16px;
  }
  .motion-help h3 {
    margin-top: 0;
  }
}
.night-mode .on .unified-scale #needle {
  background: #3788b0;
  color: #225974;
  box-shadow: 0 0 4px #3797c555;
}
.shared-help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 24px 0;
}
.two-thumbs-help {
  display: none;
}
.two-thumbs-demo {
  display: block;
  width: min(240px, 100%);
  height: auto;
  margin: 0 auto;
  fill: none;
  stroke: #9b8a6d;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.thumb-topics {
  stroke: #b87325;
}
.thumb-content {
  stroke: #276786;
}
.thumb-drag {
  fill: #efe7d7;
}
.thumb-arrow {
  fill: none;
}
.thumb-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
  font:
    11px/1.5 Arial,
    sans-serif;
}
.thumb-labels span:first-child {
  color: #9d611c;
}
.thumb-labels span:last-child {
  color: #276786;
}
#help-dialog[open] .thumb-drag {
  animation: demonstrate-thumbs 2.6s ease-in-out infinite alternate;
}
@keyframes demonstrate-thumbs {
  from {
    transform: translateX(-5px);
  }
  to {
    transform: translateX(5px);
  }
}
@media (prefers-reduced-motion: reduce) {
  #help-dialog[open] .thumb-drag {
    animation: none;
  }
}
@media (pointer: coarse),
  (max-width: 600px),
  (max-width: 950px) and (max-height: 500px) {
  .two-thumbs-help {
    display: block;
    grid-column: 1 / -1;
  }
  .desktop-knob-help {
    display: none;
  }
}
.shared-help-card {
  padding: 18px;
  border: 1px solid #a795722e;
  border-radius: 12px;
  background: #f8f2e52b;
}
.shared-help-card h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 16px 0 8px;
}
.shared-help-card p {
  font:
    13px/1.7 Arial,
    sans-serif;
  color: #71614c;
  margin: 0;
}
.shared-demo {
  display: flex;
  align-items: center;
  min-height: 32px;
  color: #9c6a36;
  font:
    11px/1.5 Arial,
    sans-serif;
  letter-spacing: 0.1em;
}
.shared-demo svg {
  width: 48px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
.demo-hand {
  transform-origin: 24px 24px;
  stroke-width: 2;
  stroke-linecap: round;
}
#help-dialog[open] .demo-hand {
  animation: demonstrate-turn 3s ease-in-out infinite alternate;
}
#help-dialog[open] .demo-fingers {
  animation: demonstrate-scroll 2s ease-in-out infinite alternate;
}
@keyframes demonstrate-turn {
  from {
    transform: rotate(-50deg);
  }
  to {
    transform: rotate(70deg);
  }
}
@keyframes demonstrate-scroll {
  from {
    transform: translateY(-4px);
  }
  to {
    transform: translateY(4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  #help-dialog[open] .demo-hand,
  #help-dialog[open] .demo-fingers {
    animation: none;
  }
}
@media (pointer: coarse),
  (max-width: 600px),
  (max-width: 950px) and (max-height: 500px) {
  .radio .shared-dial {
    height: 100%;
  }
  .radio .unified-scale #band-needle {
    top: 0;
  }
  .radio .unified-scale .printed-numbers {
    top: calc(54% + 25px);
  }
  .shared-help-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 0;
  }
  .shared-help-card {
    padding: 12px;
  }
  .shared-help-card p {
    font-size: 12px;
  }
}

.scale-legend {
  position: absolute;
  z-index: 2;
  left: 0;
  font:
    400 10px/1.3 "Segoe UI",
    Arial,
    sans-serif;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: #3f3528;
  pointer-events: none;
}
.scale-legend span {
  padding: 0;
  background: none;
}
.topics-legend {
  top: 12px;
}
.content-legend {
  bottom: 12px;
}
.radio .unified-scale .loaded-idea {
  z-index: 2;
  color: #403327;
}
.night-mode .scale-legend {
  color: #3c2f1e;
}
@media (pointer: coarse),
  (max-width: 600px),
  (max-width: 950px) and (max-height: 500px) {
  .radio .twin-controls {
    gap: 32px;
  }

  .radio .twin-controls .knob-wrap {
    gap: 10px;
  }
  .wheel-label {
    font-size: 10px;
  }
  .scale-legend {
    font-size: 8px;
  }
  .topics-legend {
    top: 8px;
  }
  .content-legend {
    bottom: 8px;
  }
}
@media (max-width: 350px), (max-height: 500px) {
  .radio .twin-controls {
    gap: 26px;
  }
}

/* Keep the glass an instrument window rather than a full-height panel. */
@media (orientation: portrait) and (max-width: 600px),
  (orientation: portrait) and (pointer: coarse) {
  .radio {
    grid-template-rows: auto minmax(140px, min(34dvh, 280px)) auto auto;
    align-content: space-between;
  }
  .radio .shared-dial {
    max-height: 280px;
  }
}
@media (orientation: portrait) and (max-height: 700px) and (max-width: 600px),
  (orientation: portrait) and (max-height: 700px) and (pointer: coarse) {
  .radio {
    grid-template-rows: auto minmax(120px, 1fr) auto auto;
  }
  .radio .shared-dial {
    max-height: 240px;
    align-self: center;
  }
}

.radio .haptic-toggle:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  grid-column: 1 / -1;
  min-height: 30px;
  margin: 0;
  padding: 6px 12px;
  font-size: 8px;
}
.radio .haptic-toggle[hidden] {
  display: none;
}
.radio .haptic-toggle::before {
  background: transparent;
  box-shadow: none;
}
.radio .haptic-toggle[aria-pressed="true"]::before {
  background: #ffc075;
  box-shadow: 0 0 6px #ffa04455;
}
