:root {
  --text: #f1e6cc;
  --muted: #b7ad9c;
  --line: #34324e;
  --paper: #221f3a;
  --white: #17162b;
  --cta: #e08355;
  --cta-shadow: #8f4a2c;
  --sun: #e2b765;
  --rose: #ff8db0;
  --sky: #e2b765;
  --leaf: #4aa63a;
  --glass: rgba(10, 14, 35, .78);
  --veil: rgba(255, 255, 255, .25);
  --radius: 12px;
  --serif: "Pixelify Sans", "Courier New", monospace;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --display: "Pixelify Sans", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--sky); }
a:hover { color: var(--text); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: 44px; }
h2 { font-size: 28px; margin-top: 48px; }
h3 { font-size: 18px; font-weight: 600; margin-top: 24px; }
p { margin: 0 0 16px; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--white); padding: 8px 12px; border-radius: var(--radius); z-index: 10; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.bar-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 20px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--sky); color: var(--white); font-family: var(--sans); font-size: 18px; line-height: 1; }
.bar-sep { color: var(--muted); }
.bar-page { font-size: 15px; font-weight: 600; white-space: nowrap; }
.bar-tag { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-nav { margin-left: auto; display: flex; gap: 16px; }
.bar-nav a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.bar-nav a:hover { color: var(--cta); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--cta); color: var(--cta); }
.chip-msg { font-size: 13px; color: var(--muted); }

/* ---------- game stage wrapper (the game itself is styled in its tool.css) ---------- */
.stage { padding: 0; }

/* ---------- under the stage ---------- */
.under { padding-top: 16px; }
.under-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 32px; }
.under h1 { margin-bottom: 12px; }
.intro { font-size: 18px; color: var(--muted); max-width: 64ch; }
.unofficial { font-size: 14px; color: var(--muted); max-width: 70ch; }
.fold { background: var(--paper); border-radius: 14px; margin: 24px 0; }
.fold summary { list-style: none; cursor: pointer; padding: 18px 24px; position: relative; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "⌄"; position: absolute; right: 24px; top: 16px; font-size: 20px; color: var(--muted); transition: transform .2s; }
.fold[open] summary::after { transform: rotate(180deg); }
.fold-h { display: block; font-size: 18px; font-weight: 600; }
.fold-s { display: block; font-size: 14px; color: var(--muted); }
.fold-body { padding: 0 24px 24px; }
.prose > * { max-width: 72ch; }
.prose > table { max-width: none; }
.prose h2 { font-size: 24px; margin-top: 32px; }
.prose ol, .prose ul { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 10px; overflow: hidden; margin: 0 0 24px; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; }
.page-prose { padding-top: 40px; padding-bottom: 40px; }
.updated { color: var(--muted); font-size: 14px; }
.ad-slot { margin: 16px 0; }

/* ---------- home ---------- */
.paper { padding-top: 40px; }
.paper-top { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: end; padding-bottom: 16px; border-bottom: 2px solid var(--text); }
.paper-title h1 { font-size: 52px; margin: 0; }
.dateline { font-family: var(--serif); font-size: 20px; margin: 6px 0 0; color: var(--muted); }
.paper-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.widget { font-size: 15px; }
.w-h { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.w-q { margin: 0 0 10px; font-family: var(--serif); font-size: 21px; line-height: 1.3; }
.w-t { margin: 0; color: var(--muted); }
.w-btn { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--paper); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.w-btn:hover { background: var(--line); color: var(--text); }
.shelf-h { margin: 40px 0 16px; font-size: 26px; }
.shelf-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.card:hover { color: var(--text); }
.card-cover { display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--paper); }
.card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.card:hover .card-cover img { transform: scale(1.04); }
.card-flip img { rotate: x 180deg; }
.card-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--white); font-family: var(--display); font-size: 15px; }
.card-icon-rocket { background: var(--sky); }
.card-icon-mountain { background: var(--leaf); }
.card-icon-opposite { background: var(--cta); }
.card-text { min-width: 0; line-height: 1.3; }
.card-text strong { display: block; font-size: 16px; font-weight: 600; }
.card-text span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-suggest { align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 180px; padding: 20px; border-radius: 10px; background: var(--paper); }
.card-suggest span { font-size: 14px; color: var(--muted); }
.card-suggest .suggest-plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--white); font-size: 22px; color: var(--text); }
.home-prose { padding-top: 24px; }
.faq { padding-bottom: 32px; }
.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
.faq-item { padding: 14px 0; border-top: 1px solid var(--line); }
.faq-item h3 { margin: 0 0 6px; font-size: 16px; }
.faq-item p { margin: 0; color: var(--muted); }

/* ---------- footer ---------- */
.foot { background: var(--paper); margin-top: 64px; padding: 40px 0 28px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.foot-h { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; }
.foot-cols a { display: block; margin-bottom: 6px; color: var(--muted); text-decoration: none; font-size: 15px; }
.foot-cols a:hover { color: var(--text); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; }
.foot-base p { margin: 0; max-width: 56ch; font-size: 13px; color: var(--muted); text-align: right; }

@media (prefers-reduced-motion: reduce) {
}
@media (max-width: 820px) {
  .paper-top, .paper-row, .faq-list { grid-template-columns: 1fr; }
  .bar-tag { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1, .paper-title h1 { font-size: 34px; }
  .stage { padding: 0; }
  .bar-nav { display: none; }
  .bar-row { gap: 8px; }
  .bar .brand { flex: none; }
  .bar-page { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
  .shelf-row { grid-template-columns: 1fr 1fr; gap: 14px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-base p { text-align: left; }
}


/* Krillion intro: keep the wordmark clear of the rocket */
.pk .pk-logo { flex-direction: column-reverse; }
.pk .pk-k { font-size: clamp(48px, 10vw, 84px); }
.pk .pk-u { margin: 0 0 10px; }
.pk .pk-s { display: none; }
.pk .pk-intro { padding-top: 54px; }


/* ---------- dusk shell: home scene and game tiles ---------- */
h1, h2 { font-weight: 600; letter-spacing: .01em; }
.home-scene { position: relative; height: clamp(440px, 70svh, 600px); overflow: hidden; isolation: isolate; background: #1a1930; }
.home-scene .pk-cv { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; z-index: -1; }
.home-scene .pk-labels { display: none; }
.home-scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(8,6,18,.11) 2px 3px); }
.home-hero { height: 100%; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding-top: 28px; padding-bottom: 24px; text-align: center; }
.home-eyebrow { margin: 0 0 12px; font: 500 12px "DM Mono", monospace; letter-spacing: .3em; text-transform: uppercase; color: var(--text); }
.home-title h1 { margin: 0; font-size: clamp(34px, 6.4vw, 68px); line-height: .95; text-shadow: 0 4px 0 #0e0d1c, 3px 0 0 #0e0d1c, -3px 0 0 #0e0d1c, 0 -3px 0 #0e0d1c, 3px 3px 0 #0e0d1c, -3px 3px 0 #0e0d1c, 3px -3px 0 #0e0d1c, -3px -3px 0 #0e0d1c; }
.home-warm { position: relative; z-index: 1; width: min(460px, 100%); padding: 14px 16px 18px; background: #23213a; border: 2px solid #0e0d1c; border-radius: 4px; box-shadow: 0 4px 0 #0e0d1c; text-align: left; }
.w-h { font-family: "DM Mono", monospace; font-weight: 500; font-size: 12px; letter-spacing: .14em; color: var(--sun); }
.home-warm .w-q { margin: 4px 0 12px; font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.1; }
.home-play { display: flex; align-items: center; justify-content: center; min-height: 48px; background: var(--cta); color: #1f1410; border: 2px solid #0e0d1c; border-radius: 4px; box-shadow: 0 4px 0 #0e0d1c; font: 600 16px var(--serif); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.home-play:hover { color: #1f1410; filter: brightness(1.08); }
.shelf-row { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { gap: 0; overflow: hidden; background: var(--paper); border: 2px solid #0e0d1c; border-radius: 4px; box-shadow: 0 4px 0 #0e0d1c; }
.card-cover { display: grid; place-items: center; border-radius: 0; background: linear-gradient(to bottom, #32305a 0, #886480 40%, #eeb280 58%, #1b1a2e 58%, #1b1a2e 65%, #5a4a62 65%, #22303c 100%); }
.card-cover-opposite { background: linear-gradient(to top, #32305a 0, #886480 40%, #eeb280 58%, #1b1a2e 58%, #1b1a2e 65%, #5a4a62 65%, #22303c 100%); }
.card-cover-mountain { background: linear-gradient(to bottom, #28425c 0, #60968f 40%, #fadea0 58%, #10242a 58%, #10242a 65%, #4a6a62 65%, #1a2c34 100%); }
.card-mark { font: 700 56px var(--serif); line-height: 1; color: var(--text); text-shadow: 0 4px 0 #0e0d1c, 3px 0 0 #0e0d1c, -3px 0 0 #0e0d1c, 0 -3px 0 #0e0d1c, 3px 3px 0 #0e0d1c, -3px 3px 0 #0e0d1c, 3px -3px 0 #0e0d1c, -3px -3px 0 #0e0d1c; }
.card-meta { justify-content: space-between; gap: 12px; padding: 12px 14px; }
.card-text strong { font-family: var(--serif); font-size: 18px; }
.card-text span { white-space: normal; }
.card-go { flex: none; padding: 6px 12px; background: var(--cta); color: #1f1410; border: 2px solid #0e0d1c; border-radius: 4px; font: 600 13px var(--serif); letter-spacing: .1em; text-transform: uppercase; }
.suggest { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 24px; padding: 14px 16px; border: 2px dashed var(--line); border-radius: 4px; color: var(--muted); text-decoration: none; font-size: 15px; }
.suggest strong { color: var(--sun); font-weight: 600; }
.suggest:hover { color: var(--text); border-color: var(--muted); }


/* ---------- logo and game covers ---------- */
.brand { gap: 10px; font-weight: 600; font-size: 19px; letter-spacing: .08em; text-transform: uppercase; }
.brand b { color: var(--sun); font-weight: inherit; }
.brand-mark { display: block; flex: none; width: 36px; height: 31px; border: 2px solid #0e0d1c; border-radius: 4px; box-shadow: 0 3px 0 #0e0d1c; background: none; }
.card-cover-rocket { background: #1a1930 url(/_a/cover-krillion-dusk.cf2b657432.jpg) center / cover no-repeat; }
.card-cover-opposite { background: #1a1930 url(/_a/cover-opposite-dusk.0bd5e04bf8.jpg) center / cover no-repeat; }
.card-cover-mountain { background: #1a1930 url(/_a/cover-minellion-dusk.5aa6643d4f.jpg) center / cover no-repeat; }
.card-cover-atlas { background: #1a1930 url(/_a/cover-lamplit-dusk.342d44a441.jpg) center / cover no-repeat; }
.card-mark { display: none; }
.card-cover { border-bottom: 2px solid #0e0d1c; }
