:root {
  --page-bg: #031d17;
  --page-panel: #f7f4e9;
  --page-ink: #102b27;
  --page-muted: #526963;
  --page-green: #08755b;
  --page-gold: #f2c042;
  --page-line: #cad8d2;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.info-page {
  color-scheme: dark;
  min-height: 100vh;
  margin: 0;
  color: var(--page-ink);
  background:
    radial-gradient(circle at 50% 0, rgba(242, 192, 66, 0.16), transparent 24rem),
    linear-gradient(rgba(0, 12, 9, 0.38), rgba(0, 12, 9, 0.78)),
    url("koops-table-bg.svg") center / cover fixed,
    var(--page-bg);
  font: 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.info-page {
  color: #10222d;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-shadow: none;
}

.info-shell {
  width: min(100% - 28px, 980px);
  margin: 0 auto;
  padding: 28px 0 48px;
}

.info-header,
.info-footer,
.info-content {
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
}

.info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-radius: 20px 20px 0 0;
  color: #fff;
  background: rgba(3, 52, 42, 0.94);
}

.info-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 900;
}

.info-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.info-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px 16px;
}

.info-nav a,
.info-footer a {
  color: #d8fff1;
  font-weight: 750;
  text-underline-offset: 4px;
}

.info-nav a[aria-current="page"] { color: var(--page-gold); }

.info-content {
  padding: clamp(24px, 5vw, 58px);
  border-color: var(--page-line);
  background: var(--page-panel);
}

.info-hero {
  padding-bottom: 26px;
  border-bottom: 2px solid var(--page-line);
  margin-bottom: 30px;
}

.info-eyebrow {
  margin: 0 0 6px;
  color: var(--page-green);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.info-page h1 {
  margin: 0;
  color: #10222d;
  font-size: clamp(2.1rem, 7vw, 4rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-shadow: none;
}

.info-lead {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--page-muted);
  font-size: 1.12rem;
}

.info-page h2 {
  margin: 38px 0 10px;
  color: #10222d;
  font-size: 1.55rem;
  font-weight: 850;
  line-height: 1.2;
  text-shadow: none;
}

.info-page h3 {
  margin: 24px 0 6px;
  color: #10222d;
  font-size: 1.12rem;
  font-weight: 820;
  text-shadow: none;
}

.info-page p,
.info-page ul,
.info-page ol {
  margin: 8px 0 14px;
  color: #53656d;
  font-weight: 650;
  text-shadow: none;
}

.info-page li + li { margin-top: 6px; }

.info-page a { color: #006d78; }

.info-toc,
.info-note,
.contact-card,
.guide-step {
  padding: 18px 20px;
  border: 1px solid var(--page-line);
  border-radius: 14px;
  background: #fff;
}

.info-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.info-toc a { font-weight: 750; }

.info-note {
  border-left: 5px solid var(--page-gold);
  background: #fff9df;
}

.contact-card {
  display: grid;
  gap: 5px;
  margin: 18px 0;
}

.contact-card strong { font-size: 1.12rem; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.guide-step h3 { margin-top: 0; }

/* In-game information pages use the same visual language as First Game Guide. */
.dialog-panel.info-page-dialog-panel {
  width: min(920px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  padding: 14px;
  border: 3px solid rgba(3, 18, 17, 0.9);
  border-radius: 18px;
  color: #10222d;
  background:
    radial-gradient(circle at 14% 4%, rgba(255, 255, 255, 0.96), transparent 12rem),
    radial-gradient(circle at 92% 12%, rgba(242, 192, 66, 0.14), transparent 11rem),
    linear-gradient(135deg, #fffdf8 0%, #f2f6ef 48%, #e4f2ec 100%);
  box-shadow: 0 7px 0 rgba(3, 18, 17, 0.8), 0 24px 52px rgba(0, 0, 0, 0.38);
}

.dialog-panel.info-page-dialog-panel .dialog-close {
  position: sticky;
  top: 0;
  z-index: 8;
  float: right;
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  margin: 0 0 -38px 12px;
  padding: 0;
  border: 2px solid rgba(14, 31, 38, 0.2);
  border-radius: 10px;
  color: transparent;
  background: linear-gradient(#ffffff, #e7ece8);
  box-shadow: 0 3px 0 rgba(14, 31, 38, 0.32);
  font-size: 0;
}

.dialog-panel.info-page-dialog-panel .dialog-close::before {
  content: "\00d7";
  color: #24353d;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

.dialog-panel.info-page-dialog-panel .dialog-close:hover {
  background: linear-gradient(#fff9de, #f1d878);
  transform: translateY(-1px);
}

.info-page-modal .info-content {
  counter-reset: info-section;
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 32px);
  border: 0;
  border-radius: 12px;
  color: #10222d;
  background: transparent;
  box-shadow: none;
}

.info-page-modal .info-hero {
  margin: 0;
  padding: 0 62px 18px 0;
  border-bottom: 2px solid rgba(16, 34, 45, 0.14);
}

.info-page-modal .info-eyebrow {
  color: #08755b;
  font-size: 0.76rem;
}

.info-page-modal h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.info-page-modal .info-lead {
  margin-top: 9px;
  color: #53656d;
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.4;
}

.info-page-modal .info-toc {
  gap: 8px;
  padding: 10px;
  border: 2px solid rgba(16, 34, 45, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.info-page-modal .info-toc a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #4f400f;
  background: linear-gradient(#fff4b8, #f2cf67);
  text-decoration: none;
}

.info-page-modal .info-content > section:not(.info-hero) {
  counter-increment: info-section;
  padding: 17px 18px;
  border: 2px solid rgba(16, 34, 45, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 3px 0 rgba(16, 34, 45, 0.12);
}

.info-page-modal .info-content > section:not(.info-hero) > h2:first-child {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.info-page-modal .info-content > section:not(.info-hero) > h2:first-child::before {
  content: counter(info-section);
  display: inline-grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(109, 63, 0, 0.54);
  border-radius: 50%;
  color: #281600;
  background: linear-gradient(#ffd969, #f3ad2b 58%, #c77b17);
  box-shadow: 0 3px 0 rgba(109, 63, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.34);
  font-size: 0.92rem;
  font-weight: 900;
}

.info-page-modal .info-content > section:not(.info-hero) h3 {
  margin: 17px 0 5px;
}

.info-page-modal .info-content > section:not(.info-hero) p,
.info-page-modal .info-content > section:not(.info-hero) li {
  color: #53656d;
  font-weight: 650;
  line-height: 1.45;
}

.info-page-modal .guide-step,
.info-page-modal .contact-card,
.info-page-modal .info-note {
  border: 2px solid rgba(16, 34, 45, 0.14);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 0 rgba(16, 34, 45, 0.1);
}

.info-page-modal .info-note {
  color: #4f400f;
  background: #fff9df;
}

.info-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 22px;
  padding: 17px 20px;
  border-radius: 0 0 20px 20px;
  color: #d8eee7;
  background: rgba(3, 35, 29, 0.96);
}

.info-footer p { margin: 0; }

@media (max-width: 720px) {
  .info-header { align-items: flex-start; }
  .info-nav { display: grid; justify-items: end; }
  .guide-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .info-shell { width: min(100% - 16px, 980px); padding-top: 8px; }
  .info-header { display: grid; }
  .info-nav { justify-items: start; }
  .info-content { padding: 24px 18px; }

  .dialog-panel.info-page-dialog-panel { padding: 8px; }
  .info-page-modal .info-content { padding: 14px 10px; }
  .info-page-modal .info-hero { padding-right: 48px; }
  .info-page-modal .info-content > section:not(.info-hero) { padding: 14px; }
}
