/* Game guide pages (games/<slug>/how-to-play.html), loaded after css/theme.css.
   Pages are generated by tools/build_game_guides.py. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body.guide { line-height: 1.6; }
.guide a { color: inherit; }
.guide .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.guide .breadcrumb a { text-decoration: none; }
.guide .breadcrumb-sep { font-size: 0.7rem; opacity: 0.6; }

/* ---------- Hero: text + screenshot ---------- */
.guide .guide-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.guide .guide-hero::after { right: auto; left: clamp(280px, 46%, 560px); top: 18px; transform: rotate(10deg); font-size: clamp(2.6rem, 6vw, 4.5rem); }
.guide .page-header h1 { max-width: 16ch; }
.guide .page-desc { margin: 0 0 22px; }
.guide-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.btn-play, .btn-soft {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 1rem;
  padding: 13px 22px; border-radius: 999px; border: var(--edge); transition: transform .12s, box-shadow .12s;
}
.btn-play { background: var(--pop-yellow); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn-soft { background: #fff; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn-play:hover, .btn-soft:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--accent); }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.facts li { background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 0.8rem; font-weight: 800; }
.guide-shot { display: block; border: var(--edge); border-radius: 22px; overflow: hidden; box-shadow: 6px 6px 0 var(--ink); transform: rotate(1.5deg); transition: transform .16s; background: var(--ink); }
.guide-shot:hover { transform: rotate(0deg) translate(-2px, -2px); }
.guide-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- Body sections ---------- */
.guide-body { max-width: 860px; margin: 0 auto; }
.g-sec { margin: 0 0 44px; }
.g-sec h2, .play-band h2 { font-family: var(--serif); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.1; margin: 0 0 16px; }
.g-sec p { color: #2f2a3d; font-size: 1.02rem; margin: 0 0 14px; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; background: #fff; border: var(--edge); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); padding: 14px 18px 14px 64px; font-weight: 500; }
.steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; border: 2px solid var(--ink); font-weight: 800; font-family: var(--serif);
}

.table-wrap { overflow-x: auto; border: var(--edge); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); background: #fff; }
.controls { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.controls th, .controls td { text-align: left; padding: 12px 16px; border-bottom: 2px dashed var(--line); vertical-align: top; }
.controls thead th { background: var(--tint); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 2px solid var(--ink); }
.controls tbody tr:last-child th, .controls tbody tr:last-child td { border-bottom: 0; }
.controls tbody th { font-weight: 800; white-space: nowrap; }

.rules { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rule { background: #fff; border: var(--edge); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); padding: 14px 18px; }
.rule dt { font-family: var(--serif); font-weight: 800; font-size: 1.08rem; letter-spacing: -0.02em; margin-bottom: 4px; }
.rule dd { margin: 0; color: #3c3650; font-size: 0.95rem; }

.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tips li { position: relative; padding: 12px 16px 12px 48px; background: var(--tint); border: 2px solid var(--ink); border-radius: 16px; font-weight: 500; }
.tips li::before { content: "💡"; position: absolute; left: 15px; top: 11px; }

.play-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--accent); color: #fff; border: var(--edge); border-radius: 26px; box-shadow: 6px 6px 0 var(--ink);
  padding: 26px clamp(20px, 4vw, 36px); margin: 0 0 44px;
}
.play-band h2 { margin: 0 0 4px; color: #fff; }
.play-band p { margin: 0; font-weight: 600; opacity: 0.92; }

.faq details { background: #fff; border: var(--edge); border-radius: 16px; padding: 14px 18px; margin-bottom: 12px; box-shadow: 3px 3px 0 var(--ink); }
.faq summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 10px 0 0; }

.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.more-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; background: #fff; border: var(--edge); border-radius: 20px; box-shadow: var(--lift); padding: 10px 10px 14px; transition: transform .16s, box-shadow .16s; }
.more-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--accent); }
.more-card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border: 2px solid var(--ink); border-radius: 12px; margin-bottom: 6px; }
.more-card b { font-family: var(--serif); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; padding: 0 4px; }
.more-card span { color: var(--accent); font-weight: 700; font-size: 0.88rem; padding: 0 4px; }
.all-link { margin-top: 18px; font-weight: 800; }
.all-link a { color: var(--accent); }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .guide .guide-hero { grid-template-columns: 1fr; }
  .guide-shot { transform: none; max-width: 560px; }
  .guide .guide-hero::after { left: auto; }
  .rules { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .more-grid { grid-template-columns: 1fr; }
  .controls { font-size: 0.86rem; }
  .controls th, .controls td { padding: 10px 12px; }
  .controls tbody th { white-space: normal; }
  .btn-play, .btn-soft { width: 100%; justify-content: center; }
}
