/* biome-ignore-all lint/complexity/noImportantStyles: styles.css 把专场布局用 !important 锁死，移动端要改写这几条只能同级反制；其余一律不用 */
/* 月下听娥 · 移动端（≤959px）专属样式。
 *
 * 这里只放两个媒体查询里的规则：≤959px 的平板 / 手机竖屏，和 ≤767px 的手机细调。
 * 桌面端（≥960px）不命中任何一条，自由画布与专场排版都留在 styles.css 里，这里一概不动。
 *
 * 三条底线（见 DESIGN.md）：
 * 1. 不写死暗色值：新底色、文字、描边、阴影都走变量，并在 [data-theme="light"] 下同步；
 * 2. 不在动态 WebGL / Canvas 背景上给大面积容器叠 backdrop-filter，只留底部导航胶囊这一小块；
 * 3. 触控热区：导航 46px、播控 40~56px、分页点 22×32px。
 */
@media (max-width: 959px) {
  /* ---------- 移动端令牌：只在 ≤959px 生效，桌面端不读取 ---------- */
  :root {
    --m-gutter: 14px;
    --m-top: calc(env(safe-area-inset-top, 0px) + 58px);
    --m-dock-space: calc(76px + env(safe-area-inset-bottom, 0px));
    --m-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
    --m-fab: 52px;
    --m-fab-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    --m-sheet-bg: rgba(24, 20, 44, 0.95);
    --m-dot: var(--ov-border-hover);
    --m-dot-active: var(--ink);
    --m-dock-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 30px rgba(6, 4, 14, 0.45);
    --m-sheet-shadow: 0 18px 44px rgba(4, 2, 14, 0.52);
    --m-fab-shadow: 0 10px 24px rgba(15, 12, 28, 0.34);
  }

  [data-theme="light"] {
    --m-sheet-bg: rgba(248, 251, 255, 0.96);
    --m-dot: var(--border);
    --m-dock-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 26px rgba(28, 49, 96, 0.14);
    --m-sheet-shadow: 0 14px 34px rgba(22, 46, 96, 0.16);
    --m-fab-shadow: 0 8px 20px rgba(22, 46, 96, 0.14);
  }
  /* ---------- 页面骨架：安全区 + 底部留白 ---------- */
  html,
  body {
    overflow-x: clip;
  }

  body {
    padding: 0 var(--m-gutter) var(--m-bottom);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .studio-shell {
    gap: 0;
  }

  /* 竖排以后必须让频道内容横向撑满：桌面规则的 align-items: flex-start 会把内容区压成 0 宽 */
  .workspace-layout {
    align-items: stretch;
    padding: var(--m-top) 0 0;
    gap: 0;
  }

  /* 桌面上 flex: 1 1 0 是为了横向占满；竖排以后主轴变成高度，会让频道内容区只等于 min-height，
     时间线专场于是缩成不到一屏、靠 body 内部滚动。这里改回按内容定高，页面统一在文档层滚动。 */
  .panels.freeform-board {
    flex: none;
    gap: 18px;
  }

  /* 顶部四角轻骨架：头像 + 月下听娥 + 小表情，一行放下；右侧只留主题钮 */
  .corner-brand {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: var(--m-gutter);
    height: 32px;
    gap: 8px;
    padding: 0;
    white-space: nowrap;
  }

  .corner-brand .avatar-btn {
    width: 32px;
    height: 32px;
  }

  .brand-title {
    font-size: 1rem;
    letter-spacing: 0.06em;
  }

  .corner-emoji-btn {
    width: 28px;
    height: 28px;
  }

  .corner-theme-btn {
    top: calc(env(safe-area-inset-top, 0px) + 7px);
    right: var(--m-gutter);
    width: 34px;
    height: 34px;
  }

  .corner-fullscreen-btn {
    display: none;
  }

  /* 触屏没有真正的悬停：按下的反馈交给 :active，不让悬停态粘在最后一次点过的控件上 */
  @media (hover: none) {
    .corner-brand:hover {
      background: transparent;
      border-color: transparent;
    }

    .side-nav-btn:hover {
      background: transparent;
      color: var(--ink-muted);
      transform: none;
    }

    .side-nav-btn.active:hover {
      background: var(--accent);
      color: var(--accent-ink);
    }
  }

  /* 提示条让开顶部骨架，长文案在手机上居中成一条 */
  .toast {
    top: calc(env(safe-area-inset-top, 0px) + 52px);
    width: max-content;
    max-width: calc(100vw - 40px);
    text-align: center;
    z-index: 90;
  }
  /* ---------- 底部悬浮导航胶囊：5 个频道都在拇指可及的位置 ---------- */
  .side-nav.mac-dock {
    position: fixed;
    left: 50%;
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 60;
    width: max-content;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background-color: var(--dock-bg);
    box-shadow: var(--m-dock-shadow);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
  }

  .side-nav.mac-dock .side-nav-list {
    flex-direction: row;
    justify-content: center;
    gap: 4px;
  }

  .side-nav.mac-dock .side-nav-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: transparent;
    touch-action: manipulation;
    transition: transform 140ms ease, background-color 180ms ease, color 180ms ease;
  }

  .side-nav.mac-dock .side-nav-btn.active {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 0 0 4px var(--accent-soft);
  }

  .side-nav.mac-dock .side-nav-btn:active {
    transform: scale(0.9);
  }

  .side-nav.mac-dock .dock-active-dot {
    display: none;
  }

  .side-nav.mac-dock .dock-icon-wrap {
    width: 24px;
    height: 24px;
  }

  .side-nav.mac-dock .dock-svg-icon {
    width: 22px;
    height: 22px;
    stroke-width: 1.9;
  }

  /* ---------- Q 版悬浮球：精巧圆钮，停靠在导航胶囊右上方 ---------- */
  .amb-float-widget .amb-float-btn {
    top: auto;
    right: 14px;
    bottom: var(--m-fab-bottom);
    left: auto;
    width: var(--m-fab);
    height: var(--m-fab);
    z-index: 61;
    background-color: var(--dock-bg);
    box-shadow: var(--m-fab-shadow);
    filter: none;
    touch-action: manipulation;
    transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .amb-float-widget .assist-ring-outer {
    width: 50px;
    height: 50px;
  }

  .amb-float-widget .assist-ring-mid {
    width: 48px;
    height: 48px;
  }

  .amb-float-widget .assist-core {
    width: 46px;
    height: 46px;
  }

  .amb-float-widget .amb-float-dot {
    top: 5px;
    right: 5px;
    width: 5px;
    height: 5px;
  }

  .amb-float-widget .amb-float-bubble {
    right: 14px;
    bottom: calc(var(--m-fab-bottom) + var(--m-fab) + 10px);
    max-width: min(250px, calc(100vw - 28px));
  }
  /* ---------- 悬浮面板 → 底部抽屉（Bottom Sheet）：不压模糊，靠实底保证可读 ---------- */
  .amb-float-widget .amb-float-panel {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: 460px;
    max-height: 76dvh;
    margin: 0 auto;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-color: var(--border-strong);
    border-radius: 22px;
    background-color: var(--m-sheet-bg);
    box-shadow: var(--m-sheet-shadow);
    z-index: 80;
    gap: 12px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    animation: mSheetRise 280ms cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* 抽屉展开时底部让位：导航胶囊与悬浮球退到幕后，不从半透明的抽屉后面透出来 */
  body:has(.amb-float-panel:not(.hidden)) .side-nav.mac-dock,
  body:has(.amb-float-panel:not(.hidden)) .amb-float-btn {
    opacity: 0;
    pointer-events: none;
  }

  @keyframes mSheetRise {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .amb-float-widget .amb-float-panel::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    margin: 0 auto 2px;
    border-radius: 999px;
    background: var(--border-strong);
  }

  .amb-float-widget .amb-popover-head {
    align-items: center;
    cursor: default;
    touch-action: auto;
  }

  .amb-float-widget .amb-popover-title {
    font-size: 1rem;
  }

  .amb-float-widget .scene-pill,
  .amb-float-widget .amb-pill {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 0.8125rem;
  }

  .amb-float-widget #resetLayoutBtn {
    display: none;
  }

  .amb-float-widget .amb-close-btn {
    width: 36px;
    height: 36px;
    font-size: 1.125rem;
  }

  .amb-float-widget .amb-sec-label {
    font-size: 0.8125rem;
  }

  /* 壁纸缩略图：手机两列、平板三列，按 16:10 齐整排布 */
  .amb-float-widget .scene-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 8px;
  }

  .amb-float-widget .scene-card-btn img {
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
  }

  .amb-float-widget .scene-card-btn span {
    font-size: 0.8125rem;
  }

  .amb-float-widget .amb-music-grid {
    gap: 6px;
  }

  .amb-float-widget .amb-presets-grid {
    max-height: min(176px, 26dvh);
  }

  /* 参数滑块：标签在上、滑轨通栏，触控好按 */
  .amb-float-widget .amb-sliders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
  }

  .amb-float-widget .amb-slider-item {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    font-size: 0.8125rem;
  }

  .amb-float-widget .amb-slider-item input[type="range"] {
    height: 28px;
    margin: 0;
  }
  /* ---------- 总览：彻底单列竖向流，模块之间只靠 18px 呼吸间隔 ---------- */
  #freeformBoard .memory-hover-dock,
  #freeformBoard .memory-drag-hint,
  #freeformBoard .memory-hidden-portal {
    display: none;
  }

  .panels.freeform-board .radio-bento-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  /* 01 电台：点阵时钟等比放大居中，星期与日期并成一行 */
  #panel-clock .clock-stage {
    min-height: 0;
    padding: 8px 10px 10px;
    gap: 10px;
    border-radius: 18px;
  }

  #panel-clock .dot-clock-svg {
    width: min(100%, 330px);
    margin: 0 auto;
  }

  #panel-clock .clock-sub {
    justify-content: center;
    gap: 10px;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  #panel-clock .lunar-mood-line {
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    font-size: 0.8125rem;
    line-height: 1.5;
    text-align: center;
  }

  #panel-clock .spectrum-wrap {
    padding-top: 2px;
  }

  #panel-clock .vinyl-stage {
    padding: 6px 10px 18px;
    gap: 12px;
    border-radius: 18px;
  }

  #panel-clock .vinyl-badge {
    letter-spacing: 0.12em;
  }

  #panel-clock .vinyl-disc {
    width: 168px;
    height: 168px;
  }

  /* 02 长虹玻璃画报：通栏画芯 + 播控按键落到第二行，进度条独占一行 */
  .fluted-stage-wrap {
    height: clamp(300px, 40dvh, 360px);
    min-height: 0;
  }

  .fluted-player-controls {
    padding: 10px 12px 8px;
    gap: 8px;
  }

  .fluted-player-controls .music-btns {
    justify-self: center;
    gap: 6px;
  }

  .fluted-player-controls .music-ctrl-btn {
    width: 40px;
    height: 40px;
  }

  .fluted-player-controls .music-ctrl-btn.primary {
    width: 48px;
    height: 48px;
  }

  .fluted-player-controls .music-heart-btn {
    width: 36px;
    height: 36px;
  }

  /* 滑轨看起来仍是 5px 细线，手指按得到的高度放大到 24px */
  .music-slider {
    height: 24px;
    border-radius: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 5px;
  }

  .music-slider::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
  }

  .music-progress-row {
    gap: 8px;
  }

  /* 画报右上角的「01 / 112」：根字号是 15px，原字号只有 10.5px，手机上抬到 11px 以上 */
  .fluted-counter-pill {
    font-size: 0.75rem;
  }
  /* 03 夜读播控：信息一行、按键一行居中、进度一行 */
  .deck-box {
    padding: 12px;
  }

  body[data-page="overview"] .deck-controls,
  body[data-page="overview"] .deck-top {
    justify-content: center;
  }

  .ctrl-btn {
    width: 40px;
    height: 40px;
  }

  .ctrl-btn.primary {
    width: 48px;
    height: 48px;
  }

  .seek-range {
    height: 28px;
  }

  .subdrawer-trigger {
    min-height: 42px;
  }

  .reading-lamp-btn {
    min-height: 36px;
    padding: 6px 10px;
  }

  .reading-row-play {
    width: 38px;
    height: 38px;
  }

  /* 04 碎碎念：日期 + 搜索一行，四个筛选胶囊平分第二行 */
  .filter-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px;
  }

  .filter-bar .date-popover-wrap {
    grid-column: 1;
    grid-row: 1;
  }

  .filter-bar .pill-group {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  /* 输入框字号写死 16px（根字号是 15px，1rem 不够）：iOS 上小于 16px 的输入框一聚焦就会把整页放大 */
  .filter-bar .studio-search {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 36px;
    padding: 6px 12px;
    font-size: 16px;
  }

  .filter-pill {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.8125rem;
  }

  .date-popover-btn {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.8125rem;
  }

  /* 日期下拉要浮在后面的模块之上，所以碎碎念这一格排在最前 */
  #panel-timeline {
    z-index: 30;
  }

  /* 日期下拉只有一小块，保留原有的轻度模糊：去掉模糊后，底下卡片的字会从 94% 的底色里透出来 */
  .date-popover-menu {
    max-height: min(260px, 42dvh);
  }

  .date-popover-opt {
    min-height: 38px;
    padding: 9px 10px;
    font-size: 0.8125rem;
  }

  .post-card {
    padding: 13px 12px;
  }

  .replay-btn,
  .small-btn.icon-only {
    min-height: 36px;
  }

  .replay-btn {
    padding: 7px 12px;
    font-size: 0.8125rem;
  }

  .small-btn.icon-only {
    width: 36px;
  }

  /* 正文里的链接短胶囊：上下各留 2px，贴着 11px 字号的呼吸下限 */
  .post-card .post-link-chip {
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .post-card .post-image-btn img {
    max-height: 46dvh;
    border-radius: 12px;
  }

  /* 05 记忆鱼缸：通栏一方水缸 */
  #panel-archive .memory-stage-wrap {
    height: clamp(240px, 36dvh, 320px);
    min-height: 0;
    border-radius: 18px;
  }
  /* ---------- 01 电台专场：上半「时钟 + 黑胶 + 三行歌词」居中成一座台，下半播控卡与节目单 ---------- */
  body[data-page="radio"] .panels.freeform-board {
    gap: 26px !important;
    padding: var(--m-top) 0 0 !important;
  }

  body[data-page="radio"] #panel-clock .clock-stage {
    align-items: center !important;
    text-align: center !important;
  }

  body[data-page="radio"] .lunar-clock-digits {
    font-size: clamp(3.75rem, 21vw, 5.5rem);
  }

  body[data-page="radio"] #panel-clock .clock-sub {
    justify-content: center !important;
    font-size: 0.9375rem;
    white-space: nowrap;
  }

  body[data-page="radio"] #panel-clock .lunar-mood-line {
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    font-size: 0.8125rem;
    line-height: 1.5;
    text-align: center;
  }

  body[data-page="radio"] #panel-clock .spectrum-wrap {
    margin-top: 4px;
  }

  body[data-page="radio"] #panel-clock .vinyl-stage {
    align-items: center !important;
    text-align: center;
  }

  body[data-page="radio"] #panel-clock .vinyl-disc-col {
    flex-direction: column !important;
  }

  body[data-page="radio"] #panel-clock .vinyl-disc {
    width: 168px !important;
    height: 168px !important;
  }

  body[data-page="radio"] .vinyl-meta-col {
    align-items: center;
    gap: 4px;
    max-width: 100%;
  }

  body[data-page="radio"] .vinyl-status {
    justify-content: center;
  }

  .vinyl-onair-title {
    max-width: 100%;
    font-size: 1rem;
  }

  .vinyl-onair-sub {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 三行无框歌词：长句最多两行，当前句居中放大 */
  body[data-page="radio"] .radio-lyric-wrap,
  body[data-page="radio"] .radio-lyric-box {
    max-width: 100%;
  }

  body[data-page="radio"] .radio-lyric-box {
    min-height: 96px;
    padding: 6px 0;
    gap: 10px;
    text-align: center;
  }

  body[data-page="radio"] .radio-lyric-line.is-near,
  body[data-page="radio"] .radio-lyric-line.is-active {
    display: -webkit-box;
    padding: 0 6px;
    overflow: hidden;
    font-size: 0.9375rem;
    line-height: 1.6;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  body[data-page="radio"] .radio-lyric-line.is-active {
    font-size: 1.125rem;
  }

  body[data-page="radio"] .radio-lyric-wrap .radio-fulltext-btn {
    top: -4px;
    right: -4px;
    width: 38px;
    height: 38px;
    opacity: 1;
  }

  body[data-page="radio"] .lunar-quote-card {
    max-width: 100%;
  }
  /* 焦点播放卡：封面占左侧两行，播控按键通栏居中 */
  body[data-page="radio"] .deck-box {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px 16px;
    border-radius: 20px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body[data-page="radio"] .deck-cover-wrap {
    width: 92px;
    height: 92px;
    border-radius: 14px;
  }

  /* 封面旁边只有半栏宽：标题放开成两行，别一行就省略掉 */
  body[data-page="radio"] .now-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.4;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  body[data-page="radio"] .deck-main-col {
    display: contents;
  }

  body[data-page="radio"] .now-eyebrow {
    font-size: 0.75rem;
  }

  body[data-page="radio"] .deck-now {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    width: 100%;
  }

  body[data-page="radio"] .progress-row {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  body[data-page="radio"] .deck-controls {
    grid-column: 1 / -1;
    grid-row: 3;
    gap: 12px;
    width: 100%;
  }

  body[data-page="radio"] .deck-controls .ctrl-btn {
    width: 46px;
    height: 46px;
  }

  body[data-page="radio"] .deck-controls .ctrl-btn.primary {
    width: 56px;
    height: 56px;
  }

  body[data-page="radio"] .deck-controls .ctrl-btn.primary svg {
    width: 22px;
    height: 22px;
  }

  /* 夜读节目单：去掉序号列，把宽度让给标题（最多两行），整行都是手指可点的范围 */
  .reading-playlist-card {
    gap: 10px;
    padding: 14px 10px 10px;
    border-radius: 20px;
  }

  .reading-playlist-head {
    gap: 8px;
    padding-bottom: 8px;
  }

  .reading-playlist-title-wrap {
    gap: 6px;
    font-size: 0.875rem;
  }

  .reading-filter-lamps {
    gap: 2px;
  }

  .reading-rows {
    gap: 4px;
  }

  .reading-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 68px;
    padding: 10px 8px;
    border-radius: 14px;
  }

  .reading-row-num {
    display: none;
  }

  .reading-row-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .reading-row-title {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.35;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .reading-row-right {
    gap: 8px;
  }
  /* ---------- 02 音乐画报专场：舞台、播控、歌单自上而下排成一列，歌单不再和舞台左右硬挤 ---------- */
  body[data-page="music"] .panels.freeform-board {
    align-items: stretch;
    justify-content: flex-start;
    padding: var(--m-top) 0 0;
  }

  body[data-page="music"] #panel-music {
    height: auto !important;
  }

  body[data-page="music"] .fluted-music-card {
    height: auto;
    justify-content: flex-start;
  }

  body[data-page="music"] .fluted-stage-wrap {
    flex: none;
    width: 100%;
    max-width: none;
    min-height: 0;
    max-height: none;
    height: clamp(360px, 56dvh, 480px);
    border-radius: 20px;
  }

  body[data-page="music"] .fluted-editorial-overlay {
    left: 18px;
    right: 18px;
    bottom: 18px;
    gap: 6px;
  }

  /* 播控条：通栏轻雾托底，不叠模糊 */
  body[data-page="music"] .fluted-player-controls {
    width: 100%;
    padding: 14px 14px 10px;
    border-color: var(--ov-border);
    border-radius: 20px;
    background-color: var(--ov-bar-bg);
    background-image: none;
    box-shadow: var(--ov-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body[data-page="music"] .music-transport-row {
    column-gap: 10px;
    row-gap: 10px;
  }

  body[data-page="music"] .music-btns {
    gap: 6px;
    padding-top: 0;
  }

  body[data-page="music"] .music-split-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    height: auto;
  }

  body[data-page="music"] .music-split-shell.playlist-hidden {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  /* 歌单抽屉：展开后是一张轻雾卡（专场上落在播控条下方），列表自身限高滚动 */
  .music-split-shell:not(.playlist-hidden) .music-side-playlist {
    max-height: min(400px, 48dvh);
    padding: 12px;
    border: 1px solid var(--ov-border);
    border-radius: 20px;
    background-color: var(--ov-card-bg);
    box-shadow: var(--ov-shadow);
  }

  .music-side-playlist .amb-close-btn {
    width: 36px;
    height: 36px;
  }

  .music-side-playlist .music-filter-tab {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.8125rem;
  }

  /* 同搜索框：16px 以上，iOS 聚焦时才不会放大页面 */
  .music-side-playlist .music-catalog-search {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 16px;
  }

  .music-side-playlist .music-catalog-item {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 50px;
    padding: 7px 10px;
  }

  .music-side-playlist .music-catalog-thumb {
    width: 36px;
    height: 36px;
  }

  .music-side-playlist .music-catalog-name {
    font-size: 0.875rem;
  }

  .music-side-playlist .music-catalog-artist {
    font-size: 0.75rem;
  }
  /* ---------- 03 碎碎念专场：筛选条与动态卡通栏，轻雾托底、不叠模糊 ---------- */
  body[data-page="timeline"] .panels.freeform-board {
    padding: var(--m-top) 0 0;
  }

  body[data-page="timeline"] .filter-bar {
    border-color: var(--ov-border);
    background-color: var(--ov-bar-bg);
    box-shadow: var(--ov-shadow);
    background-image: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body[data-page="timeline"] .day-label {
    padding: 3px 10px;
    border-radius: 8px;
    background-color: var(--ov-bar-bg);
  }

  body[data-page="timeline"] .post-card {
    border-color: var(--ov-border);
    background-color: var(--ov-card-bg);
    box-shadow: var(--ov-shadow);
    background-image: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* ---------- 灯箱与完整文本 / 歌词弹窗：左右各留 12px，自身滚动 ---------- */
  .lightbox {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: 80dvh;
    padding: 10px 14px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: var(--m-sheet-bg);
  }

  .lightbox-bar {
    position: sticky;
    top: -10px;
    z-index: 2;
    margin: -4px 0 8px;
    padding: 6px 0;
    background: var(--m-sheet-bg);
  }

  .lightbox-bar .ghost-btn {
    min-height: 36px;
    padding: 8px 12px;
  }

  .lightbox .lightbox-stage img {
    max-height: calc(80dvh - 104px);
  }

  .radio-fulltext-sheet {
    width: 100%;
    max-height: none;
    padding: 4px 2px 8px;
    overflow: visible;
  }

  .radio-fulltext-body {
    font-size: 1rem;
    line-height: 1.85;
  }

  .radio-fulltext-line {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 4px 0;
    font-size: 1rem;
  }
  /* ---------- 04 记忆长廊专场：纯净深空 / 月白里居中一方星海，标题与分页条不贴底 ---------- */
  /* 频道内容区不再撑高页面，body 得自己占满一屏，纯净底色才铺得到底 */
  body[data-page="memory"] {
    min-height: 100vh;
  }

  body[data-page="memory"] #panel-archive {
    inset: var(--m-top) 0 var(--m-dock-space) 0 !important;
    height: auto !important;
    align-items: center;
    justify-content: center;
  }

  body[data-page="memory"] #panel-archive .panel-body,
  body[data-page="memory"] #panel-archive .memory-hall-card,
  body[data-page="memory"] #panel-archive .memory-stage-wrap {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
  }

  body[data-page="memory"] #panel-archive .panel-body {
    justify-content: center;
  }

  body[data-page="memory"] #panel-archive .memory-hall-card {
    flex: none;
    height: min(clamp(380px, 58dvh, 520px), calc(100dvh - var(--m-top) - var(--m-dock-space) - 8px)) !important;
  }

  body[data-page="memory"] #panel-archive .memory-stage-wrap {
    touch-action: pan-y;
  }

  body[data-page="memory"] #panel-archive .memory-footer-overlay {
    bottom: 18px;
    gap: 10px;
  }

  .memory-title-trigger {
    max-width: min(92%, 420px);
    padding: 9px 18px 10px;
    border-radius: 14px;
  }

  .memory-title-main {
    font-size: 1.0625rem;
  }

  .memory-title-kicker {
    font-size: 0.75rem;
  }

  .memory-pager-bar {
    gap: 4px;
    padding: 0 6px;
  }

  .memory-nav-btn {
    width: 40px;
    height: 40px;
  }

  /* 分页点：看得见的仍是 6px 小点，手指按得到的范围放大到 22×32 */
  #memoryDots {
    gap: 2px;
  }

  #memoryDots .memory-dot {
    position: relative;
    width: 22px;
    height: 32px;
    background: transparent;
  }

  #memoryDots .memory-dot::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 99px;
    background: var(--m-dot);
    transition: width 180ms ease, margin-left 180ms ease, background-color 180ms ease;
  }

  #memoryDots .memory-dot.active {
    width: 22px;
    background: transparent;
  }

  #memoryDots .memory-dot.active::before {
    width: 20px;
    margin-left: -10px;
    background: var(--m-dot-active);
  }

  /* 手账浮层：贴着星海两侧各留 12px，停在双层标题上方，内容多时自己滚动 */
  body[data-page="memory"] #panel-archive .memory-story-drawer {
    left: 12px;
    right: 12px;
    bottom: 134px;
    max-height: calc(100% - 150px);
    padding: 14px 16px 16px;
    border-radius: 16px;
  }

  .memory-story-close {
    min-height: 32px;
    padding: 5px 12px;
  }

  .memory-story-text {
    font-size: 0.9375rem;
    line-height: 1.75;
  }
}

@media (max-width: 767px) {
    /* 手机竖屏：抽屉里的缩略图两列、滑块一列；总览里展开的歌单也落到画报下方 */
    .amb-float-widget .scene-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .amb-float-widget .amb-sliders {
      grid-template-columns: minmax(0, 1fr);
    }

    .amb-float-widget .amb-slider-item {
      flex-direction: row;
      align-items: center;
    }

    .amb-float-widget .amb-slider-item span {
      flex: 0 0 72px;
    }
}
