/* The standalone field guide lives below the existing full-height play surface. */
html:not(.portal-embed), html:not(.portal-embed) body {
  height: auto;
  min-height: 100%;
  overflow-x: clip;
  overflow-y: auto;
}
.portal-embed [data-standalone] { display: none !important; }
.game-guide {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 28px 48px;
  color: #c6dbe8;
  font: 400 1rem/1.75 var(--font-body, "Segoe UI", sans-serif);
  scroll-margin-top: 20px;
}
.game-guide h2, .game-guide h3, .game-guide h4 { color: #eef9ff; line-height: 1.15; }
.game-guide h2 { max-width: 760px; margin: 12px 0 20px; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.04em; }
.game-guide h3 { margin: 8px 0 18px; font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.025em; }
.game-guide h4 { margin: 0 0 10px; font-size: 1.125rem; }
.game-guide p { max-width: 78ch; margin: 0 0 18px; }
.game-guide a, .about-page a { color: #9eeeff; text-underline-offset: .2em; }
.game-guide a:hover, .about-page a:hover { color: #fff; }
.guide-kicker { color: #76cadd; font-size: .75rem; font-weight: 700; letter-spacing: .13em; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-top: 26px; }
.guide-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.guide-play { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border: 1px solid #4d8295; border-radius: 6px; color: #b9f5ff; text-decoration: none; font-weight: 600; }
.guide-nav .guide-play { margin-left: auto; }
.guide-section { padding: 40px 0 24px; border-top: 1px solid #243f50; margin-top: 38px; scroll-margin-top: 28px; }
.guide-columns { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; }
.guide-controls { margin: 0; padding: 0 0 0 24px; border-left: 2px solid #386679; }
.guide-controls div, .guide-questions div { margin-bottom: 20px; }
.guide-controls dt, .guide-questions dt { font-weight: 650; color: #eef9ff; }
.guide-controls dd, .guide-questions dd { margin: 5px 0 0; }
.game-guide kbd { display: inline-block; min-width: 1.55em; margin-right: 3px; padding: 0 4px; border: 1px solid #496b7e; border-radius: 3px; color: #eef9ff; text-align: center; font: inherit; }
.guide-tips { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; padding-left: 26px; margin: 28px 0 0; }
.guide-tips li { padding-left: 6px; }
.guide-tips li::marker { color: #7be8ff; font-weight: 700; }
.guide-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 28px; }
.guide-gallery figure { margin: 0; min-width: 0; }
.guide-gallery img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: cover; object-position: center; border: 1px solid #274659; border-radius: 8px; background: #07111f; }
.guide-gallery figcaption { font-size: .9rem; line-height: 1.6; padding-top: 14px; }
.guide-gallery figcaption strong { display: block; color: #eef9ff; margin-bottom: 6px; }
.guide-milestones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 28px 0; }
.guide-milestones p { padding-left: 16px; border-left: 2px solid #365e72; }
.guide-milestones strong { display: block; color: #9eeeff; font-size: 1.45rem; }
.guide-details { margin: 24px 0; border: 1px solid #355b70; border-radius: 6px; }
.guide-details summary { min-height: 48px; padding: 16px 20px; color: #b9f5ff; cursor: pointer; font-weight: 600; }
.guide-table { width: calc(100% - 32px); margin: 0 16px 20px; border-collapse: collapse; font-size: .95rem; }
.guide-table caption { padding: 8px 0 14px; color: #9bb7c7; text-align: left; }
.guide-table th, .guide-table td { padding: 10px 8px; border-bottom: 1px solid #203d4f; text-align: left; }
.guide-table thead th { color: #91dded; }
.guide-table tbody th { color: #e6f2f8; font-weight: 500; }
.guide-table td:last-child, .guide-table thead th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.guide-questions { max-width: 850px; margin: 28px 0 0; }
.guide-questions div { padding-bottom: 20px; border-bottom: 1px solid #203748; }
.guide-creator { display: flex; align-items: center; gap: 40px; border-top: 1px solid #355b70; padding-top: 42px; margin-top: 22px; }
.guide-creator > div { flex: 1; }
.guide-creator .guide-play { flex-shrink: 0; }
.guide-header-link { position: relative; z-index: 2; margin-left: auto; min-height: 44px; display: inline-flex; align-items: center; padding: 8px 14px; color: #a8eafa; text-underline-offset: .2em; font-size: .875rem; white-space: nowrap; }
.guide-start-link { display: block; width: fit-content; min-height: 44px; margin: 10px auto 0; padding: 10px 8px; color: #b9edfa; font-size: .875rem; text-underline-offset: .2em; }
.game-guide :focus-visible, .guide-header-link:focus-visible, .guide-start-link:focus-visible, .about-page :focus-visible { outline: 2px solid #b1f3ff; outline-offset: 5px; }
html:not(.portal-embed) body::before { pointer-events: none; }
html:has(> .about-page) { background: #07111f; color-scheme: dark; }
.about-page { max-width: 860px; margin: 0 auto; padding: 40px 24px 64px; background: #07111f; color: #d4e6ef; font: 16px/1.75 system-ui, sans-serif; color-scheme: dark; }
.about-page h1, .about-page h2 { color: #f0fcff; line-height: 1.2; }
.about-page h1 { font-size: clamp(2rem, 6vw, 3rem); }
.about-page h2 { margin-top: 2rem; scroll-margin-top: 24px; }
.about-page small { color: #a4bbca; }
.about-page .about-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.about-page .about-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid #487a92; border-radius: 6px; text-decoration: none; }
@media (max-width: 700px) {
  .game-guide { padding: 42px 20px 36px; }
  .guide-columns, .guide-tips { grid-template-columns: 1fr; gap: 20px; }
  .guide-controls { padding-left: 16px; }
  .guide-gallery { gap: 14px; grid-template-columns: 1fr; }
  .guide-gallery figure { display: grid; grid-template-columns: minmax(120px, .8fr) 1fr; gap: 18px; align-items: center; }
  .guide-gallery img { max-height: 280px; }
  .guide-gallery figcaption { padding-top: 0; }
  .guide-milestones { grid-template-columns: 1fr 1fr; gap: 12px; }
  .guide-creator { display: block; }
  .guide-nav .guide-play { margin-left: 0; }
  .guide-section { margin-top: 28px; padding-top: 30px; }
  .guide-header-link { font-size: .8rem; padding-right: 4px; }
  .guide-table { font-size: .85rem; }
  .guide-table th, .guide-table td { padding: 9px 4px; }
}
@media (prefers-reduced-motion: reduce) { .game-guide { scroll-behavior: auto; } }
