/* ============ 燧星薪火 · 全站质感增强层 v2 ============
   目标：更高级、更稳重、压亮度去刺眼。
   原则：深空蓝黑底 + 克制暗金点缀；不强行覆盖业务布局。
   按钮策略：金色渐变类 → 保留暗金渐变；其余按钮 → 深玻璃+暗金文字，全部统一。 */
html,body{
  font-family:"Noto Serif SC","Source Han Serif SC","Songti SC","PingFang SC",serif;
  background:#04050c !important;
  color:#f2ecd9 !important;
  letter-spacing:.25px;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
h1,h2,h3,h4,h5{ font-weight:700; letter-spacing:1.5px; color:#f6ecd4; }
p,li,span,div{ letter-spacing:.3px; }

/* ---------- 按钮：基础统一 ---------- */
button{
  border-radius:12px;
  letter-spacing:1px;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .25s ease, filter .2s ease, background .25s ease, color .2s ease, border-color .25s ease;
}
button:active{ transform:scale(.965); }
button:disabled{ opacity:.42; cursor:not-allowed; filter:grayscale(.5); }

/* 金色渐变 / primary / 显式金色内联的主按钮 → 暗金渐变 + 深字 */
button[class*="gradient"],button[class*="gold"],button[class*="Gold"],button[class*="primary"],button[class*="Primary"],
button[style*="255, 215"],button[style*="255,215"],button[style*="255, 190"],button[style*="255,190"],button[style*="255, 180"]{
  background:linear-gradient(135deg,#c9a24a 0%,#a67c2e 55%,#8a6a22 100%) !important;
  color:#14100a !important;
  border:1px solid rgba(201,162,74,.45) !important;
  box-shadow:0 3px 14px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,220,150,.28);
  text-shadow:0 1px 1px rgba(255,230,160,.25);
  font-weight:600;
}
button[class*="gradient"]:hover,button[class*="gold"]:hover,button[class*="primary"]:hover{ filter:brightness(1.06); }

/* 其余按钮（白底/灰底/无样式/图标钮）→ 深玻璃 + 暗金文字，去刺眼白 */
button:not([class*="gradient"]):not([class*="gold"]):not([class*="Gold"]):not([class*="primary"]):not([class*="Primary"]):not([style*="255, 215"]):not([style*="255,215"]):not([style*="255, 190"]):not([style*="255,190"]):not([style*="255, 180"]){
  background:rgba(20,22,40,.78) !important;
  color:#e8d9a8 !important;
  border:1px solid rgba(201,162,74,.38) !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);
  text-shadow:none;
}
button:not([class*="gradient"]):not([class*="gold"]):not([class*="primary"]):hover{ background:rgba(30,32,56,.85) !important; }

/* ---------- 输入框：深色玻璃 + 暗金聚焦 ---------- */
input,textarea,select{
  border-radius:11px;
  background:rgba(10,11,22,.72) !important;
  border:1px solid rgba(201,162,74,.32) !important;
  color:#f2ecd9 !important;
  caret-color:#e0b95e;
  transition:border-color .25s ease, box-shadow .25s ease;
}
input::placeholder,textarea::placeholder{ color:rgba(210,200,170,.42); }
input:focus,textarea:focus,select:focus{
  border-color:rgba(201,162,74,.75) !important;
  box-shadow:0 0 0 2px rgba(201,162,74,.16), 0 0 14px rgba(201,162,74,.10) !important;
  outline:none;
}

/* ---------- 卡片：深空玻璃 + 细金边 + 深投影 ---------- */
[class*="card"],[class*="Card"],[class*="panel"],[class*="Panel"],[class*="rounded-2xl"],[class*="rounded-xl"]{
  background:linear-gradient(160deg,rgba(18,19,36,.82),rgba(8,9,18,.88)) !important;
  border:1px solid rgba(201,162,74,.26) !important;
  box-shadow:0 12px 38px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,230,160,.07);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

/* ---------- 弹窗/遮罩 ---------- */
[class*="modal"],[class*="Modal"],[class*="dialog"],[class*="Dialog"],[class*="overlay"],[class*="Overlay"],[class*="popup"],[class*="Popup"]{
  background:rgba(3,4,10,.88) !important;
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
}

/* ---------- 底导/顶栏 ---------- */
[class*="nav"][class*="bottom"],[class*="Nav"][class*="bottom"],[class*="tabbar"],[class*="Tabbar"],[class*="footer"],[class*="Footer"],[class*="header"],[class*="Header"],[class*="topbar"]{
  background:rgba(6,7,14,.82) !important;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-color:rgba(201,162,74,.16) !important;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar{ width:7px; height:7px; }
::-webkit-scrollbar-track{ background:rgba(8,9,18,.7); }
::-webkit-scrollbar-thumb{ background:linear-gradient(180deg,#a67c2e,#6e531c); border-radius:4px; }
::-webkit-scrollbar-thumb:hover{ background:#c9a24a; }

::selection{ background:rgba(201,162,74,.32); color:#fff; }

/* ---------- 链接 ---------- */
a{ color:#d9b36a; transition:color .2s ease, opacity .2s ease; }
a:hover{ color:#f0d08a; opacity:1; }

/* ---------- 金色文字统一（比 #ffd700 更稳、更不刺眼） ---------- */
[style*="255, 215, 0"],[style*="255,215,0"],[style*="#ffd700"],[style*="#FFD700"],[style*="rgb(255, 215, 0)"],[style*="rgba(255,215,0"]{
  color:#e5c877 !important;
}

/* ---------- 移动端触控区 ---------- */
@media(max-width:640px){
  button{ min-height:44px; }
  [class*="card"],[class*="Card"]{ border-radius:14px; }
}

/* ============ 燧星薪火 · 全站质感增强层 v3 ============
   在 v2 基础上：更深邃的器物感、克制的金色点缀、更稳重的间距与层级。
   只增强质感，不破坏 3D/业务布局。 */
html,body{background:#04050c !important}

/* ---------- 主界面 HUD 层级：标题/信息条加金线 ---------- */
header, [class*="header"], [class*="Header"], [class*="topbar"], [class*="hud"]{
  border-bottom:1px solid rgba(212,175,55,.18) !important;
}

/* ---------- 容器/浮层：深空玻璃 + 顶部高光线 ---------- */
[class*="card"],[class*="Card"],[class*="panel"],[class*="Panel"],[class*="modal"],[class*="Modal"],[class*="dialog"],[class*="Dialog"],[class*="popup"],[class*="Popup"],[class*="sheet"],[class*="Sheet"]{
  position:relative;
}
[class*="card"]::before,[class*="Card"]::before,[class*="panel"]::before,[class*="Panel"]::before,[class*="sheet"]::before,[class*="Sheet"]::before{
  content:"";position:absolute;left:14px;right:14px;top:0;height:1px;
  background:linear-gradient(90deg,rgba(255,230,160,.4),rgba(255,230,160,0));
  border-radius:2px;pointer-events:none;
}

/* ---------- 金色主按钮：内高光 + 光晕 ---------- */
button[class*="gradient"],button[class*="gold"],button[class*="Gold"],button[class*="primary"],button[class*="Primary"],
button[style*="255, 215"],button[style*="255,215"],button[style*="255, 190"],button[style*="255,190"]{
  box-shadow:0 4px 20px rgba(166,124,46,.35), inset 0 1px 0 rgba(255,235,180,.35) !important;
}

/* ---------- 数字/强强调：金渐变文字 ---------- */
[class*="score"],[class*="num"],[class*="value"],[class*="count"],[class*="starDust"],[class*="star-dust"]{
  font-variant-numeric:tabular-nums;
}

/* ---------- 加载态：金色星尘脉冲 ---------- */
[class*="loading"],[class*="Loading"],[class*="spinner"]{
  border-color:rgba(212,175,55,.25) !important;
  border-top-color:#e8c56a !important;
}

/* ---------- 滚动条/选区统一 ---------- */
::-webkit-scrollbar{width:7px;height:7px}
::-webkit-scrollbar-track{background:rgba(8,9,18,.7)}
::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#a67c2e,#6e531c);border-radius:4px}
::-webkit-scrollbar-thumb:hover{background:#c9a24a}
::selection{background:rgba(201,162,74,.32);color:#fff}

/* ---------- 移动端：触控与安全区 ---------- */
@media(max-width:640px){
  button{min-height:44px}
  input,textarea,select{font-size:16px !important}
  [class*="card"],[class*="Card"]{border-radius:15px}
  body{padding-bottom:env(safe-area-inset-bottom)}
}

/* ---------- 全站文字节奏 ---------- */
h1,h2,h3,h4{letter-spacing:1.5px}
p,li,span,div{letter-spacing:.3px}

/* ============================================================
   底部五导航 · 暗金高级化（2026-10-17）
   React bundle 渲染的 <nav class="fixed bottom-0 left-0 right-0 z-40">
   ============================================================ */
nav.fixed[class*="z-40"]>div:first-child{
  background:linear-gradient(180deg,rgba(16,13,6,.86),rgba(5,6,13,.93)) !important;
  -webkit-backdrop-filter:blur(26px) saturate(1.5) !important;
  backdrop-filter:blur(26px) saturate(1.5) !important;
  border-top:1px solid rgba(212,175,55,.38) !important;
  box-shadow:0 -10px 34px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,230,160,.14), inset 0 -1px 0 rgba(255,230,160,.05);
}
nav.fixed[class*="z-40"]>div:first-child::before{
  content:"";position:absolute;left:0;right:0;top:-1px;height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,215,0,.55) 20%,rgba(255,215,0,.85) 50%,rgba(255,215,0,.55) 80%,transparent);
  pointer-events:none;
}

/* tab 链接：去触控延迟 + 默认暗金柔光 */
nav.fixed[class*="z-40"] a{
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  user-select:none;-webkit-user-select:none;
  position:relative;
}
nav.fixed[class*="z-40"] a[class*="text-star-dim"]{
  color:rgba(210,196,160,.62) !important;
  transition:color .25s ease,transform .25s ease,filter .25s ease !important;
}
nav.fixed[class*="z-40"] a[class*="text-star-dim"]:hover,
nav.fixed[class*="z-40"] a[class*="text-star-dim"]:active{
  color:rgba(232,197,106,.9) !important;
  transform:translateY(-2px);
  filter:drop-shadow(0 0 10px rgba(212,175,55,.4));
}
nav.fixed[class*="z-40"] a[class*="text-star-dim"] svg{
  stroke-width:1.6;
}

/* 选中 tab：亮金发光 + 底部金线 + 图标光晕 */
nav.fixed[class*="z-40"] a[class*="text-soul-gold"]{
  transform:translateY(-2px) scale(1.06);
  filter:drop-shadow(0 0 14px rgba(255,215,0,.65)) !important;
}
nav.fixed[class*="z-40"] a[class*="text-soul-gold"]::after{
  content:"";position:absolute;bottom:0;left:50%;transform:translateX(-50%);
  width:22px;height:3px;border-radius:3px;
  background:linear-gradient(90deg,transparent,#ffd700 30%,#ffd700 70%,transparent);
  box-shadow:0 0 10px rgba(255,215,0,.75),0 0 22px rgba(255,215,0,.35);
}
nav.fixed[class*="z-40"] a[class*="text-soul-gold"] svg{
  filter:drop-shadow(0 0 7px rgba(255,215,0,.85));
}
nav.fixed[class*="z-40"] a[class*="text-soul-gold"] span{
  text-shadow:0 0 12px rgba(255,215,0,.7);
}

/* 全站移动端触控加固：消除微信 WebView 双击缩放/300ms 误触 */
@media(max-width:768px){
  a,button,[role="button"]{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
}

/* 窄屏：导航 tab 收紧，避免挤压溢出 */
@media(max-width:480px){
  nav.fixed[class*="z-40"] a{padding-left:8px;padding-right:8px}
  nav.fixed[class*="z-40"] a span{font-size:11px !important}
  nav.fixed[class*="z-40"] a svg{width:22px;height:22px}
}
