/* =====================================================================
   css/shell.css — PULSE v2 Shell & Navigation (Live Layer)
   Owner: shell worker. Uses tokens from pulse-ds.css & theme variables.
   ===================================================================== */

/* ---------- Brand Mark & Wordmark ---------- */
.sh-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--ds-grad);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--primary) 65%, transparent);
}
.sh-logo-mark svg {
  width: 60%;
  height: 60%;
}
.sh-wordmark {
  font-family: var(--ds-font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--foreground);
}

/* ---------- Live Indicator on Nav Icons ---------- */
.sh-ico-live {
  position: absolute;
  top: -1px;
  right: -2px;
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 2px var(--background);
  pointer-events: none;
}

/* ---------- Desktop Left Rail ---------- */
.sh-rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 14px 16px 16px 8px;
  flex-direction: column;
  justify-content: space-between;
  background: var(--background);
  overflow-y: auto;
}
.sh-rail-top {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.sh-rail-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 9999px;
  width: fit-content;
  transition: background-color 150ms ease, transform 120ms ease;
}
.sh-rail-logo:hover {
  background: var(--ds-hover);
}
.sh-rail-logo:active {
  transform: scale(.97);
}
.sh-rail-logo .sh-wordmark {
  font-size: 20px;
  line-height: 1;
}
.sh-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.sh-rail-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 9999px;
  color: var(--foreground);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  transition: background-color 150ms ease, transform 120ms ease;
}
.sh-rail-item:hover {
  background: var(--ds-hover);
}
.sh-rail-item:active {
  transform: scale(.98);
}
.sh-rail-item.is-active {
  font-weight: 800;
  color: var(--foreground);
}

/* ---------- Sidebar My Live Radio Player Widget (shown when Live Radio is turned ON) ---------- */
.sh-side-radio {
  margin-top: 8px;
  padding: 10px 11px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, #f43f5e 26%, var(--card-border));
  background: linear-gradient(145deg,
    color-mix(in srgb, #f43f5e 7%, var(--card)),
    color-mix(in srgb, var(--primary) 6%, var(--card)));
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.sh-side-radio[data-playing="true"] {
  border-color: color-mix(in srgb, #f43f5e 52%, transparent);
  box-shadow: 0 6px 20px -10px color-mix(in srgb, #f43f5e 55%, transparent);
}

.sh-side-radio-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sh-side-radio-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e11d48;
  flex-shrink: 0;
}

[data-theme="dark"] .sh-side-radio-live,
[data-theme="oled"] .sh-side-radio-live {
  color: #fb7185;
}

.sh-side-radio-freq {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted-foreground);
  flex: 1;
  min-width: 0;
}

.sh-side-radio-sched {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: background-color 140ms ease, color 140ms ease;
}

.sh-side-radio-sched:hover {
  background: var(--ds-hover);
  color: var(--foreground);
}

.sh-side-radio-sched svg {
  width: 14px;
  height: 14px;
}

.sh-side-radio-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.sh-side-radio-play {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f43f5e, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 4px 12px -4px rgba(244, 63, 94, .55);
  transition: transform 120ms ease, filter 140ms ease;
}

.sh-side-radio-play:hover {
  filter: brightness(1.07);
}

.sh-side-radio-play:active {
  transform: scale(0.93);
}

.sh-side-radio-play svg {
  width: 15px;
  height: 15px;
}

.sh-side-radio-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.sh-side-radio-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground);
}

.sh-side-radio-show {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  min-width: 0;
}

.sh-side-radio[data-playing="true"] .sh-side-radio-show {
  color: #e11d48;
  font-weight: 600;
}

[data-theme="dark"] .sh-side-radio[data-playing="true"] .sh-side-radio-show,
[data-theme="oled"] .sh-side-radio[data-playing="true"] .sh-side-radio-show {
  color: #fb7185;
}

.sh-side-radio[data-playing="true"] .pf-onair-eq {
  display: inline-flex;
}

.sh-drawer-radio-wrap {
  padding: 2px 12px 6px;
}

.sh-drawer-radio-wrap .sh-side-radio {
  margin-top: 0;
}

/* Collapsed 72px desktop rail (Messages / Studio): compact centered radio button */
body.route-messages .sh-side-radio--rail,
body.route-studio .sh-side-radio--rail {
  padding: 6px;
  align-items: center;
  border-radius: 9999px;
}
.sh-rail-ico {
  position: relative;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sh-rail-ico svg.sh-ico {
  width: 24px;
  height: 24px;
}
.sh-rail-dot {
  display: none;
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: 800;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--background);
}
.sh-rail-sep {
  height: 1px;
  margin: 10px 14px;
  background: var(--border);
}
.sh-compose-btn {
  margin-top: 14px;
  width: 100%;
  max-width: 220px;
  height: 46px;
  font-family: var(--ds-font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.sh-rail-foot {
  padding-top: 12px;
  width: 100%;
}
.sh-rail-account {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 8px 8px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 150ms ease, transform 120ms ease;
}
.sh-rail-account:hover {
  background: var(--ds-hover);
}
.sh-rail-account:active {
  transform: scale(.985);
}
.sh-rail-acct-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
  min-width: 0;
}
.sh-rail-acct-handle {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 1px;
}
.sh-rail-more {
  width: 34px;
  height: 34px;
  color: var(--muted-foreground);
}

/* ---------- Icon-Only Rail (768px - 1179px) ---------- */
@media (min-width: 768px) and (max-width: 1179px) {
  body:not(.mobile-sim) #leftSidebar {
    padding: 14px 6px 16px !important;
  }
  body:not(.mobile-sim) .sh-rail-logo {
    padding: 7px !important;
    margin: 0 auto 10px !important;
    justify-content: center !important;
  }
  body:not(.mobile-sim) .sh-rail-item {
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    justify-content: center !important;
    gap: 0 !important;
  }
  body:not(.mobile-sim) .sh-rail-dot {
    display: flex !important;
  }
  body:not(.mobile-sim) .sh-compose-btn {
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    margin: 14px auto 0 !important;
    border-radius: 9999px !important;
  }
  body:not(.mobile-sim) .sh-rail-account {
    width: 48px !important;
    height: 48px !important;
    padding: 4px !important;
    margin: 0 auto !important;
    justify-content: center !important;
  }
}
@media (min-width: 1024px) and (max-width: 1179px) {
  body:not(.mobile-sim) #desktopGrid {
    grid-template-columns: 72px minmax(0, 600px) 300px !important;
    max-width: 992px !important;
  }
  body:not(.mobile-sim) #desktopGrid.grid-expanded {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    max-width: 960px !important;
  }
}

/* ---------- Desktop Right Sidebar ---------- */
.sh-rside {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 0 6px 24px 16px;
  overflow-y: auto;
  background: var(--background);
}
.sh-rstack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 12px;
}
.sh-rsearch {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 10px 0 6px;
  margin-top: -10px;
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
}
.sh-rcard {
  background: var(--background);
}
.sh-rcard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 8px;
}
.sh-rcard-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sh-rcard-title {
  font-family: var(--ds-font-display);
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--foreground);
}
.sh-rcard-head .ds-live {
  font-size: 11px;
  flex-shrink: 0;
}
.sh-rcard-sub {
  padding: 0 14px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sh-rcountry {
  height: 28px;
  padding: 0 10px;
  gap: 6px;
  font-size: 12px;
  max-width: 100%;
}
.sh-rlist > .sh-rrow + .sh-rrow {
  border-top: 1px solid var(--border);
}
.sh-rrow {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.sh-rrow.items-center {
  align-items: center;
}
.sh-rrow:hover {
  background: var(--ds-hover);
}
.sh-rrow:active {
  background: var(--ds-press);
}
.sh-meta {
  font-size: 12.5px;
  color: var(--muted-foreground);
  line-height: 1.35;
}
.sh-rrow-title {
  font-family: var(--ds-font-display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--foreground);
  line-height: 1.3;
  margin-top: 1px;
}
.sh-rrow-head {
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.35;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sh-rrow-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--foreground);
  min-width: 0;
}
.sh-play {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--content);
  color: var(--foreground);
  transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
}
.sh-play:hover {
  background: var(--ds-press);
  transform: scale(1.04);
}
.sh-play:active {
  transform: scale(.93);
}
.sh-play.is-playing {
  background: var(--ds-grad);
  color: #fff;
  box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--primary) 65%, transparent);
}
.sh-play svg {
  width: 16px;
  height: 16px;
}
.sh-rfoot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  padding: 2px 6px 12px;
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.5;
}
.sh-rfoot button:hover {
  color: var(--foreground);
  text-decoration: underline;
}
.sh-rcopy {
  width: 100%;
  font-size: 12px;
  opacity: .85;
}

/* ---------- Mobile Top Bar & Bottom Bar ---------- */
#mobileTopBar {
  min-height: 52px;
  padding: 4px 12px;
  background: var(--ds-glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: transform 240ms var(--ds-ease), margin-top 240ms var(--ds-ease), opacity 200ms ease, border-radius 0.32s ease;
}
body.chrome-hidden #mobileTopBar {
  margin-top: calc(-1 * var(--sh-top-h, 52px));
  transform: translate3d(0, -100%, 0);
  opacity: 0;
  pointer-events: none;
}
#mobileTopLeft,
#mobileTopRight {
  display: flex;
  align-items: center;
  min-width: 76px;
}
#mobileTopRight {
  justify-content: flex-end;
  gap: 2px;
}
#mobileTopCenter {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sh-top-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  padding: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease;
}
.sh-top-avatar:active {
  transform: scale(.92);
}
.sh-top-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border-radius: 9999px;
  transition: transform 120ms ease;
}
.sh-top-brand:active {
  transform: scale(.96);
}
.sh-top-brand .sh-wordmark {
  font-size: 18px;
  line-height: 1;
}
.sh-top-title {
  font-family: var(--ds-font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-top-peer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ds-font-display);
  font-size: 15.5px;
  font-weight: 800;
  color: var(--foreground);
  min-width: 0;
  max-width: 100%;
}
.sh-top-btn {
  position: relative;
  width: 38px;
  height: 38px;
}
.sh-top-btn svg {
  width: 22px;
  height: 22px;
}
.sh-top-badge {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 11px;
  line-height: 1;
  border: 2px solid var(--background);
}

#mobileBottomNav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  min-height: 54px;
  padding: 4px 6px max(6px, env(safe-area-inset-bottom));
  background: var(--ds-glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-top: 1px solid var(--border);
  transition: transform 240ms var(--ds-ease), border-radius 0.32s ease;
}
.sh-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  color: var(--muted-foreground);
  transition: color 150ms ease, transform 120ms ease;
}
.sh-tab:active {
  transform: scale(.9);
}
.sh-tab.is-active {
  color: var(--foreground);
}
.sh-tab-ico {
  position: relative;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sh-tab-ico svg.sh-ico {
  width: 24px;
  height: 24px;
}
.sh-create {
  width: 42px;
  height: 34px;
  border-radius: 12px;
  background: var(--ds-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--primary) 70%, transparent);
  transition: transform 140ms ease;
}
.sh-create svg {
  width: 20px;
  height: 20px;
}
.sh-tab:active .sh-create {
  transform: scale(.92);
}
.sh-tab-avatar {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: border-color 150ms ease;
}
.sh-tab-avatar.is-active {
  border-color: var(--foreground);
}
.sh-tab-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
}

/* ---------- Non-Overlapping Back-to-Top (Outer desktop margin OR slim top-center scroll-up pill) ---------- */
#backToTopBtn {
  width: 38px;
  height: 38px;
  padding: 0;
  gap: 5px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  border: 1px solid var(--card-border);
  color: var(--foreground);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .28);
  transition: opacity 200ms ease, transform 220ms var(--ds-ease), border-color 160ms ease, box-shadow 180ms ease;
}
#backToTopBtn .btt-lbl {
  display: none;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}
#backToTopBtn.is-top-pill {
  width: auto !important;
  height: 32px !important;
  padding: 0 13px 0 10px !important;
  transform: translate(-50%, -10px) scale(.94);
  z-index: 25;
}
#backToTopBtn.is-top-pill .btt-lbl {
  display: inline;
}
#backToTopBtn.is-top-pill.btt-visible {
  transform: translate(-50%, 0) scale(1);
}
#backToTopBtn.is-top-pill:hover {
  transform: translate(-50%, -1px) scale(1.03);
}
body.mobile-sim #appViewport {
  max-height: calc(100vh - 24px);
  margin: 12px auto;
}
body.mobile-sim #backToTopBtn.is-top-pill {
  position: absolute !important;
}

/* ---------- Mobile Navigation Drawer v2 ---------- */
.sh-drawer-head {
  padding: max(14px, env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  flex-shrink: 0;
}
body.mobile-sim #mobileDrawer .sh-drawer-head {
  padding-top: 18px;
}
.sh-drawer-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sh-drawer-topact {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sh-drawer-switch {
  height: 32px;
  padding: 0 10px 0 6px;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  background: var(--content);
  color: var(--foreground);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background-color 150ms ease, transform 120ms ease;
}
.sh-drawer-switch:hover {
  background: var(--ds-press);
}
.sh-drawer-switch:active {
  transform: scale(.96);
}
#drawerAccStack {
  display: inline-flex;
  align-items: center;
}
#drawerAccStack:empty {
  display: none;
}
#drawerAccStack img + img {
  margin-left: -6px;
}
#drawerAccStack img {
  border: 2px solid var(--content);
}
.sh-drawer-identity {
  margin-top: 10px;
  cursor: pointer;
}
#drawerName {
  font-family: var(--ds-font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 5px;
}
#drawerSub {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}
#drawerStats {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted-foreground);
}
#drawerStats strong {
  color: var(--foreground);
  font-weight: 700;
}
#drawerAccountTray:not(.hidden) {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sh-acc-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  transition: background-color 120ms ease, transform 120ms ease;
}
.sh-acc-row:hover,
.sh-acc-row.is-active {
  background: var(--content);
}
.sh-acc-row:active {
  transform: scale(.98);
}
.sh-acc-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
}
.sh-acc-check {
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sh-acc-check svg {
  width: 12px;
  height: 12px;
}
.sh-acc-add {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: var(--content);
  border: 1px dashed var(--card-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
  flex-shrink: 0;
}
.sh-acc-add svg {
  width: 18px;
  height: 18px;
}
.sh-drawer-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 10px;
}
.sh-drawer-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sh-drawer-sep {
  height: 1px;
  margin: 8px 10px;
  background: var(--border);
}
.sh-drawer-item {
  padding: 10px 12px !important;
  border-radius: 14px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  gap: 14px !important;
  justify-content: flex-start !important;
  color: var(--foreground) !important;
}
.sh-drawer-item:hover {
  background: var(--ds-hover) !important;
}
.sh-drawer-item.is-active {
  background: var(--content) !important;
  color: var(--foreground) !important;
  font-weight: 800 !important;
}
.sh-drawer-ico {
  position: relative;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sh-drawer-ico svg {
  width: 22px;
  height: 22px;
}
.sh-drawer-foot {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  background: var(--background);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sh-drawer-foot-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sh-drawer-settings {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--foreground);
  transition: background-color 120ms ease, transform 120ms ease;
}
.sh-drawer-settings:hover {
  background: var(--ds-hover);
}
.sh-drawer-settings:active {
  transform: scale(.98);
}
.sh-drawer-theme {
  width: 40px;
  height: 40px;
  background: var(--content);
  color: var(--foreground);
}
.sh-drawer-install {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--link);
  transition: background-color 120ms ease;
}
.sh-drawer-install:hover {
  background: var(--ds-hover);
}
.sh-drawer-install svg {
  width: 17px;
  height: 17px;
}

/* ---------- Dismissible Smart Install Banner (Mobile Only) ---------- */
.sh-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  z-index: 32;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--card-border);
  box-shadow: var(--ds-shadow-pop);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 240ms var(--ds-ease), transform 240ms var(--ds-ease), bottom 240ms var(--ds-ease);
}
.sh-install-banner.is-in {
  opacity: 1;
  transform: translateY(0);
}
.sh-install-banner.hidden {
  display: none !important;
}
@media (min-width: 768px) {
  body:not(.mobile-sim) .sh-install-banner {
    display: none !important;
  }
}
body.radio-mini-active .sh-install-banner {
  bottom: calc(138px + env(safe-area-inset-bottom, 0px));
}
.sh-install-copy {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.sh-install-title {
  font-family: var(--ds-font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--foreground);
}
.sh-install-sub {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-install-close {
  width: 30px;
  height: 30px;
  color: var(--muted-foreground);
}
.sh-install-close svg {
  width: 16px;
  height: 16px;
}

/* Coordinator: install banner never overlaps radio mini bar / back-to-top / pinned reply bars */
body.radio-mini-active #installBanner { display: none !important; }
body.install-banner-on #backToTopBtn { opacity: 0 !important; pointer-events: none !important; }

/* Payment confirmation floating receipt card: crisp surface & no overlap with bottom bars */
#payConfirmFloat {
  background: color-mix(in srgb, var(--background) 96%, transparent) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
}
@media (max-width: 767px) {
  body.radio-mini-active #payConfirmFloat,
  body.install-banner-on #payConfirmFloat {
    bottom: calc(146px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
body.mobile-sim.radio-mini-active #payConfirmFloat,
body.mobile-sim.install-banner-on #payConfirmFloat {
  bottom: 146px !important;
}
