:root {
  --ink: #14305a;
  --ink-dim: #5a6f90;
  --blue-900: #0f3a7d;
  --blue-700: #1f5fbf;
  --blue-500: #3a86d6;
  --blue-300: #9fcaf3;
  --blue-100: #e7f2ff;
  --blue-50: #f4f9ff;
  --white: #ffffff;
  --orange: #f07a2a;
  --line: rgba(58, 134, 214, 0.22);
  --gold: #e0a100;
  --silver: #8a9bb3;
  --bronze: #c0703a;
  --font-ui: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --font-display: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Zen Kaku Gothic New", "Meiryo", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--blue-50);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--blue-700);
}

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

/* 背景：空色から白へのグラデーションに、ゲームと同じモグをうっすら散らす */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 15% 8%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 50% 35% at 90% 20%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 70%),
    linear-gradient(#cfe6ff, #eef6ff 45%, #ffffff);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../image/chara_mog.png") 0 0 / 72px 72px repeat;
  opacity: 0.045;
}

.sub-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.sub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.sub-header h1 {
  margin: 0;
  color: var(--blue-700);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.06em;
}

/* 見出しと戻るボタンは画面上部に固定し、見出しは中央に置く */
.sub-header-fixed {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  margin: -20px -16px 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 2px solid var(--blue-300);
  box-shadow: 0 4px 12px rgba(31, 95, 191, 0.1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.sub-header-fixed .back-link {
  justify-self: start;
}

.sub-header-fixed h1 {
  text-align: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--blue-300);
  border-radius: 8px;
  background: var(--white);
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  background: var(--blue-100);
}

.back-link:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

.panel {
  border: 1px solid #cfe3fb;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 14px rgba(31, 95, 191, 0.08);
}

.fineprint {
  color: var(--ink-dim);
  font-size: 12px;
}
