/* ==========================================================================
   游戏工坊 · 主题样式
   主色、圆角由 header.php 注入的 CSS 变量控制
   ========================================================================== */

:root{
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #16181D;
  --muted: #6E7480;
  --line: #E9EBF0;
  --primary-2: #6D6AF0;
  --accent: #E8894A;
  --success: #12A06A;

  --shadow-sm: 0 1px 2px rgba(20,24,40,.04), 0 4px 12px rgba(20,24,40,.05);
  --shadow-md: 0 12px 32px rgba(30,34,70,.10);
  --shadow-lg: 0 28px 70px rgba(28,32,66,.18);
  --max: 1240px;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",Roboto,Helvetica,Arial,sans-serif;
  font-size:15px; line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
img{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; border:0; background:none; cursor:pointer; }
input,textarea,select{ font:inherit; color:inherit; }
::selection{ background:color-mix(in srgb,var(--primary) 20%,transparent); }
:focus-visible{ outline:2px solid var(--primary); outline-offset:3px; border-radius:8px; }

.gw-wrap{ width:100%; max-width:var(--max); margin:0 auto; padding:0 22px; }
.gw-dot{ color:var(--line); margin:0 6px; }
.gw-muted{ color:var(--muted); }

/* ============================ 顶部 ============================ */
.gw-head{
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb,var(--surface) 86%,transparent);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--line);
  transition:box-shadow .2s ease;
}
.gw-head.stuck{ box-shadow:0 1px 3px rgba(20,24,40,.05), 0 8px 24px -12px rgba(20,24,40,.10); }
.gw-head-in{ height:64px; display:flex; align-items:center; gap:18px; }

.gw-brand{ display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.gw-brand-mark{
  width:34px; height:34px; border-radius:10px; display:grid; place-items:center;
  background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; flex:0 0 auto;
  box-shadow:0 4px 12px color-mix(in srgb,var(--primary) 30%,transparent);
}
.gw-brand-txt{ font-size:16.5px; font-weight:800; letter-spacing:-.01em; line-height:1.15; }
.gw-brand-txt small{ display:block; font-size:11px; font-weight:500; color:var(--muted); letter-spacing:.05em; margin-top:2px; }

.gw-nav{ display:flex; align-items:center; gap:2px; flex:0 0 auto; overflow-x:auto; scrollbar-width:none; }
.gw-nav::-webkit-scrollbar{ display:none; }
.gw-nav a{
  font-size:13.5px; color:var(--muted); padding:7px 11px; border-radius:8px; white-space:nowrap;
  transition:color .16s ease, background .16s ease;
}
.gw-nav a:hover{ color:var(--ink); background:color-mix(in srgb,var(--ink) 4.5%,transparent); }
.gw-nav a.on{ color:var(--primary); font-weight:600; background:color-mix(in srgb,var(--primary) 9%,transparent); }

.gw-search{
  display:flex; align-items:center; gap:9px; height:38px; padding:0 13px; border-radius:10px;
  background:color-mix(in srgb,var(--ink) 4%,var(--surface));
  border:1px solid transparent; transition:.2s ease;
  flex:1 1 200px; max-width:340px; margin-left:auto;
  color:var(--muted);
}
.gw-search:focus-within{
  background:var(--surface);
  border-color:color-mix(in srgb,var(--primary) 42%,var(--line));
  box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 10%,transparent);
}
.gw-search input{
  flex:1; min-width:0; border:0; background:none; outline:none; font-size:13.5px; color:var(--ink);
}
.gw-search input::placeholder{ color:var(--muted); }

/* ============================ 按钮 ============================ */
.gw-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  height:40px; padding:0 18px; border-radius:10px;
  font-size:14px; font-weight:600; white-space:nowrap;
  transition:transform .14s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.gw-btn.sm{ height:34px; padding:0 14px; font-size:13px; border-radius:9px; }
.gw-btn-primary{
  background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff;
  box-shadow:0 6px 18px -6px color-mix(in srgb,var(--primary) 60%,transparent);
}
.gw-btn-primary:hover{ transform:translateY(-1px); box-shadow:0 10px 24px -8px color-mix(in srgb,var(--primary) 70%,transparent); }
.gw-btn-primary:active{ transform:translateY(0); }
.gw-btn-primary:disabled{ opacity:.6; cursor:default; transform:none; box-shadow:none; }
.gw-btn-ghost{
  background:var(--surface); color:var(--ink);
  border:1px solid var(--line); box-shadow:var(--shadow-sm);
}
.gw-btn-ghost:hover{ border-color:color-mix(in srgb,var(--primary) 34%,var(--line)); color:var(--primary); }

/* ============================ 首页 Hero ============================ */
.gw-hero-band{
  background:
    radial-gradient(1100px 420px at 78% -10%, color-mix(in srgb,var(--primary) 14%,transparent), transparent 62%),
    linear-gradient(180deg, var(--surface), var(--bg) 82%);
  border-bottom:1px solid var(--line);
  overflow:hidden;
}
.gw-hero-band-in{
  display:flex; align-items:center; gap:28px;
  padding-top:52px; padding-bottom:48px; position:relative;
}
.gw-hero-copy{ flex:1 1 auto; max-width:640px; position:relative; z-index:2; }
.gw-kicker{
  display:inline-flex; align-items:center; gap:8px;
  font-size:12.5px; font-weight:600; letter-spacing:.04em; color:var(--primary);
  background:color-mix(in srgb,var(--primary) 9%,transparent);
  border:1px solid color-mix(in srgb,var(--primary) 16%,transparent);
  padding:5px 12px; border-radius:999px;
}
.gw-kicker i{ width:6px; height:6px; border-radius:50%; background:var(--primary); animation:gwPulse 2.4s ease-in-out infinite; }
@keyframes gwPulse{ 0%,100%{opacity:1; transform:scale(1)} 50%{opacity:.35; transform:scale(.8)} }

.gw-hero-copy h1{
  margin:16px 0 0; font-size:clamp(28px,4.4vw,46px); line-height:1.16; letter-spacing:-.025em; font-weight:800;
}
.gw-hero-copy h1 em{
  font-style:normal;
  background:linear-gradient(115deg,var(--primary),var(--primary-2) 60%,var(--accent));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.gw-hero-copy p{ margin:16px 0 0; color:var(--muted); font-size:15px; max-width:520px; }

.gw-hero-mini{ display:flex; align-items:center; gap:26px; margin-top:24px; font-size:13px; color:var(--muted); flex-wrap:wrap; }
.gw-hero-mini b{ display:block; font-size:20px; color:var(--ink); font-weight:800; letter-spacing:-.02em; line-height:1.2; }

.gw-hero-glow{ position:absolute; right:-40px; top:-30px; width:420px; height:420px; pointer-events:none; }
.gw-hero-glow i{
  position:absolute; border-radius:50%; filter:blur(6px); opacity:.5;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
}
.gw-hero-glow i:nth-child(1){ width:180px; height:180px; right:80px; top:40px; animation:gwFloat 9s ease-in-out infinite; opacity:.28; }
.gw-hero-glow i:nth-child(2){ width:110px; height:110px; right:220px; top:180px; animation:gwFloat 7s ease-in-out infinite reverse; opacity:.22; }
.gw-hero-glow i:nth-child(3){ width:64px; height:64px; right:40px; top:250px; background:linear-gradient(135deg,var(--accent),var(--primary)); animation:gwFloat 6s ease-in-out infinite; opacity:.3; }
@keyframes gwFloat{ 0%,100%{ transform:translateY(0) } 50%{ transform:translateY(-18px) } }

/* ============================ 工具条 ============================ */
.gw-toolbar{ margin:30px 0 16px; }
.gw-toolbar-top{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.gw-toolbar h2{ margin:0; font-size:20px; font-weight:800; letter-spacing:-.015em; }
.gw-toolbar-sub{ color:var(--muted); font-size:13px; margin-top:4px; }
.gw-toolbar-right{ display:flex; align-items:center; gap:10px; }
.gw-visually-hidden{
  position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* 分类页标题区 */
.gw-sorthead{ padding-top:26px; }
.gw-sorthead h1{ margin:0; font-size:24px; font-weight:800; letter-spacing:-.02em; }
.gw-sorthead p{ margin:8px 0 0; color:var(--muted); font-size:13.5px; max-width:640px; }

.gw-listfoot{ text-align:center; margin:6px 0 40px; }

/* ============================ 游戏网格 ============================ */
.gw-grid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(178px,1fr)); gap:16px;
}
.gw-card{
  display:block; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); overflow:hidden;
  box-shadow:var(--shadow-sm);
  transition:transform .18s ease, box-shadow .22s ease, border-color .18s ease;
  animation:gwIn .34s ease both;
}
@keyframes gwIn{ from{ opacity:0; transform:translateY(8px) } to{ opacity:1; transform:none } }
.gw-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-md); border-color:color-mix(in srgb,var(--primary) 22%,var(--line)); }

.gw-card-thumb{ display:block; position:relative; aspect-ratio:1/1; background:color-mix(in srgb,var(--ink) 4%,var(--surface)); overflow:hidden; }
.gw-card-thumb img{ width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.gw-card:hover .gw-card-thumb img{ transform:scale(1.05); }
.gw-card-tag{
  position:absolute; left:8px; top:8px; z-index:2;
  font-size:11px; font-weight:600; color:#fff;
  background:color-mix(in srgb,#16181D 62%,transparent);
  backdrop-filter:blur(6px); padding:2px 8px; border-radius:6px;
}
.gw-card-play{
  position:absolute; right:8px; bottom:8px; z-index:2;
  width:26px; height:26px; border-radius:50%; display:grid; place-items:center;
  background:color-mix(in srgb,var(--surface) 92%,transparent); color:var(--primary);
  box-shadow:0 2px 8px rgba(16,20,40,.16);
  opacity:0; transform:scale(.8); transition:.2s ease;
}
.gw-card:hover .gw-card-play{ opacity:1; transform:scale(1); }

.gw-card-body{ display:block; padding:11px 12px 13px; }
.gw-card-name{
  display:block; font-size:13.5px; font-weight:650; line-height:1.45;
  overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  min-height:39px;
}
.gw-card-meta{ display:flex; align-items:center; margin-top:7px; font-size:11.5px; color:var(--muted); white-space:nowrap; overflow:hidden; }
.gw-card-meta .gw-dot{ margin:0 4px; }

.gw-grid-mini{ grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.gw-grid-mini .gw-card-name{ font-size:12.5px; min-height:36px; }

/* ============================ 空状态 / 分页 ============================ */
.gw-empty{ text-align:center; padding:64px 20px; color:var(--muted); }
.gw-empty-ico{ display:inline-grid; place-items:center; width:64px; height:64px; border-radius:18px; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-sm); margin-bottom:16px; color:var(--primary); }
.gw-empty h3{ margin:0 0 6px; color:var(--ink); font-size:16px; }
.gw-empty p{ margin:0 0 20px; font-size:13.5px; }
.gw-empty-404{ padding-top:110px; }

.gw-more{ text-align:center; margin:34px 0 44px; }
.gw-more .gw-btn{ min-width:150px; }
.gw-more .gw-btn.loading{ color:var(--muted); pointer-events:none; }

/* ============================ 文章面包屑 ============================ */
.gw-article-wrap{ padding-top:18px; padding-bottom:44px; }
.gw-crumb{
  display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--muted);
  flex-wrap:nowrap; overflow:hidden; white-space:nowrap;
}
.gw-crumb a{ color:var(--muted); transition:color .16s; flex:0 0 auto; }
.gw-crumb a:hover{ color:var(--primary); }
.gw-crumb > span[aria-hidden]{ flex:0 0 auto; opacity:.6; }
.gw-crumb-cur{
  color:var(--ink); font-weight:600; min-width:0;
  overflow:hidden; text-overflow:ellipsis;
}

/* ============================ 文章布局 ============================ */
.gw-article{ display:flex; gap:24px; align-items:flex-start; margin-top:16px; }
.gw-article-main{ flex:1 1 auto; min-width:0; width:100%; }
.gw-article-side{ flex:0 0 300px; max-width:300px; position:sticky; top:84px; display:flex; flex-direction:column; gap:14px; }

/* 正文里的所有块级元素都不允许撑破容器 */
.gw-post{ min-width:0; max-width:100%; }
.gw-prose{ min-width:0; max-width:100%; overflow-wrap:break-word; word-break:break-word; }
.gw-prose pre, .gw-prose table{ max-width:100%; }
.gw-prose img{ max-width:100%; height:auto; }
.gw-prose iframe, .gw-prose video{ max-width:100%; }

.gw-post{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow-sm); padding:26px 28px 30px;
}
.gw-post-title{ margin:0 0 18px; font-size:clamp(21px,2.6vw,28px); line-height:1.34; letter-spacing:-.02em; font-weight:800; }
.gw-post-title .gw-topflg{
  display:inline-block; vertical-align:middle; margin-right:8px;
  font-size:11px; font-weight:700; color:var(--accent);
  border:1px solid color-mix(in srgb,var(--accent) 40%,transparent);
  background:color-mix(in srgb,var(--accent) 10%,transparent);
  padding:2px 7px; border-radius:6px; letter-spacing:.02em;
}
.gw-post-cover{ margin-bottom:18px; border-radius:12px; overflow:hidden; border:1px solid var(--line); }

.gw-post-meta{
  display:flex; align-items:center; flex-wrap:wrap; gap:2px;
  font-size:12.5px; color:var(--muted); margin:16px 0 20px;
  padding-bottom:16px; border-bottom:1px solid var(--line);
}
.gw-post-meta a{ color:var(--muted); }
.gw-post-meta a:hover{ color:var(--primary); }
.gw-post-edit{ margin-left:auto; }
.gw-edit{ font-size:12px; color:var(--primary); border:1px solid color-mix(in srgb,var(--primary) 30%,transparent); padding:2px 9px; border-radius:7px; }

/* ============================ 游戏头卡 ============================ */
.gw-hero{
  display:flex; gap:16px; padding:16px;
  border:1px solid var(--line); border-radius:14px;
  background:
    radial-gradient(600px 180px at 92% -40%, color-mix(in srgb,var(--primary) 12%,transparent), transparent 70%),
    color-mix(in srgb,var(--primary) 3%,var(--surface));
  margin-bottom:16px;
}
.gw-hero-icon{
  width:78px; height:78px; border-radius:16px; overflow:hidden; flex:0 0 auto;
  border:1px solid var(--line); background:var(--surface); box-shadow:var(--shadow-sm);
}
.gw-hero-icon img{ width:100%; height:100%; object-fit:cover; }
.gw-hero-main{ flex:1 1 auto; min-width:0; }
.gw-hero-top{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.gw-ico{ flex:0 0 auto; vertical-align:-2px; }
.gw-chip{
  font-size:11.5px; font-weight:600; border-radius:999px; padding:3px 10px;
  background:color-mix(in srgb,var(--primary) 11%,transparent); color:var(--primary);
  display:inline-flex; align-items:center; gap:4px;
}
.gw-chip-ghost{ background:color-mix(in srgb,var(--success) 12%,transparent); color:var(--success); }
.gw-hero-spec{ font-size:12px; color:var(--muted); }
.gw-hero-stats{ display:flex; gap:18px; margin-top:10px; flex-wrap:wrap; }
.gw-stat{ display:inline-flex; align-items:center; gap:5px; font-size:12.5px; color:var(--muted); }
.gw-stat svg{ color:color-mix(in srgb,var(--muted) 80%,transparent); }
.gw-stat b{ font-size:15px; color:var(--ink); font-weight:800; }
.gw-stat em{ font-style:normal; font-size:12px; }
.gw-hero-acts{ display:flex; align-items:center; gap:12px; margin-top:13px; flex-wrap:wrap; }
.gw-hero-hint{ display:inline-flex; align-items:center; gap:4px; font-size:11.5px; color:var(--muted); }

/* ============================ 截图画廊 ============================ */
.gw-gal{ margin:0 0 18px; }
.gw-gal-stage{
  position:relative; border-radius:12px; overflow:hidden; background:color-mix(in srgb,var(--ink) 5%,var(--surface));
  border:1px solid var(--line); aspect-ratio:16/9; max-height:420px;
}
.gw-gal-slide{ position:absolute; inset:0; opacity:0; transition:opacity .28s ease; pointer-events:none; }
.gw-gal-slide.on{ opacity:1; pointer-events:auto; }
.gw-gal-slide img{ width:100%; height:100%; object-fit:contain; background:color-mix(in srgb,var(--ink) 3%,#fff); }
.gw-gal-nav{
  position:absolute; top:50%; transform:translateY(-50%); z-index:3;
  width:34px; height:34px; border-radius:50%; display:grid; place-items:center;
  background:color-mix(in srgb,#0B0E18 52%,transparent); color:#fff; backdrop-filter:blur(4px);
  transition:.18s ease;
}
.gw-gal-nav:hover{ background:color-mix(in srgb,#0B0E18 72%,transparent); }
.gw-gal-nav:disabled{ opacity:0; pointer-events:none; }
.gw-gal-nav.prev{ left:10px; }
.gw-gal-nav.next{ right:10px; }
.gw-gal-count{
  position:absolute; right:10px; bottom:10px; z-index:3;
  font-size:11.5px; color:#fff; background:color-mix(in srgb,#0B0E18 58%,transparent);
  padding:2px 9px; border-radius:7px; backdrop-filter:blur(4px);
}
.gw-gal-thumbs{ display:flex; gap:8px; margin-top:9px; overflow-x:auto; padding-bottom:2px; scrollbar-width:thin; }
.gw-gal-thumb{
  flex:0 0 auto; width:86px; height:50px; border-radius:8px; overflow:hidden;
  border:2px solid transparent; opacity:.62; transition:.18s ease; background:var(--surface);
}
.gw-gal-thumb img{ width:100%; height:100%; object-fit:cover; }
.gw-gal-thumb.on{ border-color:var(--primary); opacity:1; }
.gw-gal-thumb:hover{ opacity:1; }

/* ============================ 正文排版 ============================ */
.gw-toc-inline{
  display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px;
  padding:11px 14px; border-radius:11px; margin:0 0 20px;
  background:color-mix(in srgb,var(--primary) 5%,transparent);
  border:1px solid color-mix(in srgb,var(--primary) 12%,transparent);
  font-size:12.5px;
}
.gw-toc-inline b{ color:var(--primary); font-weight:700; }
.gw-toc-inline a{ color:var(--muted); padding:1px 0; border-bottom:1px dashed transparent; }
.gw-toc-inline a:hover{ color:var(--primary); border-bottom-color:color-mix(in srgb,var(--primary) 40%,transparent); }

.gw-prose{ font-size:15.5px; line-height:1.86; color:#262A33; }
.gw-prose > *:first-child{ margin-top:0; }
.gw-prose p{ margin:0 0 16px; }
.gw-prose h2{
  margin:34px 0 14px; font-size:19.5px; font-weight:800; letter-spacing:-.015em;
  padding-left:12px; border-left:4px solid var(--primary); line-height:1.4;
  scroll-margin-top:84px;
}
.gw-prose h3{ margin:26px 0 12px; font-size:16.5px; font-weight:750; scroll-margin-top:84px; }
.gw-prose h4{ margin:20px 0 10px; font-size:15px; font-weight:700; }
.gw-prose ul,.gw-prose ol{ margin:0 0 16px; padding-left:22px; }
.gw-prose li{ margin:6px 0; }
.gw-prose li::marker{ color:var(--primary); }
.gw-prose a{ color:var(--primary); border-bottom:1px solid color-mix(in srgb,var(--primary) 30%,transparent); }
.gw-prose a:hover{ border-bottom-color:var(--primary); }
.gw-prose strong{ font-weight:750; color:#12141A; }
.gw-prose img{ border-radius:11px; margin:18px auto; border:1px solid var(--line); }
.gw-prose blockquote{
  margin:18px 0; padding:12px 16px; border-left:3px solid color-mix(in srgb,var(--primary) 45%,transparent);
  background:color-mix(in srgb,var(--primary) 4%,transparent); border-radius:0 10px 10px 0; color:#3A3F4B;
}
.gw-prose blockquote p:last-child{ margin-bottom:0; }
.gw-prose code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.9em;
  background:color-mix(in srgb,var(--ink) 6%,transparent); padding:2px 6px; border-radius:5px;
}
.gw-prose pre{
  background:#16181D; color:#E8EAF0; border-radius:11px; padding:16px 18px; overflow-x:auto; margin:18px 0;
  font-size:13px; line-height:1.7;
}
.gw-prose pre code{ background:none; padding:0; color:inherit; }
.gw-prose hr{ border:0; border-top:1px solid var(--line); margin:28px 0; }
.gw-prose table{ width:100%; border-collapse:collapse; margin:18px 0; font-size:14px; }
.gw-prose th,.gw-prose td{ border:1px solid var(--line); padding:9px 12px; text-align:left; }
.gw-prose th{ background:color-mix(in srgb,var(--ink) 3%,transparent); font-weight:700; }

/* 一句话总结 */
.gw-summary{
  margin:26px 0 0; padding:14px 16px; border-radius:12px;
  background:color-mix(in srgb,var(--success) 6%,transparent);
  border:1px solid color-mix(in srgb,var(--success) 18%,transparent);
}
.gw-summary b{ display:block; font-size:12.5px; color:var(--success); letter-spacing:.02em; margin-bottom:4px; }
.gw-summary p{ margin:0; font-size:14px; color:#2C3230; }

/* 正文过短时的补充说明 */
.gw-editnote{
  margin:20px 0 0; padding:14px 16px; border-radius:12px;
  background:color-mix(in srgb,var(--primary) 4%,transparent);
  border:1px solid color-mix(in srgb,var(--primary) 12%,transparent);
}
.gw-editnote b{ display:block; font-size:13.5px; margin-bottom:5px; }
.gw-editnote p{ margin:0; font-size:14px; line-height:1.8; color:#31363F; }

/* 游戏信息事实表 */
.gw-facts{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(104px,1fr)); gap:1px;
  margin:22px 0 0; border:1px solid var(--line); border-radius:12px; overflow:hidden;
  background:var(--line);
}
.gw-facts > div{
  background:var(--surface); padding:11px 13px; display:flex; flex-direction:column; gap:3px;
}
.gw-facts span{
  font-size:11.5px; color:var(--muted);
  display:inline-flex; align-items:center; gap:4px;
}
.gw-facts b{ font-size:14px; font-weight:700; }

.gw-post-tags{ display:flex; flex-wrap:wrap; gap:8px; margin:22px 0 0; }
.gw-tag{
  font-size:12.5px; color:var(--muted); background:color-mix(in srgb,var(--ink) 4.5%,transparent);
  padding:4px 11px; border-radius:999px; transition:.16s ease;
}
.gw-tag:hover{ color:var(--primary); background:color-mix(in srgb,var(--primary) 9%,transparent); }

/* 文末立即玩 */
.gw-post-play{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  margin:26px 0 0; padding:18px 20px; border-radius:14px;
  background:
    radial-gradient(500px 140px at 88% -30%, color-mix(in srgb,var(--primary) 18%,transparent), transparent 72%),
    color-mix(in srgb,var(--primary) 5%,var(--surface));
  border:1px solid color-mix(in srgb,var(--primary) 16%,var(--line));
}
.gw-post-play > div{ flex:1 1 200px; }
.gw-post-play b{ display:block; font-size:15px; }
.gw-post-play span{ font-size:12.5px; color:var(--muted); }

/* 隔壁文章 */
.gw-neighbor{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:28px 0 0; }
.gw-nb{
  display:block; padding:13px 15px; border-radius:12px; background:var(--surface);
  border:1px solid var(--line); transition:.18s ease; min-width:0;
}
.gw-nb:hover{ border-color:color-mix(in srgb,var(--primary) 30%,var(--line)); box-shadow:var(--shadow-sm); }
.gw-nb.next{ text-align:right; }
.gw-nb-dir{ display:block; font-size:11.5px; color:var(--muted); margin-bottom:3px; }
.gw-nb-title{ display:block; font-size:13.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* 相关推荐 */
.gw-week{ margin:32px 0 0; }
.gw-week-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:14px; }
.gw-week-head h3{ margin:0; font-size:16.5px; font-weight:800; letter-spacing:-.01em; }
.gw-week-head a{ font-size:12.5px; color:var(--primary); white-space:nowrap; }

/* ============================ 评论 ============================ */
.gw-comments{ margin:34px 0 0; padding-top:26px; border-top:1px solid var(--line); }
.gw-comments-head{ display:flex; align-items:baseline; gap:10px; margin-bottom:16px; }
.gw-comments-head h3{ margin:0; font-size:16.5px; font-weight:800; }
.gw-comments-head span{ font-size:12.5px; color:var(--muted); }

.gw-comment{ display:flex; gap:11px; padding:14px 0; border-bottom:1px solid color-mix(in srgb,var(--line) 70%,transparent); }
.gw-comment:last-child{ border-bottom:0; }
.gw-avatar{ flex:0 0 auto; width:34px; height:34px; border-radius:50%; overflow:hidden; background:color-mix(in srgb,var(--ink) 6%,transparent); }
.gw-avatar img{ width:100%; height:100%; object-fit:cover; }
.gw-comment-main{ flex:1 1 auto; min-width:0; }
.gw-comment-top{ display:flex; align-items:baseline; gap:9px; }
.gw-comment-top b{ font-size:13.5px; }
.gw-comment-top b a{ color:var(--primary); }
.gw-comment-time{ font-size:11.5px; color:var(--muted); }
.gw-comment-text{ margin:5px 0 0; font-size:14px; color:#2E333D; line-height:1.72; word-break:break-word; }
.gw-comment-child{ border-bottom:0; padding-top:10px; padding-bottom:0; }
.gw-reply-btn{ margin-top:5px; font-size:12px; color:var(--muted); }
.gw-reply-btn:hover{ color:var(--primary); }

.gw-comment-form{ margin:26px 0 0; padding:16px; border-radius:13px; background:color-mix(in srgb,var(--ink) 2.5%,var(--surface)); border:1px solid var(--line); }
.gw-input{
  width:100%; border:1px solid var(--line); background:var(--surface); border-radius:10px;
  padding:10px 12px; font-size:14px; outline:none; transition:.16s ease;
}
.gw-input:focus{ border-color:color-mix(in srgb,var(--primary) 46%,var(--line)); box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 10%,transparent); }
textarea.gw-input{ resize:vertical; min-height:96px; line-height:1.7; }
.gw-comment-info{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:9px; margin-top:10px; }
.gw-captcha{ grid-column:1/-1; display:flex; align-items:center; gap:10px; }
.gw-captcha img{ border-radius:8px; border:1px solid var(--line); }
.gw-captcha input{ width:120px; }
.gw-comment-submit{ margin-top:12px; display:flex; justify-content:flex-end; }
.gw-nocomment{ font-size:13.5px; color:var(--muted); }

/* ============================ 侧栏 ============================ */
.gw-side-box{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow-sm); padding:15px 16px;
}
.gw-side-box h4{
  margin:0 0 11px; font-size:13px; font-weight:750; letter-spacing:.02em;
  padding-left:9px; border-left:3px solid var(--primary); line-height:1.35;
}
.gw-side-toc a{ display:block; font-size:12.5px; color:var(--muted); padding:4px 0; }
.gw-side-toc a:hover{ color:var(--primary); }

.gw-side-rank{ list-style:none; margin:0; padding:0; counter-reset:none; }
.gw-side-rank li + li{ margin-top:2px; }
.gw-side-rank a{ display:flex; align-items:center; gap:9px; padding:5px 0; font-size:13px; color:#2C313B; }
.gw-side-rank a:hover{ color:var(--primary); }
.gw-side-rank i{
  flex:0 0 auto; width:17px; height:17px; border-radius:5px; display:grid; place-items:center;
  font-size:10.5px; font-style:normal; font-weight:700; color:var(--muted);
  background:color-mix(in srgb,var(--ink) 5%,transparent);
}
.gw-side-rank li:nth-child(1) i{ background:var(--primary); color:#fff; }
.gw-side-rank li:nth-child(2) i{ background:color-mix(in srgb,var(--primary) 55%,#fff); color:#fff; }
.gw-side-rank li:nth-child(3) i{ background:color-mix(in srgb,var(--primary) 30%,#fff); color:#fff; }
.gw-side-rank span{ flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gw-side-rank em{ flex:0 0 auto; font-style:normal; font-size:11px; color:var(--muted); }

.gw-side-list a{ display:block; font-size:13px; color:#2C313B; padding:5px 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gw-side-list a:hover{ color:var(--primary); }

/* 系统 widget 的兜底样式 */
.gw-side > div, .gw-article-side .column-small > div{ margin-bottom:14px; }
.gw-article-side .widget-title, .gw-article-side h3{ font-size:13px; font-weight:750; margin:0 0 10px; }

/* ============================ 页脚 ============================ */
.gw-foot{ margin-top:40px; background:var(--surface); border-top:1px solid var(--line); }
.gw-foot-in{ display:flex; gap:32px; padding-top:36px; padding-bottom:26px; flex-wrap:wrap; }
.gw-foot-brand{ flex:1 1 280px; }
.gw-foot-about{ color:var(--muted); font-size:12.5px; margin:9px 0 0; max-width:380px; line-height:1.7; }
.gw-foot-col{ flex:0 0 auto; min-width:120px; }
.gw-foot-col h4{ margin:0 0 9px; font-size:12.5px; font-weight:750; letter-spacing:.03em; }
.gw-foot-col a{ display:block; font-size:13px; color:var(--muted); padding:3px 0; }
.gw-foot-col a:hover{ color:var(--primary); }
.gw-foot-bar{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding-top:16px; padding-bottom:24px; border-top:1px solid var(--line);
  font-size:12px; color:var(--muted);
}
.gw-foot-ver{ opacity:.75; }

/* ============================ 吸底 / 弹窗 / 提示 ============================ */
.gw-sticky{
  position:fixed; left:0; right:0; bottom:0; z-index:60;
  padding:10px 16px calc(10px + env(safe-area-inset-bottom));
  background:color-mix(in srgb,var(--surface) 92%,transparent);
  backdrop-filter:blur(16px); border-top:1px solid var(--line);
}
.gw-sticky .gw-btn{ width:100%; height:44px; }

.gw-modal[hidden]{ display:none; }
.gw-modal{ position:fixed; inset:0; z-index:80; display:grid; place-items:center; padding:20px; }
.gw-modal-backdrop{ position:absolute; inset:0; background:rgba(12,16,28,.42); backdrop-filter:blur(2px); }
.gw-modal-box{
  position:relative; z-index:2; width:100%; max-width:340px;
  background:var(--surface); border-radius:18px; padding:24px 22px 20px;
  box-shadow:var(--shadow-lg); text-align:center;
  animation:gwPop .22s ease both;
}
@keyframes gwPop{ from{ opacity:0; transform:translateY(10px) scale(.97) } to{ opacity:1; transform:none } }
.gw-modal-box h3{ margin:0 0 4px; font-size:16.5px; font-weight:800; }
.gw-modal-sub{ margin:0; font-size:12.5px; color:var(--muted); }
.gw-modal-name{ margin:8px 0 0; font-size:12.5px; color:var(--primary); font-weight:600; }
.gw-qr-frame{
  margin:16px auto 0; width:196px; height:196px; border-radius:14px;
  border:1px solid var(--line); background:#fff; display:grid; place-items:center; overflow:hidden;
}
.gw-qr-frame img{ width:100%; height:100%; object-fit:contain; }
.gw-qr-loading{ font-size:12.5px; color:var(--muted); }
.gw-modal-tip{ margin:12px 0 14px; font-size:11.5px; color:var(--muted); }
.gw-modal-box .gw-btn{ width:100%; }
.gw-modal-x{
  position:absolute; right:10px; top:8px; width:30px; height:30px; border-radius:9px;
  font-size:19px; line-height:1; color:var(--muted); display:grid; place-items:center;
}
.gw-modal-x:hover{ background:color-mix(in srgb,var(--ink) 6%,transparent); color:var(--ink); }

.gw-toast{
  position:fixed; left:50%; bottom:84px; transform:translate(-50%,14px); z-index:90;
  background:rgba(18,22,34,.92); color:#fff; font-size:13px;
  padding:10px 18px; border-radius:11px; max-width:80vw; text-align:center;
  opacity:0; pointer-events:none; transition:.24s ease;
}
.gw-toast.show{ opacity:1; transform:translate(-50%,0); }

/* 登录 / 注册扩展弹层 */
.gw-auth-ext[hidden]{ display:none; }
.gw-auth-ext{ position:fixed; inset:0; z-index:85; display:grid; place-items:center; padding:20px; }
.gw-auth-slot{ margin-top:12px; display:flex; flex-direction:column; gap:9px; }
.gw-auth-slot:empty{ display:none; }
.gw-auth-slot a, .gw-auth-slot button{
  display:flex; align-items:center; justify-content:center; gap:8px;
  width:100%; height:42px; border-radius:10px; font-size:14px; font-weight:600;
  border:1px solid var(--line); background:var(--surface); color:var(--ink);
  transition:.16s ease;
}
.gw-auth-slot a:hover, .gw-auth-slot button:hover{
  border-color:color-mix(in srgb,var(--primary) 34%,var(--line));
  color:var(--primary);
}
.gw-auth-slot img{ display:inline-block; max-height:20px; width:auto; }

/* 移动端分类横滑条：桌面隐藏 */
.gw-nav-mobile{ display:none; }

/* ============================ 响应式 ============================ */
@media (max-width:1080px){
  .gw-article-side{ flex-basis:262px; max-width:262px; }
}
@media (max-width:900px){
  /* 关键：flex 切列后侧栏必须回到 100%，并且 main 也要压到 100%，
     否则 .gw-article-side 的 flex-basis 会把内容撑到 590px，手机出现横向滚动条 */
  .gw-article{ flex-direction:column; align-items:stretch; gap:16px; }
  .gw-article-main{ flex:1 1 auto; width:100%; min-width:0; max-width:100%; }
  .gw-article-side{
    position:static; flex:0 0 auto; width:100%; min-width:0; max-width:100%;
  }
  .gw-hero-glow{ display:none; }
  .gw-nav{ display:none; }
  .gw-search{ max-width:none; }

  /* 分类改为横向滚动条，移动端也能切分类 */
  .gw-nav-mobile{
    display:block; overflow-x:auto; overflow-y:hidden;
    scrollbar-width:none; -webkit-overflow-scrolling:touch;
    border-top:1px solid var(--line);
  }
  .gw-nav-mobile::-webkit-scrollbar{ display:none; }
  .gw-nav-mobile-in{
    display:flex; gap:7px; padding:8px 15px; width:max-content;
  }
  .gw-nav-mobile a{
    font-size:13px; color:var(--muted); padding:5px 12px;
    border:1px solid var(--line); border-radius:999px; white-space:nowrap;
    background:var(--surface);
  }
  .gw-nav-mobile a.on{
    color:#fff; background:var(--primary); border-color:var(--primary); font-weight:600;
  }
  /* 正文内锚点跳转要避开双层页头 */
  .gw-prose h2, .gw-prose h3{ scroll-margin-top:112px; }
}
@media (max-width:720px){
  body{ font-size:14.5px; }
  .gw-wrap{ padding:0 14px; }
  .gw-head-in{ height:56px; gap:10px; }
  .gw-brand{ flex:0 1 auto; min-width:0; }
  .gw-brand-txt{ font-size:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .gw-brand-txt small{ display:none; }
  .gw-brand-mark{ width:30px; height:30px; border-radius:9px; }
  .gw-search{ flex:1 1 auto; min-width:0; height:34px; padding:0 10px; }
  .gw-search input{ font-size:13px; }

  .gw-hero-band-in{ padding-top:30px; padding-bottom:26px; }
  .gw-hero-copy h1{ font-size:clamp(24px,7vw,30px); }
  .gw-hero-copy p{ font-size:13.5px; margin-top:12px; }
  .gw-hero-mini{ gap:16px; margin-top:16px; font-size:12px; }
  .gw-hero-mini b{ font-size:17px; }

  .gw-toolbar{ margin:22px 0 12px; }
  .gw-toolbar h2{ font-size:17.5px; }

  .gw-grid{ grid-template-columns:repeat(auto-fill,minmax(144px,1fr)); gap:10px; }
  .gw-card-body{ padding:9px 10px 11px; }
  .gw-card-name{ font-size:12.8px; min-height:36px; }
  .gw-card-meta{ font-size:11px; }
  .gw-grid-mini{ grid-template-columns:repeat(2,1fr); gap:9px; }
  .gw-grid-mini .gw-card-name{ font-size:12.2px; min-height:34px; }

  /* ---- 正文页 ---- */
  .gw-article-wrap{ padding-top:12px; padding-bottom:76px; }
  .gw-crumb{ font-size:12px; }
  .gw-post{ padding:16px 14px 20px; border-radius:12px; }
  .gw-post-title{ font-size:19.5px; line-height:1.42; margin-bottom:14px; }
  .gw-post-meta{ font-size:11.5px; gap:1px; margin:14px 0 16px; padding-bottom:13px; }

  .gw-hero{ gap:12px; padding:12px; border-radius:12px; margin-bottom:14px; }
  .gw-hero-icon{ width:56px; height:56px; border-radius:13px; }
  .gw-hero-top{ gap:6px; }
  .gw-chip{ font-size:11px; padding:2px 8px; }
  .gw-hero-spec{ display:none; }
  .gw-hero-stats{ gap:12px; margin-top:8px; }
  .gw-stat{ font-size:11.5px; gap:4px; }
  .gw-stat b{ font-size:14px; }
  .gw-hero-acts{ margin-top:11px; gap:9px; }
  .gw-hero-acts .gw-btn{ height:38px; padding:0 16px; font-size:13.5px; }
  .gw-hero-hint{ display:none; }

  .gw-gal{ margin-bottom:14px; }
  .gw-gal-stage{ border-radius:10px; max-height:none; }
  .gw-gal-thumb{ width:64px; height:38px; border-radius:6px; }
  .gw-gal-thumbs{ gap:6px; margin-top:7px; }
  .gw-gal-nav{ width:30px; height:30px; }
  .gw-gal-count{ font-size:11px; padding:2px 8px; right:8px; bottom:8px; }

  .gw-toc-inline{ padding:9px 11px; font-size:12px; gap:4px 10px; margin-bottom:16px; }
  .gw-prose{ font-size:15px; line-height:1.85; }
  .gw-prose h2{ font-size:17px; margin:26px 0 12px; padding-left:10px; border-left-width:3px; }
  .gw-prose h3{ font-size:15.5px; }
  .gw-prose p{ margin-bottom:14px; }
  .gw-prose img{ margin:14px auto; border-radius:9px; }
  .gw-prose blockquote{ padding:10px 13px; margin:14px 0; }

  .gw-editnote, .gw-summary{ padding:12px 13px; margin-top:16px; }
  .gw-editnote p, .gw-summary p{ font-size:13.5px; }
  .gw-facts{ grid-template-columns:repeat(3,1fr); margin-top:16px; }
  .gw-facts > div{ padding:9px 10px; }
  .gw-facts span{ font-size:11px; }
  .gw-facts b{ font-size:13px; }

  .gw-post-tags{ gap:6px; margin-top:16px; }
  .gw-tag{ font-size:12px; padding:3px 9px; }
  .gw-post-play{ padding:14px; gap:10px; margin-top:18px; }
  .gw-post-play b{ font-size:14px; }
  .gw-post-play span{ font-size:12px; }
  .gw-post-play .gw-btn{ flex:1 1 auto; height:40px; }

  .gw-week{ margin-top:24px; }
  .gw-week-head h2{ font-size:15.5px; }
  .gw-week-head a{ font-size:12px; }

  .gw-neighbor{ grid-template-columns:1fr; gap:9px; margin-top:22px; }
  .gw-nb{ padding:11px 13px; }
  .gw-nb.next{ text-align:left; }

  .gw-comments{ margin-top:24px; padding-top:20px; }
  .gw-comment-form{ padding:13px; margin-top:20px; }
  .gw-comment-info{ grid-template-columns:1fr; gap:8px; }
  .gw-comment{ gap:9px; padding:12px 0; }
  .gw-avatar{ width:30px; height:30px; }
  .gw-comment-child{ margin-left:0 !important; padding-left:39px; }
  .gw-comment-text{ font-size:13.5px; }

  .gw-article-side{ gap:11px; margin-top:16px; }
  .gw-side-box{ padding:13px 14px; }
  .gw-side-box h4{ font-size:12.5px; }
  .gw-side-rank a{ font-size:12.5px; padding:6px 0; }
  .gw-side-list a{ font-size:12.5px; padding:6px 0; }

  .gw-foot{ margin-top:28px; }
  .gw-foot-in{ gap:20px; padding-top:24px; padding-bottom:20px; }
  .gw-foot-col{ min-width:96px; }
  .gw-foot-bar{ padding-top:13px; padding-bottom:20px; font-size:11.5px; }

  /* 吸底按钮：只占内容宽度，不铺满整屏 */
  .gw-sticky{
    left:50%; right:auto; transform:translateX(-50%);
    width:calc(100% - 28px); max-width:520px;
    padding:8px; border-radius:14px; border:1px solid var(--line);
    box-shadow:0 10px 30px -6px rgba(20,24,40,.22);
    bottom:calc(10px + env(safe-area-inset-bottom));
  }
  .gw-sticky .gw-btn{ height:44px; border-radius:10px; }

  .gw-modal{ padding:16px; }
  .gw-modal-box{ padding:20px 18px 18px; border-radius:16px; }
  .gw-qr-frame{ width:172px; height:172px; }
}
@media (max-width:380px){
  .gw-grid{ grid-template-columns:repeat(2,1fr); }
  .gw-facts{ grid-template-columns:repeat(2,1fr); }
  .gw-search input{ font-size:12.5px; }
}
