/* ============================================================
   雲笈物語 Cloudscroll Tales — 门户全站样式
   浅色清透乙女风：白底 + 粉紫柔光渐变 + 圆角柔和阴影
   移动端 375px 优先；触控目标 >= 44px；封面 3:4
   （旧「深色古风金」版已整体替换为本浅色主题；无深色切换项。）
   ============================================================ */

:root {
  /* 底色 / 面 */
  --bg: #fdfbff;
  --bg-soft: #f5edfb;
  --surface: #ffffff;
  --surface-2: #faf4fe;

  /* 线条 */
  --line: rgba(150, 120, 195, 0.16);
  --line-strong: rgba(150, 120, 195, 0.34);

  /* 粉紫主色 */
  --pink: #ff7fb0;
  --pink-soft: #ffd9e8;
  --purple: #9b83f5;
  --purple-soft: #e6def9;
  --accent: linear-gradient(135deg, #ff8fbf 0%, #a17cf0 100%);
  --accent-solid: #b16fd8;

  /* 文字 */
  --text: #43384f;
  --text-strong: #2c2338;
  --muted: #8a7e9a;
  --link: #c5588f;

  /* 语义 */
  --ok: #3fae7a;
  --danger: #dd5f78;
  --gold: #c98cff; /* 兼容旧类名（badge-gold 等）→ 复用为柔紫强调 */

  --serif: "Noto Serif TC", "Noto Serif SC", "Source Han Serif TC",
    "Source Han Serif SC", "Songti TC", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    "Hiragino Sans GB", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 14px 36px rgba(158, 122, 214, 0.16);
  --shadow-soft: 0 6px 18px rgba(158, 122, 214, 0.12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(ellipse at 12% -6%, rgba(255, 190, 220, 0.55) 0%, transparent 42%),
    radial-gradient(ellipse at 92% 4%, rgba(190, 200, 255, 0.5) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 108%, rgba(226, 200, 255, 0.45) 0%, transparent 46%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

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

.site-header, .site-main, .site-footer { position: relative; z-index: 1; }

/* ---------- 柔光飘粒（旧萤火层复用为浅色粉光） ---------- */
#fireflies {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.firefly {
  position: absolute;
  bottom: -24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 176, 210, 0.85), rgba(255, 176, 210, 0));
  opacity: 0;
  animation: floatUp 13s linear infinite, flicker 3.2s ease-in-out infinite alternate;
}
.firefly:nth-child(3n) { background: radial-gradient(circle, rgba(184, 190, 255, 0.8), rgba(184, 190, 255, 0)); }
.firefly:nth-child(3n+1) { background: radial-gradient(circle, rgba(226, 194, 255, 0.8), rgba(226, 194, 255, 0)); }
@keyframes floatUp {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(-108vh) translateX(40px); }
}
@keyframes flicker {
  0% { opacity: 0.05; transform: scale(0.7); }
  100% { opacity: 0.5; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .firefly { animation: none; opacity: 0.18; }
}

/* ---------- 页头 ---------- */
:root { --maxw: 1800px; --pad-x: clamp(16px, 3vw, 48px); }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px var(--pad-x);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.brand a { text-decoration: none; display: flex; align-items: baseline; gap: 8px; }
.brand-zh {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.brand-en {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* 顶栏搜索框（仅首页注入） */
.header-search { flex: 1 1 100%; order: 3; }
.search-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  box-shadow: var(--shadow-soft);
}
.search-input::placeholder { color: rgba(138, 126, 154, 0.7); }
.search-input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 143, 191, 0.15); }

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--text);
  font-size: 0.95rem;
  border-radius: 10px;
}
.site-nav a:hover { color: var(--accent-solid); background: var(--surface-2); text-decoration: none; }
.btn-login {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}
.btn-login:hover { text-decoration: none; filter: brightness(1.05); transform: translateY(-1px); }

.lang-select {
  min-height: 40px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.lang-select:focus { outline: none; border-color: var(--line-strong); }

/* 窄屏：英文品牌名较长，隐藏重复的英文副标并收紧字距，避免顶栏溢出 */
@media (max-width: 479px) {
  .brand-en { display: none; }
  .brand-zh { font-size: 1.2rem; letter-spacing: 0.12em; }
  .site-nav { gap: 2px; }
  .site-nav a { padding: 0 9px; }
}

/* 顶栏 >= 640px：搜索框回到中间一行 */
@media (min-width: 640px) {
  .header-search { flex: 1 1 auto; order: 0; max-width: 360px; margin: 0 20px; }
}

/* ---------- 主体 ---------- */
.site-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--pad-x) 64px;
}
.home-section { margin-top: 8px; }

.section-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--text-strong);
  letter-spacing: 0.16em;
  margin: 38px 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-title::before {
  content: "";
  width: 6px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
}
.section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  order: 1;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.section-more {
  order: 2;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.section-more:hover { color: var(--accent-solid); text-decoration: none; }

/* 版块标题旁的「ⓘ」说明气泡 */
.info-tip {
  order: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  margin-left: 2px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: normal;
  cursor: help;
  flex-shrink: 0;
}
.info-tip:hover, .info-tip:focus { color: var(--accent-solid); outline: none; }
.info-bubble {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: min(300px, 74vw);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: normal;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.info-tip:hover .info-bubble,
.info-tip:focus .info-bubble,
.info-tip:focus-within .info-bubble { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Hero ---------- */
.hero { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.hero-main { flex: 1; min-width: 0; }
.hero-side { display: flex; flex-direction: column; gap: 16px; }

.hero-splash {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.hero-splash:hover { text-decoration: none; }
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 8s ease;
}
.hero-splash:hover .hero-bg { transform: scale(1.06); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(120, 70, 150, 0.12) 0%, rgba(40, 24, 66, 0.16) 45%, rgba(30, 18, 52, 0.62) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
  padding: 26px 24px;
  color: #fff;
}
.hero-eyebrow {
  align-self: flex-start;
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
}
.hero-title {
  font-family: var(--serif);
  margin: 14px 0 6px;
  font-size: 2rem;
  letter-spacing: 0.14em;
  text-shadow: 0 3px 18px rgba(30, 12, 48, 0.55);
}
.hero-tagline {
  margin: 0 0 16px;
  font-size: 1rem;
  max-width: 40ch;
  text-shadow: 0 2px 12px rgba(30, 12, 48, 0.5);
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-banner {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 98px;
  padding: 18px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: #5a3d6e;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-banner:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.hero-banner-eyebrow { font-size: 0.72rem; letter-spacing: 0.18em; opacity: 0.75; text-transform: uppercase; }
.hero-banner-title { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; letter-spacing: 0.04em; }

/* 渐变占位色板 */
.grad-a { background: linear-gradient(135deg, #ffe0ec 0%, #efe0ff 100%); }
.grad-b { background: linear-gradient(135deg, #e2ecff 0%, #fbe0ff 100%); }
.grad-c { background: linear-gradient(135deg, #ffe9d8 0%, #ffe0ef 100%); }
.grad-d { background: linear-gradient(135deg, #ddf1ff 0%, #e8e0ff 100%); }

@media (min-width: 820px) {
  .hero { flex-direction: row; align-items: stretch; }
  .hero-main { flex: 2.3; }
  .hero-side { flex: 1; }
  .hero-splash, .hero-content { min-height: 360px; }
  .hero-title { font-size: 2.5rem; }
}

/* ---------- 编推佳作：左大卡 + 右 2×2 ---------- */
.picks-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
.pick-big {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 300px;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.pick-big:hover { text-decoration: none; }
.pick-big-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 8s ease;
}
.pick-big:hover .pick-big-bg { transform: scale(1.06); }
.pick-big-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(40, 24, 66, 0.05) 30%, rgba(30, 18, 52, 0.66) 100%);
}
.pick-big-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  padding: 22px 22px;
  color: #fff;
}
.pick-big-title {
  font-family: var(--serif);
  margin: 10px 0 4px;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  text-shadow: 0 3px 16px rgba(30, 12, 48, 0.55);
}
.pick-big-tagline { margin: 0 0 14px; font-size: 0.92rem; text-shadow: 0 2px 12px rgba(30, 12, 48, 0.5); }
.pick-big .card-ribbon { position: static; align-self: flex-start; }

.picks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

@media (min-width: 820px) {
  .picks-layout { grid-template-columns: 1.05fr 2fr; align-items: stretch; }
  .pick-big, .pick-big-content { min-height: 100%; }
  .pick-big-content { min-height: 360px; }
}

/* ---------- 游戏卡片网格 ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--pink-soft);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.card-cover-wrap { position: relative; }
.card-cover {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  background: var(--bg-soft);
  display: block;
}
.card-ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 11px;
  border-radius: 999px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(60, 30, 80, 0.18);
}
.ribbon-update { background: linear-gradient(135deg, #ff7fb0, #ff5c8f); }
.ribbon-serial { background: linear-gradient(135deg, #9b83f5, #7b6ef0); }
.ribbon-complete { background: linear-gradient(135deg, #5ac0a0, #3fae7a); }
.ribbon-soon { background: rgba(255, 255, 255, 0.9); color: #9186a0; box-shadow: 0 4px 12px rgba(120, 90, 150, 0.14); }
.card-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.68rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ok);
  box-shadow: 0 4px 10px rgba(60, 30, 80, 0.12);
}
.card-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-family: var(--serif); font-size: 1.05rem; color: var(--text-strong); letter-spacing: 0.06em; margin: 0; }
.card-tagline {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags { font-size: 0.76rem; color: var(--accent-solid); margin-top: auto; letter-spacing: 0.02em; }
.card-tags.light { color: rgba(255, 255, 255, 0.9); }
.card-meta { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }

/* 占位卡（敬请期待，明确不可点） */
.game-card.is-placeholder { cursor: default; }
.game-card.is-placeholder:hover { transform: translateY(-2px); border-color: var(--line); box-shadow: var(--shadow-soft); }
.placeholder-cover {
  aspect-ratio: 3 / 4;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-glyph { font-size: 2.2rem; color: rgba(255, 255, 255, 0.85); text-shadow: 0 2px 10px rgba(150, 110, 190, 0.35); }
.placeholder-title { color: var(--muted) !important; }

.search-hidden { display: none !important; }
.section-empty { display: none !important; }
.home.is-filtering #hero,
.home.is-filtering .promo-wide { display: none; }
.home-search-empty { display: none; text-align: center; color: var(--muted); padding: 30px 0; }
.home-search-empty.show { display: block; }

/* ---------- 按风格分类：筛选条 ---------- */
.genre-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.genre-chip {
  min-height: 38px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}
.genre-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); color: var(--accent-solid); }
.genre-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(255, 143, 191, 0.28);
}

/* ---------- 人气角色立绘 ---------- */
.rank-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rank-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.rank-card:hover { transform: translateY(-6px); border-color: var(--pink-soft); box-shadow: var(--shadow); text-decoration: none; }
.rank-card.is-placeholder { cursor: default; }
.rank-card.is-placeholder:hover { transform: translateY(-2px); border-color: var(--line); box-shadow: var(--shadow-soft); }
.rank-portrait-wrap { position: relative; }
.rank-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(60, 30, 80, 0.2);
}
.rank-badge.rank-1 { background: linear-gradient(135deg, #ffcf6b, #f2a83a); }
.rank-badge.rank-2 { background: linear-gradient(135deg, #cfd6e6, #a7b0c6); }
.rank-badge.rank-3 { background: linear-gradient(135deg, #e6b48c, #cf8f5f); }
.rank-badge.rank-n { background: rgba(96, 72, 120, 0.72); }
.rank-body { padding: 10px 12px 14px; text-align: center; }
.rank-name { font-family: var(--serif); font-size: 1rem; color: var(--text-strong); letter-spacing: 0.06em; }
.rank-source { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }
.rank-heat { font-size: 0.78rem; color: var(--accent-solid); margin-top: 5px; font-weight: 600; }

/* ---------- 通栏 promo ---------- */
.promo-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 36px 0 8px;
  padding: 22px 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: #6a4574;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.promo-wide:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.promo-wide-text { display: flex; flex-direction: column; gap: 4px; }
.promo-wide-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; letter-spacing: 0.04em; }
.promo-wide-sub { font-size: 0.88rem; opacity: 0.82; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}
.badge-free { color: var(--ok); border-color: rgba(63, 174, 122, 0.35); background: rgba(63, 174, 122, 0.08); }
.badge-gold { color: var(--accent-solid); border-color: var(--line-strong); background: rgba(177, 111, 216, 0.08); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--accent-solid);
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(255, 143, 191, 0.3);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 10px 26px rgba(255, 143, 191, 0.4); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
}
.btn-sm { min-height: 38px; padding: 8px 18px; font-size: 0.9rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { width: 100%; }

/* ---------- 详情页 ---------- */
.game-hero { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.game-cover-wrap {
  align-self: center;
  width: min(62vw, 300px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.game-cover-wrap img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.game-head { text-align: center; }
.game-title {
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--text-strong);
  letter-spacing: 0.16em;
  margin: 0 0 6px;
}
.game-tagline { color: var(--muted); font-size: 1rem; margin: 0 0 10px; }
.game-tags { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.game-desc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px;
  font-size: 0.98rem;
  box-shadow: var(--shadow-soft);
}
.game-desc p { margin: 0 0 1em; }
.game-desc p:last-child { margin-bottom: 0; }
.game-actions { display: flex; flex-direction: column; gap: 10px; }
.game-actions .redeem-link { text-align: center; font-size: 0.92rem; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.game-meta-line { text-align: center; color: var(--muted); font-size: 0.85rem; }

.char-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.char-item {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  box-shadow: var(--shadow-soft);
}
.char-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  background: var(--bg-soft);
}
.char-name { margin-top: 8px; font-size: 0.88rem; color: var(--text-strong); letter-spacing: 0.06em; }

.shots-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.shots-row img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

/* ---------- 面板 / 表单（账户、兑换） ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  margin: 18px 0;
  box-shadow: var(--shadow-soft);
}
.panel h2 { font-family: var(--serif); margin: 0 0 8px; font-size: 1.2rem; color: var(--text-strong); letter-spacing: 0.1em; }
.panel .hint { color: var(--muted); font-size: 0.88rem; margin: 0 0 14px; }

.form-row { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.input {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
}
.input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 143, 191, 0.14); }
.input::placeholder { color: rgba(138, 126, 154, 0.6); }

.msg { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.92rem; margin: 10px 0; display: none; }
.msg.show { display: block; }
.msg-error { background: rgba(221, 95, 120, 0.1); border: 1px solid rgba(221, 95, 120, 0.35); color: var(--danger); }
.msg-ok { background: rgba(63, 174, 122, 0.1); border: 1px solid rgba(63, 174, 122, 0.35); color: var(--ok); }
.msg-info { background: rgba(177, 111, 216, 0.08); border: 1px solid var(--line); color: var(--text); }

/* 旧手动签到入口已停用；每日登录奖励由登录会话恢复后自动领取。 */
#checkin { display: none !important; }

/* 降级状态（后端未开通） */
.offline-notice {
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.6);
  padding: 34px 20px;
  margin: 24px 0;
  box-shadow: var(--shadow-soft);
}
.offline-notice .offline-icon { font-size: 2rem; margin-bottom: 8px; }
.offline-notice h2 { font-family: var(--serif); color: var(--text-strong); letter-spacing: 0.12em; margin: 0 0 10px; font-size: 1.25rem; }
.offline-notice p { color: var(--muted); max-width: 560px; margin: 0 auto 18px; }
.offline-notice .offline-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }

/* 游戏库列表 */
.lib-list { display: flex; flex-direction: column; gap: 12px; }
.lib-item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-soft);
}
.lib-cover { width: 66px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.lib-info { flex: 1; min-width: 0; }
.lib-title { font-family: var(--serif); color: var(--text-strong); font-size: 1rem; margin: 0 0 4px; letter-spacing: 0.06em; }
.lib-chapters { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 静态页 ---------- */
.static-page { max-width: 760px; margin: 0 auto; }
.static-page h1 {
  font-family: var(--serif);
  color: var(--text-strong);
  letter-spacing: 0.16em;
  font-size: 1.6rem;
  text-align: center;
  margin: 26px 0 6px;
}
.static-page .page-sub { text-align: center; color: var(--muted); font-size: 0.88rem; margin: 0 0 24px; }
.static-page h2 { font-family: var(--serif); color: var(--text-strong); font-size: 1.12rem; letter-spacing: 0.08em; margin: 28px 0 8px; }
.static-page p, .static-page li { color: var(--text); font-size: 0.95rem; }
.static-page a { color: var(--link); }
.static-page .placeholder-note {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
  background: var(--surface-2);
}
.lang-block { display: none; }
.lang-block.active { display: block; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 16px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
}
.footer-links { display: flex; justify-content: center; gap: 4px 18px; flex-wrap: wrap; margin-bottom: 10px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.footer-links a:hover { color: var(--accent-solid); }
.footer-ai-note { margin: 4px 0; font-size: 0.78rem; opacity: 0.85; }
.footer-lang { margin-top: 12px; }

.loading-hint { text-align: center; color: var(--muted); padding: 40px 0; }

/* 占位卡「敬请期待」轻提示 toast */
#portal-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(60, 40, 84, 0.94);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 60;
  box-shadow: 0 10px 30px rgba(60, 30, 90, 0.35);
}
#portal-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- >= 640px ---------- */
@media (min-width: 640px) {
  .games-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .rank-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .game-hero { flex-direction: row; align-items: flex-start; }
  .game-cover-wrap { width: 280px; flex-shrink: 0; }
  .game-head { text-align: left; }
  .game-tags { justify-content: flex-start; }
  .game-hero-right { flex: 1; display: flex; flex-direction: column; gap: 14px; }
  .game-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .game-meta-line { text-align: left; }
  .shots-row { grid-template-columns: 1fr 1fr; }
  .offline-notice .offline-actions { flex-direction: row; justify-content: center; }
  .form-row { flex-direction: row; }
  .form-row .input { flex: 1; }
}

/* ---------- >= 960px ---------- */
@media (min-width: 960px) {
  .games-grid { grid-template-columns: repeat(4, 1fr); }
  .rank-grid { grid-template-columns: repeat(4, 1fr); }
  /* 编推右侧固定 2×2，不随主网格变宽 */
  .picks-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 2.7rem; }
}

/* ---------- 宽屏加密：让卡片更小、一行更满、铺满界面 ---------- */
@media (min-width: 1400px) {
  .games-grid { grid-template-columns: repeat(5, 1fr); }
  .rank-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1800px) {
  .games-grid { grid-template-columns: repeat(6, 1fr); }
}
.age-gate{position:fixed;inset:0;z-index:1000;background:rgba(38,25,52,.88);display:grid;place-items:center;padding:20px}.age-card{max-width:480px;text-align:center}.age-card .btn{margin:6px}.auth-tabs{display:flex;gap:8px;flex-wrap:wrap}.panel>.input,.panel>textarea,.panel>label{display:block;margin:10px 0}.economy-grid{display:grid;gap:16px}.balances{display:flex;gap:24px;font-size:1.4rem;margin:16px 0}.invite-code{font-size:1.4rem;letter-spacing:.16em}.comments-section{margin-top:32px}.comment-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);padding:14px;margin:12px 0;box-shadow:var(--shadow-soft)}.comment-card header{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:.84rem}.comment-card p{white-space:pre-wrap}.comment-actions{display:flex;gap:8px;flex-wrap:wrap}.comment-actions button{border:0;background:transparent;color:var(--link);cursor:pointer}.replies{margin-left:22px;border-left:2px solid var(--line);padding-left:12px}.replies .comment-card{box-shadow:none}.comments-section textarea{min-height:100px;resize:vertical}@media(min-width:640px){.economy-grid{grid-template-columns:repeat(3,1fr)}}
.gem-store{margin-top:16px}.gem-packs{display:grid;gap:12px;margin-top:16px}.gem-pack{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:var(--radius-sm);padding:14px}.gem-pack b{font-size:1.2rem}.payment-notice{margin-bottom:16px;border-color:var(--accent)}@media(min-width:640px){.gem-packs{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---------- 管理後台（admin.html）---------- */
.admin-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 0.9rem; }
.admin-table th, .admin-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.admin-table th { color: var(--muted); font-weight: 600; }
.admin-filter { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.admin-filter .btn.active { filter: brightness(1.15); box-shadow: 0 6px 16px rgba(255, 143, 191, 0.3); }
.report-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin: 12px 0; box-shadow: var(--shadow-soft); }
.report-card header { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.84rem; flex-wrap: wrap; }
.report-card .comment-body { white-space: pre-wrap; margin: 8px 0; }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 四大产品线（v2 改版） ---------- */
/* 产品线入口带：hero 下方 4 张大卡 */
.category-band { display: grid; grid-template-columns: 1fr; gap: 14px; }
.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 128px;
  padding: 18px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: #5a3d6e;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
a.category-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.category-glyph { font-size: 1.6rem; line-height: 1; color: rgba(255, 255, 255, 0.95); text-shadow: 0 2px 10px rgba(150, 110, 190, 0.4); }
.category-name { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; letter-spacing: 0.04em; }
.category-tag { font-size: 0.8rem; opacity: 0.78; }
.category-card.is-soon { cursor: default; }
.category-card.is-soon .category-glyph,
.category-card.is-soon .category-name,
.category-card.is-soon .category-tag { opacity: 0.55; }
.category-card.is-soon:hover { transform: translateY(-2px); }

/* 「开发中·敬请期待」小徽章（产品线卡内 / 版块标题旁通用） */
.cat-badge-soon {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #9186a0;
  box-shadow: 0 4px 12px rgba(120, 90, 150, 0.14);
}
.section-title .cat-badge-soon { margin-left: 12px; align-self: center; }

/* 版块副标语 */
.section-sub { margin: -6px 0 14px; font-size: 0.86rem; color: var(--muted); }

/* 预告卡（announced）：真实封面 + 即将上线角标，不可点进详情 */
.ribbon-announce { background: linear-gradient(135deg, #b9a5ff, #9b83f5); }
.game-card.is-announce { cursor: default; }
.game-card.is-announce .card-cover { filter: saturate(0.8); opacity: 0.92; }
.game-card.is-announce:hover { transform: translateY(-2px); border-color: var(--line); box-shadow: var(--shadow-soft); }

/* browse 页产品线 chip 行（链接导航，样式对齐 genre-chip） */
.cat-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.cat-strip .cat-chip { display: inline-flex; align-items: center; text-decoration: none; }
.cat-strip .cat-chip:hover { text-decoration: none; }

/* 顶栏搜索过滤时隐藏产品线入口带（对齐 promo-wide 规则） */
.home.is-filtering .category-band-section { display: none; }

@media (min-width: 480px) {
  .category-band { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .category-band { grid-template-columns: repeat(4, 1fr); }
}
