/* ============================================================
   神人棋牌 · 共享外壳样式 /assets/site.css
   框架式段位导航 + 棋盘格网 + 编辑版式基础规则
   ============================================================ */

:root{
  --ink:#071A14;
  --ink-2:#0E2A22;
  --moss:#2F4A3C;
  --jade:#4C8C7A;
  --jade-soft:#9BC4B3;
  --gold:#C9A45C;
  --gold-soft:#E7D3A2;
  --amber:#D98B2B;
  --cinnabar:#B5482E;
  --paper:#F4EFE3;
  --paper-lift:#FBF8F0;
  --stone:#6E746F;
  --clay:#B9846A;

  --rail-w:274px;
  --bar-h:68px;
  --gutter:clamp(16px,4vw,56px);
  --content-max:1220px;

  --radius-lg:22px;
  --radius-md:14px;
  --radius-sm:8px;
  --shadow-card:0 20px 44px -30px rgba(7,26,20,.55);

  --font-display:"Songti SC","Noto Serif SC","Source Han Serif SC","STSong","SimSun",serif;
  --font-body:"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",system-ui,-apple-system,sans-serif;
  --font-mono:"IBM Plex Mono","JetBrains Mono","SFMono-Regular",ui-monospace,"Courier New",monospace;

  --ease:cubic-bezier(.22,.7,.28,1);
  --dur:.5s;
}

/* ---------- Reset ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  margin:0;
  font-family:var(--font-body);
  font-size:clamp(15px,1.02vw,17px);
  line-height:1.75;
  color:var(--ink);
  background-color:var(--paper);
  background-image:
    radial-gradient(circle at 86% -12%,rgba(201,164,92,.18),transparent 52%),
    radial-gradient(circle at -6% 104%,rgba(76,140,122,.14),transparent 46%);
  -webkit-font-smoothing:antialiased;
}
img,svg,video{max-width:100%;display:block}
a{color:inherit}
button{font:inherit}
ul,ol{margin:0;padding:0;list-style:none}
h1,h2,h3,h4,p,figure,blockquote{margin:0}
table{border-collapse:collapse}

/* ---------- 中文排版 ---------- */
h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:900;
  line-height:1.16;
  letter-spacing:.012em;
  color:var(--ink-2);
  text-wrap:balance;
}
h1{font-size:clamp(38px,6.2vw,96px)}
h2{font-size:clamp(28px,3.6vw,46px)}
h3{font-size:clamp(20px,2vw,27px)}
h4{font-size:clamp(17px,1.5vw,20px)}
p{max-width:74ch}
small{font-size:13px}
.data-num{
  font-family:var(--font-mono);
  font-feature-settings:"tnum" 1,"lnum" 1;
  letter-spacing:.02em;
}
.kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-mono);
  font-size:12px;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--stone);
}
.kicker::before{
  content:"";
  width:26px;
  height:2px;
  background:linear-gradient(90deg,var(--jade),var(--gold));
  border-radius:2px;
}
.tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.1em;
  border:1px solid rgba(14,42,34,.18);
  color:var(--ink-2);
  background:rgba(255,255,255,.45);
}
.tag--gold{border-color:rgba(201,164,92,.6);color:#6F5019;background:rgba(201,164,92,.16)}
.tag--cinnabar{border-color:rgba(181,72,46,.45);color:var(--cinnabar);background:rgba(181,72,46,.09)}

/* ---------- 焦点 ---------- */
:focus-visible{
  outline:3px solid var(--amber);
  outline-offset:3px;
  border-radius:4px;
}

/* ---------- 布局工具 ---------- */
.container{
  width:min(100% - 2 * var(--gutter),var(--content-max));
  margin-inline:auto;
}
.layout-grid{
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:clamp(16px,2.4vw,34px);
}
.col-4{grid-column:span 4}
.col-5{grid-column:span 5}
.col-6{grid-column:span 6}
.col-7{grid-column:span 7}
.col-8{grid-column:span 8}
.col-12{grid-column:span 12}
.checker-field{
  background-image:
    repeating-linear-gradient(0deg,rgba(7,26,20,.06) 0 1px,transparent 1px 40px),
    repeating-linear-gradient(90deg,rgba(7,26,20,.06) 0 1px,transparent 1px 40px);
}
.surface{
  background:var(--paper-lift);
  border:1px solid rgba(14,42,34,.1);
  border-radius:var(--radius-lg);
  padding:clamp(18px,2.4vw,32px);
  box-shadow:var(--shadow-card);
}
.prose{max-width:70ch}
.prose > * + *{margin-top:1em}
.prose h2{margin-top:1.7em}
.prose h3{margin-top:1.5em}
.prose ul,.prose ol{list-style:revert;padding-left:1.35em}
.prose li + li{margin-top:.4em}
.prose a{color:#1F6B57;text-underline-offset:3px}
.prose strong{color:var(--ink-2)}

/* ---------- 按钮 ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 20px;
  border-radius:999px;
  border:1px solid transparent;
  font-family:var(--font-body);
  font-weight:600;
  font-size:14px;
  letter-spacing:.02em;
  line-height:1.2;
  text-decoration:none;
  white-space:nowrap;
  cursor:pointer;
  transition:transform .2s var(--ease),background .2s var(--ease),color .2s var(--ease),border-color .2s var(--ease);
}
.btn--sm{padding:8px 15px;font-size:13px}
.btn--gold{
  background:linear-gradient(135deg,var(--gold),#B68C3E);
  color:#071A14;
  border-color:rgba(231,211,162,.7);
  box-shadow:0 14px 26px -20px rgba(201,164,92,.95);
}
.btn--gold:hover{transform:translateY(-1px);background:linear-gradient(135deg,#D9B772,var(--gold))}
.btn--ghost{
  background:transparent;
  color:var(--gold-soft);
  border-color:rgba(201,164,92,.45);
}
.btn--ghost:hover{background:rgba(201,164,92,.14);color:var(--paper)}
.btn--cinnabar{
  background:var(--cinnabar);
  color:var(--paper);
  border-color:rgba(244,239,227,.35);
}
.btn--cinnabar:hover{background:#A03E27}
.btn--quiet{
  background:rgba(14,42,34,.06);
  color:var(--ink-2);
  border-color:rgba(14,42,34,.18);
}
.btn--quiet:hover{background:rgba(14,42,34,.12)}

/* ---------- 面包屑 ---------- */
.breadcrumb{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  font-family:var(--font-mono);
  font-size:12px;
  letter-spacing:.06em;
  color:var(--stone);
}
.breadcrumb a{text-decoration:none;color:var(--stone)}
.breadcrumb a:hover{color:var(--ink-2)}
.breadcrumb li{display:inline-flex;align-items:center}
.breadcrumb li::after{content:"/";margin-left:8px;color:rgba(110,116,111,.45)}
.breadcrumb li:last-child::after{content:""}

/* ---------- 图片容器 ---------- */
.figure-frame{
  position:relative;
  display:block;
  overflow:hidden;
  aspect-ratio:var(--figure-ratio,4 / 3);
  border-radius:var(--radius-lg);
  background:linear-gradient(150deg,var(--moss),var(--ink) 78%);
  box-shadow:var(--shadow-card);
}
.figure-frame > img,
.figure-frame > picture > img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.figure-frame::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  box-shadow:inset 0 0 0 1px rgba(201,164,92,.38);
  pointer-events:none;
}
.figure-frame--wide{--figure-ratio:21 / 9}
.figure-frame--tall{--figure-ratio:3 / 4}
.figure-frame--slant{clip-path:polygon(0 0,100% 4%,100% 100%,0 96%)}
.figure-frame__caption{
  display:block;
  margin-top:10px;
  font-family:var(--font-mono);
  font-size:12px;
  letter-spacing:.08em;
  color:var(--stone);
}

/* ---------- 跳转链接 ---------- */
.skip-link{
  position:fixed;
  left:14px;
  top:-90px;
  z-index:200;
  padding:10px 18px;
  border-radius:0 0 12px 12px;
  background:var(--gold);
  color:#071A14;
  font-weight:700;
  text-decoration:none;
  transition:top .2s var(--ease);
}
.skip-link:focus{top:0}

/* ---------- 头部：品牌条 ---------- */
.site-header{position:relative;z-index:60}
.brandbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:var(--bar-h);
  z-index:70;
  background:linear-gradient(180deg,#0E2A22,#071A14);
  border-bottom:1px solid rgba(201,164,92,.3);
  color:var(--paper);
}
.brandbar__inner{
  height:100%;
  display:flex;
  align-items:center;
  gap:clamp(12px,2vw,28px);
  padding-inline:clamp(14px,3vw,32px);
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:var(--paper);
}
.brand__mark{
  width:36px;
  height:36px;
  display:grid;
  grid-template-columns:1fr 1fr;
  grid-template-rows:1fr 1fr;
  gap:3px;
  flex:0 0 auto;
}
.brand__mark i{border-radius:3px;display:block}
.brand__mark i:nth-child(1){background:var(--jade)}
.brand__mark i:nth-child(2){background:var(--gold)}
.brand__mark i:nth-child(3){background:var(--amber)}
.brand__mark i:nth-child(4){background:var(--cinnabar)}
.brand__text{display:flex;flex-direction:column;line-height:1.15}
.brand__name{
  font-family:var(--font-display);
  font-weight:900;
  font-size:20px;
  letter-spacing:.1em;
}
.brand__line{
  margin-top:2px;
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.26em;
  color:rgba(231,211,162,.72);
}
.brandbar__meta{display:flex;align-items:center;margin:0}
.version-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:5px 12px;
  border-radius:999px;
  border:1px solid rgba(201,164,92,.5);
  background:rgba(201,164,92,.1);
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.12em;
  color:var(--gold-soft);
  white-space:nowrap;
}
.version-badge__dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--jade-soft);
  box-shadow:0 0 0 3px rgba(155,196,179,.2);
}
.brandbar__actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
}

/* 移动导航按钮 */
.nav-toggle{
  display:none;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid rgba(201,164,92,.45);
  background:rgba(201,164,92,.1);
  color:var(--gold-soft);
  font-family:var(--font-mono);
  font-size:12px;
  letter-spacing:.1em;
  cursor:pointer;
}
.nav-toggle:hover{background:rgba(201,164,92,.18)}
.nav-toggle__bars{display:grid;gap:3px;width:16px}
.nav-toggle__bars span{
  display:block;
  height:2px;
  border-radius:2px;
  background:currentColor;
  transition:transform .22s var(--ease),opacity .22s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1){transform:translateY(5px) rotate(45deg)}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2){opacity:0}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3){transform:translateY(-5px) rotate(-45deg)}

/* 阅读进度 */
.scroll-meter{
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:2px;
  overflow:hidden;
  background:rgba(201,164,92,.16);
}
.scroll-meter__fill{
  display:block;
  height:100%;
  width:100%;
  transform:scaleX(0);
  transform-origin:0 50%;
  background:linear-gradient(90deg,var(--jade),var(--gold) 62%,var(--amber));
  transition:transform .18s linear;
}

/* ---------- 头部：段位阶梯导航 ---------- */
.rail{
  position:fixed;
  top:var(--bar-h);
  left:0;
  bottom:0;
  width:var(--rail-w);
  z-index:65;
  overflow-y:auto;
  overscroll-behavior:contain;
  background-color:#0B231C;
  background-image:
    repeating-linear-gradient(0deg,rgba(201,164,92,.055) 0 1px,transparent 1px 44px),
    repeating-linear-gradient(90deg,rgba(201,164,92,.055) 0 1px,transparent 1px 44px);
  border-right:1px solid rgba(201,164,92,.24);
}
.rail__inner{
  display:flex;
  flex-direction:column;
  gap:18px;
  min-height:100%;
  padding:26px 18px 28px;
}
.rail__label{
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.26em;
  text-transform:uppercase;
  color:rgba(231,211,162,.58);
}
.rail__list{display:flex;flex-direction:column;gap:2px}
.rail__item:nth-child(1){--step-color:#4C8C7A}
.rail__item:nth-child(2){--step-color:#6B9E8C}
.rail__item:nth-child(3){--step-color:#8FB08A}
.rail__item:nth-child(4){--step-color:#B9AE76}
.rail__item:nth-child(5){--step-color:#D3A961}
.rail__item:nth-child(6){--step-color:#C9A45C}
.rail__link{
  display:grid;
  grid-template-columns:26px 1fr auto;
  align-items:center;
  gap:10px;
  padding:11px 12px;
  border-radius:9px;
  border:1px solid transparent;
  color:rgba(244,239,227,.8);
  font-size:15px;
  text-decoration:none;
  transition:background .22s var(--ease),color .22s var(--ease),border-color .22s var(--ease);
}
.rail__link:hover{background:rgba(201,164,92,.1);color:var(--paper)}
.rail__index{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.06em;
  color:rgba(201,164,92,.62);
}
.rail__name{letter-spacing:.03em}
.rail__tick{
  width:7px;
  height:7px;
  border-radius:2px;
  background:var(--step-color,var(--jade));
  opacity:.9;
  transition:width .22s var(--ease),background .22s var(--ease);
}
.rail__link[aria-current="page"]{
  background:linear-gradient(90deg,rgba(201,164,92,.94),rgba(217,139,43,.86));
  border-color:rgba(231,211,162,.75);
  color:#071A14;
  font-weight:600;
  box-shadow:0 12px 24px -18px #000;
}
.rail__link[aria-current="page"] .rail__index{color:rgba(7,26,20,.66)}
.rail__link[aria-current="page"] .rail__tick{width:20px;background:#071A14}
.rail__foot{
  margin-top:auto;
  padding-top:18px;
  border-top:1px dashed rgba(201,164,92,.26);
}
.rail__note{
  font-size:12px;
  line-height:1.7;
  color:rgba(244,239,227,.55);
}
.rail__cta{
  display:flex;
  width:100%;
  margin-top:14px;
}
.rail-scrim{display:none}

/* ---------- 回到顶部 ---------- */
.to-top{
  position:fixed;
  right:clamp(12px,3vw,28px);
  bottom:clamp(14px,3vw,28px);
  z-index:80;
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:14px;
  border:1px solid rgba(201,164,92,.5);
  background:#0E2A22;
  color:var(--gold-soft);
  font-family:var(--font-mono);
  font-size:16px;
  cursor:pointer;
  box-shadow:0 18px 32px -24px #000;
  transition:transform .2s var(--ease),background .2s var(--ease);
}
.to-top:hover{background:var(--moss);transform:translateY(-2px)}
.to-top[hidden]{display:none}

/* ---------- 页面主体偏移 ---------- */
#main-content{
  padding-top:var(--bar-h);
  min-height:60vh;
}

/* ---------- 页脚 ---------- */
.site-footer{
  position:relative;
  overflow:hidden;
  color:rgba(244,239,227,.78);
  background:linear-gradient(180deg,#071A14,#0B231C 68%,#071A14);
  border-top:1px solid rgba(201,164,92,.4);
}
.site-footer::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background-image:
    repeating-linear-gradient(0deg,rgba(201,164,92,.07) 0 1px,transparent 1px 46px),
    repeating-linear-gradient(90deg,rgba(201,164,92,.07) 0 1px,transparent 1px 46px);
  -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,.95),transparent 72%);
  mask-image:linear-gradient(180deg,rgba(0,0,0,.95),transparent 72%);
}
.site-footer::after{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:3px;
  background:linear-gradient(90deg,var(--jade),var(--gold) 55%,var(--amber));
}
.footer__inner{
  position:relative;
  z-index:1;
  width:min(100% - 2 * var(--gutter),var(--content-max));
  margin-inline:auto;
  padding:clamp(44px,5.5vw,80px) 0 28px;
}
.footer__grid{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(0,.85fr) minmax(0,.85fr) minmax(0,1.2fr);
  gap:clamp(24px,3vw,48px);
}
.footer__brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:var(--paper);
}
.footer__seal{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:10px;
  font-family:var(--font-display);
  font-weight:900;
  font-size:22px;
  color:#1A0A06;
  background:radial-gradient(circle at 30% 24%,#D9634A,var(--cinnabar) 72%);
  box-shadow:inset 0 0 0 1px rgba(231,211,162,.6),0 12px 22px -16px #000;
  flex:0 0 auto;
}
.footer__brandtext{
  display:flex;
  flex-direction:column;
  font-family:var(--font-display);
  font-weight:900;
  font-size:22px;
  letter-spacing:.1em;
  line-height:1.2;
}
.footer__brandtext em{
  margin-top:4px;
  font-style:normal;
  font-family:var(--font-mono);
  font-size:10px;
  font-weight:400;
  letter-spacing:.26em;
  color:rgba(231,211,162,.72);
}
.footer__summary{
  margin-top:16px;
  max-width:38ch;
  font-size:14px;
  line-height:1.8;
  color:rgba(244,239,227,.7);
}
.footer__meta{
  margin-top:16px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.08em;
  color:rgba(231,211,162,.62);
}
.footer__title{
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:500;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:rgba(231,211,162,.76);
  margin-bottom:14px;
}
.footer__list li + li{margin-top:10px}
.footer__link{
  display:inline-block;
  font-size:14px;
  color:rgba(244,239,227,.74);
  text-decoration:none;
  transition:color .2s var(--ease),transform .2s var(--ease);
}
.footer__link:hover{color:var(--gold);transform:translateX(4px)}
.footer__contact{
  display:flex;
  gap:10px;
  margin-bottom:8px;
  font-size:13px;
  line-height:1.7;
}
.footer__label{
  flex:0 0 auto;
  min-width:34px;
  padding-top:3px;
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.16em;
  color:rgba(201,164,92,.82);
}
.footer__value{color:rgba(244,239,227,.88);word-break:break-word}
.footer__note{
  margin-top:10px;
  padding-left:11px;
  border-left:2px solid rgba(181,72,46,.7);
  font-size:12px;
  line-height:1.75;
  color:rgba(244,239,227,.5);
}
.footer__address{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:clamp(28px,3vw,44px);
  padding-top:20px;
  border-top:1px dashed rgba(201,164,92,.25);
  font-size:13px;
  color:rgba(244,239,227,.66);
}
.footer__bottom{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:14px 24px;
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid rgba(201,164,92,.18);
  font-family:var(--font-mono);
  font-size:12px;
  letter-spacing:.05em;
  color:rgba(244,239,227,.55);
}
.footer__copy{margin:0;margin-right:auto}
.footer__legal{display:flex;flex-wrap:wrap;gap:18px}
.footer__legal a{color:inherit;text-decoration:none;transition:color .2s var(--ease)}
.footer__legal a:hover{color:var(--gold)}
.footer__icp{margin:0;color:rgba(201,164,92,.72)}

/* ---------- 滚动显现 ---------- */
.reveal{
  transition:opacity .55s var(--ease),transform .55s var(--ease);
  transition-delay:var(--reveal-delay,0ms);
}
.has-reveal .reveal{opacity:0;transform:translateY(20px)}
.has-reveal .reveal[data-visible="true"]{opacity:1;transform:none}
@media (scripting: none){
  .has-reveal .reveal{opacity:1;transform:none}
}

/* ---------- 平板与移动 ---------- */
@media (max-width:1023px){
  .rail{
    width:min(332px,88vw);
    transform:translateX(-104%);
    visibility:hidden;
    box-shadow:34px 0 80px -55px #000;
    transition:transform .34s var(--ease),visibility .34s var(--ease);
  }
  .rail[data-open="true"]{transform:none;visibility:visible}
  .nav-toggle{display:inline-flex}
  .rail-scrim{
    display:block;
    position:fixed;
    inset:var(--bar-h) 0 0;
    z-index:64;
    background:rgba(7,26,20,.62);
    opacity:0;
    visibility:hidden;
    transition:opacity .3s var(--ease),visibility .3s var(--ease);
  }
  .is-nav-open .rail-scrim{opacity:1;visibility:visible}
  .is-nav-open{overflow:hidden}
}
@media (max-width:860px){
  .brandbar__meta{display:none}
  .footer__grid{grid-template-columns:1fr 1fr}
  .footer__brandcol{grid-column:1 / -1}
}
@media (max-width:640px){
  :root{--bar-h:62px}
  .brand__line{display:none}
  .brand__name{font-size:18px}
  .brandbar__actions .btn--ghost{display:none}
  .nav-toggle__label{display:none}
  .rail{width:min(300px,92vw)}
  .footer__grid{grid-template-columns:1fr}
  .footer__bottom{flex-direction:column;align-items:flex-start;gap:12px}
  .footer__copy{margin-right:0}
  .figure-frame--tall{--figure-ratio:4 / 5}
}
@media (min-width:1024px){
  #main-content{margin-left:var(--rail-w)}
  .site-footer{margin-left:var(--rail-w)}
}

/* ---------- 降低动态 ---------- */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
  .has-reveal .reveal{opacity:1 !important;transform:none !important}
  .to-top:hover,.btn:hover,.footer__link:hover{transform:none}
}
