:root {
  --bg: #fff7fb;
  --paper: rgba(255, 255, 255, .82);
  --paper-solid: #ffffff;
  --text: #322734;
  --muted: #725d74;
  --pink: #ff74ad;
  --pink-2: #ffd1e3;
  --blue: #6bb7ff;
  --purple: #8b5cf6;
  --line: rgba(255, 116, 173, .28);
  --shadow: 0 22px 60px rgba(255, 105, 170, .20);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-rounded, "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 176, 211, .55), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(107, 183, 255, .20), transparent 26rem),
    linear-gradient(180deg, #fff7fb 0%, #fff 45%, #f7f2ff 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }

.bg-deco::before, .bg-deco::after {
  content: "♡ ✦ ♡ ✦ ♡";
  position: fixed;
  z-index: -1;
  color: rgba(255, 116, 173, .18);
  font-size: 7rem;
  letter-spacing: .15em;
  pointer-events: none;
}
.bg-deco::before { top: 90px; left: -80px; transform: rotate(-12deg); }
.bg-deco::after { bottom: 40px; right: -140px; transform: rotate(14deg); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 14px min(5vw, 54px);
  backdrop-filter: blur(18px);
  background: rgba(255, 247, 251, .72);
  border-bottom: 1px solid rgba(255, 116, 173, .20);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 10px 25px rgba(255, 116, 173, .30);
}
.nav {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  padding: 9px 13px;
  color: var(--muted);
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
}
.nav a:hover { background: rgba(255, 116, 173, .12); color: var(--text); }
.menu-btn { display: none; border: 0; background: white; border-radius: 14px; padding: 9px 12px; }

main { width: min(1180px, 92vw); margin: 0 auto; }
.hero-shell {
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 34px;
  align-items: center;
  padding: 64px 0 34px;
}
.hero-copy {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .58);
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 12px;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .18em;
  color: var(--pink);
  text-transform: uppercase;
}
h1, h2, h3 { margin: 0; line-height: 1.12; }
h1 { font-size: clamp(2.35rem, 6vw, 5.3rem); letter-spacing: -.06em; }
h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); letter-spacing: -.04em; }
h3 { font-size: 1.35rem; }
.lead {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.9;
}
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { color: white; background: linear-gradient(135deg, var(--pink), #ff98c2); box-shadow: 0 14px 30px rgba(255, 116, 173, .30); }
.btn.ghost { background: white; border: 1px solid var(--line); color: var(--text); }
.btn.admin-link { background: #2f2732; color: white; }

.hero-card {
  min-height: 520px;
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  box-shadow: 0 30px 70px rgba(67, 37, 77, .25);
  border: 8px solid white;
  background: #fff;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-card .hero-label {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}
.hero-label strong { font-size: 1.4rem; display: block; }
.hero-label span { color: var(--muted); display: block; margin-top: 5px; }

.section { padding: 76px 0 20px; }
.section-head { display: grid; gap: 10px; margin-bottom: 24px; }
.section-head p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.8; }

.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.game-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  min-height: 380px;
  color: white;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 12%, rgba(30, 20, 35, .16) 40%, rgba(30, 20, 35, .88));
  z-index: -1;
}
.game-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.game-card:hover img { transform: scale(1.05); }
.game-card-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px; }
.status-pill, .tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--text);
  font-weight: 900;
  font-size: .82rem;
}
.game-card h3 { margin-top: 12px; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.game-card p { margin: 12px 0 18px; color: rgba(255,255,255,.88); line-height: 1.7; }
.tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.tag { background: rgba(255,255,255,.18); color: white; border: 1px solid rgba(255,255,255,.32); }

.game-detail {
  margin: 82px 0 0;
  padding: 24px;
  border-radius: 34px;
  background: rgba(255, 255, 255, .70);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.game-detail.dark {
  background: linear-gradient(135deg, rgba(39, 28, 52, .94), rgba(79, 53, 111, .88));
  color: white;
  border-color: rgba(255,255,255,.18);
}
.game-detail.dark .text-card,
.game-detail.dark .character-card,
.game-detail.dark .system-card { color: var(--text); }
.detail-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.detail-hero img { width: 100%; height: 100%; min-height: 350px; object-fit: cover; border-radius: 24px; }
.detail-copy { padding: 18px; display: grid; align-content: center; gap: 18px; }
.detail-copy p { margin: 0; line-height: 1.9; color: var(--muted); }
.game-detail.dark .detail-copy p { color: rgba(255,255,255,.75); }
.detail-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-meta .tag { background: rgba(255, 116, 173, .12); color: var(--text); border-color: rgba(255, 116, 173, .18); }
.game-detail.dark .detail-meta .tag { background: rgba(255,255,255,.12); color: white; border-color: rgba(255,255,255,.20); }
.text-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.text-card, .system-card {
  background: var(--paper-solid);
  border-radius: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  line-height: 1.85;
}
.text-card p, .system-card p { color: var(--muted); }
.character-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.character-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(255, 116, 173, .12);
}
.character-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: center top; }
.character-card .body { padding: 16px; }
.character-card small { color: var(--pink); font-weight: 900; }
.character-card p { color: var(--muted); line-height: 1.7; margin-bottom: 0; }

.news-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.news-card {
  background: white;
  border-radius: 24px;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(67, 37, 77, .10);
}
.news-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.news-card .body { padding: 16px; }
.news-card time { color: var(--pink); font-size: .82rem; font-weight: 900; }
.news-card p { color: var(--muted); line-height: 1.7; }

.quote-section { position: relative; }
.quote-carousel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.quote-card {
  position: relative;
  background: linear-gradient(135deg, white, #fff1f8);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 14px 34px rgba(255, 116, 173, .14);
  min-height: 180px;
}
.quote-card::before { content: "“"; position: absolute; right: 20px; top: -18px; color: rgba(255, 116, 173, .20); font-size: 7rem; line-height: 1; }
.quote-card blockquote { margin: 0; font-size: 1.15rem; line-height: 1.8; font-weight: 800; }
.quote-card p { color: var(--pink); font-weight: 900; margin: 18px 0 0; }

.filter-row { display: flex; gap: 10px; overflow-x: auto; padding: 0 0 12px; margin-bottom: 12px; }
.filter-row button {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
.filter-row button.active { color: white; background: var(--pink); border-color: var(--pink); }
.gallery-grid {
  columns: 4 220px;
  column-gap: 16px;
}
.gallery-item {
  break-inside: avoid;
  margin: 0 0 16px;
  border-radius: 22px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(67, 37, 77, .10);
  cursor: zoom-in;
}
.gallery-item img { width: 100%; }
.gallery-item .cap { padding: 12px 14px; }
.gallery-item b { display: block; font-size: .95rem; }
.gallery-item span { color: var(--muted); font-size: .82rem; }

.footer {
  width: min(1180px, 92vw);
  margin: 72px auto 28px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  color: var(--muted);
}
.footer strong { color: var(--text); }
.footer-links { display: flex; gap: 12px; flex-wrap: wrap; }
.footer a { color: var(--pink); font-weight: 900; }

.lightbox {
  width: min(1000px, 92vw);
  border: 0;
  border-radius: 26px;
  padding: 12px;
  background: white;
  box-shadow: 0 30px 90px rgba(0,0,0,.35);
}
.lightbox::backdrop { background: rgba(38, 24, 42, .65); backdrop-filter: blur(8px); }
.lightbox img { max-height: 78vh; margin: auto; border-radius: 18px; }
.lightbox p { margin: 12px 8px 0; text-align: center; color: var(--muted); }
.close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.90);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 920px) {
  .nav { display: none; position: absolute; top: 66px; left: 4vw; right: 4vw; padding: 14px; border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); justify-content: flex-start; }
  .nav.open { display: flex; }
  .menu-btn { display: inline-flex; }
  .hero-shell, .detail-hero, .text-grid { grid-template-columns: 1fr; }
  .hero-shell { padding-top: 32px; }
  .hero-card { min-height: 380px; }
  .game-grid, .character-grid, .news-grid, .quote-carousel { grid-template-columns: 1fr; }
  .character-card img { aspect-ratio: 16/10; }
  .footer { flex-direction: column; align-items: flex-start; }
}
