[data-site-navigation],
.au-channel-remote {
  --nav-lime: #dbff00;
  --nav-teal: #59daca;
  --nav-paper: #f0ecdc;
  --nav-mono: var(--font-mono, ui-monospace, monospace);
}

.au-channel-remote, .au-remote-dock, .au-guide, .au-guide-avatar {
  box-sizing: border-box;
}

.au-channel-remote.tv-side-rail {
  display: grid;
  position: sticky;
  top: 12px;
  align-self: start;
  gap: 12px;
  min-width: 0;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 14px;
  border: 1px solid #484a3b;
  border-radius: 16px;
  background: linear-gradient(155deg, #24251e, #1a1b16 72%);
  box-shadow: 0 15px 40px #0004;
  color: var(--nav-paper);
}

.au-channel-remote .remote-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #3c3e33;
  padding-bottom: 8px;
}

.au-channel-remote .remote-panel-head .mono,
.au-channel-remote .remote-mini-guide .mono {
  margin: 0;
  color: #c1c1b3;
  font: 800 9px/1.2 var(--nav-mono);
  letter-spacing: .09em;
}

.au-channel-remote .remote-on-air {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--nav-lime);
  font: 800 8px/1 var(--nav-mono);
  white-space: nowrap;
}

.au-channel-remote .remote-on-air i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.au-channel-remote .remote-status {
  display: grid;
  gap: 6px;
  border: 1px solid #3a3c31;
  border-radius: 8px;
  background: #171812;
  padding: 12px;
}

.au-channel-remote .remote-status > span {
  color: var(--nav-teal);
  font: 800 9px/1 var(--nav-mono);
  letter-spacing: .1em;
}

.au-channel-remote .remote-status strong {
  overflow-wrap: anywhere;
  color: var(--nav-paper);
  font: 900 clamp(20px, 1.65vw, 25px)/1 ImpactNarrow, Impact, var(--nav-mono);
}

.au-channel-remote .remote-control-row,
.au-channel-remote .remote-extras,
.au-channel-remote .remote-number-grid {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 7px;
}

.au-channel-remote .remote-number-grid {
  grid-auto-flow: row;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.au-channel-remote .remote-action,
.au-remote-dock .remote-action,
.au-guide-close {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid #555748;
  border-radius: 7px;
  background: #171812;
  color: var(--nav-paper);
  font: 800 10px/1 var(--nav-mono);
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
}

.au-channel-remote .remote-action:hover,
.au-channel-remote .remote-extra-link:hover,
.au-remote-dock .remote-action:hover,
.au-guide-close:hover {
  border-color: var(--nav-teal);
  color: var(--nav-teal);
}

.au-channel-remote .remote-mute[aria-pressed="true"] {
  border-color: var(--nav-lime);
  color: var(--nav-lime);
}

.au-channel-remote .remote-action.au-remote-minimize,
.au-remote-dock .remote-action.au-remote-expand {
  min-width: 44px;
  font: 700 24px/1 var(--nav-mono);
  letter-spacing: 0;
}

.au-channel-remote .au-remote-minimize { margin-inline-start: auto; }

.au-channel-remote .remote-key {
  display: grid;
  min-width: 0;
  min-height: 56px;
  align-content: center;
  justify-items: center;
  gap: 4px;
  border: 1px solid #44463a;
  border-radius: 7px;
  background: #171812;
  color: var(--nav-paper);
  text-decoration: none;
}

.au-channel-remote .remote-key > span { color: var(--nav-teal); font: 900 16px/1 var(--nav-mono); }
.au-channel-remote .remote-key small {
  padding-inline: 4px;
  color: #c1c1b3;
  font: 700 8px/1.15 var(--nav-mono);
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
}
.au-channel-remote .remote-key:hover,
.au-channel-remote a[aria-current="page"] { border-color: var(--nav-lime); background: #25271a; }
.au-channel-remote .remote-key.is-current > span,
.au-channel-remote .remote-key.is-current small,
.au-channel-remote .remote-extra-link.is-current { color: var(--nav-lime); }
.au-channel-remote .remote-key--soon { border-style: dashed; opacity: .56; }
.au-channel-remote .remote-key--blank { visibility: hidden; border: 0; background: transparent; }

.au-channel-remote .remote-extra-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #44463a;
  border-radius: 6px;
  color: #c4c2b7;
  font: 800 9px/1.2 var(--nav-mono);
  text-align: center;
  text-decoration: none;
}

.au-channel-remote .remote-utility-key {
  gap: 7px;
  padding: 0 5px;
  background: #171812;
  box-shadow: inset 0 1px 0 #ffffff0e, 0 2px 0 #10110d;
  color: var(--nav-paper);
  font-size: 10px;
  letter-spacing: .035em;
}

.au-channel-remote .remote-utility-key:hover,
.au-channel-remote .remote-utility-key.is-current { border-color: var(--nav-lime); color: var(--nav-lime); }
.au-channel-remote .remote-utility-key:focus-visible { outline: 2px solid var(--nav-teal); outline-offset: 2px; }
.au-channel-remote .remote-utility-icon {
  position: relative;
  flex: 0 0 auto;
  width: 12px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: var(--nav-teal);
}
.remote-utility-icon--log::after {
  content: "";
  position: absolute;
  inset: 3px 2px auto;
  height: 1px;
  background: currentColor;
  box-shadow: 0 3px currentColor, 0 6px currentColor;
}
.remote-utility-key.is-current .remote-utility-icon { color: var(--nav-lime); }

.au-channel-remote .remote-mini-guide {
  border-top: 1px solid #3c3e33;
  padding-top: 10px;
}
.au-channel-remote .remote-mini-guide > div { display: flex; justify-content: space-between; gap: 8px; }
.au-channel-remote .remote-mini-guide > div > span { color: #a5a597; font: 700 8px/1.3 var(--nav-mono); }
.au-channel-remote .remote-mini-guide ul { margin: 8px 0 0; padding: 0; list-style: none; }
.au-channel-remote .remote-mini-guide li {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  border-top: 1px solid #303127;
  color: #c4c2b7;
  font: 700 9px/1 var(--nav-mono);
}
.au-channel-remote .remote-mini-guide li b { color: var(--nav-teal); }
.au-channel-remote .remote-mini-guide li em { color: #a5a597; font: 700 7px/1 var(--nav-mono); }
.au-channel-remote .remote-brand { color: #929487; font: 800 8px/1.2 var(--nav-mono); letter-spacing: .12em; text-align: center; }

.au-remote-dock {
  position: fixed;
  z-index: 70;
  right: env(safe-area-inset-right, 0px);
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid #60644b;
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: #202219;
  box-shadow: 0 7px 24px #0008;
}

[data-remote-placement="inline"] > .au-remote-dock,
[data-remote-placement="floating"] > .au-channel-remote { display: none; }
[data-site-navigation]:not([data-remote-state]) > .au-remote-dock { visibility: hidden; }

.au-guide {
  position: fixed;
  inset: 0;
  width: min(760px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid #657044;
  border-top: 3px solid var(--nav-lime);
  border-radius: 14px;
  background: #191b14;
  color: var(--nav-paper);
  box-shadow: 0 18px 64px #000c;
  font-family: system-ui, sans-serif;
  text-align: left;
}

.au-guide::backdrop { background: #090a06cf; }
html:has(.au-guide[open]) { overflow: hidden; }

.au-guide-heading {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  background: #191b14;
}

.au-guide-heading h2 {
  margin: 0;
  color: var(--nav-paper);
  font: 900 clamp(25px, 4vw, 34px)/1 var(--nav-mono);
  letter-spacing: -.05em;
}

.au-guide-close { width: 44px; flex: none; font-size: 22px; }

.au-guide-account {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #556237;
  border-radius: 8px;
  background: #232719;
  color: var(--nav-paper);
  text-decoration: none;
}

.au-guide-account:hover, .au-guide-account[aria-current] { border-color: var(--nav-lime); background: #2b311c; }
.au-guide-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #717754;
  border-radius: 6px;
  background: #15170f;
  color: var(--nav-lime);
  font: 800 25px/1 var(--nav-mono);
}
.au-guide-avatar img { width: 100%; height: 100%; object-fit: cover; }
.au-guide-account-title { display: grid; gap: 3px; line-height: 1.2; }
.au-guide-account-title strong { font-size: 15px; }
.au-guide-account-title small { color: #d0cdbd; font-size: 12px; }
.au-guide-handle { color: var(--nav-lime); font: 700 12px/1.2 var(--nav-mono); overflow-wrap: anywhere; }
.au-guide-chevron {
  width: 7px;
  height: 7px;
  flex: none;
  transform: rotate(45deg);
  border: solid currentColor;
  border-width: 1px 1px 0 0;
}
.au-guide-arrow { grid-column: -2; color: var(--nav-teal); }

.au-guide-admin {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid #464938;
  border-radius: 6px;
  color: var(--nav-paper);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.au-guide-admin[hidden] { display: none; }
.au-guide-admin:hover, .au-guide-admin:focus-visible { border-color: var(--nav-teal); color: var(--nav-teal); }

.au-guide-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px);
  margin-top: 24px;
}
.au-guide-group { min-width: 0; }
.au-guide-group h3 {
  margin: 0;
  padding: 0 0 7px 7px;
  border-bottom: 1px solid #464938;
  color: var(--nav-teal);
  font: 800 12px/1.4 var(--nav-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.au-guide-group ul { margin: 4px 0 0; padding: 0; list-style: none; }
.au-guide-group a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 5px 7px;
  border-radius: 4px;
  color: var(--nav-paper);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}
.au-guide-group .au-guide-chevron { color: #8d9d64; }
.au-guide-group a:hover, .au-guide-group a[aria-current] { background: #2a2e20; color: var(--nav-lime); }
.au-guide [hidden] { display: none; }

.au-guide :is(button, a):focus-visible,
.au-channel-remote :is(button, a):focus-visible,
.au-remote-dock button:focus-visible {
  outline: 2px solid var(--nav-teal);
  outline-offset: 2px;
}

@media (width > 840px) {
  [data-remote-placement="inline"][data-remote-state="docked"] > .au-remote-dock { display: flex; }
  [data-remote-placement="floating"][data-remote-state="expanded"] > .au-remote-dock { display: none; }
  [data-remote-placement="floating"][data-remote-state="expanded"] > .au-channel-remote {
    position: fixed;
    z-index: 70;
    inset: auto max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) auto;
    display: grid;
    width: min(300px, calc(100vw - 24px));
  }

  [data-tv-remote-layout] .tv-main-grid {
    --tv-remote-width: 300px;
    --tv-remote-gap: 28px;
    --tv-viewer-top: 80px;
    --tv-viewer-aspect: 1.47;
    --tv-viewer-chrome: 0px;
    container-type: inline-size;
    grid-template-columns: minmax(0, 1fr) var(--tv-remote-width);
    gap: var(--tv-remote-gap);
  }
  [data-tv-remote-layout].pa-page .tv-main-grid {
    --tv-viewer-aspect: 1.778;
    --tv-viewer-chrome: 132px;
  }
  [data-tv-remote-layout][data-remote-state="docked"] .tv-main-grid { grid-template-columns: minmax(0, 1fr); }
  [data-tv-remote-layout][data-remote-state="docked"] .au-channel-remote { display: none; }
  body:not(.pa-play-mode) [data-tv-remote-layout][data-remote-state="docked"] .tv-viewer-column {
    width: min(100%, max(
      calc(100cqi - var(--tv-remote-width) - var(--tv-remote-gap)),
      calc((100dvh - var(--tv-viewer-top) - var(--tv-viewer-chrome) - 12px) * var(--tv-viewer-aspect))
    ));
    justify-self: center;
  }
}

@media (840px < width <= 1120px) {
  [data-tv-remote-layout] .tv-main-grid {
    --tv-remote-width: 255px;
    --tv-remote-gap: 16px;
  }
}

@media (width <= 840px) {
  body:not(.pa-play-mode) [data-tv-remote-layout] .tv-main-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  [data-tv-remote-layout] .au-channel-remote,
  .au-remote-dock .au-remote-expand { display: none; }
  [data-remote-placement="floating"] > .au-remote-dock { bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (width <= 600px) {
  .au-guide {
    width: 100%;
    max-height: calc(100dvh - 14px);
    margin: auto 0 0;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    border-radius: 14px 14px 0 0;
  }
  .au-guide-groups { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
  .au-guide-group a { padding-inline: 8px; }
}
@media (width <= 400px) {
  .au-guide-account { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 9px; }
  .au-guide-avatar { grid-row: 1 / span 2; }
  .au-guide-handle { grid-column: 2; grid-row: 2; }
  .au-guide-arrow { grid-column: 3; grid-row: 1; }
}

body.pa-play-mode :is(.au-channel-remote, .au-remote-dock) { display: none !important; }
