/* ============================================================
   Foxy's Potion Shop Guide — 设计语言（照 DESIGN-BRIEF.md）：
   游戏内 UI 风 = 羊皮纸 + 木牌导航 + 手绘深棕描边 + 爪印/绿叶母题
   （此为本站唯一视觉，禁与其它站共用皮肤）
   ============================================================ */

/* ---- 自托管字体（禁 Google Fonts 外链） ---- */
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/kalam-400.woff2) format('woff2');
}
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/kalam-700.woff2) format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/nunito-var.woff2) format('woff2');
}

:root {
  --bg: #f6ecd2;
  --panel: #fdf7e6;
  --panel-2: #f9efd8;
  --ink: #43301f;
  --ink-soft: #6b5138;
  --ink-mute: #7a6448;
  --line: #e0cda3;
  --line-2: #b98a4a;
  --green: #6f9440;
  --green-deep: #4d6a2c;
  --green-tint: #e9f0d8;
  --orange: #e8842e;
  --yellow: #f2c94c;
  --wood: #96643a;
  --wood-deep: #43301f;
  --shadow-hard: 3px 3px 0 rgba(67, 48, 31, .35);
  --shadow-card: 4px 4px 0 rgba(67, 48, 31, .16);
  --radius: 16px;
  --maxw: 1200px;
  --font: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --display: 'Kalam', 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  font: 16.5px/1.65 var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 500px at 8% -5%, rgba(242, 201, 76, .18), transparent 60%),
    radial-gradient(900px 500px at 100% 8%, rgba(111, 148, 64, .13), transparent 55%),
    radial-gradient(800px 600px at 50% 110%, rgba(154, 111, 208, .10), transparent 60%),
    var(--bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--green-deep); }
a:hover { color: var(--orange); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 60; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: 22px; padding-right: 22px; }

/* ---- 顶部公告条 ---- */
.ribbon {
  background: var(--green-deep); color: #fdf6e3;
  font-size: 14px; font-weight: 700; letter-spacing: .02em;
  padding: 7px 14px; text-align: center;
}

/* ---- 顶部导航（木牌） ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #a9743f, #8a5a33);
  border-bottom: 3px solid var(--wood-deep);
  box-shadow: 0 3px 0 rgba(67, 48, 31, .22);
}
.topbar .bar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 21px; font-weight: 700;
  color: #fdf6e3; text-decoration: none; text-shadow: 2px 2px 0 rgba(58, 38, 20, .45);
}
.brand img { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--wood-deep); background: var(--panel); }
.brand:hover { color: #ffe29a; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav li { position: relative; }
.nav a {
  display: inline-block; padding: 8px 12px; border-radius: 10px;
  color: #fdf1d8; font-weight: 700; font-size: 15px; text-decoration: none;
}
.nav a:hover { color: #ffe29a; background: rgba(67, 48, 31, .28); }
.nav .active > a { color: #ffe29a; box-shadow: inset 0 -3px 0 #ffd97a; }

/* 下拉父项与面板之间禁止留「死区」：面板下移（top:calc(100%+Npx)）的同时，
   给父项加一条透明 hover 桥覆盖空隙 —— 否则鼠标经过空隙时 :hover 断掉、菜单消失。
   这条被用户多次打回，任何改成有间距的站都要保留。 */
.nav li.has-kids::after { content: ""; position: absolute; left: -10px; right: -10px; top: 100%; height: 14px; z-index: 59; }
.nav li.has-kids > a::after { content: " ▾"; font-size: 12px; opacity: .85; }
.nav .kids {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 60;
  display: none; flex-direction: column; gap: 2px;
  min-width: 236px; padding: 10px;
  background: var(--panel); border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.nav li.has-kids:hover .kids, .nav li.has-kids:focus-within .kids { display: flex; }
.nav .kids a { color: var(--ink); font-size: 14.5px; padding: 7px 10px; border-radius: 9px; }
.nav .kids a:hover { background: var(--green-tint); color: var(--green-deep); }
.nav .cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--yellow); color: var(--ink) !important;
  border: 2px solid var(--wood-deep); border-radius: 999px;
  padding: 8px 16px; font-weight: 800; font-size: 14.5px; text-decoration: none;
  box-shadow: var(--shadow-hard);
}
.nav .cta:hover { background: #ffd97a; }
@media (max-width: 900px) {
  .topbar .bar { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; gap: 10px; }
  .nav { margin-left: 0; width: 100%; overflow-x: auto; }
  .nav ul { flex-wrap: nowrap; white-space: nowrap; }
  .nav .kids {
    position: static; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 2px;
    background: transparent; border: 0; box-shadow: none; padding: 0; min-width: 0;
  }
  .nav .kids a { color: #fdf1d8; }
}

/* ---- Hero（官方大图 + 轻压暗） ---- */
.hero {
  position: relative;
  background:
    linear-gradient(100deg, rgba(52, 34, 18, .68) 0%, rgba(52, 34, 18, .38) 48%, rgba(52, 34, 18, .06) 80%),
    var(--hero, linear-gradient(180deg, #6b4a26, #43301f)) center 32% / cover no-repeat;
  border-bottom: 4px solid var(--wood-deep);
}
.hero-in { padding-top: 92px; padding-bottom: 84px; }
.hero .eyebrow {
  display: inline-block; margin: 0 0 14px;
  background: var(--yellow); color: var(--ink);
  border: 2px solid var(--wood-deep); border-radius: 999px;
  padding: 5px 14px; font-size: 13.5px; font-weight: 800; letter-spacing: .02em;
  box-shadow: var(--shadow-hard);
}
.hero h1 {
  margin: 0 0 14px; max-width: 720px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.3rem, 5.6vw, 3.9rem); line-height: 1.06;
  color: #fdf6e3; text-shadow: 3px 3px 0 rgba(58, 38, 20, .55);
}
.hero .lead {
  margin: 0 0 22px; max-width: 640px;
  color: #fbeed3; font-size: 17.5px; font-weight: 600;
  text-shadow: 1px 2px 0 rgba(58, 38, 20, .45);
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; }
.btn {
  display: inline-block; padding: 12px 22px;
  background: var(--orange); color: #33200f; font-weight: 800; font-size: 15.5px;
  border: 2px solid var(--wood-deep); border-radius: 999px; text-decoration: none;
  box-shadow: 3px 3px 0 rgba(41, 26, 12, .5);
}
.btn:hover { background: #f79b45; color: #2a1a0b; }
.btn.ghost { background: transparent; color: #fdf6e3; border-color: #fdf6e3; }
.btn.ghost:hover { background: rgba(253, 246, 227, .18); color: #fff; }

/* ---- 事实条 ---- */
.facts-strip { background: var(--wood-deep); border-bottom: 4px solid #2e2013; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 34px; padding-top: 13px; padding-bottom: 13px; }
.fact { display: flex; align-items: baseline; gap: 9px; }
.fact-k { color: #d9b98a; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.fact-v { color: #fdf6e3; font-weight: 800; font-size: 15px; }

/* ---- 区块标题 ---- */
.section-head { margin: 40px 0 18px; }
.overline {
  display: inline-block; margin-bottom: 8px;
  background: var(--green-tint); color: var(--green-deep);
  border: 2px solid #c4d6a2; border-radius: 999px;
  padding: 3px 12px; font-size: 12.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
}
.section-head h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.75rem; color: var(--ink); }
.count-pill {
  display: inline-block; margin-left: 10px; vertical-align: 4px;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px;
  padding: 0 10px; font-family: var(--font); font-size: 13px; font-weight: 800; color: var(--ink);
}

/* ---- 卡片网格（贴纸硬阴影；flex 防窄屏溢出） ---- */
.grid { display: flex; flex-wrap: wrap; gap: 22px; margin: 0 0 8px; }
.card {
  flex: 1 1 270px; max-width: 100%;
  display: flex; flex-direction: column;
  background: var(--panel); border: 2px solid rgba(67, 48, 31, .8); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(67, 48, 31, .20); }
.card .thumb { display: block; position: relative; }
.card .thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card .pill-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px;
  padding: 2px 11px; font-size: 12px; font-weight: 800;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; }
.card-body h3 { margin: 0; font-family: var(--display); font-size: 1.24rem; font-weight: 700; color: var(--ink); }
.card-body p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.card-body .go { color: var(--green-deep); font-weight: 800; font-size: 14.5px; }
.card-body .stamp { color: var(--ink-mute); font-size: 12.5px; }
.all-guides { margin-top: 38px; border-top: 3px dashed var(--line); padding-top: 24px; }
.card.sm .card-body { padding: 12px 14px; }
.card.sm h3 { font-size: 1.08rem; }

/* ---- 正文 ---- */
main > .wrap:last-child { padding-bottom: 60px; }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 34px; align-items: start; padding-top: 26px; }
.crumb { font-size: 13.5px; color: var(--ink-mute); margin-bottom: 12px; }
.crumb a { color: var(--ink-soft); text-decoration: none; }
.crumb a:hover { color: var(--orange); }
.crumb .sep { margin: 0 6px; color: var(--line-2); }
.crumb .here { color: var(--ink); font-weight: 700; }

article {
  background: var(--panel); border: 2px solid rgba(67, 48, 31, .75); border-radius: 18px;
  padding: 30px 34px 34px; box-shadow: var(--shadow-card);
  min-width: 0;
}
article h1 { margin: 0 0 16px; font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.15; }
article h2 { margin: 34px 0 12px; font-family: var(--display); font-weight: 700; font-size: 1.5rem; padding-bottom: 7px; border-bottom: 3px solid var(--line); }
article h3 { margin: 24px 0 8px; font-family: var(--display); font-size: 1.18rem; font-weight: 700; }
article p, article li { color: #4a3520; }
article p { margin: 0 0 15px; max-width: 92ch; }
article ul, article ol { margin: 0 0 16px; padding-left: 24px; max-width: 92ch; }
article li { margin-bottom: 6px; }
article ul li::marker { color: var(--green); }
article strong { color: var(--ink); }
article blockquote {
  margin: 18px 0; padding: 10px 18px; max-width: 92ch;
  background: var(--panel-2); border-left: 5px solid var(--green);
  border-radius: 0 12px 12px 0; color: var(--ink-soft);
}
article img.zoom {
  display: block; margin: 16px auto 4px; cursor: zoom-in;
  border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: var(--shadow-card);
}
article p > em { color: var(--ink-mute); font-size: 14px; }
code { background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .92em; }

.quick-answer {
  margin: 0 0 20px; padding: 16px 18px 12px;
  background: var(--green-tint); border: 2px dashed var(--green); border-radius: 14px;
}
.qa-stamp {
  display: inline-block; margin-bottom: 8px;
  background: var(--green-deep); color: #fdf6e3;
  border-radius: 999px; padding: 3px 13px; font-size: 12.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
}
.quick-answer p { margin: 0; max-width: 92ch; }

.callout {
  margin: 18px 0; padding: 16px 18px 8px; max-width: 92ch;
  background: #fff7e0; border: 2px dashed var(--line-2); border-radius: 14px;
  position: relative;
}
.callout::before {
  content: "Note"; position: absolute; top: -12px; left: 16px;
  background: var(--line-2); color: #2f1e10;
  border-radius: 999px; padding: 1px 12px; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
}
.callout.tip::before { content: "Tip"; background: var(--green); color: #fff; }
.callout p { margin-bottom: 8px; }

/* 表格：木棕表头 + 羊皮纸斑马纹 */
.tbl-wrap { overflow-x: auto; margin: 16px 0 22px; }
article table { width: 100%; border-collapse: collapse; font-size: 15px; }
article th {
  background: var(--wood-deep); color: #fdf3dc;
  font-family: var(--font); font-weight: 800; text-align: left;
  padding: 11px 14px; border: 2px solid var(--wood-deep);
}
article td { padding: 10px 14px; border: 2px solid var(--line); vertical-align: top; }
article tbody tr:nth-child(odd) { background: var(--panel); }
article tbody tr:nth-child(even) { background: var(--panel-2); }

/* 目录侧栏 */
.toc {
  position: sticky; top: 86px;
  background: var(--panel); border: 2px solid rgba(67, 48, 31, .75); border-radius: 14px;
  padding: 16px 14px; box-shadow: var(--shadow-card);
}
.toc .overline { margin-bottom: 10px; }
.toc-list { display: flex; flex-direction: column; }
.toc-list a {
  display: block; padding: 6px 9px; border-radius: 9px;
  color: var(--ink-soft); font-size: 14px; font-weight: 700; text-decoration: none;
  border-left: 3px solid transparent;
}
.toc-list a:hover { color: var(--green-deep); background: var(--green-tint); border-left-color: var(--green); }

/* ad slot（Adsterra Native Banner：桌面指针门控；移动端不加载） */
@media (hover: hover) and (pointer: fine) {
  .ad-slot { display: block; }
}
@media not all and (hover: hover) and (pointer: fine) {
  .ad-slot { display: none; }
}
.ad-slot { margin: 26px auto; max-width: var(--maxw); padding: 0 22px; }
.ad-label { margin: 0 0 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.ad-inner { min-height: 90px; border: 2px dashed var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }

/* ---- 页脚 ---- */
.foot { background: var(--wood-deep); color: #d9b98a; border-top: 4px solid #2e2013; padding: 34px 0 30px; margin-top: 40px; }
.foot .disclaimer { max-width: 76ch; margin: 0 0 14px; font-size: 13.5px; color: #c9b08a; }
.foot-links { margin: 0 0 10px; font-weight: 700; }
.foot-links a { color: #fdf1d8; text-decoration: none; }
.foot-links a:hover { color: #ffd97a; }
.foot .muted { margin: 0; font-size: 12.5px; color: #b79a72; }

/* ---- 响应式 ---- */
@media (max-width: 980px) {
  .article-grid { grid-template-columns: 1fr; }
  .toc { position: static; order: 2; }
  .hero-in { padding-top: 68px; padding-bottom: 60px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  article { padding: 22px 18px 26px; }
  .hero-in { padding-top: 56px; padding-bottom: 50px; }
  .hero h1 { text-shadow: 2px 2px 0 rgba(58, 38, 20, .5); }
  .facts { gap: 6px 20px; }
}
