﻿/* ===================== 外卖神券 · iOS 风样式 ===================== */
/* 圆角、弹簧曲线、软阴影、毛玻璃 */

:root,
[data-theme="light"] {
  --bg-page: #fffaf6;
  --bg-page-2: #fff4ec;
  --text-1: #1c1c1e;
  --text-2: #58585e;
  --text-3: #8e8e93;
  --hairline: rgba(60, 60, 67, 0.07);
  --hairline-soft: rgba(60, 60, 67, 0.04);
  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #ffffff;
  --shadow-sm: 0 2px 10px rgba(255, 138, 91, 0.10);
  --shadow-md: 0 8px 28px rgba(255, 138, 91, 0.16);
  --shadow-lg: 0 20px 50px rgba(255, 138, 91, 0.22);
  --primary: #ff6a3d;
  --primary-2: #ff8a5b;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text-1);
  background:
    radial-gradient(1200px 700px at 85% -10%, #ffd0b8 0%, transparent 55%),
    radial-gradient(900px 600px at -10% 20%, #ffe4d2 0%, transparent 55%),
    radial-gradient(700px 500px at 50% 110%, #ffd8c4 0%, transparent 60%),
    linear-gradient(180deg, #fff8f3 0%, #ffffff 70%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }

::selection { background: rgba(255, 106, 61, 0.22); }
::-webkit-scrollbar { width: 0; height: 0; }

/* ===================== 背景光晕（柔和漂浮） ===================== */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(70px);
  opacity: 0.6;
  animation: floatOrb 18s ease-in-out infinite;
  will-change: transform;
}
.orb-1 { width: 360px; height: 360px; background: #ff9a6b; top: -120px; left: -80px; animation-delay: 0s; }
.orb-2 { width: 320px; height: 320px; background: #ffb088; top: 30%; right: -120px; animation-delay: 3.6s; }
.orb-3 { width: 280px; height: 280px; background: #ffc89e; bottom: -80px; left: 15%; animation-delay: 7.2s; }
.orb-4 { width: 240px; height: 240px; background: #ff8d5a; top: 60%; left: 45%; animation-delay: 10.8s; opacity: 0.4; }
.orb-5 { width: 200px; height: 200px; background: #ff7a4a; top: 80%; right: 20%; animation-delay: 14s; opacity: 0.35; }
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, -25px) scale(1.06); }
  50% { transform: translate(-20px, 30px) scale(0.96); }
  75% { transform: translate(25px, 20px) scale(1.04); }
}

/* ===================== App 容器 ===================== */
.app {
  position: relative; z-index: 2;
  max-width: 760px; margin: 0 auto;
  padding: 20px 18px 0;
}

/* ===================== 顶部欢迎区 ===================== */
.hello {
  padding: 8px 6px 14px;
  animation: helloIn 0.7s var(--spring) both;
}
@keyframes helloIn {
  0% { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hello-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 4px 4px 14px;
}

.hello-greet { flex: 1; min-width: 0; }
.hello-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 100px;
  font-size: 11.5px; font-weight: 600; color: var(--primary);
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(255, 90, 60, 0.08);
}
.hello-eyebrow::before {
  content: ''; width: 6px; height: 6px;
  background: #34c759; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.6);
  animation: livePulse 1.6s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 199, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

.hello-title {
  margin: 10px 0 4px;
  font-size: 30px; font-weight: 800; letter-spacing: -0.5px;
  line-height: 1.15;
  background: linear-gradient(135deg, #ff5a3c 0%, #ff8a5b 60%, #ffb088 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: titleShimmer 6s ease-in-out infinite;
  background-size: 200% 200%;
}
@keyframes titleShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hello-sub {
  margin: 0;
  font-size: 14px; color: var(--text-2);
  letter-spacing: 0.2px;
  display: flex; align-items: center; gap: 6px;
}
.hello-sub::before {
  content: '✨'; font-size: 13px;
  animation: sparkle 2s ease-in-out infinite;
}
@keyframes sparkle {
  0%, 100% { opacity: 0.6; transform: scale(0.95) rotate(0); }
  50% { opacity: 1; transform: scale(1.1) rotate(15deg); }
}

.hello-avatar {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff 0%, #fff4ec 100%);
  box-shadow:
    0 10px 24px rgba(255, 138, 91, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  animation: avatarFloat 3s ease-in-out infinite;
}
@keyframes avatarFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
}

/* ====== 日夜切换按钮 ====== */
.theme-toggle {
  flex-shrink: 0;
  position: relative;
  width: 40px; height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  box-shadow:
    0 6px 16px rgba(255, 138, 91, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #ff8a5b;
  margin-left: 8px;
  transition: transform 0.32s var(--spring), background 0.3s, color 0.3s, border-color 0.3s;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
.theme-toggle:hover { transform: translateY(-2px) scale(1.05); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.5s var(--spring), opacity 0.4s ease;
}
.theme-icon-sun {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}
.theme-icon-moon {
  transform: rotate(-90deg) scale(0.4);
  opacity: 0;
}
/* dark 模式：显示月亮 */
[data-theme="dark"] .theme-toggle { color: #a0c4ff; border-color: rgba(255, 255, 255, 0.12); background: rgba(40, 30, 26, 0.6); }
[data-theme="dark"] .theme-icon-sun { transform: rotate(90deg) scale(0.4); opacity: 0; }
[data-theme="dark"] .theme-icon-moon { transform: rotate(0deg) scale(1); opacity: 1; }

/* 数据胶囊条 - 已废弃（统计截图样式移除） */

/* ===================== 平台分区（首页大卡） ===================== */
.entries {
  display: flex; flex-direction: column; gap: 16px;
  padding: 14px 0 40px;
}

/* 首页入口大卡 - 点击进入子页 */
.entry {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 18px;
  background: var(--card);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.36s var(--spring), box-shadow 0.3s var(--smooth);
  animation: entryIn 0.55s var(--spring) both;
  -webkit-tap-highlight-color: transparent;
}
.entry[data-platform="taobao"] { animation-delay: 0.06s; }
.entry[data-platform="jd"]     { animation-delay: 0.12s; }
.entry[data-platform="hotel"]  { animation-delay: 0.18s; }
.entry[data-platform="taxi"]   { animation-delay: 0.24s; }
@keyframes entryIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.entry:active {
  transform: scale(0.98);
  transition: transform 0.12s ease-out;
}
.entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px var(--sec-shadow);
}

/* 顶部品牌色细条 */
.entry::before {
  content: '';
  position: absolute; top: 0; left: 24px; right: 24px; height: 3px;
  background: var(--sec-gradient);
  border-radius: 0 0 100px 100px;
  opacity: 0.9;
}
/* 右下角光斑 */
.entry::after {
  content: '';
  position: absolute; bottom: -60px; right: -60px;
  width: 200px; height: 200px;
  background: var(--sec-gradient);
  filter: blur(70px); opacity: 0.18;
  pointer-events: none;
}

/* 平台 logo */
.entry-logo {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 22px;
  background: var(--sec-gradient);
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 10px 24px var(--sec-shadow),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.entry-logo::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, transparent 55%);
  pointer-events: none;
}
.entry-logo img {
  width: 78%; height: 78%; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  position: relative; z-index: 1;
}
.entry-logo-emoji {
  font-size: 34px; position: relative; z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* 平台信息 */
.entry-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.entry-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 19px; font-weight: 800;
  letter-spacing: 0.3px; color: var(--text-1);
  line-height: 1.2;
  margin-bottom: 4px;
}
.entry-tag {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 7px;
  background: var(--sec-gradient);
  color: #fff; letter-spacing: 0.5px;
  box-shadow: 0 2px 6px var(--sec-shadow);
}
.entry-sub {
  font-size: 12.5px; color: var(--text-3); line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.entry-items {
  display: flex; flex-wrap: wrap; gap: 4px;
  font-size: 10.5px; color: var(--text-2);
}
.entry-items-tag {
  padding: 2px 7px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  letter-spacing: 0.2px;
}

/* 右侧数量 + 箭头 */
.entry-go {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  z-index: 1;
}
.entry-go-num {
  font-size: 22px; font-weight: 800;
  background: var(--sec-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  line-height: 1;
  font-feature-settings: "tnum";
  letter-spacing: -0.5px;
}
.entry-go-label { font-size: 10px; color: var(--text-3); letter-spacing: 0.3px; }
.entry-go-arrow {
  margin-top: 6px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--sec-gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px var(--sec-shadow);
  transition: transform 0.32s var(--spring);
}
.entry:hover .entry-go-arrow { transform: translateX(3px); }
.entry:active .entry-go-arrow { transform: scale(0.9); }

/* ===================== 小图标网格 ===================== */
.icon-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

/* ---- 1 张：全宽横版大卡 ---- */
.icon-grid[data-layout="layout-1"] {
  grid-template-columns: 1fr;
}
/* ---- 2 张：上下两排横版 ---- */
.icon-grid[data-layout="layout-2"] {
  grid-template-columns: 1fr;
}
/* ---- 3 张：一排三个方块 ---- */
.icon-grid[data-layout="layout-3"] {
  grid-template-columns: repeat(3, 1fr);
}
/* ---- 4 张：2x2 ---- */
.icon-grid[data-layout="layout-4"] {
  grid-template-columns: repeat(2, 1fr);
}
/* ---- 5 张：上 2 大（横版各占 1/2）/ 下 3 小（各占 1/3） ---- */
.icon-grid[data-layout="layout-5"] {
  grid-template-columns: repeat(6, 1fr);  /* 6 份基础列，前 2 张各跨 3 */
}
.icon-grid[data-layout="layout-5"] .icon-tile:nth-child(1) { grid-column: span 3; }
.icon-grid[data-layout="layout-5"] .icon-tile:nth-child(2) { grid-column: span 3; }
.icon-grid[data-layout="layout-5"] .icon-tile:nth-child(3),
.icon-grid[data-layout="layout-5"] .icon-tile:nth-child(4),
.icon-grid[data-layout="layout-5"] .icon-tile:nth-child(5) { grid-column: span 2; }
/* ---- 6 张：2 排 3 个 ---- */
.icon-grid[data-layout="layout-6"] {
  grid-template-columns: repeat(3, 1fr);
}
/* ---- 兜底：3 列自动换行 ---- */
.icon-grid[data-layout="layout-n"] {
  grid-template-columns: repeat(3, 1fr);
}

.icon-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 14px 6px 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition: transform 0.36s var(--spring), box-shadow 0.3s var(--smooth), background 0.3s;
  animation: tileIn 0.5s var(--spring) both;
  -webkit-tap-highlight-color: transparent;
}
@keyframes tileIn {
  0% { opacity: 0; transform: scale(0.7) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.icon-tile:active {
  transform: scale(0.96);
  transition: transform 0.12s ease-out;
}

/* hover 时背景轻微染色 */
.icon-tile::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: var(--sec-gradient);
  opacity: 0;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
  z-index: 0;
}
.icon-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px var(--sec-shadow);
  background: rgba(255, 255, 255, 0.85);
}
.icon-tile:hover::before { opacity: 0.08; }
.icon-tile:hover .icon-tile-emoji {
  transform: scale(1.08) rotate(-6deg);
}

/* ---- 默认方块：emoji 上 / 文字下 ---- */
.icon-tile-emoji {
  position: relative; z-index: 1;
  width: 48px; height: 48px;
  border-radius: 16px;
  background: var(--sec-icon-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow:
    0 6px 14px var(--sec-shadow),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
  transition: transform 0.4s var(--spring);
  flex-shrink: 0;
}
/* 图片图标（当用户上传了图片时） */
.icon-tile-img {
  position: relative; z-index: 1;
  width: 48px; height: 48px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
  flex-shrink: 0;
}
/* featured 样式 */
.icon-tile-featured { box-shadow: 0 14px 32px var(--sec-shadow), inset 0 0 0 1.5px rgba(255,255,255,0.45); }
.icon-tile-featured .icon-tile-emoji { width: 60px; height: 60px; font-size: 32px; }
.icon-tile-featured .icon-tile-img   { width: 60px; height: 60px; }
.icon-tile-featured .icon-tile-title { font-size: 16px; font-weight: 700; }
/* mini 样式 */
.icon-tile-mini { padding: 10px 6px; }
.icon-tile-mini .icon-tile-emoji { width: 36px; height: 36px; font-size: 20px; border-radius: 12px; margin-bottom: 5px; }
.icon-tile-mini .icon-tile-img   { width: 36px; height: 36px; margin-bottom: 5px; }
.icon-tile-mini .icon-tile-title { font-size: 12px; min-height: 30px; }
/* hot 光晕 */
.icon-tile-hot::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: radial-gradient(70% 60% at 50% 0%, rgba(255, 138, 91, 0.28), transparent 70%);
  pointer-events: none;
  animation: iconTileHot 2.4s ease-in-out infinite;
  z-index: 0;
}
@keyframes iconTileHot { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }

.icon-tile-text {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  width: 100%;
  min-width: 0;
}
.icon-tile-title {
  font-size: 12px; font-weight: 600;
  color: var(--text-1);
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
  min-height: 31px;
  width: 100%;
  padding: 0 2px;
}
.icon-tile-desc {
  display: none;
}

/* ---- 横版大卡：emoji 左 / 文字右，padding 大、emoji 大 ---- */
.icon-tile.icon-tile-wide {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 22px;
}
.icon-tile.icon-tile-wide .icon-tile-emoji {
  width: 56px; height: 56px;
  border-radius: 18px;
  font-size: 30px;
  margin-bottom: 0;
}
.icon-tile.icon-tile-wide .icon-tile-text {
  flex: 1;
  min-width: 0;
}
.icon-tile.icon-tile-wide .icon-tile-title {
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  line-height: 1.3;
  min-height: 0;
  padding: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.icon-tile.icon-tile-wide .icon-tile-desc {
  display: -webkit-box;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  text-align: left;
  line-height: 1.3;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.icon-tile.icon-tile-wide:hover .icon-tile-emoji {
  transform: scale(1.06) rotate(-4deg);
}

.icon-tile-badge {
  position: absolute; top: 8px; right: 8px;
  z-index: 2;
  font-size: 9px; font-weight: 800;
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--sec-gradient);
  color: #fff;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px var(--sec-shadow);
  animation: badgePop 0.5s var(--spring) both;
  animation-delay: inherit;
}
@keyframes badgePop {
  0% { opacity: 0; transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}

/* 闪烁小圆点（仅 HOT/必领 等） */
.icon-tile-pulse {
  position: absolute; top: 10px; left: 10px;
  z-index: 2;
  width: 6px; height: 6px;
  background: #34c759;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.6);
  animation: livePulse 1.8s ease-out infinite;
}

/* ===================== 页面切换 ===================== */
.page {
  position: relative; z-index: 2;
  max-width: 760px; margin: 0 auto;
  padding: 16px 18px 0;
  animation: pageIn 0.45s var(--spring) both;
}
.page[hidden] { display: none; }
@keyframes pageIn {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.page-sub { padding-top: 8px; }

/* 顶部导航栏 */
.nav {
  position: sticky; top: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px 12px;
  margin: 0 -4px;
  padding-left: 4px; padding-right: 4px;
  z-index: 10;
  background: linear-gradient(180deg,
    rgba(255, 247, 241, 0.92) 0%,
    rgba(255, 247, 241, 0.7) 70%,
    rgba(255, 247, 241, 0) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  animation: navShine 0.4s ease-out both;
}
@keyframes navShine {
  0% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}
.nav-back {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--text-1);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 90, 60, 0.1);
  transition: transform 0.32s var(--spring), background 0.2s;
}
.nav-back:active { transform: scale(0.88); }
.nav-back:hover { background: rgba(255, 255, 255, 1); }

.nav-title {
  flex: 1; min-width: 0;
  font-size: 17px; font-weight: 800;
  letter-spacing: 0.3px; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-count {
  flex-shrink: 0;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 100px;
  font-size: 11.5px; font-weight: 700; color: var(--text-2);
  letter-spacing: 0.3px;
}

/* 子页平台头 */
.sub-hero {
  position: relative;
  margin: 4px 0 18px;
  padding: 22px 20px;
  border-radius: 28px;
  background: var(--sec-gradient);
  box-shadow: 0 14px 32px var(--sec-shadow);
  overflow: hidden;
  animation: heroIn 0.55s var(--spring) both;
}
@keyframes heroIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.sub-hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
}
.sub-hero-bg::before,
.sub-hero-bg::after {
  content: ''; position: absolute;
  border-radius: 50%; filter: blur(40px);
}
.sub-hero-bg::before {
  width: 180px; height: 180px;
  background: rgba(255, 255, 255, 0.4);
  top: -50px; left: -40px;
}
.sub-hero-bg::after {
  width: 160px; height: 160px;
  background: rgba(255, 255, 255, 0.25);
  bottom: -60px; right: -30px;
}

.sub-hero-inner {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  z-index: 1;
}
.sub-hero-logo {
  flex-shrink: 0;
  width: 72px; height: 72px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.5);
  overflow: hidden;
  animation: heroLogoIn 0.6s var(--spring) both;
  animation-delay: 0.1s;
}
@keyframes heroLogoIn {
  0% { opacity: 0; transform: scale(0.4) rotate(-15deg); }
  60% { transform: scale(1.1) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.sub-hero-logo img {
  width: 78%; height: 78%; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}
.sub-hero-logo-emoji {
  font-size: 38px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.sub-hero-text {
  flex: 1; min-width: 0; color: #fff;
}
.sub-hero-name {
  font-size: 26px; font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}
.sub-hero-sub {
  margin-top: 6px;
  font-size: 13px; opacity: 0.92;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* 子页主体 */
.sub-main {
  padding: 0 0 40px;
}

/* 子页右下浮动按钮 - 返回首页 */
.sub-fab {
  position: fixed; right: 18px; bottom: 24px;
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px 10px 12px;
  background: rgba(28, 28, 30, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #fff;
  font-size: 12px; font-weight: 700;
  border-radius: 100px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  border: none; cursor: pointer;
  z-index: 50;
  transition: transform 0.32s var(--spring), box-shadow 0.3s var(--smooth);
  letter-spacing: 0.3px;
  animation: fabIn 0.5s var(--spring) both;
  animation-delay: 0.4s;
  -webkit-tap-highlight-color: transparent;
}
@keyframes fabIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.sub-fab:active { transform: scale(0.92); }
.sub-fab:hover {
  background: rgba(28, 28, 30, 1);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}
.sub-fab-icon {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
}
.sub-fab[hidden] { display: none; }

/* ===================== 实时播报条 ===================== */
.ticker {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 4px;
  padding: 9px 12px 9px 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: tickerIn 0.5s var(--spring) both;
}
@keyframes tickerIn {
  0% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.ticker-label {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  background: linear-gradient(135deg, #FF3B30, #FF6A3D);
  color: #fff;
  font-size: 10.5px; font-weight: 800;
  border-radius: 100px;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 8px rgba(255, 59, 48, 0.3);
  z-index: 2;
}
.ticker-live {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8);
  animation: tickerLive 1.4s ease-out infinite;
}
@keyframes tickerLive {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8); opacity: 1; }
  70% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); opacity: 0.8; }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); opacity: 1; }
}

.ticker-viewport {
  flex: 1; min-width: 0;
  position: relative;
  height: 18px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.ticker-track {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center;
  height: 100%;
  white-space: nowrap;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-1);
  letter-spacing: 0.2px;
  transition: transform 0.7s cubic-bezier(0.45, 0, 0.55, 1);
}
.ticker-item {
  display: inline-flex; align-items: center;
  gap: 0;
}
.ticker-tag {
  display: inline-flex; align-items: center;
  padding: 1px 7px;
  background: var(--t-color, #FF5A3C);
  color: #fff;
  border-radius: 6px;
  font-size: 11px; font-weight: 800;
  margin: 0 6px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.ticker-saved {
  display: inline-flex; align-items: center;
  padding: 1px 7px;
  background: linear-gradient(135deg, #FF3B30, #FF6A3D);
  color: #fff;
  border-radius: 6px;
  font-size: 11px; font-weight: 800;
  margin-left: 4px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(255, 59, 48, 0.25);
}

/* ===================== 苹果音乐会员 Banner ===================== */
.music-banner {
  position: relative;
  display: block;
  margin: 4px 0 4px;
  padding: 16px 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, #FF2D55 0%, #FF375F 35%, #AF52DE 100%);
  box-shadow:
    0 14px 32px rgba(255, 45, 85, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.36s var(--spring), box-shadow 0.3s var(--smooth);
  animation: mbIn 0.7s var(--spring) both;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
@keyframes mbIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  60% { transform: translateY(-4px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.music-banner:active {
  transform: scale(0.98);
  transition: transform 0.12s ease-out;
}
.music-banner:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 40px rgba(255, 45, 85, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* 背景光斑 */
.music-banner-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.mb-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: mbFloat 12s ease-in-out infinite;
}
.mb-orb-1 { width: 140px; height: 140px; background: #FFD1DC; top: -40px; left: -30px; animation-delay: 0s; }
.mb-orb-2 { width: 100px; height: 100px; background: #C7A8FF; bottom: -30px; right: 30%; animation-delay: 4s; opacity: 0.45; }
.mb-orb-3 { width: 80px; height: 80px; background: #FFFFFF; top: 30%; right: -20px; animation-delay: 8s; opacity: 0.25; }
@keyframes mbFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.1); }
}

.music-banner-inner {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  z-index: 1;
}

.music-banner-icon {
  position: relative;
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.mb-emoji {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  animation: mbEmojiWiggle 3s ease-in-out infinite;
}
.mb-emoji-2 {
  position: absolute;
  right: -4px; bottom: -4px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  animation-delay: 1.5s;
}
@keyframes mbEmojiWiggle {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg) scale(1.05); }
}

.music-banner-text {
  flex: 1; min-width: 0;
  color: #fff;
}
.music-banner-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 100px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mb-tag-dot {
  width: 6px; height: 6px;
  background: #FFE15B;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 225, 91, 0.8);
  animation: mbDot 1.4s ease-in-out infinite;
}
@keyframes mbDot {
  0%, 100% { opacity: 0.5; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
.music-banner-title {
  font-size: 19px; font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.music-banner-sub {
  margin-top: 4px;
  font-size: 12px; opacity: 0.9;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.music-banner-arrow {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #FF2D55;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.32s var(--spring);
}
.music-banner:hover .music-banner-arrow { transform: translateX(3px); }
.music-banner:active .music-banner-arrow { transform: scale(0.9); }

/* ===================== 详情底部抽屉 ===================== */
.sheet {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet[hidden] { display: none; }

.sheet-mask {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  animation: maskIn 0.32s var(--smooth);
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.sheet-card {
  position: relative;
  width: 100%; max-width: 480px;
  background: var(--card-solid);
  border-radius: 28px 28px 0 0;
  padding: 10px 22px calc(22px + env(safe-area-inset-bottom));
  box-shadow:
    0 -24px 60px rgba(0, 0, 0, 0.22),
    0 -2px 12px rgba(0, 0, 0, 0.06);
  animation: sheetUp 0.46s var(--spring);
  max-height: 88vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@keyframes sheetUp {
  0% { transform: translateY(100%); opacity: 0.4; }
  60% { transform: translateY(-6px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* 顶部抓握条 */
.sheet-grip {
  width: 42px; height: 5px;
  background: rgba(60, 60, 67, 0.18);
  border-radius: 100px;
  margin: 0 auto 16px;
}

/* 头部 */
.sheet-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline-soft);
}
.sheet-icon {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 22px;
  background: var(--sheet-gradient, linear-gradient(135deg, #ff5a3c, #ff8a5b));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  box-shadow:
    0 12px 26px var(--sheet-shadow, rgba(255, 90, 60, 0.35)),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
  position: relative;
  overflow: hidden;
  animation: iconPop 0.5s var(--spring) both;
}
@keyframes iconPop {
  0% { transform: scale(0.4) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.1) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.sheet-icon::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, transparent 55%);
  pointer-events: none;
}

.sheet-head-text { flex: 1; min-width: 0; }
.sheet-meta {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  flex-wrap: wrap;
}
.sheet-badge {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 800;
  padding: 3px 8px; border-radius: 8px;
  background: var(--sheet-gradient, linear-gradient(135deg, #ff5a3c, #ff8a5b));
  color: #fff; letter-spacing: 0.5px;
  box-shadow: 0 2px 6px var(--sheet-shadow, rgba(255, 90, 60, 0.3));
}
.sheet-platform {
  font-size: 11px; font-weight: 600; color: var(--text-3);
}
.sheet-title {
  margin: 0; font-size: 20px; font-weight: 800;
  letter-spacing: 0.2px; color: var(--text-1); line-height: 1.3;
}
.sheet-close {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(120, 120, 128, 0.12);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s var(--spring), background 0.2s;
}
.sheet-close:active { transform: scale(0.85); background: rgba(120, 120, 128, 0.2); }

.sheet-desc {
  margin: 16px 0 0;
  font-size: 14px; color: var(--text-2);
  line-height: 1.65;
  letter-spacing: 0.2px;
}

.sheet-tip {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 14px; padding: 11px 14px;
  background: linear-gradient(135deg, rgba(255, 90, 60, 0.08) 0%, rgba(255, 138, 91, 0.05) 100%);
  border-left: 3px solid var(--primary);
  border-radius: 14px;
  font-size: 13px; color: var(--text-2); line-height: 1.55;
}
.sheet-tip-icon { flex-shrink: 0; opacity: 0.85; }

.sheet-cmd {
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f7 100%);
  border-radius: 18px;
  border: 1px solid var(--hairline-soft);
}
.sheet-cmd-label {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  margin-bottom: 8px; letter-spacing: 0.3px;
}
.sheet-cmd-text {
  font-size: 13.5px; color: var(--text-1);
  line-height: 1.6;
  word-break: break-all;
  user-select: all; -webkit-user-select: all;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  max-height: 130px; overflow-y: auto;
}

/* 按钮 */
.sheet-actions {
  display: flex; gap: 10px; margin-top: 20px;
}
.bbtn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 15px 14px;
  font-size: 15px; font-weight: 700;
  border-radius: 16px;
  letter-spacing: 0.3px;
  transition: transform 0.32s var(--spring), box-shadow 0.3s var(--smooth), background 0.3s;
  position: relative; overflow: hidden;
}
.bbtn:active {
  transform: scale(0.96);
  transition: transform 0.1s ease-out;
}
.bbtn::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.5) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.bbtn:active::after { opacity: 1; transition: opacity 0.15s; }
.bbtn-emoji { font-size: 16px; }

.bbtn-go {
  background: var(--sheet-gradient, linear-gradient(135deg, #ff5a3c 0%, #ff8a5b 100%));
  color: #fff;
  box-shadow:
    0 10px 22px var(--sheet-shadow, rgba(255, 90, 60, 0.35)),
    inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  flex: 1.5;
}
.bbtn-go:hover { transform: translateY(-1px); }
.bbtn-go:active { transform: scale(0.97); }

.bbtn-copy {
  background: rgba(255, 255, 255, 0.95);
  color: var(--sheet-accent, var(--primary));
  border: 1.5px solid var(--sheet-accent, var(--primary));
  box-shadow: 0 4px 12px rgba(255, 90, 60, 0.1);
}
.bbtn-copy:hover {
  background: var(--sheet-accent, var(--primary));
  color: #fff;
  transform: translateY(-1px);
}
.bbtn-copy.copied {
  background: linear-gradient(135deg, #34c759 0%, #30b350 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 18px rgba(52, 199, 89, 0.35);
  animation: copiedPop 0.5s var(--spring);
}
@keyframes copiedPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.sheet-safe-area { height: env(safe-area-inset-bottom); }

/* ===================== Toast ===================== */
.toast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: rgba(28, 28, 30, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #fff;
  font-size: 14px; font-weight: 600;
  border-radius: 100px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  z-index: 300; opacity: 0;
  pointer-events: none;
  transition: all 0.36s var(--spring);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.toast-icon {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: #34c759;
  border-radius: 50%;
  font-size: 14px; font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 6px rgba(52, 199, 89, 0.5);
}
.toast.error .toast-icon { background: #ff3b30; box-shadow: 0 2px 6px rgba(255, 59, 48, 0.5); }
.toast.warn  .toast-icon { background: #ff9500; box-shadow: 0 2px 6px rgba(255, 149, 0, 0.5); }

/* ===================== 底部说明 ===================== */
.site-footer {
  position: relative; z-index: 2;
  text-align: center;
  padding: 18px 20px 28px;
  font-size: 11.5px; color: var(--text-3);
  line-height: 1.7;
}
.site-footer .footer-tip { margin: 4px 0 0; font-size: 10.5px; opacity: 0.85; }

/* ===================== 响应式 ===================== */
@media (max-width: 380px) {
  .app { padding: 18px 14px 0; }
  .hello-title { font-size: 26px; }
  .hello-avatar { width: 50px; height: 50px; font-size: 24px; border-radius: 18px; }
  .entries { gap: 14px; }
  .entry { padding: 16px 14px; border-radius: 22px; gap: 12px; }
  .entry-logo { width: 54px; height: 54px; border-radius: 18px; }
  .entry-name { font-size: 17px; }
  .entry-sub { font-size: 11.5px; }
  .entry-go-num { font-size: 20px; }
  .entry-go-arrow { width: 24px; height: 24px; }
  .page { padding: 12px 14px 0; }
  .nav-back { width: 34px; height: 34px; }
  .sub-hero { padding: 18px 16px; border-radius: 24px; }
  .sub-hero-logo { width: 60px; height: 60px; border-radius: 20px; }
  .sub-hero-name { font-size: 22px; }
  .sub-hero-sub { font-size: 12px; }
  .section-name { font-size: 17px; }
  .icon-grid[data-layout="layout-3"] { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .icon-grid[data-layout="layout-6"] { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .icon-grid[data-layout="layout-n"] { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .icon-grid[data-layout="layout-4"] { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .icon-tile { padding: 10px 4px 8px; border-radius: 18px; }
  .icon-tile-emoji { width: 42px; height: 42px; font-size: 22px; border-radius: 14px; margin-bottom: 6px; }
  .icon-tile-title { font-size: 11.5px; min-height: 30px; }
  .icon-tile-wide { padding: 12px 14px; gap: 12px; border-radius: 20px; }
  .icon-tile-wide .icon-tile-emoji { width: 50px; height: 50px; font-size: 26px; border-radius: 16px; }
  .icon-tile-wide .icon-tile-title { font-size: 13px; }
  .icon-tile-wide .icon-tile-desc { font-size: 11px; }
  .sheet-card { border-radius: 24px 24px 0 0; }
  .bbtn { padding: 13px; font-size: 14px; }
}

@media (min-width: 720px) {
  .hello-title { font-size: 34px; }
  .icon-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; }
  .icon-tile-emoji { width: 56px; height: 56px; font-size: 28px; border-radius: 18px; }
  .icon-tile-title { font-size: 13px; min-height: 34px; }
}

/* ===================== 暗色模式 ===================== */
[data-theme="dark"] {
  --bg-page: #1c1410;
  --bg-page-2: #2a1c14;
  --text-1: #f5f5f7;
  --text-2: #b8b8be;
  --text-3: #77777e;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-soft: rgba(255, 255, 255, 0.05);
  --card: rgba(40, 30, 26, 0.7);
  --card-solid: #1f1a18;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] body {
  background:
    radial-gradient(1200px 700px at 85% -10%, #3a1810 0%, transparent 55%),
    radial-gradient(900px 600px at -10% 20%, #2a1810 0%, transparent 55%),
    radial-gradient(700px 500px at 50% 110%, #2c1810 0%, transparent 60%),
    linear-gradient(180deg, #1c1410 0%, #14100c 70%);
  color-scheme: dark;
}
[data-theme="dark"] .hello-eyebrow { background: rgba(40, 30, 26, 0.7); color: #ff8a5b; }
  [data-theme="dark"] .entry { background: rgba(40, 30, 26, 0.7); border-color: rgba(255, 255, 255, 0.06); }
  [data-theme="dark"] .entry-name { color: #f5f5f7; }
  [data-theme="dark"] .icon-tile { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.06); }
  [data-theme="dark"] .icon-tile:hover { background: rgba(255, 255, 255, 0.08); }
  [data-theme="dark"] .icon-tile-title { color: #f5f5f7; }
  [data-theme="dark"] .section-name { color: #f5f5f7; }
  [data-theme="dark"] .section-count { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.08); }
  [data-theme="dark"] .sheet-card { background: #1f1a18; color: #f5f5f7; }
  [data-theme="dark"] .sheet-title { color: #f5f5f7; }
  [data-theme="dark"] .sheet-desc { color: #b8b8be; }
  [data-theme="dark"] .sheet-tip { background: rgba(255, 90, 60, 0.15); color: #d8d8dc; }
  [data-theme="dark"] .sheet-cmd { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.06); }
  [data-theme="dark"] .sheet-cmd-text { color: #f5f5f7; }
  [data-theme="dark"] .sheet-close { background: rgba(255, 255, 255, 0.1); color: #b8b8be; }
  [data-theme="dark"] .bbtn-copy { background: rgba(40, 30, 26, 0.8); }
  [data-theme="dark"] .ticker { background: rgba(40, 30, 26, 0.75); border-color: rgba(255, 255, 255, 0.08); }
  [data-theme="dark"] .ticker-track { color: #f5f5f7; }
  [data-theme="dark"] .nav { background: linear-gradient(180deg, rgba(28, 20, 16, 0.92) 0%, rgba(28, 20, 16, 0.6) 70%, rgba(28, 20, 16, 0) 100%); }
  [data-theme="dark"] .nav-back { background: rgba(40, 30, 26, 0.85); border-color: rgba(255, 255, 255, 0.08); }
  [data-theme="dark"] .nav-title { color: #f5f5f7; }
  [data-theme="dark"] .nav-count { background: rgba(255, 255, 255, 0.08); color: #b8b8be; }
  [data-theme="dark"] .entry-items-tag { background: rgba(255, 255, 255, 0.08); color: #b8b8be; }

/* ===================== 后台管理 ===================== */
.mgr-pass-panel,
.mgr-shell { position: fixed; inset: 0; z-index: 9999; }

.mgr-pass-panel[hidden],
.mgr-shell[hidden] { display: none !important; }

/* —— 密码弹层 —— */
.mgr-pass-mask {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: mgrFade .25s ease-out;
}
.mgr-pass-card {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(86vw, 360px);
  background: var(--card-solid);
  border-radius: 24px;
  padding: 26px 22px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  animation: mgrPop .32s var(--spring);
}
.mgr-pass-title { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 4px; }
.mgr-pass-sub { font-size: 12.5px; color: var(--text-3); text-align: center; margin-bottom: 18px; }
.mgr-pass-inputs {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 10px;
}
.mgr-pin {
  width: 100%; height: 48px; text-align: center;
  font-size: 22px; font-weight: 700;
  background: var(--sec-icon-bg, rgba(255, 255, 255, 0.6));
  border: 1.5px solid var(--hairline);
  border-radius: 12px;
  color: var(--text-1);
  transition: border-color .2s, transform .2s;
  caret-color: var(--primary);
}
.mgr-pin:focus { border-color: var(--primary); transform: scale(1.05); outline: none; }
.mgr-pass-hint { min-height: 18px; font-size: 12px; text-align: center; margin: 4px 0 6px; }
.mgr-pass-tip { font-size: 11px; color: var(--text-3); text-align: center; margin-bottom: 18px; line-height: 1.5; }
.mgr-pass-actions { display: flex; gap: 10px; }
.mgr-btn {
  flex: 1; padding: 12px; border-radius: 12px; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: transform .2s, opacity .2s;
  font-family: inherit;
}
.mgr-btn:active { transform: scale(0.97); }
.mgr-btn-primary { background: linear-gradient(135deg, #ff8a5b 0%, #ff6a3d 100%); color: #fff; box-shadow: 0 6px 16px rgba(255, 138, 91, 0.35); }
.mgr-btn-primary:hover { transform: translateY(-1px); }
.mgr-btn-ghost { background: var(--card); color: var(--text-1); border: 1px solid var(--hairline); }

/* —— 后台壳 —— */
.mgr-shell {
  background: var(--bg-page);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  display: flex; flex-direction: column;
  animation: mgrFade .3s ease-out;
}
.mgr-top {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 2;
}
.mgr-back {
  width: 36px; height: 36px; border-radius: 12px;
  border: 1px solid var(--hairline); background: var(--card-solid);
  color: var(--text-1); cursor: pointer; font-size: 18px;
}
.mgr-back:active { transform: scale(0.92); }
.mgr-title { font-size: 16px; font-weight: 700; flex: 1; }
.mgr-actions-top { display: flex; gap: 8px; }
.mgr-tb {
  width: 36px; height: 36px; border-radius: 12px;
  border: 1px solid var(--hairline); background: var(--card-solid);
  cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, background .2s;
}
.mgr-tb:hover { background: rgba(255, 138, 91, 0.08); }
.mgr-tb:active { transform: scale(0.92); }
.mgr-size {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--card-solid);
  border: 1px solid var(--hairline);
  color: var(--text-3);
  white-space: nowrap;
}

/* —— 主体双栏 —— */
.mgr-main {
  flex: 1; min-height: 0;
  display: flex; gap: 12px; padding: 12px;
}
.mgr-side {
  width: 280px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column;
}
.mgr-side-head {
  padding: 14px 12px; border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700; color: var(--text-2);
}
.mgr-add-pill {
  padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #ff8a5b, #ff6a3d);
  color: #fff; border: none; cursor: pointer; font-size: 12px; font-weight: 600;
}
.mgr-add-pill:active { transform: scale(0.95); }
.mgr-platform-list { overflow-y: auto; flex: 1; padding: 8px; }
.mgr-platform-list::-webkit-scrollbar { width: 4px; }
.mgr-platform-list::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); border-radius: 4px; }

.mgr-platform-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; margin-bottom: 6px; border-radius: 14px;
  background: var(--card-solid); border: 1px solid transparent;
  cursor: pointer; transition: background .2s, border-color .2s, transform .2s;
}
.mgr-platform-item:hover { background: rgba(255, 138, 91, 0.06); }
.mgr-platform-item.is-active {
  border-color: var(--primary);
  background: rgba(255, 138, 91, 0.10);
}
.mgr-platform-emoji {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.mgr-platform-info { flex: 1; min-width: 0; }
.mgr-platform-name { font-size: 14px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgr-platform-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.mgr-platform-actions {
  display: flex; gap: 4px;
  opacity: 0.55;
  transition: opacity .2s;
}
.mgr-platform-item:hover .mgr-platform-actions,
.mgr-platform-item.is-active .mgr-platform-actions {
  opacity: 1;
}
.mgr-mini-btn {
  width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid var(--hairline); background: var(--card-solid);
  color: var(--text-2); cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.mgr-mini-btn:hover { background: rgba(255, 138, 91, 0.12); color: var(--primary); border-color: var(--primary); }
.mgr-mini-btn:active { transform: scale(0.9); }
.mgr-mini-edit { color: var(--primary); border-color: rgba(255, 138, 91, 0.3); }
.mgr-mini-edit:hover { background: var(--primary); color: #fff; }
.mgr-mini-danger:hover { background: #ff3b30; color: #fff; border-color: #ff3b30; }

/* —— 右栏编辑区 —— */
.mgr-pane {
  flex: 1; min-width: 0;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 18px;
  overflow-y: auto;
  position: relative;
}
.mgr-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--text-3); font-size: 14px; text-align: center;
}
.mgr-empty-emoji { font-size: 60px; animation: mgrPoint 2s ease-in-out infinite; }
@keyframes mgrPoint { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-8px); } }

.mgr-section { padding: 16px; border-bottom: 1px solid var(--hairline); }
.mgr-section:last-child { border-bottom: none; }
.mgr-section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700; color: var(--text-2);
  margin-bottom: 12px;
}
.mgr-section-row { display: flex; align-items: center; gap: 14px; }
.mgr-thumb {
  width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  box-shadow: 0 6px 16px var(--sec-shadow, rgba(0,0,0,0.15));
  flex-shrink: 0;
}
.mgr-meta { flex: 1; min-width: 0; }
.mgr-meta-name { font-size: 16px; font-weight: 700; color: var(--text-1); }
.mgr-meta-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.mgr-meta-tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.mgr-tag {
  display: inline-block; padding: 3px 8px; font-size: 11px; border-radius: 999px;
  background: rgba(255, 138, 91, 0.12); color: #ff6a3d; font-weight: 600;
}
.mgr-link-btn {
  background: transparent; border: none; cursor: pointer;
  font-size: 12px; color: var(--primary); font-weight: 600;
}
.mgr-link-btn:active { transform: scale(0.96); }

.mgr-items-list { display: flex; flex-direction: column; gap: 8px; }
.mgr-item-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 14px;
  background: var(--card-solid); border: 1px solid var(--hairline);
  transition: transform .2s, box-shadow .2s;
}
.mgr-item-card:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.06); }
.mgr-item-emoji {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--sec-icon-bg, rgba(255, 138, 91, 0.1));
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.3);
}
.mgr-item-info { flex: 1; min-width: 0; }
.mgr-item-title { font-size: 14px; font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 6px; }
.mgr-badge {
  font-size: 10px; padding: 2px 6px; border-radius: 6px;
  background: linear-gradient(135deg, #ff8a5b, #ff6a3d); color: #fff;
  font-weight: 700; letter-spacing: 0.3px;
}
.mgr-item-desc { font-size: 12px; color: var(--text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgr-item-fields { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.mgr-field {
  font-size: 10.5px; color: var(--text-3);
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 6px; border-radius: 6px;
  font-family: monospace;
}
.mgr-item-actions {
  display: flex; gap: 4px;
  opacity: 0.7;
  transition: opacity .2s;
}
.mgr-item-card:hover .mgr-item-actions { opacity: 1; }
.mgr-item-actions .mgr-mini-btn { width: 26px; height: 26px; }

/* —— 浮动 + —— */
.mgr-fab-add {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  padding: 12px 18px; border-radius: 999px;
  background: linear-gradient(135deg, #ff8a5b, #ff6a3d);
  color: #fff; border: none; cursor: pointer; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 26px rgba(255, 138, 91, 0.45);
}
.mgr-fab-add:active { transform: scale(0.96); }
.mgr-fab-add[hidden] { display: none; }

/* —— 表单弹层 —— */
.mgr-sheet {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: flex-end; justify-content: center;
}
.mgr-sheet[hidden] { display: none !important; }
.mgr-sheet-mask {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.mgr-sheet-card {
  position: relative; z-index: 1;
  width: min(640px, 100vw);
  max-height: 90vh; overflow-y: auto;
  background: var(--card-solid); border-radius: 24px 24px 0 0;
  padding: 0 18px 18px;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.25);
  animation: mgrSlideUp .34s var(--spring);
}
@keyframes mgrSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.mgr-grip {
  width: 40px; height: 4px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.12);
  margin: 8px auto 14px;
}
.mgr-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.mgr-sheet-title { font-size: 17px; font-weight: 700; }
.mgr-sheet-close {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--card); border: none; cursor: pointer; font-size: 22px;
  color: var(--text-2);
}
.mgr-sheet-close:active { transform: scale(0.92); }

.mgr-form-body { display: flex; flex-direction: column; gap: 12px; }
.mgr-field-row { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.mgr-input {
  padding: 11px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--hairline);
  color: var(--text-1); font-size: 14px; font-weight: 500;
  font-family: inherit;
  transition: border-color .2s, background .2s;
  outline: none;
}
.mgr-input:focus { border-color: var(--primary); background: var(--card-solid); }
.mgr-input[readonly] { opacity: 0.55; }
.mgr-textarea { resize: vertical; min-height: 50px; }
.mgr-file { padding: 8px; cursor: pointer; font-size: 12px; }
.mgr-clear-img {
  margin-top: 6px; padding: 6px 12px; font-size: 11px; color: #ff3b30; border-color: rgba(255,59,48,0.3);
}
.mgr-clear-img:hover { background: #ff3b30; color: #fff; border-color: #ff3b30; }
.mgr-clear-img[hidden] { display: none; }
.mgr-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mgr-checkbox-row { flex-direction: row; align-items: center; font-weight: 500; cursor: pointer; }
.mgr-checkbox-row input { width: 16px; height: 16px; accent-color: var(--primary); }
.mgr-helper { font-size: 11.5px; color: var(--text-3); line-height: 1.5; padding: 8px 10px; background: rgba(255, 138, 91, 0.08); border-radius: 10px; }
.mgr-hint { font-size: 12px; min-height: 16px; }
.mgr-preview-row { display: flex; justify-content: center; padding: 6px 0; }
.mgr-preview {
  width: 72px; height: 72px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; font-size: 36px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: background .25s;
}
.mgr-form-actions { display: flex; gap: 10px; margin-top: 18px; }
.mgr-pin-row { letter-spacing: 0.5em; text-align: center; font-size: 18px; }

@keyframes mgrFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mgrPop { from { transform: translate(-50%, -50%) scale(0.85); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* 响应式：手机端 mgr-side 折叠 */
@media (max-width: 720px) {
  .mgr-main { flex-direction: column; padding: 8px; }
  .mgr-side { width: auto; max-height: 200px; }
}

/* 暗色模式覆盖 */
[data-theme="dark"] .mgr-pin { background: rgba(255, 255, 255, 0.05); border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .mgr-back { background: rgba(40, 30, 26, 0.85); color: #f5f5f7; border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .mgr-tb { background: rgba(40, 30, 26, 0.85); color: #f5f5f7; border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .mgr-platform-item { background: rgba(40, 30, 26, 0.85); }
[data-theme="dark"] .mgr-item-card { background: rgba(40, 30, 26, 0.85); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .mgr-input { background: rgba(255, 255, 255, 0.05); color: #f5f5f7; border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .mgr-input:focus { background: rgba(40, 30, 26, 0.85); }
[data-theme="dark"] .mgr-btn-ghost { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .mgr-field { background: rgba(255,255,255,0.06); color: #b8b8be; }
[data-theme="dark"] .mgr-pass-mask { background: rgba(0,0,0,0.7); }

/* ===================== 减少动效 ===================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
