/* Site theme tokens — defaults = current 黑黄站 */
:root{
  --c-accent:#fff000;
  --c-accent-ink:#3d3d3d;
  --c-accent-soft:rgba(255,240,0,.12);
  --c-accent-mid:rgba(255,240,0,.55);
  --c-bg:#222222;
  --c-surface:#34373e;
  --c-surface-2:#2a2d33;
  --c-text:#ffffff;
  --c-text-muted:#999999;
  --c-ink:#3d3d3d;
  --c-border:#292c32;
  --c-footer:#000000;
  --c-header-scrolled:#ffffff;
}

/* ========== Theme palette panel ========== */
.theme-palette{
  position:fixed;
  right:90px;
  bottom:111px;
  z-index:120;
  width:340px;
  max-width:calc(100vw - 24px);
  max-height:calc(100vh - 140px);
  overflow-y:auto;
  padding:22px 20px 18px;
  border-radius:14px;
  background:#1a1c21;
  box-shadow:0 12px 40px rgba(0,0,0,.45);
  color:#e8e8e8;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(12px) scale(.98);
  transition:opacity .28s ease,transform .28s ease,visibility .28s;
}
.theme-palette.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0) scale(1);
}
.theme-palette__head{
  margin-bottom:18px;
}
.theme-palette__title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  line-height:1.3;
}
.theme-palette__title:before{
  content:'';
  width:18px;
  height:18px;
  flex-shrink:0;
  border-radius:4px;
  background:linear-gradient(135deg,var(--c-accent),#fff 160%);
  box-shadow:0 0 0 1px rgba(255,255,255,.15);
}
.theme-palette__desc{
  margin-top:6px;
  font-size:12px;
  color:#9a9da5;
  line-height:1.5;
}
.theme-palette__row{
  margin-bottom:16px;
}
.theme-palette__label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:13px;
  color:#c5c7ce;
  margin-bottom:10px;
}
.theme-palette__accent-bar{
  display:flex;
  align-items:center;
  gap:10px;
}
.theme-palette__swatch-wrap{
  position:relative;
  width:44px;
  height:44px;
  flex-shrink:0;
  border-radius:10px;
  overflow:hidden;
  border:2px solid rgba(255,255,255,.35);
  box-shadow:0 0 0 1px rgba(0,0,0,.35);
  cursor:pointer;
}
.theme-palette__swatch-wrap input[type=color]{
  position:absolute;
  inset:-8px;
  width:calc(100% + 16px);
  height:calc(100% + 16px);
  padding:0;
  border:0;
  cursor:pointer;
  opacity:0;
}
.theme-palette__swatch-preview{
  display:block;
  width:100%;
  height:100%;
  background:var(--c-accent);
  pointer-events:none;
}
.theme-palette__hex{
  flex:1;
  height:44px;
  padding:0 14px;
  border-radius:10px;
  border:1px solid #363941;
  background:#12141a;
  color:#fff;
  font-size:14px;
  font-family:Consolas,Monaco,monospace;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.theme-palette__hex:focus{
  border-color:var(--c-accent);
  outline:0;
}
.theme-palette__wheel{
  display:grid;
  grid-template-columns:repeat(8,1fr);
  gap:8px;
  margin-top:4px;
}
.theme-palette__chip{
  position:relative;
  width:100%;
  aspect-ratio:1;
  border-radius:8px;
  border:2px solid transparent;
  cursor:pointer;
  padding:0;
  background-clip:padding-box;
  transition:transform .15s ease,box-shadow .15s ease;
}
.theme-palette__chip:hover{
  transform:scale(1.08);
  z-index:1;
}
.theme-palette__chip.is-active{
  border-color:#fff;
  box-shadow:0 0 0 1px rgba(0,0,0,.4),0 4px 10px rgba(0,0,0,.35);
}
.theme-palette__chip.is-active:after{
  content:'';
  position:absolute;
  inset:0;
  margin:auto;
  width:10px;
  height:6px;
  border-left:2px solid #fff;
  border-bottom:2px solid #fff;
  transform:rotate(-45deg) translateY(-1px);
  filter:drop-shadow(0 0 1px rgba(0,0,0,.8));
}
.theme-palette__chip.is-active.is-light:after{
  border-color:#222;
  filter:none;
}
.theme-palette__presets{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.theme-palette__preset{
  flex:1 1 calc(50% - 8px);
  min-width:0;
  height:34px;
  padding:0 10px;
  border-radius:8px;
  border:1px solid #363941;
  background:#12141a;
  color:#cfd1d7;
  font-size:12px;
  cursor:pointer;
  transition:border-color .2s,background .2s,color .2s;
}
.theme-palette__preset:hover,
.theme-palette__preset.is-active{
  border-color:var(--c-accent);
  color:#fff;
  background:#1e2128;
}
.theme-palette__actions{
  display:flex;
  gap:10px;
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid #2c3038;
}
.theme-palette__btn{
  flex:1;
  height:42px;
  border-radius:10px;
  border:1px solid #3a3e48;
  background:#252830;
  color:#e8e8e8;
  font-size:13px;
  cursor:pointer;
  transition:background .2s,border-color .2s,color .2s;
}
.theme-palette__btn:hover{
  border-color:#5a5e68;
  background:#2e323c;
}
.theme-palette__btn--accent{
  border-color:transparent;
  background:var(--c-accent);
  color:var(--c-accent-ink);
}
.theme-palette__btn--accent:hover{
  filter:brightness(1.05);
  border-color:transparent;
  background:var(--c-accent);
}
.rightFastMain .item.theme.is-active{
  box-shadow:0 0 0 2px #fff,0 4px 10px 0 rgba(0,0,0,.3);
}

@media (max-width:768px){
  .theme-palette{
    right:12px;
    left:12px;
    bottom:80px;
    width:auto;
  }
  .theme-palette__wheel{
    grid-template-columns:repeat(8,1fr);
    gap:6px;
  }
}
