/* AIRWAVE polish layer (2026-09-27): layout + player fixes on top of fix.css. Loaded after fix.css. */
:root { --aw-col: 300px; }

/* ---------- Support / tip ---------- */
.aw-tip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #ffd23f; color: #1a0c06 !important; font: 800 13px/1.1 system-ui, -apple-system, sans-serif; text-decoration: none !important; white-space: nowrap; border: 0; }
.aw-tip:hover { filter: brightness(1.08); }
#aw-hear-dock .aw-tip { width: 100%; min-height: 36px; }
.aw-tip-block { display: flex; margin: 12px 0; }

/* ---------- Player (listen button + SoundCloud) lives inside the dock ---------- */
#aw-player-slot { display: flex; flex-direction: column; gap: 6px; }
#aw-player-slot #aw-live-listen { position: static !important; width: 100% !important; min-height: 44px; top: auto !important; left: auto !important; font-size: 15px; }
#aw-player-slot #aw-listen-wrap { position: relative !important; top: auto !important; left: auto !important; width: 100% !important; height: 166px !important; border-radius: 12px; background: #111 !important; border: 1px solid #5a3a28 !important; transform: none !important; }
#aw-listen-frame, .sc-player iframe { height: 166px !important; max-height: 166px !important; }
#aw-dock-toggle { display: none; }

/* ---------- YouTube discovery badge (Radio dock, near Play) ---------- */
.aw-youtube {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 40px; padding: 8px 14px; box-sizing: border-box;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(90deg, #ff0033 0%, #e60023 55%, #b8001c 100%);
  color: #fff !important; text-decoration: none !important;
  font: 800 14px/1.15 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .01em; box-shadow: 0 0 18px rgba(255,0,51,.38);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.aw-youtube:hover, .aw-youtube:focus-visible { filter: brightness(1.08); outline: 2px solid #00f0ff; outline-offset: 2px; }
.aw-youtube-ico {
  display: inline-block; width: 18px; height: 18px; flex-shrink: 0;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23000' d='M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.6 12 3.6 12 3.6s-7.5 0-9.4.5A3 3 0 0 0 .5 6.2 31 31 0 0 0 0 12a31 31 0 0 0 .5 5.8 3 3 0 0 0 2.1 2.1c1.9.5 9.4.5 9.4.5s7.5 0 9.4-.5a3 3 0 0 0 2.1-2.1A31 31 0 0 0 24 12a31 31 0 0 0-.5-5.8zM9.6 15.6V8.4l6.3 3.6-6.3 3.6z'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23000' d='M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.6 12 3.6 12 3.6s-7.5 0-9.4.5A3 3 0 0 0 .5 6.2 31 31 0 0 0 0 12a31 31 0 0 0 .5 5.8 3 3 0 0 0 2.1 2.1c1.9.5 9.4.5 9.4.5s7.5 0 9.4-.5a3 3 0 0 0 2.1-2.1A31 31 0 0 0 24 12a31 31 0 0 0-.5-5.8zM9.6 15.6V8.4l6.3 3.6-6.3 3.6z'/></svg>") center/contain no-repeat;
}
.aw-youtube-txt { white-space: nowrap; }
@media (max-width: 999px) {
  #aw-player-slot .aw-youtube { width: calc(100% - 76px); font-size: 13px; min-height: 36px; padding: 7px 10px; }
  .aw-youtube-txt { white-space: normal; text-align: center; }
}

/* ---------- X Spaces link badge (under the YouTube badge; X black/white) ---------- */
.aw-xspaces {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 40px; padding: 8px 14px; box-sizing: border-box;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.55);
  background: #000;
  color: #fff !important; text-decoration: none !important;
  font: 800 14px/1.15 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .01em; box-shadow: 0 0 18px rgba(255,255,255,.18);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.aw-xspaces:hover, .aw-xspaces:focus-visible { background: #111; outline: 2px solid #00f0ff; outline-offset: 2px; }
.aw-xspaces-ico {
  display: inline-block; width: 16px; height: 16px; flex-shrink: 0;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23000' d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23000' d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/></svg>") center/contain no-repeat;
}
.aw-xspaces-txt { white-space: nowrap; }
@media (max-width: 999px) {
  #aw-player-slot .aw-xspaces { width: calc(100% - 76px); font-size: 13px; min-height: 36px; padding: 7px 10px; }
  .aw-xspaces-txt { white-space: normal; text-align: center; }
}

/* ---------- Other-station chip: small, out of the way ---------- */
#aw-shows { left: auto !important; right: 12px !important; top: auto !important; bottom: calc(80px + env(safe-area-inset-bottom)) !important; flex-direction: row !important; z-index: 57 !important; }
#aw-shows button { min-height: 32px !important; padding: 0 12px !important; font-size: 12px !important; border: 1px solid #f36021 !important; }
body[data-aw-path="/login"] #aw-shows, body[data-aw-path="/register"] #aw-shows, body[data-aw-path="/account"] #aw-shows, body[data-aw-path="/studio"] #aw-shows { display: none !important; }

/* ---------- Top section nav: one slim row under the header ---------- */
#aw-pages { grid-template-columns: repeat(4, 1fr) !important; }
#aw-pages a { min-height: 38px !important; font-size: 11px !important; letter-spacing: .1em !important; }
.app-shell { padding-top: calc(56px + 46px + env(safe-area-inset-top)) !important; }
.app-shell > main.page { margin-top: 0 !important; }

/* ---------- Studio PIN: readable ---------- */
#aw-studio-gate input { background: #16161f !important; color: #fff !important; -webkit-text-fill-color: #fff !important; caret-color: #00f0ff; border: 2px solid #00f0ff !important; }
#aw-studio-gate input::placeholder { color: #6d6d80; -webkit-text-fill-color: #6d6d80; }

/* ---------- Dock text: no clipped labels ---------- */
#aw-hear-dock select { width: 100%; min-width: 0; text-overflow: ellipsis; font-size: 13px; }
#aw-hear-dock .aw-devices label { min-width: 0; }
#aw-deck-now { white-space: normal !important; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#aw-hear-dock .aw-box-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* ================= Desktop: header full width, right column for the player ================= */
@media (min-width: 1000px) {
  .top-bar { left: 0 !important; right: 0 !important; width: 100% !important; max-width: none !important; transform: none !important; margin: 0 !important; padding-left: 16px !important; padding-right: 16px !important; box-sizing: border-box; background: #0a0a0df2 !important; border-bottom: 1px solid #24242d; }
  #aw-hear-dock { width: var(--aw-col) !important; right: 12px !important; top: calc(56px + 8px) !important; bottom: 12px !important; overflow-y: auto !important; }
  .app-shell { max-width: none !important; width: auto !important; margin: 0 !important; padding-left: 12px !important; padding-right: calc(var(--aw-col) + 24px) !important; box-sizing: border-box; }
  .app-shell > main.page { max-width: 1000px; margin-left: auto !important; margin-right: auto !important; }
  #aw-pages { left: 0 !important; right: calc(var(--aw-col) + 24px) !important; width: auto !important; max-width: 560px; margin: 0 auto !important; }
  .bottom-nav { left: 12px !important; right: calc(var(--aw-col) + 24px) !important; width: auto !important; max-width: 560px; margin: 0 auto !important; transform: none !important; background: #0b0a0af5 !important; }
  #aw-shows { right: calc(var(--aw-col) + 28px) !important; bottom: 16px !important; }
  #aw-live-mic-link { bottom: 16px !important; }
}

/* ================= Mobile / tablet: dock becomes a mini-player above the tab bar ================= */
@media (max-width: 999px) {
  .app-shell { padding-right: 0 !important; padding-bottom: calc(210px + env(safe-area-inset-bottom)) !important; }
  #aw-hear-dock { top: auto !important; left: 8px !important; right: 8px !important; width: auto !important; bottom: calc(70px + env(safe-area-inset-bottom)) !important; max-height: calc(100vh - 150px); overflow-y: auto !important; padding: 8px !important; gap: 6px !important; }
  #aw-dock-toggle { display: block; position: absolute; right: 10px; top: 10px; z-index: 2; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid #5a3a28; background: #1b1512; color: #f3d9c6; font: 700 12px/1 system-ui, sans-serif; }
  body:not(.aw-dock-open) #aw-hear-dock .aw-devices,
  body:not(.aw-dock-open) #aw-hear-dock #aw-music-box,
  body:not(.aw-dock-open) #aw-hear-dock #aw-air-btn,
  body:not(.aw-dock-open) #aw-hear-dock #aw-shuffle,
  body:not(.aw-dock-open) #aw-hear-dock .aw-tip { display: none !important; }
  body:not(.aw-dock-open):not(.aw-player-open) #aw-player-slot #aw-listen-wrap { height: 0 !important; border-width: 0 !important; }
  #aw-hear-dock .aw-deck { padding-right: 76px; }
  #aw-player-slot #aw-live-listen { width: calc(100% - 76px) !important; }
  #aw-live-mic-link { bottom: auto !important; top: calc(56px + 50px) !important; left: auto !important; right: 8px; font-size: 12px !important; padding: 7px 10px !important; }
  #aw-shows { bottom: auto !important; top: calc(56px + 50px) !important; left: 8px !important; right: auto !important; }
  .top-bar .aw-tip { padding: 5px 9px; font-size: 12px; }
}
@media (max-width: 420px) {
  .top-bar .creator-pill { display: none !important; }
}

/* ---------- Stop / Play music toggle ---------- */
#aw-music-toggle { width: 100%; min-height: 40px; border-radius: 999px; border: 2px solid #ff3b30; background: #1a0f0e; color: #fff; font: 800 15px/1 system-ui, -apple-system, sans-serif; cursor: pointer; touch-action: manipulation; }
#aw-music-toggle.is-off { border-color: #00f0ff; background: #0d1a1c; color: #00f0ff; }
@media (max-width: 999px) { #aw-player-slot #aw-music-toggle { width: calc(100% - 76px) !important; } }

/* === AW cyberpunk monogram (replaces the orange orb "globe" brand mark) — 2026-09-27 === */
.brand-mark{
  background:url(/aw-logo.svg?v=3) center/contain no-repeat!important;
  background-color:#05040a!important;
  border-radius:50%!important;
  box-shadow:0 0 0 1px rgba(0,240,255,.4),0 0 10px rgba(0,240,255,.35),0 0 16px rgba(255,43,214,.28)!important;
  width:42px!important;height:42px!important;flex-shrink:0;
  filter:none!important; /* CSS filters blur while rotating — glow lives in the SVG + box-shadow */
}
.brand:hover .brand-mark{
  box-shadow:0 0 0 1px rgba(0,240,255,.65),0 0 14px rgba(0,240,255,.55),0 0 22px rgba(255,43,214,.4)!important;
  filter:none!important;
}
@media (max-width:420px){
  .brand-mark{width:38px!important;height:38px!important}
}

/* Handle + password sign-in sheet (auto sign-in, 2026-09-27) */
.aw-providers button[data-provider="handle"] { background: transparent; color: #00f0ff; border-color: #00f0ff55; }
#aw-handle-login { position: fixed; inset: 0; z-index: 90; background: rgba(3,3,5,.96); color: #fff; display: grid; place-items: center; padding: 24px; text-align: center; }
#aw-handle-login > div { width: min(360px, 100%); display: flex; flex-direction: column; gap: 10px; }
#aw-handle-login h1 { margin: 0 0 6px; }
#aw-handle-login input { font-size: 17px; border-radius: 12px; border: 1px solid #3a3028; background: #000; color: #fff; padding: 12px; }
#aw-handle-login button[type=submit] { min-height: 46px; border: 0; border-radius: 999px; background: #f36021; color: #1a0c06; font-weight: 800; font-size: 16px; }
#aw-handle-login .aw-handle-cancel { min-height: 40px; border: 1px solid #333; border-radius: 999px; background: transparent; color: #c8c8d8; }
#aw-handle-login .aw-handle-note { color: #9a9aac; font-size: 13px; margin: 0; }
/* pause-fix: iOS needs one tap to start the next song */
#aw-live-listen.aw-need-tap { animation: aw-need-tap 1.1s ease-in-out infinite; }
@keyframes aw-need-tap { 0%,100% { box-shadow: 0 0 0 0 rgba(255,60,60,.7); } 50% { box-shadow: 0 0 0 8px rgba(255,60,60,0); } }

/* PayPal tip button (blue), next to the yellow Stripe ♥ Support */
.aw-pp { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #0070ba; color: #fff !important; font: 800 13px/1.1 system-ui, -apple-system, sans-serif; text-decoration: none !important; white-space: nowrap; border: 0; }
.aw-pp:hover { background: #005ea6; }
.aw-pp-logo { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: #fff; color: #003087; font: 900 12px/1 Verdana, sans-serif; font-style: italic; }
.aw-pp .aw-pp-mini { display: none; }
.aw-pp-short .aw-pp-long { display: none; }
.aw-pp-short .aw-pp-mini { display: inline; }
.top-bar .aw-pp { margin-left: 6px; }
.aw-tip-row { display: flex; gap: 8px; width: 100%; flex-wrap: wrap; }
.aw-tip-row > a { flex: 1 1 140px; min-height: 36px; }
.aw-tip-line { margin: 2px 0 0; width: 100%; color: #c9b8a8; font: 600 12px/1.3 system-ui, -apple-system, sans-serif; text-align: center; }
.aw-tip-block { flex-wrap: wrap; gap: 8px; align-items: center; }
.aw-tip-block .aw-tip-line { text-align: left; }
@media (max-width: 760px) {
  body:not(.aw-dock-open) #aw-hear-dock .aw-tip-row, body:not(.aw-dock-open) #aw-hear-dock .aw-tip-line { display: none !important; }
  .top-bar .aw-pp { padding: 5px 8px; font-size: 12px; margin-left: 4px; }
}
@media (max-width: 420px) {
  .top-bar .aw-pp .aw-pp-mini { display: none; }
  .top-bar .aw-pp { padding: 5px 6px; }
}
@media (max-width: 420px) {
  .top-bar .top-bar-actions { gap: 5px !important; }
  .top-bar .aw-pp { margin-left: 0; padding: 4px 5px; }
  .top-bar .aw-tip { padding: 5px 7px; }
  .top-bar .on-air-pill, .top-bar .live-pill { white-space: nowrap; }
}

/* Studio lock (2026-09-28): Studio entries only for the owner or a device with a code grant (html.aw-studio-ok,
   set by the worker). Pages served without the worker keep them hidden; the worker still enforces /studio. */
html:not(.aw-studio-ok) a[href="/studio"], html:not(.aw-studio-ok) a[href^="/studio?"], html:not(.aw-studio-ok) a[href^="/studio/"],
html:not(.aw-studio-ok) a[href*="host=1"], html:not(.aw-studio-ok) .radio-studio-link, html:not(.aw-studio-ok) .sbn-go-live,
html:not(.aw-studio-ok) .live-pill, html:not(.aw-studio-ok) #aw-air-btn, html:not(.aw-studio-ok) .sbn-empty-inline:has(a[href="/studio"]) { display: none !important; }
.aw-mypin a { color: #00f0ff; font-weight: 800; text-decoration: none; }
#aw-studio-owner { position: fixed; right: 12px; top: calc(12px + env(safe-area-inset-top)); z-index: 2147483001; width: min(340px, calc(100vw - 24px)); background: #0c0c14; color: #f2f2f7; border: 1px solid #00f0ff; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.6); font: 14px/1.4 system-ui, -apple-system, sans-serif; }
#aw-studio-owner summary { cursor: pointer; padding: 10px 14px; font-weight: 800; list-style: none; }
#aw-studio-owner summary::-webkit-details-marker { display: none; }
#aw-studio-owner .b { padding: 0 14px 14px; display: grid; gap: 8px; }
#aw-studio-owner .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#aw-studio-owner code { font-size: 18px; letter-spacing: .12em; color: #fff; }
#aw-studio-owner input { flex: 1; min-width: 0; padding: 9px 10px; border-radius: 10px; border: 1px solid #444; background: #050508; color: #fff; font-size: 16px; }
#aw-studio-owner button { border: 1px solid #00f0ff; background: #12121a; color: #fff; border-radius: 999px; padding: 8px 12px; font-weight: 800; cursor: pointer; }
#aw-studio-owner button.danger { border-color: #ff0055; color: #ff5c8a; }
#aw-studio-owner .note { color: #a0a0b8; font-size: 12px; margin: 0; }
#aw-studio-owner .msg { color: #7dffb0; min-height: 1.2em; margin: 0; font-size: 13px; }

/* ---------- Unsee (Radio only): hide player/studio chrome, keep music; floating toggle ---------- */
/* Large high-contrast pill ABOVE player chrome (top), never tucked under dock/nav. */
#aw-unsee-btn {
  position: fixed;
  z-index: 2147483646;
  top: calc(58px + env(safe-area-inset-top, 0px));
  left: 12px;
  right: auto;
  bottom: auto;
  min-height: 48px;
  min-width: 132px;
  padding: 0 22px;
  border-radius: 999px;
  border: 2px solid #031018;
  background: #00f0ff;
  color: #030305;
  font: 800 16px/1 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 6px 24px rgba(0,0,0,.65), 0 0 0 3px rgba(0,240,255,.35), 0 0 28px rgba(0,240,255,.45);
  animation: aw-unsee-pop 0.55s ease-out 1;
}
@keyframes aw-unsee-pop {
  0% { transform: scale(0.86); opacity: 0.4; }
  60% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
#aw-unsee-btn:hover { filter: brightness(1.08); }
#aw-unsee-btn:active { transform: scale(0.97); }
#aw-unsee-btn.is-on {
  border-color: #1a0c06;
  color: #1a0c06;
  background: #ffd23f;
  box-shadow: 0 6px 24px rgba(0,0,0,.65), 0 0 0 3px rgba(255,210,63,.4), 0 0 28px rgba(255,210,63,.45);
}
#aw-unsee-btn[hidden] { display: none !important; }
@media (min-width: 1000px) {
  /* Sit in the main column, just left of the SoundCloud dock — top, not bottom. */
  #aw-unsee-btn {
    left: auto;
    right: calc(var(--aw-col) + 28px);
    top: calc(64px + 14px);
  }
  body.aw-unsee #aw-unsee-btn { right: 24px; left: auto; }
}
@media (max-width: 999px) {
  /* Top-left, clear of Live mic (top-right) and above the player dock. */
  #aw-unsee-btn {
    top: calc(56px + env(safe-area-inset-top, 0px));
    left: 10px;
    right: auto;
  }
}

/* Park dock off-screen (not display:none) so SoundCloud keeps playing */
body.aw-unsee #aw-hear-dock {
  position: fixed !important;
  left: -100vw !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  max-height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: -1 !important;
  bottom: auto !important;
  right: auto !important;
}
body.aw-unsee #aw-shows,
body.aw-unsee #aw-live-mic-link,
body.aw-unsee #aw-air-btn { display: none !important; }

/* Give the feed full width while chrome is hidden */
body.aw-unsee .app-shell {
  padding-right: 12px !important;
  padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important;
}
body.aw-unsee #aw-pages { right: 0 !important; max-width: 560px; }
body.aw-unsee .bottom-nav { right: 12px !important; left: 12px !important; max-width: 560px; }

/* === AIRWAVE logo spin (2026-10-08, clearer 12s) === */
.brand-mark {
  display: inline-block !important;
  transform-origin: center center !important;
  animation: aw-logo-spin 12s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout paint;
}
@keyframes aw-logo-spin {
  from { transform: translateZ(0) rotate(0deg); }
  to { transform: translateZ(0) rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-mark { animation: none !important; }
}
