/* 多読ベスト — クリスマス特集（/christmas/）だけで読みこむ。動きは src/christmas.js（ハロウィン特集の halloween.css をもとに、色を雪の夜にした）
   夜の特集なので、ページの中身はサイトの明るい／暗いの設定によらず夜の色にする */
.page-xm main {
  --bg: #0b1730;
  --bg2: #102043;
  --card: #142a52;
  --ink: #f4f8ff;
  --ink2: #d6e2f5;
  --muted: #a9bcd9;
  --line: #2a4370;
  --brand: #ff6b6b;
  --brand2: #8ce99a;
  --xm-or: #ff6b6b;
  --xm-gold: #ffd43b;
  --xm-vi: #74c0fc;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(116, 192, 252, 0.25), transparent 60%),
    radial-gradient(900px 500px at 0% 40%, rgba(255, 107, 107, 0.12), transparent 60%),
    linear-gradient(#0b1730, #081226 60%, #0b1730);
  color: var(--ink);
}
.page-xm main a { color: inherit; }
.page-xm main .h2,
.page-xm main h2 { color: var(--ink); }

/* ---------- ヒーロー ---------- */
.xm-hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.xm-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
  z-index: -3;
}
.xm-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(6, 14, 32, 0.92) 0%, rgba(6, 14, 32, 0.6) 38%, rgba(6, 14, 32, 0) 70%), linear-gradient(0deg, #0b1730 0%, rgba(11, 23, 48, 0) 40%);
}
.xm-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.xm-hero-in {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 90px 20px 44px;
  max-width: 100%;
}
.xm-hero .crumb,
.xm-hero .crumb a { color: #cfe0fb; }
.xm-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font: 900 0.82rem/1.2 'Zen Maru Gothic', sans-serif;
  letter-spacing: 0.06em;
  color: #2b1300;
  background: linear-gradient(90deg, #ffd43b, #ff6b6b);
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: 0 0 24px rgba(255, 107, 107, 0.55);
}
.xm-hero h1 {
  margin: 14px 0 10px;
  font: 900 clamp(2.1rem, 6.5vw, 4.4rem) / 1.08 'Zen Maru Gothic', sans-serif;
  color: #fff;
  text-shadow: 0 4px 30px rgba(116, 192, 252, 0.7);
}
.xm-hero h1 em {
  font-style: normal;
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #ffd43b, #ff6b6b 45%, #8ce99a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.xm-hero-lead {
  max-width: 34em;
  color: #e9e1ff;
  font-size: clamp(0.98rem, 2.4vw, 1.12rem);
  line-height: 1.85;
}
.xm-cd {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 20px;
  color: #cfe0fb;
  font-weight: 700;
}
.xm-cd-n {
  display: flex;
  gap: 6px;
}
.xm-cd-n span {
  display: grid;
  place-items: center;
  min-width: 58px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(12, 28, 60, 0.75);
  border: 1px solid rgba(255, 212, 59, 0.45);
  box-shadow: inset 0 0 18px rgba(116, 192, 252, 0.35);
}
.xm-cd-n b {
  font: 800 1.5rem/1 Fraunces, Georgia, serif;
  color: #ffd43b;
}
.xm-cd-n small { font-size: 0.68rem; color: #bcd3f0; }
.xm-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.xm-cta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 20px;
  border-radius: 999px;
  font: 900 1rem/1 'Zen Maru Gothic', sans-serif;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff !important;
  backdrop-filter: blur(6px);
}
.xm-cta a.go {
  background: linear-gradient(90deg, #ff6b6b, #e03131);
  border-color: transparent;
  box-shadow: 0 8px 26px rgba(247, 103, 7, 0.5);
}
.xm-mascot {
  position: absolute;
  right: max(2vw, 10px);
  bottom: 10px;
  width: clamp(120px, 22vw, 240px);
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(255, 107, 107, 0.45));
  animation: xm-bob 3.6s ease-in-out infinite;
  z-index: 0;
}
@keyframes xm-bob {
  50% { transform: translateY(-12px) rotate(-3deg); }
}

/* ---------- 終わったとき ---------- */
.xm-endmsg { display: none; }
.xm-ended .xm-endmsg {
  display: block;
  margin: 20px auto;
  padding: 22px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
}
.xm-ended [data-xm-live] { display: none !important; }

/* ---------- セクション ---------- */
.xm-sec { width: min(1100px, 100%); margin: 0 auto; padding: 34px 16px 10px; }
.xm-sec-h { margin-bottom: 18px; }
.xm-sec-h .kicker {
  font: 800 0.8rem/1 Fraunces, Georgia, serif;
  letter-spacing: 0.18em;
  color: var(--xm-or);
  margin: 0 0 6px;
}
.xm-sec-h h2 { font: 900 clamp(1.5rem, 4.2vw, 2.2rem) / 1.25 'Zen Maru Gothic', sans-serif; margin: 0 0 8px; }
.xm-sec-h p { color: var(--ink2); margin: 0; }

/* ゲームのカード */
.xm-games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 720px) {
  .xm-games { grid-template-columns: minmax(0, 1fr); }
}
.xm-game {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 250px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: #fff;
  background: #13284f;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
  font: inherit;
}
.xm-game:hover,
.xm-game:focus-visible {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 0 2px var(--c, #ff6b6b) inset, 0 0 40px color-mix(in srgb, var(--c, #ff6b6b) 45%, transparent);
}
.xm-game > img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.xm-game:hover > img.bg { transform: scale(1.06); }
.xm-game::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6, 14, 34, 0.95) 0%, rgba(6, 14, 34, 0.55) 55%, rgba(6, 14, 34, 0.05) 100%);
}
.xm-game > img.sp {
  position: absolute;
  top: 12px;
  right: 14px;
  width: clamp(78px, 22%, 120px);
  height: auto;
  z-index: 1;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
  animation: xm-bob 3.2s ease-in-out infinite;
}
.xm-game-in { position: relative; z-index: 1; padding: 18px 18px 16px; display: grid; gap: 6px; }
.xm-game-tag {
  justify-self: start;
  font: 900 0.72rem/1 'Zen Maru Gothic', sans-serif;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--c, #ff6b6b);
  color: #fff;
}
.xm-game b.t { font: 900 1.35rem/1.3 'Zen Maru Gothic', sans-serif; }
.xm-game small.d { color: #dbe7fa; line-height: 1.6; font-size: 0.9rem; }
.xm-game-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.xm-game-f em { font-style: normal; font-size: 0.8rem; color: #ffd43b; }
.xm-game-f span.play {
  font: 900 0.95rem/1 'Zen Maru Gothic', sans-serif;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.xm-game:hover span.play { background: var(--c, #ff6b6b); border-color: transparent; }
.xm-lvchips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; color: var(--ink2); font-size: 0.85rem; }
.xm-lvchips i {
  font-style: normal;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}

/* 本棚（サイトの .row・.card を夜の色で） */
.xm-shelf .row { margin-top: 6px; }
.xm-shelf .sub { color: var(--ink2); }
.page-xm main .card { background: var(--card); border-color: var(--line); }

.xm-tip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(116, 192, 252, 0.22), rgba(255, 107, 107, 0.14));
  border: 1px solid var(--line);
}
.xm-tip img { width: 84px; height: 84px; }

/* ---------- 世界の行事・祝日ナビ（クリスマスの由来）への大きなリンク ---------- 2026-10-26 ユーザー「コレへの大き目のリンクも作成して紹介してね」 */
.xm-link {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 212, 59, 0.45);
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(116, 192, 252, 0.22));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s;
}
.xm-link:hover { transform: translateY(-3px); box-shadow: 0 24px 60px rgba(255, 107, 107, 0.25); }
.xm-link > img { width: 100%; height: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; }
.xm-link-in { display: flex; flex-direction: column; gap: 10px; justify-content: center; padding: clamp(18px, 3vw, 32px); min-width: 0; }
.xm-link-in small { color: var(--xm-gold); font-weight: 700; letter-spacing: 0.04em; }
.xm-link-in b { font: 900 clamp(1.3rem, 3.4vw, 1.9rem) / 1.3 'Zen Maru Gothic', sans-serif; color: var(--ink); }
.xm-link-txt { color: var(--ink2); line-height: 1.8; }
.xm-link-go {
  align-self: flex-start;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--xm-or);
  color: #1a0f2e;
  font-weight: 900;
}
.xm-link:hover .xm-link-go span { display: inline-block; transform: translateX(3px); transition: transform 0.2s; }
@media (max-width: 720px) {
  .xm-link { grid-template-columns: minmax(0, 1fr); }
  .xm-link-go { align-self: stretch; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .xm-link, .xm-link:hover { transform: none; transition: none; }
}
.xm-tip p { margin: 0; line-height: 1.8; color: var(--ink2); }

/* ---------- ゲームの画面（全画面） ---------- */
html.xm-lock,
html.xm-lock body { overflow: hidden; overscroll-behavior: none; }
.xm-ov {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #06122a;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr); /* 長い題名で上のバーが画面より広がらないように */
  color: #fff;
  font-family: 'Zen Maru Gothic', system-ui, sans-serif;
}
.xm-ov[hidden] { display: none; }
.xm-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  background: linear-gradient(#0f2347, #0a1833);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.xm-top b { flex: 1; min-width: 0; font-size: 0.98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xm-top button {
  flex: none;
  min-width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
}
.xm-top button.off { opacity: 0.4; text-decoration: line-through; }
.xm-top button.x { padding: 0 12px; font-size: 0.9rem; font-weight: 900; }
.xm-stage { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.xm-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.xm-hud { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; z-index: 2; }
.xm-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.xm-layer > * { pointer-events: auto; }
.hh { padding: 10px 12px 0; display: grid; gap: 6px; }
.hh-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 900; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }
.hh-sc { font: 800 0.95rem/1 Fraunces, Georgia, serif; letter-spacing: 0.04em; }
.hh-sc b { font-size: 1.25rem; color: #ffd43b; }
.hh-cb { color: #ff6b6b; font-size: 0.95rem; }
.hh-lv i { font-style: normal; font-size: 1.2rem; transition: opacity 0.3s, filter 0.3s; }
.hh-lv i.gone { opacity: 0.25; filter: grayscale(1); }
.hh-time { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.hh-time i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff6b6b, #ffd43b); box-shadow: 0 0 12px #ff6b6b; border-radius: inherit; }
.hh-time.fever i { background: linear-gradient(90deg, #f06595, #ffd43b, #74c0fc, #91c8f5); }
.hh-time.candle i { background: linear-gradient(90deg, #ffe066, #fff3bf); box-shadow: 0 0 14px #ffe066; }
.hh-q {
  justify-self: center;
  margin-top: 4px;
  max-width: min(92vw, 560px);
  padding: 10px 20px 12px;
  border-radius: 18px;
  text-align: center;
  background: rgba(10, 24, 54, 0.85);
  border: 2px solid rgba(255, 212, 59, 0.55);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(116, 192, 252, 0.4);
  pointer-events: none; /* 下を通るおばけもタップできるように（ボタンだけ押せる） */
}
.hh-q button { pointer-events: auto; }
.hh-q small { display: block; color: #bcd3f0; font-size: 0.75rem; margin-bottom: 2px; }
.hh-q .pj { font-size: clamp(1.3rem, 5vw, 1.9rem); }
.hh-q .pe { font: 800 clamp(1.4rem, 5.5vw, 2rem) / 1.2 Fraunces, Georgia, serif; }
.hh-q .pl { font: 900 1rem 'Zen Maru Gothic', sans-serif; padding: 8px 16px; border-radius: 99px; border: 0; background: #ff6b6b; color: #fff; cursor: pointer; }
.hh-q.sp small { font-size: 1rem; color: #fff; font-weight: 900; }
.slots { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.slots i {
  font-style: normal;
  width: clamp(24px, 6.5vw, 34px);
  height: clamp(30px, 8vw, 40px);
  display: grid;
  place-items: center;
  border-radius: 8px;
  font: 800 clamp(1rem, 4.5vw, 1.4rem) / 1 Fraunces, Georgia, serif;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 3px solid rgba(255, 255, 255, 0.35);
}
.slots i.got { background: rgba(255, 212, 59, 0.2); border-color: #ffd43b; color: #ffd43b; }
.slots i.now { border-color: #ff6b6b; animation: xm-blink 1s infinite; }
@keyframes xm-blink { 50% { background: rgba(255, 107, 107, 0.3); } }
.hh-keys i { font-style: normal; opacity: 0.25; filter: grayscale(1); font-size: 0.95rem; }
.hh-keys i.got { opacity: 1; filter: none; }
.hh-cnd b { color: #ffe066; }

/* メニュー・結果・一時停止 */
.xm-menu,
.xm-pausebox {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
  background: radial-gradient(circle at 50% 30%, rgba(12, 28, 60, 0.55), rgba(3, 8, 20, 0.85));
}
.xm-card {
  width: min(560px, 100%);
  padding: 22px 20px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(18, 38, 80, 0.96), rgba(22, 10, 46, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(116, 192, 252, 0.25);
  text-align: center;
}
.xm-k { margin: 0; font: 800 0.75rem/1 Fraunces, Georgia, serif; letter-spacing: 0.2em; color: #ff6b6b; }
.xm-card h2 { margin: 6px 0 10px; font-size: clamp(1.4rem, 5vw, 1.9rem); color: #fff; }
.xm-how { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; text-align: left; }
.xm-how li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
.xm-how li span { font-size: 1.2rem; line-height: 1.4; text-align: center; }
.xm-how li p { margin: 0; line-height: 1.7; color: #dbe7fa; font-size: 0.9rem; }
.xm-how b { color: #ffd43b; }
.xm-note { font-size: 0.8rem; color: #a9bcd9; margin: 10px 0 0; line-height: 1.6; }
.xm-lab { margin: 14px 0 6px; font-size: 0.8rem; color: #bcd3f0; font-weight: 900; text-align: left; }
.xm-lvs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.xm-lv,
.xm-mode {
  font: inherit;
  color: #fff;
  cursor: pointer;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 8px;
  display: grid;
  gap: 2px;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.xm-lv b { font-size: 1.05rem; }
.xm-lv small { font-size: 0.7rem; color: #bcd3f0; }
.xm-lv em { font-style: normal; font-size: 0.7rem; color: #ffd43b; font-family: Fraunces, Georgia, serif; }
.xm-lv.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 28%, transparent); transform: translateY(-2px); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 55%, transparent); }
.xm-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.xm-mode { flex: 1 1 140px; font-weight: 900; font-size: 0.88rem; }
.xm-mode.on { border-color: #ff6b6b; background: rgba(255, 107, 107, 0.25); }
.xm-btn {
  font: 900 0.95rem/1.2 'Zen Maru Gothic', sans-serif;
  color: #fff;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
.xm-btn:disabled { opacity: 0.4; cursor: default; }
.xm-btn.main { background: linear-gradient(90deg, #ff6b6b, #e03131); border-color: transparent; box-shadow: 0 8px 24px rgba(247, 103, 7, 0.45); }
.xm-btn.big { width: 100%; margin-top: 16px; padding: 16px; font-size: 1.15rem; }
.xm-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.xm-count { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none !important; }
.xm-count b { font: 800 clamp(4rem, 22vw, 9rem) / 1 Fraunces, Georgia, serif; color: #ffd43b; text-shadow: 0 0 40px #ff6b6b, 0 6px 0 #6b2c00; }

.xm-rank {
  width: 108px;
  height: 108px;
  margin: 4px auto 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 4rem/1 Fraunces, Georgia, serif;
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #91c8f5, #5f3dc4);
  box-shadow: 0 0 40px rgba(116, 192, 252, 0.7);
  animation: xm-pop 0.7s cubic-bezier(0.22, 1.6, 0.36, 1) both;
}
.xm-rank.r-S { background: radial-gradient(circle at 35% 30%, #ffe066, #c92a2a); box-shadow: 0 0 60px rgba(255, 212, 59, 0.9); color: #4a2500; }
.xm-rank.r-A { background: radial-gradient(circle at 35% 30%, #ffa8a8, #e8590c); }
.xm-rank.r-C { background: radial-gradient(circle at 35% 30%, #868e96, #343a40); box-shadow: none; }
@keyframes xm-pop { from { transform: scale(0) rotate(-30deg); } }
.xm-score { margin: 0; font: 800 2.4rem/1.1 Fraunces, Georgia, serif; color: #ffd43b; }
.xm-score small { font: 900 1rem 'Zen Maru Gothic', sans-serif; margin-left: 4px; }
.xm-newbest { margin: 6px 0; font-weight: 900; color: #ff6b6b; animation: xm-blink 1.2s infinite; border-radius: 99px; }
.xm-bestline { margin: 6px 0; font-size: 0.85rem; color: #bcd3f0; }
.xm-stats { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.xm-stats li { padding: 8px 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); }
.xm-stats small { display: block; font-size: 0.7rem; color: #bcd3f0; }
.xm-stats b { font-size: 1.05rem; }
.xm-review { margin-top: 12px; text-align: left; background: rgba(255, 255, 255, 0.05); border-radius: 14px; padding: 8px 12px; }
.xm-review summary { cursor: pointer; font-weight: 900; padding: 4px 0; }
.xm-review ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; max-height: 210px; overflow-y: auto; }
.xm-review li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; min-width: 0; }
.xm-review li.miss { background: rgba(255, 107, 107, 0.14); }
.xm-review li b { font-family: Fraunces, Georgia, serif; font-size: 1.05rem; }
.xm-review li span { color: #d6e2f5; font-size: 0.85rem; min-width: 0; overflow-wrap: anywhere; }
.xm-review li i { font-style: normal; margin-left: auto; font-size: 0.7rem; color: #ff8787; font-weight: 900; flex: none; }
.xm-review button { flex: none; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; border-radius: 8px; width: 32px; height: 30px; cursor: pointer; }
.xm-recs { margin-top: 16px; text-align: left; }
.xm-recs p { margin: 0 0 8px; font-weight: 900; font-size: 0.9rem; }
.xm-recs a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; text-decoration: none; color: #fff; padding: 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); margin-bottom: 6px; }
.xm-recs img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; }
.xm-recs span { font-size: 0.9rem; font-weight: 700; }

/* 脱出ゲームの部屋 */
.es-wrap {
  position: absolute;
  inset: 62px 0 0; /* 上の HUD（ろうそくの時間）にかぶらない */
  overflow-y: auto;
  padding: 8px 14px calc(20px + env(safe-area-inset-bottom));
  display: grid;
  place-items: start center;
}
.es-card {
  position: relative;
  width: min(640px, 100%);
  padding: 18px;
  border-radius: 22px;
  background: rgba(10, 22, 48, 0.88);
  border: 1px solid rgba(255, 212, 59, 0.3);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.es-room { margin: 0 0 10px; font-weight: 900; color: #ffd43b; }
.es-note {
  position: relative;
  padding: 18px 18px 16px 18px;
  border-radius: 6px 18px 8px 16px;
  color: #3a2410;
  background: linear-gradient(135deg, #fff4d6, #f3dca5 60%, #e8c98a);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 0 40px rgba(150, 100, 30, 0.35);
  transform: rotate(-0.6deg);
}
.es-note p { margin: 0; padding-right: 36px; font: 400 clamp(1.02rem, 3.6vw, 1.2rem) / 1.75 Literata, Georgia, serif; }
.es-say { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(80, 45, 10, 0.15); cursor: pointer; font-size: 1rem; }
.es-q { margin: 14px 0 10px; font: 800 clamp(1.05rem, 3.8vw, 1.25rem) / 1.5 Fraunces, Georgia, serif; color: #fff; }
.es-ch { display: grid; gap: 8px; }
.es-c {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.es-c:hover:not(:disabled) { transform: translateX(4px); border-color: #ffd43b; }
.es-c span { font-size: 1.6rem; flex: none; }
.es-c b { font: 700 1.05rem/1.35 Literata, Georgia, serif; }
.es-c.ok { border-color: #51cf66; background: rgba(81, 207, 102, 0.22); }
.es-c.ng { border-color: #ff6b6b; background: rgba(255, 107, 107, 0.16); opacity: 0.7; }
.es-c:disabled { cursor: default; }
.es-ja { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(116, 192, 252, 0.16); border: 1px dashed rgba(177, 151, 252, 0.6); text-align: left; }
.es-ja small { color: #91c8f5; font-weight: 900; }
.es-ja p { margin: 4px 0 0; line-height: 1.8; color: #e7f0ff; font-size: 0.95rem; }
.es-foot { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; margin-top: 14px; }
.es-foot .xm-btn { flex: 1 1 200px; }
.es-door { position: absolute; inset: 0; pointer-events: none !important; perspective: 900px; z-index: 5; }
.es-door i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(90deg, #3b2210, #5c3317 40%, #3b2210);
  box-shadow: inset 0 0 0 10px #2a170a, inset 0 0 60px rgba(0, 0, 0, 0.6);
  animation: es-close 1.4s ease-in-out forwards;
}
.es-door i.l { left: 0; transform-origin: left center; }
.es-door i.r { right: 0; transform-origin: right center; animation-name: es-close-r; }
.es-door b { position: absolute; left: 50%; top: 50%; translate: -50% -50%; font-size: 4rem; animation: es-key 1.4s ease-in-out forwards; filter: drop-shadow(0 0 20px #ffd43b); }
@keyframes es-close { 0% { transform: rotateY(90deg); } 35%, 55% { transform: rotateY(0); } 100% { transform: rotateY(95deg); } }
@keyframes es-close-r { 0% { transform: rotateY(-90deg); } 35%, 55% { transform: rotateY(0); } 100% { transform: rotateY(-95deg); } }
@keyframes es-key { 0%, 25% { opacity: 0; scale: 0.3; } 45% { opacity: 1; scale: 1.2; rotate: 0deg; } 60% { rotate: 90deg; } 100% { opacity: 0; scale: 2; } }

/* ---------- ゲームの手ごたえ（動き）：はねる・飛ぶ・スタンプ・のこり時間の点滅。動かすのは transform と opacity だけ ---------- */
@keyframes xm-bump { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
.hh-sc b, .hh-cb, .hh-lv i, .hh-keys i { display: inline-block; }
.bump { animation: xm-bump 0.32s cubic-bezier(0.22, 1.6, 0.36, 1); }
.hh-lv i.gone.bump { animation: xm-out 0.45s ease-out; }
@keyframes xm-out { 0% { transform: scale(1.4); opacity: 1; filter: none; } 100% { transform: scale(1); } }
.hh-cb.hot { color: #ffd43b; text-shadow: 0 0 12px #ff6b6b, 0 2px 8px rgba(0, 0, 0, 0.8); }
.hh-time.low { background: rgba(255, 80, 80, 0.25); }
.hh-time.low i { background: linear-gradient(90deg, #ff6b6b, #ffa94d); box-shadow: 0 0 14px #ff6b6b; animation: xm-low 0.5s ease-in-out infinite alternate; }
@keyframes xm-low { to { opacity: 0.45; } }
.hh-say { margin-left: 6px; border: 0; border-radius: 99px; width: 30px; height: 26px; background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer; font-size: 0.85rem; vertical-align: middle; }
.hh-sc, .hh-cb, .hh-lv, .hh-keys, .hh-cnd { white-space: nowrap; }
@media (max-width: 360px) {
  .hh { padding: 8px 10px 0; }
  .hh-row { gap: 6px; }
  .hh-sc { font-size: 0.78rem; }
  .hh-sc b { font-size: 1.05rem; }
  .hh-cb { font-size: 0.8rem; }
  .hh-lv i { font-size: 1rem; }
  .hh-keys i { font-size: 0.8rem; }
}
.xm-stage canvas.xm-fxtop { z-index: 4; pointer-events: none; }
.hh-cnd { position: relative; }
.hh-cnd b { display: inline-block; }
.hh-pen { position: absolute; right: 0; top: 100%; font-style: normal; font-weight: 900; color: #ff8787; white-space: nowrap; animation: xm-pen 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes xm-pen { 0% { opacity: 0; transform: translateY(-6px) scale(1.4); } 20% { opacity: 1; transform: translateY(4px) scale(1); } 100% { opacity: 0; transform: translateY(22px); } }
.xm-fly { position: absolute; z-index: 6; pointer-events: none; will-change: transform, opacity; }
.xm-fly.letter { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font: 800 1.3rem/1 Fraunces, Georgia, serif; color: #2b1300; background: radial-gradient(circle at 35% 30%, #fff3bf, #ffd43b 60%, #c92a2a); box-shadow: 0 0 18px #ffd43b; }
.xm-fly.key { font-size: 2rem; filter: drop-shadow(0 0 10px #ffd43b); }
.xm-btn, .xm-lv, .xm-mode, .es-c { -webkit-tap-highlight-color: transparent; }
.xm-btn:active:not(:disabled), .xm-lv:active, .xm-mode:active, .es-c:active:not(:disabled) { transform: scale(0.96); transition-duration: 0.05s; }
.xm-btn { transition: transform 0.15s cubic-bezier(0.22, 1.6, 0.36, 1); }
.xm-btn.sm, .xm-review button.xm-btn.sm { width: auto; height: auto; padding: 7px 14px; font-size: 0.85rem; margin: 4px 0 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
/* サイトが絵文字を絵（img.emo）に置きかえても、ボタンの中で文字と横にならぶように */
.xm-mode { display: flex; align-items: center; justify-content: center; gap: 6px; }
.xm-ov img.emo { width: 1.2em; height: 1.2em; vertical-align: -0.2em; }
/* メニュー・結果のカードは、下からふわっと出る。結果は上から順に（ランク → 得点 → 記録 → 単語） */
.xm-menu > .xm-card, .xm-pausebox > .xm-card { animation: xm-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes xm-in { from { opacity: 0; transform: translateY(26px) scale(0.96); } }
.xm-result .xm-card > * { animation: xm-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
.xm-result .xm-card > :nth-child(2) { animation-delay: 0.08s; }
.xm-result .xm-card > .xm-rank { animation: xm-slam 0.55s cubic-bezier(0.3, 1.5, 0.4, 1) 0.2s both; }
@keyframes xm-slam { 0% { opacity: 0; transform: scale(2.6) rotate(-18deg); } 60% { opacity: 1; transform: scale(0.9) rotate(4deg); } 100% { transform: none; } }
.xm-result .xm-card > :nth-child(4) { animation-delay: 0.45s; }
.xm-result .xm-card > :nth-child(5) { animation-delay: 0.9s; }
.xm-result .xm-card > :nth-child(6) { animation-delay: 1s; }
.xm-result .xm-card > :nth-child(n + 7) { animation-delay: 1.15s; }
.xm-review li { transition: background 0.2s; }
.xm-review li.playing { background: rgba(255, 212, 59, 0.22); }
.xm-notes .xm-note1 { padding: 10px 4px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.xm-notes .xm-note1 p { margin: 4px 0; line-height: 1.65; font-size: 0.9rem; color: #e7f0ff; }
.xm-notes .xm-note1 p[lang='en'] { font-family: Literata, Georgia, serif; }
.xm-notes .nr { display: flex; align-items: center; justify-content: space-between; font-weight: 900; color: #ffd43b !important; }
.xm-notes .nq b { color: #8ce99a; }
.xm-notes .nj { color: #bcd3f0 !important; font-size: 0.85rem !important; }
/* 脱出ゲーム：正解のスタンプ・キーボードの番号 */
.es-stamp { position: absolute; top: 14px; right: 14px; pointer-events: none; animation: xm-stamp 0.5s cubic-bezier(0.3, 1.6, 0.4, 1) both; }
.es-stamp b { display: block; padding: 6px 14px; border: 3px solid #51cf66; border-radius: 10px; color: #51cf66; font: 800 1.15rem/1 Fraunces, Georgia, serif; letter-spacing: 0.06em; transform: rotate(-12deg); background: rgba(20, 40, 20, 0.6); box-shadow: 0 0 20px rgba(81, 207, 102, 0.45); }
@keyframes xm-stamp { 0% { opacity: 0; transform: scale(2.4); } 100% { opacity: 1; transform: scale(1); } }
.es-c kbd { margin-left: auto; flex: none; font: 700 0.75rem/1 system-ui, sans-serif; padding: 4px 7px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.25); color: #bcd3f0; }
@media (hover: none) { .es-c kbd { display: none; } }
.es-c.ok { animation: xm-bump 0.4s cubic-bezier(0.22, 1.6, 0.36, 1); }

@media (prefers-reduced-motion: reduce) {
  .xm-mascot, .xm-game > img.sp, .slots i.now, .xm-newbest { animation: none; }
  .es-door { display: none; }
  .bump, .hh-pen, .hh-time.low i, .xm-menu > .xm-card, .xm-pausebox > .xm-card, .xm-result .xm-card > *, .xm-result .xm-card > .xm-rank, .es-stamp, .es-c.ok, .hh-lv i.gone.bump { animation: none !important; }
  .xm-btn:active:not(:disabled), .xm-lv:active, .xm-mode:active, .es-c:active:not(:disabled) { transform: none; }
}

/* スマホ：タドクロウは右上に小さく（文字とボタンに重ならないように） */
@media (max-width: 640px) {
  .xm-hero { min-height: 0; }
  .xm-hero-in { padding: 70px 16px 30px; }
  .xm-mascot { top: 64px; bottom: auto; right: 8px; width: 92px; }
  .xm-hero h1 { padding-right: 70px; }
  .xm-cd-n span { min-width: 50px; }
  .xm-cta a { flex: 1 1 auto; justify-content: center; padding: 12px 14px; font-size: 0.92rem; }
  .xm-game { min-height: 230px; }
  .xm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xm-card { padding: 18px 14px; }
}

/* ================= クリスマスのゲームの部品（2026-12-05） ================= */
.hh-emo { font-size: 1.3em; margin-right: 6px; vertical-align: -0.12em; }
.hh-rule { justify-self: center; margin: 0; padding: 4px 12px; border-radius: 99px; background: rgba(10, 24, 54, 0.78); font-size: 0.78rem; color: #dbe7fa; font-weight: 700; text-align: center; }

/* 2) おもちゃ工場：プレゼントの札と袋 */
.fa-wrap { position: absolute; inset: 0; pointer-events: none !important; }
.fa-tag {
  position: absolute;
  left: 50%;
  top: 96px;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(92%, 680px);
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(#fffdf6, #fbefd4);
  color: #3b2410;
  border: 3px solid #c92a2a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: auto;
}
.fa-tag::before { content: ''; position: absolute; left: 50%; top: -10px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #ffd43b; box-shadow: 0 0 0 3px #c92a2a; }
.fa-tag.on { opacity: 1; }
.fa-tag b { display: block; font: 800 clamp(1.4rem, 6.4vw, 2.1rem) / 1.2 Fraunces, Georgia, serif; overflow-wrap: anywhere; }
.fa-tag.long b { font: 700 clamp(1.02rem, 4.3vw, 1.35rem) / 1.5 Literata, Georgia, serif; }
.fa-say { margin-top: 6px; border: 0; border-radius: 99px; padding: 4px 12px; background: rgba(201, 42, 42, 0.12); cursor: pointer; font-size: 0.9rem; }
.fa-sacks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(12px + env(safe-area-inset-bottom));
  margin: 0 auto;
  max-width: 760px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  pointer-events: auto;
}
.fa-sacks.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fa-sack {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 22px 6px 12px;
  border: 0;
  border-radius: 44% 44% 22px 22px / 28% 28% 22px 22px;
  background: radial-gradient(circle at 50% 28%, #d1ad82, #95683f 68%, #6e4a2c);
  color: #fff;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), inset 0 -8px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.12s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.fa-sack::before { content: ''; position: absolute; top: 12px; left: 24%; right: 24%; height: 6px; border-radius: 99px; background: #c92a2a; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); }
.fa-sack-i { font-size: clamp(1.7rem, 7.5vw, 2.3rem); line-height: 1.1; }
.fa-sack b { font-size: clamp(0.95rem, 4vw, 1.15rem); text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55); }
.fa-sack small { font: 700 0.72rem/1 Fraunces, Georgia, serif; color: #fff3bf; }
.fa-sack kbd { position: absolute; top: 6px; right: 12px; font: 700 0.7rem/1 system-ui, sans-serif; padding: 3px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.25); color: #fff3bf; }
.fa-sack:active { transform: scale(0.95); }
.fa-sack.ok { box-shadow: 0 0 0 4px #51cf66, 0 0 30px #51cf66; }
.fa-sack.ng { box-shadow: 0 0 0 4px #ff6b6b, 0 0 24px #ff6b6b; }
.fa-sack.hint { box-shadow: 0 0 0 4px #ffd43b, 0 0 30px #ffd43b; }
@media (hover: none) { .fa-sack kbd, .cr-c kbd, .sn-c kbd { display: none; } }

/* 3) キャロル：歌詞のカードと選択肢 */
.cr-wrap {
  position: absolute;
  inset: 54px 0 0;
  overflow-y: auto;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 8px 14px calc(18px + env(safe-area-inset-bottom));
}
.cr-card { position: relative; width: min(680px, 100%); padding: 16px 16px 14px; border-radius: 22px; background: rgba(10, 22, 48, 0.86); border: 1px solid rgba(255, 212, 59, 0.35); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); text-align: center; }
.cr-song { margin: 0 0 6px; display: grid; gap: 2px; }
.cr-song span { font: italic 800 1.05rem Fraunces, Georgia, serif; color: #ffd43b; }
.cr-song small { font-size: 0.72rem; color: #a9bcd9; }
.cr-line { margin: 34px 0 6px; font: 700 clamp(1.3rem, 5.8vw, 2rem) / 1.7 Literata, Georgia, serif; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; }
.cr-w { position: relative; padding: 0 2px; border-radius: 8px; transition: color 0.15s, text-shadow 0.15s; }
.cr-w.now { color: #ffd43b; text-shadow: 0 0 14px rgba(255, 212, 59, 0.7); }
.cr-b { min-width: 3.4em; display: inline-grid; place-items: center; border-bottom: 3px dashed #74c0fc; color: #74c0fc; }
.cr-b.ok { color: #8ce99a; border-bottom: 3px solid #51cf66; }
.cr-b.ng { color: #ff8787; border-bottom: 3px solid #ff6b6b; }
.cr-gap { opacity: 0.55; letter-spacing: 0.05em; }
.cr-ring { position: absolute; left: 50%; top: 50%; width: 2.4em; height: 2.4em; border-radius: 50%; border: 3px solid #74c0fc; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(2); box-shadow: 0 0 16px rgba(116, 192, 252, 0.7); }
.cr-ring.hot { border-color: #ffd43b; box-shadow: 0 0 24px #ffd43b; }
.cr-star { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; transition: opacity 0.2s; will-change: transform; }
.cr-star.on { opacity: 1; }
.cr-star img { width: 34px; height: 34px; display: block; filter: drop-shadow(0 0 10px #ffd43b); }
.cr-ja { margin: 4px 0 0; color: #d6e2f5; font-size: 0.95rem; }
.cr-state { margin: 10px 0 0; min-height: 1.6em; color: #bcd3f0; font-weight: 900; }
.cr-ch { width: min(680px, 100%); display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; min-height: 64px; }
.cr-c { position: relative; padding: 16px 10px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, 0.2); background: rgba(10, 22, 48, 0.9); color: #fff; font: inherit; cursor: pointer; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); transition: opacity 0.2s, transform 0.12s; -webkit-tap-highlight-color: transparent; }
.cr-c b { font: 800 clamp(1.1rem, 4.8vw, 1.35rem) / 1.2 Fraunces, Georgia, serif; }
.cr-c kbd { position: absolute; top: 6px; right: 8px; font: 700 0.7rem/1 system-ui, sans-serif; color: #bcd3f0; }
.cr-c.wait { opacity: 0.6; }
.cr-c:active { transform: scale(0.95); }
.cr-c.ok { border-color: #51cf66; background: rgba(81, 207, 102, 0.25); }
.cr-c.ng { border-color: #ff6b6b; background: rgba(255, 107, 107, 0.2); }

/* 4) 雪だるまリスニング */
.sn-wrap { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - 60px); overflow-y: auto; padding: 8px 12px calc(14px + env(safe-area-inset-bottom)); display: grid; justify-items: center; }
.sn-wrap.wide { top: 60px; left: 38%; max-height: none; align-content: center; }
.sn-card { width: min(600px, 100%); padding: 14px 14px 16px; border-radius: 22px; background: rgba(10, 22, 48, 0.88); border: 1px solid rgba(165, 216, 255, 0.4); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55); text-align: center; }
.sn-n { margin: 0 0 8px; font: 800 0.8rem/1 Fraunces, Georgia, serif; letter-spacing: 0.15em; color: #a5d8ff; }
.sn-play { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.sn-play .xm-btn { padding: 10px 18px; }
.sn-say.playing { box-shadow: 0 0 0 3px #74c0fc, 0 0 20px #74c0fc; }
.sn-q { margin: 12px 0 10px; font: 800 clamp(1.05rem, 4vw, 1.25rem) / 1.45 Fraunces, Georgia, serif; }
.sn-q.ja { font: 900 1rem/1.4 'Zen Maru Gothic', sans-serif; color: #dbe7fa; }
.sn-ch { display: grid; gap: 8px; }
.sn-ch.pic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sn-c { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06); color: #fff; font: inherit; cursor: pointer; transition: transform 0.12s, border-color 0.15s; -webkit-tap-highlight-color: transparent; }
.sn-c b { font-weight: 800; font-size: 1rem; line-height: 1.45; }
.sn-c b[lang='en'] { font: 700 1.02rem/1.4 Literata, Georgia, serif; }
.sn-ch.pic .sn-c { flex-direction: column; justify-content: center; text-align: center; padding: 12px 6px; gap: 6px; }
.sn-emo { font-size: 2rem; line-height: 1; flex: none; }
.sn-ch.pic .sn-emo { font-size: clamp(2.3rem, 10vw, 3rem); }
.sn-c kbd { margin-left: auto; flex: none; font: 700 0.75rem/1 system-ui, sans-serif; padding: 4px 7px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.25); color: #bcd3f0; }
.sn-ch.pic .sn-c kbd { margin: 0; }
.sn-c:hover:not(:disabled) { border-color: #a5d8ff; }
.sn-c:active:not(:disabled) { transform: scale(0.96); }
.sn-c:disabled { cursor: default; }
.sn-c.ok { border-color: #51cf66; background: rgba(81, 207, 102, 0.22); }
.sn-c.ng { border-color: #ff6b6b; background: rgba(255, 107, 107, 0.16); }
.sn-tr { text-align: left; margin-top: 10px; }
.sn-res { margin: 0 0 8px; font-weight: 900; }
.sn-res.ok { color: #8ce99a; }
.sn-res.ng { color: #ff8787; }
.sn-res b { color: #fff; }
.sn-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sn-lines li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); }
.sn-lines button { flex: none; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; border-radius: 8px; width: 32px; height: 30px; cursor: pointer; }
.sn-lines span { font: 400 1rem/1.6 Literata, Georgia, serif; min-width: 0; overflow-wrap: anywhere; }
.sn-ja { margin: 8px 0 0; color: #bcd3f0; font-size: 0.9rem; line-height: 1.7; }
.sn-next { width: 100%; margin-top: 12px; }

/* 6) アドベントカレンダー */
.ad-wrap { position: absolute; inset: 52px 0 0; overflow-y: auto; padding: 8px 12px calc(18px + env(safe-area-inset-bottom)); display: grid; place-items: start center; align-content: start; }
.ad-board { width: min(540px, 100%); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 20px; background: linear-gradient(160deg, rgba(120, 20, 30, 0.88), rgba(20, 70, 45, 0.88)); border: 3px solid #ffd43b; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.3); }
.ad-door {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px solid rgba(255, 230, 160, 0.75);
  background: linear-gradient(145deg, #d6332f, #8f1d1d);
  color: #fff8e1;
  font: 800 clamp(1.1rem, 5vw, 1.6rem) / 1 Fraunces, Georgia, serif;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.ad-door:nth-child(3n + 2) { background: linear-gradient(145deg, #37b24d, #1b6e2e); }
.ad-door:nth-child(3n) { background: linear-gradient(145deg, #339af0, #134e8a); }
.ad-door b { position: relative; z-index: 1; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); }
.ad-door i { position: absolute; right: 4px; bottom: 3px; font-style: normal; font-size: 0.7rem; line-height: 1; }
.ad-door .ad-in { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.5rem; opacity: 0.4; }
.ad-door.lock { filter: grayscale(0.6) brightness(0.7); cursor: not-allowed; }
.ad-door.ok, .ad-door.ng { background: linear-gradient(145deg, #fff8e1, #f3e1b5); color: #8f1d1d; border-color: #ffd43b; }
.ad-door.ok b, .ad-door.ng b { text-shadow: none; }
.ad-door.ad-today { box-shadow: 0 0 0 3px #ffd43b, 0 0 24px #ffd43b; animation: ad-glow 1.6s ease-in-out infinite alternate; }
@keyframes ad-glow { to { box-shadow: 0 0 0 3px #fff3bf, 0 0 36px #ffd43b; } }
.ad-door.can:hover { transform: translateY(-3px) rotate(-2deg); }
.ad-door.opening { animation: ad-open 0.45s ease-in forwards; transform-origin: left center; }
@keyframes ad-open { to { transform: perspective(400px) rotateY(-100deg); opacity: 0.4; } }
.ad-foot { width: min(540px, 100%); margin-top: 12px; display: grid; gap: 8px; text-align: center; }
.ad-foot p { margin: 0; color: #fff; font-weight: 700; text-shadow: 0 2px 8px #000; }
.ad-card { width: min(640px, 100%); padding: 16px; border-radius: 22px; background: rgba(10, 22, 48, 0.92); border: 1px solid rgba(255, 212, 59, 0.35); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); }
.ad-day { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; color: #ffd43b; font-weight: 900; }
.ad-day span { font-size: 1.6rem; }
.ad-q { position: relative; margin: 0; padding: 16px 46px 16px 18px; border-radius: 6px 18px 8px 16px; color: #3a2410; background: linear-gradient(135deg, #fff8e6, #f3e1b5); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 0 40px rgba(150, 100, 30, 0.25); }
.ad-q p { margin: 0; font: 400 clamp(1rem, 3.6vw, 1.15rem) / 1.75 Literata, Georgia, serif; }
.ad-ja { margin: 8px 0 0; color: #d6e2f5; line-height: 1.75; font-size: 0.92rem; }
.ad-ask { margin: 14px 0 10px; font-weight: 900; color: #fff; }
.ad-ask[lang='en'] { font: 800 1.1rem Fraunces, Georgia, serif; }
.ad-ch { display: grid; gap: 8px; }
.ad-c { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
.ad-c b { font: 700 1rem/1.45 'Zen Maru Gothic', sans-serif; }
.ad-c b[lang='en'] { font: 700 1rem/1.5 Literata, Georgia, serif; }
.ad-c small { grid-column: 1; font: 600 0.8rem/1.3 Fraunces, Georgia, serif; color: #bcd3f0; }
.ad-c kbd { grid-row: 1; grid-column: 2; }
.ad-ans { margin-top: 12px; text-align: left; }
.ad-work { margin: 0 0 6px; display: grid; gap: 2px; }
.ad-work b { font: 800 1.15rem/1.3 Fraunces, Georgia, serif; color: #ffd43b; }
.ad-work span { color: #bcd3f0; font-size: 0.85rem; }
.ad-next { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); }
.ad-next small { color: #91c8f5; font-weight: 900; }
.ad-next p[lang='en'] { margin: 4px 0 0; font: 400 1rem/1.7 Literata, Georgia, serif; }
.ad-read { display: block; text-align: center; text-decoration: none; margin-top: 12px; }

/* ごほうびのオーナメント（メニュー・結果・ツリー） */
.xm-orn-i { width: 64px; height: 64px; object-fit: contain; }
.xm-orn-e { display: inline-grid; place-items: center; width: 64px; height: 64px; font-size: 2.6rem; }
.xm-orn-i.sm, .xm-orn-e.sm { width: 34px; height: 34px; font-size: 1.5rem; }
.xm-orns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0 0; }
.xm-orns span { display: grid; justify-items: center; gap: 2px; padding: 6px 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); filter: grayscale(1); opacity: 0.6; max-width: 48%; }
.xm-orns span.got { filter: none; opacity: 1; background: rgba(255, 212, 59, 0.12); }
.xm-orns small { font-size: 0.68rem; color: #bcd3f0; line-height: 1.4; }
.xm-orn-get { margin-top: 12px; display: grid; gap: 8px; opacity: 0; transform: scale(0.8); transition: opacity 0.4s, transform 0.5s cubic-bezier(0.22, 1.6, 0.36, 1); }
.xm-result .xm-card > .xm-orn-get { animation: none; }
.xm-orn-get.show { opacity: 1; transform: none; }
.xm-orn-get > div { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(135deg, rgba(255, 212, 59, 0.22), rgba(255, 107, 107, 0.18)); border: 2px solid #ffd43b; text-align: left; }
.xm-orn-get .xm-orn-i { width: 72px; height: 72px; flex: none; animation: xm-swing 2s ease-in-out infinite; transform-origin: 50% 0; }
.xm-orn-get p { margin: 0; display: grid; }
.xm-orn-get small { color: #ffd43b; font-weight: 900; }
.xm-orn-get b { font-size: 1.15rem; }
.xm-orn-get span { font-size: 0.8rem; color: #d6e2f5; }
.xm-orn-get.xm-toast { margin: 0 0 12px; }
@keyframes xm-swing { 50% { transform: rotate(8deg); } }

/* 特集ページのツリー */
.xm-tree-wrap { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: center; }
.xm-tree { position: relative; aspect-ratio: 1; margin-top: 30px; }
.xm-tree-img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5)); }
.xm-tree-star { position: absolute; left: 50%; top: -12%; width: 22%; height: auto; translate: -50% 0; filter: grayscale(1) brightness(0.55); opacity: 0.55; transition: filter 0.8s, opacity 0.8s; }
.xm-tree.all .xm-tree-star { filter: drop-shadow(0 0 22px #ffd43b) drop-shadow(0 0 40px #ffe066); opacity: 1; animation: xm-twinkle 1.6s ease-in-out infinite alternate; }
@keyframes xm-twinkle { to { scale: 1.08; } }
.xm-tree-o { position: absolute; left: var(--x); top: var(--y); width: 12%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, 0.45); }
.xm-tree-o img { width: 100%; height: 100%; display: block; opacity: 0; transform: scale(0.3); transition: opacity 0.4s, transform 0.6s cubic-bezier(0.22, 1.6, 0.36, 1); transform-origin: 50% 0; }
.xm-tree-o.got { border-color: transparent; }
.xm-tree-o.got img { opacity: 1; transform: none; animation: xm-swing 3.2s ease-in-out infinite; }
.xm-tree-o.new img { filter: drop-shadow(0 0 10px #ffd43b) drop-shadow(0 0 4px #fff); }
.xm-tree.all .xm-tree-o.got img { filter: drop-shadow(0 0 6px rgba(255, 230, 150, 0.9)); }
.xm-tree-n { margin: 0 0 6px; font-weight: 900; font-size: 1.05rem; }
.xm-tree-n b { color: var(--xm-gold); font: 800 1.5rem Fraunces, Georgia, serif; margin-left: 6px; }
.xm-tree-msg { margin: 0 0 12px; color: var(--ink2); line-height: 1.7; }
.xm-orn-how { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 8px 12px; }
.xm-orn-how summary { cursor: pointer; font-weight: 900; padding: 4px 0; }
.xm-orn-list { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.xm-orn-list li { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); opacity: 0.65; min-width: 0; }
.xm-orn-list li.got { opacity: 1; background: rgba(255, 212, 59, 0.1); }
.xm-orn-list img { width: 40px; height: 40px; flex: none; filter: grayscale(1); }
.xm-orn-list li.got img { filter: none; }
.xm-orn-list b { display: block; font-size: 0.88rem; }
.xm-orn-list small { display: block; color: var(--ink2); font-size: 0.72rem; line-height: 1.4; }
@media (max-width: 720px) {
  .xm-tree-wrap { grid-template-columns: minmax(0, 1fr); }
  .xm-tree { width: min(330px, 86%); margin: 34px auto 0; }
  .xm-orn-list { grid-template-columns: minmax(0, 1fr); }
}

/* 原書の表紙のギャラリー */
.xm-covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.xm-cover { margin: 0; display: grid; gap: 6px; align-content: start; }
.xm-cover a { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); background: #0e1d3b; transition: transform 0.2s; }
.xm-cover a:hover { transform: translateY(-3px) rotate(-1deg); }
.xm-cover img { width: 100%; height: auto; display: block; }
.xm-cover figcaption { font-size: 0.8rem; line-height: 1.5; color: var(--ink2); }
.xm-cover figcaption b { display: block; color: var(--ink); font-size: 0.9rem; }
.xm-covers.more-closed .xm-cover:nth-child(n + 7) { display: none; }
.xm-more { margin-top: 12px; }

/* 姉妹サイトのクリスマス特集へのボタン */
.xm-sisters { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.xm-sis {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 14px 16px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c, #ff6b6b) 30%, #142a52), #142a52);
  border: 2px solid color-mix(in srgb, var(--c, #ff6b6b) 70%, transparent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.xm-sis:hover, .xm-sis:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 24px color-mix(in srgb, var(--c, #ff6b6b) 45%, transparent); }
.xm-sis > span.i { font-size: 2rem; line-height: 1; }
.xm-sis b { display: block; font-size: 1.05rem; }
.xm-sis small { display: block; color: var(--ink2); font-size: 0.82rem; line-height: 1.5; }
.xm-sis em { font-style: normal; font-weight: 900; font-size: 0.85rem; padding: 8px 12px; border-radius: 999px; background: var(--c, #ff6b6b); color: #fff; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .ad-door.ad-today, .xm-tree-o.got img, .xm-tree.all .xm-tree-star, .xm-orn-get .xm-orn-i { animation: none; }
  .ad-door.opening { animation: none; }
  .xm-orn-get { transition: none; }
}

/* 目次・本棚のタブ・新作の印・表紙の「もっと見る」 */
.xm-toc { padding-top: 18px; padding-bottom: 0; }
.xm-toc ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.xm-toc a { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.xm-toc a:hover { border-color: var(--xm-gold); }
.xm-marks { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.xm-marks i { font-style: normal; font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(255, 212, 59, 0.14); color: var(--xm-gold); border: 1px solid rgba(255, 212, 59, 0.35); }
.xm-marks i.n { background: #e03131; color: #fff; border-color: #e03131; }
.xm-stabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 6px; scrollbar-width: thin; }
.xs-js .xm-stabs { display: flex; }
.xm-shelf:not(.xs-js) .xm-stabs { display: none; }
.xm-stabs [role='tab'] { flex: none; display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; white-space: nowrap; }
.xm-stabs [role='tab'] small { font-size: 0.72rem; color: var(--muted); font-weight: 400; }
.xm-stabs [aria-selected='true'] { border-color: var(--xm-or); background: linear-gradient(135deg, rgba(224, 49, 49, 0.35), rgba(47, 158, 68, 0.3)); }
.xm-spanel h3 { margin: 6px 0 4px; font-size: 1.15rem; }
.xm-spanel .sub { margin: 0 0 10px; color: var(--ink2); }
.xm-shelf:not(.xs-js) .xm-spanel + .xm-spanel { margin-top: 26px; }
.xm-more-covers { margin-top: 14px; }
.xm-more-covers > summary { list-style: none; display: inline-block; }
.xm-more-covers > summary::-webkit-details-marker { display: none; }
.xm-more-covers[open] > summary { display: none; }
.page-xm main .xm-btn { color: #fff; }
.xm-cover-src { margin: 12px 0 0; font-size: 0.75rem; color: var(--muted); }

/* 見出しの折り返し：語の途中（「センタ／ー」など）で切れないように（auto-phrase は対応ブラウザーだけ） */
.xm-sec-h h2, .xm-hero h1, .xmg-h h2, .xm-sis b, .xm-game b { word-break: auto-phrase; }
.xm-nw { white-space: nowrap; }

/* 多読ベスト — クリスマス特集の「クリスマスってなに？ まるわかりガイド」（scripts/christmas-guide.mjs。halloween-guide.css をもとに色を雪の夜に）
   夜の配色の変数（--ink --ink2 --muted --line --card --xm-or --xm-gold --xm-vi）は src/christmas.css の .page-xm main から */
.xmg { --xmg-r: 18px; }
.xmg :where(p, li, dd) { line-height: 1.85; }
.xmg a { text-decoration: underline; text-decoration-color: rgba(255, 212, 59, 0.55); text-underline-offset: 3px; }
.xmg a:hover { color: var(--xm-gold); }

/* ---------- タブ ---------- */
.xmg-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 16px;
  scroll-margin-top: 80px;
}
.xmg:not(.xmg-js) .xmg-tabs { display: none; } /* JS が無いときは両方の版をそのまま並べる */
.xmg-tabs [role='tab'] {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.xmg-tabs [role='tab']:hover { border-color: var(--xm-vi); }
.xmg-tabs [role='tab']:active { transform: scale(0.98); }
.xmg-tabs [role='tab']:focus-visible { outline: 3px solid var(--xm-gold); outline-offset: 2px; }
.xmg-tabs [aria-selected='true'] {
  border-color: var(--xm-or);
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(116, 192, 252, 0.25));
  box-shadow: 0 6px 22px rgba(255, 107, 107, 0.18);
}
.xmg-tabs .i { font-size: 1.7rem; line-height: 1; flex: none; }
.xmg-tabs .t { display: grid; min-width: 0; }
.xmg-tabs b { font-size: 1.02rem; line-height: 1.35; }
.xmg-tabs small { color: var(--ink2); font-size: 0.78rem; line-height: 1.4; }
@media (max-width: 420px) {
  .xmg-tabs [role='tab'] { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; }
  .xmg-tabs .i { font-size: 1.4rem; }
  .xmg-tabs b { font-size: 0.95rem; }
}

/* ---------- パネルとカード ---------- */
.xmg-panel { max-width: 860px; }
.xmg-panel[hidden] { display: none; }
.xmg-lead { color: var(--ink2); font-size: 0.92rem; margin: 0 0 14px; }
.xmg-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--xmg-r);
  padding: 18px 18px 14px;
  margin: 0 0 14px;
  scroll-margin-top: 80px;
}
.xmg-card h3 {
  font: 800 clamp(1.08rem, 3.4vw, 1.3rem) / 1.45 'Zen Maru Gothic', sans-serif;
  margin: 0 0 12px;
  color: var(--ink);
}
.xmg-card p { margin: 0 0 10px; color: var(--ink2); }
.xmg-card b { color: var(--ink); }
.xmg-card ul,
.xmg-card dl { margin: 0 0 10px; }
.xmg-next { margin: 4px 0 0; font-weight: 700; }

/* 読み聞かせ */
.xmg-read {
  background: rgba(255, 212, 59, 0.08);
  border-left: 4px solid var(--xm-gold);
  border-radius: 4px 14px 14px 4px;
  padding: 12px 14px 4px;
  margin: 0 0 12px;
}
.xmg-read p { font-size: 1.07rem; line-height: 2; color: var(--ink); }
.xmg-read .xmg-read-tag,
.xmg-memo .xmg-memo-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 99px;
  margin: 0 0 8px;
  background: rgba(255, 212, 59, 0.18);
  color: var(--xm-gold);
}
/* おうちの方へ */
.xmg-memo {
  background: rgba(116, 192, 252, 0.12);
  border: 1px dashed rgba(116, 192, 252, 0.55);
  border-radius: 14px;
  padding: 12px 14px 4px;
  margin: 0 0 12px;
}
.xmg-memo .xmg-memo-tag { background: rgba(116, 192, 252, 0.25); color: var(--ink); }
.xmg-memo ul { padding-left: 1.2em; }
.xmg-memo li { color: var(--ink2); margin-bottom: 6px; }

/* 絵と文を横に（スマホは縦） */
.xmg-fig { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
.xmg-fig .xmg-img { width: 96px; height: 96px; margin-top: 6px; }
@media (max-width: 480px) {
  .xmg-fig { grid-template-columns: minmax(0, 1fr); }
  .xmg-fig .xmg-img { width: 72px; height: 72px; margin: 0 auto -4px; }
}

/* なにをする？ のアイコン */
.xmg-icons {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 8px;
}
.xmg-icons li {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  line-height: 1.5;
}
.xmg-icons span { font-size: 1.8rem; line-height: 1.2; }
.xmg-icons small { color: var(--muted); font-size: 0.8rem; }

/* 英語のフレーズ */
.xmg-phr {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 8px;
}
.xmg-phr li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.3);
  line-height: 1.55;
  min-width: 0;
}
.xmg-phr b { font: 800 1.12rem/1.35 Fraunces, Georgia, serif; color: var(--xm-gold); overflow-wrap: anywhere; }
.xmg-phr .k { color: var(--ink); font-size: 0.85rem; font-weight: 700; }
.xmg-phr .j { color: var(--ink2); font-size: 0.85rem; }
.xmg-sub { font-weight: 800; color: var(--ink) !important; margin: 4px 0 8px !important; }
.xmg-words {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
  gap: 8px;
}
.xmg-words li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  line-height: 1.4;
}
.xmg-words .e { grid-row: span 3; font-size: 1.5rem; }
.xmg-words b { font-family: Fraunces, Georgia, serif; color: var(--xm-gold); }
.xmg-words small { color: var(--muted); font-size: 0.76rem; }
.xmg-words small.j { color: var(--ink2); font-size: 0.82rem; }

/* 遊び・チェックリスト */
.xmg-play,
.xmg-check { padding-left: 1.1em; }
.xmg-play li,
.xmg-check li { color: var(--ink2); margin-bottom: 8px; }
.xmg-check { list-style: '✔ '; }
.xmg-check li::marker { color: var(--xm-or); }

/* 子どもに聞かれたら */
.xmg-qa dt {
  font-weight: 800;
  color: var(--ink);
  margin-top: 6px;
}
.xmg-qa dt::before { content: '🧒 '; }
.xmg-qa dd {
  margin: 4px 0 10px;
  padding: 8px 12px;
  border-radius: 4px 14px 14px 14px;
  background: rgba(255, 212, 59, 0.08);
  color: var(--ink2);
}

/* くわしい版の定義リスト */
.xmg-dl dt {
  font-weight: 800;
  color: var(--xm-gold);
  margin-top: 8px;
}
.xmg-dl dd { margin: 4px 0 10px; color: var(--ink2); }

/* 年表 */
.xmg-tl {
  display: grid;
  grid-template-columns: 6.8em minmax(0, 1fr);
  gap: 0;
  margin: 0 0 6px;
}
.xmg-tl dt,
.xmg-tl dd { padding: 8px 0; border-top: 1px solid var(--line); line-height: 1.6; }
.xmg-tl dt { font-weight: 800; color: var(--xm-or); padding-right: 10px; font-size: 0.9rem; }
.xmg-tl dd { margin: 0; color: var(--ink2); font-size: 0.92rem; }
@media (max-width: 480px) {
  .xmg-tl { grid-template-columns: minmax(0, 1fr); }
  .xmg-tl dd { border-top: 0; padding-top: 0; }
}

/* 10/31・11/1・11/2 */
.xmg-days {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 8px;
}
.xmg-days li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(116, 192, 252, 0.1);
  line-height: 1.5;
}
.xmg-days b { color: var(--xm-or) !important; font-size: 1.05rem; }
.xmg-days span { color: var(--ink); font-weight: 700; }
.xmg-days small { color: var(--muted); font-size: 0.8rem; }

/* 「もっと読む」 */
.xmg-more { margin: 2px 0 6px; }
.xmg-more > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid rgba(255, 212, 59, 0.45);
  color: var(--xm-gold);
  font-weight: 800;
  font-size: 0.88rem;
  user-select: none;
}
.xmg-more > summary::-webkit-details-marker { display: none; }
.xmg-more > summary::after { content: '▼'; font-size: 0.7em; transition: transform 0.2s; }
.xmg-more[open] > summary::after { transform: rotate(180deg); }
.xmg-more > summary:hover { background: rgba(255, 212, 59, 0.1); }
.xmg-more > summary:focus-visible { outline: 3px solid var(--xm-gold); outline-offset: 2px; }
.xmg-more > summary .c,
.xmg-more[open] > summary .o { display: none; }
.xmg-more[open] > summary .c { display: inline; }
.xmg-more-in { padding-top: 12px; }
.xmg-more[open] > summary { margin-bottom: 0; }

/* ---------- リンク集・FAQ ---------- */
.xmg-block { margin-top: 30px; }
.xmg-bh { font: 900 clamp(1.25rem, 3.8vw, 1.6rem) / 1.35 'Zen Maru Gothic', sans-serif; margin: 0 0 6px; color: var(--ink); }
.xmg-bp { color: var(--ink2); margin: 0 0 12px; }
.xmg-lh { font-size: 1rem; margin: 16px 0 8px; color: var(--xm-gold); }
.xmg-lks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 10px;
}
.xmg .xmg-lk {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s, transform 0.15s, background 0.2s;
}
.xmg .xmg-lk:hover { border-color: var(--xm-or); transform: translateY(-2px); background: #2a1b4a; color: var(--ink); }
.xmg .xmg-lk:focus-visible { outline: 3px solid var(--xm-gold); outline-offset: 2px; }
.xmg-lk .e { font-size: 1.8rem; line-height: 1.2; }
.xmg-lk .tx { display: grid; gap: 3px; min-width: 0; }
.xmg-lk b { font-size: 0.98rem; line-height: 1.45; }
.xmg-lk b::after { content: ' →'; color: var(--xm-or); }
.xmg-lk small { color: var(--ink2); font-size: 0.82rem; line-height: 1.6; }
.xmg-lk i {
  justify-self: start;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255, 107, 107, 0.18);
  color: var(--xm-or);
}

.xmg-faq { display: grid; gap: 8px; max-width: 860px; }
.xmg-faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.xmg-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 40px 12px 14px;
  position: relative;
  font-weight: 800;
  line-height: 1.55;
  color: var(--ink);
}
.xmg-faq summary::-webkit-details-marker { display: none; }
.xmg-faq summary::before { content: 'Q. '; color: var(--xm-or); }
.xmg-faq summary::after {
  content: '+';
  position: absolute;
  right: 14px;
  top: 10px;
  font-size: 1.3rem;
  color: var(--xm-gold);
}
.xmg-faq details[open] summary::after { content: '−'; }
.xmg-faq summary:focus-visible { outline: 3px solid var(--xm-gold); outline-offset: -3px; }
.xmg-faq p { margin: 0; padding: 0 14px 14px; color: var(--ink2); }

@media (prefers-reduced-motion: reduce) {
  .xmg * { transition: none !important; }
}

/* ---------- すぐ分かるクリスマス（ヒーローの下。検索の答えになる短い答え）2026-10-26 ---------- */
.xm-quick dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; margin: 0; }
.xm-quick dl > div { padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.xm-quick dt { font-weight: 900; color: var(--xm-gold); margin-bottom: 4px; }
.xm-quick dd { margin: 0; color: var(--ink2); line-height: 1.7; }
.xm-quick dd b { color: var(--ink); }
.xm-quick p { margin: 10px 0 0; text-align: right; }
.xm-quick p a { color: var(--xm-or); font-weight: 700; }
