/* 攻略wiki（wiki.html）だけの見た目 */

.wiki-head {
  text-align: center;
  padding: 46px 20px 40px;
  background: var(--sky);
  border-bottom: var(--line);
  background-image: radial-gradient(rgba(255, 255, 255, .35) 2px, transparent 2px);
  background-size: 22px 22px;
}
.wiki-head h1 {
  display: inline-block;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.2rem);
  padding: 4px 30px 10px;
  background: var(--yellow);
  border: var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}
.wiki-head p { margin: 16px 0 0; font-weight: 800; }

.wiki-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
@media (max-width: 900px) { .wiki-layout { grid-template-columns: 1fr; } }

/* もくじ */
.wiki-toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
  padding: 16px 18px;
  background: #fff;
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}
@media (max-width: 900px) { .wiki-toc { position: static; } }
.toc-title { margin: 0 0 6px; font-family: var(--font-title); font-size: 1.1rem; }
.wiki-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.wiki-toc li { margin: 2px 0; }
.wiki-toc li:not(.sub) { counter-increment: toc; }
.wiki-toc li:not(.sub) a::before { content: counter(toc) ". "; }
.wiki-toc li.sub { margin-left: 1.4em; font-size: .9rem; }
.wiki-toc a { color: var(--ink); text-decoration: none; font-weight: 700; display: inline-block; padding: 3px 6px; border-radius: 8px; }
.wiki-toc a:hover { background: var(--yellow-light); }
.wiki-toc a.active { background: var(--yellow); }

/* 本文 */
.wiki-sec { margin-bottom: 56px; }
.wiki-sec > h2 {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.8rem;
  padding: 6px 18px 8px;
  margin-bottom: 18px;
  color: #fff;
  background: var(--ink);
  border-radius: 14px;
}
.sub-title { font-size: 1.2rem; margin: 28px 0 12px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.fact {
  padding: 14px 18px;
  background: #fff;
  border: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-small);
}
.fact h3 { font-size: 1.08rem; color: var(--red); margin-bottom: 4px; }
.fact p { margin: 0; font-size: .95rem; }

.rules {
  padding: 16px 20px;
  background: #fff;
  border: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-small);
}
.rules ol { margin: 0; padding-left: 1.4em; }
.rules li { margin: 4px 0; }
.rules strong { background: linear-gradient(transparent 55%, var(--yellow) 55%); }
.rules-legend { margin: 10px 0 0; font-size: .9rem; color: var(--ink-soft); }
.badge-only {
  display: inline-block;
  padding: 0 10px;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.7;
  color: #fff;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 999px;
  vertical-align: middle;
}

.move-grid {display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.move-grid .move { padding: 10px 14px; background: #fff; border: 2px solid var(--ink); border-radius: 12px; font-size: .93rem; }
.move-grid .move b { display: block; color: var(--blue); }

/* ステージ */
.wstage {
  --c: var(--orange);
  margin-bottom: 34px;
  background: #fff;
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.wstage-top { display: grid; grid-template-columns: 300px 1fr; border-bottom: var(--line); }
@media (max-width: 700px) { .wstage-top { grid-template-columns: 1fr; } }
.wstage-top img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; border-right: var(--line); }
@media (max-width: 700px) { .wstage-top img { border-right: none; border-bottom: var(--line); } }
.wstage-info { padding: 16px 20px; background: color-mix(in srgb, var(--c) 12%, #fff); }
.wstage-no { display: inline-block; padding: 0 12px; font-family: var(--font-title); color: #fff; background: var(--c); border: 2px solid var(--ink); border-radius: 10px; }
.wstage-info h3 { font-family: var(--font-title); font-weight: 400; font-size: 1.5rem; margin: 6px 0; }
.wstage-info p { margin: 0 0 6px; font-size: .95rem; }
.wstage-where { font-weight: 800; }
.wstage-where::before { content: "入口："; color: var(--c); }

.quest-list { list-style: none; margin: 0; padding: 6px 0; counter-reset: q; }
.quest { padding: 12px 20px 14px 70px; position: relative; border-bottom: 2px dashed #e1ddf0; }
.quest:last-child { border-bottom: none; }
.quest::before {
  counter-increment: q;
  content: counter(q);
  position: absolute;
  left: 20px;
  top: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-family: var(--font-title);
  color: #fff;
  background: var(--c);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.quest h4 { margin: 0; font-size: 1.05rem; word-break: break-all; }
.quest .desc { margin: 2px 0 0; font-size: .93rem; }
.quest .tip {
  margin: 6px 0 0;
  padding: 4px 10px;
  font-size: .9rem;
  background: var(--yellow-light);
  border-left: 5px solid var(--yellow);
  border-radius: 6px;
}
.quest .tip::before { content: "ヒント："; font-weight: 800; }
.quest.locked { opacity: .6; }
.quest.locked h4::after { content: "選べない"; margin-left: 8px; padding: 0 8px; font-size: .78rem; color: #fff; background: var(--ink-soft); border-radius: 999px; vertical-align: middle; }

[data-color="orange"] { --c: var(--orange); }
[data-color="blue"] { --c: var(--blue); }
[data-color="teal"] { --c: var(--teal); }
[data-color="gold"] { --c: var(--gold); }
[data-color="purple"] { --c: var(--purple); }
[data-color="aqua"] { --c: var(--aqua); }

/* 隠しステージの行き方 */
.howto {
  margin: 0;
  padding: 16px 20px 18px;
  background: var(--yellow-light);
  border-bottom: var(--line);
}
.howto h4 { margin: 0 0 8px; font-family: var(--font-title); font-weight: 400; font-size: 1.15rem; }
.howto ol { margin: 0; padding: 0; list-style: none; counter-reset: how; }
.howto li { position: relative; padding: 4px 0 4px 40px; counter-increment: how; }
.howto li::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: 3px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .9rem;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 8px;
}
.howto li + li { border-top: 2px dashed #eadfa8; }

/* ビールの見下ろしマップ */
.beer-map {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  padding: 18px 20px;
  border-bottom: var(--line);
  background: #f6f4fc;
}
@media (max-width: 760px) { .beer-map { grid-template-columns: 1fr; } }
.map-pic {
  position: relative;
  align-self: start;
  border: var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-small);
}
.map-pic img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.pin {
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  padding: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .9rem;
  color: #fff;
  background: var(--red);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ink), 0 3px 6px rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: transform .15s ease;
}
.pin.lit, .pin:hover { transform: scale(1.35); background: var(--yellow); color: var(--ink); z-index: 2; }
.pin-nii { background: var(--green); cursor: default; }
.pin-nii:hover { transform: none; background: var(--green); color: #fff; }
.map-north {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 0 10px;
  font-weight: 800;
  font-size: .85rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.map-north::before { content: "↑ "; }
.map-side h4 { margin: 0 0 8px; font-family: var(--font-title); font-weight: 400; font-size: 1.15rem; }
.beer-list { margin: 0; padding: 0; list-style: none; }
.beer-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 8px;
  font-size: .93rem;
  border-radius: 10px;
  cursor: default;
  transition: background .15s ease;
}
.beer-list li.lit { background: var(--yellow); }
.beer-list .num {
  flex: 0 0 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .85rem;
  color: #fff;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.map-note { margin: 10px 0 0; font-size: .84rem; color: var(--ink-soft); }
.pin-nii-mini {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: .72rem;
  font-weight: 800;
  color: #fff;
  background: var(--green);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

/* 変身 */
.kusaiya-top { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; margin-bottom: 20px; }
@media (max-width: 760px) { .kusaiya-top { grid-template-columns: 1fr; } }
.kusaiya-top img, .wide-shot { border: var(--line); border-radius: 14px; box-shadow: var(--shadow-small); }
.kusaiya-top p { margin-top: 0; }
.dots { padding-left: 1.2em; margin: 0; }
.wide-shot { margin: 20px auto 0; width: 100%; max-width: 720px; }

.wiki-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.wiki-table th, .wiki-table td { padding: 10px 14px; text-align: left; border-bottom: 2px solid #ece9f6; }
.wiki-table thead th { background: var(--gold); }
.wiki-table tbody tr:last-child td { border-bottom: none; }
.wiki-table td:first-child { font-weight: 800; white-space: nowrap; }
