/* =========================================================
   麻将胡了游戏 · 全站共享样式表 /assets/site.css
   翡翠绿 × 象牙白 × 鎏金朱红 · 粗边框 · 硬阴影 · 牌桌气质
   ========================================================= */

/* ---------- 1. 设计令牌 ---------- */
:root{
  --jade:#0E7A5F;
  --ink-jade:#0B2B23;
  --ivory:#F6F1E3;
  --cream:#EFE6D2;
  --gold:#C9A227;
  --gold-bright:#E8C86A;
  --vermillion:#C0392B;
  --brown:#231A14;
  --sage:#6E8B80;
  --tile:#FFFFFF;

  --line:3px;
  --shadow-hard:6px 6px 0 var(--ink-jade);
  --shadow-gold:6px 6px 0 rgba(201,162,39,.5);
  --shadow-pill:5px 5px 0 rgba(11,43,35,.85);

  --radius-pill:999px;
  --radius-card:14px;
  --radius-tile:10px;

  --font-display:"Songti SC","Source Han Serif SC","Noto Serif SC",Georgia,"Times New Roman",serif;
  --font-body:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,"Courier New",monospace;

  --wrap:1240px;
  --gutter:clamp(20px,4vw,40px);
  --ease:cubic-bezier(.22,.61,.36,1);
}

/* ---------- 2. 重置与基础 ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
}
body,h1,h2,h3,h4,h5,p,figure,blockquote,dl,dd{ margin:0; }
ul,ol{ margin:0; padding:0; list-style:none; }
a{ color:inherit; }
img,svg{ display:block; max-width:100%; height:auto; }
button{ font:inherit; color:inherit; background:none; border:none; }
main{ display:block; }

body{
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.75;
  color:var(--brown);
  background-color:var(--ivory);
  background-image:
    radial-gradient(circle at 14% 2%, rgba(14,122,95,.09), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(201,162,39,.13), transparent 38%);
  background-repeat:no-repeat;
  min-height:100vh;
  text-rendering:optimizeLegibility;
}

::selection{ background:var(--jade); color:var(--tile); }

h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:800;
  letter-spacing:.02em;
  line-height:1.25;
  color:var(--ink-jade);
}
h1{ font-size:clamp(32px,5vw,56px); }
h2{ font-size:clamp(24px,3.2vw,32px); }
h3{ font-size:clamp(19px,2.2vw,22px); }
h4{ font-size:17px; }

:focus-visible{
  outline:3px solid var(--jade);
  outline-offset:3px;
  border-radius:4px;
}
.tile-card--dark :focus-visible,
.section--dark :focus-visible,
.site-footer :focus-visible{ outline-color:var(--gold-bright); }

/* ---------- 3. 布局容器 ---------- */
.container{
  width:100%;
  max-width:var(--wrap);
  margin-inline:auto;
  padding-inline:var(--gutter);
}
.section{ padding-block:clamp(40px,7vw,88px); }
.section--cream{ background:var(--cream); border-block:var(--line) solid rgba(11,43,35,.14); }
.section--dark{
  background:var(--ink-jade);
  color:var(--ivory);
  border-block:var(--line) solid var(--jade);
}
.section--dark h2,.section--dark h3,.section--dark h4{ color:var(--ivory); }
.section--dark .eyebrow{ color:var(--gold-bright); }
.section--dark .note,.section--dark .lede{ color:rgba(246,241,227,.82); }

.section-head{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:clamp(24px,4vw,40px);
  max-width:70ch;
}
.eyebrow{
  font-family:var(--font-mono);
  font-size:12.5px;
  letter-spacing:.22em;
  color:var(--jade);
  text-transform:uppercase;
}
.section-title{ font-family:var(--font-display); }
.lede{ font-size:17px; line-height:1.85; max-width:60ch; }
.measure{ max-width:66ch; }
.note{ font-size:14px; color:var(--sage); line-height:1.7; }
.mono{ font-family:var(--font-mono); font-variant-numeric:tabular-nums; letter-spacing:.02em; }

.prose{ max-width:66ch; }
.prose p + p{ margin-top:1em; }
.prose ul{ margin-top:.6em; }
.prose li{ position:relative; padding-left:20px; }
.prose li + li{ margin-top:.4em; }
.prose li::before{
  content:"";
  position:absolute;
  left:0; top:.72em;
  width:9px; height:9px;
  background:var(--gold);
  border:2px solid var(--ink-jade);
  border-radius:2px;
}

.divider-tile{
  height:6px;
  border-radius:999px;
  background:repeating-linear-gradient(90deg,var(--jade) 0 22px,var(--gold) 22px 44px);
  opacity:.9;
}

/* ---------- 4. 网格 ---------- */
.grid{ display:grid; gap:clamp(20px,3vw,32px); }
.grid-2{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid-4{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.split-7-5{ grid-template-columns:7fr 5fr; }

@media (max-width:900px){
  .grid-2,.grid-3,.grid-4,.split-7-5{ grid-template-columns:1fr; }
}

/* ---------- 5. 牌形卡片与数据块 ---------- */
.tile-card{
  background:var(--tile);
  border:var(--line) solid var(--ink-jade);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-hard);
  padding:clamp(20px,3vw,32px);
}
.tile-card--cream{ background:var(--cream); }
.tile-card--dark{
  background:var(--ink-jade);
  color:var(--ivory);
  border-color:var(--gold);
  box-shadow:var(--shadow-gold);
}
.tile-card--dark h3,.tile-card--dark h4{ color:var(--ivory); }
.tile-card--tilt{ transform:rotate(-1.1deg); }

.stat{ display:flex; flex-direction:column; gap:4px; }
.stat-value{
  font-family:var(--font-mono);
  font-variant-numeric:tabular-nums;
  font-weight:700;
  font-size:clamp(22px,3vw,30px);
  line-height:1.2;
  color:var(--jade);
}
.tile-card--dark .stat-value,.section--dark .stat-value{ color:var(--gold-bright); }
.stat-label{ font-size:14px; color:var(--sage); }
.tile-card--dark .stat-label,.section--dark .stat-label{ color:rgba(246,241,227,.75); }

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:var(--font-mono);
  font-size:12.5px;
  letter-spacing:.08em;
  padding:4px 12px;
  border-radius:var(--radius-pill);
  border:2px solid var(--ink-jade);
  background:var(--cream);
  color:var(--ink-jade);
  white-space:nowrap;
}
.badge--new{ background:var(--vermillion); color:var(--ivory); }
.badge--gold{ background:var(--gold); color:var(--ink-jade); }

.text-link{
  color:var(--jade);
  font-weight:600;
  text-decoration:underline;
  text-decoration-color:var(--gold);
  text-decoration-thickness:2px;
  text-underline-offset:4px;
}
.text-link:hover{ color:var(--ink-jade); text-decoration-color:var(--jade); }

/* ---------- 6. 按钮 ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 18px;
  font-family:var(--font-body);
  font-size:14.5px;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  text-decoration:none;
  border:var(--line) solid var(--ink-jade);
  border-radius:var(--radius-pill);
  cursor:pointer;
  transition:transform .18s var(--ease),box-shadow .18s var(--ease),background-color .18s var(--ease),color .18s var(--ease);
}
.btn-solid{ background:var(--vermillion); color:var(--ivory); box-shadow:3px 3px 0 var(--ink-jade); }
.btn-ghost{ background:var(--tile); color:var(--ink-jade); box-shadow:3px 3px 0 var(--gold); }
.btn-gold{ background:var(--gold); color:var(--ink-jade); box-shadow:3px 3px 0 var(--ink-jade); }
.btn-jade{ background:var(--jade); color:var(--ivory); box-shadow:3px 3px 0 var(--ink-jade); }
.btn:hover{ transform:translate(-1px,-1px); box-shadow:5px 5px 0 var(--ink-jade); }
.btn-ghost:hover{ box-shadow:5px 5px 0 var(--gold); }
.btn:active{ transform:translate(1px,1px); box-shadow:2px 2px 0 var(--ink-jade); }

/* ---------- 7. 面包屑 ---------- */
.breadcrumb{ font-size:14px; color:var(--sage); }
.breadcrumb ol{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.breadcrumb li{ display:flex; align-items:center; gap:6px; }
.breadcrumb li::after{ content:"／"; color:var(--gold); }
.breadcrumb li:last-child::after{ content:""; }
.breadcrumb a{ color:var(--jade); text-decoration:none; }
.breadcrumb a:hover{ text-decoration:underline; text-decoration-color:var(--gold); }
.breadcrumb [aria-current="page"]{ color:var(--brown); font-weight:600; }

/* ---------- 8. 图片容器基础规则 ---------- */
.figure{ margin:0; }
.img-frame{
  position:relative;
  display:block;
  overflow:hidden;
  background:var(--tile);
  border:var(--line) solid var(--ink-jade);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-hard);
}
.img-frame > img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
.img-frame--tilt{ transform:rotate(-1.4deg); }
.img-frame--dark{ background:var(--ink-jade); border-color:var(--gold); box-shadow:var(--shadow-gold); }
.img-frame--empty{
  background-color:var(--cream);
  background-image:repeating-linear-gradient(135deg,var(--cream) 0 16px,var(--ivory) 16px 32px);
}
.ratio-16-9{ aspect-ratio:16/9; }
.ratio-4-3{ aspect-ratio:4/3; }
.ratio-3-4{ aspect-ratio:3/4; }
.ratio-1-1{ aspect-ratio:1/1; }
.img-frame__caption{
  display:block;
  padding:10px 4px 0;
  font-size:14px;
  color:var(--sage);
}

/* ---------- 9. 跳过链接 ---------- */
.skip-link{
  position:absolute;
  top:-120px;
  left:16px;
  z-index:200;
  padding:12px 22px;
  font-size:15px;
  font-weight:600;
  text-decoration:none;
  background:var(--ink-jade);
  color:var(--ivory);
  border:var(--line) solid var(--gold);
  border-radius:var(--radius-pill);
  transition:top .2s var(--ease);
}
.skip-link:focus{ top:16px; }

/* ---------- 10. 悬浮胶囊页头 ---------- */
.site-header{
  position:sticky;
  top:0;
  z-index:80;
  padding:12px var(--gutter) 18px;
  background:linear-gradient(to bottom,var(--ivory) 0%,var(--ivory) 72%,rgba(246,241,227,0) 100%);
  transition:padding .25s var(--ease);
}
.site-header[data-condensed]{ padding-top:6px; padding-bottom:12px; }

.header-shell{
  position:relative;
  max-width:var(--wrap);
  margin-inline:auto;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:clamp(12px,1.6vw,22px);
  padding:10px 16px 10px 18px;
  background:var(--tile);
  border:var(--line) solid var(--ink-jade);
  border-radius:var(--radius-pill);
  box-shadow:var(--shadow-pill);
  transition:padding .25s var(--ease),box-shadow .25s var(--ease);
}
.site-header[data-condensed] .header-shell{
  padding:6px 12px 6px 14px;
  box-shadow:3px 3px 0 rgba(11,43,35,.85);
}

/* 品牌 */
.brand-mark{
  display:inline-flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  min-width:0;
}
.brand-tile{
  flex:none;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  font-family:var(--font-display);
  font-weight:800;
  font-size:20px;
  line-height:1;
  color:var(--ivory);
  background:var(--jade);
  border:var(--line) solid var(--ink-jade);
  border-radius:var(--radius-tile);
  box-shadow:3px 3px 0 var(--gold);
}
.brand-text{ display:flex; flex-direction:column; min-width:0; }
.brand-name{
  font-family:var(--font-display);
  font-weight:800;
  font-size:19px;
  letter-spacing:.06em;
  line-height:1.2;
  color:var(--ink-jade);
  white-space:nowrap;
}
.brand-tagline{
  font-size:12.5px;
  letter-spacing:.06em;
  line-height:1.4;
  color:var(--sage);
  white-space:nowrap;
}
.site-header[data-condensed] .brand-tagline{ display:none; }

/* 导航 */
.site-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(6px,1.2vw,18px);
  min-width:0;
}
.nav-list{ display:flex; align-items:center; gap:2px; }
.nav-list a{
  display:block;
  padding:8px 12px;
  font-size:14.5px;
  font-weight:500;
  line-height:1.3;
  white-space:nowrap;
  text-decoration:none;
  color:var(--ink-jade);
  border:2px solid transparent;
  border-radius:var(--radius-pill);
  transition:background-color .18s var(--ease),color .18s var(--ease),border-color .18s var(--ease);
}
.nav-list a:hover{ background:var(--cream); border-color:var(--ink-jade); }
.nav-list a[aria-current="page"]{
  background:var(--jade);
  color:var(--tile);
  border-color:var(--ink-jade);
  box-shadow:2px 2px 0 var(--gold);
}
.nav-actions{ display:flex; align-items:center; gap:8px; }
.nav-actions .btn{ font-size:13.5px; padding:9px 14px; }

/* 移动端菜单按钮 */
.nav-toggle{
  display:none;
  align-items:center;
  gap:10px;
  padding:9px 14px;
  font-size:14px;
  font-weight:600;
  color:var(--ink-jade);
  background:var(--cream);
  border:var(--line) solid var(--ink-jade);
  border-radius:var(--radius-pill);
  cursor:pointer;
}
.nav-toggle-bars{
  width:20px;
  height:2px;
  background:currentColor;
  box-shadow:0 -6px 0 currentColor,0 6px 0 currentColor;
  transition:transform .2s var(--ease);
}
.site-header[data-open] .nav-toggle-bars{ transform:rotate(45deg); box-shadow:0 0 0 currentColor; }

/* 滚动进度条 */
.header-progress{
  position:absolute;
  left:26px;
  bottom:-9px;
  height:4px;
  width:0;
  background:linear-gradient(90deg,var(--gold),var(--gold-bright));
  border-radius:var(--radius-pill);
  transition:width .15s linear;
}

/* ---------- 11. 页脚 ---------- */
.site-footer{
  margin-top:clamp(56px,9vw,110px);
  background-color:var(--ink-jade);
  background-image:
    radial-gradient(circle at 84% 6%, rgba(14,122,95,.55), transparent 55%),
    radial-gradient(circle at 4% 92%, rgba(201,162,39,.18), transparent 50%);
  background-repeat:no-repeat;
  color:var(--ivory);
  border-top:6px solid var(--gold);
}
.footer-inner{
  max-width:var(--wrap);
  margin-inline:auto;
  padding:clamp(44px,6vw,72px) var(--gutter) clamp(24px,3vw,36px);
  display:grid;
  grid-template-columns:1.3fr 2fr 1.4fr;
  gap:clamp(28px,4vw,52px);
  align-items:start;
}
.site-footer .brand-name{ color:var(--ivory); }
.site-footer .brand-tagline{ color:rgba(246,241,227,.66); }
.site-footer .brand-tile{ box-shadow:3px 3px 0 var(--gold-bright); }

.footer-closing{
  margin-top:20px;
  font-family:var(--font-display);
  font-weight:800;
  font-size:clamp(18px,2.2vw,22px);
  line-height:1.5;
  color:var(--gold-bright);
}
.footer-note{
  margin-top:10px;
  max-width:34ch;
  font-size:14px;
  line-height:1.75;
  color:rgba(246,241,227,.72);
}

.footer-nav{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(20px,3vw,34px);
}
.footer-col-title{
  margin-bottom:14px;
  font-family:var(--font-display);
  font-size:15px;
  font-weight:800;
  letter-spacing:.16em;
  color:var(--gold);
}
.footer-col li + li{ margin-top:2px; }
.footer-col a{
  display:inline-block;
  padding:5px 0;
  font-size:15px;
  text-decoration:none;
  color:rgba(246,241,227,.88);
  border-bottom:2px solid transparent;
  transition:color .18s var(--ease),border-color .18s var(--ease);
}
.footer-col a:hover,
.footer-col a:focus-visible{ color:var(--gold-bright); border-bottom-color:var(--gold-bright); }

.contact-list li{
  display:grid;
  gap:3px;
  padding:9px 0;
  border-bottom:1px dashed rgba(246,241,227,.18);
}
.contact-list li:last-child{ border-bottom:none; }
.contact-label{
  font-size:13px;
  letter-spacing:.14em;
  color:var(--gold);
}
.contact-value{
  font-size:14.5px;
  line-height:1.65;
  color:rgba(246,241,227,.9);
  word-break:break-word;
}

.footer-legal{
  max-width:var(--wrap);
  margin-inline:auto;
  padding:18px var(--gutter) clamp(28px,4vw,44px);
  border-top:1px solid rgba(246,241,227,.2);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px 28px;
  font-size:14px;
  color:rgba(246,241,227,.7);
}
.footer-copy{ margin:0; }
.footer-legal-links{ display:flex; flex-wrap:wrap; gap:20px; }
.footer-legal-links a{
  text-decoration:none;
  border-bottom:2px solid transparent;
  transition:color .18s var(--ease),border-color .18s var(--ease);
}
.footer-legal-links a:hover,
.footer-legal-links a:focus-visible{ color:var(--gold-bright); border-bottom-color:var(--gold-bright); }
.footer-icp{ letter-spacing:.06em; margin:0; }

/* ---------- 12. 显现动效 ---------- */
[data-reveal]{ transition:opacity .55s var(--ease),transform .55s var(--ease); }
html.has-reveal [data-reveal]{ opacity:0; transform:translateY(16px); }
html.has-reveal [data-reveal].is-visible{ opacity:1; transform:none; }

/* ---------- 13. 响应式：平板 ---------- */
@media (max-width:1080px){
  .site-header{ padding:10px 18px 16px; }
  .header-shell{
    grid-template-columns:1fr auto;
    padding:10px 12px 10px 16px;
  }
  .nav-toggle{ display:inline-flex; }
  .site-nav{
    position:absolute;
    top:calc(100% + 12px);
    left:0;
    right:0;
    z-index:5;
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:12px;
    padding:16px;
    background:var(--tile);
    border:var(--line) solid var(--ink-jade);
    border-radius:22px;
    box-shadow:6px 6px 0 var(--ink-jade);
  }
  .site-header[data-open] .site-nav{ display:flex; }
  .nav-list{ flex-direction:column; align-items:stretch; gap:2px; }
  .nav-list a{ padding:12px 14px; font-size:16px; border-radius:14px; }
  .nav-actions{ flex-direction:column; gap:8px; }
  .nav-actions .btn{ width:100%; justify-content:center; font-size:15px; padding:11px 16px; }
  .header-progress{ left:18px; bottom:-7px; }

  .footer-inner{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .footer-brand{ grid-column:1 / -1; }
  .footer-nav{ grid-column:1 / -1; }
}

/* ---------- 14. 响应式：手机 ---------- */
@media (max-width:680px){
  body{ font-size:15.5px; line-height:1.72; }
  .brand-tile{ width:34px; height:34px; font-size:18px; }
  .brand-name{ font-size:17px; }
  .nav-toggle-text{ display:none; }
  .nav-toggle{ padding:10px 12px; }
  .site-footer{ border-top-width:5px; }
  .footer-inner{ grid-template-columns:1fr; padding-top:44px; }
  .footer-nav{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .footer-legal{ justify-content:flex-start; gap:10px 20px; }
  .tile-card--tilt,.img-frame--tilt{ transform:none; }
}

@media (max-width:420px){
  .brand-tagline{ display:none; }
}

/* ---------- 15. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
  html.has-reveal [data-reveal]{ opacity:1 !important; transform:none !important; }
  .btn:hover{ transform:none; }
  .header-progress{ transition:none; }
}
