/* Pokémon Today — Pokédex 主题：深色机身导航 + 浅屏内容面板，桌面端仪表盘网格布局。 */

:root {
  /* 机身（导航/吸顶/页脚等“设备外壳”元素）。 */
  --shell: #1b1d22;
  --shell-2: #26282f;
  --shell-3: #303338;
  --shell-line: #383b42;
  --shell-ink: #eef0f3;
  --shell-ink-soft: #9aa0ac;

  /* 屏幕（内容区域，卡片浮于其上）。 */
  --screen: #eef1f6;
  --card: #ffffff;
  --line: #dbe1ea;
  --ink: #1b2130;
  --ink-soft: #626b7a;

  --red: #e0201f;
  --red-deep: #a8120f;
  --rose: #f43f5e;
  --amber: #d97706;
  --led: #24d97f;
  --accent: #2f6fed;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 24, 33, 0.05), 0 6px 20px rgba(20, 24, 33, 0.08);
  --mono: ui-monospace, "SF Mono", "Roboto Mono", "Menlo", "Consolas", monospace;

  --topbar-h: 47px;
  --sidebar-w: 200px;
}

/* 截图日期戳用像素字体：自带子集（仅数字/点/冒号），本地字体文件 3KB，
   不依赖外部字体 CDN（站内一贯自托管资源的做法，国内访问也不受影响）。 */
@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/silkscreen-digits.woff2') format('woff2');
  unicode-range: U+2E, U+30-3A;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--screen);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}

a { color: var(--red-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---------- 顶栏（品牌栏，深色机身，红色机身边条呼应 Pokédex 外壳） ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--shell);
  border-bottom: 3px solid var(--red);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--shell-ink);
}
.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: var(--shell-2);
  border: 1px solid var(--shell-line);
  border-radius: 50%;
  padding: 3px;
}
.brand strong { color: var(--red); }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--shell-ink-soft);
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--shell-2); color: var(--shell-ink); text-decoration: none; }
.site-nav small { display: block; font-size: 10px; line-height: 1.1; opacity: 0.7; }

/* ---------- 页内区块导航（移动/平板端为顶部横向 pill，桌面端见下方侧边栏媒体查询；与顶栏共用机身配色） ---------- */
.page-shell { display: block; }

.section-nav {
  position: sticky;
  top: var(--topbar-h);
  z-index: 19;
  background: var(--shell-2);
  border-bottom: 1px solid var(--shell-line);
}
.section-nav-track {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 7px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.section-nav-track::-webkit-scrollbar { display: none; }
.section-nav-track a {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 13px;
  border-radius: 999px;
  color: var(--shell-ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.section-nav-track a small {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.6;
}
.section-nav-track a:hover { background: var(--shell-3); color: var(--shell-ink); text-decoration: none; }
.section-nav-track a.is-active {
  background: var(--red);
  border-color: transparent;
  color: #fff;
}
.section-nav-track a.is-active small { opacity: 0.9; }

/* ---------- 桌面端：区块导航改为左侧边栏，内容区仪表盘网格 ---------- */
@media (min-width: 900px) {
  .page-shell {
    display: flex;
    align-items: flex-start;
  }
  .section-nav {
    flex: 0 0 var(--sidebar-w);
    width: var(--sidebar-w);
    height: calc(100vh - var(--topbar-h));
    border-bottom: 0;
    border-right: 1px solid var(--shell-line);
    overflow-y: auto;
  }
  .section-nav-track {
    max-width: none;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 18px 10px;
    overflow-x: visible;
  }
  .section-nav-track a {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 12px;
    border-radius: 10px;
  }
  .section-nav-track a small { opacity: 0.55; }
  .section-nav-track a.is-active small { opacity: 0.9; }

  main {
    max-width: 1560px;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    padding: 20px 32px 56px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    align-items: start;
  }
  main > .hero { grid-column: 1 / -1; margin-bottom: 0; }
  .section { grid-column: span 4; margin-bottom: 0; }
  #now { grid-column: span 8; }
  #pokemon, #gallery { grid-column: 1 / -1; }

  .hero, .section, .pokemon-card, .gallery-group { scroll-margin-top: 68px; }
}

/* ---------- Hero / 日期头（数字读数感：等宽字体日期 + 双圆点“镜头”装饰） ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 16px 16px 48px; }

.hero {
  background: linear-gradient(135deg, var(--red) 0%, var(--rose) 55%, #fb923c 100%);
  color: #fff;
  border-radius: 20px;
  padding: 18px 22px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(224, 32, 31, 0.28);
  position: relative;
  overflow: hidden;
  scroll-margin-top: 108px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 120%, rgba(255, 255, 255, 0.16), transparent 55%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.hero-date {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.hero-date-main { flex: 1; text-align: center; }
.hero-date h1 { margin: 0; font-size: 29px; font-weight: 900; letter-spacing: 0.02em; }
.hero-date-sub { margin: 2px 0 0; font-size: 13px; opacity: 0.92; }

.date-nav {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  transition: background 0.15s, transform 0.15s;
}
.date-nav:hover { background: rgba(255, 255, 255, 0.32); text-decoration: none; transform: scale(1.08); }

.hero-back { margin: 10px 0 0; text-align: center; font-size: 13px; position: relative; z-index: 1; }
.hero-back a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.5); }

/* ---------- 区块 ---------- */
main { counter-reset: dex-section; }
.section { margin-bottom: 26px; scroll-margin-top: 108px; }

.section-title {
  counter-increment: dex-section;
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
}
.section-title::before {
  content: counter(dex-section, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: var(--red);
  border-radius: 6px;
  padding: 2px 6px;
  letter-spacing: 0;
}
.section-title small { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-soft); font-weight: 700; }

.section-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-soft); }

/* ---------- 区块开合（整行标题可点击折叠，默认展开） ---------- */
.section-body { margin-top: 0; }
.section-body > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--ink);
}
.section-body > summary::-webkit-details-marker,
.section-body > summary::marker { display: none; content: ""; }
.section-body > summary .section-title { margin: 0; flex: 1; min-width: 0; }
.section-body > summary:hover .section-title { color: var(--red-deep); }
.section-chevron {
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12px;
  transition: transform 0.2s ease, background 0.15s ease;
}
.section-body > summary:hover .section-chevron { background: var(--screen); }
.section-body[open] > summary .section-chevron { transform: rotate(180deg); }
.section-body-inner { margin-top: 12px; }

/* ---------- 滚动进场（渐显 + 轻微上移；默认可见，仅 JS 探测到才接管，保证无 JS/SEO 快照完整） ---------- */
.section.will-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.section.will-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .section.will-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 卡片通用（“屏幕面板”） ---------- */
.card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.4s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(20, 24, 33, 0.08), 0 12px 28px rgba(20, 24, 33, 0.12); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 11px;
}
.card--hero { grid-column: span 2; }

.card-media { aspect-ratio: 16 / 9; background: #e4e9f0; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.card:hover .card-media img { transform: scale(1.04); }

.card-body { padding: 11px 13px 13px; }
.card-body h3 { margin: 6px 0 3px; font-size: 14.5px; line-height: 1.38; font-weight: 700; }
.card-meta { margin: 0; font-size: 11.5px; color: var(--ink-soft); }

/* 事件卡片：整卡是 div（非 <a>，避免与关联角标的 <a> 嵌套），标题内 <a> 用 ::after 铺满卡片
   充当默认点击区（“拉伸链接”）；.card-links 单独提升层级，保持自己可点。 */
.card-stretch { color: inherit; }
.card-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-stretch:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius); }
.card-stretch:hover { text-decoration: none; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.badge--event { background: #fde2e1; color: var(--red-deep); }
.badge--day { background: #fef3c7; color: #92400e; }
.badge--pkm { background: #fde68a; color: #78350f; }
.badge--shot { background: #dbe6ff; color: #2743a3; }

/* 首卡徽章加脉冲圆点（LED 指示灯），强化“正在发生”的实时感 */
.card--hero .badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--led);
  vertical-align: middle;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/* ---------- 关联角标行（事件卡 → 今日宝可梦卡片 / Tour 地点，锚点跳转让模块关系可见） ---------- */
.card-links {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}
.card-link-pkm {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 2px;
  border-radius: 50%;
  background: var(--screen);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card-link-pkm img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.card-link-pkm:hover { border-color: var(--red); transform: scale(1.12); }
.card-link-place {
  max-width: 132px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--screen);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-link-place:hover { border-color: var(--red-deep); color: var(--red-deep); text-decoration: none; }

/* ---------- 宝可梦卡片 ---------- */
.pokemon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 11px;
}
.pokemon-card { display: flex; flex-direction: column; scroll-margin-top: 108px; }
.pkm-sprite {
  position: relative;
  background: linear-gradient(160deg, #eef1f6 0%, #dfe5ee 100%);
  display: grid;
  place-items: center;
  padding: 18px 10px;
}
.pkm-sprite img { width: 96px; height: 96px; image-rendering: pixelated; }
.pkm-sprite.no-sprite { min-height: 40px; }

/* 图鉴编号角标：经典 Pokédex 元素，贴在立绘区左上角。 */
.dex-no {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: var(--shell);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 2px 7px;
}

/* ---------- 官方立绘（475×475 artwork，非像素化渲染） ---------- */
.pkm-art {
  position: relative;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #dfe5ee 100%);
  display: grid;
  place-items: center;
  padding: 16px 10px 10px;
}
.pkm-art img { width: 100px; height: 100px; object-fit: contain; display: block; }
.pkm-body { padding: 11px 13px 13px; }
.pkm-body h3 { margin: 6px 0 2px; font-size: 16.5px; font-weight: 800; }
.pkm-names { margin: 0 0 7px; font-size: 11.5px; color: var(--ink-soft); }
.pkm-types { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.pkm-stats { margin: 0 0 7px; font-size: 11.5px; color: var(--ink-soft); }
.pkm-stats a { color: var(--red-deep); font-weight: 700; }

/* 主役卡：舞台占满卡片宽度（列布局），照片堆需要足够横向空间才散得开。 */
.pokemon-card--spotlight { grid-column: 1 / -1; flex-direction: column; }
.pokemon-card--spotlight .pkm-sprite,
.pokemon-card--spotlight .pkm-art { padding: 26px 20px; }
.pokemon-card--spotlight .pkm-sprite img { width: 140px; height: 140px; }
.pokemon-card--spotlight .pkm-art img { width: 154px; height: 154px; }
.pokemon-card--spotlight .pkm-body { padding: 16px 18px; }
.pokemon-card--spotlight .pkm-body h3 { font-size: 22px; }
.pokemon-card--spotlight .dex-no { font-size: 12px; padding: 3px 9px; }

.type {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.type--normal   { background: #a8a878; }
.type--fire     { background: #ee8130; }
.type--water    { background: #6390f0; }
.type--electric { background: #f7d02c; color: #5a4a08; text-shadow: none; }
.type--grass    { background: #7ac74c; }
.type--ice      { background: #96d9d6; color: #1d5f5c; text-shadow: none; }
.type--fighting { background: #c22e28; }
.type--poison   { background: #a33ea1; }
.type--ground   { background: #e2bf65; color: #5a4a08; text-shadow: none; }
.type--flying   { background: #a98ff3; }
.type--psychic  { background: #f95587; }
.type--bug      { background: #a6b91a; }
.type--rock     { background: #b6a136; }
.type--ghost    { background: #735797; }
.type--dragon   { background: #6f35fc; }
.type--dark     { background: #705746; }
.type--steel    { background: #b7b7ce; color: #333; text-shadow: none; }
.type--fairy    { background: #d685ad; }

/* ---------- 今日宝可梦卡片 · 属性配色（背景/立绘区带一点主属性淡色） ---------- */
.pkm-normal   { --type-c: #a8a878; }
.pkm-fire     { --type-c: #ee8130; }
.pkm-water    { --type-c: #6390f0; }
.pkm-electric { --type-c: #f7d02c; }
.pkm-grass    { --type-c: #7ac74c; }
.pkm-ice      { --type-c: #96d9d6; }
.pkm-fighting { --type-c: #c22e28; }
.pkm-poison   { --type-c: #a33ea1; }
.pkm-ground   { --type-c: #e2bf65; }
.pkm-flying   { --type-c: #a98ff3; }
.pkm-psychic  { --type-c: #f95587; }
.pkm-bug      { --type-c: #a6b91a; }
.pkm-rock     { --type-c: #b6a136; }
.pkm-ghost    { --type-c: #735797; }
.pkm-dragon   { --type-c: #6f35fc; }
.pkm-dark     { --type-c: #705746; }
.pkm-steel    { --type-c: #b7b7ce; }
.pkm-fairy    { --type-c: #d685ad; }

.pokemon-card:is(.pkm-normal, .pkm-fire, .pkm-water, .pkm-electric, .pkm-grass,
    .pkm-ice, .pkm-fighting, .pkm-poison, .pkm-ground, .pkm-flying, .pkm-psychic,
    .pkm-bug, .pkm-rock, .pkm-ghost, .pkm-dragon, .pkm-dark, .pkm-steel, .pkm-fairy) {
  background: color-mix(in srgb, var(--type-c) 7%, var(--card));
  border-color: color-mix(in srgb, var(--type-c) 32%, var(--line));
}
.pokemon-card:is(.pkm-normal, .pkm-fire, .pkm-water, .pkm-electric, .pkm-grass,
    .pkm-ice, .pkm-fighting, .pkm-poison, .pkm-ground, .pkm-flying, .pkm-psychic,
    .pkm-bug, .pkm-rock, .pkm-ghost, .pkm-dragon, .pkm-dark, .pkm-steel, .pkm-fairy) .pkm-art {
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, color-mix(in srgb, var(--type-c) 24%, #dfe5ee) 100%);
}
.pokemon-card:is(.pkm-normal, .pkm-fire, .pkm-water, .pkm-electric, .pkm-grass,
    .pkm-ice, .pkm-fighting, .pkm-poison, .pkm-ground, .pkm-flying, .pkm-psychic,
    .pkm-bug, .pkm-rock, .pkm-ghost, .pkm-dragon, .pkm-dark, .pkm-steel, .pkm-fairy) .pkm-sprite {
  background: linear-gradient(160deg, color-mix(in srgb, var(--type-c) 14%, #eef1f6) 0%, color-mix(in srgb, var(--type-c) 20%, #dfe5ee) 100%);
}
.pokemon-card:is(.pkm-normal, .pkm-fire, .pkm-water, .pkm-electric, .pkm-grass,
    .pkm-ice, .pkm-fighting, .pkm-poison, .pkm-ground, .pkm-flying, .pkm-psychic,
    .pkm-bug, .pkm-rock, .pkm-ghost, .pkm-dragon, .pkm-dark, .pkm-steel, .pkm-fairy) .pkm-stage {
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--type-c) 14%, #eef1f6) 0%, color-mix(in srgb, var(--type-c) 22%, #dfe5ee) 100%);
}

/* ---------- 宝可梦卡舞台：相关截图散成一叠“照片”做背景铺满，立绘叠在最上层 ----------
   主役卡最多 20 张、非主役卡最多 8 张（见 index.php render_pokemon_card）；
   .pkm-collage 用 flex-wrap 让照片按可用宽度自动折行铺满，行内用负 margin 叠放。 */
.pkm-stage {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 18px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 60%, #eef1f6 0%, #dfe5ee 100%);
  cursor: zoom-in;
}
/* 点击照片以外的空白处，把叠成一堆的照片摊开成不重叠的网格，方便挑中想要的那张；再点一次收回。 */
.pkm-stage.is-spread { cursor: zoom-out; }
.pkm-collage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}
.pkm-photo {
  --rot: 0deg;
  --ty: 0px;
  position: relative;
  pointer-events: auto;
  flex: none;
  width: 76px;
  background: #fff;
  padding: 4px 4px 12px;
  border-radius: 3px;
  margin: 5px -17px;
  box-shadow: 0 8px 18px rgba(20, 24, 33, 0.28);
  transform: rotate(var(--rot)) translateY(var(--ty));
  transition: transform 0.3s ease, margin 0.3s ease;
}
.pkm-stage.is-spread .pkm-photo { --rot: 0deg; --ty: 0px; margin: 7px 6px; }
.pkm-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
/* 照片下方"拍立得白边"里的日期戳：像素字体日期（文件名解析）+ 所属游戏图标，
   落在白边留白区，不盖在照片本体上。主役卡与小卡片都显示，小卡片（36px 宽）
   用更小的字号/图标塞进去。 */
.pkm-photo-meta {
  position: absolute;
  right: 4px;
  bottom: 2px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}
.pkm-photo-date {
  font-family: 'Silkscreen', var(--mono);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
}
.pkm-photo-game-icon {
  width: 10px;
  height: 10px;
  object-fit: contain;
  image-rendering: pixelated;
  flex: none;
}
/* 旋转/纵向错位按 6 张一组循环，20 张里也能看出散落感而不用逐张手调。 */
.pkm-photo:nth-child(6n+1) { --rot: -9deg; --ty: 12px; z-index: 1; }
.pkm-photo:nth-child(6n+2) { --rot: 6deg; --ty: -15px; z-index: 3; }
.pkm-photo:nth-child(6n+3) { --rot: -4deg; --ty: 7px; z-index: 2; }
.pkm-photo:nth-child(6n+4) { --rot: 8deg; --ty: -6px; z-index: 4; }
.pkm-photo:nth-child(6n+5) { --rot: -7deg; --ty: 13px; z-index: 1; }
.pkm-photo:nth-child(6n+6) { --rot: 3deg; --ty: -11px; z-index: 3; }
.pkm-photo:hover { transform: rotate(0deg) scale(1.14); box-shadow: 0 14px 28px rgba(20, 24, 33, 0.35); z-index: 9; }

.pkm-art-overlay { position: relative; z-index: 5; display: grid; place-items: center; }
.pkm-art-overlay img {
  width: 172px;
  height: 172px;
  object-fit: contain;
  filter: drop-shadow(0 16px 20px rgba(20, 24, 33, 0.4));
}
.pkm-art-overlay .dex-no { position: absolute; top: -4px; left: -4px; z-index: 1; }

.pkm-shots-caption { margin: 0 0 8px; font-size: 11.5px; color: var(--ink-soft); }
.pkm-shots-caption a { color: var(--red-deep); font-weight: 700; }

/* 非主役卡片：舞台与照片缩小一圈，8 张也能在窄卡片里铺开。 */
.pokemon-card:not(.pokemon-card--spotlight) .pkm-stage { min-height: 148px; padding: 14px 8px; }
.pokemon-card:not(.pokemon-card--spotlight) .pkm-photo { width: 36px; margin: 3px -9px; padding: 2px 2px 7px; box-shadow: 0 4px 9px rgba(20, 24, 33, 0.24); }
.pokemon-card:not(.pokemon-card--spotlight) .pkm-stage.is-spread .pkm-photo { margin: 5px 4px; }
.pokemon-card:not(.pokemon-card--spotlight) .pkm-photo-meta { right: 2px; bottom: 1px; gap: 1px; }
.pokemon-card:not(.pokemon-card--spotlight) .pkm-photo-date { font-size: 6px; letter-spacing: 0; }
.pokemon-card:not(.pokemon-card--spotlight) .pkm-photo-game-icon { width: 6px; height: 6px; }
.pokemon-card:not(.pokemon-card--spotlight) .pkm-art-overlay img { width: 96px; height: 96px; filter: drop-shadow(0 8px 12px rgba(20, 24, 33, 0.35)); }

/* ---------- 相关列表（原生 details） ---------- */
details { margin-top: 6px; border-radius: var(--radius-sm); transition: background-color 0.4s ease, box-shadow 0.4s ease; }
summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--red-deep);
  user-select: none;
}
summary:hover { text-decoration: underline; }
.rel-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.rel-list li { margin-bottom: 4px; }
.rel-list small { color: var(--ink-soft); }

/* ---------- 截图卡片 ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 9px;
}
.gallery-card { display: block; }
.shot-media { position: relative; background: #e4e9f0; overflow: hidden; }
/* 游戏截图实拍统一为 16:9（数据库实测 1280×720 / 1920×1080 全量覆盖），与原图比例一致，不裁切。 */
.shot-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #e4e9f0; transition: transform 0.35s ease; }
.gallery-card:hover .shot-thumb { transform: scale(1.05); }
.gallery-caption { padding: 8px 10px 10px; }

/* 匹配宝可梦标注：弱化为图片下方一行小字（图标无底色）。 */
.shot-pkm {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}
.shot-pkm-icon { width: 16px; height: 16px; object-fit: contain; image-rendering: pixelated; flex: none; }
.shot-text {
  margin: 6px 0 2px;
  font-size: 12px;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shot-game { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-soft); }

/* ---------- 截图按宝可梦归类（分组标题 + 卡片图标标注） ---------- */
.gallery-group { margin-bottom: 20px; scroll-margin-top: 108px; border-radius: var(--radius-sm); transition: background-color 0.4s ease, box-shadow 0.4s ease; }
.gallery-group:last-of-type { margin-bottom: 0; }
/* 从今日宝可梦背景照片点击跳转过来时，短暂高亮命中的目标（截图分组 / 事件卡 /
   本卡"相关地点"列表）方便肉眼定位；三种目标标签不同（section/div/details），
   统一用外发光，不依赖各自的 border-radius 细节。 */
.is-jump-target { box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 55%, transparent), 0 0 24px color-mix(in srgb, var(--amber) 35%, transparent) !important; }
.gallery-group.is-jump-target { background: color-mix(in srgb, var(--amber) 12%, transparent); }
.event-card.is-jump-target, details.is-jump-target { background: color-mix(in srgb, var(--amber) 10%, var(--card)); }
.gallery-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}
.gallery-group-icon {
  width: 28px;
  height: 28px;
  flex: none;
  padding: 3px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--type-c, #a8a878);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.gallery-group-icon img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  object-fit: contain;
}
.gallery-group-title small { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.gallery-group-title a {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--red-deep);
}
.gallery-group-title a:hover { text-decoration: underline; }

/* ---------- 截图卡片 · 游戏主题（对齐 Game Snapshot 网页端卡片；变量同时供 .game-divider 聚簇分隔条复用） ---------- */
.theme-za               { --game: #19a78f; --game-bg: #dcefe9; --game-ink: #075f52; }
.theme-lets-go-pikachu  { --game: #e0a923; --game-bg: #f8edc9; --game-ink: #765408; }
.theme-arceus           { --game: #c79245; --game-bg: #eee4d0; --game-ink: #69471a; }
.theme-pearl            { --game: #8b79c4; --game-bg: #e8e2f3; --game-ink: #514183; }
.theme-scarlet          { --game: #d7443f; --game-bg: #f4dfd9; --game-ink: #85231f; }
.theme-violet           { --game: #7453b8; --game-bg: #e9e2f3; --game-ink: #493079; }
.theme-sword            { --game: #2588c7; --game-bg: #dcebf4; --game-ink: #125579; }
.theme-n64              { --game: #287b54; --game-bg: #dce9df; --game-ink: #155139; }
.gallery-card.theme-default { --game: #8a8578; --game-bg: var(--card); --game-ink: var(--ink-soft); }

.gallery-card[class*="theme-"] {
  background: var(--game-bg);
  border-color: color-mix(in srgb, var(--game) 30%, var(--line));
}
.gallery-card[class*="theme-"] .shot-game { color: var(--game-ink); }

/* ---------- 聚簇分隔条：同宝可梦分组内，跨列插在每次切换游戏的第一张截图前 ---------- */
.game-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--game-ink, var(--ink-soft));
  border-bottom: 2px solid color-mix(in srgb, var(--game, #a8a578) 45%, var(--line));
}
.game-divider:first-child { margin-top: 0; }
.game-divider img { width: 16px; height: 16px; object-fit: contain; flex: none; }
.game-divider .mini-emblem--text {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--game, #333);
  color: #fff;
  font: bold 9px Georgia, serif;
  flex: none;
}

.game-emblem {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 1;
  width: 30px;
  height: 30px;
  padding: 5px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--game, #333) 88%, #111);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}
.game-emblem img { width: 100%; height: 100%; object-fit: contain; display: block; }
.game-emblem--text { color: #fff; font: bold 11px Georgia, serif; }

.mini-emblem { width: 14px; height: 14px; object-fit: contain; display: inline-block; flex: none; }
.mini-emblem--text {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--game, #333);
  color: #fff;
  font: bold 8px Georgia, serif;
}

/* ---------- 展开查看更多（原生 details，无 JS 可用） ---------- */
.more-cards { margin-top: 14px; }
.more-cards summary {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--red-deep);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, background 0.15s;
}
.more-cards summary:hover { border-color: var(--red); background: var(--screen); text-decoration: none; }
.more-cards[open] summary { margin-bottom: 4px; }
.more-cards .card-grid,
.more-cards .gallery-grid { margin-top: 12px; }

/* ---------- 页脚（深色机身，呼应顶栏） ---------- */
.footer {
  background: var(--shell);
  color: var(--shell-ink-soft);
  border-top: 3px solid var(--red);
  padding: 22px 16px 40px;
  text-align: center;
  font-size: 13px;
}
.footer p { margin: 6px 0; max-width: 1080px; margin-left: auto; margin-right: auto; }
.footer a { color: var(--shell-ink); }
.footer-meta { font-size: 12px; opacity: 0.75; }

/* ---------- AROUND YOU ---------- */
.nearby-empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  color: var(--ink-soft);
}
.nearby-empty p { margin: 0 0 12px; font-size: 13px; }

.nearby-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--red), var(--rose));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(224, 32, 31, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nearby-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(224, 32, 31, 0.4); }
.nearby-btn:disabled { opacity: 0.65; cursor: wait; }

.badge--near { background: #d1fae5; color: #065f46; }

.place-card .place-media { aspect-ratio: 16 / 9; background: #e4e9f0; }
.place-card .place-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.place-card .card-body h3 { margin-top: 8px; }

.pkm-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.pkm-chip {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.nearby-note { text-align: center; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; }
  .site-nav { overflow-x: auto; width: 100%; }
  .card--hero { grid-column: span 1; }
  .pokemon-card--spotlight .pkm-sprite { padding: 18px; }
  .pokemon-card--spotlight .pkm-art { padding: 16px; }
  .pokemon-card--spotlight .pkm-art img { width: 132px; height: 132px; }
  .pkm-stage { min-height: 200px; padding: 22px 10px; }
  .pkm-photo { width: 62px; margin: 0 -14px; }
  .pkm-art-overlay img { width: 138px; height: 138px; }
  .hero-date h1 { font-size: 26px; }
  .date-nav { width: 32px; height: 32px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
  .pokemon-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); }
  .hero, .section, .pokemon-card, .gallery-group { scroll-margin-top: 132px; }
}
