/* ===== TOKENS ===== */
:root {
  --red: #D72B2B;
  --red-dark: #B01E1E;
  --red-light: #E84040;
  --gold: #E8A820;
  --gold-light: #F5C84A;
  --dark: #1A0A0A;
  --dark2: #110606;
  --dark3: #221010;
  --surface: #2A1212;
  --surface2: #341818;
  --white: #FFFFFF;
  --text-pri: #FFFFFF;
  --text-sec: rgba(255,255,255,0.65);
  --text-muted: rgba(255,255,255,0.38);
  --border: rgba(255,255,255,0.08);
  --gold-border: rgba(232,168,32,0.2);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
  --player-h: 88px;
  --r: 16px;
  --r-sm: 10px;
  --font-h: 'Barlow Condensed', sans-serif;
  --font-b: 'Barlow', sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-b);
  background: var(--dark);
  color: var(--text-pri);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
ul { list-style: none; }
input { font-family: inherit; }

/* ===== APP SHELL ===== */
.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  background: var(--dark);
  overflow: hidden;
}

/* ===== STATUS BAR SPACER ===== */
.status-bar {
  height: calc(var(--safe-top) + 44px);
  background: var(--red);
  display: flex;
  align-items: flex-end;
  padding: 0 20px 10px;
  flex-shrink: 0;
}
.status-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.status-station {
  font-family: var(--font-h);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
}
.status-right { display: flex; align-items: center; gap: 12px; }
.status-icon { font-size: 0.8rem; color: rgba(255,255,255,0.85); }
.live-dot {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--white); text-transform: uppercase;
}
.live-dot::before {
  content: '';
  width: 6px; height: 6px;
  background: #4DF07A;
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1;} 50%{opacity:0.4;} }

/* ===== NOW PLAYING HERO ===== */
.now-playing-hero {
  background: linear-gradient(180deg, var(--red-dark) 0%, var(--dark) 100%);
  padding: 20px 20px 16px;
  flex-shrink: 0;
}
.np-cover-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.np-cover {
  width: 72px; height: 72px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
}
.np-cover-placeholder {
  width: 72px; height: 72px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--red);
  font-size: 1.8rem;
}
.np-info { flex: 1; min-width: 0; }
.np-label {
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 4px;
}
.np-title {
  font-family: var(--font-h);
  font-size: 1.3rem; font-weight: 800;
  line-height: 1.1; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.np-artist {
  font-size: 0.82rem; color: var(--text-sec);
  margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.np-genre-tag {
  display: inline-block; margin-top: 6px;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(215,43,43,0.3);
  color: #FF8A8A;
  padding: 2px 8px; border-radius: 20px;
  border: 1px solid rgba(215,43,43,0.4);
}
.np-like-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--text-sec);
  transition: all 0.2s;
  flex-shrink: 0;
}
.np-like-btn.liked { color: var(--red-light); background: rgba(215,43,43,0.2); }
.notif-hero-btn {
  background: rgba(232,168,32,0.18);
  border: 1px solid rgba(232,168,32,0.4);
  color: var(--gold-light);
  box-shadow: 0 0 0 5px rgba(232,168,32,0.08);
  animation: bell-shake 3s ease-in-out infinite;
}
.notif-hero-btn.enabled {
  background: rgba(77,240,122,0.16);
  border-color: rgba(77,240,122,0.42);
  color: #4df07a;
  animation: none;
}
.np-like-btn:active { transform: scale(0.9); }

/* Player controls */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin: 18px 0;
}
.ctrl-btn {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 1rem; color: var(--text-sec);
  transition: all 0.15s;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.ctrl-btn:active { transform: scale(0.88); }
.ctrl-btn.active { color: var(--gold); }
.play-main-btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 1.3rem;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  box-shadow: 0 0 0 6px rgba(215,43,43,0.2);
  transition: all 0.2s;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
}
.play-main-btn.playing {
  /* Static glow avoids a continuous box-shadow repaint during audio. */
  background: var(--red-light);
}
.play-main-btn:disabled {
  cursor: wait;
  opacity: 0.82;
}
@keyframes play-pulse {
  0%,100%{ box-shadow: 0 0 0 6px rgba(215,43,43,0.2); }
  50%{ box-shadow: 0 0 0 12px rgba(215,43,43,0.08); }
}
.play-main-btn:active { transform: scale(0.93); }
.play-main-btn i {
  display: block;
  line-height: 1;
  position: relative;
  left: 1px;
}

/* Progress bar (simulated) */
.np-progress { margin-top: 12px; }
.progress-bar-wrap {
  height: 3px; background: rgba(255,255,255,0.12);
  border-radius: 2px; overflow: hidden; cursor: pointer;
}
.progress-bar-fill {
  height: 100%; background: var(--gold);
  border-radius: 2px;
  width: 0%;
  transition: width 1s linear;
}
.progress-live {
  display: flex; align-items: center; justify-content: center;
  margin-top: 6px;
}
.progress-live-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--gold); text-transform: uppercase;
}

/* EQ bars */
.eq-bars {
  display: flex; align-items: flex-end; gap: 2px; height: 16px;
  margin-left: 8px;
}
.eq-bar {
  width: 3px; height: 14px; background: var(--gold); border-radius: 1px 1px 0 0;
  transform-origin: bottom;
  animation: eq 0.5s ease-in-out infinite alternate;
}
.eq-bar:nth-child(1){animation-duration:0.35s;}
.eq-bar:nth-child(2){animation-duration:0.55s;animation-delay:0.1s;}
.eq-bar:nth-child(3){animation-duration:0.28s;animation-delay:0.05s;}
.eq-bar:nth-child(4){animation-duration:0.48s;animation-delay:0.15s;}
@keyframes eq{from{transform:scaleY(.22)}to{transform:scaleY(1)}}
.eq-bars.paused .eq-bar{animation:none;transform:scaleY(.28)}



/* ===== SCROLLABLE CONTENT ===== */
.scroll-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.scroll-area::-webkit-scrollbar { display: none; }


.tab-panel { display: none; padding: 16px; }
.tab-panel.active { display: block; }
#tab-chat.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0;
}

/* ===== SECTION LABELS ===== */
.sec-label {
  font-family: var(--font-h);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.sec-label a { color: var(--gold); font-size: 0.68rem; }

/* ===== RECENTLY PLAYED ===== */
.rp-list { display: flex; flex-direction: column; gap: 2px; }
.rp-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--surface);
  transition: background 0.15s;
  cursor: pointer;
}
.rp-row:active { background: var(--surface2); }
.rp-num { font-family: var(--font-h); font-size: 0.82rem; font-weight: 800; color: var(--red); width: 18px; text-align: center; flex-shrink: 0; }
.rp-art { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface2); }
.rp-info { flex: 1; min-width: 0; }
.rp-title { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-pri); }
.rp-artist { font-size: 0.74rem; color: var(--text-sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.rp-time { font-size: 0.66rem; color: var(--text-muted); flex-shrink: 0; }
.rp-row .rp-play-icon { font-size: 0.78rem; color: var(--text-muted); flex-shrink: 0; }

/* ===== TRENDING / CHARTS ===== */
.chart-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }
.chart-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--surface); cursor: pointer;
  transition: background 0.15s;
}
.chart-row:active { background: var(--surface2); }
.chart-rank { font-family: var(--font-h); font-size: 1.15rem; font-weight: 900; color: rgba(255,255,255,0.15); width: 24px; text-align: center; flex-shrink: 0; }
.chart-rank.gold { color: var(--gold); }
.chart-rank.silver { color: #C0C0C0; }
.chart-rank.bronze { color: #CD7F32; }
.chart-art { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface2); }
.chart-info { flex: 1; min-width: 0; }
.chart-name { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-artist { font-size: 0.74rem; color: var(--text-sec); margin-top: 2px; }
.chart-trend { font-size: 0.72rem; flex-shrink: 0; font-weight: 700; }
.chart-trend.up { color: #4DF07A; }
.chart-trend.down { color: var(--red-light); }
.chart-trend.same { color: var(--text-muted); }

/* ===== FEATURED ARTISTS ===== */
.artists-scroll {
  display: flex; gap: 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 6px; margin-bottom: 20px;
}
.artists-scroll::-webkit-scrollbar { display: none; }
.artist-chip {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex-shrink: 0; cursor: pointer;
  transition: transform 0.18s;
}
.artist-chip:active { transform: scale(0.94); }
.artist-chip img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
}
.artist-chip.featured img { border-color: var(--gold); }
.artist-chip-name { font-size: 0.72rem; font-weight: 600; color: var(--text-sec); text-align: center; max-width: 72px; line-height: 1.2; }

/* ===== NEWS CARDS ===== */
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-card {
  background: var(--surface);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s;
}
.news-card:active { transform: scale(0.98); }
.news-card img { width: 100%; height: 140px; object-fit: cover; }
.news-body { padding: 12px 14px; }
.news-tag { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red-light); }
.news-headline { font-family: var(--font-h); font-size: 1.05rem; font-weight: 800; line-height: 1.25; margin: 5px 0 6px; color: var(--text-pri); }
.news-meta { font-size: 0.7rem; color: var(--text-muted); display: flex; gap: 10px; }

/* ===== REQUEST FORM ===== */
.request-form { display: flex; flex-direction: column; gap: 10px; }
.request-form.is-locked {
  opacity: 0.78;
}
.request-status {
  background: rgba(232,168,32,0.12);
  border: 1px solid rgba(232,168,32,0.2);
  border-radius: var(--r-sm);
  color: var(--text-sec);
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 10px 12px;
}
.form-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 5px; }
.form-input {
  width: 100%; padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-pri);
  font-family: var(--font-b); font-size: 16px;
  outline: none; transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { border-color: var(--red); }
select.form-input { cursor: pointer; }
select.form-input option { background: var(--surface); color: var(--text-pri); }
textarea.form-input { resize: none; height: 80px; }
.form-input:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}
.form-submit {
  width: 100%; padding: 14px;
  background: var(--red); color: white;
  font-family: var(--font-h); font-size: 1rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s;
  margin-top: 4px;
}
.form-submit:active { transform: scale(0.97); background: var(--red-dark); }
.form-submit.sent { background: #27AE60; }
.form-submit:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

/* ===== TEAM STACK ===== */
.voices-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.voice-card {
  display: block;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(232,168,32,0.14);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(0,0,0,0.14);
}
.voice-card.is-highlight {
  border-color: rgba(215,43,43,0.28);
  box-shadow: 0 14px 28px rgba(176,30,30,0.16);
}
.voice-media {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center 24%;
  background: linear-gradient(180deg, #2a1212 0%, #180909 100%);
  filter: saturate(1.08) contrast(1.04);
  padding: 0;
}
.voice-body {
  padding: 12px;
  min-width: 0;
}
.voice-kicker {
  display: inline-block;
  margin-bottom: 5px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff8f8f;
}
.voice-name {
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-pri);
}

/* ===== SOCIAL / COMMUNITY ===== */
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 10px; border-radius: var(--r-sm);
  font-family: var(--font-h); font-size: 0.88rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  transition: transform 0.15s;
}
.social-btn:active { transform: scale(0.95); }
.social-btn.fb { background: #1877f2; color: white; }
.social-btn.ig { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: white; }
.social-btn.yt { background: #ff0000; color: white; }
.social-btn.tw { background: #1da1f2; color: white; }

/* Tawk chat panel */
.chat-panel {
  background:
    linear-gradient(180deg, rgba(232,168,32,0.08) 0%, rgba(255,255,255,0) 18%),
    linear-gradient(180deg, #2f1010 0%, #1b0909 100%);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
  border: 1px solid rgba(232,168,32,0.14);
  box-shadow: 0 16px 30px rgba(0,0,0,0.26);
}
.chat-panel-header {
  background: linear-gradient(90deg, var(--red) 0%, var(--red-dark) 100%);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 5;
}
.chat-panel-title { font-family: var(--font-h); font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: white; }
.chat-online-badge {
  margin-left: auto;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.08);
}
.chat-online-badge:active {
  transform: scale(0.96);
}
.chat-online-badge[aria-expanded="true"] {
  background: rgba(0,0,0,0.28);
  border-color: rgba(255,255,255,0.18);
}
.online-dot { width: 6px; height: 6px; background: #4DF07A; border-radius: 50%; animation: pulse-dot 2s infinite; }
.chat-online-list {
  width: min(220px, calc(100% - 24px));
  max-height: 178px;
  position: fixed;
  top: 52px;
  right: 12px;
  z-index: 1200;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(232,168,32,0.16);
  background: rgba(17,6,6,0.96);
  box-shadow: 0 16px 28px rgba(0,0,0,0.34);
  overflow-y: auto;
}
.chat-online-list[hidden] {
  display: none;
}
.chat-online-title {
  font-family: var(--font-h);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 7px;
}
.chat-online-names {
  display: flex !important;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 6px;
}
.chat-online-name {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(232,168,32,0.12);
  color: rgba(255,255,255,0.86);
  font-size: 0.78rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.chat-online-name:not(.is-empty):hover,
.chat-online-name:not(.is-empty):focus-visible {
  border-color: rgba(232,168,32,0.5);
  background: rgba(255,255,255,0.12);
  outline: none;
}
.chat-mention {
  color: var(--gold);
  font-weight: 800;
}
.chat-mention.is-self {
  padding: 1px 4px;
  border-radius: 5px;
  background: rgba(232,168,32,0.22);
}
.chat-online-name.is-empty {
  display: block;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.62);
}
.chat-preview { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg-row { display: flex; gap: 8px; }
.chat-av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface2); }
.chat-bubble { background: var(--surface2); border-radius: 0 10px 10px 10px; padding: 7px 10px; max-width: calc(100% - 40px); }
.chat-uname { font-size: 0.68rem; font-weight: 700; color: var(--red-light); margin-bottom: 2px; }
.chat-txt { font-size: 0.8rem; line-height: 1.4; color: var(--text-sec); }
.open-chat-btn {
  margin: 0 14px 14px;
  width: calc(100% - 28px);
  padding: 13px;
  background: var(--red); color: white;
  font-family: var(--font-h); font-size: 0.9rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.18s;
}
.open-chat-btn:active { background: var(--red-dark); transform: scale(0.97); }
.live-chat-panel {
  margin: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: none;
}
.chat-messages-live {
  min-height: 420px;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(circle at top, rgba(232,168,32,0.12), transparent 42%),
    linear-gradient(180deg, #261010 0%, #180909 100%);
}
.chat-messages-live::-webkit-scrollbar {
  width: 6px;
}
.chat-messages-live::-webkit-scrollbar-thumb {
  background: rgba(232,168,32,0.32);
  border-radius: 999px;
}
.chat-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.chat-msg.is-self {
  flex-direction: row-reverse;
}
.chat-msg.is-self .chat-bubble {
  background: linear-gradient(180deg, rgba(232,168,32,0.26) 0%, rgba(232,168,32,0.16) 100%);
  border-color: rgba(232,168,32,0.32);
  border-radius: 16px 0 16px 16px;
}
.chat-msg.is-self .chat-name,
.chat-msg.is-self .chat-ts {
  text-align: right;
}
.chat-msg.is-self .chat-name {
  right: 0;
  left: auto;
  color: var(--gold);
}
.chat-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 8px 16px rgba(0,0,0,0.24);
}
.chat-bubble {
  position: relative;
  overflow: visible;
  max-width: calc(100% - 108px);
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 0 16px 16px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
  border: 1px solid rgba(232,168,32,0.14);
  box-shadow: 0 10px 18px rgba(0,0,0,0.16);
}
.chat-name {
  position: absolute;
  left: 0;
  top: -18px;
  font-size: 0.865rem;
  font-weight: 700;
  color: #ff8f8f;
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}
.chat-text {
  font-size: 1.2rem;
  line-height: 1.28;
  color: rgba(255,255,255,0.92);
  overflow-wrap: anywhere;
}
.chat-ts {
  font-size: 0.785rem;
  color: rgba(255,255,255,0.44);
  margin-top: 6px;
}
.chat-reactions {
  position: absolute;
  right: -35px;
  bottom: 7px;
  z-index: 2;
}
.chat-reactions:has(.chat-reaction-trigger.has-reaction) {
  right: -10px;
  bottom: -13px;
}
.chat-msg.is-self .chat-reactions {
  right: auto;
  left: -35px;
}
.chat-msg.is-self .chat-reactions:has(.chat-reaction-trigger.has-reaction) {
  right: auto;
  left: -10px;
}
.chat-reply-trigger {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: -64px;
  bottom: 7px;
  z-index: 2;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.88);
  box-shadow: none;
  font-size: 0.76rem;
  opacity: 0.5;
}
.chat-msg.is-self .chat-reply-trigger {
  right: auto;
  left: -64px;
}
.chat-reply-trigger:hover {
  background: transparent;
  color: #fff;
  opacity: 1;
  transform: translateY(-1px);
}
.chat-reply-quote {
  width: 100%;
  display: block;
  margin: 0 0 8px;
  padding: 7px 9px;
  border: 0;
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  background: rgba(232,168,32,0.08);
  text-align: left;
}
.chat-reply-quote-name,
.chat-reply-preview-label {
  display: block;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
}
.chat-reply-quote-text,
.chat-reply-preview-text {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,0.62);
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.chat-reaction-trigger {
  min-width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  position: relative;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.88);
  box-shadow: none;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  opacity: 0.5;
}
.chat-reaction-trigger.has-reaction {
  min-width: 31px;
  height: 31px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(17,6,6,0.98);
  color: #fff;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  opacity: 1;
  box-shadow: 0 5px 14px rgba(0,0,0,0.28);
}
.chat-reactions.is-open .chat-reaction-trigger {
  background: transparent;
  color: #fff;
  opacity: 1;
}
.chat-reactions.is-open .chat-reaction-trigger.has-reaction {
  background: rgba(17,6,6,0.98);
  color: #fff;
}
.chat-reaction-trigger-icons {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  line-height: 1;
  filter: grayscale(1);
}
.chat-reaction-trigger.has-reaction .chat-reaction-trigger-icons,
.chat-reactions.is-open .chat-reaction-trigger-icons {
  filter: none;
}
.chat-reaction-trigger-count {
  min-width: 13px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: -4px;
  bottom: -3px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.54rem;
  font-weight: 800;
}
.chat-reaction-tray {
  position: fixed;
  left: var(--reaction-tray-left, 50%);
  top: var(--reaction-tray-top, 50%);
  bottom: auto;
  display: grid;
  grid-template-columns: repeat(8, 32px);
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(17,6,6,0.96);
  border: 1px solid rgba(232,168,32,0.22);
  box-shadow: 0 16px 28px rgba(0,0,0,0.36);
  max-width: calc(100vw - 24px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) scale(0.96);
  transform-origin: top center;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 1000;
}
.chat-msg.is-self .chat-reaction-tray {
  left: var(--reaction-tray-left, 50%);
  right: auto;
  transform-origin: top center;
}
.chat-reactions.opens-above .chat-reaction-tray,
.chat-msg.is-self .chat-reactions.opens-above .chat-reaction-tray {
  transform-origin: bottom center;
}
.chat-reactions.is-open .chat-reaction-tray {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}
@media (max-width: 420px) {
  .chat-reaction-tray {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    width: calc(100vw - 24px);
    gap: 5px;
    padding: 10px;
  }
  .chat-reaction-tray .chat-reaction {
    width: 100%;
    max-width: 36px;
    justify-self: center;
  }
}
.chat-reaction {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.chat-reaction span {
  min-width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: -4px;
  bottom: -2px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--dark);
  font-size: 0.58rem;
  font-weight: 800;
}
.chat-reaction:hover,
.chat-reaction.is-active {
  background: var(--gold);
  color: var(--dark);
  transform: translateY(-2px) scale(1.08);
}
.chat-status {
  min-height: 32px;
  padding: 8px 14px;
  border-top: 1px solid rgba(232,168,32,0.12);
  border-bottom: 1px solid rgba(232,168,32,0.12);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.66);
  font-size: 0.72rem;
  line-height: 1.3;
}
.chat-status.is-ready { color: #4df07a; }
.chat-status.is-warning { color: #f2b84b; }
.chat-status.is-error { color: #ff8a8a; }
.chat-nickbar {
  display: grid;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(232,168,32,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
}
.chat-nickcopy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.chat-nicklabel,
.chat-field-label {
  font-family: var(--font-h);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.chat-nickcurrent {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 700;
}
.chat-nickform {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.chat-nickform input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(232,168,32,0.18);
  background: rgba(17,6,6,0.72);
  color: var(--text-pri);
  outline: none;
  font-size: 16px;
}
.chat-upload-field {
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(232,168,32,0.18);
  background: rgba(17,6,6,0.72);
  color: var(--text-pri);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  cursor: pointer;
  min-height: 92px;
  overflow: hidden;
}
.chat-upload-wrap {
  position: relative;
  min-width: 0;
}
.chat-upload-field.has-preview {
  padding: 0;
}
.chat-upload-field.has-preview span {
  display: none;
}
.chat-nickform input:focus {
  border-color: rgba(232,168,32,0.52);
  box-shadow: 0 0 0 3px rgba(232,168,32,0.12);
}
.chat-nicksave,
.chat-nickedit {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-family: var(--font-h);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chat-nicksave {
  width: 100%;
  margin-top: 10px;
}
.chat-nicksave {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-light) 100%);
  color: #fff;
  box-shadow: 0 8px 16px rgba(215,43,43,0.22);
}
.chat-nickedit {
  border: 1px solid rgba(232,168,32,0.18);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.88);
}
.chat-nickbar.is-locked .chat-nickform,
.chat-nickbar.is-locked .chat-avatar-tools,
.chat-nickbar.is-locked .chat-nicksave,
.chat-nickbar.is-editing .chat-nickedit {
  display: none;
}
.chat-nickbar.is-locked .chat-nickedit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chat-avatar-tools {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.chat-avatar-preview {
  display: none;
  width: 100%;
  height: 92px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(17,6,6,0.72);
  border: 0;
}
.chat-upload-field.has-preview .chat-avatar-preview {
  display: block;
}
.chat-avatar-clear {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.62);
  color: #fff;
  font-size: 17px;
  line-height: 1;
}
.chat-upload-wrap.has-preview .chat-avatar-clear {
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-avatar-file {
  display: none;
}
.chat-input-wrap {
  padding: 10px;
  border-top: 1px solid rgba(232,168,32,0.12);
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.02);
  position: relative;
}
.chat-reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid rgba(232,168,32,0.12);
  background: rgba(255,255,255,0.04);
}
.chat-reply-preview[hidden] {
  display: none;
}
.chat-reply-preview-copy {
  min-width: 0;
  padding-left: 9px;
  border-left: 3px solid var(--gold);
}
.chat-reply-preview-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-reply-cancel {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(232,168,32,0.12);
  color: var(--gold);
  font-size: 1rem;
  font-weight: 800;
}
.chat-input-wrap input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232,168,32,0.18);
  background: rgba(17,6,6,0.72);
  color: var(--text-pri);
  outline: none;
  font-size: 16px;
}
.chat-input-wrap input:focus {
  border-color: rgba(232,168,32,0.52);
  box-shadow: 0 0 0 3px rgba(232,168,32,0.12);
}
.chat-emoji-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(232,168,32,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--text-pri);
  font-size: 1.05rem;
  line-height: 1;
  transition: transform 0.18s, background 0.18s;
}
.chat-emoji-toggle:active,
.chat-emoji-toggle[aria-expanded="true"] {
  background: rgba(232,168,32,0.16);
  transform: scale(0.96);
}
.chat-emoji-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}
.chat-emoji-picker {
  position: absolute;
  right: 60px;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: min(250px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(232,168,32,0.2);
  border-radius: 16px;
  background: #1b0909;
  box-shadow: 0 18px 38px rgba(0,0,0,0.36);
}
.chat-emoji-picker[hidden] {
  display: none;
}
.chat-emoji-option {
  min-width: 0;
  aspect-ratio: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.07);
  color: var(--text-pri);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  transition: background 0.18s, transform 0.18s;
}
.chat-emoji-option.is-flag {
  font-size: 0.86rem;
  letter-spacing: 0;
}
.chat-emoji-option:active {
  background: var(--gold);
  color: var(--dark);
  transform: scale(0.96);
}
.chat-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-light) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 10px 18px rgba(215,43,43,0.24);
}
.rss-feed-list {
  background: var(--surface);
  border-radius: var(--r);
  padding: 8px 14px;
}
.rss-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.rss-item:last-child {
  border-bottom: none;
}
.rss-source {
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--red-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rss-title {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 2px;
  color: var(--text-pri);
}
.rss-date {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ===== TAB NAV ===== */
.bottom-nav {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--dark);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px; padding: 10px 0;
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-muted);
  cursor: pointer; transition: color 0.18s;
  -webkit-tap-highlight-color: transparent;
  border-bottom: 2px solid transparent;
}
.nav-item i { font-size: 1.15rem; }
.nav-item.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ===== TICKER ===== */
.ticker-wrap {
  background: var(--dark2);
  border-bottom: 1px solid var(--border);
  overflow: hidden; position: relative;
  height: 28px; display: flex; align-items: center;
  flex-shrink: 0;
}
.ticker-wrap::before, .ticker-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 32px; z-index: 2;
}
.ticker-wrap::before { left: 0; background: linear-gradient(to right, var(--dark2), transparent); }
.ticker-wrap::after  { right: 0; background: linear-gradient(to left, var(--dark2), transparent); }
.ticker-track {
  display: flex; white-space: nowrap;
  animation: ticker 35s linear infinite;
  font-size: 0.72rem; color: var(--gold);
  font-family: var(--font-h); font-weight: 600; letter-spacing: 0.04em;
}
.ticker-track span { margin-right: 40px; }
.ticker-track span::before { content: '♪ '; color: var(--red-light); }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ===== QUICK ACTION PILLS ===== */
.quick-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
  margin: 0 0 16px;
}
.quick-pill {
  min-width: 0;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-h);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.18s;
  border: 1px solid transparent;
}
.quick-pill i {
  font-size: 0.82rem;
}
.quick-pill-install {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--dark);
  box-shadow: 0 10px 20px rgba(232,168,32,0.2);
}
.quick-pill-install:active {
  transform: scale(0.97);
}
.quick-pill-alerts {
  background: var(--red);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 8px 22px rgba(215,43,43,0.3);
}
.quick-pill-alerts.granted {
  background: var(--red);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}
.quick-pill-alerts:active {
  background: var(--red-dark);
  transform: scale(0.97);
}
.quick-pill.hidden {
  display: none;
}
@media (max-width: 360px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }
}
.install-guide {
  margin-top: 14px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(232,168,32,0.14);
  border-radius: var(--r);
  box-shadow: 0 14px 28px rgba(0,0,0,0.16);
}
.install-guide.is-highlighted {
  border-color: rgba(232,168,32,0.48);
  box-shadow: 0 0 0 3px rgba(232,168,32,0.12), 0 14px 28px rgba(0,0,0,0.16);
}
.install-guide .ios-steps {
  margin-bottom: 0;
}

/* ===== NOTIFICATION BELL ===== */
.notif-bell-btn {
  position: relative; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85); font-size: 0.88rem;
  border-radius: 50%; transition: all 0.18s;
}
.notif-bell-btn:active { transform: scale(0.88); }
.notif-bell-btn.enabled { color: var(--gold-light); }
.notif-badge {
  position: absolute; top: 0; right: 0;
  width: 8px; height: 8px; background: var(--gold);
  border-radius: 50%; border: 1.5px solid var(--red-dark);
}

/* ===== NOTIF PROMPT CARD ===== */
.notif-prompt-card {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 14px;
}
.notif-prompt-card.hidden { display: none; }
.notif-prompt-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--red); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
  animation: bell-shake 3s ease-in-out infinite;
}
@keyframes bell-shake {
  0%,90%,100%{transform:rotate(0deg);}
  92%{transform:rotate(-12deg);}
  94%{transform:rotate(12deg);}
  96%{transform:rotate(-8deg);}
  98%{transform:rotate(8deg);}
}
.notif-prompt-text { flex: 1; min-width: 0; }
.notif-prompt-title { font-family: var(--font-h); font-size: 0.92rem; font-weight: 800; color: var(--text-pri); }
.notif-prompt-sub { font-size: 0.72rem; color: var(--text-sec); margin-top: 2px; line-height: 1.35; }
.notif-prompt-icon,
.notif-prompt-text { display: none; }
.notif-prompt-btn {
  padding: 8px 14px; background: var(--red); color: white;
  font-family: var(--font-h); font-weight: 800; font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 20px; flex-shrink: 0; transition: all 0.18s;
}
.notif-prompt-btn:active { background: var(--red-dark); transform: scale(0.95); }
.notif-prompt-btn.granted { background: #1A6B35; }
.notif-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-inline-btn {
  padding: 6px 10px;
  background: var(--red);
  color: white;
  font-family: var(--font-h);
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: all 0.18s;
}
.notif-inline-btn:active { background: var(--red-dark); transform: scale(0.96); }
.notif-inline-btn.hidden { display: none; }

/* ===== NOTIF STATUS PILL ===== */
.notif-status-off {
  font-family: var(--font-h); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255,255,255,0.08); color: var(--text-muted);
  padding: 2px 8px; border-radius: 20px; margin-left: 6px;
}
.notif-status-on {
  font-family: var(--font-h); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(77,240,122,0.15); color: #4DF07A;
  padding: 2px 8px; border-radius: 20px; margin-left: 6px;
  border: 1px solid rgba(77,240,122,0.25);
}

/* ===== NOTIF SETTINGS ===== */
.notif-settings-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.notif-setting-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: var(--r-sm);
  padding: 12px 14px;
}
.notif-setting-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.notif-setting-icon.dj { background: rgba(215,43,43,0.2); color: #FF8A8A; }
.notif-setting-icon.song { background: rgba(232,168,32,0.15); color: var(--gold); }
.notif-setting-icon.news { background: rgba(56,189,248,0.12); color: #7DD3FC; }
.notif-setting-info { flex: 1; min-width: 0; }
.notif-setting-label { font-size: 0.88rem; font-weight: 600; color: var(--text-pri); }
.notif-setting-desc { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.toggle-wrap { cursor: pointer; flex-shrink: 0; padding: 4px; }
.ntoggle {
  width: 42px; height: 24px; border-radius: 12px;
  position: relative; transition: background 0.2s;
}
.ntoggle.on { background: var(--red); }
.ntoggle.off { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.1); }
.ntoggle-thumb {
  position: absolute; top: 3px;
  width: 18px; height: 18px; background: white; border-radius: 50%;
  transition: left 0.2s;
}
.ntoggle.on .ntoggle-thumb { left: 21px; }
.ntoggle.off .ntoggle-thumb { left: 3px; }

/* ===== iOS INSTALL SHEET ===== */
.ios-sheet-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.65); align-items: flex-end; justify-content: center;
}
.ios-sheet-overlay.open { display: flex; }
.ios-sheet {
  background: var(--surface); border-radius: 24px 24px 0 0;
  width: 100%; max-width: 430px; padding: 12px 20px 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
  animation: slide-up 0.32s cubic-bezier(0.32,0.72,0,1);
}
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.ios-handle { width: 36px; height: 4px; background: rgba(255,255,255,0.18); border-radius: 2px; margin: 0 auto 20px; }
.ios-sheet-header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.ios-sheet-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--red); }
.ios-sheet-name { font-family: var(--font-h); font-size: 1.1rem; font-weight: 800; color: var(--text-pri); letter-spacing: 0.02em; }
.ios-sheet-sub { font-size: 0.76rem; color: var(--text-sec); margin-top: 3px; }
.ios-steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.ios-step { display: flex; align-items: flex-start; gap: 14px; }
.ios-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--red); color: white;
  font-family: var(--font-h); font-size: 0.88rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.ios-step-body { flex: 1; }
.ios-step-label { font-size: 0.9rem; font-weight: 600; color: var(--text-pri); line-height: 1.2; }
.ios-step-desc { font-size: 0.76rem; color: var(--text-sec); margin-top: 3px; line-height: 1.45; }
.ios-step-pill {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 7px;
  background: var(--surface2); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 5px 11px;
  font-size: 0.75rem; color: var(--text-sec);
}
.ios-step-pill i { color: var(--gold); font-size: 0.8rem; }
.ios-got-it {
  width: 100%; padding: 14px; background: var(--red); color: white;
  font-family: var(--font-h); font-size: 1rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: var(--r-sm); transition: all 0.18s;
}
.ios-got-it:active { background: var(--red-dark); transform: scale(0.97); }
.ios-later { width: 100%; padding: 10px; margin-top: 8px; font-size: 0.82rem; color: var(--text-muted); text-align: center; }

/* ===== DIVIDER ===== */
.divider { height: 1px; background: var(--border); margin: 16px 0; }



/* ===== PLACEHOLDER ===== */
.placeholder-art {
  background: var(--surface2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--red); font-size: 1.1rem;
}
.player-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--text-sec);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}
.player-status[data-state="error"],
.player-status[data-state="offline"] { color: #ffd0d0; }
.player-retry {
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  color: white;
  font: inherit;
}

/* Stable first-paint chat geometry: only the messages scroll, not the composer. */
.live-chat-panel { display:flex; flex-direction:column; overflow:hidden; }
.chat-messages-live { flex:1 1 0; min-height:72px; overflow-y:auto; overflow-anchor:none; }
.chat-panel-header,.chat-input-wrap,.chat-nickbar { flex-shrink:0; }
.chat-status { flex-shrink:0; min-height:40px; }
.chat-nickbar.is-locked { min-height:54px; }
.chat-upload-field,.chat-avatar-preview { min-height:48px; height:48px; }
html.msr-page-hidden *,html.msr-page-hidden *::before,html.msr-page-hidden *::after { animation-play-state:paused !important; }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }
@media (max-height:650px) { .now-playing-hero{padding-top:10px;padding-bottom:10px} .np-progress{display:none} .chat-nickbar.is-editing{max-height:180px;overflow-y:auto} }

/* Contact stays inside the app while the shared radio player continues. */
#nav-contact { background: transparent; border-top: 0; border-left: 0; border-right: 0; font-family: inherit; cursor: pointer; }
#nav-contact:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.pwa-contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 14px; overflow-wrap: anywhere; }
.pwa-contact-card h2 { font-family: var(--font-h); font-size: 1.1rem; color: var(--text-pri); margin: 0 0 10px; }
.pwa-contact-card p { font-size: .85rem; line-height: 1.6; color: var(--text-sec); margin: 0 0 12px; }
.pwa-contact-card a { display: block; color: var(--gold); font-size: .85rem; padding: 12px 0; text-decoration: underline; text-underline-offset: 3px; }
.pwa-contact-card .pwa-contact-notice { border-left: 3px solid var(--gold); padding-left: 12px; margin-bottom: 0; }

/* Comfortable reading and touch controls in the fixed-zoom app. */
.nav-item { font-size: .75rem; letter-spacing: .02em; min-width: 44px; min-height: 44px; }
.np-artist, .rp-artist, .chart-artist, .news-meta,
.chat-name, .chat-status, .form-label, .notif-setting-desc,
.ios-sheet-sub, .ios-step-desc, .notif-prompt-sub { font-size: .875rem; }
.rp-time, .chat-ts { font-size: .75rem; }
.sec-label { font-size: .875rem; }
.news-headline, .pwa-contact-card h2 { font-size: 1.125rem; }
.pwa-contact-card p, .pwa-contact-card a { font-size: 1rem; }
.pwa-contact-card a { min-height: 44px; }
.chat-emoji-toggle, .chat-send, .chat-nickedit, .chat-nicksave,
.chat-reply-cancel, .chat-avatar-clear, .chat-online,
.np-like-btn, .ctrl-btn { min-width: 44px; min-height: 44px; }
