/* D-306 player guide (static pages from tools/build-guide.php). Mobile first; builds on site.css tokens. */
.guide-page { background: #f7f1df url('/assets/images/guide/bg-parchment.webp') repeat; background-size: 512px; }
.guide-header { position: sticky; background: #0b1733 url('/assets/images/guide/bg-night-header.webp') center 60% / cover no-repeat; padding: 10px 16px; gap: 16px; box-shadow: 0 6px 24px rgba(4, 21, 18, .25); }
.guide-header .brand small { opacity: .85; font-size: 11px; letter-spacing: .08em; }
.guide-header .nav-toggle { display: block; }
.guide-header nav { position: absolute; display: none; top: 66px; left: 16px; right: 16px; padding: 14px; border: 1px solid rgba(244, 222, 146, .48); border-radius: 14px; background: rgba(6, 28, 27, .98); box-shadow: var(--shadow); }
.guide-header nav.is-open { display: grid; }
.guide-header nav a { min-height: 44px; display: flex; align-items: center; padding: 7px 10px; text-shadow: none; }
.guide-header .g-lang { border-top: 1px solid rgba(244, 222, 146, .25); margin-top: 6px; }

.g-main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 56px; }
.g-main h1 { margin: 6px 0 12px; color: var(--forest-900); font: 700 clamp(30px, 8vw, 52px)/1.12 Georgia, "Noto Serif Thai", serif; overflow-wrap: anywhere; }
.g-main h2 { margin: 30px 0 12px; color: var(--forest-800); font: 700 clamp(22px, 5vw, 30px)/1.2 Georgia, "Noto Serif Thai", serif; }
.g-main h2 small, .g-main h3 small { color: var(--muted); font: 600 14px "Noto Sans Thai", sans-serif; }
.g-main h3 { margin: 20px 0 10px; color: var(--forest-700); font-size: 18px; }
.g-main a { color: var(--forest-700); }
.g-banner { margin: 0 -16px 10px; overflow: hidden; }
.g-banner img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover;
  /* the art fades to paper at its edges: a mask lets it melt into the parchment page instead of sitting in a box */
  -webkit-mask-image: radial-gradient(ellipse 58% 62% at 50% 46%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 62% at 50% 46%, #000 62%, transparent 100%); }
.g-card.has-icon { grid-template-columns: 56px 1fr; column-gap: 14px; align-items: center; }
.g-card.has-icon > :not(.g-card-icon) { grid-column: 2; }
.g-card-icon { grid-row: 1 / span 3; width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 4px 12px rgba(11, 23, 51, .3); }
.g-crumbs { margin: 0; color: var(--muted); font-size: 14px; }
.g-crumbs a { color: var(--muted); }
.g-lead { max-width: 760px; margin: 0 0 20px; color: #44594f; font-size: 17px; }

.g-prose { max-width: 760px; }
.g-prose p, .g-prose li { font-size: 16px; }
.g-prose-list { margin: 0 0 14px; padding-left: 20px; }
.g-prose-list li { margin: 4px 0; }
.g-prose .g-ref .g-icon { width: 24px; height: 24px; }
.g-cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.g-card { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid #d8c999; border-radius: 16px 4px 16px 4px; background: #fffaf0; text-decoration: none; box-shadow: 0 8px 22px rgba(36, 54, 46, .07); }
.g-main .g-card { color: var(--ink); }
.g-card:hover, .g-card:focus-visible { border-color: var(--gold); background: #fff6dc; }
.g-card h2 { margin: 0; font-size: 22px; }
.g-card p { margin: 0; color: #52685e; font-size: 15px; }
.g-card b { color: #8a6a1d; font-size: 14px; }

.g-toc { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 8px; padding: 4px 16px 10px; scrollbar-width: thin; }
.g-toc a { flex: 0 0 auto; padding: 8px 12px; border: 1px solid #d8c999; border-radius: 999px; background: #fffaf0; font-size: 14px; text-decoration: none; white-space: nowrap; }
.g-toc small { color: var(--muted); }
.g-section { scroll-margin-top: 76px; }

.g-filter { display: grid; gap: 4px; margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.g-filter input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #cabb90; border-radius: 10px; background: #fff; color: var(--ink); }

.g-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.g-list li { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .55); overflow-wrap: anywhere; }
.g-list li small { color: var(--muted); }
.g-list li[hidden], .g-grid li[hidden] { display: none; }
.g-quests p { margin: 4px 0 0; color: #44594f; font-size: 15px; }
.g-quests details summary { cursor: pointer; color: #8a6a1d; font-size: 14px; }
.g-recipes li { line-height: 2; }
.g-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.g-chips li { padding: 4px 10px 4px 6px; border: 1px solid #e3d6ad; border-radius: 999px; background: #fffaf0; font-size: 14px; }
.g-chips small { color: var(--muted); }

.g-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.g-mon { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 10px; border-radius: 12px; background: #fffaf0; border: 1px solid #e3d6ad; text-decoration: none; }
.g-mon span { display: grid; }
.g-main .g-mon b { color: var(--ink); }
.g-mon small { color: var(--muted); font-size: 13px; }

.g-ref { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.g-icon { display: inline-block; width: 32px; height: 32px; flex: 0 0 auto; image-rendering: pixelated; }
.g-icon-blank { border-radius: 6px; background: #e6dbbd; }
.g-sprite { flex: 0 0 auto; width: 48px; height: 48px; object-fit: cover; object-position: 0 50%; image-rendering: pixelated; }
.g-sprite-card { border-radius: 10px; object-fit: cover; object-position: 50% 30%; image-rendering: auto; }
.g-sprite-blank { display: inline-block; border-radius: 10px; background: #e6dbbd; }
.g-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #e9dfc1; color: #4d5f55; font-size: 12px; font-weight: 700; vertical-align: middle; }

.g-hero-art { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin: 0 0 18px; }
.g-hero-art .g-icon { width: 96px; height: 96px; padding: 8px; border-radius: 16px; background: #fffaf0; border: 1px solid #e3d6ad; }
.g-hero-art .g-sprite { width: auto; height: auto; min-width: 80px; max-width: 45vw; aspect-ratio: 1; }
.g-card-art { width: min(220px, 45vw); height: auto; border-radius: 14px; box-shadow: 0 12px 30px rgba(4, 21, 18, .2); }

.g-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.g-facts div { padding: 10px 12px; border: 1px solid #e3d6ad; border-radius: 12px; background: #fffaf0; }
.g-facts dt { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.g-facts dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }

.g-table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.g-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.g-table th { position: sticky; top: 0; padding: 8px 10px; background: #efe4c4; color: #3d5248; font-size: 13px; text-align: left; white-space: nowrap; }
.g-table td { padding: 8px 10px; border-bottom: 1px solid #e6dbbd; vertical-align: middle; }
.g-table tr:target td { background: #fff1c2; }

.g-towns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.g-town { margin: 0; overflow: hidden; border: 1px solid #e3d6ad; border-radius: 14px; background: #fffaf0; scroll-margin-top: 76px; }
.g-town img { width: 100%; height: auto; aspect-ratio: 289 / 276; object-fit: cover; }
.g-town figcaption { display: grid; padding: 8px 10px; }
.g-town figcaption span { color: var(--muted); font-size: 13px; }

@media (min-width: 640px) {
  .g-main { padding: 24px 24px 72px; }
  .g-banner { margin: 0 -24px 12px; }
  .g-cards { grid-template-columns: repeat(2, 1fr); }
  .g-grid { grid-template-columns: repeat(2, 1fr); }
  .g-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-towns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-toc, .g-table-wrap { margin: 0 -24px 8px; padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 1000px) {
  .guide-header .nav-toggle { display: none; }
  .guide-header nav { position: static; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; padding: 0; border: 0; background: none; box-shadow: none; }
  .guide-header nav a { min-height: 36px; padding: 4px 2px; font-size: 13px; }
  .guide-header .g-lang { border-top: 0; margin: 0; padding: 4px 10px; border: 1px solid rgba(244, 222, 146, .6); border-radius: 999px; }
  .g-cards { grid-template-columns: repeat(3, 1fr); }
  .g-banner { margin: 0 0 6px; }
  .g-grid { grid-template-columns: repeat(3, 1fr); }
  .g-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g-towns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* An open realm on the world page (WEBSITE_OPEN_REALMS): tagline, the airship in, the route plan. */
.g-realm-tag { margin: 4px 0 6px; }
.g-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #b45f2a; color: #fff8e8; font-size: 12px; font-weight: 800; letter-spacing: .02em; vertical-align: 1px; }
.g-realm-way { margin: 0 0 12px; color: var(--muted); }
.g-realm-route { margin: 0 0 14px; }
.g-realm-route img { width: 100%; height: auto; border-radius: 14px; border: 1px solid #e3d6ad; background: #071a24; }
.g-realm-route figcaption { color: var(--muted); font-size: 13px; padding-top: 4px; }
/* SEO pass: the "play free" pill stays in the header while the guide's menu is folded (under 1000 px) */
.guide-header .header-play { display: inline-flex; align-items: center; margin-left: auto; min-height: 40px; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 800; white-space: nowrap; text-decoration: none; color: #193029; background: linear-gradient(#f3dc8a, #cf9f3b); border: 1px solid #f4de92; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
@media (min-width: 1000px) { .guide-header .header-play { display: none; } }
.g-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 18px 0 6px; }
.g-cta p { margin: 0; color: var(--muted); }
.g-related { margin-top: 8px; }
