/* ============================================================
   配色主题 · 蓝橙色系
   默认「蓝焰暮光」；页面右下角 🎨 可切换整套配色（选择会保存在本机）
   ============================================================ */
:root { /* 蓝焰暮光 · 深色（默认主题，变量直接写在这里） */
  --bg:#0a0e1a; --card:#121828; --card-soft:#161d31;
  --ink:#eef1f8; --muted:#93a0ba; --line:#232c45;
  --blue:#4c8dff; --blue-deep:#3b6fe0; --blue-soft:rgba(76,141,255,.16); --active-text:#7db1ff;
  --orange:#ff9f45; --orange-deep:#f0642b; --amber:#ffc061; --orange-soft:rgba(255,159,69,.15); --orange-deep-soft:rgba(240,100,43,.22);
  --red:#ff6f7d; --green:#3dd6a8;
  --shadow:rgba(0,0,0,.45); --arrow:#4d5878; --chip-line:rgba(76,141,255,.45);
  --top-grad:linear-gradient(135deg,#0e2a6b,#3b6fe0);
  --hero-grad:linear-gradient(120deg,#123a8f 0%,#2e5fe0 50%,#e8651f 115%);
  --hero-scrim:linear-gradient(120deg,rgba(6,10,20,.05) 0%,rgba(6,10,20,.30) 100%);
  --tile-1:rgba(76,141,255,.18); --tile-2:rgba(255,159,69,.16); --tile-3:rgba(76,141,255,.24); --tile-4:rgba(255,192,97,.16); --tile-5:rgba(240,100,43,.2);
  --seg-sale:#6ba3ff; --seg-cal:#ffad5c; --seg-redeem:#ff8a4d;
  --seg-sale-bg:#2a5fd8; --seg-cal-bg:#bd5c17; --seg-redeem-bg:#c0471a;
  --cal-day-ink:#f4f7fc; --cal-today-ink:#a6c5ff; --cal-count-bg:rgba(76,141,255,.32); --cal-count-ink:#cfe0ff;
}
:root[data-theme="sky"] { /* 晴空蓝橙 · 浅色 */
  --bg:#f2f6fc; --card:#ffffff; --card-soft:#fafcff;
  --ink:#1b2437; --muted:#5f6f8a; --line:#e3e9f3;
  --blue:#2f6cfb; --blue-deep:#123fae; --blue-soft:#e8f0ff; --active-text:#1e4fd6;
  --orange:#f07f2e; --orange-deep:#d85618; --amber:#f5a623; --orange-soft:#fff1e3; --orange-deep-soft:#fdeae0;
  --red:#e0444f; --green:#00a57a;
  --shadow:rgba(20,45,80,.08); --arrow:#c2ccda; --chip-line:#cfe0fa;
  --top-grad:linear-gradient(135deg,#123fae,#2f6cfb);
  --hero-grad:linear-gradient(125deg,#1e4fd6 0%,#2f6cfb 60%,#f07f2e 118%);
  --hero-scrim:linear-gradient(125deg,rgba(12,24,52,.04) 0%,rgba(12,24,52,.18) 100%);
  --tile-1:#eaf2ff; --tile-2:#fff1e3; --tile-3:#e6efff; --tile-4:#ffedd9; --tile-5:#fdeae0;
  --seg-sale:#2f6cfb; --seg-cal:#f07f2e; --seg-redeem:#d85618;
  --seg-sale-bg:#2456d8; --seg-cal-bg:#d86a1f; --seg-redeem-bg:#b54a10;
  --cal-day-ink:#1b2437; --cal-today-ink:#2f6cfb; --cal-count-bg:#e8f0ff; --cal-count-ink:#2f6cfb;
}
:root[data-theme="ocean"] { /* 深海蓝橙 · 深色（参考截图） */
  --bg:#0f0f12; --card:#17181d; --card-soft:#1b1e26;
  --ink:#eef1f6; --muted:#98a2b3; --line:#272b36;
  --blue:#5b8cff; --blue-deep:#2456d8; --blue-soft:rgba(47,108,255,.16); --active-text:#7da2ff;
  --orange:#ff9a5c; --orange-deep:#ff7a3d; --amber:#ffb35c; --orange-soft:rgba(255,138,61,.16); --orange-deep-soft:rgba(216,86,24,.22);
  --red:#ff6b7a; --green:#38d1a0;
  --shadow:rgba(0,0,0,.4); --arrow:#59627a; --chip-line:rgba(91,140,255,.4);
  --top-grad:linear-gradient(135deg,#101c3f,#2456d8);
  --hero-grad:linear-gradient(125deg,#0d1b45 0%,#1e4fd6 60%,#d85618 118%);
  --hero-scrim:linear-gradient(125deg,rgba(0,0,0,.06) 0%,rgba(0,0,0,.28) 100%);
  --tile-1:rgba(47,108,255,.16); --tile-2:rgba(255,138,61,.16); --tile-3:rgba(47,108,255,.22); --tile-4:rgba(255,154,92,.16); --tile-5:rgba(216,86,24,.2);
  --seg-sale:#4d8dff; --seg-cal:#ff9a4d; --seg-redeem:#ff7a3d;
  --seg-sale-bg:#1f4fd8; --seg-cal-bg:#c9641f; --seg-redeem-bg:#c0471a;
  --cal-day-ink:#f4f7fc; --cal-today-ink:#a5c2ff; --cal-count-bg:rgba(91,140,255,.30); --cal-count-ink:#cddbff;
}
:root[data-theme="royal"] { /* 藏蓝琥珀 · 浅色 */
  --bg:#f3f5f8; --card:#ffffff; --card-soft:#fbfcfe;
  --ink:#1a2233; --muted:#64748b; --line:#e2e8f0;
  --blue:#1e6ad2; --blue-deep:#0b3d91; --blue-soft:#e8f0fe; --active-text:#0b3d91;
  --orange:#e8862e; --orange-deep:#c05f14; --amber:#d98a1f; --orange-soft:#fdf1e3; --orange-deep-soft:#fbe7d6;
  --red:#d9485a; --green:#00a57a;
  --shadow:rgba(15,35,75,.08); --arrow:#c3ccd8; --chip-line:#c9dcf5;
  --top-grad:linear-gradient(135deg,#0b3d91,#1e6ad2);
  --hero-grad:linear-gradient(125deg,#0b3d91 0%,#1e6ad2 60%,#c05f14 118%);
  --hero-scrim:linear-gradient(125deg,rgba(9,20,44,.04) 0%,rgba(9,20,44,.20) 100%);
  --tile-1:#eaf2ff; --tile-2:#fdf1e3; --tile-3:#e3edff; --tile-4:#faecd9; --tile-5:#fbe7d6;
  --seg-sale:#1e6ad2; --seg-cal:#e8862e; --seg-redeem:#c05f14;
  --seg-sale-bg:#1e6ad2; --seg-cal-bg:#cf6a17; --seg-redeem-bg:#a8500f;
  --cal-day-ink:#1a2233; --cal-today-ink:#1e6ad2; --cal-count-bg:#e8f0fe; --cal-count-ink:#1e6ad2;
}

* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; font-size:14px; line-height:1.55; }
button { font:inherit; }
.app-shell { width:100%; min-height:100vh; max-width:540px; margin:0 auto; background:var(--bg); box-shadow:0 0 38px var(--shadow); }
.top-bar { position:sticky; top:0; z-index:10; display:flex; flex-direction:column; align-items:center; gap:2px; padding:15px 20px 12px; color:#fff; background:var(--top-grad); }
.brand { font-size:17px; font-weight:700; letter-spacing:.04em; }.tagline { font-size:12px; opacity:.78; }
.primary-nav,.sub-nav,.month-nav { display:flex; overflow-x:auto; scrollbar-width:none; background:var(--card); border-bottom:1px solid var(--line); }.primary-nav::-webkit-scrollbar,.sub-nav::-webkit-scrollbar,.month-nav::-webkit-scrollbar { display:none; }
.nav-item,.sub-item,.month-item { flex:0 0 auto; border:0; background:transparent; color:var(--muted); cursor:pointer; white-space:nowrap; }
.nav-item { padding:12px 14px 10px; font-size:13px; }.nav-item.is-active { color:var(--active-text); font-weight:700; border-bottom:3px solid var(--blue); }
.content { padding:16px; }.panel { display:none; }.panel.is-active { display:block; animation:fade .18s ease; } @keyframes fade { from { opacity:.3; transform:translateY(4px) } to { opacity:1; transform:none } }
.hero-card { position:relative; padding:20px; overflow:hidden; color:#fff; border-radius:14px; background:var(--hero-grad); box-shadow:0 8px 22px var(--shadow); }.hero-card::before { content:''; position:absolute; inset:0; background:var(--hero-scrim); }.hero-card::after { content:''; position:absolute; left:0; right:0; bottom:0; height:5px; background:linear-gradient(90deg,var(--orange),var(--amber)); }.hero-card > * { position:relative; z-index:1; }.eyebrow { margin:0 0 5px; font-size:15px; opacity:.88; }.hero-card h1 { margin:0; font-size:21px; letter-spacing:.01em; }.update-time { margin:6px 0 18px; font-size:11px; opacity:.74; }
.hero-grid { display:grid; grid-template-columns:repeat(3,1fr); }.metric { min-width:0; text-align:center; border-right:1px solid rgba(255,255,255,.22); }.metric:last-child { border-right:0; }.metric strong { display:block; overflow:hidden; font-size:18px; text-overflow:ellipsis; white-space:nowrap; }.metric span { font-size:11px; opacity:.78; }
.section { margin-top:20px; }.section-heading { display:flex; align-items:center; justify-content:space-between; margin:0 2px 9px; }.section-heading h2 { margin:0; font-size:15px; }.section-heading span { color:var(--muted); font-size:12px; }.text-button { padding:0; color:var(--blue); border:0; background:transparent; font-size:12px; cursor:pointer; }
.card { border:1px solid var(--line); border-radius:12px; background:var(--card); box-shadow:0 2px 6px var(--shadow); }.market-brief { padding:15px; }.market-brief p { margin:0; color:var(--ink); }.index-row { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding-top:12px; margin-top:12px; border-top:1px solid var(--line); }.index-row div { min-width:0; }.index-row span { display:block; font-size:11px; color:var(--muted); }.index-row strong { display:block; font-size:12px; }.up { color:var(--red); }.down { color:var(--green); }
.event-list { overflow:hidden; }.event-row { display:flex; gap:10px; padding:13px 14px; border-bottom:1px solid var(--line); }.event-row:last-child { border-bottom:0; }.event-number { display:grid; flex:0 0 20px; height:20px; place-items:center; color:var(--blue); border-radius:50%; background:var(--blue-soft); font-size:11px; font-weight:700; }.event-copy { min-width:0; }.event-copy h3 { margin:0; font-size:13px; }.event-copy p { display:-webkit-box; margin:3px 0 0; overflow:hidden; color:var(--muted); font-size:12px; -webkit-box-orient:vertical; -webkit-line-clamp:2; }.event-tag { display:inline-block; margin-top:5px; color:var(--blue); font-size:11px; }
.quick-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }.quick-card { display:flex; align-items:center; gap:10px; min-height:76px; padding:12px; text-align:left; border:1px solid var(--line); border-radius:12px; background:var(--card); cursor:pointer; }.quick-icon { display:grid; flex:0 0 36px; width:36px; height:36px; place-items:center; border-radius:10px; background:var(--quick-bg); font-size:18px; }.quick-card strong,.quick-card span { display:block; }.quick-card strong { font-size:13px; }.quick-card span { color:var(--muted); font-size:11px; }
.sub-nav,.month-nav { margin:-16px -16px 16px; padding:0 11px; }.sub-item,.month-item { padding:11px 11px 9px; font-size:13px; }.sub-item.is-active,.month-item.is-active { color:var(--active-text); font-weight:700; border-bottom:2px solid var(--blue); }
.view-heading { margin:0 0 10px; font-size:16px; }.notice { padding:11px 12px; margin:0 0 12px; border-radius:9px; color:var(--muted); background:var(--blue-soft); font-size:12px; }.info-card { padding:15px; margin-bottom:10px; }.info-card h3 { margin:0; font-size:15px; }.info-card p { margin:6px 0 0; color:var(--muted); font-size:13px; }.meta { display:flex; flex-wrap:wrap; gap:8px 14px; margin-top:10px; color:var(--muted); font-size:12px; }.badge { display:inline-block; padding:2px 7px; border-radius:999px; color:var(--orange-deep); background:var(--orange-deep-soft); font-size:11px; }
.product-card { padding:15px; margin-bottom:10px; }.product-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }.product-top h3 { margin:0; font-size:15px; }.product-rate { color:var(--orange-deep); font-size:18px; font-weight:700; white-space:nowrap; }.product-card p { margin:7px 0 0; color:var(--muted); font-size:12px; }.benefit-list { margin:10px 0 0; padding:0; list-style:none; }.benefit-list li { padding:8px 0; border-top:1px dashed var(--line); font-size:13px; }
.empty { padding:34px 15px; color:var(--muted); text-align:center; }
/* ---------- 产品日历 ---------- */
.cal-seg { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; padding:2px 0 0; }
.cal-seg-item { position:relative; display:flex; min-height:76px; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:12px 8px 10px; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--card); cursor:pointer; box-shadow:0 2px 6px var(--shadow); transition:transform .12s ease, box-shadow .15s ease, background .15s ease; }
.cal-seg-item::before { content:''; position:absolute; inset:0 0 auto; height:3px; background:var(--c); }
.cal-seg-item strong { display:block; font-size:22px; line-height:1.2; color:var(--c); }
.cal-seg-item span { font-size:12px; color:var(--muted); }
.cal-seg-item:hover { box-shadow:0 6px 14px var(--shadow); }
.cal-seg-item:active { transform:scale(.96); }
.cal-seg-item.is-active { border-color:transparent; background:var(--cb); box-shadow:0 8px 18px var(--shadow); }
.cal-seg-item.is-active::before { background:rgba(255,255,255,.35); }
.cal-seg-item.is-active strong, .cal-seg-item.is-active span { color:#fff; }
.cal-section { margin-top:16px; }
.cal-more-wrap { padding:10px 2px 2px; }
.cal-more { width:100%; padding:9px 0; border:1px dashed var(--line); border-radius:10px; background:var(--card-soft); color:var(--blue); font-size:12px; cursor:pointer; }
.cal-more:active { background:var(--bg); }
.calendar-card { overflow:hidden; }
.cal-nav { display:flex; align-items:center; justify-content:space-between; padding:12px 14px 8px; }
.cal-month { font-size:15px; font-weight:700; }
.cal-arrow { width:30px; height:30px; border:1px solid var(--line); border-radius:8px; background:var(--card); color:var(--active-text); font-size:18px; line-height:1; cursor:pointer; }
.cal-arrow:active { background:var(--bg); }
.cal-weekdays { display:grid; grid-template-columns:repeat(7,1fr); padding:0 8px 6px; color:var(--muted); font-size:11px; text-align:center; }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; padding:0 8px 12px; }
.cal-cell { position:relative; display:flex; min-height:48px; flex-direction:column; align-items:center; justify-content:center; border:0; border-radius:10px; background:transparent; cursor:pointer; }
.cal-cell.is-blank { cursor:default; }
.cal-day-num { color:var(--cal-day-ink); font-size:13px; line-height:1.1; }
.cal-cell.is-today .cal-day-num { color:var(--cal-today-ink); font-weight:700; }
.cal-cell.is-selected { background:var(--blue-deep); }
.cal-cell.is-selected .cal-day-num { color:#fff; }
.cal-count { min-width:16px; margin-top:3px; padding:0 4px; border-radius:999px; background:var(--cal-count-bg); color:var(--cal-count-ink); font-size:10px; font-style:normal; font-weight:700; line-height:14px; text-align:center; }
.cal-cell.is-selected .cal-count { background:rgba(255,255,255,.25); color:#fff; }
.cal-cell.is-today:not(.is-selected) { box-shadow:inset 0 0 0 1px var(--cal-today-ink); }
.cal-day-panel { padding:12px 14px 14px; border-top:1px solid var(--line); background:var(--card-soft); }
.cal-day-heading { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:10px; }
.cal-day-heading h3 { margin:0; font-size:14px; }
.cal-day-heading span { color:var(--muted); font-size:11px; }
.product-list { display:flex; flex-direction:column; gap:8px; }
.pi-item { overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--card); box-shadow:0 2px 6px var(--shadow); }
.pi-main { display:flex; align-items:center; gap:10px; padding:12px; cursor:pointer; }
.pi-badge { flex:0 0 auto; padding:3px 8px; border-radius:999px; font-size:11px; font-weight:700; }
.badge-sale { color:var(--blue); background:var(--blue-soft); }
.badge-redeem { color:var(--orange-deep); background:var(--orange-deep-soft); }
.badge-open { color:var(--amber); background:var(--orange-soft); }
.pi-copy { flex:1; min-width:0; }
.pi-copy h4 { margin:0; overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.pi-copy h4 em { margin-left:6px; color:var(--muted); font-size:11px; font-style:normal; font-weight:400; }
.pi-copy p { margin:3px 0 0; overflow:hidden; color:var(--muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.pi-copy .pi-window { overflow:visible; white-space:normal; }
.pi-count { display:inline-block; margin-left:6px; padding:1px 6px; border-radius:999px; color:var(--blue); background:var(--blue-soft); font-size:10px; font-weight:700; vertical-align:1px; }
.pi-arrow { flex:0 0 auto; color:var(--arrow); font-size:18px; transition:transform .15s ease; }
.cal-page-head { display:flex; align-items:center; gap:12px; padding:2px 2px 14px; }
.cal-back { flex:0 0 34px; width:34px; height:34px; border:1px solid var(--line); border-radius:50%; background:var(--card); color:var(--active-text); font-size:20px; line-height:1; cursor:pointer; box-shadow:0 2px 6px var(--shadow); }
.cal-back:active { background:var(--bg); }
.cal-page-title { min-width:0; }
.cal-page-title h3 { margin:0; font-size:17px; }
.cal-page-title p { margin:3px 0 0; color:var(--muted); font-size:11px; }
.member-item { display:block; padding:12px; text-decoration:none; color:inherit; }
.member-item .pi-main { padding:0; }
.member-main { cursor:default; }
.pi-links { display:flex; flex-wrap:wrap; gap:8px; padding-top:10px; margin-top:10px; border-top:1px dashed var(--line); }
.pi-link-chip { display:inline-flex; align-items:center; gap:3px; padding:6px 12px; border:1px solid var(--chip-line); border-radius:999px; background:var(--blue-soft); color:var(--blue); font-size:12px; font-weight:600; text-decoration:none; }
.pi-link-chip:active { transform:scale(.97); }
.member-item .pi-nolink { display:block; padding-top:10px; margin-top:10px; border-top:1px dashed var(--line); color:var(--arrow); font-size:11px; }
/* ---------- 配色切换器 ---------- */
.theme-widget { position:fixed; right:14px; bottom:18px; z-index:60; }
.theme-fab { display:grid; width:46px; height:46px; place-items:center; border:0; border-radius:50%; background:var(--top-grad); color:#fff; font-size:20px; cursor:pointer; box-shadow:0 6px 16px var(--shadow); }
.theme-sheet { position:absolute; right:0; bottom:56px; width:248px; padding:13px; border:1px solid var(--line); border-radius:14px; background:var(--card); box-shadow:0 14px 34px var(--shadow); }
.theme-sheet[hidden] { display:none; }
.theme-sheet-head { display:flex; align-items:center; justify-content:space-between; margin:0 0 10px; font-size:13px; font-weight:700; }
.theme-close { padding:0 4px; border:0; background:transparent; color:var(--muted); font-size:18px; line-height:1; cursor:pointer; }
.theme-options { display:flex; flex-direction:column; gap:7px; }
.theme-option { display:flex; align-items:center; gap:10px; width:100%; padding:8px 9px; text-align:left; border:1px solid var(--line); border-radius:10px; background:var(--bg); cursor:pointer; }
.theme-option.is-current { border-color:var(--blue); background:var(--blue-soft); }
.theme-swatches { display:flex; flex:0 0 auto; gap:4px; }
.swatch { width:15px; height:15px; border-radius:50%; border:1px solid rgba(0,0,0,.15); }
.theme-copy { min-width:0; }.theme-copy b { display:block; font-size:12px; }.theme-copy span { display:block; margin-top:1px; color:var(--muted); font-size:10px; }
@media (min-width:541px) { body { padding:20px 0; }.app-shell { min-height:calc(100vh - 40px); border-radius:16px; overflow:hidden; }.top-bar { position:relative; }.theme-widget { right:24px; bottom:24px; } }
