/* 多読ベスト — ハロウィン特集（/halloween/）だけで読みこむ。動きは src/halloween.js
   夜の特集なので、ページの中身はサイトの明るい／暗いの設定によらず夜の色にする */
.page-hw main {
  --bg: #120a24;
  --bg2: #1a1030;
  --card: #21153b;
  --ink: #f6f0ff;
  --ink2: #dcd2f2;
  --muted: #b3a7d1;
  --line: #3a2a5e;
  --brand: #ff922b;
  --brand2: #e599f7;
  --hw-or: #ff922b;
  --hw-gold: #ffd43b;
  --hw-vi: #9775fa;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(151, 117, 250, 0.25), transparent 60%),
    radial-gradient(900px 500px at 0% 40%, rgba(255, 146, 43, 0.12), transparent 60%),
    linear-gradient(#120a24, #0d0719 60%, #120a24);
  color: var(--ink);
}
.page-hw main a { color: inherit; }
.page-hw main .h2,
.page-hw main h2 { color: var(--ink); }

/* ---------- ヒーロー ---------- */
.hw-hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.hw-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
  z-index: -3;
}
.hw-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(14, 6, 30, 0.92) 0%, rgba(14, 6, 30, 0.6) 38%, rgba(14, 6, 30, 0) 70%), linear-gradient(0deg, #120a24 0%, rgba(18, 10, 36, 0) 40%);
}
.hw-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.hw-hero-in {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 90px 20px 44px;
  max-width: 100%;
}
.hw-hero .crumb,
.hw-hero .crumb a { color: #d9ccff; }
.hw-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, #ff922b);
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: 0 0 24px rgba(255, 146, 43, 0.55);
}
.hw-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(151, 117, 250, 0.7);
}
.hw-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, #ff922b 45%, #e599f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hw-hero-lead {
  max-width: 34em;
  color: #e9e1ff;
  font-size: clamp(0.98rem, 2.4vw, 1.12rem);
  line-height: 1.85;
}
.hw-cd {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 20px;
  color: #d9ccff;
  font-weight: 700;
}
.hw-cd-n {
  display: flex;
  gap: 6px;
}
.hw-cd-n span {
  display: grid;
  place-items: center;
  min-width: 58px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(30, 14, 60, 0.75);
  border: 1px solid rgba(255, 212, 59, 0.45);
  box-shadow: inset 0 0 18px rgba(151, 117, 250, 0.35);
}
.hw-cd-n b {
  font: 800 1.5rem/1 Fraunces, Georgia, serif;
  color: #ffd43b;
}
.hw-cd-n small { font-size: 0.68rem; color: #cbbdf3; }
.hw-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hw-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);
}
.hw-cta a.go {
  background: linear-gradient(90deg, #ff922b, #f76707);
  border-color: transparent;
  box-shadow: 0 8px 26px rgba(247, 103, 7, 0.5);
}
.hw-mascot {
  position: absolute;
  right: max(2vw, 10px);
  bottom: 10px;
  width: clamp(120px, 22vw, 240px);
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(255, 146, 43, 0.45));
  animation: hw-bob 3.6s ease-in-out infinite;
  z-index: 0;
}
@keyframes hw-bob {
  50% { transform: translateY(-12px) rotate(-3deg); }
}

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

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

/* ゲームのカード */
.hw-games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 720px) {
  .hw-games { grid-template-columns: minmax(0, 1fr); }
}
.hw-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: #20123d;
  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;
}
.hw-game:hover,
.hw-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, #ff922b) inset, 0 0 40px color-mix(in srgb, var(--c, #ff922b) 45%, transparent);
}
.hw-game > img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.hw-game:hover > img.bg { transform: scale(1.06); }
.hw-game::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 5, 28, 0.95) 0%, rgba(12, 5, 28, 0.55) 55%, rgba(12, 5, 28, 0.05) 100%);
}
.hw-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: hw-bob 3.2s ease-in-out infinite;
}
.hw-game-in { position: relative; z-index: 1; padding: 18px 18px 16px; display: grid; gap: 6px; }
.hw-game-tag {
  justify-self: start;
  font: 900 0.72rem/1 'Zen Maru Gothic', sans-serif;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--c, #ff922b);
  color: #fff;
}
.hw-game b.t { font: 900 1.35rem/1.3 'Zen Maru Gothic', sans-serif; }
.hw-game small.d { color: #e2d8fb; line-height: 1.6; font-size: 0.9rem; }
.hw-game-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.hw-game-f em { font-style: normal; font-size: 0.8rem; color: #ffd43b; }
.hw-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);
}
.hw-game:hover span.play { background: var(--c, #ff922b); border-color: transparent; }
.hw-lvchips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; color: var(--ink2); font-size: 0.85rem; }
.hw-lvchips i {
  font-style: normal;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}

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

.hw-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(151, 117, 250, 0.22), rgba(255, 146, 43, 0.14));
  border: 1px solid var(--line);
}
.hw-tip img { width: 84px; height: 84px; }

/* ---------- 世界の行事・祝日ナビ（ハロウィンの由来）への大きなリンク ---------- 2026-10-26 ユーザー「コレへの大き目のリンクも作成して紹介してね」 */
.hw-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, 146, 43, 0.2), rgba(151, 117, 250, 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;
}
.hw-link:hover { transform: translateY(-3px); box-shadow: 0 24px 60px rgba(255, 146, 43, 0.25); }
.hw-link > img { width: 100%; height: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; }
.hw-link-in { display: flex; flex-direction: column; gap: 10px; justify-content: center; padding: clamp(18px, 3vw, 32px); min-width: 0; }
.hw-link-in small { color: var(--hw-gold); font-weight: 700; letter-spacing: 0.04em; }
.hw-link-in b { font: 900 clamp(1.3rem, 3.4vw, 1.9rem) / 1.3 'Zen Maru Gothic', sans-serif; color: var(--ink); }
.hw-link-txt { color: var(--ink2); line-height: 1.8; }
.hw-link-go {
  align-self: flex-start;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--hw-or);
  color: #1a0f2e;
  font-weight: 900;
}
.hw-link:hover .hw-link-go span { display: inline-block; transform: translateX(3px); transition: transform 0.2s; }
@media (max-width: 720px) {
  .hw-link { grid-template-columns: minmax(0, 1fr); }
  .hw-link-go { align-self: stretch; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .hw-link, .hw-link:hover { transform: none; transition: none; }
}
.hw-tip p { margin: 0; line-height: 1.8; color: var(--ink2); }

/* ---------- ゲームの画面（全画面） ---------- */
html.hw-lock,
html.hw-lock body { overflow: hidden; overscroll-behavior: none; }
.hw-ov {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #0c0618;
  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;
}
.hw-ov[hidden] { display: none; }
.hw-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  background: linear-gradient(#1c0f36, #140a28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.hw-top b { flex: 1; min-width: 0; font-size: 0.98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-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;
}
.hw-top button.off { opacity: 0.4; text-decoration: line-through; }
.hw-top button.x { padding: 0 12px; font-size: 0.9rem; font-weight: 900; }
.hw-stage { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.hw-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hw-hud { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; z-index: 2; }
.hw-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hw-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: #ff922b; 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, #ff922b, #ffd43b); box-shadow: 0 0 12px #ff922b; border-radius: inherit; }
.hh-time.fever i { background: linear-gradient(90deg, #f06595, #ffd43b, #74c0fc, #b197fc); }
.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(24, 10, 50, 0.82);
  border: 2px solid rgba(255, 212, 59, 0.55);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(151, 117, 250, 0.4);
  pointer-events: none; /* 下を通るおばけもタップできるように（ボタンだけ押せる） */
}
.hh-q button { pointer-events: auto; }
.hh-q small { display: block; color: #cbbdf3; 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: #ff922b; 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: #ff922b; animation: hw-blink 1s infinite; }
@keyframes hw-blink { 50% { background: rgba(255, 146, 43, 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; }

/* メニュー・結果・一時停止 */
.hw-menu,
.hw-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(30, 12, 60, 0.55), rgba(8, 3, 20, 0.85));
}
.hw-card {
  width: min(560px, 100%);
  padding: 22px 20px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(42, 22, 82, 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(151, 117, 250, 0.25);
  text-align: center;
}
.hw-k { margin: 0; font: 800 0.75rem/1 Fraunces, Georgia, serif; letter-spacing: 0.2em; color: #ff922b; }
.hw-card h2 { margin: 6px 0 10px; font-size: clamp(1.4rem, 5vw, 1.9rem); color: #fff; }
.hw-how { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; text-align: left; }
.hw-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); }
.hw-how li span { font-size: 1.2rem; line-height: 1.4; text-align: center; }
.hw-how li p { margin: 0; line-height: 1.7; color: #e2d8fb; font-size: 0.9rem; }
.hw-how b { color: #ffd43b; }
.hw-note { font-size: 0.8rem; color: #b3a7d1; margin: 10px 0 0; line-height: 1.6; }
.hw-lab { margin: 14px 0 6px; font-size: 0.8rem; color: #cbbdf3; font-weight: 900; text-align: left; }
.hw-lvs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hw-lv,
.hw-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;
}
.hw-lv b { font-size: 1.05rem; }
.hw-lv small { font-size: 0.7rem; color: #cbbdf3; }
.hw-lv em { font-style: normal; font-size: 0.7rem; color: #ffd43b; font-family: Fraunces, Georgia, serif; }
.hw-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); }
.hw-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.hw-mode { flex: 1 1 140px; font-weight: 900; font-size: 0.88rem; }
.hw-mode.on { border-color: #ff922b; background: rgba(255, 146, 43, 0.25); }
.hw-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);
}
.hw-btn:disabled { opacity: 0.4; cursor: default; }
.hw-btn.main { background: linear-gradient(90deg, #ff922b, #f76707); border-color: transparent; box-shadow: 0 8px 24px rgba(247, 103, 7, 0.45); }
.hw-btn.big { width: 100%; margin-top: 16px; padding: 16px; font-size: 1.15rem; }
.hw-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.hw-count { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none !important; }
.hw-count b { font: 800 clamp(4rem, 22vw, 9rem) / 1 Fraunces, Georgia, serif; color: #ffd43b; text-shadow: 0 0 40px #ff922b, 0 6px 0 #6b2c00; }

.hw-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%, #b197fc, #5f3dc4);
  box-shadow: 0 0 40px rgba(151, 117, 250, 0.7);
  animation: hw-pop 0.7s cubic-bezier(0.22, 1.6, 0.36, 1) both;
}
.hw-rank.r-S { background: radial-gradient(circle at 35% 30%, #ffe066, #f08c00); box-shadow: 0 0 60px rgba(255, 212, 59, 0.9); color: #4a2500; }
.hw-rank.r-A { background: radial-gradient(circle at 35% 30%, #ffa8a8, #e8590c); }
.hw-rank.r-C { background: radial-gradient(circle at 35% 30%, #868e96, #343a40); box-shadow: none; }
@keyframes hw-pop { from { transform: scale(0) rotate(-30deg); } }
.hw-score { margin: 0; font: 800 2.4rem/1.1 Fraunces, Georgia, serif; color: #ffd43b; }
.hw-score small { font: 900 1rem 'Zen Maru Gothic', sans-serif; margin-left: 4px; }
.hw-newbest { margin: 6px 0; font-weight: 900; color: #ff922b; animation: hw-blink 1.2s infinite; border-radius: 99px; }
.hw-bestline { margin: 6px 0; font-size: 0.85rem; color: #cbbdf3; }
.hw-stats { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hw-stats li { padding: 8px 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); }
.hw-stats small { display: block; font-size: 0.7rem; color: #cbbdf3; }
.hw-stats b { font-size: 1.05rem; }
.hw-review { margin-top: 12px; text-align: left; background: rgba(255, 255, 255, 0.05); border-radius: 14px; padding: 8px 12px; }
.hw-review summary { cursor: pointer; font-weight: 900; padding: 4px 0; }
.hw-review ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; max-height: 210px; overflow-y: auto; }
.hw-review li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; min-width: 0; }
.hw-review li.miss { background: rgba(255, 107, 107, 0.14); }
.hw-review li b { font-family: Fraunces, Georgia, serif; font-size: 1.05rem; }
.hw-review li span { color: #dcd2f2; font-size: 0.85rem; min-width: 0; overflow-wrap: anywhere; }
.hw-review li i { font-style: normal; margin-left: auto; font-size: 0.7rem; color: #ff8787; font-weight: 900; flex: none; }
.hw-review button { flex: none; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; border-radius: 8px; width: 32px; height: 30px; cursor: pointer; }
.hw-recs { margin-top: 16px; text-align: left; }
.hw-recs p { margin: 0 0 8px; font-weight: 900; font-size: 0.9rem; }
.hw-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; }
.hw-recs img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; }
.hw-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(20, 10, 40, 0.86);
  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(151, 117, 250, 0.16); border: 1px dashed rgba(177, 151, 252, 0.6); text-align: left; }
.es-ja small { color: #b197fc; font-weight: 900; }
.es-ja p { margin: 4px 0 0; line-height: 1.8; color: #ece6ff; font-size: 0.95rem; }
.es-foot { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; margin-top: 14px; }
.es-foot .hw-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 hw-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: hw-bump 0.32s cubic-bezier(0.22, 1.6, 0.36, 1); }
.hh-lv i.gone.bump { animation: hw-out 0.45s ease-out; }
@keyframes hw-out { 0% { transform: scale(1.4); opacity: 1; filter: none; } 100% { transform: scale(1); } }
.hh-cb.hot { color: #ffd43b; text-shadow: 0 0 12px #ff922b, 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: hw-low 0.5s ease-in-out infinite alternate; }
@keyframes hw-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; }
}
.hw-stage canvas.hw-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: hw-pen 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes hw-pen { 0% { opacity: 0; transform: translateY(-6px) scale(1.4); } 20% { opacity: 1; transform: translateY(4px) scale(1); } 100% { opacity: 0; transform: translateY(22px); } }
.hw-fly { position: absolute; z-index: 6; pointer-events: none; will-change: transform, opacity; }
.hw-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%, #f08c00); box-shadow: 0 0 18px #ffd43b; }
.hw-fly.key { font-size: 2rem; filter: drop-shadow(0 0 10px #ffd43b); }
.hw-btn, .hw-lv, .hw-mode, .es-c { -webkit-tap-highlight-color: transparent; }
.hw-btn:active:not(:disabled), .hw-lv:active, .hw-mode:active, .es-c:active:not(:disabled) { transform: scale(0.96); transition-duration: 0.05s; }
.hw-btn { transition: transform 0.15s cubic-bezier(0.22, 1.6, 0.36, 1); }
.hw-btn.sm, .hw-review button.hw-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）に置きかえても、ボタンの中で文字と横にならぶように */
.hw-mode { display: flex; align-items: center; justify-content: center; gap: 6px; }
.hw-ov img.emo { width: 1.2em; height: 1.2em; vertical-align: -0.2em; }
/* メニュー・結果のカードは、下からふわっと出る。結果は上から順に（ランク → 得点 → 記録 → 単語） */
.hw-menu > .hw-card, .hw-pausebox > .hw-card { animation: hw-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes hw-in { from { opacity: 0; transform: translateY(26px) scale(0.96); } }
.hw-result .hw-card > * { animation: hw-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hw-result .hw-card > :nth-child(2) { animation-delay: 0.08s; }
.hw-result .hw-card > .hw-rank { animation: hw-slam 0.55s cubic-bezier(0.3, 1.5, 0.4, 1) 0.2s both; }
@keyframes hw-slam { 0% { opacity: 0; transform: scale(2.6) rotate(-18deg); } 60% { opacity: 1; transform: scale(0.9) rotate(4deg); } 100% { transform: none; } }
.hw-result .hw-card > :nth-child(4) { animation-delay: 0.45s; }
.hw-result .hw-card > :nth-child(5) { animation-delay: 0.9s; }
.hw-result .hw-card > :nth-child(6) { animation-delay: 1s; }
.hw-result .hw-card > :nth-child(n + 7) { animation-delay: 1.15s; }
.hw-review li { transition: background 0.2s; }
.hw-review li.playing { background: rgba(255, 212, 59, 0.22); }
.hw-notes .hw-note1 { padding: 10px 4px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.hw-notes .hw-note1 p { margin: 4px 0; line-height: 1.65; font-size: 0.9rem; color: #ece6ff; }
.hw-notes .hw-note1 p[lang='en'] { font-family: Literata, Georgia, serif; }
.hw-notes .nr { display: flex; align-items: center; justify-content: space-between; font-weight: 900; color: #ffd43b !important; }
.hw-notes .nq b { color: #8ce99a; }
.hw-notes .nj { color: #cbbdf3 !important; font-size: 0.85rem !important; }
/* 脱出ゲーム：正解のスタンプ・キーボードの番号 */
.es-stamp { position: absolute; top: 14px; right: 14px; pointer-events: none; animation: hw-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 hw-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: #cbbdf3; }
@media (hover: none) { .es-c kbd { display: none; } }
.es-c.ok { animation: hw-bump 0.4s cubic-bezier(0.22, 1.6, 0.36, 1); }

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

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

/* 多読ベスト — ハロウィン特集の「ハロウィンってなに？ まるわかりガイド」（scripts/halloween-guide.mjs）
   夜の配色の変数（--ink --ink2 --muted --line --card --hw-or --hw-gold --hw-vi）は src/halloween.css の .page-hw main から */
.hwg { --hwg-r: 18px; }
.hwg :where(p, li, dd) { line-height: 1.85; }
.hwg a { text-decoration: underline; text-decoration-color: rgba(255, 212, 59, 0.55); text-underline-offset: 3px; }
.hwg a:hover { color: var(--hw-gold); }

/* ---------- タブ ---------- */
.hwg-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 16px;
  scroll-margin-top: 80px;
}
.hwg:not(.hwg-js) .hwg-tabs { display: none; } /* JS が無いときは両方の版をそのまま並べる */
.hwg-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;
}
.hwg-tabs [role='tab']:hover { border-color: var(--hw-vi); }
.hwg-tabs [role='tab']:active { transform: scale(0.98); }
.hwg-tabs [role='tab']:focus-visible { outline: 3px solid var(--hw-gold); outline-offset: 2px; }
.hwg-tabs [aria-selected='true'] {
  border-color: var(--hw-or);
  background: linear-gradient(135deg, rgba(255, 146, 43, 0.3), rgba(151, 117, 250, 0.25));
  box-shadow: 0 6px 22px rgba(255, 146, 43, 0.18);
}
.hwg-tabs .i { font-size: 1.7rem; line-height: 1; flex: none; }
.hwg-tabs .t { display: grid; min-width: 0; }
.hwg-tabs b { font-size: 1.02rem; line-height: 1.35; }
.hwg-tabs small { color: var(--ink2); font-size: 0.78rem; line-height: 1.4; }
@media (max-width: 420px) {
  .hwg-tabs [role='tab'] { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; }
  .hwg-tabs .i { font-size: 1.4rem; }
  .hwg-tabs b { font-size: 0.95rem; }
}

/* ---------- パネルとカード ---------- */
.hwg-panel { max-width: 860px; }
.hwg-panel[hidden] { display: none; }
.hwg-lead { color: var(--ink2); font-size: 0.92rem; margin: 0 0 14px; }
.hwg-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--hwg-r);
  padding: 18px 18px 14px;
  margin: 0 0 14px;
  scroll-margin-top: 80px;
}
.hwg-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);
}
.hwg-card p { margin: 0 0 10px; color: var(--ink2); }
.hwg-card b { color: var(--ink); }
.hwg-card ul,
.hwg-card dl { margin: 0 0 10px; }
.hwg-next { margin: 4px 0 0; font-weight: 700; }

/* 読み聞かせ */
.hwg-read {
  background: rgba(255, 212, 59, 0.08);
  border-left: 4px solid var(--hw-gold);
  border-radius: 4px 14px 14px 4px;
  padding: 12px 14px 4px;
  margin: 0 0 12px;
}
.hwg-read p { font-size: 1.07rem; line-height: 2; color: var(--ink); }
.hwg-read .hwg-read-tag,
.hwg-memo .hwg-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(--hw-gold);
}
/* おうちの方へ */
.hwg-memo {
  background: rgba(151, 117, 250, 0.12);
  border: 1px dashed rgba(151, 117, 250, 0.55);
  border-radius: 14px;
  padding: 12px 14px 4px;
  margin: 0 0 12px;
}
.hwg-memo .hwg-memo-tag { background: rgba(151, 117, 250, 0.25); color: var(--ink); }
.hwg-memo ul { padding-left: 1.2em; }
.hwg-memo li { color: var(--ink2); margin-bottom: 6px; }

/* 絵と文を横に（スマホは縦） */
.hwg-fig { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
.hwg-fig .hwg-img { width: 96px; height: 96px; margin-top: 6px; }
@media (max-width: 480px) {
  .hwg-fig { grid-template-columns: minmax(0, 1fr); }
  .hwg-fig .hwg-img { width: 72px; height: 72px; margin: 0 auto -4px; }
}

/* なにをする？ のアイコン */
.hwg-icons {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 8px;
}
.hwg-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;
}
.hwg-icons span { font-size: 1.8rem; line-height: 1.2; }
.hwg-icons small { color: var(--muted); font-size: 0.8rem; }

/* 英語のフレーズ */
.hwg-phr {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 8px;
}
.hwg-phr li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 146, 43, 0.08);
  border: 1px solid rgba(255, 146, 43, 0.3);
  line-height: 1.55;
  min-width: 0;
}
.hwg-phr b { font: 800 1.12rem/1.35 Fraunces, Georgia, serif; color: var(--hw-gold); overflow-wrap: anywhere; }
.hwg-phr .k { color: var(--ink); font-size: 0.85rem; font-weight: 700; }
.hwg-phr .j { color: var(--ink2); font-size: 0.85rem; }
.hwg-sub { font-weight: 800; color: var(--ink) !important; margin: 4px 0 8px !important; }
.hwg-words {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
  gap: 8px;
}
.hwg-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;
}
.hwg-words .e { grid-row: span 3; font-size: 1.5rem; }
.hwg-words b { font-family: Fraunces, Georgia, serif; color: var(--hw-gold); }
.hwg-words small { color: var(--muted); font-size: 0.76rem; }
.hwg-words small.j { color: var(--ink2); font-size: 0.82rem; }

/* 遊び・チェックリスト */
.hwg-play,
.hwg-check { padding-left: 1.1em; }
.hwg-play li,
.hwg-check li { color: var(--ink2); margin-bottom: 8px; }
.hwg-check { list-style: '✔ '; }
.hwg-check li::marker { color: var(--hw-or); }

/* 子どもに聞かれたら */
.hwg-qa dt {
  font-weight: 800;
  color: var(--ink);
  margin-top: 6px;
}
.hwg-qa dt::before { content: '🧒 '; }
.hwg-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);
}

/* くわしい版の定義リスト */
.hwg-dl dt {
  font-weight: 800;
  color: var(--hw-gold);
  margin-top: 8px;
}
.hwg-dl dd { margin: 4px 0 10px; color: var(--ink2); }

/* 年表 */
.hwg-tl {
  display: grid;
  grid-template-columns: 6.8em minmax(0, 1fr);
  gap: 0;
  margin: 0 0 6px;
}
.hwg-tl dt,
.hwg-tl dd { padding: 8px 0; border-top: 1px solid var(--line); line-height: 1.6; }
.hwg-tl dt { font-weight: 800; color: var(--hw-or); padding-right: 10px; font-size: 0.9rem; }
.hwg-tl dd { margin: 0; color: var(--ink2); font-size: 0.92rem; }
@media (max-width: 480px) {
  .hwg-tl { grid-template-columns: minmax(0, 1fr); }
  .hwg-tl dd { border-top: 0; padding-top: 0; }
}

/* 10/31・11/1・11/2 */
.hwg-days {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 8px;
}
.hwg-days li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(151, 117, 250, 0.1);
  line-height: 1.5;
}
.hwg-days b { color: var(--hw-or) !important; font-size: 1.05rem; }
.hwg-days span { color: var(--ink); font-weight: 700; }
.hwg-days small { color: var(--muted); font-size: 0.8rem; }

/* 「もっと読む」 */
.hwg-more { margin: 2px 0 6px; }
.hwg-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(--hw-gold);
  font-weight: 800;
  font-size: 0.88rem;
  user-select: none;
}
.hwg-more > summary::-webkit-details-marker { display: none; }
.hwg-more > summary::after { content: '▼'; font-size: 0.7em; transition: transform 0.2s; }
.hwg-more[open] > summary::after { transform: rotate(180deg); }
.hwg-more > summary:hover { background: rgba(255, 212, 59, 0.1); }
.hwg-more > summary:focus-visible { outline: 3px solid var(--hw-gold); outline-offset: 2px; }
.hwg-more > summary .c,
.hwg-more[open] > summary .o { display: none; }
.hwg-more[open] > summary .c { display: inline; }
.hwg-more-in { padding-top: 12px; }
.hwg-more[open] > summary { margin-bottom: 0; }

/* ---------- リンク集・FAQ ---------- */
.hwg-block { margin-top: 30px; }
.hwg-bh { font: 900 clamp(1.25rem, 3.8vw, 1.6rem) / 1.35 'Zen Maru Gothic', sans-serif; margin: 0 0 6px; color: var(--ink); }
.hwg-bp { color: var(--ink2); margin: 0 0 12px; }
.hwg-lh { font-size: 1rem; margin: 16px 0 8px; color: var(--hw-gold); }
.hwg-lks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 10px;
}
.hwg .hwg-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;
}
.hwg .hwg-lk:hover { border-color: var(--hw-or); transform: translateY(-2px); background: #2a1b4a; color: var(--ink); }
.hwg .hwg-lk:focus-visible { outline: 3px solid var(--hw-gold); outline-offset: 2px; }
.hwg-lk .e { font-size: 1.8rem; line-height: 1.2; }
.hwg-lk .tx { display: grid; gap: 3px; min-width: 0; }
.hwg-lk b { font-size: 0.98rem; line-height: 1.45; }
.hwg-lk b::after { content: ' →'; color: var(--hw-or); }
.hwg-lk small { color: var(--ink2); font-size: 0.82rem; line-height: 1.6; }
.hwg-lk i {
  justify-self: start;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255, 146, 43, 0.18);
  color: var(--hw-or);
}

.hwg-faq { display: grid; gap: 8px; max-width: 860px; }
.hwg-faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.hwg-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 40px 12px 14px;
  position: relative;
  font-weight: 800;
  line-height: 1.55;
  color: var(--ink);
}
.hwg-faq summary::-webkit-details-marker { display: none; }
.hwg-faq summary::before { content: 'Q. '; color: var(--hw-or); }
.hwg-faq summary::after {
  content: '+';
  position: absolute;
  right: 14px;
  top: 10px;
  font-size: 1.3rem;
  color: var(--hw-gold);
}
.hwg-faq details[open] summary::after { content: '−'; }
.hwg-faq summary:focus-visible { outline: 3px solid var(--hw-gold); outline-offset: -3px; }
.hwg-faq p { margin: 0; padding: 0 14px 14px; color: var(--ink2); }

@media (prefers-reduced-motion: reduce) {
  .hwg * { transition: none !important; }
}

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