/* ============================================================================
   S56d「暮色金 Evening Gold」· 主题包（正式版）
   ----------------------------------------------------------------------------
   常驻加载（index.html <link>），全部规则挂 html.eg 前缀 —— 开关就是
   <html> 上的 .eg 类（MV3_EG.apply 维护），主题关着时零影响。
   规矩：一行布局都不动 —— 只动令牌（html.eg 一层，全部 !important 以压过
   applySkin() 写在 <html> 上的内联派生色）与少量纯装饰（圆角 / 头图帘 /
   衬线标题 / 玻璃）。页面结构、数据、交互零改动。
   ============================================================================ */
/* ---------- 1. 令牌层：深夜蓝 × 香槟金 ---------- */
html.eg{
  /* 底与墨：比现在的 #070e1c 略暖一档的深夜蓝 */
  --bg:#101A2C !important;
  --bg2:#0B1322 !important;
  --ink:#F3ECDC !important;              /* 香槟调暖白 */
  --dim:#A9B3C7 !important;
  --dim2:#75829E !important;
  --line:rgba(232,194,137,.16) !important;  /* 金色发丝线 */
  --w:236,214,180 !important;            /* 表面加白代理 → 全部面板带香槟暖调 */
  --k:0,0,0 !important;
  --panel:rgba(15,24,40,.86) !important;
  --panel2:rgba(12,20,35,.94) !important;

  /* 强调色（当底）：金走天下 */
  --lit1:#E8C289 !important;             /* 点亮 / 选中 → 香槟金 */
  --lit2:#D9A05B !important;             /* 链接 / 次强调 → 深金 */
  --lit3:#D8B0A4 !important;             /* 原亮紫 → 陶玫瑰 */
  --warm:#E3A45C !important;

  /* 强调色（当字）：压深金系，深底上全部 ≥ 6:1 */
  --ok-fg:#D9BE8C !important;            /* 已完成 → 香槟 */
  --warm-fg:#E3A45C !important;
  --tk1:#E8C289 !important;  --tk2:#E5B87E !important;  --tk3:#D9A05B !important;
  --tk4:#CFC3A4 !important;  --tk5:#DFA35A !important;  --tk6:#D08C48 !important;
  --add-fg:#E8C289 !important;
  --on1:#241A0C !important; --on2:#241A0C !important; --on3:#241A0C !important; /* 金底上的深棕字 */

  /* 地图状态色：点亮国家 = 金（这是全站最显眼的一处变化）
     ⚠️ 这一组必须全部 !important —— applySkin() 会把整套 --c-* 派生色
     内联写在 <html> 上（app.js applySkin：R.setProperty('--c-'+k+'-a'+a,…)），
     不带 important 会被内联全部压掉（第一次跑地图没变金就是这个原因）。 */
  /* S141-SKINCOLOR：主题自带的状态色另存一份（--eg-*）。
     为什么：applySkin 会把 skin 的色内联写到 <html> 上（无 important），
     样式表的普通声明赢不过它 → 主题默认色会被内联压掉（换主题没反应）。
     这份带 !important 留在 CSS 里当锚；JS（MV3_EG.skinOver）只在**用户
     改过该档**时把用户色按 important 盖到 --c-* 上，没改过就由这份说话。
     —— 两个诉求同时成立：主题外观不变，且用户的改色一定赢。 */
  --eg-visited:#E8C289 !important;
  --eg-plan:#EBBE7E !important;
  --eg-wish:#9FB4D9 !important;
  --eg-none:#131E30 !important;

  --c-visited:#E8C289; --c-visited-lt:#F2DDB4; --c-visited-st:#FFF3D6; --c-visited-dk:#6E5322;
  --c-visited-a16:rgba(232,194,137,.16); --c-visited-a42:rgba(232,194,137,.42);
  --c-visited-glow:rgba(232,194,137,.32);
  --c-plan:#EBBE7E; --c-plan-lt:#F6D9AC; --c-plan-st:#F3D3A0; --c-plan-dk:#6E5322;
  --c-plan-a16:rgba(235,190,126,.16); --c-plan-a42:rgba(235,190,126,.44);
  --c-wish:#9FB4D9; --c-wish-lt:#D3E0F5; --c-wish-soft:#22304C;
  --c-wish-a16:rgba(159,180,217,.16); --c-wish-a42:rgba(159,180,217,.44);
  --c-none:#131E30; --c-none-pt:#17233A; --c-none-lt:#4E5F7D;
  --c-none-a16:rgba(236,214,180,.05); --c-none-a42:rgba(120,150,210,.26);
  --c-rplan:#E0A45B !important; --c-rplan-lt:#F4CFA0 !important; --c-rplan-dk:#7A5A26 !important;
  --c-rplan-a16:rgba(224,164,91,.16) !important; --c-rplan-a42:rgba(224,164,91,.44) !important;
  --c-rplan-a72:rgba(224,164,91,.72) !important; --c-rplan-a95:rgba(224,164,91,.95) !important;
  --c-rdone:#F0DFC0 !important; --c-rdone-lt:#F8EED8 !important; --c-rdone-dk:#7A6A4C !important;
  --c-rdone-a16:rgba(240,223,192,.16) !important; --c-rdone-a42:rgba(240,223,192,.42) !important;
  --hi-core:#F0D9A6 !important; --hi-halo:232,194,137 !important;
}

/* ---------- 1.5 地图渐变与足迹小图 ----------
   大地图三档国土走 #litGrad / #planGrad（stop 被 applySkin 用
   presentation attribute 写死，CSS 规则恰好能压过它）；足迹小图
   三支色硬编码在 .mapbox 的 --ft-* 上。两处都要接管，地图才会
   从「青绿→蓝」整体换成「深金→香槟」。 */
html.eg #litGrad stop:nth-child(1){stop-color:#7A5A26}
html.eg #litGrad stop:nth-child(2){stop-color:#C89B55}
html.eg #litGrad stop:nth-child(3){stop-color:#F0D9A6}
html.eg #planGrad stop:nth-child(1){stop-color:#8A6430;stop-opacity:.85}
html.eg #planGrad stop:nth-child(2){stop-color:#EBBE7E;stop-opacity:.75}
html.eg #routeGrad stop:nth-child(1){stop-color:#8A6430;stop-opacity:.72}
html.eg #routeGrad stop:nth-child(2){stop-color:#F0D9A6;stop-opacity:1}
html.eg #routeGrad stop:nth-child(3){stop-color:#8A6430;stop-opacity:.72}
html.eg :is(#mV3,#costView,#fxView) .mapbox{--ft-v:var(--c-visited,#E8C289);--ft-p:var(--c-plan,#EBBE7E);--ft-w:var(--c-info-gris,#9FB4D9)}

/* ---------- 2. 装饰层：衬线标题 / 头图帘 / 玻璃 / 圆角 ---------- */

/* 大标题与里程数字换衬线（Didot 系西文 + 宋体中文） */
html.eg :is(#mV3,#costView,#fxView,#gsPanel,#gsScrim) .hd h1,
html.eg :is(#mV3,#costView,#fxView,#gsPanel,#gsScrim) .ta-h,
html.eg :is(#mV3,#costView,#fxView,#gsPanel,#gsScrim) .odo-km b,
html.eg :is(#mV3,#costView,#fxView,#gsPanel,#gsScrim) .odo-pp b{
  font-family:"Didot","Bodoni 72","Songti SC","STSong","Noto Serif SC",serif !important;
  font-weight:600 !important;
}
html.eg :is(#mV3,#costView,#fxView,#gsPanel,#gsScrim) .hd h1{letter-spacing:.4px}

/* 头图：暖夜幕渐变帘 + 深棕描金投影；离线无封面时回落同调深蓝渐变 */
html.eg :is(#mV3) .ta-hero{border-radius:20px !important;box-shadow:0 18px 44px rgba(0,0,0,.46) !important}
html.eg :is(#mV3) .ta-hero .ta-veil{background:linear-gradient(180deg,rgba(11,19,34,.16) 0%,rgba(11,19,34,.05) 40%,rgba(11,19,34,.80) 100%) !important}
html.eg :is(#mV3) .ta-hero .ta-h{color:#F6EEDC !important;text-shadow:0 1px 10px rgba(0,0,0,.55) !important}
html.eg :is(#mV3) .ta-hero .ta-grad,
html.eg :is(#mV3) .bpgrad{background:linear-gradient(150deg,#26395A,#16233B) !important}

/* 行程卡（rc 渐变卡）统一到深夜蓝金调 */
html.eg :is(#mV3) .rc{background:linear-gradient(140deg,#20334F,#141F33) !important;border:1px solid rgba(232,194,137,.18) !important}

/* 玻璃卡：香槟面 + blur + 圆角加大一档（纯装饰） */
html.eg :is(#mV3,#costView,#fxView,#gsPanel,#gsScrim) .card{
  background:rgba(236,214,180,.055) !important;
  border-color:rgba(232,194,137,.13) !important;
  border-radius:17px !important;
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
}

/* 底栏：深色玻璃 + 顶缘一条金发丝线 */
html.eg :is(#mV3) .tabbar{border-top:1px solid rgba(232,194,137,.15) !important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}

/* ---------- 3. 硬编码杂色收编 ----------
   · --ac：历史行程国家条与时间轴时刻的「每国一色」，JS 内联写死
     （style="--ac:#…"）—— 主题层用 !important 收编成香槟金；
     国与国的区分交给旗帜，不再靠底色。
   · 金底上的字按暮色金规矩换深棕 #241A0C，不跟白字。 */
html.eg :is(#mV3) .hist-chip,:is(#mV3) .tl-day,:is(#mV3) .tl-dayc,:is(#mV3) .tl-time{--ac:#C9A05E !important}
html.eg :is(#mV3) .hist-chip.on b,:is(#mV3) .hist-chip i{color:#241A0C !important}
html.eg :is(#mV3) .hist-chip.on i{background:rgba(36,26,12,.22) !important}
html.eg :is(#mV3) .hist-done{background:#B08542 !important}

/* S56c：写实封面在头图场景提亮一档 —— 封面是深夜调摄影，
   object-fit 裁切后直接垫标题会太闷；主题态的照片头图统一提亮提饱和，
   文字可读性仍由 ta-veil 底部渐变帘保证 */
html.eg :is(#mV3) .ta-hero img{filter:brightness(1.34) saturate(1.1) !important}
