/* revamp_chrome.css — 右上角齿轮设置按钮 + 弹出面板（TFTIPS popover-card 风格） */

.gear-settings-wrap{
  position:relative;
  display:flex;
  align-items:center;
  align-self:center;
  flex:0 0 auto;
  margin-left:8px;
  pointer-events:auto;
}

.gear-settings-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  padding:6px;
  border:none;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  transition:color .15s cubic-bezier(.4,0,.2,1);
}

.gear-settings-btn svg{
  width:24px;
  height:24px;
  display:block;
  transition:transform .2s cubic-bezier(.4,0,.2,1);
}

.gear-settings-btn:hover{
  color:var(--text);
}

.gear-settings-btn:focus-visible{
  outline:2px solid var(--primary);
  outline-offset:2px;
}

.gear-settings-btn.is-open svg,
.gear-settings-btn:active svg{
  transform:rotate(90deg);
}

.gear-popover{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:220px;
  border-radius:16px;
  background:var(--panel);
  border:1px solid var(--line);
  box-shadow:0 8px 24px rgba(0,0,0,.4);
  overflow:hidden;
  z-index:6000;
  opacity:0;
  transform:scale(.95) translateY(-6px);
  transform-origin:top right;
  pointer-events:none;
  transition:opacity 150ms ease, transform 150ms ease;
}

:root[data-theme="light"] .gear-popover{
  box-shadow:0 0 10px rgba(0,0,0,.10);
}

.gear-popover.is-open{
  opacity:1;
  transform:scale(1) translateY(0);
  pointer-events:auto;
}

.gear-popover-section{
  padding:12px 12px 10px;
}

.gear-popover-section + .gear-popover-section{
  border-top:1px solid var(--line-2);
}

.gear-popover-title{
  margin:0 0 8px;
  font-size:11px;
  font-weight:600;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}

/* 外观：日间/夜间分段控件 */
.gear-theme-segment{
  display:flex;
  gap:3px;
  padding:3px;
  border-radius:10px;
  background:rgba(128,128,128,.12);
}

.gear-theme-option{
  flex:1 1 0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  height:32px;
  border:none;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  transition:background .15s ease, color .15s ease, box-shadow .15s ease;
}

.gear-theme-option svg{width:15px;height:15px;display:block;flex:0 0 auto}
.gear-theme-option-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

#page-explorer .exa-board-check input[type="radio"]{
  appearance:none;
  width:14px;
  height:14px;
  margin:0;
  border:1px solid var(--control-border);
  border-radius:3px;
  background:var(--control-bg);
  box-shadow:none;
  cursor:pointer;
}
#page-explorer .exa-board-check input[type="radio"]:checked{
  border-color:var(--primary);
  background:var(--primary);
  box-shadow:inset 0 0 0 3px var(--control-bg);
}

.gear-theme-option:hover{
  color:var(--text);
}

.gear-theme-option.is-active{
  background:var(--panel);
  color:var(--primary);
  box-shadow:0 1px 3px rgba(0,0,0,.18);
}

:root[data-theme="light"] .gear-theme-option.is-active{
  background:rgba(60,50,20,.10);
  box-shadow:none;
}

/* 语言列表 */
.gear-lang-list{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.gear-lang-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  min-height:36px;
  padding:8px 12px;
  border:none;
  border-radius:8px;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:13px;
  text-align:left;
  cursor:pointer;
  transition:background .15s ease, color .15s ease;
}

.gear-lang-item:hover{
  background:rgba(128,128,128,.06);
}

.gear-lang-item.is-active{
  color:var(--primary);
  font-weight:600;
}

.gear-lang-check{
  flex:0 0 auto;
  font-size:12px;
  opacity:0;
}

.gear-lang-item.is-active .gear-lang-check{
  opacity:1;
}


/* ===== TFTIPS 风格药丸导航（8 顶层项 + 下拉/二级飞出） =====
   覆盖 tft_v4.html 内旧 .nav 规则（含桌面端图标折叠媒体查询），
   选择器统一用 nav.top-tabs 前缀提高优先级。 */

:root{
  --chrome-glass-alpha:44%;
  --chrome-lens-alpha:76%;
  --chrome-highlight-alpha:16%;
  --chrome-glass-blur:12px;
  --chrome-glass-saturate:1.2;
  --chrome-lens-blur:11px;
  --control-inset-bg:color-mix(in srgb,var(--text) 5%,transparent);
  --control-inset-bg-hover:color-mix(in srgb,var(--text) 7%,transparent);
  --control-inset-shadow:inset 0 1px 2px color-mix(in srgb,var(--background) 38%,transparent),inset 0 -1px 0 color-mix(in srgb,var(--media-text) 14%,transparent);
  --control-inset-shadow-focus:inset 0 1px 2px color-mix(in srgb,var(--background) 28%,transparent),0 0 0 2px color-mix(in srgb,var(--accent) 34%,transparent);
  --control-divider:color-mix(in srgb,var(--text) 18%,transparent);
  --control-arrow:color-mix(in srgb,var(--text) 72%,transparent);
}

:root[data-theme="light"]{
  --chrome-glass-alpha:40%;
  --chrome-lens-alpha:72%;
  --chrome-highlight-alpha:45%;
  --control-inset-bg:color-mix(in srgb,var(--text) 4.5%,transparent);
  --control-inset-bg-hover:color-mix(in srgb,var(--text) 6.2%,transparent);
  --control-inset-shadow:inset 0 1px 2px color-mix(in srgb,var(--text) 9%,transparent),inset 0 -1px 0 color-mix(in srgb,var(--media-text) 60%,transparent);
  --control-inset-shadow-focus:inset 0 1px 2px color-mix(in srgb,var(--text) 5%,transparent),0 0 0 2px color-mix(in srgb,var(--accent) 28%,transparent);
  --control-divider:color-mix(in srgb,var(--text) 13%,transparent);
  --control-arrow:color-mix(in srgb,var(--text) 68%,transparent);
}

/* ROUND16 shared F controls: one inset surface, with a divider reserved for selects. */
:where(.stage select:not([multiple]),.stage input[type="text"],.stage input[type="search"],.stage input[type="number"],.stage input[type="url"],.stage input[type="date"],.stage textarea){
  min-height:38px !important;
  border:1px solid transparent !important;
  border-radius:8px !important;
  background-color:var(--control-inset-bg) !important;
  color:var(--text) !important;
  box-shadow:var(--control-inset-shadow) !important;
  transition:background-color .2s cubic-bezier(.2,0,0,1),box-shadow .2s cubic-bezier(.2,0,0,1),color .2s cubic-bezier(.2,0,0,1),opacity .2s cubic-bezier(.2,0,0,1) !important;
}

:where(.stage select:not([multiple])){
  -webkit-appearance:none !important;
  appearance:none !important;
  padding-right:42px !important;
  background-image:
    linear-gradient(45deg,transparent 50%,var(--control-arrow) 50%),
    linear-gradient(135deg,var(--control-arrow) 50%,transparent 50%),
    linear-gradient(var(--control-divider),var(--control-divider)) !important;
  background-repeat:no-repeat !important;
  background-position:
    calc(100% - 15px) calc(50% - 1px),
    calc(100% - 11px) calc(50% - 1px),
    right 31px center !important;
  background-size:4px 4px,4px 4px,1px calc(100% - 18px) !important;
}

:where(.stage textarea){
  height:auto;
  padding-top:9px;
  padding-bottom:9px;
}

:where(.stage select:not([multiple]),.stage input[type="text"],.stage input[type="search"],.stage input[type="number"],.stage input[type="url"],.stage input[type="date"],.stage textarea):hover:not(:disabled){
  background-color:var(--control-inset-bg-hover) !important;
}

:where(.stage select:not([multiple]),.stage input[type="text"],.stage input[type="search"],.stage input[type="number"],.stage input[type="url"],.stage input[type="date"],.stage textarea):focus-visible{
  outline:0 !important;
  background-color:var(--surface-elevated) !important;
  box-shadow:var(--control-inset-shadow-focus) !important;
}

:where(.stage select:not([multiple]),.stage input[type="text"],.stage input[type="search"],.stage input[type="number"],.stage input[type="url"],.stage input[type="date"],.stage textarea):disabled{
  cursor:not-allowed !important;
  opacity:.46 !important;
  background-color:var(--control-inset-bg) !important;
  box-shadow:none !important;
}

@media(max-width:899px){
  :root{
    --chrome-glass-blur:8px;
    --chrome-lens-blur:8px;
  }
}

.chrome::before,
.chrome::after{
  content:none;
}

.chrome .chrome-inner{
  width:min(calc(100% - 28px),var(--site-max));
  min-height:58px;
  margin:0 auto;
  padding:6px 12px 6px 16px;
  align-items:center;
  border:0;
  border-radius:999px;
  background:color-mix(in srgb,var(--surface-elevated) var(--chrome-glass-alpha),transparent);
  box-shadow:inset 0 1px 0 color-mix(in srgb,var(--media-text) var(--chrome-highlight-alpha),transparent);
  backdrop-filter:blur(var(--chrome-glass-blur)) saturate(var(--chrome-glass-saturate));
  -webkit-backdrop-filter:blur(var(--chrome-glass-blur)) saturate(var(--chrome-glass-saturate));
  pointer-events:auto;
}

@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .chrome .chrome-inner{background:var(--surface-elevated)}
}

.chrome .logo,
.chrome .chrome-nav-wrap,
.chrome .gear-settings-wrap{
  position:relative;
  z-index:1;
  isolation:isolate;
}

.chrome .logo::before,
.chrome .chrome-nav-wrap::before,
.chrome .gear-settings-wrap::before{
  content:"";
  position:absolute;
  inset:-4px -9px;
  z-index:-1;
  border-radius:999px;
  background:color-mix(in srgb,var(--surface-elevated) var(--chrome-lens-alpha),transparent);
  filter:blur(var(--chrome-lens-blur));
  pointer-events:none;
}

.chrome .gear-settings-wrap::before{inset:-4px}

.chrome .logo{
  padding:0;
  gap:12px;
  transition:gap 300ms cubic-bezier(.2,0,0,1);
}

.chrome .logo-mark{
  width:54px;
  height:44px;
  overflow:visible;
  transition:transform 260ms cubic-bezier(.2,0,0,1);
}

.chrome .logo-mark-light img{
  /* Keep the light black-cat head optically aligned with the dark mark.
     Its opaque artwork fills 94% of the source while the dark mark has wide
     transparent padding, so equal CSS boxes are not optically equal. */
  width:38px;
  height:38px;
  margin:0;
}

:root[data-theme="light"] .chrome .logo-mark-light{
  display:flex !important;
  align-items:center;
  justify-content:center;
}

.chrome .logo-copy{
  max-width:180px;
  overflow:hidden;
  opacity:1;
  transform:translateX(0);
  white-space:nowrap;
  transition:max-width 300ms cubic-bezier(.2,0,0,1),opacity 220ms ease,transform 300ms cubic-bezier(.2,0,0,1);
}

body[data-page="home"] .chrome .logo{gap:0}
body[data-page="home"] .chrome .logo-copy{
  max-width:0;
  opacity:0;
  transform:translateX(-8px);
  pointer-events:none;
}
body[data-page="home"] .chrome .logo:hover,
body[data-page="home"] .chrome .logo:focus-visible{gap:12px}
body[data-page="home"] .chrome .logo:hover .logo-mark,
body[data-page="home"] .chrome .logo:focus-visible .logo-mark{transform:translateY(-1px) scale(1.04)}
body[data-page="home"] .chrome .logo:hover .logo-copy,
body[data-page="home"] .chrome .logo:focus-visible .logo-copy{
  max-width:180px;
  opacity:.88;
  transform:translateX(0);
}

.chrome .top-tabs{
  border:0;
  background:transparent;
  box-shadow:none;
}

nav.top-tabs{
  gap:4px;
  padding:6px;
  /* 桌面端不裁剪：下拉面板绝对定位在 nav 内部 */
  overflow:visible;
}

/* 反馈：导航药丸下沿与右侧齿轮按钮下沿持平（齿轮 36px 居中、nav 42px 靠顶） */
.chrome-nav-wrap{
  margin-top:0;
}

nav.top-tabs .nav{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0;
  width:auto;
  min-width:0;
  max-width:none;
  height:34px;
  padding:0 9px;
  border:none;
  border-radius:999px;
  background:transparent;
  color:var(--muted);
  font-size:14px;
  font-weight:700;
  letter-spacing:0;
  line-height:1.3;
  opacity:1;
  text-shadow:none;
  white-space:nowrap;
  flex-shrink:0;
  cursor:pointer;
  transition:background-color .15s cubic-bezier(.4,0,.2,1), color .15s cubic-bezier(.4,0,.2,1);
}

nav.top-tabs .nav.active{min-width:38px}
nav.top-tabs .nav-top-icon{width:16px;height:16px;display:block;flex:0 0 auto}
nav.top-tabs .nav-top-icon svg{width:100%;height:100%;display:block}

nav.top-tabs .nav::after{
  display:none;
}

nav.top-tabs .nav .nav-label{
  display:block;
  max-width:0;
  margin-left:0;
  overflow:hidden;
  opacity:0;
  transition:max-width 280ms cubic-bezier(.2,0,0,1),margin-left 280ms cubic-bezier(.2,0,0,1),opacity 180ms ease;
}

nav.top-tabs .nav:hover .nav-label,
nav.top-tabs .nav:focus-visible .nav-label,
nav.top-tabs .nav.active .nav-label,
.nav-group.is-open > .nav-group-btn .nav-label{
  max-width:176px;
  margin-left:6px;
  opacity:1;
}

body:not([data-page="home"]) nav.top-tabs .nav .nav-label{
  max-width:176px;
  margin-left:6px;
  opacity:1;
}

nav.top-tabs .nav:hover{
  transform:none;
  background:rgba(128,128,128,.05);
  color:var(--text);
}

nav.top-tabs .nav.active{
  color:var(--gold);
  background:var(--accent-subtle);
  text-shadow:none;
}

/* 下拉组 */
.nav-group{
  position:relative;
  display:flex;
  flex:0 0 auto;
}

nav.top-tabs .nav-caret{
  width:0;
  max-width:0;
  height:6px;
  margin-left:0;
  flex:0 0 auto;
  overflow:hidden;
  opacity:0;
  transition:transform .1s ease,max-width 280ms cubic-bezier(.2,0,0,1),margin-left 280ms cubic-bezier(.2,0,0,1),opacity 180ms ease;
}

nav.top-tabs .nav-group-btn:hover .nav-caret,
nav.top-tabs .nav-group-btn:focus-visible .nav-caret,
.nav-group.is-open > .nav-group-btn .nav-caret,
nav.top-tabs .nav-group-btn.active .nav-caret{
  width:10px;
  max-width:10px;
  margin-left:5px;
  opacity:1;
}

body:not([data-page="home"]) nav.top-tabs .nav-caret{
  width:10px;
  max-width:10px;
  margin-left:5px;
  opacity:1;
}

.nav-group.is-open > .nav-group-btn .nav-caret{
  transform:rotate(180deg);
}

/* 下拉面板（复用齿轮面板视觉语言；padding-top 兼作 hover 桥） */
.nav-menu{
  position:absolute;
  top:100%;
  left:50%;
  min-width:180px;
  padding-top:8px;
  z-index:6000;
  opacity:0;
  transform:translateX(-50%) scale(.95) translateY(-4px);
  transform-origin:top center;
  pointer-events:none;
  transition:opacity 150ms ease, transform 150ms ease;
}

.nav-group.is-open > .nav-menu{
  opacity:1;
  transform:translateX(-50%) scale(1) translateY(0);
  pointer-events:auto;
}

/* .top-tabs *{pointer-events:auto}（tft_v4.html chrome 规则）会击穿上面关闭态菜单的
   pointer-events:none，导致隐形菜单项拦截下层点击。显式压回。 */
.nav-group:not(.is-open) > .nav-menu,
.nav-group:not(.is-open) > .nav-menu *,
.nav-submenu:not(.is-open) > .nav-flyout,
.nav-submenu:not(.is-open) > .nav-flyout *{
  pointer-events:none !important;
}

.nav-menu-panel{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:6px;
  border-radius:14px;
  background:var(--panel);
  border:1px solid var(--line);
  box-shadow:0 8px 24px rgba(0,0,0,.4);
}

:root[data-theme="light"] .nav-menu-panel{
  box-shadow:0 0 10px rgba(0,0,0,.10);
}

.nav-menu-item{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  min-height:34px;
  padding:6px 12px;
  border:none;
  border-radius:8px;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:13px;
  font-weight:500;
  text-align:left;
  white-space:nowrap;
  cursor:pointer;
  transition:background .15s ease, color .15s ease;
}

.nav-menu-item:hover{
  background:var(--primary-hover);
}

.nav-menu-icon{
  width:14px;
  height:14px;
  flex:0 0 auto;
  display:block;
}

.nav-menu-item.is-current{
  color:var(--gold);
  font-weight:600;
}

.nav-menu-item.is-current::before{
  content:"";
  position:absolute;
  left:3px;
  top:8px;
  bottom:8px;
  width:3px;
  border-radius:2px;
  background:var(--gold);
}

/* 二级飞出（S17 / S18） */
.nav-submenu{
  position:relative;
}

.nav-submenu-btn{
  justify-content:space-between;
}

.nav-sub-caret{
  margin-left:auto;
  padding-left:16px;
  font-size:10px;
  color:var(--muted);
}

.nav-flyout{
  position:absolute;
  left:100%;
  top:-7px;
  min-width:168px;
  /* padding-left 兼作 hover 桥，避免移到飞出面板途中触发 mouseleave */
  padding-left:8px;
  z-index:6001;
  opacity:0;
  transform:scale(.95) translateX(-4px);
  transform-origin:left top;
  pointer-events:none;
  transition:opacity 150ms ease, transform 150ms ease;
}

.nav-submenu.is-open > .nav-flyout{
  opacity:1;
  transform:scale(1) translateX(0);
  pointer-events:auto;
}

/* LOGO 小字 */
.logo .brand-tag{
  display:block;
  color:var(--muted);
  font-size:10px;
  opacity:.38;
  letter-spacing:1px;
  line-height:1.2;
}

/* 窄屏：top-tabs 横向滚动；下拉改为头部下方的固定浮层，二级菜单内联展开 */
@media (max-width:899px){
  nav.top-tabs{
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:none;
  }
  nav.top-tabs::-webkit-scrollbar{display:none}
  .nav-menu{
    position:fixed;
    top:64px;
    left:16px;
    right:16px;
    transform:scale(.95) translateY(-4px);
  }
  .nav-group.is-open > .nav-menu{
    transform:scale(1) translateY(0);
  }
  .nav-flyout{
    position:static;
    min-width:0;
    padding:0 0 0 14px;
    opacity:1;
    transform:none;
    pointer-events:auto;
    display:none;
  }
  .nav-submenu.is-open > .nav-flyout{
    display:block;
  }
  .nav-flyout .nav-menu-panel{
    padding:0;
    border:none;
    box-shadow:none;
    background:transparent;
  }
}


/* ===== 日间主题全站可读性覆盖（issue-1023 第 3 轮） =====
   原则：全部规则以 :root[data-theme="light"] 开头，不影响暗色主题。
   - 写死亮色的文字 → 深色系（#2a2925 / rgba(42,41,37,*)）
   - 写死深色面板 → 米白面板（var(--panel) / #faf6ec）+ 深色描边
   - 金色 accent → 深金 #8a6d2f；tier 色 → T0 #8a6d2f / T1 #3d6cb5 / T2 #2e8b57 / Trap #a04a44
   内联 style 与 JS 注入样式处的覆盖用 !important。 */

/* --- 全局 chrome --- */
:root[data-theme="light"] .logo strong .brand-main{
  color:#2a2925;
}
:root[data-theme="light"] nav.top-tabs .nav.active{
  color:#6b5316;
  background:rgba(138,109,47,.16);
}
:root[data-theme="light"] .gear-theme-option{
  color:rgba(42,41,37,.78);
}
:root[data-theme="light"] .gear-theme-option.is-active{
  color:#5a4512;
  background:rgba(60,50,20,.16);
}

/* --- overview --- */
:root[data-theme="light"] .overview-view-btn{
  color:rgba(42,41,37,.72);
}
:root[data-theme="light"] .overview-view-btn.active{
  color:#6b5316 !important;
  background:rgba(138,109,47,.14) !important;
}
:root[data-theme="light"] .overview-cards .comp-name{
  color:#2a2925;
}
:root[data-theme="light"] .tier-row[data-tier="T0"] .tier-stamp strong,
:root[data-theme="light"] .tier-row[data-tier="T0"] .comp-trait{
  color:#8a6d2f !important;
}
:root[data-theme="light"] .tier-row[data-tier="T1"] .tier-stamp strong,
:root[data-theme="light"] .tier-row[data-tier="T1"] .comp-trait{
  color:#3d6cb5 !important;
}
:root[data-theme="light"] .tier-row[data-tier="T2"] .tier-stamp strong,
:root[data-theme="light"] .tier-row[data-tier="T2"] .comp-trait{
  color:#247148 !important;
}

@media (max-width:560px){
  nav.top-tabs{
    gap:2px;
    padding:4px 2px;
  }
  nav.top-tabs .nav{
    padding-inline:6px;
    font-size:13px;
  }
  nav.top-tabs .nav .nav-label,
  body:not([data-page="home"]) nav.top-tabs .nav .nav-label{
    margin-left:5px;
  }
  body:not([data-page="home"]) nav.top-tabs .nav:not(.active) .nav-label{
    max-width:0;
    margin-left:0;
    opacity:0;
  }
}
:root[data-theme="light"] .tier-row[data-tier="Trap"] .tier-stamp strong,
:root[data-theme="light"] .tier-row[data-tier="Trap"] .comp-trait{
  color:#a04a44 !important;
}

/* --- explorer（redesign 块写死了暗主题色，逐条压回） --- */
:root[data-theme="light"] .explorer-note,
:root[data-theme="light"] .explorer-filter-subtitle,
:root[data-theme="light"] .explorer-filter-hint,
:root[data-theme="light"] .explorer-input-hint,
:root[data-theme="light"] .explorer-summary-sub,
:root[data-theme="light"] .explorer-card-subtitle,
:root[data-theme="light"] .explorer-card-meta-line,
:root[data-theme="light"] .explorer-build-score,
:root[data-theme="light"] .explorer-snapshot-copy,
:root[data-theme="light"] .explorer-metric-label,
:root[data-theme="light"] .explorer-more-results-title,
:root[data-theme="light"] .explorer-best-variant-kicker,
:root[data-theme="light"] .explorer-clear-btn,
:root[data-theme="light"] .explorer-stat-label{
  color:rgba(42,41,37,.62);
}
:root[data-theme="light"] .explorer-chip-empty{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] .explorer-filter-controls select,
:root[data-theme="light"] .explorer-filter-controls input,
:root[data-theme="light"] .explorer-sort-select,
:root[data-theme="light"] .explorer-search-box input,
:root[data-theme="light"] .explorer-field select{
  color:rgba(42,41,37,.9);
  border-bottom-color:rgba(60,50,20,.22);
}
:root[data-theme="light"] .explorer-filter-controls select:focus,
:root[data-theme="light"] .explorer-filter-controls input:focus,
:root[data-theme="light"] .explorer-sort-select:focus,
:root[data-theme="light"] .explorer-search-box input:focus,
:root[data-theme="light"] .explorer-field select:focus{
  border-bottom-color:rgba(60,50,20,.45);
}
:root[data-theme="light"] .explorer-filter-controls input::placeholder,
:root[data-theme="light"] .explorer-search-box input::placeholder{
  color:rgba(42,41,37,.4);
}
:root[data-theme="light"] .explorer-add-btn,
:root[data-theme="light"] .explorer-open-detail{
  color:rgba(42,41,37,.68);
}
:root[data-theme="light"] .explorer-add-btn:hover,
:root[data-theme="light"] .explorer-open-detail:hover{
  color:#8a6d2f;
  border-color:rgba(138,109,47,.3);
}
:root[data-theme="light"] .explorer-toggle-pill{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] .explorer-toggle-pill.active{
  color:#8a6d2f;
}
:root[data-theme="light"] .explorer-toggle-pill.active::after{
  background:rgba(138,109,47,.9);
  box-shadow:none;
}
:root[data-theme="light"] .explorer-toggle-pill.disabled{
  color:rgba(42,41,37,.4);
  opacity:1;
}
:root[data-theme="light"] .explorer-toggle-pill:hover:not(.active){
  color:rgba(42,41,37,.8);
}
:root[data-theme="light"] .explorer-tab-row,
:root[data-theme="light"] .explorer-card,
:root[data-theme="light"] .explorer-best-variant,
:root[data-theme="light"] .explorer-build-card,
:root[data-theme="light"] .explorer-snapshot-card{
  border-top-color:rgba(60,50,20,.14);
}
:root[data-theme="light"] .explorer-sidebar{
  border-right-color:rgba(60,50,20,.12);
}
:root[data-theme="light"] .explorer-chip,
:root[data-theme="light"] .explorer-suggestion{
  color:rgba(42,41,37,.68);
}
:root[data-theme="light"] .explorer-suggestion-name{
  color:rgba(42,41,37,.9);
}
:root[data-theme="light"] .explorer-chip button{
  color:rgba(42,41,37,.5);
}
:root[data-theme="light"] .explorer-chip button:hover{
  color:#8a6d2f;
}
:root[data-theme="light"] .explorer-suggestion-strip{
  background:rgba(255,253,246,.92);
  border:1px solid rgba(60,50,20,.12);
}
:root[data-theme="light"] .explorer-suggestion:hover,
:root[data-theme="light"] .explorer-suggestion-rich:hover{
  background:rgba(60,50,20,.07);
}
:root[data-theme="light"] .explorer-inline-build-name{
  color:rgba(42,41,37,.78);
}
:root[data-theme="light"] .explorer-build-toggle{
  color:rgba(42,41,37,.5);
}
:root[data-theme="light"] .explorer-metric-value{
  color:rgba(42,41,37,.68);
}
:root[data-theme="light"] .explorer-trait-row .comp-trait{
  color:rgba(42,41,37,.72);
}
:root[data-theme="light"] .explorer-snapshot-rank{
  color:rgba(42,41,37,.5);
}
:root[data-theme="light"] .explorer-build-row{
  border-bottom-color:rgba(60,50,20,.1);
}
:root[data-theme="light"] .explorer-best-variant-divider{
  background:rgba(60,50,20,.12);
}
:root[data-theme="light"] .explorer-metric + .explorer-metric::before,
:root[data-theme="light"] .explorer-stat + .explorer-stat::before{
  color:rgba(42,41,37,.3);
}
:root[data-theme="light"] .explorer-stat[data-tone="primary"] .explorer-stat-label{
  color:rgba(42,41,37,.68);
}
:root[data-theme="light"] .explorer-stat[data-tone="primary"] .explorer-stat-value{
  color:rgba(42,41,37,.92);
}
:root[data-theme="light"] .explorer-stat[data-tone="muted"] .explorer-stat-label,
:root[data-theme="light"] .explorer-stat[data-tone="muted"] .explorer-stat-value{
  color:rgba(42,41,37,.4);
}
:root[data-theme="light"] .explorer-stat:not([data-tone]),
:root[data-theme="light"] .explorer-stat[data-tone="default"]{
  color:rgba(42,41,37,.58);
}
:root[data-theme="light"] .explorer-more-results-title{
  color:rgba(138,109,47,.9);
  text-decoration-color:rgba(138,109,47,.42);
}
:root[data-theme="light"] #page-explorer .explorer-card-hit{
  color:rgba(42,41,37,.62);
}
:root[data-theme="light"] #page-explorer .explorer-recommended-tag{
  color:rgba(42,41,37,.55);
}

/* --- detail（oneshot 注入样式写死亮色文字） --- */
:root[data-theme="light"] body[data-page="detail"] .oneshot-header .hero-title h2{
  color:#2a2925 !important;
}
:root[data-theme="light"] body[data-page="detail"] .oneshot-tier-chip-T0{ color:#8a6d2f !important; }
:root[data-theme="light"] body[data-page="detail"] .oneshot-tier-chip-T1{ color:#3d6cb5 !important; }
:root[data-theme="light"] body[data-page="detail"] .oneshot-tier-chip-T2{ color:#2e8b57 !important; }
:root[data-theme="light"] body[data-page="detail"] .oneshot-tier-chip-Trap{ color:#a04a44 !important; }
:root[data-theme="light"] body[data-page="detail"] .risk-swatch strong{
  color:#3a382f !important;
}
:root[data-theme="light"] body[data-page="detail"] .oneshot-header .hero-difficulty-row .difficulty-label{
  color:rgba(42,41,37,.62);
}
:root[data-theme="light"] body[data-page="detail"] .hero-stats-row .label{
  color:rgba(42,41,37,.6);
}
:root[data-theme="light"] body[data-page="detail"] .hero-stats-row .value{
  color:#2a2925;
}
:root[data-theme="light"] body[data-page="detail"] .hero-stat-dot{
  color:rgba(42,41,37,.35);
}
:root[data-theme="light"] body[data-page="detail"] .oneshot-block-label{
  color:rgba(42,41,37,.62);
}
:root[data-theme="light"] body[data-page="detail"] .oneshot-board-stage-head{
  color:rgba(42,41,37,.72);
}
:root[data-theme="light"] body[data-page="detail"] .oneshot-early-pop{
  color:rgba(42,41,37,.85);
}
:root[data-theme="light"] body[data-page="detail"] .oneshot-early-traits{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] body[data-page="detail"] .oneshot-early-name{
  color:rgba(42,41,37,.72);
}
:root[data-theme="light"] body[data-page="detail"] .priority-arrow{
  color:rgba(42,41,37,.62) !important;
}
:root[data-theme="light"] body[data-page="detail"] .arrow{
  color:rgba(42,41,37,.55) !important;
}
:root[data-theme="light"] body[data-page="detail"] .oneshot-right .equip-cell,
:root[data-theme="light"] body[data-page="detail"] .oneshot-right .priority-item,
:root[data-theme="light"] body[data-page="detail"] .oneshot-right .step-name{
  color:rgba(42,41,37,.78);
}
:root[data-theme="light"] body[data-page="detail"] .oneshot-sim-link{
  background:rgba(138,109,47,.12) !important;
  border-color:rgba(138,109,47,.32) !important;
  color:#6b5316 !important;
}

/* --- s17 赛季页 --- */
:root[data-theme="light"] .s17-tab.active{
  color:#8a6d2f;
}
:root[data-theme="light"] .s17-tab.active::after{
  background:rgba(138,109,47,.9);
  box-shadow:none;
}
:root[data-theme="light"] .s17-tab:hover:not(.active){
  color:rgba(42,41,37,.8);
}
/* 概率/强化/基础资料二级 tab 条：源规则带 !important，需同级+!important 压回 */
:root[data-theme="light"] body[data-page="s17"] .s17-prob-augmentbar .s17-tab.active,
:root[data-theme="light"] body[data-page="s17"] .s17-anima-tier-bar .s17-tab.active,
:root[data-theme="light"] body[data-page="basics"] .s17-prob-basebar .s17-tab.active,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-basebar .s17-tab.active{
  color:#8a6d2f !important;
  border-bottom-color:rgba(138,109,47,.6) !important;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-augmentbar .s17-tab:hover,
:root[data-theme="light"] body[data-page="s17"] .s17-anima-tier-bar .s17-tab:hover,
:root[data-theme="light"] body[data-page="basics"] .s17-prob-basebar .s17-tab:hover,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-basebar .s17-tab:hover{
  color:rgba(42,41,37,.78) !important;
}
:root[data-theme="light"] .s17-unit-skill-name{
  color:#2a2925;
}
:root[data-theme="light"] body[data-page="s17"] .s17-trait-title img.s17-trait-icon-white,
:root[data-theme="light"] body[data-page="s17"] .s17-trait-title img.s17-trait-icon-white.trait-level-2,
:root[data-theme="light"] body[data-page="s17"] .s17-trait-title img.s17-trait-icon-white.trait-level-3,
:root[data-theme="light"] body[data-page="s17"] .s17-trait-title img.s17-trait-icon-white.trait-level-4{
  filter:var(--trait-silver-filter);
  opacity:1;
}
:root[data-theme="light"] .s17-subsection-title,
:root[data-theme="light"] .s17-gap-title{
  color:#6b5316;
}
/* 语义高亮 chips：行内 style 写死了暗主题色，逐类压深（!important） */
:root[data-theme="light"] .s17-sem-stat-ad{ color:#b43a3a !important; }
:root[data-theme="light"] .s17-sem-stat-ap,
:root[data-theme="light"] .s17-sem-stat-magic-damage{ color:#5a4fcf !important; }
:root[data-theme="light"] .s17-sem-stat-health{ color:var(--semantic-health) !important; }
:root[data-theme="light"] .s17-sem-stat-armor{ color:#8a6d1e !important; }
:root[data-theme="light"] .s17-sem-stat-mr{ color:#7a3fd0 !important; }
:root[data-theme="light"] .s17-sem-stat-as{ color:#5f7a1e !important; }
:root[data-theme="light"] .s17-sem-stat-physical-damage{ color:#b3541e !important; }
:root[data-theme="light"] .s17-sem-stat-true-damage{ color:#7a6210 !important; }
:root[data-theme="light"] .s17-sem-buff{ color:var(--semantic-buff) !important; }
/* 语义色保留在底衬，亮色正文统一使用可审计的深色 token。 */
:root[data-theme="light"] .s17-sem-trait,
:root[data-theme="light"] .s17-sem-unit,
:root[data-theme="light"] .s17-sem-item{
  color:var(--text) !important;
  filter:none !important;
}
:root[data-theme="light"] .s17-prob-partner-note,
:root[data-theme="light"] .s17-prob-partner-note span{
  color:rgba(42,41,37,.6);
}
:root[data-theme="light"] .s17-prob-partner-note-brand{
  color:#8a6d2f;
}
:root[data-theme="light"] .s17-prob-missed-unit-label{
  color:#2a2925;
}

/* --- daily / 版本动态（JS 注入样式写死 #1a1a1a 面板与亮色文字） --- */
:root[data-theme="light"] .daily-patch-category-btn{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] .daily-patch-category-btn.active{
  color:#2a2925;
  background:rgba(60,50,20,.08);
}
:root[data-theme="light"] .daily-patch-category-btn.active::before{
  background:#7a9a2e;
}
:root[data-theme="light"] .daily-patch-version-btn.active{
  background:rgba(60,50,20,.08);
  border-color:rgba(60,50,20,.16);
}
:root[data-theme="light"] .daily-patch-version-code{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] .daily-patch-version-btn.active .daily-patch-version-code{
  color:#2a2925;
}
:root[data-theme="light"] .daily-patch-version-date{
  color:rgba(42,41,37,.5);
}
:root[data-theme="light"] .daily-patch-version-btn.active .daily-patch-version-date{
  color:rgba(42,41,37,.6);
}
:root[data-theme="light"] .daily-patch-hero{
  border-bottom-color:rgba(60,50,20,.14);
}
:root[data-theme="light"] .daily-patch-meta-badge{
  background:rgba(90,122,30,.12);
  color:#5a7a1e;
}
:root[data-theme="light"] .daily-patch-meta-sep,
:root[data-theme="light"] .daily-patch-meta-text,
:root[data-theme="light"] .daily-patch-source-link.inline{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] .daily-patch-source-link.inline:hover{
  color:#2a2925;
}
:root[data-theme="light"] .daily-patch-title{
  color:#2a2925;
}
:root[data-theme="light"] .daily-patch-version-inline{
  background:rgba(90,122,30,.12);
  color:#5a7a1e;
}
:root[data-theme="light"] .daily-patch-title-date{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] .daily-patch-draft-badge{
  color:#8a6d2f;
}
:root[data-theme="light"] .daily-patch-version-label{
  color:rgba(42,41,37,.6);
}
:root[data-theme="light"] .daily-patch-version-tile strong{
  color:#2a2925;
}
:root[data-theme="light"] .daily-patch-version-source{
  color:rgba(122,100,32,.85);
}
:root[data-theme="light"] .daily-patch-version-source:hover{
  color:#6b5316;
}
:root[data-theme="light"] .daily-patch-summary{
  color:rgba(42,41,37,.72);
}
:root[data-theme="light"] .daily-patch-summary strong{
  color:#2a2925;
}
:root[data-theme="light"] .daily-patch-section-head h2{
  color:#2a2925;
}
:root[data-theme="light"] .daily-patch-section-count{
  color:rgba(42,41,37,.5);
}
:root[data-theme="light"] .daily-patch-note-intro{
  color:rgba(42,41,37,.72);
}
:root[data-theme="light"] .daily-patch-anchor{
  background:rgba(255,253,246,.72);
  border-color:rgba(60,50,20,.12);
  color:rgba(42,41,37,.62);
}
:root[data-theme="light"] .daily-patch-anchor span{
  color:rgba(42,41,37,.45);
}
:root[data-theme="light"] .daily-patch-anchor:hover{
  color:#2a2925;
  background:rgba(60,50,20,.07);
  border-color:rgba(60,50,20,.18);
}
:root[data-theme="light"] .daily-patch-anchor.active{
  color:#2a2925;
  background:rgba(138,109,47,.1);
  border-color:rgba(138,109,47,.24);
}
:root[data-theme="light"] .daily-patch-anchor.active span{
  color:rgba(42,41,37,.6);
}
:root[data-theme="light"] .daily-patch-item{
  background:#fffdf6;
  border-color:rgba(60,50,20,.12);
}
:root[data-theme="light"] .daily-patch-item{
  --daily-patch-tone:rgba(42,41,37,.78) !important;
}
:root[data-theme="light"] .daily-patch-item-name{
  color:#2a2925;
}
:root[data-theme="light"] .daily-patch-item-description{
  color:rgba(42,41,37,.6);
}
:root[data-theme="light"] .daily-term-hover.term-item-patch .daily-term-text.item,
:root[data-theme="light"] .daily-patch-item-name .daily-term-hover.term-trait .s17-sem-trait{
  color:#2a2925;
}
:root[data-theme="light"] .daily-patch-change-chip{
  background:#faf6ec;
  border-color:rgba(60,50,20,.14);
}
:root[data-theme="light"] .daily-patch-change-chip .before{
  color:rgba(42,41,37,.5);
}
:root[data-theme="light"] .daily-patch-change-chip .after{
  color:#2a2925;
}
:root[data-theme="light"] .daily-patch-change-chip .label{
  color:rgba(42,41,37,.45);
}
:root[data-theme="light"] .daily-patch-change-chip[data-direction="up"] .arrow{
  color:#247148 !important;
}
:root[data-theme="light"] .daily-patch-change-chip[data-direction="down"] .arrow{
  color:#963f3a !important;
}
:root[data-theme="light"] .daily-patch-change-chip[data-direction="neutral"] .arrow,
:root[data-theme="light"] .daily-patch-change-chip:not([data-direction]) .arrow{
  color:#3a382f !important;
}
:root[data-theme="light"] .daily-insight-note-chip{
  background:rgba(255,253,246,.8);
  border-color:rgba(90,122,30,.18);
  color:rgba(42,41,37,.62);
}
:root[data-theme="light"] .daily-insight-note-icon{
  border-color:rgba(90,122,30,.24);
  color:#5a7a1e;
  background:rgba(90,122,30,.07);
}
:root[data-theme="light"] .daily-insight-footer{
  border-top-color:rgba(60,50,20,.14);
}
:root[data-theme="light"] .daily-insight-item-date{
  color:rgba(42,41,37,.5);
}
:root[data-theme="light"] .daily-insight-author,
:root[data-theme="light"] .daily-insight-author.no-link{
  color:rgba(42,41,37,.62);
}
:root[data-theme="light"] .daily-insight-author:hover{
  color:#2a2925;
}

/* --- tier-maker（左列行 + 右侧素材面板写死深色） --- */
:root[data-theme="light"] .tier-maker-page{
  color:#2a2925;
}
:root[data-theme="light"] .tier-maker-row{
  background:rgba(60,50,20,.045);
}
:root[data-theme="light"] .tier-maker-row-label{
  color:rgba(42,41,37,.88);
}
:root[data-theme="light"] .tier-maker-dropzone{
  background:
    linear-gradient(90deg, var(--row-tail, rgba(138,109,47,.08)), transparent 40%),
    rgba(255,253,246,.78);
  border-color:var(--row-border-soft, rgba(138,109,47,.22));
}
:root[data-theme="light"] .tier-maker-dropzone.is-target{
  background:
    linear-gradient(90deg, var(--row-tail-active, rgba(138,109,47,.12)), transparent 45%),
    rgba(255,253,246,.9);
  border-color:var(--row-target-border, rgba(138,109,47,.4));
}
:root[data-theme="light"] .tier-maker-empty{
  color:rgba(42,41,37,.42);
}
:root[data-theme="light"] .tier-maker-toolbox{
  background:var(--panel);
  border-color:rgba(60,50,20,.16);
  box-shadow:0 12px 32px rgba(60,50,20,.12);
}
:root[data-theme="light"] .tier-maker-toolbox-head{
  background:rgba(138,109,47,.1);
  border-bottom-color:rgba(138,109,47,.16);
  color:#2a2925;
}
:root[data-theme="light"] .tier-maker-toolbox-head .tier-maker-action{
  background:rgba(255,253,246,.7);
  border-color:rgba(138,109,47,.22);
  color:#8a6d2f;
}
:root[data-theme="light"] .tier-maker-toolbox-head .tier-maker-action.subtle{
  background:rgba(255,253,246,.55);
  color:#6b5316;
}
:root[data-theme="light"] .tier-maker-toolbox-head .tier-maker-action.primary{
  background:rgba(138,109,47,.16);
  border-color:rgba(138,109,47,.34);
  color:#5a4512;
}
:root[data-theme="light"] .tier-maker-action{
  border-color:rgba(138,109,47,.38);
  background:rgba(138,109,47,.12);
  color:#6b5316;
}
:root[data-theme="light"] .tier-maker-action.subtle{
  border-color:rgba(60,50,20,.18);
  background:rgba(60,50,20,.06);
  color:#2a2925;
}
:root[data-theme="light"] .tier-maker-action.ghost{
  color:rgba(42,41,37,.62);
}
:root[data-theme="light"] .tier-maker-action.ghost:hover{
  background:rgba(138,109,47,.1);
  color:#6b5316;
}
:root[data-theme="light"] .tier-maker-action.ghost.active{
  color:#8a6d2f;
  background:rgba(138,109,47,.12);
}
:root[data-theme="light"] .tier-maker-action.primary{
  border-color:rgba(138,109,47,.5);
  background:rgba(138,109,47,.16);
  color:#5a4512;
}
:root[data-theme="light"] .tier-maker-tab,
:root[data-theme="light"] .tier-maker-filter{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] .tier-maker-tab:hover,
:root[data-theme="light"] .tier-maker-filter:hover{
  color:rgba(42,41,37,.78);
  border-color:rgba(138,109,47,.2);
}
:root[data-theme="light"] .tier-maker-tab.active,
:root[data-theme="light"] .tier-maker-filter.active{
  color:#8a6d2f;
  background:rgba(138,109,47,.1);
  border-color:rgba(138,109,47,.2);
}
:root[data-theme="light"] .tier-maker-search-scope{
  color:rgba(42,41,37,.6);
}
:root[data-theme="light"] .tier-maker-search{
  background:rgba(255,253,246,.8);
  border-color:rgba(60,50,20,.18);
}
:root[data-theme="light"] .tier-maker-search:focus-within{
  border-color:#8a6d2f;
  box-shadow:0 0 0 1px rgba(138,109,47,.18);
}
:root[data-theme="light"] .tier-maker-search input{
  color:#2a2925;
}
:root[data-theme="light"] .tier-maker-search input::placeholder{
  color:rgba(42,41,37,.4);
}
:root[data-theme="light"] .tier-maker-search kbd{
  color:rgba(42,41,37,.5);
  border-color:rgba(60,50,20,.16);
  background:rgba(60,50,20,.05);
}
:root[data-theme="light"] .tier-maker-asset-name{
  color:rgba(42,41,37,.85);
}

/* --- attribute compare（A/B/VS 卡片写死深色渐变） --- */
:root[data-theme="light"] .attribute-drop-card,
:root[data-theme="light"] .attribute-vs-panel{
  border-color:rgba(60,50,20,.14);
  background:var(--panel);
  box-shadow:0 12px 28px rgba(60,50,20,.1);
}
:root[data-theme="light"] .attribute-vs-panel{
  border-color:rgba(46,139,87,.24);
  background:radial-gradient(circle at 50% 0, rgba(46,139,87,.08), transparent 40%), var(--panel);
}
:root[data-theme="light"] .attribute-slot-title h3,
:root[data-theme="light"] .attribute-slot-title strong{
  color:#2a2925;
}
:root[data-theme="light"] .attribute-empty{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] .attribute-slot-title span{
  color:#2e8b57;
}
:root[data-theme="light"] .attribute-drop-card[data-attribute-slot="B"] .attribute-slot-title span{
  color:#a04a44;
}
:root[data-theme="light"] .attribute-vs-mark{
  color:#2e8b57;
  text-shadow:none;
}
:root[data-theme="light"] .attribute-vs-copy strong{
  color:#8a6d2f;
}
:root[data-theme="light"] .attribute-vs-copy b{
  color:#2a2925;
}
:root[data-theme="light"] .attribute-total span,
:root[data-theme="light"] .attribute-subtotal span,
:root[data-theme="light"] .attribute-vs-copy span{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] .attribute-formula-link{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] .tier-maker-filter.attribute-filter.is-disabled{
  color:rgba(42,41,37,.4);
}
:root[data-theme="light"] .attribute-picker .tier-maker-asset-name{
  color:rgba(42,41,37,.85);
}
:root[data-theme="light"] .attribute-picker .tier-maker-asset,
:root[data-theme="light"] .attribute-picker .tier-maker-asset .tier-maker-asset-img,
:root[data-theme="light"] .attribute-picker .tier-maker-asset .tier-maker-asset-fallback{
  border-color:rgba(60,50,20,.18);
  background:rgba(60,50,20,.05);
}

/* --- graves 武器库（graves_weapon_selector.js 注入样式不可改，全部覆盖） --- */
:root[data-theme="light"] .gw-hero{
  border-color:rgba(60,50,20,.14);
  background:var(--panel);
  box-shadow:0 12px 32px rgba(60,50,20,.1);
}
:root[data-theme="light"] .gw-eyebrow,
:root[data-theme="light"] .gw-detail-kicker{
  color:#8a6d2f;
}
:root[data-theme="light"] .gw-hero h1,
:root[data-theme="light"] .gw-detail h3{
  color:#2a2925;
}
:root[data-theme="light"] .gw-hero p,
:root[data-theme="light"] .gw-detail p{
  color:rgba(42,41,37,.72);
}
:root[data-theme="light"] .gw-reset{
  border-color:rgba(138,109,47,.3);
  background:rgba(138,109,47,.08);
  color:#6b5316;
}
:root[data-theme="light"] .gw-reset:hover{
  border-color:rgba(138,109,47,.5);
  background:rgba(138,109,47,.14);
}
:root[data-theme="light"] .gw-metrics > div,
:root[data-theme="light"] .gw-strip,
:root[data-theme="light"] .gw-tree,
:root[data-theme="light"] .gw-detail{
  border-color:rgba(60,50,20,.14);
  background:var(--panel);
}
:root[data-theme="light"] .gw-metrics span{
  color:rgba(42,41,37,.6);
}
:root[data-theme="light"] .gw-metrics strong{
  color:#2a2925;
}
:root[data-theme="light"] .gw-strip-label{
  color:#8a6d2f;
}
:root[data-theme="light"] .gw-chip{
  border-color:rgba(138,109,47,.4);
  background:rgba(138,109,47,.08);
  color:#2a2925;
}
:root[data-theme="light"] .gw-chip.is-selected{
  border-color:rgba(46,139,87,.5);
  background:rgba(46,139,87,.1);
}
:root[data-theme="light"] .gw-chip em{
  color:#8a6d2f;
}
:root[data-theme="light"] .gw-empty{
  color:rgba(42,41,37,.5);
}
:root[data-theme="light"] .gw-tree-head{
  border-bottom-color:rgba(60,50,20,.12);
}
:root[data-theme="light"] .gw-tree-title{
  color:#2a2925;
}
:root[data-theme="light"] .gw-node{
  border-color:rgba(60,50,20,.12);
  background:rgba(60,50,20,.04);
}
:root[data-theme="light"] .gw-node.is-available{
  border-color:rgba(138,109,47,.36);
  background:rgba(138,109,47,.07);
}
:root[data-theme="light"] .gw-node-name{
  color:#2a2925;
}
:root[data-theme="light"] .gw-node-cost{
  color:#8a6d2f;
}
:root[data-theme="light"] .gw-node[data-tooltip]::after{
  border-color:rgba(138,109,47,.3);
  background:rgba(255,253,246,.97);
  color:rgba(42,41,37,.85);
}
:root[data-theme="light"] .gw-icon{
  border-color:rgba(60,50,20,.16);
  background:rgba(60,50,20,.05);
}
:root[data-theme="light"] .gw-detail-tags span{
  background:rgba(46,139,87,.1);
  border-color:rgba(46,139,87,.24);
  color:#2e8b57;
}
:root[data-theme="light"] .gw-logic{
  border-top-color:rgba(60,50,20,.12);
}
:root[data-theme="light"] .gw-logic strong{
  color:#8a6d2f;
}
:root[data-theme="light"] .gw-logic span{
  color:rgba(42,41,37,.68);
}
:root[data-theme="light"] .gw-source{
  border-top-color:rgba(60,50,20,.12);
  color:rgba(42,41,37,.5);
}

/* Explorer entities expose rich hover cards without the browser's question cursor. */
#page-explorer [data-exa-entity-type],
#page-explorer .exa-tip-host {
  cursor:pointer !important;
}


/* ===== 日间覆盖第二批（探针迭代后补漏） ===== */

/* detail：出装顺序步骤的文字（"装备 xx" holder 行） */
:root[data-theme="light"] body[data-page="detail"] .flow .step span{
  color:rgba(42,41,37,.72);
}
/* detail：海克斯优先级 pill（战力/装备/经济） */
:root[data-theme="light"] body[data-page="detail"] .priority-pill span{
  color:rgba(42,41,37,.78);
}

/* s17 单位卡：蓝量/射程数值在卡片浅色下半身 */
:root[data-theme="light"] .s17-unit-card-mana{
  color:#2f5d9a;
  text-shadow:none;
}
:root[data-theme="light"] .s17-unit-card-range{
  color:rgba(42,41,37,.68);
  text-shadow:none;
}
:root[data-theme="light"] .s17-unit-card-range-icon{
  opacity:.75;
}

/* s18 单位卡：技能描述/技能名沿用 s17 类，浅色主题压回深色文本 */
/* R5：同规则扩到 s17 单位卡（#d9e0ef 浅紫在米白底上不可读） */
:root[data-theme="light"] .s17-unit-desc-copy,
:root[data-theme="light"] .s18-unit-card .s17-unit-desc-copy{
  color:rgba(42,41,37,.78);
}
:root[data-theme="light"] .s18-unit-card .s17-unit-skill-name{
  color:#2a2925;
  text-shadow:none;
}

/* daily 富文本术语：行内写死暗主题色（!important 压回） */
:root[data-theme="light"] .daily-term-hover.term-augment{
  color:#8a6d2f;
}
:root[data-theme="light"] .daily-term-text.trait{ color:#7a3fd0 !important; }
:root[data-theme="light"] .daily-term-text.item{ color:#9a6a10 !important; }
:root[data-theme="light"] .daily-term-text.augment{ color:#8a6d2f !important; }
:root[data-theme="light"] .daily-term-text.stat{ color:#5f7a1e !important; }
/* 弈子术语按费用着色、无法逐枚枚举：整体压暗保持费用色相 */
:root[data-theme="light"] .daily-term-text.unit{
  filter:brightness(.5) saturate(1.35) !important;
}

/* graves：三棵框架树的 accent 在行内 var 上，按 tone 类换成深色 */
:root[data-theme="light"] .gw-tree-assault,
:root[data-theme="light"] .gw-tree-assault .gw-node{ --gw-accent:#2e8b57 !important; }
:root[data-theme="light"] .gw-tree-power,
:root[data-theme="light"] .gw-tree-power .gw-node{ --gw-accent:#3d6cb5 !important; }
:root[data-theme="light"] .gw-tree-marksman,
:root[data-theme="light"] .gw-tree-marksman .gw-node{ --gw-accent:#8a6d2f !important; }

/* attribute compare 补漏：空态/数值行/差异行 */
:root[data-theme="light"] .attribute-slot-title span{
  background:rgba(46,139,87,.1);
}
:root[data-theme="light"] .attribute-drop-b .attribute-slot-title span{
  color:#a04a44;
  background:rgba(160,74,68,.1);
}
:root[data-theme="light"] .attribute-drop-empty{
  color:rgba(42,41,37,.55);
  border-color:rgba(60,50,20,.2);
  background:rgba(60,50,20,.02);
}
:root[data-theme="light"] .attribute-drop-empty strong{
  color:rgba(42,41,37,.85);
}
:root[data-theme="light"] .attribute-empty-line{
  color:rgba(42,41,37,.5);
}
:root[data-theme="light"] .attribute-value-meta b{
  color:rgba(42,41,37,.72);
}
:root[data-theme="light"] .attribute-value-meta span{
  color:rgba(42,41,37,.5);
}
:root[data-theme="light"] .attribute-value-track{
  background:rgba(60,50,20,.08);
  box-shadow:inset 0 0 0 1px rgba(60,50,20,.06);
}
:root[data-theme="light"] .attribute-value-row strong,
:root[data-theme="light"] .attribute-diff-row strong{
  color:#8a6d2f;
}
:root[data-theme="light"] .attribute-diff-row span{
  color:rgba(42,41,37,.62);
}
:root[data-theme="light"] .attribute-diff-row.muted{
  color:rgba(42,41,37,.45);
}
:root[data-theme="light"] .attribute-formula-section{
  color:rgba(42,41,37,.68);
}


/* ===== 日间覆盖第三批（accept 迭代） ===== */

/* 气泡图层级 tab / 图例（.all-btn.active 源规则带 !important） */
:root[data-theme="light"] .tier-btn.active,
:root[data-theme="light"] .all-btn.active{
  color:#8a6d2f !important;
}
:root[data-theme="light"] .tier-btn,
:root[data-theme="light"] .all-btn{
  color:rgba(42,41,37,.55);
}
:root[data-theme="light"] .tier-btn:hover:not(.active),
:root[data-theme="light"] .all-btn:hover:not(.active){
  color:rgba(42,41,37,.8);
}
:root[data-theme="light"] .size-legend{
  opacity:1;
}
:root[data-theme="light"] .sl-title{
  color:rgba(42,41,37,.62);
}

/* s18 筛选 tab（源规则写死金） */
:root[data-theme="light"] .s18-filter-btn.active{
  color:#8a6d2f;
  border-color:rgba(138,109,47,.5);
}
:root[data-theme="light"] .s18-filter-btn{
  color:rgba(42,41,37,.6);
}

/* daily 次要元信息（日期/计数）再压深一档过 3:1 */
:root[data-theme="light"] .daily-patch-version-date{
  color:rgba(42,41,37,.62);
}
:root[data-theme="light"] .daily-patch-version-btn.active .daily-patch-version-date{
  color:rgba(42,41,37,.68);
}
:root[data-theme="light"] .daily-patch-anchor span{
  color:rgba(42,41,37,.58);
}
:root[data-theme="light"] .daily-patch-section-count{
  color:rgba(42,41,37,.62);
}

/* tier-maker 搜索框快捷键徽章 */
:root[data-theme="light"] .tier-maker-search kbd{
  color:rgba(42,41,37,.62);
}

/* 模拟器工具栏撤销/重做/清空图标：team_builder.js 内联 stroke:currentColor!important +
   color:rgba(255,255,255,.5)!important，日间下纯白描边隐形。样式表 !important 直接作用于
   path（指定值）可压过 svg 上的内联继承值。 */
:root[data-theme="light"] body[data-page="simulator"] .tb-icon-btn svg path{
  stroke:rgba(42,41,37,.72) !important;
}
:root[data-theme="light"] body[data-page="simulator"] .tb-icon-btn-clear svg path{
  stroke:rgba(160,60,56,.78) !important;
}

/* ========== 阵容推荐页（route=detail，issue #1023 R3-E）：导览卡片墙 + 详情 + 密码门后台 ========== */

/* detail-root 旧的一图流网格布局退役，guide 页改为普通文档流 */
.detail-root.guide-mode{
  display:block;
  height:auto;
  min-height:0;
  overflow:visible;
  padding:8px 12px 40px;
  grid-template-columns:none;
  grid-template-rows:none;
  grid-template-areas:none;
}
.detail-root.guide-mode::before{display:none}

body[data-page="detail"]:has(#detail-root.guide-mode) .detail-dock-shell{
  display:none !important;
}

.guide-page{max-width:1240px;margin:0 auto}

@media (max-width:720px){
  body[data-page="detail"] .detail-panel{
    padding-left:var(--site-pad) !important;
    padding-right:var(--site-pad) !important;
    overflow-x:hidden !important;
  }
  body[data-page="detail"] .detail-root.guide-mode{
    width:100% !important;
    min-width:0 !important;
    padding-inline:0 !important;
  }
  body[data-page="detail"] .detail-root.guide-mode .guide-page{
    width:100%;
    max-width:100%;
    min-width:0;
  }
  body[data-page="detail"] .guide-detail-section-card{
    padding:14px 10px 12px;
  }
  body[data-page="detail"] .guide-board-wrap{
    display:block;
  }
  body[data-page="detail"] .guide-board-host,
  body[data-page="detail"] .guide-board{
    width:100%;
    max-width:100%;
    min-width:0;
  }
  body[data-page="detail"] .guide-board-side{
    width:100%;
    margin-top:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
  }
  body[data-page="detail"] .guide-role-row{
    gap:10px;
  }
}

.guide-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  margin:4px 2px 18px;
}
.guide-title{
  margin:0;
  font-size:calc(22px * var(--font-scale));font-weight:800;color:var(--text);letter-spacing:.03em;
}
.guide-sub{margin-top:4px;font-size:calc(10px * var(--font-scale));color:var(--muted);font-weight:400;letter-spacing:.02em}
.guide-draft-badge{
  display:inline-flex;align-items:center;
  margin-left:8px;padding:1px 8px;border-radius:999px;
  font-size:10px;font-weight:700;
  color:var(--gold);border:1px solid var(--gold);
}
.guide-builtin-badge{
  display:inline-flex;align-items:center;
  margin-left:8px;padding:1px 8px;border-radius:999px;
  font-size:10px;font-weight:700;
  color:var(--muted);border:1px solid var(--line);
}
.guide-admin-open{
  flex:0 0 auto;
  padding:7px 18px;border-radius:10px;
  border:1px solid var(--line);background:var(--panel);
  color:var(--text);font-size:calc(12px * var(--font-scale));font-weight:700;
  cursor:pointer;transition:border-color .15s ease,transform .15s ease;
}
.guide-admin-open:hover{border-color:var(--gold);transform:translateY(-1px)}

.guide-empty{
  padding:64px 24px;text-align:center;color:var(--muted);
  border:1px dashed var(--line);border-radius:8px;background:transparent;
}
.guide-empty-add{
  margin-top:14px;padding:8px 20px;border-radius:10px;
  border:1px solid var(--gold);background:transparent;color:var(--gold);
  font-weight:700;cursor:pointer;
}
.guide-empty-add:hover{background:rgba(199,164,99,.08)}

.guide-group{margin-bottom:22px}
/* round 13：评级色在组级传播，卡片标题/渐变继承各自梯级色（GUIDE_RATING_COLORS 一致），避免全部回退金色 */
.guide-group[data-rating="S"]{--guide-rating-color:#e6c25a}
.guide-group[data-rating="A"]{--guide-rating-color:#a06cd5}
.guide-group[data-rating="B"]{--guide-rating-color:#4f86c6}
.guide-group[data-rating="C"]{--guide-rating-color:#4caf7d}
.guide-group[data-rating="D"]{--guide-rating-color:#8a8f98}
.guide-group-title{
  display:flex;align-items:baseline;gap:10px;
  margin:0 2px 10px;padding-bottom:6px;
  border-bottom:1px solid var(--line);
}
.guide-group-title strong{
  font-size:calc(18px * var(--font-scale));font-weight:800;
  color:var(--guide-rating-color,#d7b260);
}
.guide-group-title span{font-size:11px;color:var(--muted)}

.guide-card-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:12px;
}
/* round 13（P261）：契约列数——≥1200px 3 列（1440 内容宽精确 3 列）、768-1199px 2 列、<768px 1 列（390 精确 1 列） */
@media (min-width: 768px){
  .guide-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width: 1200px){
  .guide-card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
.guide-card{
  position:relative;
  overflow:hidden;
  background:var(--panel);
  border-radius:8px;
  padding:0;
  cursor:pointer;
  transition:transform .18s ease,background .18s ease,box-shadow .18s ease;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
}
.guide-card-hero{
  position:relative;
  aspect-ratio:2 / 1;
  width:100%;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--guide-rating-color,#f7d57a) 26%, transparent 70%), rgba(255,255,255,.04));
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
}
.guide-card-hero.is-empty{
  background:repeating-linear-gradient(135deg, rgba(128,128,128,.08) 0 8px, transparent 8px 16px);
}
.guide-card-hero-img{
  position:absolute;inset:0;
  width:100%;height:100%;display:block;
  /* round 13（P261/P274）：2:1 宽幅素材用 cover + 保脸 object-position，禁止 contain 留边或放大低清头像 */
  object-fit:cover;object-position:center 25%;
}
.guide-card-hero-fallback{
  font-size:32px;font-weight:800;color:var(--muted);
}
.guide-card-hero-star{
  position:absolute;right:8px;top:8px;
  font-size:12px;color:#f7d57a;
  background:rgba(0,0,0,.45);
  border-radius:999px;
  padding:2px 8px;
  letter-spacing:1px;
}
.guide-card-cap{
  padding:10px 14px 12px;
}
.guide-card:hover,.guide-card:focus-visible{
  transform:translateY(-2px);
  background:color-mix(in srgb, var(--panel) 96%, var(--guide-rating-color,#fff) 4%);
  box-shadow:0 10px 26px rgba(0,0,0,.22);
  outline:none;
}
.guide-card-name{
  font-size:calc(15px * var(--font-scale));font-weight:800;color:var(--text);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.guide-badge{
  flex:0 0 auto;
  min-width:26px;height:26px;line-height:26px;text-align:center;
  padding:0 6px;border-radius:8px;
  font-size:13px;font-weight:800;
  color:var(--guide-rating-color,#8a8f98);
  border:1px solid var(--guide-rating-color,#8a8f98);
  background:color-mix(in srgb, var(--guide-rating-color,#8a8f98) 12%, transparent);
}
.guide-card-name{
  flex:1 1 auto;min-width:0;
  font-size:calc(14px * var(--font-scale));font-weight:700;
  /* round 13：阵容标题颜色与梯级（评级色）保持一致 */
  color:var(--guide-rating-color,#d7b260);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.guide-card-sub{display:flex;align-items:center;gap:8px;margin-top:5px;font-size:11px;color:var(--muted)}
.guide-diff{display:inline-flex;gap:3px}
.guide-diff i{
  width:7px;height:7px;border-radius:50%;
  background:var(--line);
}
.guide-diff i.on{background:var(--gold)}

.guide-lineup{margin-top:12px}
.guide-unit{overflow:visible}
.guide-unit-stars{
  position:absolute;left:-3px;top:-6px;z-index:2;
  font-size:9px;line-height:1;letter-spacing:-1px;
  color:var(--gold);
  text-shadow:0 1px 2px rgba(0,0,0,.85),0 0 3px rgba(0,0,0,.6);
  pointer-events:none;
}
.guide-unit-fallback{
  display:flex;align-items:center;justify-content:center;
  font-size:14px;font-weight:800;color:var(--muted);
  background:var(--line);
}
.guide-lineup-large{gap:10px}
.guide-lineup-large .rail-unit{width:56px;height:56px;flex-basis:56px}
.guide-lineup-large .rail-unit-avatar{width:56px;height:56px;border-radius:10px}
.guide-lineup-large .rail-item-icon{width:16px;height:16px}
.guide-lineup-large .guide-unit-stars{font-size:11px}

/* 详情视图 */
.guide-detail-top{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:2px 2px 14px;
}
/* 返回按钮轻量化（round 10 反馈5）：去边框底色，纯文字 + hover 高亮，不抢视觉 */
/* round 13：返回文字 ≤14px（原 calc(12px*1.42)=17px 过大太重），与全局小字体系一致 */
.guide-back{
  padding:4px 8px;border-radius:8px;
  border:none;background:transparent;
  color:var(--muted);font-size:13px;font-weight:500;
  cursor:pointer;transition:color .15s ease,background .15s ease;
}
.guide-back:hover{color:var(--gold);background:color-mix(in srgb, var(--gold) 10%, transparent)}
.guide-detail-updated,.guide-detail-version{font-size:11px;color:var(--muted);font-weight:500}
.guide-detail-hero{
  background:var(--panel);border:1px solid var(--line);border-radius:8px;
  padding:16px 18px;margin-bottom:14px;
}
.guide-detail-name{
  flex:1 1 auto;min-width:0;margin:0;
  font-size:calc(20px * var(--font-scale));font-weight:800;color:var(--text);
}
.guide-detail > .guide-lineup{margin:0 2px 14px}
.guide-traits{margin:0 2px 14px}
/* round 13：羁绊无框无底色（去重盒子），只保留图标 + 数量角标 */
.guide-trait-badge{
  display:inline-flex;align-items:center;gap:8px;
  font-size:11px;padding:0;border-radius:0;
  background:transparent;
}
.guide-trait-badge .sim-trait-icon{width:16px;height:16px}
.guide-section{margin:0 2px 14px}
.guide-section-label{
  font-size:calc(12px * var(--font-scale));font-weight:700;color:var(--muted);
  margin-bottom:8px;
}
.guide-hexes{display:flex;flex-wrap:wrap;gap:10px}
/* round 13：强化符文去框去底色（去重盒子），图标 ≥32px */
.guide-hex{
  display:inline-flex;align-items:center;gap:8px;
  padding:0;border-radius:0;
  background:transparent;border:none;
}
.guide-hex-icon{position:relative;width:36px;height:36px;flex:0 0 36px}
.guide-hex-icon img{width:36px;height:36px;border-radius:7px;object-fit:cover;border:1px solid var(--line);display:block}
.guide-hex-name{font-size:calc(12px * var(--font-scale));color:var(--text)}
.guide-items{display:flex;flex-direction:column;gap:8px}
.guide-item-row{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:8px 12px;border-radius:8px;
  background:var(--panel);border:1px solid var(--line);
}
.guide-item-unit-avatar{width:28px;height:28px;border-radius:6px;object-fit:cover;border:1px solid var(--line)}
.guide-item-unit{font-size:calc(12px * var(--font-scale));font-weight:700;color:var(--text)}
.guide-item-chip{
  display:inline-flex;align-items:center;gap:6px;
  font-size:11px;color:var(--muted);
}
.guide-item-chip img{width:20px;height:20px;border-radius:5px;object-fit:cover;border:1px solid var(--line)}
.guide-early{
  margin:0 2px 14px;
  background:var(--panel);border:1px solid var(--line);border-radius:8px;
  padding:10px 14px;
}
.guide-early summary{
  cursor:pointer;user-select:none;
  font-size:calc(12px * var(--font-scale));font-weight:700;color:var(--text);
}
.guide-early p{margin:8px 0 2px;font-size:calc(12px * var(--font-scale));color:var(--muted);line-height:1.7}
.guide-notes{margin:0;font-size:calc(12px * var(--font-scale));color:var(--text);line-height:1.75;white-space:pre-wrap}

/* 登录弹窗 */
#guide-login-modal{
  position:fixed;inset:0;z-index:9000;
  display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.5);
}
.guide-login-card{
  width:min(360px,92vw);
  background:var(--panel);border:1px solid var(--line);border-radius:8px;
  padding:22px 24px;
  box-shadow:0 18px 48px rgba(0,0,0,.45);
}
.guide-login-title{font-size:calc(16px * var(--font-scale));font-weight:800;color:var(--text);margin-bottom:14px}
.guide-login-field{display:block;font-size:12px;color:var(--muted);margin-bottom:10px}
.guide-login-field input{
  display:block;width:100%;margin-top:4px;box-sizing:border-box;
  padding:8px 10px;border-radius:8px;
  border:1px solid var(--line);background:transparent;color:var(--text);
  font-size:13px;
}
.guide-login-field input:focus{outline:none;border-color:var(--gold)}
.guide-login-error{min-height:16px;font-size:11px;color:#e06c60;margin:2px 0 6px}
.guide-login-actions{display:flex;gap:10px;justify-content:flex-end}
.guide-login-actions button{
  padding:7px 18px;border-radius:9px;cursor:pointer;font-weight:700;font-size:12px;
  border:1px solid var(--line);background:transparent;color:var(--text);
}
.guide-login-actions #guide-login-submit{border-color:var(--gold);color:var(--gold)}
.guide-login-actions #guide-login-submit:hover{background:rgba(199,164,99,.08)}

/* 编辑后台 */
#guide-admin .guide-admin-overlay{
  position:fixed;inset:0;z-index:8900;
  display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.55);
  padding:24px;
  box-sizing:border-box;
}
.guide-admin-panel{
  width:min(1080px,96vw);max-height:92vh;
  display:flex;flex-direction:column;
  background:var(--panel);border:1px solid var(--line);border-radius:8px;
  box-shadow:0 18px 48px rgba(0,0,0,.45);
  overflow:hidden;
}
.guide-admin-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;
  padding:16px 20px;border-bottom:1px solid var(--line);
}
.guide-admin-title{font-size:calc(16px * var(--font-scale));font-weight:800;color:var(--text)}
.guide-admin-meta{margin-top:4px;font-size:11px;color:var(--muted)}
.guide-admin-actions{display:flex;gap:8px;flex-wrap:wrap}
.guide-admin-actions button{
  padding:6px 14px;border-radius:9px;cursor:pointer;font-weight:700;font-size:12px;
  border:1px solid var(--line);background:transparent;color:var(--text);
}
.guide-admin-actions button:hover{border-color:var(--gold)}
.guide-admin-actions #guide-admin-add{border-color:var(--gold);color:var(--gold)}
.guide-admin-actions #guide-admin-reset{border-color:#a5483f;color:#c56a60}
.guide-admin-body{
  display:grid;grid-template-columns:minmax(300px,.9fr) minmax(0,1.1fr);
  gap:0;min-height:0;overflow:hidden;
}
.guide-admin-list{
  padding:12px 14px;overflow-y:auto;border-right:1px solid var(--line);
}
.guide-admin-comp-row{
  display:flex;align-items:center;gap:8px;
  padding:8px 10px;border-radius:8px;margin-bottom:6px;
  border:1px solid var(--line);
}
.guide-admin-comp-name{
  flex:1 1 auto;min-width:0;
  font-size:12px;font-weight:700;color:var(--text);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.guide-admin-comp-row select,.guide-admin-comp-row button{
  flex:0 0 auto;font-size:11px;border-radius:7px;
  border:1px solid var(--line);background:transparent;color:var(--text);
  padding:3px 8px;cursor:pointer;
}
.guide-admin-comp-row .guide-admin-delete{color:#c56a60}
.guide-admin-form{padding:14px 18px;overflow-y:auto}
.guide-admin-hint{padding:36px 12px;text-align:center;color:var(--muted);font-size:12px}
.guide-form-title{font-size:calc(14px * var(--font-scale));font-weight:800;color:var(--text);margin-bottom:12px}
.guide-field{display:block;font-size:12px;color:var(--muted);margin-bottom:10px}
.guide-field-label{display:block;margin-bottom:4px}
.guide-field input,.guide-field select,.guide-field textarea{
  display:block;width:100%;margin-top:4px;box-sizing:border-box;
  padding:7px 10px;border-radius:8px;
  border:1px solid var(--line);background:transparent;color:var(--text);
  font-size:12px;font-family:inherit;
}
.guide-field input:focus,.guide-field select:focus,.guide-field textarea:focus{outline:none;border-color:var(--gold)}
.guide-field-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.guide-form-units{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.guide-unit-row{display:flex;gap:6px;align-items:center}
.guide-unit-row select{
  padding:5px 6px;border-radius:7px;font-size:11px;
  border:1px solid var(--line);background:var(--panel);color:var(--text);
  max-width:150px;
}
.guide-unit-picker{flex:1 1 auto;min-width:0}
.guide-unit-star{flex:0 0 62px}
.guide-unit-item{flex:0 0 110px}
.guide-unit-remove{
  flex:0 0 auto;width:24px;height:24px;border-radius:7px;
  border:1px solid var(--line);background:transparent;color:var(--muted);
  cursor:pointer;font-size:13px;line-height:1;
}
.guide-unit-remove:hover{color:#c56a60;border-color:#a5483f}
.guide-form-add-unit{
  margin-top:6px;padding:5px 12px;border-radius:8px;font-size:11px;
  border:1px dashed var(--line);background:transparent;color:var(--muted);cursor:pointer;
}
.guide-form-add-unit:hover{color:var(--text);border-color:var(--gold)}
.guide-form-error{min-height:16px;font-size:11px;color:#e06c60;margin:2px 0 6px}
.guide-form-actions{display:flex;justify-content:flex-end}
.guide-form-actions button{
  padding:8px 22px;border-radius:9px;cursor:pointer;font-weight:700;font-size:12px;
  border:1px solid var(--gold);background:transparent;color:var(--gold);
}
.guide-form-actions button:hover{background:rgba(199,164,99,.08)}
.guide-history{margin-top:14px;border-top:1px dashed var(--line);padding-top:10px}
.guide-history-row{
  display:flex;gap:10px;font-size:11px;color:var(--muted);
  padding:4px 0;border-bottom:1px dashed var(--line);
}
.guide-history-row:last-child{border-bottom:none}
.guide-history-at{flex:0 0 auto;font-variant-numeric:tabular-nums}
.guide-history-by{flex:0 0 auto;color:var(--gold)}
.guide-history-note{flex:1 1 auto;min-width:0}

/* ============================================================
   round 13：无详情阵容悬浮窗口（P262 no-detail modal）
   JS owner 渲染：#guide-no-detail-modal-host > .guide-modal-backdrop + .guide-no-detail-modal。
   面板内 .guide-modal-body 左侧棋盘（.guide-modal-board）+ 操作，右侧文字（.guide-modal-copy-text）。
   关闭：backdrop / ×(.guide-modal-close) / Escape。复用已加载资源，开窗到可见 < 1s。
   圆角 ≤8px（P262 卡片契约）；桌面 58/42 双栏，移动端单栏。
   ============================================================ */
#guide-no-detail-modal-host{
  position:fixed;inset:0;z-index:9000;
  display:flex;align-items:center;justify-content:center;
  padding:24px;box-sizing:border-box;
}
.guide-modal-backdrop{
  position:absolute;inset:0;
  background:rgba(0,0,0,.55);
}
.guide-no-detail-modal{
  position:relative;
  width:min(1080px,94vw);
  max-width:1080px;
  max-height:calc(100vh - 48px);
  display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);
  overflow:hidden;
  background:var(--panel);border:1px solid var(--line);border-radius:8px;
  box-shadow:0 18px 48px rgba(0,0,0,.45);
}
.guide-modal-body{display:contents}
.guide-modal-board{
  min-width:0;overflow-y:auto;padding:16px;
  border-right:1px solid var(--line);
}
.guide-modal-board .guide-board{margin:0 auto;max-width:420px}
.guide-modal-board .guide-traits{justify-content:center;margin:12px 0 0;gap:8px 10px}
.guide-modal-copy-text{
  display:flex;flex-direction:column;gap:12px;min-width:0;
  padding:18px 16px;overflow-y:auto;
}
.guide-modal-name{margin:0;font-size:18px;font-weight:800;color:var(--guide-rating-color,#d7b260);line-height:1.3}
.guide-modal-intro{margin:0;font-size:12.5px;color:var(--muted);line-height:1.75;white-space:pre-wrap}
.guide-modal-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto;padding-top:6px}
.guide-modal-open-sim{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:8px 16px;border-radius:8px;cursor:pointer;
  font-size:12px;font-weight:700;
  border:1px solid var(--gold);background:transparent;color:var(--gold);
  text-decoration:none;white-space:nowrap;
}
.guide-modal-open-sim:hover{background:rgba(199,164,99,.08)}
.guide-modal-close{
  position:absolute;top:10px;right:10px;z-index:3;
  width:36px;height:36px;border-radius:8px;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--line);background:var(--panel);color:var(--muted);
  font-size:16px;line-height:1;
}
.guide-modal-close:hover{color:var(--gold);border-color:var(--gold)}
@media (max-width: 720px){
  .guide-no-detail-modal{
    width:calc(100vw - 16px);max-height:calc(100vh - 16px);
    grid-template-columns:1fr;
  }
  .guide-modal-board{border-right:none;border-bottom:1px solid var(--line)}
}

/* ============================================================
   round 13：guide_admin / 卡片新字段选择器（刷新等级/强化符文依赖/hasDetail）
   `.guide-card-roll-level` 是卡片刷新等级徽章（P262：「刷新 Lv9」/「刷新 Lv4~5」11-12px 文本徽章）。
   旧 schema-3 数据不产出这些节点，不影响既有布局。
   ============================================================ */
.guide-card-roll-level{
  display:inline-flex;align-items:center;
  padding:1px 6px;border-radius:4px;
  font-size:11px;font-weight:700;line-height:1.6;white-space:nowrap;
  color:var(--gold);border:1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  background:color-mix(in srgb, var(--gold) 10%, transparent);
}
.guide-card-meta{
  display:flex;align-items:center;flex-wrap:wrap;gap:6px;
  margin-top:5px;font-size:10.5px;color:var(--muted);
}
.guide-card-aug-dep{display:inline-flex;align-items:center;gap:4px;min-width:0}
.guide-card-aug-dep img{width:18px;height:18px;border-radius:4px;object-fit:cover;display:block}
.guide-field.is-wide{grid-column:1 / -1}
.guide-field-row-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width: 640px){.guide-field-row-2{grid-template-columns:1fr}}
.guide-admin-list .guide-admin-comp-row.is-nodetail{opacity:.82}
.guide-admin-comp-row .guide-admin-nodetail-tag{flex:0 0 auto;font-size:9px;color:var(--muted);border:1px dashed var(--line);border-radius:999px;padding:1px 6px;letter-spacing:.05em}
.guide-form-rolllevel{
  display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:10px;align-items:end;
}

/* 日间模式覆盖（走 revamp_chrome.css light 体系） */
:root[data-theme="light"] .guide-card:hover,
:root[data-theme="light"] .guide-card:focus-visible{
  background:rgba(60,50,20,.05);
  box-shadow:0 6px 16px rgba(60,50,20,.12);
}
:root[data-theme="light"] .guide-unit-stars{
  text-shadow:0 1px 2px rgba(255,255,255,.9),0 0 3px rgba(255,255,255,.7);
}
:root[data-theme="light"] .guide-diff i{background:rgba(60,50,20,.18)}
:root[data-theme="light"] .guide-diff i.on{background:#8a6d2f}
:root[data-theme="light"] #guide-login-modal,
:root[data-theme="light"] #guide-admin .guide-admin-overlay{
  background:rgba(60,50,20,.28);
}
:root[data-theme="light"] .guide-login-card,
:root[data-theme="light"] .guide-admin-panel{
  box-shadow:0 12px 32px rgba(60,50,20,.22);
}
:root[data-theme="light"] .guide-field input,
:root[data-theme="light"] .guide-field select,
:root[data-theme="light"] .guide-field textarea,
:root[data-theme="light"] .guide-login-field input{
  color:#2a2925;
  background:#fff;
}
:root[data-theme="light"] .guide-unit-row select{
  color:#2a2925;
  background:#fff;
}
:root[data-theme="light"] .guide-item-chip{color:rgba(42,41,37,.68)}
:root[data-theme="light"] .guide-early p,
:root[data-theme="light"] .guide-sub,
:root[data-theme="light"] .guide-detail-updated{color:rgba(42,41,37,.62)}

/* 评级徽章内联 --guide-rating-color 为暗色值，日间需压深保证对比度（!important 压内联变量） */
:root[data-theme="light"] .guide-badge-S,
:root[data-theme="light"] .guide-group[data-rating="S"] .guide-group-title{--guide-rating-color:#7a6420 !important}
:root[data-theme="light"] .guide-badge-A,
:root[data-theme="light"] .guide-group[data-rating="A"] .guide-group-title{--guide-rating-color:#6d3fb0 !important}
:root[data-theme="light"] .guide-badge-B,
:root[data-theme="light"] .guide-group[data-rating="B"] .guide-group-title{--guide-rating-color:#2f5f9e !important}
:root[data-theme="light"] .guide-badge-C,
:root[data-theme="light"] .guide-group[data-rating="C"] .guide-group-title{--guide-rating-color:#2e7d4f !important}
:root[data-theme="light"] .guide-badge-D,
:root[data-theme="light"] .guide-group[data-rating="D"] .guide-group-title{--guide-rating-color:#5c6068 !important}
/* round 13：组级评级色在日间同步压深（卡片标题/渐变继承），保持与徽章同族色阶 */
:root[data-theme="light"] .guide-group[data-rating="S"]{--guide-rating-color:#7a6420 !important}
:root[data-theme="light"] .guide-group[data-rating="A"]{--guide-rating-color:#6d3fb0 !important}
:root[data-theme="light"] .guide-group[data-rating="B"]{--guide-rating-color:#2f5f9e !important}
:root[data-theme="light"] .guide-group[data-rating="C"]{--guide-rating-color:#2e7d4f !important}
:root[data-theme="light"] .guide-group[data-rating="D"]{--guide-rating-color:#5c6068 !important}

/* ============================================================
   TFT年表页：一比一复刻 TFTIPS /timeline 布局
   顶部 KV hero + 按年份分行的时长比例色块（赛季 KV 背景图）
   默认暗色主题，日间主题用 :root[data-theme="light"] 覆盖
   ============================================================ */
.timeline-hero{
  position:relative;
  overflow:hidden;
  margin-bottom:32px;
  border-radius:14px;
}
.timeline-hero-bg{
  position:absolute;
  inset:0;
  background-size:cover;
}
.timeline-hero-bg-mobile{
  background-image:url("assets/generated/timeline/set16kv-mobile.avif");
  background-position:center 90%;
  filter:blur(4px);
  transform:scale(1.06);
}
.timeline-hero-bg-desktop{
  display:none;
  background-image:url("assets/generated/timeline/set16kv.avif");
  background-position:center 30%;
}
.timeline-hero-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.5) 0%, rgba(0,0,0,.65) 50%, rgba(0,0,0,.9) 100%);
}
.timeline-hero-inner{
  position:relative;
  z-index:1;
  padding:48px 16px;
  text-align:center;
}
.timeline-hero-title{
  margin:0;
  color:#fff;
  /* round 13：标题固定字号，不再被 --font-scale=1.42 放大到主视野 */
  font-size:30px;
  font-weight:700;
  letter-spacing:.04em;
  text-shadow:0 2px 10px rgba(0,0,0,.6);
}
.timeline-hero-note{
  margin-top:8px;
  color:rgba(255,255,255,.85);
  font-size:13px;
  letter-spacing:.08em;
  text-shadow:0 1px 6px rgba(0,0,0,.7);
}
.timeline-years{
  overflow:hidden;
  border-radius:12px;
  border:1px solid #1f2937;
  box-shadow:0 20px 45px rgba(0,0,0,.45);
}
.timeline-year-row{
  display:flex;
}
.timeline-year-label{
  flex:0 0 auto;
  width:32px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:8px 0;
  background:#1f2937;
  color:#f3f4f6;
  border-right:2px solid #000;
}
.timeline-year-num{
  font-size:14px;
  font-weight:700;
  writing-mode:vertical-rl;
  letter-spacing:.1em;
}
.timeline-year-track{
  flex:1 1 auto;
  position:relative;
  min-width:0;
  min-height:108px;
}
.timeline-year-blocks{
  display:flex;
  height:100%;
}
.timeline-set-block{
  position:relative;
  display:flex;
  min-width:0;
  overflow:hidden;
  border-right:0 solid #000;
  transition:all .2s ease;
}
.timeline-set-block::after{
  content:"";
  position:absolute;
  z-index:4;
  top:0;
  right:0;
  bottom:0;
  width:2px;
  background:#000;
  pointer-events:none;
}
.timeline-set-block.is-plain{
  background:#4b5563;
}
.timeline-set-bg{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  transition:transform .3s ease;
}
/* round-11 #197：Set 1 无高清宣传图（仅 1280×720 低码率），聚焦主体避免整图拉伸发虚 */
.timeline-set-block[data-set-img="1"] .timeline-set-bg{
  background-position:center 20%;
  filter:saturate(1.15) contrast(1.05);
}
.timeline-set-block[data-set-img="7"] .timeline-set-bg{
  background-position:center 30%;
}
.timeline-set-block[data-set-img="9"] .timeline-set-bg{
  background-position:center 68%;
}
.timeline-set-block[data-set-img="18"] .timeline-set-bg{
  background-position:center 42%;
}
.timeline-set-block:hover .timeline-set-bg{
  transform:scale(1.05);
}
.timeline-set-ring{
  position:absolute;
  inset:0;
  z-index:2;
  pointer-events:none;
  background:rgba(199,164,99,0);
  box-shadow:inset 0 0 0 0 var(--gold);
  transition:background .2s ease, box-shadow .2s ease;
}
.timeline-set-block:hover .timeline-set-ring{
  background:rgba(199,164,99,.2);
  box-shadow:inset 0 0 0 4px var(--gold);
}
.timeline-set-text{
  position:relative;
  z-index:1;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  padding:16px 4px 32px;
  color:#fff;
  min-width:0;
}
.timeline-set-name{
  /* round 13：固定字号，不受 --font-scale 放大；保留文字阴影保证 KV 图上可读 */
  font-size:13px;
  font-weight:700;
  text-align:center;
  text-shadow:1px 1px 0 #000, 2px 2px 0 #000, 0 0 8px rgba(0,0,0,.9);
  line-height:1.25;
}
.timeline-set-alt{
  margin-top:2px;
  /* round 13：Set 小字固定 ≥11px（原 calc(10px*1.42)），窄块内不折行 */
  font-size:11px;
  font-weight:700;
  text-align:center;
  letter-spacing:.04em;
  text-shadow:1px 1px 0 #000, 0 0 6px rgba(0,0,0,.9);
  line-height:1.3;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}
.timeline-set-block.is-tbd{
  opacity:.55;
  min-width:0;
  /* round 13：预发布块保留边界分割线（与赛季块一致的 2px 竖线），避免过渡缺失 */
  border-right:0 solid rgba(0,0,0,.55);
}
.timeline-set-block.is-tbd::after{background:rgba(0,0,0,.55)}
.timeline-set-block.is-tbd .timeline-set-bg{
  filter:grayscale(.6);
}
.timeline-set-block.is-tbd .timeline-set-name,
.timeline-set-block.is-tbd .timeline-set-alt{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}
.timeline-ruler{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  z-index:2;
  display:flex;
  height:16px;
  background:rgba(0,0,0,.7);
}
.timeline-ruler-cell{
  position:relative;
  flex:1 1 0;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:8px;
  color:#fff;
  border-right:0 solid rgba(209,213,219,.5);
}
.timeline-ruler-cell::after{
  content:"";
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  width:1px;
  background:rgba(209,213,219,.5);
  pointer-events:none;
}
.timeline-ruler-cell:last-child::after{content:none}
.timeline-ruler-cell:last-child{
  border-right:none;
}
.timeline-today{
  position:absolute;
  top:0;
  bottom:0;
  z-index:1;
  width:3px;
  background:#ef4444;
  transform:translateX(-50%);
  box-shadow:0 0 8px rgba(239,68,68,.7);
}
/* Issue #1023 round 9 反馈10：「今天」竖线加文字标签，避免被误读为赛季标记。 */
.timeline-today-label{
  position:absolute;
  top:2px;
  left:50%;
  transform:translateX(-50%);
  padding:1px 5px;
  border-radius:4px;
  background:#ef4444;
  color:#fff;
  font-size:9px;
  font-weight:700;
  line-height:1.4;
  white-space:nowrap;
}
.timeline-launch-marker{
  position:absolute;
  top:0;
  bottom:16px;
  left:0;
  z-index:3;
  width:2px;
  background:#f5d16e;
  box-shadow:0 0 8px rgba(245,209,110,.72);
  pointer-events:none;
}
.timeline-launch-marker span{
  position:absolute;
  top:5px;
  left:5px;
  padding:2px 5px;
  border-radius:3px;
  background:rgba(16,18,22,.84);
  color:#fff4c8;
  font-size:9px;
  font-weight:800;
  line-height:1.3;
  white-space:nowrap;
}
@media (min-width:640px){
  .timeline-hero{
    margin-bottom:48px;
  }
  .timeline-hero-bg-mobile{
    display:none;
  }
  .timeline-hero-bg-desktop{
    display:block;
  }
  .timeline-hero-inner{
    padding:96px 24px;
  }
  .timeline-hero-title{
    font-size:38px;
  }
  .timeline-year-label{
    width:44px;
    padding:20px 0;
    /* round 13：年份标签边框宽度与赛季块间 2px 竖线一致 */
    border-right-width:2px;
  }
  .timeline-year-track{
    min-height:132px;
  }
  .timeline-year-num{
    font-size:20px;
  }
  .timeline-set-text{
    padding:24px 8px 40px;
  }
  .timeline-set-name{
    font-size:14px;
  }
  .timeline-set-alt{
    font-size:12px;
  }
  .timeline-ruler-cell{
    font-size:10px;
  }
}
@media (min-width:1024px){
  .timeline-set-name{
    font-size:14px;
  }
}
/* 日间主题：块间分割线反白、容器描边与投影调浅（文字均在 KV 图上，保持白色） */
:root[data-theme="light"] .timeline-years{
  border-color:#cfc4b1;
  background:#fffdf8;
  box-shadow:0 14px 34px rgba(76,62,42,.16);
}
:root[data-theme="light"] .timeline-year-label{
  background:#5d5548;
  color:#fffaf0;
  border-right-color:#fffdf8;
}
:root[data-theme="light"] .timeline-set-block{
  border-right-color:#fffdf8;
}
:root[data-theme="light"] .timeline-set-block::after{background:#fffdf8}
:root[data-theme="light"] .timeline-set-block.is-plain{background:#cfc7b9}
:root[data-theme="light"] .timeline-set-block.is-tbd .timeline-set-name,
:root[data-theme="light"] .timeline-set-block.is-tbd .timeline-set-alt{color:#2f2a23;text-shadow:none}
:root[data-theme="light"] .timeline-set-block.is-tbd{
  border-right-color:#fffdf8;
  opacity:1;
}
:root[data-theme="light"] .timeline-set-ring{
  box-shadow:inset 0 0 0 0 #b8893b;
  background:rgba(184,137,59,0);
}
:root[data-theme="light"] .timeline-set-block:hover .timeline-set-ring{
  background:rgba(184,137,59,.22);
  box-shadow:inset 0 0 0 4px #b8893b;
}
:root[data-theme="light"] .timeline-ruler{background:rgba(48,43,35,.84)}
:root[data-theme="light"] .timeline-launch-marker{background:#7d5d14;box-shadow:0 0 0 1px rgba(255,255,255,.35),0 0 8px rgba(91,66,14,.36)}
:root[data-theme="light"] .timeline-launch-marker span{background:#fff8e5;color:#5f450d;box-shadow:0 1px 4px rgba(47,38,23,.2)}


/* ============================================================
   issue-1023 第 5 轮（R5）
   反馈6：全站"死深蓝"底框去重 —— 夜间面板并入站点既有深色语义体系。
     --panel/#0f1620、--panel-solid/#121924 是饱和深蓝，与中性暗底
     --background:#191c1f 不搭（阵容推荐页 guide 卡片/空态、各处弹层
     全部吃 var(--panel)，呈现"深蓝色框框"）。改为既有语义变量
     --surface/#1f2428、--surface-elevated/#252a2f 的同值，深色层级不变、去掉死蓝。
     日间 --panel 维持米白 #fffefa 不动。
   ============================================================ */
:root:not([data-theme="light"]){
  --panel:#1f2428;
  --panel-solid:#252a2f;
}

/* ===== R5 反馈15：日间"黑 pill"active tab（源规则写死 #1a1608 底 + 冷灰文字） =====
   命中：s17/s18 弈子费用筛选、概率表格二级条、基础资料 subtabs、神器模式（JS 注入） */
:root[data-theme="light"] .s17-subtabbar .s17-tab{
  color:rgba(42,41,37,.62);
  border-color:rgba(60,50,20,.2);
  background:transparent;
}
:root[data-theme="light"] .s17-subtabbar .s17-tab:hover{
  color:rgba(42,41,37,.85);
  border-color:rgba(60,50,20,.32);
  background:rgba(60,50,20,.05);
}
:root[data-theme="light"] .s17-subtabbar .s17-tab.active{
  color:#8a6d2f;
  background:rgba(138,109,47,.12);
  border-color:rgba(138,109,47,.45);
  box-shadow:none;
}
/* s17 概率页 topbar item-tabbar：源规则全部带 !important，需同级压回 */
/* litebar 系（basics subtabs、概率三级条）：team_builder.css 动态注入且带
   !important（color:#8a8a92 / active #f0c674），日间需同级 !important 压回 */
:root[data-theme="light"] .s17-prob-litebar.s17-tabbar{
  border-bottom-color:rgba(60,50,20,.12) !important;
}
:root[data-theme="light"] .s17-prob-litebar.s17-tabbar .s17-tab{
  color:rgba(42,41,37,.62) !important;
}
:root[data-theme="light"] .s17-prob-litebar.s17-tabbar .s17-tab:hover{
  color:rgba(42,41,37,.85) !important;
}
:root[data-theme="light"] .s17-prob-litebar.s17-tabbar .s17-tab.active{
  color:#8a6d2f !important;
  border-bottom-color:rgba(138,109,47,.72) !important;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-topbar .s17-item-tabbar .s17-tab{
  color:rgba(42,41,37,.62) !important;
  border-color:rgba(60,50,20,.2) !important;
  border-bottom-color:rgba(60,50,20,.2) !important;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-topbar .s17-item-tabbar .s17-tab:hover{
  color:rgba(42,41,37,.85) !important;
  border-color:rgba(60,50,20,.32) !important;
  background:rgba(60,50,20,.05) !important;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-topbar .s17-item-tabbar .s17-tab.active{
  color:#8a6d2f !important;
  background:rgba(138,109,47,.12) !important;
  border-color:rgba(138,109,47,.45) !important;
  box-shadow:none !important;
}

/* ===== R5 反馈12/15：s17/s18 资料页日间层级与对比 ===== */
/* library section 标题写死奶油金 rgb(246,229,182)（原仅 basics 有覆盖，扩到全站） */
:root[data-theme="light"] .s17-library-section-title{
  color:#7a6420;
}
/* 羁绊卡 "final lock" 写死白字层级，日间逐条压深 */
:root[data-theme="light"] .s17-cheat-card .s17-cheat-name,
:root[data-theme="light"] .s17-cheat-card .s17-cheat-name .s17-trait-title,
:root[data-theme="light"] .s17-cheat-card .s17-cheat-name .s17-trait-title span{
  color:#2a2925;
}
:root[data-theme="light"] .s17-cheat-card .s17-cheat-desc,
:root[data-theme="light"] .s17-cheat-card .s17-trait-tier-text,
:root[data-theme="light"] .s17-trait-tier-text{
  color:rgba(42,41,37,.85);
}
:root[data-theme="light"] .s17-cheat-card .s17-trait-summary,
:root[data-theme="light"] .s17-cheat-card .s17-trait-note,
:root[data-theme="light"] .s17-trait-notes,
:root[data-theme="light"] .s17-trait-note{
  color:rgba(42,41,37,.72);
  border-left-color:rgba(138,109,47,.32);
}
:root[data-theme="light"] .s17-trait-note{
  background:linear-gradient(90deg, rgba(138,109,47,.06), rgba(138,109,47,0));
}
/* 羁绊断点数字（2/4/6/9 写死浅灰） */
:root[data-theme="light"] .tier-badge .num{
  color:rgba(42,41,37,.78);
}
:root[data-theme="light"] .tier-badge .sep{
  color:rgba(42,41,37,.58);
}
/* 层级数徽章：铜/银/金/彩四档写死亮色，日间换深色系 */
:root[data-theme="light"] .s17-trait-tier-count{
  color:#8a5a20;
  background:rgba(205,127,50,.16);
}
:root[data-theme="light"] .s17-trait-tier-row.level-2 .s17-trait-tier-count{
  color:#5c6068;
  background:rgba(108,112,120,.14);
}
:root[data-theme="light"] .s17-trait-tier-row.level-3 .s17-trait-tier-count{
  color:#8a6d2f;
  background:rgba(138,109,47,.16);
}
:root[data-theme="light"] .s17-trait-tier-row.level-4 .s17-trait-tier-count{
  color:#5a4a8a;
  background:linear-gradient(135deg, rgba(78,108,165,.16) 0%, rgba(136,102,186,.14) 52%, rgba(191,146,87,.14) 100%);
  box-shadow:none;
  text-shadow:none;
}
/* 羁绊单位标签写死奶油色 */
:root[data-theme="light"] .s17-trait-unit-label{
  color:rgba(42,41,37,.78);
}
:root[data-theme="light"] body[data-page="s17"] #s17-root .s17-trait-matrix .s17-trait-title img{
  filter:brightness(0) saturate(100%) invert(31%) sepia(18%) saturate(773%) hue-rotate(358deg) brightness(91%) contrast(86%);
  opacity:.9;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-anima-hero-desc,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-arbiter-desc,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-anima-summary-desc,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-arbiter-summary-desc{
  color:#625b50;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-anima-tech-card,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-pengu-stage,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-arbiter-grid,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-missed-ring{
  border-color:#d8cfbf !important;
  background:#fffdf8 !important;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-anima-tech-head,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-pengu-stage-head{
  color:#3f392f;
  border-bottom-color:#ded5c7;
  background:#f5efe5;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-anima-tech-row,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-pengu-row{
  border-bottom-color:#e5ddd1 !important;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-anima-tech-row:nth-child(even),
:root[data-theme="light"] body[data-page="s17"] .s17-prob-pengu-row:nth-child(even){
  background:#faf6ef;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-anima-tech-odds,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-pengu-place{
  color:#765a1d;
  border-right-color:#ded5c7;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-pengu-legend-item,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-orb-reward-label,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-anima-reward-label{
  color:#4e473e;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-pengu-gold-tag{
  padding:2px 4px;
  border:1px solid #c9ad68;
  border-radius:4px;
  background:#fff8df;
  color:#684f17;
  text-shadow:none;
  transform:translate(28%,30%);
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-table{
  border-color:#d8cfbf !important;
  background:#fffdf8 !important;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-table-row{
  border-bottom-color:#e5ddd1 !important;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-table-cell{
  color:#4e473e !important;
  border-left-color:#e5ddd1 !important;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-table-head .s17-prob-table-cell{
  color:#3f392f !important;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-arbiter-row{
  border-bottom-color:#e5ddd1 !important;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-arbiter-row:not(.s17-prob-arbiter-head):nth-child(even){
  background:#faf6ef;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-arbiter-head-cell,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-arbiter-trigger,
:root[data-theme="light"] body[data-page="s17"] .s17-prob-arbiter-cell{
  color:#4e473e;
  border-left-color:#e5ddd1;
}
:root[data-theme="light"] body[data-page="s17"] .s17-prob-arbiter-head-cell{
  color:#3f392f;
}
:root[data-theme="light"] body[data-page="s17"] .s17-augment-icon{
  border-color:#77736c;
  background:#50545b;
  box-shadow:none;
}
/* s18 羁绊断点徽标写死亮金 */
:root[data-theme="light"] .s18-trait-effect-line .s18-trait-effect-bp{
  color:inherit;
}
/* 太空律动彩虹字：按字符写死荧光色，日间整体压暗保持色相（沿用 sem 系手法） */
:root[data-theme="light"] .s17-groove-rainbow{
  filter:brightness(.52) saturate(1.3);
}
:root[data-theme="light"] .s17-groove-wave{
  color:rgba(42,41,37,.62);
}
/* 语义数字写死荧光绿 */
:root[data-theme="light"] .s17-sem-number-percent,
:root[data-theme="light"] .s17-sem-number-flat{
  color:#2e7d4f;
}
/* 神器模式二级条：tft_v4_app.js 注入样式写死暗底，特异度压回 */
:root[data-theme="light"] .artifact-mode button.active{
  border-color:rgba(138,109,47,.45);
  background:rgba(138,109,47,.12);
  color:#8a6d2f;
  box-shadow:none;
}
:root[data-theme="light"] .artifact-suggestion{
  border-color:rgba(60,50,20,.18);
  background:#fffefa;
  color:rgba(42,41,37,.75);
}
:root[data-theme="light"] .artifact-suggestion:hover{
  border-color:rgba(138,109,47,.4);
  background:rgba(138,109,47,.08);
  color:#8a6d2f;
}
/* 实时强度卡片羁绊图标：SVG 资产为暗底浅金，日间压深 */
:root[data-theme="light"] .comp-trait img{
  filter:brightness(.62) saturate(1.2);
}
:root[data-theme="light"] body[data-page="overview"] .comp-trait img.trait-level-2,
:root[data-theme="light"] body[data-page="overview"] .rail-early-trait-icon.trait-level-2{
  filter:var(--trait-silver-filter) !important;
}

body[data-page="overview"] .overview-cards .comp-trait img.trait-level-2,
body[data-page="overview"] .rail-early-trait-icon.trait-level-2{
  filter:var(--trait-silver-filter) !important;
}

body[data-page="overview"] .overview-cards .comp-trait img.trait-level-3,
body[data-page="overview"] .rail-early-trait-icon.trait-level-3{
  filter:brightness(1.18) saturate(1.16) drop-shadow(0 0 6px color-mix(in srgb,var(--trait-gold) 30%,transparent)) !important;
}

body[data-page="overview"] .overview-cards .comp-trait img.trait-level-4,
body[data-page="overview"] .rail-early-trait-icon.trait-level-4{
  filter:brightness(1.15) saturate(1.25) drop-shadow(0 0 7px color-mix(in srgb,var(--gold) 28%,transparent)) !important;
}

/* Overview uses one level palette in both the tier list and composition cards. */
:root{
  --overview-trait-bronze-filter:brightness(0) saturate(100%) invert(68.3%) sepia(55.6%) saturate(1356%) hue-rotate(348.7deg) brightness(58%) contrast(40.8%);
  --overview-trait-gold-filter:brightness(0) saturate(100%) invert(98.4%) sepia(32.3%) saturate(900%) hue-rotate(3.3deg) brightness(92.3%) contrast(43.6%);
  --overview-trait-prismatic-filter:brightness(1.08) saturate(1.18) drop-shadow(0 0 7px color-mix(in srgb,var(--gold) 28%,transparent));
}

:root[data-theme="light"]{
  --overview-trait-bronze-filter:brightness(0) saturate(100%) invert(53.3%) sepia(91.8%) saturate(517%) hue-rotate(344.8deg) brightness(52%) contrast(73.1%);
  --overview-trait-gold-filter:brightness(0) saturate(100%) invert(26%) sepia(72.4%) saturate(877%) hue-rotate(2.8deg) brightness(117.9%) contrast(45.2%);
  --overview-trait-prismatic-filter:brightness(.78) saturate(1.16) drop-shadow(0 1px 2px color-mix(in srgb,var(--text) 18%,transparent));
}

body[data-page="overview"] :is(
  .overview-cards .comp-trait,
  #overview-comp-rail .rail-traits .oneshot-trait-badge,
  #overview-comp-rail .rail-early-trait
) img.trait-level-1{
  filter:var(--overview-trait-bronze-filter) !important;
}

body[data-page="overview"] :is(
  .overview-cards .comp-trait,
  #overview-comp-rail .rail-traits .oneshot-trait-badge,
  #overview-comp-rail .rail-early-trait
) img.trait-level-2{
  filter:var(--trait-silver-filter) !important;
}

body[data-page="overview"] :is(
  .overview-cards .comp-trait,
  #overview-comp-rail .rail-traits .oneshot-trait-badge,
  #overview-comp-rail .rail-early-trait
) img.trait-level-3{
  filter:var(--overview-trait-gold-filter) !important;
}

body[data-page="overview"] :is(
  .overview-cards .comp-trait,
  #overview-comp-rail .rail-traits .oneshot-trait-badge,
  #overview-comp-rail .rail-early-trait
) img.trait-level-4{
  filter:var(--overview-trait-prismatic-filter) !important;
}

/* Keep live-strength trait SVGs uniform within each theme and view. */
:root:not([data-theme="light"]) body[data-page="overview"] :is(
  .overview-cards .comp-trait,
  #overview-comp-rail .rail-traits .oneshot-trait-badge,
  #overview-comp-rail .rail-early-trait
) img{
  filter:var(--trait-silver-filter) !important;
  opacity:1;
}

:root[data-theme="light"] body[data-page="overview"] #overview-comp-rail :is(
  .rail-traits .oneshot-trait-badge,
  .rail-early-trait
) img{
  filter:var(--overview-trait-bronze-filter) !important;
  opacity:1;
}

/* Match the overview controls to the translucent material used by the main banner. */
body[data-page="overview"] :is(.overview-view-switch,.overview-season-switcher){
  background:color-mix(in srgb,var(--surface-elevated) 58%,transparent);
  border:0;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb,var(--surface-elevated) 62%,transparent),
    0 8px 22px color-mix(in srgb,var(--background) 34%,transparent);
  backdrop-filter:blur(10px) saturate(1.18);
  -webkit-backdrop-filter:blur(10px) saturate(1.18);
}

:root[data-theme="light"] body[data-page="overview"] :is(.overview-view-switch,.overview-season-switcher){
  background:color-mix(in srgb,var(--surface-elevated) 72%,transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb,var(--surface-elevated) 88%,transparent),
    0 8px 22px color-mix(in srgb,var(--text) 9%,transparent);
}

body[data-page="overview"] :is(.overview-season-switcher button.is-selected,.overview-view-btn.active){
  color:var(--gold);
  background:color-mix(in srgb,var(--accent-subtle) 76%,var(--surface-elevated));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb,var(--surface-elevated) 66%,transparent),
    0 3px 10px color-mix(in srgb,var(--background) 42%,transparent);
}

:root[data-theme="light"] body[data-page="overview"] :is(.overview-season-switcher button.is-selected,.overview-view-btn.active){
  box-shadow:
    inset 0 1px 0 var(--surface-elevated),
    0 3px 10px color-mix(in srgb,var(--text) 10%,transparent);
}

@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  body[data-page="overview"] :is(.overview-view-switch,.overview-season-switcher){
    background:var(--surface-elevated);
  }
}

body[data-page="overview"] .tier-row{
  position:relative;
  min-height:162px;
  border-bottom:0;
}

body[data-page="overview"] .tier-row::after{
  content:"";
  position:absolute;
  right:0;
  bottom:0;
  left:0;
  width:min(100%,calc(104px + var(--tier-divider-cards,1) * 172px));
  height:1px;
  background:linear-gradient(90deg,transparent,var(--border-subtle) 9%,var(--border-subtle) 91%,transparent);
  pointer-events:none;
}

body[data-page="overview"] .tier-row:last-child::after{
  display:none;
}

body[data-page="overview"] .overview-tier-empty,
body[data-page="overview"] .rail-tier-empty{
  min-height:76px;
  padding:0;
  border:0;
}

/* 数据榜单需要保留空梯级的浏览节奏；阵容概览本身不显示 tier list。 */
body[data-page="overview"][data-overview-view="tier"] .tier-row.is-empty .overview-tier-empty{
  min-height:124px;
}

@media (max-width:640px){
  body[data-page="overview"][data-overview-view="tier"] .tier-row.is-empty .overview-tier-empty{
    min-height:96px;
  }
}

body[data-page="overview"] #tooltip .tt-diff{
  color:var(--text);
  font-weight:650;
}

body[data-page="overview"] #tooltip .diff-pill{
  box-shadow:inset 0 0 0 1px color-mix(in srgb,currentColor 36%,transparent);
}

#page-explorer .exa-season-switch{
  grid-column:1 / -1;
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:3px;
  border-radius:999px;
  background:var(--panel-soft);
}

#page-explorer .exa-season-switch button{
  min-width:42px;
  height:28px;
  padding:0 10px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:var(--muted);
  font:700 11px/1 var(--font-metric);
  transition:background .15s ease,color .15s ease,box-shadow .15s ease;
}

#page-explorer .exa-season-switch button:hover{
  color:var(--text);
  background:var(--secondary-hover);
}

#page-explorer .exa-season-switch button.is-active{
  color:var(--gold);
  background:var(--accent-subtle);
  box-shadow:inset 0 0 0 1px var(--primary-border);
}
:root[data-theme="light"] .avatar-status-tip{
  background:#fffdf8;
  border-color:#cfc5b5;
  color:#625b50;
  box-shadow:0 10px 24px rgba(61,51,37,.18);
}
:root[data-theme="light"] .avatar-status-tip .label.tryout{
  color:#5d378e;
}
/* 概率表中心强化图标（浅色 PNG），日间略提饱和/对比 */
:root[data-theme="light"] .s17-prob-missed-center img{
  filter:saturate(1.15) contrast(1.1);
}
/* tier-maker 行标签：刺眼纯色金块 → 柔沙渐变 + 深金字 */
:root[data-theme="light"] .tier-maker-row-label{
  background:linear-gradient(135deg, #e9ddc0, #d9c89e);
  color:#6b5316;
}

/* ===== R5 反馈12/13：基础资料页美术（主题无关，双主题生效） =====
   主内容标题与上沿间距：既有小修 16px 仍偏紧，放宽到 22px */
.basics-subtabbar{
  margin-top:22px;
}
/* 两列表格列平衡：标签列 50% → 34%，数值列收拢、减少空旷感（源规则带 !important） */
body[data-page="basics"] .s17-prob-table-cell:first-child{
  flex:0 0 34% !important;
}

/* Round 13 final pixel pass: keep repeated overview assets on a fixed rhythm. */
#overview-comp-rail .rail-lineup .rail-unit{
  width:40px !important;
  min-width:40px !important;
  max-width:40px !important;
}
#overview-comp-rail .rail-lineup .rail-unit-avatar{
  width:40px !important;
  height:40px !important;
}
#overview-comp-rail .rail-lineup .rail-unit-items{
  width:40px !important;
}
#overview-comp-rail .rail-lineup .rail-item-slot{
  width:13px !important;
  height:13px !important;
}
#overview-comp-rail .rail-lineup .rail-item-icon{
  width:12px !important;
  height:12px !important;
}

/* Explorer owns a compact type scale; the global 1.42 reading scale is too large here. */
#page-explorer .explorer-root{
  --font-scale:1;
  /* V6 L92: 默认档整体再缩一档(约12%)——用户两轮要求结果区/指标更小一号 */
  --exa-body-fs:12px;
  --exa-avatar-size:38px;
  --exa-main-item-size:28px;
  --exa-sub-item-size:calc(var(--exa-avatar-size) * .32);
  --exa-trait-icon-size:14px;
  --exa-trait-fs:11px;
}
body[data-explorer-font="sm"] #page-explorer,
body[data-explorer-font="sm"] #page-explorer .explorer-root{--exa-body-fs:11px;--exa-avatar-size:32px;--exa-main-item-size:25px;--exa-trait-icon-size:13px;--exa-trait-fs:10px}
body[data-explorer-font="md"] #page-explorer,
body[data-explorer-font="md"] #page-explorer .explorer-root{--exa-body-fs:12px;--exa-avatar-size:38px;--exa-main-item-size:28px;--exa-trait-icon-size:14px;--exa-trait-fs:11px}
body[data-explorer-font="lg"] #page-explorer,
body[data-explorer-font="lg"] #page-explorer .explorer-root{--exa-body-fs:14px;--exa-avatar-size:50px;--exa-main-item-size:36px;--exa-trait-icon-size:17px;--exa-trait-fs:12.5px}
body[data-page="explorer"] .exa-rank-note{
  margin-top:4px;color:var(--text-muted);font-size:11px;line-height:1.35;max-width:220px;
}
body[data-page="explorer"] .exa-summary-context{
  flex-basis:100%;font-weight:750;color:var(--text);font-size:12px;
}
@media (min-width:901px){
  #page-explorer .explorer-root{
    grid-template-columns:minmax(240px,260px) minmax(0,1fr) !important;
  }
}
@media (min-width:1200px){
  #page-explorer .exa-sidebar{
    flex:0 0 260px !important;
    max-width:260px;
  }
}
@media (max-width:900px){
  #page-explorer .explorer-root{
    grid-template-columns:minmax(0,1fr) !important;
  }
  #page-explorer .explorer-sidebar{
    border-right:0 !important;
    padding-right:0 !important;
  }
}
@media (max-width:1199px){
  #page-explorer .exa-sidebar{
    flex:1 1 auto !important;
    max-width:none;
  }
}

/* S18 systems copy and metrics stay subordinate to the surrounding panel. */
body[data-page="s18"] .s18-systems-intro .s18-systems-intro-title{
  margin:0 0 6px;
  font-size:13px !important;
  line-height:1.4;
}
body[data-page="s18"] .s18-systems-intro .s18-systems-intro-title + .s18-list{
  margin-bottom:12px;
}
body[data-page="s18"] .s18-section-title{
  font-size:14px !important;
}
body[data-page="s18"] .s18-section-count{
  font-size:11px !important;
}
body[data-page="s18"] .s18-coven-output,
body[data-page="coven-calc"] .s18-coven-output{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) auto;
  gap:1px !important;
  padding:1px !important;
  border-top:0 !important;
  background:var(--line);
}
body[data-page="s18"] .s18-coven-stat,
body[data-page="coven-calc"] .s18-coven-stat{
  min-width:0;
  min-height:58px;
  padding:9px 10px;
  justify-content:center;
  background:color-mix(in srgb,var(--panel) 94%,#7a98b8 6%);
}
body[data-page="s18"] .s18-coven-stat:nth-child(2),
body[data-page="coven-calc"] .s18-coven-stat:nth-child(2){
  background:color-mix(in srgb,var(--panel) 94%,#987e52 6%);
}
body[data-page="s18"] .s18-coven-stat:nth-child(3),
body[data-page="coven-calc"] .s18-coven-stat:nth-child(3){
  background:color-mix(in srgb,var(--panel) 94%,#668e72 6%);
}
body[data-page="s18"] .s18-coven-stat b,
body[data-page="coven-calc"] .s18-coven-stat b{
  font-size:14px !important;
  line-height:1.25;
  overflow-wrap:anywhere;
}
body[data-page="s18"] .s18-coven-actions,
body[data-page="coven-calc"] .s18-coven-actions{
  align-self:stretch;
  align-items:center;
  margin-left:0 !important;
  padding:8px 10px;
  background:var(--panel);
}
@media (max-width:700px){
  body[data-page="s18"] .s18-coven-output,
  body[data-page="coven-calc"] .s18-coven-output{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  body[data-page="s18"] .s18-coven-actions,
  body[data-page="coven-calc"] .s18-coven-actions{
    grid-column:1/-1;
  }
}
/* Light tooltips share one readable surface across unit, trait and item cards. */
:root[data-theme="light"] #tooltip,
:root[data-theme="light"] #tooltip .tooltip-card,
:root[data-theme="light"] #tooltip .bond-detail-card,
:root[data-theme="light"] #tooltip .bond-popup,
:root[data-theme="light"] #tooltip .unit-detail-card,
:root[data-theme="light"] #tooltip .s17-trait-title,
:root[data-theme="light"] #tooltip .title-row,
:root[data-theme="light"] #tooltip .s17-trait-tier-row,
:root[data-theme="light"] #tooltip .s17-sem,
:root[data-theme="light"] #tooltip .s17-groove-rainbow,
:root[data-theme="light"] #tooltip .s17-groove-wave{
  color:#27231d;
}
:root[data-theme="light"] #tooltip .tier-badge .num,
:root[data-theme="light"] #tooltip .tier-badge .sep{
  color:#5d554a;
}
:root[data-theme="light"] #tooltip .s17-trait-summary,
:root[data-theme="light"] #tooltip .s17-trait-note,
:root[data-theme="light"] #tooltip .s17-trait-notes,
:root[data-theme="light"] #tooltip .s17-trait-tier-text,
:root[data-theme="light"] #tooltip .s17-trait-unit-label{
  color:#5d554a;
}
:root[data-theme="light"] #tooltip .s17-trait-tier-count{
  color:#704f19;
  background:#eee8de;
  box-shadow:none;
  text-shadow:none;
}
:root[data-theme="light"] #tooltip .s17-trait-tier-row.level-2 .s17-trait-tier-count{
  color:#555a61;
  background:#e4e6e8;
}
:root[data-theme="light"] #tooltip .s17-trait-tier-row.level-3 .s17-trait-tier-count{
  color:#755a05;
  background:#f4e6ac;
}
:root[data-theme="light"] #tooltip .s17-trait-tier-row.level-4 .s17-trait-tier-count{
  color:#4b3e70;
  background:#e7e0f1;
  box-shadow:none;
  text-shadow:none;
}
:root[data-theme="light"] #tooltip .s17-sem-stat-ad{color:#a22f2f !important}
:root[data-theme="light"] #tooltip .s17-sem-stat-ap,
:root[data-theme="light"] #tooltip .s17-sem-stat-magic-damage{color:#5044b8 !important}
:root[data-theme="light"] #tooltip .s17-sem-stat-health{color:var(--semantic-health) !important}
:root[data-theme="light"] #tooltip .s17-sem-stat-armor{color:#765c14 !important}
:root[data-theme="light"] #tooltip .s17-sem-stat-mr{color:#6932ac !important}
:root[data-theme="light"] #tooltip .s17-sem-stat-as{color:#4f6918 !important}
:root[data-theme="light"] #tooltip .s17-sem-stat-physical-damage{color:#9a451b !important}
:root[data-theme="light"] #tooltip .s17-sem-stat-true-damage,
:root[data-theme="light"] #tooltip .s17-sem-buff{color:var(--semantic-buff) !important}
:root[data-theme="light"] #tooltip .s17-sem-number-percent,
:root[data-theme="light"] #tooltip .s17-sem-number-flat{
  color:#38322b !important;
}
:root[data-theme="light"] #tooltip .unit-detail-card .title-row h3,
:root[data-theme="light"] #tooltip .unit-detail-card .skill-name,
:root[data-theme="light"] #tooltip .s17-unit-skill-name,
:root[data-theme="light"] #tooltip .s17-item-tooltip-title,
:root[data-theme="light"] #tooltip .s17-item-tooltip-stat-value,
:root[data-theme="light"] #tooltip .s17-item-tooltip-comp-value,
:root[data-theme="light"] #tooltip .s17-trait-title span{
  color:#27231d !important;
  text-shadow:none !important;
}
:root[data-theme="light"] #tooltip .unit-detail-card .desc,
:root[data-theme="light"] #tooltip .unit-detail-card .trait-name,
:root[data-theme="light"] #tooltip .unit-detail-card .trait-item,
:root[data-theme="light"] #tooltip .s17-item-tooltip-copy,
:root[data-theme="light"] #tooltip .s17-item-tooltip-stat,
:root[data-theme="light"] #tooltip .s17-item-tooltip-comp-label,
:root[data-theme="light"] #tooltip .avatar-name{
  color:#5d554a !important;
}
:root[data-theme="light"] #tooltip .unit-detail-card .tt-row,
:root[data-theme="light"] #tooltip .unit-detail-card .tt-row span,
:root[data-theme="light"] #tooltip .unit-detail-card .tt-row b,
:root[data-theme="light"] #tooltip .unit-detail-card .s17-unit-tooltip-position,
:root[data-theme="light"] #tooltip .s17-item-tooltip-op{
  color:#5d554a !important;
  text-shadow:none !important;
}
:root[data-theme="light"] #tooltip .unit-detail-card .s17-unit-tooltip-stat,
:root[data-theme="light"] #tooltip .unit-detail-card .s17-unit-tooltip-stat-value{
  color:#4e473e !important;
  text-shadow:none !important;
}
:root[data-theme="light"] #tooltip .s17-sem-trait,
:root[data-theme="light"] #tooltip .s17-sem-unit,
:root[data-theme="light"] #tooltip .s17-sem-item{
  filter:none !important;
}

/* Round14 follow-up: neutral dark surfaces for operational tools only. */
:root[data-theme="dark"] body:is([data-page="tier-maker"],[data-page="attribute-compare"],[data-page="roll-probability"],[data-page="coven-calc"],[data-page^="stats-"]) .page-panel{
  color:#e8e5df;
}
:root[data-theme="dark"] body[data-page="attribute-compare"] :is(.attribute-drop-card,.attribute-vs-panel){
  background:#1b1d1f !important;
  border-color:rgba(255,255,255,.11) !important;
  box-shadow:0 10px 24px rgba(0,0,0,.16) !important;
}
:root[data-theme="dark"] body[data-page="attribute-compare"] :is(.attribute-drop-card,.attribute-vs-panel)::before{
  background:none !important;
}
:root[data-theme="dark"] body[data-page="attribute-compare"] .attribute-vs-mark{
  color:#e8e5df !important;
  text-shadow:none !important;
}
:root[data-theme="dark"] body[data-page="attribute-compare"] .attribute-vs-copy strong{
  color:#d8d3ca !important;
}
:root[data-theme="dark"] body[data-page="tier-maker"] :is(.tier-maker-board,.tier-maker-toolbox,.tier-maker-toolbar,.tier-maker-row){
  background:#1b1d1f !important;
  border-color:rgba(255,255,255,.11) !important;
  box-shadow:none !important;
}
:root[data-theme="dark"] body[data-page="coven-calc"] :is(.s18-card,.s18-coven-output,.s18-coven-stat,.s18-coven-actions){
  background:#1b1d1f !important;
  border-color:rgba(255,255,255,.11) !important;
  box-shadow:none !important;
}
:root[data-theme="dark"] body[data-page="coven-calc"] :is(.s18-card-title,.s18-section-title,.s18-coven-stat b){
  color:#e8e5df !important;
}
:root[data-theme="dark"] body[data-page="coven-calc"] :is(.s18-input,.s18-btn,.s18-filter-btn){
  background:#232527 !important;
  color:#dedad3 !important;
  border-color:rgba(255,255,255,.14) !important;
}
:root[data-theme="dark"] body[data-page="coven-calc"] :is(.s18-btn-primary,.s18-filter-btn.active){
  background:#dedad3 !important;
  color:#171819 !important;
  border-color:#dedad3 !important;
}
:root[data-theme="dark"] body[data-page="coven-calc"] .s18-coven-tier-row.is-reached td{
  background:#202224 !important;
}
:root[data-theme="dark"] body[data-page="roll-probability"] :is(.maomi-roll-controls,.maomi-roll-fact,.maomi-roll-sum,.maomi-roll-chart){
  background:#1b1d1f !important;
  border-color:rgba(255,255,255,.11) !important;
  box-shadow:none !important;
}
:root[data-theme="dark"] body[data-page^="stats-"] :is(.maomi-stats-filterbar,.maomi-stats-table-wrap){
  background:#1b1d1f !important;
  border-color:rgba(255,255,255,.11) !important;
}
:root[data-theme="dark"] body[data-page^="stats-"] .maomi-stats-table th{
  background:#232527 !important;
  border-bottom-color:rgba(255,255,255,.12) !important;
}
:root[data-theme="dark"] body[data-page^="stats-"] .maomi-stats-table td,
:root[data-theme="dark"] body[data-page^="stats-"] .maomi-stats-table td:first-child{
  background:#1b1d1f !important;
  border-bottom-color:rgba(255,255,255,.09) !important;
}
:root[data-theme="dark"] body[data-page^="stats-"] .maomi-stats-table tbody tr:hover td{
  background:#232527 !important;
}
:root[data-theme="dark"] body[data-page^="stats-"] :is(.maomi-stats-segment.is-active,.stats-season-switch button[aria-pressed="true"]){
  background:#dedad3 !important;
  color:#171819 !important;
  border-color:#dedad3 !important;
}

/* Round14 follow-up: keep statistics controls on the shared token scale in
   both themes. This intentionally comes after the legacy route overrides. */
body[data-page^="stats-"] :is(.maomi-stats-filterbar,.maomi-stats-table-wrap){
  background:var(--surface) !important;
  border-color:var(--border) !important;
  box-shadow:none !important;
}
body[data-page^="stats-"] :is(.maomi-stats-select,.maomi-stats-input,.maomi-stats-reset,.maomi-stats-more){
  background-color:var(--control-inset-bg) !important;
  color:var(--control-text) !important;
  border-color:transparent !important;
  box-shadow:var(--control-inset-shadow) !important;
}

body[data-page="tier-maker"] .tier-maker-canvas.is-exporting{
  background:transparent !important;
}
body[data-page="tier-maker"] .tier-maker-history{
  width:34px;
  min-width:34px;
  height:34px;
  padding:0;
  font-size:24px;
  line-height:1;
  letter-spacing:0;
}
body[data-page="tier-maker"] .tier-maker-history:disabled{
  opacity:.35;
  cursor:default;
}
body[data-page="detail"] .guide-detail-actions :is(.guide-copy-code,.guide-open-sim){
  width:auto;
  height:36px;
  flex:0 0 auto;
  padding:0 12px;
  border:1px solid var(--border);
  background:var(--control-inset-bg);
  color:var(--control-text);
}
body[data-page="detail"] .guide-detail-actions .guide-tip-text{
  display:inline;
  position:static;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
  color:inherit;
  font-size:12px;
  font-weight:600;
}
body[data-page="detail"] .guide-detail-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
body[data-page="detail"] .guide-detail-head-actions{display:inline-flex;align-items:center;gap:6px;margin-left:auto}
body[data-page="detail"] .guide-detail-head-actions :is(.guide-copy-code,.guide-open-sim){width:34px;height:34px;flex:0 0 34px;padding:0;border:1px solid var(--border);background:var(--control-inset-bg);color:var(--control-text)}
body[data-page="detail"] .guide-detail-head-actions .guide-tip-text{display:none}
body[data-page="detail"] .guide-detail-head-actions .guide-btn-icon{width:18px;height:18px}
body[data-page="detail"] .guide-detail-actions{display:none!important}
@media(max-width:640px){body[data-page="detail"] .guide-detail-head-actions{margin-left:0}body[data-page="detail"] .guide-detail-head-actions :is(.guide-copy-code,.guide-open-sim){width:32px;height:32px;flex-basis:32px}}
body[data-page^="stats-"] :is(.maomi-stats-select:hover,.maomi-stats-reset:hover,.maomi-stats-more:hover){
  background-color:var(--control-inset-bg-hover) !important;
}
body[data-page^="stats-"] .maomi-stats-segment{
  background:transparent !important;
  color:var(--control-text) !important;
  border-color:transparent !important;
}
body[data-page^="stats-"] .maomi-stats-segment.is-active,
body[data-page^="stats-"] .stats-season-switch button[aria-pressed="true"],
body[data-page^="stats-"] .stats-season-switch button.is-selected{
  background:var(--text) !important;
  color:var(--background) !important;
  border-color:var(--text) !important;
}
body[data-page^="stats-"] .maomi-stats-table th{
  background:var(--control-bg) !important;
  color:var(--text) !important;
  border-bottom-color:var(--border) !important;
}
body[data-page^="stats-"] .maomi-stats-table td,
body[data-page^="stats-"] .maomi-stats-table td:first-child{
  background:var(--surface) !important;
  color:var(--text) !important;
  border-bottom-color:var(--border) !important;
}
body[data-page^="stats-"] .maomi-stats-table tbody tr:hover td{background:var(--control-bg-hover) !important}

/* ROUND18 recommendations: no orphan divider after a hidden singleton season control. */
.selected-season-switcher[hidden] ~ .overview-control-divider{display:none!important}

body[data-page="detail"] .guide-item-rec-row{
  grid-template-columns:minmax(124px,144px) minmax(0,1fr)!important;
}
body[data-page="detail"] .guide-item-rec-unit > span{
  min-width:0;white-space:nowrap!important;word-break:keep-all!important;
}
body[data-page="detail"] .guide-analytics-modes button{
  font-size:13px!important;font-weight:750!important;color:var(--text)!important;
}
body[data-page="detail"] .guide-analytics-modes button:not(.is-active){
  background:var(--surface)!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--text) 10%,transparent)!important;
}
:root[data-theme="light"] body[data-page="detail"] .guide-analytics-modes button.is-active{
  background:#34312c!important;color:#fffdf8!important;
}
:root[data-theme="dark"] body[data-page="detail"] .guide-analytics-modes button.is-active{
  background:#ebe5dc!important;color:#1c1b18!important;
}
@media (max-width:560px){
  body[data-page="detail"] .guide-item-rec-row{grid-template-columns:1fr!important}
}

/* ROUND16 basics: compact, unframed combat formulas. */
body[data-page="basics"] .basics-formula-list{
  display:grid;
  border-block:1px solid var(--line);
}
body[data-page="basics"] .basics-formula-row{
  display:grid;
  grid-template-columns:minmax(150px,.7fr) minmax(0,1.3fr);
  align-items:center;
  gap:18px;
  padding:13px 4px;
  font-size:14px;
  line-height:1.5;
  color:var(--muted);
}
body[data-page="basics"] .basics-formula-row + .basics-formula-row{
  border-top:1px solid var(--line);
}
body[data-page="basics"] .basics-formula-row code,
body[data-page="basics"] .basics-formula-example code{
  color:var(--text);
  font-family:var(--font-metric);
  font-size:12px;
  line-height:1.55;
  white-space:normal;
}
body[data-page="basics"] .basics-formula-example{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:6px 16px;
  align-items:baseline;
  margin-top:14px;
  padding-left:12px;
  border-left:2px solid color-mix(in srgb,var(--accent) 52%,transparent);
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}
body[data-page="basics"] .basics-formula-example strong{color:var(--text)}
body[data-page="basics"] .basics-formula-example span{grid-column:2}
@media(max-width:640px){
  body[data-page="basics"] .basics-formula-row{grid-template-columns:1fr;gap:5px}
  body[data-page="basics"] .basics-formula-example{grid-template-columns:1fr}
  body[data-page="basics"] .basics-formula-example span{grid-column:auto}
}

/* ROUND16: independent S18 augment tier page. */
body[data-page="augment-rank"] .augment-rank-panel{padding-top:22px}
body[data-page="augment-rank"] .augment-rank-shell{width:min(100%,1180px);margin:0 auto;color:var(--text)}
body[data-page="augment-rank"] .augment-rank-header{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:24px;
  padding:12px 0 18px;
  border-bottom:1px solid var(--line);
}
body[data-page="augment-rank"] .augment-rank-header h1{margin:0;font-size:27px;line-height:1.15;letter-spacing:0}
body[data-page="augment-rank"] .augment-rank-header p{margin:8px 0 0;color:var(--muted);font:600 13px/1.45 var(--font-metric)}
body[data-page="augment-rank"] .augment-rank-eyebrow{display:block;margin-bottom:6px;color:var(--gold);font:700 12px/1 var(--font-chrome)}
body[data-page="augment-rank"] .augment-rank-search{display:block;width:min(100%,340px)}
body[data-page="augment-rank"] .augment-rank-search input{
  width:100%;
  height:42px;
  padding:0 14px;
  border:0;
  border-radius:6px;
  outline:0;
  color:var(--control-text);
  background:var(--control-inset-bg);
  box-shadow:var(--control-inset-shadow);
  font:500 14px/1 var(--font-chrome);
}
body[data-page="augment-rank"] .augment-rank-search input:focus{background:var(--surface-elevated);box-shadow:var(--control-inset-shadow-focus)}
body[data-page="augment-rank"] .augment-rank-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px 18px;padding:14px 0 22px}
body[data-page="augment-rank"] .augment-rank-control-group{display:flex;flex-wrap:wrap;gap:3px;padding-right:18px;border-right:1px solid var(--line)}
body[data-page="augment-rank"] .augment-rank-control-group:last-child{padding-right:0;border-right:0}
body[data-page="augment-rank"] .augment-rank-filter,
body[data-page="augment-rank"] .augment-rank-state button{
  min-height:38px;
  padding:0 14px;
  border:0;
  border-radius:5px;
  color:var(--muted);
  background:transparent;
  font:600 13px/1 var(--font-chrome);
  cursor:pointer;
}
body[data-page="augment-rank"] .augment-rank-filter:hover{color:var(--text);background:var(--control-inset-bg-hover)}
body[data-page="augment-rank"] .augment-rank-filter.is-active{color:var(--background);background:var(--text)}
body[data-page="augment-rank"] .augment-rank-read-note{color:var(--muted);font-size:13px;line-height:1.5}
body[data-page="augment-rank"] .augment-rank-state{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  min-height:260px;
  border-block:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
}
body[data-page="augment-rank"] .augment-rank-state button{color:var(--text);background:var(--control-inset-bg);box-shadow:var(--control-inset-shadow)}
body[data-page="augment-rank"] .augment-rank-tier{display:grid;grid-template-columns:92px minmax(0,1fr);border-top:1px solid var(--line)}
body[data-page="augment-rank"] .augment-rank-tier:last-child{border-bottom:1px solid var(--line)}
body[data-page="augment-rank"] .augment-rank-tier-label{display:flex;flex-direction:column;align-items:center;gap:4px;padding:22px 12px;border-right:1px solid var(--line)}
body[data-page="augment-rank"] .augment-rank-tier-label strong{font:700 31px/1 var(--font-metric)}
body[data-page="augment-rank"] .augment-rank-tier-label span{color:var(--muted);font:600 12px/1 var(--font-metric)}
body[data-page="augment-rank"] .augment-rank-tier[data-tier="S"] .augment-rank-tier-label strong{color:var(--gold)}
body[data-page="augment-rank"] .augment-rank-tier[data-tier="A"] .augment-rank-tier-label strong{color:var(--blue)}
body[data-page="augment-rank"] .augment-rank-tier[data-tier="B"] .augment-rank-tier-label strong{color:var(--green)}
body[data-page="augment-rank"] .augment-rank-tier[data-tier="C"] .augment-rank-tier-label strong{color:var(--orange)}
body[data-page="augment-rank"] .augment-rank-tier[data-tier="D"] .augment-rank-tier-label strong{color:var(--red)}
body[data-page="augment-rank"] .augment-rank-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0}
body[data-page="augment-rank"] .augment-rank-card{
  position:relative;
  display:grid;
  grid-template-columns:56px minmax(0,1fr);
  align-items:center;
  gap:10px;
  min-width:0;
  min-height:98px;
  margin:0;
  padding:16px 14px;
  border:0;
  border-right:1px solid var(--line-2);
  border-bottom:1px solid var(--line-2);
  background:transparent;
  transition:background-color 150ms ease;
}
body[data-page="augment-rank"] .augment-rank-card:hover{background:var(--control-inset-bg-hover)}
body[data-page="augment-rank"] .augment-rank-card-icon{width:56px;height:56px;object-fit:contain;border-radius:6px;background:var(--asset-icon-backdrop)}
body[data-page="augment-rank"] .augment-rank-card-copy{min-width:0}
body[data-page="augment-rank"] .augment-rank-card-copy strong{display:block;overflow:hidden;color:var(--text);font-size:15px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}
body[data-page="augment-rank"] .augment-rank-card-copy span{display:block;margin-top:7px;color:var(--muted);font:600 12px/1.2 var(--font-metric)}
body[data-page="augment-rank"] .augment-rank-card-score{position:absolute;right:7px;top:6px;color:var(--muted-2);font:600 10px/1 var(--font-metric)}
@media(max-width:1100px){body[data-page="augment-rank"] .augment-rank-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:860px){body[data-page="augment-rank"] .augment-rank-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){
  body[data-page="augment-rank"] .augment-rank-header{align-items:stretch;flex-direction:column}
  body[data-page="augment-rank"] .augment-rank-search{width:100%}
  body[data-page="augment-rank"] .augment-rank-tier{grid-template-columns:58px minmax(0,1fr)}
  body[data-page="augment-rank"] .augment-rank-tier-label{padding-inline:6px}
  body[data-page="augment-rank"] .augment-rank-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:420px){body[data-page="augment-rank"] .augment-rank-grid{grid-template-columns:minmax(0,1fr)}}

/* ROUND16 roll calculator: shared theme surfaces and inset controls. */
body[data-page="roll-probability"] .maomi-roll-root{
  color:var(--text) !important;
  font-family:var(--font-chrome) !important;
}
body[data-page="roll-probability"] :is(.maomi-roll-title,.maomi-roll-results-title,.maomi-roll-dist-title,.maomi-roll-fact .v,.maomi-roll-bar-x){color:var(--text) !important}
body[data-page="roll-probability"] :is(.maomi-roll-source,.maomi-roll-note,.maomi-roll-fact .k,.maomi-roll-bar-pct,.maomi-roll-cost legend,.maomi-roll-row label){color:var(--muted) !important}
body[data-page="roll-probability"] .maomi-roll-controls{
  background:var(--surface) !important;
  border-color:var(--border) !important;
  box-shadow:none !important;
}
body[data-page="roll-probability"] :is(.maomi-roll-target,.maomi-roll-bar-col){border-color:var(--line) !important}
body[data-page="roll-probability"] .maomi-roll-cost span,
body[data-page="roll-probability"] .maomi-roll-row input[type="number"]{
  color:var(--control-text) !important;
  background:var(--control-inset-bg) !important;
  border-color:transparent !important;
  box-shadow:var(--control-inset-shadow) !important;
}
body[data-page="roll-probability"] .maomi-roll-cost label:hover span{background:var(--control-inset-bg-hover) !important;border-color:transparent !important}
body[data-page="roll-probability"] .maomi-roll-cost input:focus-visible + span,
body[data-page="roll-probability"] .maomi-roll-row input[type="number"]:focus{
  outline:0 !important;
  box-shadow:var(--control-inset-shadow-focus) !important;
}
body[data-page="roll-probability"] .maomi-roll-cost input[data-cost="1"]:checked + span{background:var(--muted) !important;border-color:var(--muted) !important}
body[data-page="roll-probability"] .maomi-roll-cost input[data-cost="2"]:checked + span{background:var(--green) !important;border-color:var(--green) !important}
body[data-page="roll-probability"] .maomi-roll-cost input[data-cost="3"]:checked + span{background:var(--blue) !important;border-color:var(--blue) !important}
body[data-page="roll-probability"] .maomi-roll-cost input[data-cost="4"]:checked + span{background:var(--accent) !important;border-color:var(--accent) !important}
body[data-page="roll-probability"] .maomi-roll-cost input[data-cost="5"]:checked + span{background:var(--gold) !important;border-color:var(--gold) !important}
body[data-page="roll-probability"] .maomi-roll-row input[type="range"]{accent-color:var(--gold) !important}
body[data-page="roll-probability"] :is(.maomi-roll-fact,.maomi-roll-dist-panel){background:var(--surface-elevated) !important;border-color:var(--border) !important}
body[data-page="roll-probability"] .maomi-roll-sum{background:var(--accent-subtle) !important;border-color:color-mix(in srgb,var(--gold) 30%,transparent) !important}
body[data-page="roll-probability"] .maomi-roll-sum .k{color:var(--muted) !important}
body[data-page="roll-probability"] .maomi-roll-sum .v{color:var(--gold) !important}
body[data-page="roll-probability"] .maomi-roll-bar{background:var(--gold) !important}
body[data-page="roll-probability"] .maomi-roll-bar.zero{background:var(--line) !important}

/* ROUND18 updates: warm, low-contrast surfaces without changing patch structure. */
body[data-page="updates"]{background:#191c1f}
body[data-page="updates"] .daily-patch-item{
  background:#2b2e31;
  border-color:rgba(255,255,255,.045);
  border-left-color:var(--daily-patch-rail);
  box-shadow:none;
}
body[data-page="updates"] .daily-patch-change-chip{
  background:rgba(25,28,31,.42);
  border-color:rgba(255,255,255,.045);
}
body[data-page="updates"] .daily-patch-version-row .daily-patch-version-btn{
  background:#202326;
  border-color:rgba(255,255,255,.045);
  box-shadow:none;
}
body[data-page="updates"] .daily-patch-version-row .daily-patch-version-btn:hover{background:#232629}
body[data-page="updates"] .daily-patch-version-row .daily-patch-version-btn.active{
  background:#25282b;
  border-color:rgba(184,233,134,.48);
  box-shadow:inset 0 0 0 1px rgba(184,233,134,.08);
}
:root[data-theme="light"] body[data-page="updates"]{background:#f0ebe0}
:root[data-theme="light"] body[data-page="updates"] .daily-patch-item{
  background:#f9f5eb;
  border-color:rgba(0,0,0,.05);
  border-left-color:var(--daily-patch-rail);
}
:root[data-theme="light"] body[data-page="updates"] .daily-patch-change-chip{
  background:#f3eee4;
  border-color:rgba(0,0,0,.045);
}
:root[data-theme="light"] body[data-page="updates"] .daily-patch-version-row .daily-patch-version-btn{
  background:#f5f0e6;
  border-color:rgba(0,0,0,.05);
  box-shadow:none;
}
:root[data-theme="light"] body[data-page="updates"] .daily-patch-version-row .daily-patch-version-btn:hover{background:#f7f2e8}
:root[data-theme="light"] body[data-page="updates"] .daily-patch-version-row .daily-patch-version-btn.active{
  background:#f7f2e8;
  border-color:#8a6d2f;
  box-shadow:inset 0 0 0 1px rgba(138,109,47,.08);
}

/* ROUND18 basics: one quiet page plane, borderless tables, consistent type scale. */
body[data-page="basics"]{
  --r18-basics-line:rgba(255,255,255,.07);
  --r18-basics-zebra:rgba(255,255,255,.022);
  --r18-basics-hover:rgba(255,255,255,.05);
}
:root[data-theme="light"] body[data-page="basics"]{
  --r18-basics-line:rgba(60,50,20,.1);
  --r18-basics-zebra:rgba(60,50,20,.026);
  --r18-basics-hover:rgba(60,50,20,.055);
  background:#f0ebe0;
}
body[data-page="basics"] .basics-subtabbar .s17-tab{
  font-size:14px;
  font-weight:400;
  letter-spacing:0;
}
body[data-page="basics"] .basics-content{padding-top:26px}
body[data-page="basics"] .s17-library-section{
  gap:12px;
  padding:0 0 28px;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
body[data-page="basics"] .basics-content .s17-library-section + .s17-library-section{
  margin-top:0;
  padding-top:28px;
  border-top:1px solid var(--r18-basics-line) !important;
}
body[data-page="basics"] :is(.s17-library-section-title,.s17-prob-card-title,.basics-stats .s17-library-section-title){
  margin:0;
  padding:0 2px 8px;
  border:0;
  color:var(--text);
  font-size:18px;
  font-weight:600;
  line-height:1.35;
  letter-spacing:0;
  background:transparent;
}
body[data-page="basics"] :is(.basics-stats-intro,.basics-stats-note,.s17-prob-note-block,.basics-role-note,.basics-formula-example){
  color:var(--muted);
  font-size:12px;
  font-weight:400;
  letter-spacing:0;
}
body[data-page="basics"] :is(.s17-prob-two-up,.s17-prob-three-up,.s17-prob-grid,.basics-role-grid){gap:16px !important}
body[data-page="basics"] :is(.s17-prob-card,.s17-prob-note-block){
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
body[data-page="basics"] .s17-prob-note-block{padding:10px 2px}
body[data-page="basics"] .s17-prob-table{
  margin:8px 0 16px !important;
  overflow:visible !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
body[data-page="basics"] .s17-prob-table-row{
  min-height:42px !important;
  border:0 !important;
  background:transparent !important;
  transition:background-color 120ms ease;
}
body[data-page="basics"] .s17-prob-table-row:not(.s17-prob-table-head):nth-child(odd){background:var(--r18-basics-zebra) !important}
body[data-page="basics"] .s17-prob-table-row:not(.s17-prob-table-head):hover{background:var(--r18-basics-hover) !important}
body[data-page="basics"] .s17-prob-table-cell{
  padding:9px 12px !important;
  border:0 !important;
  background:transparent !important;
  color:var(--text) !important;
  font-size:13px !important;
  font-weight:400 !important;
  line-height:1.5 !important;
  letter-spacing:0;
}
body[data-page="basics"] .s17-prob-table-head .s17-prob-table-cell{
  color:var(--text) !important;
  font-size:14px !important;
  font-weight:500 !important;
}
body[data-page="basics"] table.s17-prob-table{
  display:table !important;
  width:100% !important;
  margin:0 !important;
  border-collapse:collapse !important;
  border-spacing:0 !important;
}
body[data-page="basics"] table.s17-prob-table :is(th,td){
  padding:9px 12px;
  border:0 !important;
  background:transparent !important;
  color:var(--text) !important;
  font-size:13px !important;
  font-weight:400 !important;
  line-height:1.5;
  letter-spacing:0;
}
body[data-page="basics"] table.s17-prob-table th{
  font-size:14px !important;
  font-weight:500 !important;
}
body[data-page="basics"] table.s17-prob-table tbody tr:nth-child(even){background:var(--r18-basics-zebra)}
body[data-page="basics"] table.s17-prob-table tbody tr:hover{background:var(--r18-basics-hover)}
body[data-page="basics"] .s17-prob-xp-strip{
  margin:8px 0 18px !important;
  overflow:visible !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
}
body[data-page="basics"] .s17-prob-xp-cell{
  min-height:78px;
  padding:12px 14px;
  border:0 !important;
  background:transparent;
}
body[data-page="basics"] .s17-prob-xp-cell:nth-child(even){background:var(--r18-basics-zebra)}
body[data-page="basics"] .s17-prob-xp-cell:hover{background:var(--r18-basics-hover)}
body[data-page="basics"] .s17-prob-xp-label{font-size:12px;font-weight:400;letter-spacing:0}
body[data-page="basics"] .s17-prob-xp-value{font-size:13px;font-weight:400;letter-spacing:0}
body[data-page="basics"] .s17-prob-augment-matrix{
  margin:8px 0 16px !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
}
body[data-page="basics"] .s17-prob-augment-matrix :is(th,td){
  padding:10px 12px;
  border:0 !important;
  background:transparent !important;
  color:var(--text);
  font-size:13px;
  font-weight:400;
  letter-spacing:0;
}
body[data-page="basics"] .s17-prob-augment-matrix thead th{font-size:14px;font-weight:500}
body[data-page="basics"] .s17-prob-augment-matrix tbody tr:nth-child(even){background:var(--r18-basics-zebra)}
body[data-page="basics"] .s17-prob-augment-matrix tbody tr:hover{background:var(--r18-basics-hover)}
body[data-page="basics"] .s17-prob-augment-tier{
  border:0;
  background:transparent;
  box-shadow:none;
}
body[data-page="basics"] .s17-prob-augment-tier :is(.pct,.label),
body[data-page="basics"] .s17-prob-augment-odds{
  font-size:13px !important;
  font-weight:400 !important;
  letter-spacing:0;
}
body[data-page="basics"] .basics-role-card{
  gap:8px;
  padding:14px 16px;
  border:1px solid var(--r18-basics-line);
  border-radius:6px;
  background:transparent !important;
  box-shadow:none;
}
body[data-page="basics"] .basics-role-name{font-size:13px;font-weight:600;letter-spacing:0}
body[data-page="basics"] .basics-role-abilities{font-size:13px;font-weight:400;letter-spacing:0}
body[data-page="basics"] .basics-role-mana{font-size:12px;letter-spacing:0}
body[data-page="basics"] .basics-loot-rewards .s17-prob-anima-reward{
  gap:8px;
  width:76px;
  min-width:76px;
}
body[data-page="basics"] .basics-loot-rewards .s17-prob-anima-reward-icon{
  width:40px;
  height:40px;
  background:transparent;
}
body[data-page="basics"] .basics-loot-rewards .s17-prob-reward-count-badge{
  right:-2px;
  top:-3px;
  bottom:auto;
  z-index:2;
  padding:2px 4px;
  border:1px solid var(--background);
  border-radius:4px;
  font-size:10px;
  line-height:1.1;
}
body[data-page="basics"] .basics-loot-rewards .s17-prob-anima-reward-label{
  max-width:76px;
  color:var(--muted) !important;
  font-size:12px;
  font-weight:400 !important;
  line-height:1.3;
}
body[data-page="basics"] .basics-loot-text-reward{
  min-height:40px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--muted);
  font-size:12px;
}
@media(max-width:720px){
  body[data-page="basics"] :is(.s17-prob-two-up,.s17-prob-three-up){grid-template-columns:minmax(0,1fr) !important}
  body[data-page="basics"] table.s17-prob-table :is(th,td){padding:8px 5px}
  body[data-page="basics"] table.s17-prob-table :is(th,td):first-child{width:78px}
  body[data-page="basics"] table.s17-prob-table :is(th,td):nth-child(2){width:48px}
  body[data-page="basics"] .basics-loot-rewards{gap:8px 4px}
  body[data-page="basics"] .basics-loot-rewards .s17-prob-anima-reward{
    width:62px;
    min-width:62px;
  }
  body[data-page="basics"] .basics-loot-rewards .s17-prob-anima-reward-label{max-width:62px;font-size:11px}
}

/* ROUND18 day-mode readability pass: defeat the older light-only card fills. */
:root[data-theme="light"] body[data-page="basics"]{
  --r18-basics-line:rgba(68,55,24,.11);
  --r18-basics-zebra:rgba(68,55,24,.026);
  --r18-basics-hover:rgba(68,55,24,.06);
  background:#f0ebe0;
}
:root[data-theme="light"] body[data-page="basics"] :is(.basics-panel,.basics-content,.s17-library-section,.s17-prob-card,.s17-prob-note-block){
  background:transparent !important;
  box-shadow:none !important;
}
:root[data-theme="light"] body[data-page="basics"] .s17-library-section{
  border:0 !important;
}
:root[data-theme="light"] body[data-page="basics"] .basics-content .s17-library-section + .s17-library-section{
  border-top:1px solid var(--r18-basics-line) !important;
}
:root[data-theme="light"] body[data-page="basics"] .basics-subtabbar .s17-tab{
  font-size:15px !important;
  font-weight:600 !important;
  line-height:1.3;
}
:root[data-theme="light"] body[data-page="basics"] :is(.s17-library-section-title,.s17-prob-card-title,.basics-stats .s17-library-section-title){
  color:#332f27 !important;
  font-size:20px !important;
  font-weight:700 !important;
}
:root[data-theme="light"] body[data-page="basics"] :is(.basics-stats-intro,.basics-stats-note,.s17-prob-note-block,.basics-role-note,.basics-formula-example){
  color:#6f685c !important;
  font-size:13px !important;
  font-weight:500 !important;
  line-height:1.6;
}
:root[data-theme="light"] body[data-page="basics"] :is(.s17-prob-table-cell,table.s17-prob-table td,.s17-prob-augment-matrix td){
  color:#35312a !important;
  font-size:14px !important;
  font-weight:500 !important;
  line-height:1.55 !important;
}
:root[data-theme="light"] body[data-page="basics"] :is(.s17-prob-table-head .s17-prob-table-cell,table.s17-prob-table th,.s17-prob-augment-matrix thead th){
  color:#2e2a24 !important;
  font-size:14px !important;
  font-weight:650 !important;
}
:root[data-theme="light"] body[data-page="basics"] .s17-prob-card :is(.s17-table,.s17-prob-table),
:root[data-theme="light"] body[data-page="basics"] .s17-prob-card :is(th,td){
  border:0 !important;
  background:transparent !important;
}
:root[data-theme="light"] body[data-page="basics"] :is(.s17-prob-xp-strip,.s17-prob-table,.s17-prob-augment-matrix){
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
:root[data-theme="light"] body[data-page="basics"] .s17-prob-card tbody tr:nth-child(even) td{
  background:transparent !important;
}
:root[data-theme="light"] body[data-page="basics"] :is(.s17-prob-table-row:not(.s17-prob-table-head):nth-child(odd),table.s17-prob-table tbody tr:nth-child(even),.s17-prob-augment-matrix tbody tr:nth-child(even)){
  background:var(--r18-basics-zebra) !important;
}
:root[data-theme="light"] body[data-page="basics"] :is(.s17-prob-table-row:not(.s17-prob-table-head),table.s17-prob-table tbody tr,.s17-prob-augment-matrix tbody tr):hover{
  background:var(--r18-basics-hover) !important;
}
:root[data-theme="light"] body[data-page="basics"] .s17-prob-xp-cell{
  background:transparent !important;
}
:root[data-theme="light"] body[data-page="basics"] .s17-prob-xp-cell:nth-child(even){
  background:transparent !important;
}
:root[data-theme="light"] body[data-page="basics"] .s17-prob-xp-cell + .s17-prob-xp-cell{
  border-left:1px solid var(--r18-basics-line) !important;
}
:root[data-theme="light"] body[data-page="basics"] .s17-prob-xp-label{font-size:13px !important;font-weight:500 !important}
:root[data-theme="light"] body[data-page="basics"] .s17-prob-xp-value{font-size:14px !important;font-weight:600 !important}
:root[data-theme="light"] body[data-page="basics"] .s17-prob-augment-tier :is(.pct,.label),
:root[data-theme="light"] body[data-page="basics"] .s17-prob-augment-odds{font-size:14px !important;font-weight:500 !important}
:root[data-theme="light"] body[data-page="basics"] .basics-role-card{
  border-color:var(--r18-basics-line) !important;
  background:transparent !important;
}
:root[data-theme="light"] body[data-page="basics"] .basics-role-name{font-size:15px !important;font-weight:700 !important}
:root[data-theme="light"] body[data-page="basics"] .basics-role-abilities{font-size:14px !important;font-weight:500 !important;line-height:1.55}
:root[data-theme="light"] body[data-page="basics"] .basics-role-mana{font-size:13px !important;font-weight:500 !important}
:root[data-theme="light"] body[data-page="basics"] .basics-loot-rewards .s17-prob-anima-reward-label,
:root[data-theme="light"] body[data-page="basics"] .basics-loot-text-reward{
  color:#5f584d !important;
  font-size:13px !important;
  font-weight:500 !important;
}
@media(max-width:720px){
  :root[data-theme="light"] body[data-page="basics"] .basics-subtabbar .s17-tab{font-size:14px !important}
  :root[data-theme="light"] body[data-page="basics"] :is(.s17-library-section-title,.s17-prob-card-title,.basics-stats .s17-library-section-title){font-size:18px !important}
  :root[data-theme="light"] body[data-page="basics"] .basics-loot-rewards .s17-prob-anima-reward-label{font-size:12px !important}
}

/* ROUND18 / S03: recommendation index and detail visual corrections. */
html body[data-page="detail"] .guide-group-title{align-items:center;gap:12px;margin:0 0 12px;padding:0;border-bottom:0}
html body[data-page="detail"] .guide-tier-badge{
  box-sizing:border-box;position:relative;width:34px;height:34px;flex:0 0 34px;margin:0 2px 0 0;display:flex;align-items:center;justify-content:center;
  overflow:hidden;border:1px solid color-mix(in srgb,var(--guide-rating-color) 58%,var(--border));border-radius:8px;transform:none;
  background:linear-gradient(145deg,color-mix(in srgb,var(--guide-rating-color) 22%,var(--surface-elevated)),color-mix(in srgb,var(--guide-rating-color) 7%,var(--surface)));
  color:color-mix(in srgb,var(--guide-rating-color) 84%,white);font-family:Arial,sans-serif;font-size:18px;font-weight:900;line-height:1;
}
html body[data-page="detail"] .guide-tier-badge > span{position:relative;z-index:2;display:block;transform:none;font-size:18px;line-height:1;color:inherit}
html body[data-page="detail"] .guide-tier-badge::before{
  content:"";position:absolute;inset:3px;border:1px solid color-mix(in srgb,var(--guide-rating-color) 24%,transparent);border-radius:5px;pointer-events:none;
}
html body[data-page="detail"] .guide-tier-line{height:1px;flex:1 1 auto;background:linear-gradient(90deg,color-mix(in srgb,var(--guide-rating-color) 40%,var(--border)),color-mix(in srgb,var(--guide-rating-color) 8%,transparent))}
:root[data-theme="light"] body[data-page="detail"] .guide-tier-badge{background:linear-gradient(145deg,color-mix(in srgb,var(--guide-rating-color) 14%,#f8f4ea),color-mix(in srgb,var(--guide-rating-color) 4%,#f8f4ea));color:var(--guide-rating-color)}
/* Keep placed tier-maker labels readable while preserving compact board density. */
html body[data-page="tier-maker"] .tier-maker-token{width:88px}
html body[data-page="tier-maker"] .tier-maker-token-name{
  width:88px;max-width:88px;white-space:normal;overflow:visible;text-overflow:clip;word-break:keep-all;overflow-wrap:anywhere;
  line-height:1.25;min-height:28px;
}
html body[data-page="tier-maker"] .tier-maker-remove-token{
  right:0;top:0;transform:none;display:none;align-items:center;justify-content:center;
  width:16px;height:16px;padding:0;font-family:Arial,sans-serif;font-size:11px;line-height:1;
}
html body[data-page="tier-maker"] .tier-maker-token:hover .tier-maker-remove-token,
html body[data-page="tier-maker"] .tier-maker-token:focus-within .tier-maker-remove-token{display:flex}
html body[data-page="tier-maker"] .tier-maker-edit-hint{
  margin:6px 0 2px;color:var(--text-muted);font-size:11px;line-height:1.4;
}
html body[data-page="detail"] .guide-card::before{display:none!important}
html body[data-page="detail"] .guide-card-title-row{display:flex;align-items:center;gap:8px;min-width:0}
html body[data-page="detail"] .guide-card-name{padding-left:0;border-left:0;color:var(--text)}
html body[data-page="detail"] .guide-card-title-row .guide-card-roll-level{
  flex:0 0 auto;padding:1px 5px;font-size:10.5px;color:var(--text-muted);border-color:color-mix(in srgb,var(--border) 82%,transparent);background:transparent;
}
html body[data-page="detail"] .guide-card-hero{contain:layout paint;background:color-mix(in srgb,var(--surface-elevated) 88%,var(--guide-rating-color))}

/* S18 curated details may have a real off-carry; never discard its items. */
html body[data-page="detail"] .guide-main-col-side .guide-role-row{
  flex-wrap:wrap !important;
}
html body[data-page="detail"] .guide-main-col-side .guide-role[data-guide-role="offCarry"]{
  display:inline-flex !important;
}
html body[data-page="detail"] .guide-main-col-side .guide-role-row{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  gap:12px !important;
}
html body[data-page="detail"] .guide-main-col-side .guide-role{
  width:100% !important;
}

html body[data-page="detail"] .guide-avp-shell{
  position:relative;width:100%;margin:0 0 24px;padding:2px 0;overflow:hidden;border:0;border-radius:0;background:transparent;
}
html body[data-page="detail"] .guide-avp-shell::before,
html body[data-page="detail"] .guide-avp-shell::after{content:"";position:absolute;top:0;bottom:0;z-index:2;width:48px;pointer-events:none}
html body[data-page="detail"] .guide-avp-shell::before{left:0;background:linear-gradient(90deg,var(--surface),transparent)}
html body[data-page="detail"] .guide-avp-shell::after{right:0;background:linear-gradient(270deg,var(--surface),transparent)}
html body[data-page="detail"] .guide-avp-track{display:flex;width:max-content;animation:guide-avp-scroll 42s linear infinite;will-change:transform}
html body[data-page="detail"] .guide-avp-shell:hover .guide-avp-track,
html body[data-page="detail"] .guide-avp-shell.is-paused .guide-avp-track{animation-play-state:paused}
html body[data-page="detail"] .guide-avp-set{display:flex;align-items:center;gap:8px;padding-right:8px}
html body[data-page="detail"] .guide-avp-item{
  min-height:40px;display:flex;align-items:center;gap:9px;padding:3px 7px 3px 6px;border:1px solid color-mix(in srgb,var(--border) 72%,transparent);
  border-radius:999px;background:color-mix(in srgb,var(--surface-elevated) 96%,var(--text) 4%);color:var(--text);text-decoration:none;white-space:nowrap;
}
html body[data-page="detail"] .guide-avp-item:hover{border-color:color-mix(in srgb,var(--accent) 48%,var(--border))}
html body[data-page="detail"] .guide-avp-avatars{display:flex;align-items:center;padding-left:8px}
html body[data-page="detail"] .guide-avp-avatars img{width:30px;height:30px;margin-left:-8px;border:2px solid var(--surface-elevated);border-radius:50%;object-fit:cover}
html body[data-page="detail"] .guide-avp-avatars img:first-child{position:relative;z-index:1}
html body[data-page="detail"] .guide-avp-names{font-size:14px;font-weight:400}
html body[data-page="detail"] .guide-avp-rank{min-width:34px;padding:3px 7px;border-radius:999px;text-align:center;font-size:11px;font-variant-numeric:tabular-nums}
html body[data-page="detail"] .guide-avp-rank.is-strong{color:#286554;background:rgba(76,170,139,.13)}
html body[data-page="detail"] .guide-avp-rank.is-even{color:#85671f;background:rgba(198,159,61,.13)}
html body[data-page="detail"] .guide-avp-rank.is-weak{color:#9b5057;background:rgba(191,91,101,.13)}
@keyframes guide-avp-scroll{to{transform:translateX(-50%)}}

html body[data-page="detail"] .guide-board{
  max-width:620px;padding:18px 14px 24px;border:0;border-radius:0;background:transparent;
}
html body[data-page="detail"] .guide-board-row{position:relative}
html body[data-page="detail"] .guide-board-row:nth-child(2){z-index:4}
html body[data-page="detail"] .guide-board-row:nth-child(3){z-index:3}
html body[data-page="detail"] .guide-board-row:nth-child(4){z-index:2}
html body[data-page="detail"] .guide-board-row:nth-child(5){z-index:1}
html body[data-page="detail"] .guide-board-hex.has-items{z-index:2}
html body[data-page="detail"] .guide-board-hex:has(.guide-board-stars){z-index:3}
html body[data-page="detail"] .guide-board-hex::before{background:#69737c!important;box-shadow:none!important}
html body[data-page="detail"] .guide-board-hex.is-filled::before{background:#9ba3aa!important;box-shadow:none!important}
html body[data-page="detail"] .guide-board-hex::after{
  content:"";position:absolute;inset:3px;z-index:1;pointer-events:none;clip-path:url(#guide-hex-clip);background:var(--background);
}
:root[data-theme="light"] body[data-page="detail"] .guide-board-hex::before{background:#888f8a!important}
:root[data-theme="light"] body[data-page="detail"] .guide-board-hex.is-filled::before{background:#666f69!important}
html body[data-page="detail"] .guide-board-face{
  position:absolute;inset:2px;z-index:2;display:block;padding:3px;box-sizing:border-box;overflow:hidden;clip-path:url(#guide-hex-clip);
  background:var(--guide-board-cost-color,#d3d8df);filter:drop-shadow(0 5px 8px rgba(0,0,0,.34));
}
html body[data-page="detail"] .guide-board-hex[data-cost="1"]{--guide-board-cost-color:#d3d8df}
html body[data-page="detail"] .guide-board-hex[data-cost="2"]{--guide-board-cost-color:#59c86e}
html body[data-page="detail"] .guide-board-hex[data-cost="3"]{--guide-board-cost-color:#3f8cff}
html body[data-page="detail"] .guide-board-hex[data-cost="4"]{--guide-board-cost-color:#c15cff}
html body[data-page="detail"] .guide-board-hex[data-cost="5"],
html body[data-page="detail"] .guide-board-hex[data-cost="6"],
html body[data-page="detail"] .guide-board-hex[data-cost="7"]{--guide-board-cost-color:#f0a23d}
html body[data-page="detail"] .guide-board-avatar{position:relative!important;inset:auto!important;width:100%;height:100%;clip-path:url(#guide-hex-clip);object-fit:cover;transform:none}
@media (min-width:881px){
  html body[data-page="detail"] .guide-board-host{padding-right:0!important}
  html body[data-page="detail"] .guide-board-side{flex:0 0 64px;margin-left:8px;transform:none!important}
}
html body[data-page="detail"] .guide-board-items{bottom:-6px;z-index:8;gap:2px;min-width:max-content}
html body[data-page="detail"] .guide-board-items img{width:18px;height:18px;border-radius:4px;border:1.5px solid rgba(245,245,245,.82);box-shadow:0 2px 5px rgba(0,0,0,.5)}
html body[data-page="detail"] .guide-board-stars{z-index:10!important}
html body[data-page="detail"] .guide-role{--guide-cost-color:#d3d8df}
html body[data-page="detail"] .guide-role[data-cost="2"]{--guide-cost-color:#59c86e}
html body[data-page="detail"] .guide-role[data-cost="3"]{--guide-cost-color:#3f8cff}
html body[data-page="detail"] .guide-role[data-cost="4"]{--guide-cost-color:#c15cff}
html body[data-page="detail"] .guide-role[data-cost="5"]{--guide-cost-color:#f0a23d}
html body[data-page="detail"] .guide-role-avatar{border:2px solid var(--guide-cost-color);box-shadow:0 0 0 1px color-mix(in srgb,var(--guide-cost-color) 24%,transparent)}
html body[data-page="detail"] .guide-tempo-support > .guide-block .guide-hexes{display:flex;align-items:flex-start;justify-content:flex-start;gap:12px}
html body[data-page="detail"] .guide-tempo-support > .guide-block .guide-hex{flex:0 0 auto}
html body[data-page="detail"] .guide-hex-icon{
  width:54px;height:54px;flex:0 0 54px;overflow:hidden;box-sizing:border-box;padding:2px;
  border:1px solid rgba(255,255,255,.16);border-radius:8px;background:#25282b;
  box-shadow:0 2px 7px rgba(0,0,0,.22);
}
html body[data-page="detail"] .guide-hex-icon img{
  width:100%;height:100%;box-sizing:border-box;border:0;border-radius:6px;object-fit:contain;
  filter:saturate(1.12) contrast(1.08);
}
html body[data-page="detail"] [data-s17-augment-tooltip="等待得值"] .guide-hex-icon img{transform:scale(1.22)}
html body[data-page="detail"] .guide-item-recommendations + .guide-block{margin-top:30px;padding-top:22px;border-top:1px solid var(--border)}
html body[data-page="detail"] .guide-artifact-note-label,
html body[data-page="detail"] .guide-no-craft-label{margin-top:20px;padding-top:16px;border-top:1px solid var(--border)}

html body[data-page="detail"] .guide-analytics-query-filters{display:none!important}
html body[data-page="detail"] .guide-analytics-status{color:var(--text-muted);font-size:12px;text-transform:none}
html body[data-page="detail"] .guide-analytics-types label,
html body[data-page="detail"] .guide-analytics-component{font-size:12px}
.guide-analytics-component:disabled,.guide-analytics-type:disabled{opacity:.38;cursor:not-allowed;filter:grayscale(.4)}
.guide-analytics-filter-hint{font-size:11.5px;color:rgba(60,55,40,.62);margin-left:6px;letter-spacing:.01em}
html body[data-page="detail"] .guide-analytics-component span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
html body[data-page="detail"] .guide-analytics-components{padding-top:12px}
html body[data-page="detail"] .guide-analytics-table-head{font-size:13px}
html body[data-page="detail"] .guide-analytics-row{min-height:54px;font-size:13px}
html body[data-page="detail"] .guide-analytics-item{font-size:13px}
html body[data-page="detail"] .guide-analytics-item-icons{gap:3px}
html body[data-page="detail"] .guide-analytics-item-icons img{width:29px;height:29px;margin-left:0!important}
html body[data-page="detail"] .guide-analytics-column-empty.is-triple-empty{padding:18px 14px;color:var(--text-muted);font-size:13px;line-height:1.6;text-align:center}
html body[data-page="detail"] .guide-q-text{
  box-sizing:border-box;width:min(280px,calc(100vw - 32px));min-width:0;max-width:calc(100vw - 32px);
  white-space:normal;overflow-wrap:anywhere;word-break:break-word;
}
:is(#selected-season-switcher,.exa-season-switch,.tool-season-switch,.stats-season-switch,[data-single-season-control]){
  display:none!important;
}
@media (max-width:560px){
  html body[data-page="detail"] .guide-main-col-board{
    width:calc(100vw - 32px);margin-left:calc(50% - 50vw + 16px);
  }
  html body[data-page="detail"] .guide-board{--tb-gap:3px;width:100%;max-width:100%;padding:10px 3px 18px}
  html body[data-page="detail"] .guide-board-row{width:93.333333%}
  html body[data-page="detail"] .guide-board-row.is-offset{transform:translateX(calc(7.142857% + .22px))}
  html body[data-page="detail"] .guide-board-face{inset:1px}
  html body[data-page="detail"] .guide-board-items{bottom:-4px;gap:1px}
  html body[data-page="detail"] .guide-board-items img{width:15px;height:15px}
  html body[data-page="detail"] .guide-avp-shell::before,
  html body[data-page="detail"] .guide-avp-shell::after{width:28px}
}
@media (prefers-reduced-motion:reduce){html body[data-page="detail"] .guide-avp-track{animation:none}}
/* Issue #1023 R3-5: augment-rank hover detail, same info-tooltip source as site-wide hovers */
html body .augment-rank-tooltip{display:flex;flex-direction:column;gap:8px;min-width:0}
html body .augment-rank-tooltip-head{display:flex;align-items:center;gap:10px;min-width:0}
html body .augment-rank-tooltip-head img{width:40px;height:40px;flex:0 0 auto;border-radius:9px;object-fit:cover;background:rgba(127,127,127,.14)}
html body .augment-rank-tooltip-title{display:flex;flex-direction:column;gap:2px;min-width:0}
html body .augment-rank-tooltip-title strong{font-size:15px;line-height:1.3;color:var(--text)}
html body .augment-rank-tooltip-title span{font-size:12px;line-height:1.3;color:var(--muted,rgba(120,128,144,.95))}
html body .augment-rank-tooltip-desc{margin:0;font-size:12.5px;line-height:1.55;color:var(--text);white-space:normal;word-break:break-word}
/* Issue #1023 R3-5b: augment hover readability — larger icon on a light plate, stronger meta contrast */
html body .augment-rank-tooltip-head img{width:52px;height:52px;border-radius:10px;background:linear-gradient(160deg,#dfe5ee,#c6cedb);border:2px solid rgba(15,23,42,.22);box-shadow:0 2px 6px rgba(15,23,42,.18);padding:2px;image-rendering:auto}
html body .augment-rank-tooltip-title strong{font-size:16px}
html body .augment-rank-tooltip-title span{font-size:12.5px;color:var(--text-secondary,rgba(60,66,82,.95));font-weight:600}
html body .augment-rank-tooltip-desc{font-size:13px;line-height:1.6}

/* Issue #1023 R10：检索页规格化（规格一/二/三/四/五——全部沿用主站浅色 token） */
#page-explorer .exa-filter-combine{display:block;width:100%;margin:0 0 10px}
#page-explorer .exa-or-pill{display:flex;width:100%;gap:2px;padding:2px;border-radius:8px;background:rgba(0,0,0,.05)}
#page-explorer .exa-or-pill button{flex:0 0 auto;min-height:30px;height:30px;min-width:42px;padding:0 12px;border:1px solid transparent;border-radius:6px;background:transparent;color:rgba(60,55,40,.72);font-size:var(--exa-body-fs);font-weight:600;cursor:pointer;box-shadow:none;transition:background-color .12s ease,box-shadow .12s ease}
#page-explorer .exa-or-pill button:hover:not(.is-active):not(:disabled){background:rgba(255,255,255,.65)}
#page-explorer .exa-or-pill button.is-active{background:#fff;border-color:#d8d2c4;box-shadow:0 1px 2px rgba(0,0,0,.08);color:#3a3428}
#page-explorer .exa-or-pill button:disabled{opacity:.45;cursor:not-allowed}
#page-explorer .exa-or-caption{display:none}
#page-explorer .exa-row-controls .exa-font-options{display:inline-flex;gap:2px;padding:2px;border-radius:8px;background:rgba(0,0,0,.05);margin-right:10px}
#page-explorer .exa-row-controls .exa-font-options button{min-height:26px;height:26px;min-width:42px;padding:0 10px;border:1px solid transparent;border-radius:6px;background:transparent;color:rgba(60,55,40,.72);font-size:var(--exa-body-fs);font-weight:700;cursor:pointer;box-shadow:none}
#page-explorer .exa-row-controls .exa-font-options button.is-active{background:#fff;border-color:#d8d2c4;box-shadow:0 1px 2px rgba(0,0,0,.08);color:#3a3428}
#page-explorer .exa-control.exa-font-control{display:none}
#page-explorer .exa-summary{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-end}
#page-explorer .exa-summary-item{display:flex;flex-direction:column;gap:2px;text-decoration:none!important;border:0;padding:0;background:transparent}
#page-explorer .exa-summary-item i{font-style:normal;font-size:12px;color:rgba(60,55,40,.6);font-weight:500}
#page-explorer .exa-summary-item b{font-size:17px;font-weight:700;color:#3a3428;font-variant-numeric:tabular-nums}
#page-explorer .exa-summary-item.is-primary b{font-size:18.5px}
#page-explorer .exa-summary .exa-tip-host{text-decoration:none!important;border-bottom:0!important}
#page-explorer .exa-board-cards{display:flex;flex-direction:column;gap:12px}
#page-explorer .exa-board-card{position:relative;display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid #e4ded0;border-radius:12px;padding:16px 16px 16px 19px;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.03)}
#page-explorer .exa-board-card:hover{background:rgba(0,0,0,.025)}
#page-explorer .exa-board-card::before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:2px;background:#d8d2c4}
#page-explorer .exa-board-card.is-win::before{background:#c9a44a}
#page-explorer .exa-board-card.is-top4::before{background:#7d9d6e}
#page-explorer .exa-board-rank{display:flex;flex-direction:column;align-items:center;gap:2px;flex:0 0 auto}
#page-explorer .exa-board-rank i{font-style:normal;font-size:11px;color:rgba(60,55,40,.6)}
#page-explorer .exa-board-rank b{min-width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #d8d2c4;border-radius:8px;font-size:16px;font-weight:700;color:#3a3428;font-variant-numeric:tabular-nums}
#page-explorer .exa-board-body{flex:1;min-width:0}
#page-explorer .exa-board-traits{display:block;font-size:13px;font-weight:500;color:rgba(60,55,40,.75);margin-bottom:8px;letter-spacing:.01em}
#page-explorer .exa-board-units{display:flex;gap:8px;overflow:visible;padding-bottom:2px;scrollbar-width:none;flex-wrap:wrap}
#page-explorer .exa-board-unit{display:flex;flex-direction:column;align-items:center;gap:3px;flex:0 0 auto}
#page-explorer .exa-board-stars{font-size:11px;color:#c9a44a;line-height:1;letter-spacing:1px}
#page-explorer .exa-board-avatar{width:var(--exa-avatar-size);height:var(--exa-avatar-size);border-radius:10px;overflow:hidden;border:2px solid #8d949e;background:rgba(0,0,0,.04);display:block}
#page-explorer .exa-board-avatar.cost-2{border-color:#4f9e5f}
#page-explorer .exa-board-avatar.cost-3{border-color:#4f7ec0}
#page-explorer .exa-board-avatar.cost-4{border-color:#9a6fc0}
#page-explorer .exa-board-avatar.cost-5{border-color:#c9a44a}
#page-explorer .exa-board-avatar .exa-icon{width:100%!important;height:100%!important;object-fit:cover;border-radius:0}
#page-explorer .exa-board-unit-items{display:flex;gap:2px}
#page-explorer .exa-board-unit-items{margin-top:-1px;min-height:var(--exa-sub-item-size);max-width:var(--exa-avatar-size);align-self:flex-start}
#page-explorer .exa-board-unit-items .exa-icon{width:var(--exa-sub-item-size);height:var(--exa-sub-item-size)}
#page-explorer .exa-variant-cell{display:inline-flex;flex-direction:column;gap:5px;max-width:100%}
#page-explorer .exa-variant-traits{font-size:12.5px;font-weight:500;color:rgba(60,55,40,.72);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:560px}
#page-explorer .exa-variant-traits{display:inline-flex;align-items:center;gap:5px}
#page-explorer .exa-board-traits{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
#page-explorer .exa-trait-chip{position:relative;display:inline-flex;align-items:flex-end;gap:1px;line-height:0}
#page-explorer .exa-trait-chip .exa-trait-chip-icon{width:19px;height:19px;object-fit:contain;flex:0 0 auto}
#page-explorer .exa-trait-chip .exa-trait-chip-count{font-size:10px;font-weight:700;line-height:1;color:rgba(60,55,40,.85);transform:translateY(-1px)}
#page-explorer .exa-trait-chip .exa-trait-chip-text{font-size:12px;line-height:1.3}
#page-explorer .exa-variant-units{display:inline-flex;gap:7px;align-items:center;flex-wrap:nowrap}
#page-explorer .exa-variant-unit{display:inline-flex;align-items:flex-start;height:var(--exa-avatar-size,44px);line-height:0}
#page-explorer .exa-variant-unit .exa-unit-icons{width:var(--exa-avatar-size)!important;height:var(--exa-avatar-size)!important;flex:0 0 var(--exa-avatar-size)!important}
#page-explorer .exa-variant-unit .exa-unit-icons>.exa-icon{width:calc(var(--exa-avatar-size) - 2px)!important;height:calc(var(--exa-avatar-size) - 2px)!important;border-radius:9px!important}
#page-explorer .exa-suggest-item{align-items:center;gap:5px;min-height:32px;padding:4px 6px;line-height:1.2}
#page-explorer .exa-suggest-item .exa-unit-icons{width:22px!important;height:22px!important;flex:0 0 22px!important;display:inline-flex;align-items:center;justify-content:center}
#page-explorer .exa-suggest-item .exa-unit-icons>.exa-suggest-icon{width:20px!important;height:20px!important;flex:0 0 20px!important;border-radius:5px!important;line-height:1}
#page-explorer .exa-suggest-name{line-height:22px;align-self:center}
#page-explorer .exa-suggest-type{line-height:22px;align-self:center}
#page-explorer .exa-variant-more{flex:0 0 auto;min-width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:rgba(0,0,0,.05);color:rgba(60,55,40,.6);font-size:12px;font-weight:700}
body[data-page="tier-maker"] .tier-maker-asset[hidden]{display:none!important}
#page-explorer .exa-progressive-note{margin:8px 0 0;padding:4px 8px;color:var(--text-muted,rgba(60,55,40,.58));font-size:11px;line-height:1.3;text-align:center;border-top:1px solid rgba(60,55,40,.08)}

/* Issue #1023 L36：字号档整体缩放检索结果（图标随档缩放，不只文字）。 */
body[data-explorer-font="sm"] #page-explorer{--exa-icon-scale:.9}
body[data-explorer-font="md"] #page-explorer{--exa-icon-scale:1}
body[data-explorer-font="lg"] #page-explorer{--exa-icon-scale:1.22}
body:not([data-explorer-font]) #page-explorer{--exa-icon-scale:1}
#page-explorer .exa-icon{width:var(--exa-main-item-size,32px) !important;height:var(--exa-main-item-size,32px) !important}
#page-explorer .exa-unit-icons{width:var(--exa-avatar-size,44px) !important;height:var(--exa-avatar-size,44px) !important;flex-basis:var(--exa-avatar-size,44px) !important}
#page-explorer .exa-unit-icons>.exa-icon{width:calc(var(--exa-avatar-size,44px) - 2px) !important;height:calc(var(--exa-avatar-size,44px) - 2px) !important}
#page-explorer .exa-icon-sm{width:var(--exa-main-item-size,32px) !important;height:var(--exa-main-item-size,32px) !important}
#page-explorer .exa-icon-xs{width:var(--exa-trait-icon-size,16px) !important;height:var(--exa-trait-icon-size,16px) !important}

/* Issue #1023 V2-C (L54-L56/L58): visual cleanup for the live-composition rail. */
#page-explorer .exa-board-card{
  background:transparent !important;
  border-color:var(--line) !important;
  box-shadow:none !important;
}
#page-explorer .exa-board-card:hover{
  background:color-mix(in srgb,var(--panel) 86%,var(--primary) 14%) !important;
}

/* Keep the rank badge on the same center line as the avatar frame. The label
   remains available above the badge without affecting the row's baseline. */
#page-explorer .exa-board-card{
  align-items:flex-start !important;
}
#page-explorer .exa-board-rank{
  position:relative;
  width:44px !important;
  height:44px !important;
  flex:0 0 44px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin-top:24px !important;
}
#page-explorer .exa-board-rank i{
  position:absolute;
  left:50%;
  top:-15px;
  transform:translateX(-50%);
  white-space:nowrap;
  line-height:1.1;
}
#page-explorer .exa-board-rank b{
  width:44px !important;
  min-width:44px !important;
  height:44px !important;
  line-height:1 !important;
  box-sizing:border-box;
}
#page-explorer .exa-board-card:has(.exa-board-stars) .exa-board-rank{
  margin-top:24px !important;
}
#page-explorer .exa-board-card:has(.exa-board-unit:first-child .exa-board-stars) .exa-board-rank{
  margin-top:36px !important;
}
#page-explorer .exa-board-body{min-width:0}
#page-explorer .exa-board-traits{
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
#page-explorer .exa-board-units{
  align-items:flex-start !important;
  gap:8px !important;
  row-gap:4px !important;
}
#page-explorer .exa-board-unit{
  width:var(--exa-avatar-size,44px) !important;
  min-width:var(--exa-avatar-size,44px) !important;
  height:calc(12px + var(--exa-avatar-size,44px) + var(--exa-sub-item-size,14px) + 4px) !important;
  display:grid !important;
  grid-template-rows:12px var(--exa-avatar-size,44px) var(--exa-sub-item-size,14px) !important;
  gap:2px !important;
  align-items:center !important;
}
#page-explorer .exa-board-stars{grid-row:1;min-height:12px;line-height:12px;align-self:center}
#page-explorer .exa-board-avatar{grid-row:2;align-self:center}
#page-explorer .exa-board-unit-items{
  width:var(--exa-avatar-size,44px) !important;
  min-width:0 !important;
  max-width:var(--exa-avatar-size,44px) !important;
  gap:.5px !important;
  margin-top:0 !important;
  grid-row:3;
  align-items:center !important;
  justify-content:flex-start !important;
}
#page-explorer .exa-board-unit-items .exa-icon,
#page-explorer .exa-board-unit-items .exa-icon-xs{
  width:var(--exa-sub-item-size,14px) !important;
  height:var(--exa-sub-item-size,14px) !important;
  flex:0 0 var(--exa-sub-item-size,14px) !important;
  object-fit:cover;
}

/* L56: compact, light-weight 和/或 control with a readable line box. */
#page-explorer .exa-filter-combine{width:max-content !important;max-width:100%;}
#page-explorer .exa-or-pill{
  width:max-content !important;
  max-width:100%;
  min-height:34px;
  display:inline-flex !important;
  align-items:center !important;
  gap:2px !important;
  padding:2px !important;
  background:color-mix(in srgb,var(--panel) 90%,var(--line) 10%) !important;
  border:1px solid var(--line) !important;
  border-radius:8px !important;
  box-sizing:border-box;
}
#page-explorer .exa-or-pill button{
  min-width:40px !important;
  height:28px !important;
  min-height:28px !important;
  padding:4px 10px !important;
  line-height:1.25 !important;
  border:1px solid transparent !important;
  border-radius:6px !important;
  background:transparent !important;
  color:var(--muted) !important;
  box-shadow:none !important;
  overflow:visible !important;
}
#page-explorer .exa-or-pill button.is-active{
  background:color-mix(in srgb,var(--panel) 86%,var(--primary) 14%) !important;
  border-color:var(--primary-border,var(--line)) !important;
  color:var(--text) !important;
  box-shadow:none !important;
}
#page-explorer .exa-or-pill button:hover:not(.is-active):not(:disabled){
  background:color-mix(in srgb,var(--panel) 92%,var(--primary) 8%) !important;
}

/* L58: shrink condition avatars/chips to roughly three quarters of the
   medium explorer scale, including the filled controls in the sidebar. */
#page-explorer .exa-chips-row{min-height:36px;height:auto !important;align-items:center !important}
#page-explorer .exa-chip{
  min-height:36px !important;
  height:36px !important;
  padding:2px 5px !important;
  gap:4px !important;
}
#page-explorer .exa-chip .exa-unit-icons,
#page-explorer .exa-slot-main .exa-unit-icons{
  width:34px !important;
  height:34px !important;
  flex:0 0 34px !important;
}
#page-explorer .exa-chip .exa-unit-icons > .exa-icon,
#page-explorer .exa-slot-main .exa-unit-icons > .exa-icon{
  width:32px !important;
  height:32px !important;
}
#page-explorer .exa-chip-label,
#page-explorer .exa-slot-name{
  font-size:12px !important;
  line-height:1.2 !important;
}
#page-explorer .exa-slot-main{min-height:34px !important;height:34px !important}
#page-explorer .exa-slot.is-filled{padding-top:4px !important;padding-bottom:4px !important}
body[data-page="overview"] #overview-comp-rail .s18-trait-icon{
  -webkit-mask:var(--s18-trait-icon) center/contain no-repeat;
  mask:var(--s18-trait-icon) center/contain no-repeat;
}

html body[data-page="overview"] #tooltip{
  z-index:7100;
}

html body .rail-early[data-early-flip-bound="1"] > .rail-early-pop{
  display:none !important;
}

html body > #overview-early-tooltip{
  position:fixed;
  display:block;
  inset:auto;
  z-index:7000;
  width:320px;
  max-width:calc(100vw - 20px);
  max-height:calc(100vh - 20px);
  box-sizing:border-box;
  overflow:auto;
  overscroll-behavior:contain;
  overflow-wrap:anywhere;
}
