/* The website's game guide (public/guide/, written by tools/game-guide.mjs): the home page's
   look (site.css) with a picture banner, a grid of topic cards and one band per topic, its
   picture beside numbered tips. Works from 360px wide.
   The pages link this file by its version: after a change, run node tools/game-guide.mjs. */

/* The banner: the cloud sea at dusk behind the logo and the title. */
.guide-banner { background: var(--night) url('/app/art/backdrops/camp_sakura_wide.webp') center 40% / cover no-repeat; }
/* The sign-in screen's 4K re-render of the same sky: 1920 px wide, 3840 on sharp desktop screens. */
.guide-banner { background-image: url('/app/art/auth/sky_wide_1920.webp'); background-image: image-set(url('/app/art/auth/sky_wide_1920.webp') 1x, url('/app/art/auth/sky_wide_3840.webp') 2x); }
@media (max-width: 600px) {
  .guide-banner { background-image: url('/app/art/auth/sky_wide_1920.webp'); }
}
.guide-banner-scrim { padding: 48px 16px 72px; background: linear-gradient(180deg, rgba(20, 12, 43, 0.35) 0%, rgba(20, 12, 43, 0.75) 60%, var(--night) 100%); }
.guide-banner-body { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.guide-banner-body .logo { width: 100%; max-width: 380px; height: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5)); }
.guide-banner-body h1 { max-width: 100%; font-size: 52px; line-height: 1.05; overflow-wrap: break-word; hyphens: auto; text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6); }
.guide-banner-body .lead { max-width: 620px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }

/* The topics: a card per topic that jumps to its band. */
.guide-contents { padding-top: 48px; padding-bottom: 48px; background: var(--night); }
.guide-contents .eyebrow, .guide-languages .eyebrow { margin-bottom: 20px; text-align: center; }
.guide-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.guide-topic {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none;
  border-radius: 18px; border: 2px solid var(--line); background: var(--panel); color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); transition: transform 0.18s ease-out, border-color 0.18s, box-shadow 0.18s;
}
.guide-topic:hover, .guide-topic:focus-visible { color: var(--text); border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(242, 177, 52, 0.25); }
.guide-topic img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--chip); }
.guide-topic-name { padding: 12px 14px 2px; font-family: 'Cinzel', Georgia, serif; font-weight: 900; font-size: 17px; line-height: 1.2; color: #fff; overflow-wrap: break-word; hyphens: auto; }
.guide-topic-count { padding: 0 14px 14px; font-size: 14px; color: var(--lilac); }

/* One band per topic, alternating shades, its picture beside its tips. */
.guide-section { padding: 72px 16px; background: var(--deep); }
.guide-section:nth-of-type(odd) { background: var(--night); }
.guide-section-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.guide-section:nth-of-type(odd) .guide-art { order: 2; }
.guide-art { position: sticky; top: 96px; margin: 0; overflow: hidden; border-radius: 24px; border: 2px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.guide-art img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--chip); }
.guide-words { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.guide-words h2 { font-size: 40px; line-height: 1.1; overflow-wrap: break-word; hyphens: auto; }
.guide-tips { display: grid; gap: 12px; margin: 8px 0 0; padding: 0; list-style: none; counter-reset: tip; }
.guide-tip { position: relative; padding: 18px 20px 18px 72px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); counter-increment: tip; }
.guide-tip::before {
  content: counter(tip); position: absolute; left: 18px; top: 16px; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid #ffe08f; background: var(--gold);
  color: #2a1600; font-family: 'Cinzel', Georgia, serif; font-weight: 900; font-size: 18px;
  box-shadow: 0 0 0 4px rgba(242, 177, 52, 0.2);
}
.guide-tip h3 { margin: 0 0 6px; font-size: 19px; color: #fff; overflow-wrap: break-word; hyphens: auto; }
.guide-tip p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--soft); }
.guide-top { align-self: flex-start; padding: 10px 0; font-weight: 600; }

/* The guide in the game's other languages. */
.guide-languages { padding: 56px 16px; background: var(--deep); }
.guide-language-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.guide-language-list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--panel); color: var(--soft); text-decoration: none; font-weight: 700;
}
.guide-language-list a:hover { border-color: var(--lilac); color: #fff; }
.guide-language-list a[aria-current="page"] { border-color: var(--gold); color: #fff; background: var(--chip); }

@media (max-width: 900px) {
  .guide-section-wrap { grid-template-columns: 1fr; gap: 24px; }
  .guide-section:nth-of-type(odd) .guide-art { order: 0; }
  .guide-art { position: static; }
}
@media (max-width: 600px) {
  .guide-banner-scrim { padding: 28px 16px 48px; }
  .guide-banner-body .logo { max-width: 260px; }
  .guide-banner-body h1 { font-size: 36px; }
  .guide-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .guide-topic-name { padding: 10px 10px 2px; font-size: 15px; }
  .guide-topic-count { padding: 0 10px 10px; font-size: 13px; }
  .guide-section { padding: 48px 16px; }
  .guide-words h2 { font-size: 30px; }
  .guide-tip { padding: 14px 16px 14px 60px; }
  .guide-tip::before { left: 12px; top: 13px; width: 34px; height: 34px; font-size: 16px; }
  .guide-tip h3 { font-size: 17px; }
  .guide-tip p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-topic, .guide-topic:hover, .guide-topic:focus-visible { transition: none; transform: none; }
}
