/* 血月的工作室 · Blood Moon Studio — colors follow the blood-moon studio mark:
   flat fills, thick ink outlines, hard offset shadows (no gradients, glow or blur). */
:root {
  --bg: #F7F1EE;
  --surface: #FFFFFF;
  --surface-2: #F1E7E4;
  --ink: #2B2350;
  --ink-2: #5B5070;
  --line: #2B2350;
  --shadow: #2B2350;
  --blood: #B3122E;
  --blood-deep: #7A0E1F;
  --blood-bright: #D7263D;
  --on-blood: #FFFFFF;
  --chip: #F6DDE0;
  --chip-ink: #7A0E1F;
  --hero-bg: #B3122E;
  --hero-accent: #FFC9D0;
  /* Tiled crescents and four-point stars, flat fills only. */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='%23B3122E' fill-opacity='.1'%3E%3Cpath d='M38 14a16 16 0 1 0 12 26a13 13 0 1 1-12-26z'/%3E%3Cpath d='M128 112a10 10 0 1 0 7.5 16a8 8 0 1 1-7.5-16z'/%3E%3Cpath d='M132 30l2.2 6.8 6.8 2.2-6.8 2.2-2.2 6.8-2.2-6.8-6.8-2.2 6.8-2.2z'/%3E%3Cpath d='M42 128l1.6 4.4 4.4 1.6-4.4 1.6-1.6 4.4-1.6-4.4-4.4-1.6 4.4-1.6z'/%3E%3Ccircle cx='92' cy='80' r='2.5'/%3E%3Ccircle cx='160' cy='164' r='2'/%3E%3Ccircle cx='12' cy='86' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
  --hero-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='%23FFFFFF' fill-opacity='.12'%3E%3Cpath d='M38 14a16 16 0 1 0 12 26a13 13 0 1 1-12-26z'/%3E%3Cpath d='M128 112a10 10 0 1 0 7.5 16a8 8 0 1 1-7.5-16z'/%3E%3Cpath d='M132 30l2.2 6.8 6.8 2.2-6.8 2.2-2.2 6.8-2.2-6.8-6.8-2.2 6.8-2.2z'/%3E%3Cpath d='M42 128l1.6 4.4 4.4 1.6-4.4 1.6-1.6 4.4-1.6-4.4-4.4-1.6 4.4-1.6z'/%3E%3Ccircle cx='92' cy='80' r='2.5'/%3E%3Ccircle cx='160' cy='164' r='2'/%3E%3Ccircle cx='12' cy='86' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #140D1C;
    --surface: #1F1529;
    --surface-2: #2A1D37;
    --ink: #F5EEF0;
    --ink-2: #C3B6C8;
    --line: #F5EEF0;
    --shadow: #000000;
    --blood: #D7263D;
    --blood-deep: #8E1226;
    --blood-bright: #F0475C;
    --chip: #3A1622;
    --chip-ink: #FFB3BE;
    --hero-bg: #7A0E1F;
    --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='%23F0475C' fill-opacity='.13'%3E%3Cpath d='M38 14a16 16 0 1 0 12 26a13 13 0 1 1-12-26z'/%3E%3Cpath d='M128 112a10 10 0 1 0 7.5 16a8 8 0 1 1-7.5-16z'/%3E%3Cpath d='M132 30l2.2 6.8 6.8 2.2-6.8 2.2-2.2 6.8-2.2-6.8-6.8-2.2 6.8-2.2z'/%3E%3Cpath d='M42 128l1.6 4.4 4.4 1.6-4.4 1.6-1.6 4.4-1.6-4.4-4.4-1.6 4.4-1.6z'/%3E%3Ccircle cx='92' cy='80' r='2.5'/%3E%3Ccircle cx='160' cy='164' r='2'/%3E%3Ccircle cx='12' cy='86' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #140D1C;
  --surface: #1F1529;
  --surface-2: #2A1D37;
  --ink: #F5EEF0;
  --ink-2: #C3B6C8;
  --line: #F5EEF0;
  --shadow: #000000;
  --blood: #D7263D;
  --blood-deep: #8E1226;
  --blood-bright: #F0475C;
  --chip: #3A1622;
  --chip-ink: #FFB3BE;
  --hero-bg: #7A0E1F;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='%23F0475C' fill-opacity='.13'%3E%3Cpath d='M38 14a16 16 0 1 0 12 26a13 13 0 1 1-12-26z'/%3E%3Cpath d='M128 112a10 10 0 1 0 7.5 16a8 8 0 1 1-7.5-16z'/%3E%3Cpath d='M132 30l2.2 6.8 6.8 2.2-6.8 2.2-2.2 6.8-2.2-6.8-6.8-2.2 6.8-2.2z'/%3E%3Cpath d='M42 128l1.6 4.4 4.4 1.6-4.4 1.6-1.6 4.4-1.6-4.4-4.4-1.6 4.4-1.6z'/%3E%3Ccircle cx='92' cy='80' r='2.5'/%3E%3Ccircle cx='160' cy='164' r='2'/%3E%3Ccircle cx='12' cy='86' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg) var(--pattern) repeat;
  color: var(--ink);
  font: 16px/1.7 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--blood); text-underline-offset: 3px; }
a:hover { color: var(--blood-bright); }
:focus-visible { outline: 3px solid var(--blood-bright); outline-offset: 3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-head { border-bottom: 2px solid var(--line); background: var(--surface); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.brand img { width: 36px; height: 36px; }
.brand:hover { color: var(--ink); }
.brand span { line-height: 1.2; }
.brand small { display: block; font-weight: 600; font-size: 12px; color: var(--ink-2); line-height: 1.2; letter-spacing: .06em; text-transform: uppercase; }
.lang { display: flex; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; font-size: 14px; font-weight: 700; flex: none; }
.lang a, .lang span { padding: 4px 12px; text-decoration: none; color: var(--ink); }
.lang [aria-current] { background: var(--blood); color: var(--on-blood); }

/* Hero */
.hero {
  padding: 56px 0 48px; margin-bottom: 48px;
  background: var(--hero-bg) var(--hero-pattern) repeat; color: #FFFFFF;
  border-bottom: 2px solid var(--line);
}
.hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.hero h1 { margin: 0 0 12px; font-size: clamp(32px, 6vw, 52px); line-height: 1.15; letter-spacing: .01em; }
.hero h1 em { font-style: normal; color: var(--hero-accent); }
.hero p { margin: 0; max-width: 34em; color: #FFFFFF; opacity: .92; font-size: 18px; }
.hero .moon {
  width: 200px; height: 200px; border-radius: 32px;
  background: #FFFFFF; border: 2px solid #2B2350; box-shadow: 6px 6px 0 #2B2350;
  display: grid; place-items: center;
}
.hero .moon img { width: 150px; height: 150px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0 0; padding: 0; list-style: none; font-weight: 700; font-size: 15px; }
.facts li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--hero-accent); margin-right: 8px; vertical-align: middle; }

/* Section heading */
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; font-size: 26px; }
.section-title span { font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: .08em; text-transform: uppercase; }

/* Games: sidebar tabs + panel */
.games { margin-bottom: 56px; }
.games-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 24px; align-items: start; }
.sidebar {
  position: sticky; top: 16px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 24px;
  box-shadow: 6px 6px 0 var(--shadow); padding: 16px;
}
.sidebar-head { display: flex; align-items: baseline; justify-content: space-between; margin: 2px 4px 12px; }
.sidebar-head b { font-size: 16px; }
.sidebar-head small { color: var(--ink-2); font-weight: 700; }
.tabs { display: flex; flex-direction: column; gap: 12px; }
.tab {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 10px 14px; border: 2px solid var(--line); border-radius: 18px;
  background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  box-shadow: 4px 4px 0 var(--shadow); transition: transform .08s ease, box-shadow .08s ease;
}
.tab:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.tab:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow); }
.tab img { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--line); flex: none; }
.tab-text { min-width: 0; }
.tab b { display: block; font-size: 16px; line-height: 1.3; word-break: keep-all; }
.tab small { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.tab[aria-selected="true"] { background: var(--blood); color: var(--on-blood); }
.tab[aria-selected="true"] small { color: var(--on-blood); opacity: .85; }

/* Panel */
.panel {
  background: var(--surface); border: 2px solid var(--line); border-radius: 24px;
  box-shadow: 6px 6px 0 var(--shadow); padding: 28px;
}
.panel[hidden] { display: none; }
.game-head { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin-bottom: 20px; }
.game-head > img { width: 104px; height: 104px; border-radius: 24px; border: 2px solid var(--line); }
.game-head h3 { margin: 0; font-size: 30px; line-height: 1.2; }
.game-head .alt { margin: 2px 0 0; color: var(--ink-2); font-weight: 600; }
.game-head .pitch { margin: 6px 0 0; font-size: 18px; font-weight: 700; color: var(--blood); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.chips li { padding: 2px 12px; border-radius: 999px; background: var(--chip); color: var(--chip-ink); font-size: 14px; font-weight: 700; }
.chips li.status { background: var(--blood); color: var(--on-blood); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font-weight: 800; text-decoration: none; box-shadow: 3px 3px 0 var(--shadow);
}
.btn:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.btn.primary { background: var(--blood); color: var(--on-blood); }
.btn.primary:hover { color: var(--on-blood); background: var(--blood-bright); }
.btn.static { box-shadow: none; cursor: default; border-style: dashed; }
.btn.static:hover { transform: none; }

.promo { margin: 0 0 24px; border: 2px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface-2); }
.promo a { display: block; }
.promo img { width: 100%; height: auto; }

.cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; }
.copy p { margin: 0 0 14px; }
.copy h4, .side h4 { margin: 0 0 10px; font-size: 18px; }
.features { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.features li { padding: 10px 14px; border-radius: 14px; background: var(--surface-2); }
.features b { color: var(--blood); }

.shots-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 28px 0 10px; }
.shots-head h4 { margin: 0; font-size: 18px; }
.shots-head small { color: var(--ink-2); }
.shots {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -4px;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.shots a { flex: none; width: 180px; scroll-snap-align: start; border: 2px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.shots img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }

.character { display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: center; padding: 16px; border-radius: 18px; background: var(--surface-2); }
.character img { width: 140px; height: auto; }
.character p { margin: 0; }

/* Footer */
.site-foot { border-top: 2px solid var(--line); background: var(--surface); padding: 32px 0 40px; font-size: 15px; }
.site-foot .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px; }
.site-foot h2 { margin: 0 0 8px; font-size: 16px; }
.site-foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.site-foot .copyright { grid-column: 1 / -1; margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }

/* Lightbox */
dialog.lightbox { padding: 0; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); max-width: 92vw; max-height: 92vh; overflow: hidden; }
dialog.lightbox::backdrop { background: rgba(20, 13, 28, .82); }
dialog.lightbox img { max-width: 92vw; max-height: calc(92vh - 4px); width: auto; height: auto; }
dialog.lightbox button {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer;
}

@media (max-width: 1000px) {
  .games-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
  .tab small { display: none; }
  .cols { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .games-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sidebar { position: static; padding: 0; border: 0; box-shadow: none; background: none; border-radius: 0; }
  .sidebar-head { display: none; }
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .hero { padding: 32px 0 28px; margin-bottom: 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 20px; }
  .hero .moon { width: 112px; height: 112px; border-radius: 22px; order: -1; box-shadow: 4px 4px 0 var(--shadow); }
  .hero .moon img { width: 84px; height: 84px; }
  .hero p { font-size: 16px; }
  .section-title { font-size: 22px; }
  .tab { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 6px; border-radius: 14px; box-shadow: 3px 3px 0 var(--shadow); }
  .tab img { width: 44px; height: 44px; }
  .tab b { font-size: 13px; }
  .tab small { display: none; }
  .panel { padding: 18px; border-radius: 18px; box-shadow: 4px 4px 0 var(--shadow); }
  .game-head { grid-template-columns: 72px 1fr; gap: 14px; }
  .game-head > img { width: 72px; height: 72px; border-radius: 16px; }
  .game-head h3 { font-size: 22px; }
  .game-head .pitch { font-size: 16px; }
  .cols { grid-template-columns: 1fr; gap: 20px; }
  .shots a { width: 148px; }
  .character { grid-template-columns: 88px 1fr; gap: 14px; }
  .character img { width: 88px; }
  .site-foot .wrap { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .tab, .btn { transition: none; }
}
