/* PokéSurvivor game theme (SOP v3.22, 02 §2.1). Loaded by the hub and every page of /poke-survivor/.
   Visual source: the original game's own screens at pokesurvivor.com (captured 16 Nov 2026):
   a royal-blue login panel with a white rounded frame, gold Pixelify Sans title, gold gradient
   "Log in" button, deep-navy inputs, and a top-down pixel grass field around the panel.
   Long-form reading sits on a light sheet; the blue panel is reserved for answers, heroes and cards.
   Layout base stays in /assets/guide-article-layout.css; play.css only handles the player. */
@font-face {
  font-family: "Pixelify Sans";
  src: url("/assets/fonts/pixelify-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  --ps-night: #0a1433; --ps-navy: #0f1e4a; --ps-blue: #24479a; --ps-blue-hi: #2f5bc0; --ps-blue-lo: #1b3577;
  --ps-gold: #ffd23f; --ps-gold-lo: #f5a623; --ps-sky: #9fd4ff; --ps-mist: #c4d4f5;
  --ps-grass: #3f7d31; --ps-grass-lo: #2a5a22; --ps-dirt: #8a6a3f;
  --ps-sheet: #eef2fb; --ps-card: #ffffff; --ps-ink: #14214a; --ps-dim: #4b5a82; --ps-line: #c9d3ee; --ps-pale: #e1e8f8;
  --pixel: "Pixelify Sans", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
  /* tokens the shared layout reads */
  --paper: var(--ps-sheet); --white: var(--ps-card); --ink: var(--ps-ink); --muted: var(--ps-dim);
  --line: var(--ps-line); --pale: var(--ps-pale); --green: var(--ps-blue); --gold: var(--ps-gold);
  --heading: var(--pixel); --reading: 70ch;
}

/* ---------- base ---------- */
body.ps-theme { margin: 0; background: var(--ps-sheet); color: var(--ps-ink); font: 17px/1.7 var(--body); }
.ps-theme * { box-sizing: border-box; }
html:has(body.ps-theme) { scroll-padding-top: 1.25rem; background: var(--ps-night); }
.ps-theme a { color: #1f4fb8; text-underline-offset: 3px; }
.ps-theme a:hover { color: var(--ps-navy); text-decoration-thickness: 2px; }
.ps-theme :focus-visible { outline: 3px solid var(--ps-gold-lo); outline-offset: 3px; }
.ps-theme img { max-width: 100%; height: auto; display: block; }
.ps-theme img[src$=".svg"][src*="/icons/"] { image-rendering: pixelated; }
.ps-theme h1, .ps-theme h2, .ps-theme h3, .ps-theme .brand { font-family: var(--pixel); font-weight: 700; line-height: 1.15; letter-spacing: .01em; color: var(--ps-navy); }
.ps-theme h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin: .3em 0; }
.ps-theme h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); margin: 0 0 .8rem; }
.ps-theme h3 { font-size: 1.2rem; }
.ps-theme p { margin: .7rem 0 1.1rem; }
.ps-theme code, .ps-theme kbd { font: 13px ui-monospace, Consolas, monospace; background: var(--ps-card); border: 2px solid var(--ps-ink); border-radius: 4px; padding: 0 5px; color: var(--ps-ink); }
.ps-theme .wrap { width: min(1180px, calc(100% - 64px)); margin: auto; }
.ps-theme .skip { position: absolute; top: -90px; left: 12px; background: var(--ps-gold); color: var(--ps-night); padding: 10px; z-index: 40; }
.ps-theme .skip:focus { top: 10px; }
.ps-theme .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ps-theme [hidden] { display: none !important; }
.ps-theme .eyebrow, .ps-theme .tag { font: 700 12px/1.4 var(--pixel); letter-spacing: .12em; text-transform: uppercase; color: var(--ps-blue); background: none; padding: 0; }
.ps-theme .meta, .ps-theme .byline { font-size: 13px; color: var(--ps-dim); }

/* ---------- the game's blue panel ---------- */
.ps-theme .ps-panel, .ps-theme .article-head .answer, .ps-theme .legal-panel {
  background: linear-gradient(180deg, var(--ps-blue-hi), var(--ps-blue) 38%, var(--ps-blue-lo));
  color: #f2f6ff; border: 3px solid #fff; border-radius: 12px;
  box-shadow: 0 0 0 2px var(--ps-navy), 0 6px 0 #0a143340;
}
.ps-theme .ps-panel a, .ps-theme .article-head .answer a { color: var(--ps-gold); }

/* ---------- header: night bar with a pixel grass edge ---------- */
.ps-theme .top { background: var(--ps-night); border: 0; position: relative; z-index: 20; }
.ps-theme .top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--ps-grass) 0 12px, var(--ps-grass-lo) 12px 18px, var(--ps-grass) 18px 30px, #4f9440 30px 36px); }
.ps-theme .top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 74px; }
.ps-theme .brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ps-gold); font-size: 24px; white-space: nowrap; min-width: 0; text-shadow: 2px 2px 0 #00000080; }
.ps-theme .brand:hover { color: #ffe27a; }
.ps-theme .brand img { width: 40px; height: 40px; flex: none; }
.ps-theme .brand small { display: block; font: 600 10px/1.5 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ps-mist); margin-top: 3px; text-shadow: none; }
.ps-theme .desktop-nav { display: flex; align-items: center; gap: 2px; }
.ps-theme .desktop-nav a, .ps-theme .mobile-links a { color: #e6edff; text-decoration: none; font: 700 14px/1.3 var(--body); padding: 10px 11px; border-radius: 6px; min-height: 44px; display: inline-flex; align-items: center; }
.ps-theme .desktop-nav a:hover, .ps-theme .mobile-links a:hover { color: var(--ps-gold); background: #ffffff12; }
.ps-theme .desktop-nav a[aria-current=page], .ps-theme .mobile-links a[aria-current=page] { color: var(--ps-gold); box-shadow: inset 0 -3px 0 var(--ps-gold); }
/* Play = the game's gold button */
.ps-theme .desktop-nav a[href$="/poke-survivor/play/"], .ps-theme .mobile-links a[href$="/poke-survivor/play/"], .ps-theme .ps-btn.ps-btn-play {
  background: linear-gradient(180deg, #ffe066, var(--ps-gold) 45%, var(--ps-gold-lo)); color: #2b1d00; border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--ps-navy), 0 3px 0 2px #0a143380; margin-right: 10px; padding-inline: 16px; font-family: var(--pixel); letter-spacing: .03em; }
.ps-theme .desktop-nav a[href$="/poke-survivor/play/"]::before, .ps-theme .mobile-links a[href$="/poke-survivor/play/"]::before { content: "▶"; font-size: 10px; margin-right: 7px; }
.ps-theme .desktop-nav a[href$="/poke-survivor/play/"]:hover, .ps-theme .mobile-links a[href$="/poke-survivor/play/"]:hover { background: linear-gradient(180deg, #fff09a, #ffe066 45%, var(--ps-gold)); color: #2b1d00; }
.ps-theme .desktop-nav a[href$="/poke-survivor/play/"][aria-current=page] { box-shadow: 0 0 0 2px var(--ps-navy), 0 3px 0 2px #0a143380; }
.ps-theme .mobile-nav { display: none; position: static; }
.ps-theme .mobile-nav summary { list-style: none; cursor: pointer; border: 2px solid #fff; background: var(--ps-blue); color: #fff; padding: 8px 15px; border-radius: 8px; font: 700 15px var(--pixel); min-height: 44px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ps-theme .mobile-nav summary::-webkit-details-marker { display: none; }
.ps-theme .mobile-nav:not([open]) > .mobile-links { display: none; }

/* ---------- article pages ---------- */
.ps-theme .crumbs { font-size: 13px; color: var(--ps-dim); padding: 26px 0 2px; }
.ps-theme .crumbs a { color: var(--ps-dim); }
.ps-theme .crumbs a:hover { color: var(--ps-blue); }
.ps-theme .article-head { padding: 12px 0 16px; }
.guide-layout.ps-theme .article-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.ps-theme .article-head .answer { padding: 18px 22px; font-size: 18px; line-height: 1.6; margin: 16px 0 14px; max-width: 880px; }
.ps-theme .article-head .answer strong { color: var(--ps-gold); }
.ps-theme .language-switch { font-size: 14px; margin: 6px 0 14px; }
.guide-layout.ps-theme .article-layout > .toc { background: var(--ps-card); border: 2px solid var(--ps-line); border-radius: 10px; }
.ps-theme .toc strong { color: var(--ps-blue); font: 700 12px var(--pixel); letter-spacing: .1em; text-transform: uppercase; }
.guide-layout.ps-theme .toc a, .guide-layout.ps-theme .article-layout > .toc a { background: var(--ps-pale); border: 1px solid var(--ps-line); color: var(--ps-ink); text-decoration: none; border-radius: 6px; }
.guide-layout.ps-theme .toc a:hover { border-color: var(--ps-blue); color: var(--ps-blue); }
.ps-theme .prose { overflow-wrap: anywhere; }
.ps-theme .prose > section { border-top: 2px dashed var(--ps-line); padding-top: .4rem; }
.ps-theme .prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-top: 2rem; }
.ps-theme .prose h2::before { content: ""; display: inline-block; width: .5em; height: .5em; background: var(--ps-gold); box-shadow: 0 0 0 3px var(--ps-navy); margin: 0 .65em .12em .15em; vertical-align: middle; }
.ps-theme .prose h3 { margin-top: 1.5rem; }
.ps-theme .prose li { padding: 3px 0; }
.ps-theme .prose li::marker { color: var(--ps-blue); font-weight: 700; }
.ps-theme .prose figure, .ps-theme figure.diagram { margin: 20px 0 24px; }
.ps-theme figure.diagram img { border-radius: 10px; border: 2px solid var(--ps-line); background: var(--ps-card); }
/* 00 §3 screenshot framing: never taller than the viewport */
.ps-theme .prose figure img, .ps-theme figure.diagram img, .guide-layout.ps-theme figure.game-image img { max-width: 100%; height: auto; max-height: min(70vh, 640px); object-fit: contain; }
.ps-theme figcaption { color: var(--ps-dim); font-size: 13px; margin-top: 6px; }
.ps-theme .table-wrap { overflow-x: auto; max-width: 100%; border: 2px solid var(--ps-navy); border-radius: 10px; margin: 20px 0; background: var(--ps-card); }
.ps-theme table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.55; }
.ps-theme th, .ps-theme td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ps-line); }
.ps-theme th { background: var(--ps-blue); color: #fff; font: 700 13px var(--body); letter-spacing: .02em; }
.ps-theme tbody tr:nth-child(even) td { background: #f5f8ff; }
.ps-theme tr:last-child td { border-bottom: 0; }
.ps-theme td { overflow-wrap: anywhere; }
.ps-theme .note { background: var(--ps-card); border: 2px solid var(--ps-line); border-left: 6px solid var(--ps-gold); border-radius: 8px; padding: 13px 17px; margin: 20px 0; font-size: 15px; }
.ps-theme .legal { max-width: var(--reading); padding: 4px 0 50px; margin-inline: auto; }
.ps-theme .sources { border-top: 2px solid var(--ps-line); margin-top: 30px; padding-top: 10px; font-size: 13px; color: var(--ps-dim); }
.ps-theme .sources h2 { font-size: 1.1rem; }
.ps-theme .sources h2::before { display: none; }
.ps-theme .related { border-top: 2px solid var(--ps-line); margin-top: 26px; padding-top: 8px; }
.ps-theme .related a { display: block; padding: 6px 0; }
/* related guides (register_page.py) */
.ps-theme .related-tasks { margin: 34px 0 10px; padding: 18px 20px; background: var(--ps-card); border: 2px solid var(--ps-line); border-radius: 12px; }
.ps-theme .related-tasks h2 { font-size: 1.25rem; margin: 0 0 10px; }
.ps-theme .related-tasks h2::before { display: none; }
.ps-theme .related-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.ps-theme .related-links a { display: flex; justify-content: space-between; gap: 8px; padding: 11px 13px; min-height: 44px; border: 2px solid var(--ps-line); border-radius: 8px; background: var(--ps-sheet); text-decoration: none; color: var(--ps-ink); font-weight: 700; font-size: 15px; }
.ps-theme .related-links a:hover { border-color: var(--ps-blue); color: var(--ps-blue); }

/* ---------- buttons ---------- */
.ps-theme .button, .ps-theme .ps-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 8px; font: 700 15px/1.2 var(--pixel); text-decoration: none; cursor: pointer; letter-spacing: .02em;
  background: var(--ps-navy); color: #fff; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--ps-navy); }
.ps-theme .button:hover, .ps-theme .ps-btn:hover { background: var(--ps-blue-hi); color: #fff; }
.ps-theme .button:not(.secondary) { background: linear-gradient(180deg, #ffe066, var(--ps-gold) 45%, var(--ps-gold-lo)); color: #2b1d00; }
.ps-theme .ps-btn.ps-btn-play:hover, .ps-theme .button:not(.secondary):hover { background: linear-gradient(180deg, #fff09a, #ffe066 45%, var(--ps-gold)); color: #2b1d00; }
.ps-theme .actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 18px 0; }

/* ---------- play recommendations (shared module, colour only) ---------- */
.ps-theme .play-rec-card { border-radius: 12px !important; border: 2px solid var(--ps-line) !important; }

/* ---------- first-screen answer module and game screenshots (08 formats) ---------- */
.ps-theme .answer-module { background: var(--ps-card); border: 2px solid var(--ps-line); border-radius: 12px; padding: 14px 20px 6px; margin: 0 0 22px; max-width: 980px; }
.ps-theme .answer-module .table-wrap { margin: 4px 0 12px; }
.ps-theme ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 4px 0 10px; }
.ps-theme ol.steps > li { counter-increment: step; position: relative; padding: 8px 0 8px 44px; border-bottom: 1px dashed var(--ps-line); }
.ps-theme ol.steps > li:last-child { border-bottom: 0; }
.ps-theme ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 7px; width: 30px; height: 30px; display: grid; place-items: center; font: 700 15px var(--pixel); color: #fff; background: var(--ps-blue); border: 2px solid #fff; border-radius: 8px; box-shadow: 0 0 0 2px var(--ps-navy); }
.ps-theme figure.game-shot { margin: 18px 0 22px; }
.ps-theme figure.game-shot img { border-radius: 10px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--ps-navy); max-width: 100%; height: auto; max-height: min(70vh, 640px); object-fit: contain; image-rendering: auto; }
@media (max-width: 600px) { .ps-theme .answer-module { padding: 10px 14px 4px; } .ps-theme ol.steps > li { padding-left: 40px; } }

/* ---------- section footer (register_page.py, 02 §5.2) ---------- */
.ps-theme .site-footer { margin-top: 48px; background: var(--ps-night); color: var(--ps-mist); font-size: 14px; position: relative; }
.ps-theme .site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--ps-grass) 0 12px, var(--ps-grass-lo) 12px 18px, var(--ps-grass) 18px 30px, #4f9440 30px 36px); }
.ps-theme .site-footer .footer-grid { display: grid; grid-template-columns: 1.5fr repeat(5, minmax(0, 1fr)); gap: 26px; padding: 42px 0 28px; }
.ps-theme .footer-brand strong { font: 700 22px var(--pixel); color: var(--ps-gold); text-shadow: 2px 2px 0 #00000080; }
.ps-theme .footer-brand a { text-decoration: none; }
.ps-theme .footer-brand p { margin: 8px 0; font-size: 13px; line-height: 1.6; }
.ps-theme .footer-col h2 { font: 700 13px/1.4 var(--pixel); letter-spacing: .1em; text-transform: uppercase; color: var(--ps-gold); margin: 4px 0 10px; }
.ps-theme .footer-col a { display: block; color: #e6edff; text-decoration: none; padding: 5px 0; font-size: 14px; line-height: 1.4; }
.ps-theme .footer-col a:hover { color: var(--ps-gold); text-decoration: underline; }
.ps-theme .footer-version { font-size: 12px; color: var(--ps-mist); margin: 8px 0 0; }
.ps-theme .footer-info { border-top: 1px solid #ffffff1f; }
.ps-theme .footer-info .wrap { display: flex; flex-wrap: wrap; gap: 4px 22px; padding: 12px 0 18px; }
.ps-theme .footer-info a { color: var(--ps-mist); font-size: 13px; text-decoration: none; padding: 8px 0; }
.ps-theme .footer-info a:hover { color: var(--ps-gold); }
.ps-theme .footer-info a[href="/#more-games"] { margin-left: auto; color: var(--ps-gold); }

/* ---------- responsive (designed at 390 first) ---------- */
@media (max-width: 1100px) {
  .ps-theme .site-footer .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ps-theme .footer-brand { grid-column: 1 / -1; }
  .ps-theme .desktop-nav a { padding-inline: 8px; font-size: 13.5px; }
}
@media (max-width: 900px) {
  .ps-theme .desktop-nav { display: none; }
  .ps-theme .mobile-nav { display: block; }
  .ps-theme .mobile-nav[open] .mobile-links { position: absolute; left: 0; right: 0; top: calc(100% + 6px); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 14px 18px 18px; background: var(--ps-night); box-shadow: 0 12px 24px #0008; z-index: 30; }
  .ps-theme .mobile-links a { border: 1px solid #ffffff26; justify-content: flex-start; white-space: normal; }
  .ps-theme .mobile-links a[href$="/poke-survivor/play/"] { grid-column: 1 / -1; justify-content: center; margin: 0 0 4px; }
}
@media (max-width: 600px) {
  body.ps-theme { font-size: 16px; }
  .ps-theme .wrap { width: calc(100% - 32px); }
  .ps-theme .top .wrap { min-height: 64px; gap: 10px; }
  .ps-theme .brand { font-size: 20px; }
  .ps-theme .brand img { width: 34px; height: 34px; }
  .ps-theme .brand small { font-size: 9px; letter-spacing: .08em; }
  .guide-layout.ps-theme .article-head { padding-top: 8px; margin-bottom: 10px; }
  .guide-layout.ps-theme .article-head h1 { font-size: 1.72rem; margin: 4px 0 8px; }
  .ps-theme .article-head .answer { font-size: 15.5px; line-height: 1.55; padding: 10px 14px; margin: 8px 0; }
  .ps-theme .prose h2 { font-size: 1.4rem; }
  .ps-theme th, .ps-theme td { padding: 10px; }
  .ps-theme .table-wrap table { min-width: 540px; }
  .ps-theme .mobile-nav[open] .mobile-links { padding-inline: 16px; }
  .ps-theme .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 18px 16px; padding-top: 32px; }
  .ps-theme .footer-col a { padding: 9px 0; }
  .ps-theme .footer-info a[href="/#more-games"] { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .ps-theme * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- database icons, code pills and local move filter ---------- */
.ps-theme .ps-item-cell { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.ps-theme .ps-inline-icon { width: 24px; height: 24px; flex: 0 0 24px; display: inline-block; object-fit: contain; }
.ps-theme code.ps-code { display: inline-block; font: 700 15px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--ps-navy); color: var(--ps-gold); padding: 3px 9px; border-radius: 6px; letter-spacing: .04em; }
.ps-theme .ps-filter-bar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; background: var(--ps-card); border: 2px solid var(--ps-line); border-radius: 12px; padding: 12px 14px; margin: 14px 0 12px; }
.ps-theme .ps-filter-bar input[type="search"], .ps-theme .ps-filter-bar select { min-height: 44px; padding: 6px 10px; border: 2px solid var(--ps-line); border-radius: 8px; font: 15px var(--body); color: var(--ps-ink); background: #fff; }
.ps-theme .ps-filter-bar input[type="search"] { flex: 1 1 200px; min-width: 0; }
.ps-theme .ps-filter-bar label.ps-check { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; cursor: pointer; }
.ps-theme .ps-filter-count { font-size: 14px; color: var(--ps-dim); margin: 0 0 8px; font-weight: 600; }
.ps-theme #ps-moves-table td:nth-child(2), .ps-theme #ps-moves-table td:nth-child(3) { white-space: nowrap; }
.ps-theme .answer-module h2 { font-size: 1.35rem; margin: 4px 0 10px; }
.ps-theme .ps-cards-head { font-size: 1.25rem; margin: 18px 0 10px; }

