/* Tildrix Map - game themes (GtaMap\Themes, docs/gtamap/README.md "Motywy gier", since 26.11.2026). Loaded only on pages of a
   game with a theme; active when <html> has data-theme (the switch at the bottom of the page, app.js). Each theme sets the
   site's tokens (--gm-*) and its own (--th-*), the shared part below puts them on the page, the map's popup and the buttons;
   then a few touches of its own. Our own CSS only - no logos, fonts or art of the games. */

/* --- shared ------------------------------------------------------------------------------------------------------------ */
html[data-theme] body { background: var(--th-body-bg, var(--gm-bg)); font-family: var(--th-body-font, 'Atkinson Hyperlegible', system-ui, sans-serif); }
html[data-theme] h1, html[data-theme] h2, html[data-theme] h3, html[data-theme] .gm-main .gta-popup-name {
    font-family: var(--th-head-font, 'Space Grotesk', system-ui, sans-serif); text-transform: var(--th-head-transform, none);
    letter-spacing: var(--th-head-spacing, -.01em); font-weight: var(--th-head-weight, 700); font-style: var(--th-head-style, normal); }
html[data-theme] h1 { color: var(--th-h1-color, var(--gm-text)); }
html[data-theme] a { color: var(--th-link, var(--gm-orange)); }
html[data-theme] a:hover { color: var(--gm-text); }
/* The header stays opaque: it is sticky, and on a phone the big heading scrolled under it showed through at 88%. */
html[data-theme] .gm-header { background: var(--th-header-bg, color-mix(in srgb, var(--gm-bg) 97%, transparent)); border-bottom: var(--th-header-border, 1px solid var(--gm-border)); }
html[data-theme] .gm-nav > a, html[data-theme] .gm-lang a, html[data-theme] .gm-game h2 a, html[data-theme] .gm-kind-links a, html[data-theme] .gta-kind > a:not(.gta-kind-link) { color: var(--gm-text); }
html[data-theme] .gm-lead, html[data-theme] .gm-faq p, html[data-theme] .gm-list li p, html[data-theme] .gm-prose p, html[data-theme] .gm-prose li,
html[data-theme] .gm-consent p, html[data-theme] .gm-footer-links a, html[data-theme] .gm-footer-links .gm-linkbutton { color: var(--th-soft, var(--gm-muted)); }
html[data-theme] .gm-eyebrow, html[data-theme] .gm-note { color: var(--gm-orange); }
/* Colours site.css writes out (Tildrix pink): "Share progress", "Open the map" in a category's list, the game search, the nudge. */
html[data-theme] .gm-linkbutton { color: var(--th-link, var(--gm-orange)); }
html[data-theme] .gm-kind-links a:hover .gm-kind-name { color: var(--gm-pink); }
html[data-theme] .gm-game-search-box:focus-within { border-color: color-mix(in srgb, var(--gm-pink) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gm-pink) 15%, transparent); }
html[data-theme] .gm-nudge-count { background: color-mix(in srgb, var(--gm-pink) 16%, transparent); }
html[data-theme] .gm-button, html[data-theme] .gm-chip, html[data-theme] .gm-search input, html[data-theme] .gm-game-search-box, html[data-theme] .gm-lang summary { border-radius: var(--th-btn-radius, 10px); }
html[data-theme] .gm-panel, html[data-theme] .gm-game, html[data-theme] .gm-kind-links > div, html[data-theme] .gm-faq details, html[data-theme] .gta-map,
html[data-theme] .gm-consent, html[data-theme] .gm-nudge-sheet { border-radius: var(--th-radius, var(--gm-radius)); }
html[data-theme] .gm-primary, html[data-theme] .gm-signin-count { background: var(--th-primary, var(--gm-pink)); color: var(--th-accent-ink, #12100c); border-color: transparent; }
html[data-theme] .gm-primary:hover { color: var(--th-accent-ink, #12100c); }
html[data-theme] .gm-button, html[data-theme] .gm-primary, html[data-theme] .gm-chip { font-family: var(--th-btn-font, inherit); text-transform: var(--th-btn-transform, none); letter-spacing: var(--th-btn-spacing, 0); }
html[data-theme] .gm-signin, html[data-theme] .gm-nearest, html[data-theme] .gm-route, html[data-theme] .gm-quiz, html[data-theme] .gm-quiz, html[data-theme] .gm-drawer-open { border-color: var(--gm-pink); border-radius: var(--th-pill-radius, 999px); }
html[data-theme] .gm-nearest, html[data-theme] .gm-route, html[data-theme] .gm-quiz, html[data-theme] .gm-drawer-open { background: color-mix(in srgb, var(--gm-surface) 94%, transparent); }
html[data-theme] .gm-game:hover { border-color: color-mix(in srgb, var(--gm-pink) 55%, transparent); }
html[data-theme] .gm-main .gta-map { background: var(--th-map-bg, var(--gm-bg)); }
html[data-theme] .gm-footer a.gm-shop { border-color: color-mix(in srgb, var(--gm-pink) 55%, transparent); background: color-mix(in srgb, var(--gm-pink) 12%, transparent); border-radius: var(--th-pill-radius, 999px); }
html[data-theme] .gm-shop-icon, html[data-theme] .gm-shop-arrow, html[data-theme] .gm-langhint a, html[data-theme] .gm-nudge-bar a { color: var(--gm-pink); }
/* The map's own controls (Leaflet draws them white with its link colour - the theme's link colour made "+" and "−"
   vanish in light themes): zoom, full screen and the corner credit in the theme's colours. */
html[data-theme] .gm-main .leaflet-bar { border: 1px solid var(--gm-border); border-radius: var(--th-btn-radius, 8px); box-shadow: 0 4px 14px rgba(0, 0, 0, .45); overflow: hidden; }
html[data-theme] .gm-main .leaflet-bar a { background: var(--gm-surface); color: var(--gm-text); border-bottom-color: var(--gm-border); font-family: inherit; }
html[data-theme] .gm-main .leaflet-bar a:hover { background: var(--gm-surface-2); color: var(--gm-pink); }
html[data-theme] .gm-main .leaflet-bar a.leaflet-disabled { background: var(--gm-surface); color: var(--gm-muted); opacity: .5; }
html[data-theme] .gm-fullscreen:not([hidden]) { background: var(--gm-surface); color: var(--gm-text); border: 1px solid var(--gm-border); border-radius: var(--th-btn-radius, 8px); }
html[data-theme] .gm-fullscreen:hover { background: var(--gm-surface-2); color: var(--gm-pink); }
html[data-theme] .gm-main .leaflet-control-attribution { background: color-mix(in srgb, var(--gm-bg) 78%, transparent); color: var(--gm-muted); }
html[data-theme] .gm-main .leaflet-control-attribution a { color: var(--gm-text); }

/* The place's popup. */
html[data-theme] .gm-main .leaflet-popup-content-wrapper { position: relative; overflow: hidden; background: var(--th-popup-bg, var(--gm-surface-2)); color: var(--th-popup-ink, var(--gm-text));
    border: var(--th-popup-border, 1px solid var(--gm-border)); border-radius: var(--th-popup-radius, var(--gm-radius)); box-shadow: var(--th-popup-shadow, 0 16px 40px rgba(0, 0, 0, .55)); }
html[data-theme] .gm-main .leaflet-popup-tip { background: var(--th-popup-tip, var(--th-popup-bg, var(--gm-surface-2))); border: var(--th-popup-border, 1px solid var(--gm-border)); }
html[data-theme] .gm-main .gta-popup { color: var(--th-popup-ink, var(--gm-text)); }
html[data-theme] .gm-main .gta-popup-type, html[data-theme] .gm-main .gta-popup-credit, html[data-theme] .gm-main .gta-popup-share { color: var(--th-popup-muted, var(--gm-muted)); }
html[data-theme] .gm-main .gta-popup-desc { color: var(--th-popup-soft, var(--th-soft, var(--gm-muted))); }
html[data-theme] .gm-main .leaflet-container a.leaflet-popup-close-button { color: var(--th-popup-muted, var(--gm-muted)); }
html[data-theme] .gm-main .gta-found-button { background: var(--th-found-bg, var(--th-primary, var(--gm-pink))); color: var(--th-found-ink, var(--th-accent-ink, #12100c)); border: var(--th-found-border, 0);
    border-radius: var(--th-btn-radius, 10px); font-family: var(--th-btn-font, inherit); text-transform: var(--th-btn-transform, none); letter-spacing: var(--th-btn-spacing, 0); }
html[data-theme] .gm-main .gta-popup-actions button { border-radius: var(--th-btn-radius, 999px); background: var(--th-action-bg, rgba(255, 255, 255, .06)); color: var(--th-popup-muted, var(--gm-muted)); }
html[data-theme] .gm-main .gta-popup-actions button:hover { background: color-mix(in srgb, var(--gm-pink) 20%, transparent); color: var(--th-popup-ink, var(--gm-text)); }
html[data-theme] .gm-main .gta-popup-actions .gta-report-send { background: var(--gm-pink); color: var(--th-accent-ink, #12100c); }
html[data-theme] .gm-main .gta-popup-link, html[data-theme] .gm-main .gta-report textarea { background: var(--th-field-bg, var(--gm-surface)); color: var(--th-popup-ink, var(--gm-text)); border-color: var(--gm-border); }
html[data-theme] .gm-main .gta-report label { color: var(--th-popup-muted, var(--gm-muted)); }

/* --- Leonida (GTA VI, Vice City, Vice City Stories): the sunset over the Keys, pink to orange, a touch of teal ------------- */
html[data-theme="leonida"] {
    --gm-bg: #12081f; --gm-surface: #1d0f2e; --gm-surface-2: #29143f; --gm-border: #4a2361; --gm-text: #fff4fb; --gm-muted: #d3a6cf;
    --gm-pink: #ff3d9a; --gm-orange: #ffb547; --th-teal: #2de2e6; --th-soft: #f0d3ea; --th-link: #ffb547;
    --th-body-bg: radial-gradient(900px 420px at 88% -8%, rgba(255, 140, 60, .32), transparent 62%), radial-gradient(1000px 500px at 5% -10%, rgba(255, 61, 154, .28), transparent 60%), linear-gradient(180deg, #2a0b40 0, #12081f 520px);
    --th-header-bg: linear-gradient(90deg, rgba(255, 61, 154, .16), rgba(18, 8, 31, .9) 45%, rgba(45, 226, 230, .12)), #12081f; --th-header-border: 0;
    --th-head-style: italic; --th-head-weight: 800; --th-radius: 18px; --th-btn-radius: 12px;
    --th-primary: linear-gradient(90deg, #ff3d9a, #ff7a55 55%, #ffb547); --th-accent-ink: #2a0718;
    --th-popup-bg: linear-gradient(165deg, #34174d, #1d0f2e 70%); --th-popup-border: 1px solid rgba(255, 61, 154, .55); --th-popup-radius: 18px; --th-popup-tip: #1f1032;
    --th-popup-shadow: 0 0 0 1px rgba(45, 226, 230, .12), 0 18px 44px rgba(0, 0, 0, .6), 0 0 34px rgba(255, 61, 154, .28);
    --th-map-bg: #10213a;
}
html[data-theme="leonida"] .gm-header { box-shadow: inset 0 -2px 0 0 transparent; border-image: linear-gradient(90deg, #ff3d9a, #ffb547, #2de2e6) 1; border-bottom: 2px solid; }
html[data-theme="leonida"] h1 { background: linear-gradient(90deg, #ff3d9a, #ff7a55 45%, #ffb547); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .15em; }
html[data-theme="leonida"] .gm-main .leaflet-popup-content-wrapper::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #ff3d9a, #ffb547, #2de2e6); }
html[data-theme="leonida"] .gm-main .gta-found-button.is-found { background: rgba(45, 226, 230, .14); color: #7ff3f5; box-shadow: inset 0 0 0 1px rgba(45, 226, 230, .6); }
html[data-theme="leonida"] .gm-total-bar i { background: linear-gradient(90deg, #ff3d9a, #ffb547, #2de2e6); }
/* Palm fronds over the corner of the page: our own drawing, very faint. */
html[data-theme="leonida"] body::before { content: ''; position: fixed; right: -40px; bottom: -30px; width: 340px; height: 420px; pointer-events: none; z-index: 0; opacity: .14;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 250'%3E%3Cg fill='%23ff3d9a'%3E%3Cpath d='M118 250c-6-60-2-110 8-150l6 2c-9 40-12 88-6 148z'/%3E%3Cpath d='M128 100c-20-30-60-36-92-22 30-2 58 6 88 28z'/%3E%3Cpath d='M128 100c-6-34-34-60-70-62 28 10 50 30 64 64z'/%3E%3Cpath d='M130 98c10-34 40-54 72-50-30 6-52 24-66 54z'/%3E%3Cpath d='M130 100c30-14 62-6 70 18-20-14-44-18-68-12z'/%3E%3Cpath d='M128 102c-30 4-52 26-54 54 12-24 32-40 56-48z'/%3E%3Cpath d='M131 102c22 8 34 30 30 56-6-22-18-38-34-50z'/%3E%3C/g%3E%3C/svg%3E") no-repeat right bottom / contain; }
html[data-theme="leonida"] .gm-main, html[data-theme="leonida"] .gm-footer { position: relative; z-index: 1; }
/* On a phone the fronds stay in the corner instead of filling half the footer (GTA VI opens in this theme, mostly on phones). */
@media (max-width: 600px) { html[data-theme="leonida"] body::before { width: 190px; height: 235px; right: -30px; bottom: -20px; opacity: .11; } }
/* The banner of the game's pages (_hero.html.twig): a sunset over the sea in stripes, palms on both sides - drawn in CSS. */
html[data-theme="leonida"] .gm-hero { min-height: 150px; border: 0; background: linear-gradient(180deg, #2a0b40 0, #6d1a63 34%, #ff3d9a 64%, #ff7a55 82%, #ffb547 100%);
    box-shadow: 0 0 0 1px rgba(255, 61, 154, .45), 0 14px 34px rgba(255, 61, 154, .2); }
html[data-theme="leonida"] .gm-hero-art { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
html[data-theme="leonida"] .gm-hero-art i { position: absolute; display: block; }
html[data-theme="leonida"] .gm-hero-sun { left: 60%; bottom: -8px; width: 136px; height: 136px; margin-left: -68px; border-radius: 50%; background: linear-gradient(180deg, #ffe9a3, #ffb547 45%, #ff3d9a);
    -webkit-mask: linear-gradient(180deg, #000 0 52%, transparent 52% 56%, #000 56% 63%, transparent 63% 68%, #000 68% 74%, transparent 74% 80%, #000 80% 85%, transparent 85%);
    mask: linear-gradient(180deg, #000 0 52%, transparent 52% 56%, #000 56% 63%, transparent 63% 68%, #000 68% 74%, transparent 74% 80%, #000 80% 85%, transparent 85%); }
html[data-theme="leonida"] .gm-hero-sea { left: 0; right: 0; bottom: 0; z-index: 1; height: 24px; background: repeating-linear-gradient(180deg, rgba(255, 181, 71, .25) 0 1px, transparent 1px 6px), linear-gradient(180deg, rgba(29, 15, 46, .92), #12081f); }
html[data-theme="leonida"] .gm-hero-palm { right: -26px; bottom: 6px; z-index: 1; width: 130px; height: 170px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 250'%3E%3Cg fill='%2312081f'%3E%3Cpath d='M118 250c-6-60-2-110 8-150l6 2c-9 40-12 88-6 148z'/%3E%3Cpath d='M128 100c-20-30-60-36-92-22 30-2 58 6 88 28z'/%3E%3Cpath d='M128 100c-6-34-34-60-70-62 28 10 50 30 64 64z'/%3E%3Cpath d='M130 98c10-34 40-54 72-50-30 6-52 24-66 54z'/%3E%3Cpath d='M130 100c30-14 62-6 70 18-20-14-44-18-68-12z'/%3E%3Cpath d='M128 102c-30 4-52 26-54 54 12-24 32-40 56-48z'/%3E%3Cpath d='M131 102c22 8 34 30 30 56-6-22-18-38-34-50z'/%3E%3C/g%3E%3C/svg%3E") no-repeat right bottom / contain; }
html[data-theme="leonida"] .gm-hero-palm.is-left { right: auto; left: -30px; bottom: 4px; width: 90px; height: 118px; transform: scaleX(-1); opacity: .9; }
html[data-theme="leonida"] .gm-page-head .gm-hero .gm-hero-title { color: #fff4fb; font-size: 3.3rem; text-shadow: 0 2px 0 #ff3d9a, 0 4px 0 #c2187a, 0 8px 18px rgba(42, 11, 64, .7); }
html[data-theme="leonida"] .gm-page-head .gm-hero .gm-hero-title.is-long { font-size: 2.2rem; }
html[data-theme="leonida"] .gm-page-head .gm-hero .gm-hero-title.is-longer { font-size: 1.6rem; }
html[data-theme="leonida"] .gm-hero-head .gm-hero-btn.tt-head-link { color: #ffb547; }
html[data-theme="leonida"] .gm-hero-stat:nth-child(1) { border-color: rgba(255, 61, 154, .6); }
html[data-theme="leonida"] .gm-hero-stat:nth-child(2) { border-color: rgba(255, 181, 71, .6); }
html[data-theme="leonida"] .gm-hero-stat:nth-child(3) { border-color: rgba(45, 226, 230, .6); }
@media (min-width: 900px) { html[data-theme="leonida"] .gm-hero { min-height: 180px; } html[data-theme="leonida"] .gm-hero-sun { width: 190px; height: 190px; margin-left: -95px; } html[data-theme="leonida"] .gm-page-head .gm-hero .gm-hero-title { font-size: 4rem; } html[data-theme="leonida"] .gm-page-head .gm-hero .gm-hero-title.is-longer { font-size: 2.1rem; } }

/* --- Rockstar classic (the other GTA): black and white like the old covers, cash green and a little gold ------------------- */
html[data-theme="rockstar"] {
    --gm-bg: #0b0b0b; --gm-surface: #151515; --gm-surface-2: #1d1d1d; --gm-border: #333; --gm-text: #f4f4f4; --gm-muted: #a9a9a9;
    --gm-pink: #8dc63f; --gm-orange: #f2c84b; --th-soft: #cfcfcf; --th-link: #f2c84b;
    --th-body-bg: radial-gradient(800px 360px at 90% -10%, rgba(141, 198, 63, .14), transparent 60%), #0b0b0b;
    --th-head-transform: uppercase; --th-head-weight: 800; --th-head-spacing: .01em; --th-head-style: italic;
    --th-radius: 6px; --th-btn-radius: 4px; --th-pill-radius: 4px; --th-accent-ink: #0b0b0b; --th-btn-transform: uppercase; --th-btn-spacing: .04em;
    --th-popup-bg: #111; --th-popup-border: 2px solid #f4f4f4; --th-popup-radius: 4px; --th-popup-shadow: 6px 6px 0 rgba(141, 198, 63, .85), 0 18px 40px rgba(0, 0, 0, .6);
}
html[data-theme="rockstar"] h1 { text-shadow: 3px 3px 0 #000, -1px -1px 0 #000; }
html[data-theme="rockstar"] .gm-main .gta-popup-name { font-size: 1.15rem; }
html[data-theme="rockstar"] .gm-main .gta-found-button.is-found { background: #f2c84b; color: #0b0b0b; box-shadow: none; }

/* --- Night City (Cyberpunk 2077): black, the yellow of the UI, cyan and a red glitch -------------------------------------- */
html[data-theme="cyberpunk"] {
    --gm-bg: #07080c; --gm-surface: #0f1117; --gm-surface-2: #151922; --gm-border: #2a2f3a; --gm-text: #e9f6f7; --gm-muted: #8ea4ae;
    --gm-pink: #fcee0a; --gm-orange: #00f0ff; --th-soft: #b9cbd1; --th-link: #00f0ff;
    --th-body-bg: repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px), radial-gradient(900px 400px at 85% -10%, rgba(0, 240, 255, .12), transparent 60%), #07080c;
    --th-head-transform: uppercase; --th-head-spacing: .06em; --th-radius: 0; --th-btn-radius: 0; --th-pill-radius: 0;
    --th-accent-ink: #07080c; --th-btn-transform: uppercase; --th-btn-spacing: .08em; --th-h1-color: #fcee0a;
    --th-popup-bg: #0d1016; --th-popup-border: 1px solid #fcee0a; --th-popup-radius: 0; --th-popup-shadow: 5px 5px 0 #ff003c, 0 18px 40px rgba(0, 0, 0, .7); --th-popup-tip: #fcee0a;
}
html[data-theme="cyberpunk"] h1 { text-shadow: 2px 0 #ff003c, -2px 0 #00f0ff; }
html[data-theme="cyberpunk"] .gm-header { border-bottom: 1px solid #fcee0a; }
html[data-theme="cyberpunk"] .gm-button, html[data-theme="cyberpunk"] .gm-main .gta-found-button, html[data-theme="cyberpunk"] .gm-game {
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); }
html[data-theme="cyberpunk"] .gm-main .leaflet-popup-content-wrapper::before { content: 'NCPD // DATA'; position: absolute; top: 0; right: 30px; padding: 1px 6px; background: #fcee0a; color: #07080c; font: 700 .58rem/1.4 ui-monospace, monospace; letter-spacing: .12em; }
html[data-theme="cyberpunk"] .gm-main .gta-popup-type { font-family: ui-monospace, monospace; text-transform: uppercase; letter-spacing: .06em; color: #00f0ff; }
html[data-theme="cyberpunk"] .gm-main .gta-found-button.is-found { background: #00f0ff; color: #07080c; box-shadow: none; }

/* --- The Witcher 3: dark leather and iron, blood red, the gold of the medallion -------------------------------------------- */
html[data-theme="witcher"] {
    --gm-bg: #0e0d0c; --gm-surface: #171513; --gm-surface-2: #201d1a; --gm-border: #3a332b; --gm-text: #ede5d7; --gm-muted: #a99b86;
    --gm-pink: #b8202f; --gm-orange: #c9a35b; --th-soft: #cfc3ae; --th-link: #d6b46d;
    --th-body-bg: radial-gradient(ellipse 1200px 520px at 50% -12%, #2a2118, transparent 70%), #0e0d0c;
    --th-head-font: 'Literata', Georgia, serif; --th-head-weight: 600; --th-head-spacing: .02em; --th-h1-color: #e8d8b5;
    --th-radius: 4px; --th-btn-radius: 3px; --th-pill-radius: 3px; --th-btn-font: 'Literata', Georgia, serif;
    --th-primary: linear-gradient(180deg, #b8202f, #7d1520); --th-accent-ink: #f6ecd9;
    --th-popup-bg: radial-gradient(ellipse at top, #25201b, #161411 75%); --th-popup-border: 1px solid rgba(201, 163, 91, .55); --th-popup-radius: 3px;
    --th-popup-shadow: inset 0 0 0 4px #161411, inset 0 0 0 5px rgba(201, 163, 91, .28), 0 18px 44px rgba(0, 0, 0, .7); --th-popup-tip: #181512;
    --th-found-border: 1px solid rgba(201, 163, 91, .6);
}
html[data-theme="witcher"] .gm-header { border-bottom: 1px solid rgba(201, 163, 91, .4); }
html[data-theme="witcher"] .gm-main .gta-popup-name { color: #e8d8b5; font-size: 1.12rem; }
html[data-theme="witcher"] .gm-main .gta-popup-type { font-variant: small-caps; letter-spacing: .06em; }
html[data-theme="witcher"] .gm-main .gta-found-button.is-found { background: rgba(201, 163, 91, .14); color: #e3c483; box-shadow: none; }

/* --- Red Dead Redemption 2: leather and dust, the popup on the paper of a wanted poster --------------------------------- */
html[data-theme="western"] {
    --gm-bg: #17110c; --gm-surface: #221a13; --gm-surface-2: #2c2219; --gm-border: #4a3a2a; --gm-text: #f1e6d0; --gm-muted: #b9a585;
    --gm-pink: #b5301f; --gm-orange: #d9b26f; --th-soft: #d8c7a7; --th-link: #e0bb76;
    --th-body-bg: radial-gradient(ellipse 1200px 500px at 50% -10%, rgba(217, 178, 111, .16), transparent 70%), #17110c;
    --th-head-font: 'Literata', Georgia, serif; --th-head-transform: uppercase; --th-head-spacing: .07em; --th-head-weight: 700;
    --th-radius: 3px; --th-btn-radius: 2px; --th-pill-radius: 3px; --th-btn-font: 'Literata', Georgia, serif; --th-btn-transform: uppercase; --th-btn-spacing: .06em;
    --th-primary: #b5301f; --th-accent-ink: #f8eedb;
    --th-popup-bg: linear-gradient(170deg, #f2e6c9, #e4d2aa); --th-popup-ink: #2b1d10; --th-popup-muted: #6b5233; --th-popup-soft: #3d2b18;
    --th-popup-border: 1px solid #8a6a43; --th-popup-radius: 2px; --th-popup-shadow: 0 0 0 4px rgba(43, 29, 16, .08) inset, 0 16px 36px rgba(0, 0, 0, .65); --th-popup-tip: #e6d4ad;
    --th-found-bg: #2b1d10; --th-found-ink: #f2e6c9; --th-action-bg: rgba(43, 29, 16, .09); --th-field-bg: #fbf4e3;
}
html[data-theme="western"] .gm-main .gta-popup-name { font-size: 1.15rem; border-bottom: 1px solid rgba(107, 82, 51, .4); padding-bottom: .25rem; }
html[data-theme="western"] .gm-main .gta-found-button.is-found { background: #4b6b2a; color: #f2e6c9; box-shadow: none; }

/* --- Fallout: the green screen of a Pip-Boy, scanlines and all ------------------------------------------------------- */
html[data-theme="pipboy"] {
    --gm-bg: #021006; --gm-surface: #05170a; --gm-surface-2: #082110; --gm-border: #145a2c; --gm-text: #5dff95; --gm-muted: #2fb862;
    --gm-pink: #5dff95; --gm-orange: #b8ffd0; --th-soft: #46d97c; --th-link: #b8ffd0;
    --th-body-font: ui-monospace, 'Cascadia Mono', Menlo, Consolas, 'Courier New', monospace; --th-head-font: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
    --th-body-bg: radial-gradient(ellipse at center, #062a12 0%, #021006 75%);
    --th-head-transform: uppercase; --th-head-spacing: .06em; --th-radius: 2px; --th-btn-radius: 0; --th-pill-radius: 0; --th-btn-transform: uppercase; --th-btn-spacing: .06em;
    --th-primary: #5dff95; --th-accent-ink: #021006; --th-map-bg: #031a0a;
    --th-popup-bg: #041a0a; --th-popup-border: 1px solid #5dff95; --th-popup-radius: 0; --th-popup-shadow: 0 0 22px rgba(93, 255, 149, .25), 0 16px 36px rgba(0, 0, 0, .7);
    --th-found-bg: transparent; --th-found-ink: #5dff95; --th-found-border: 1px solid #5dff95;
}
html[data-theme="pipboy"] h1, html[data-theme="pipboy"] h2, html[data-theme="pipboy"] .gm-main .gta-popup-name { text-shadow: 0 0 8px rgba(93, 255, 149, .55); }
html[data-theme="pipboy"] body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 4000; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px); }
html[data-theme="pipboy"] .gm-main .gta-found-button:hover { background: #5dff95; color: #021006; filter: none; }
html[data-theme="pipboy"] .gm-main .gta-found-button::before { content: '> '; }
html[data-theme="pipboy"] .gm-main .gta-found-button.is-found { background: #5dff95; color: #021006; box-shadow: none; }
html[data-theme="pipboy"] .gm-main .gta-found-button.is-found::before { content: '[X] '; }
html[data-theme="pipboy"] .gm-brand img { filter: grayscale(1) brightness(.9) sepia(1) hue-rotate(70deg) saturate(4); }

/* --- S.T.A.L.K.E.R.: the Zone - rust, olive grey, the yellow of a radiation sign and hazard stripes ------------------------ */
html[data-theme="zone"] {
    --gm-bg: #11120e; --gm-surface: #1a1b16; --gm-surface-2: #23241d; --gm-border: #3b3c30; --gm-text: #e4e1cf; --gm-muted: #9d9b86;
    --gm-pink: #e0a526; --gm-orange: #c86a2a; --th-soft: #c6c3ad; --th-link: #e0a526;
    --th-body-bg: radial-gradient(ellipse 1000px 460px at 20% -10%, rgba(200, 106, 42, .16), transparent 65%), linear-gradient(180deg, #181a14, #11120e 600px);
    --th-head-transform: uppercase; --th-head-spacing: .1em; --th-radius: 2px; --th-btn-radius: 2px; --th-pill-radius: 2px; --th-btn-transform: uppercase; --th-btn-spacing: .08em;
    --th-primary: #e0a526; --th-accent-ink: #11120e;
    --th-popup-bg: #1d1e18; --th-popup-border: 1px solid #4a4b3c; --th-popup-radius: 2px; --th-popup-shadow: 0 16px 40px rgba(0, 0, 0, .7);
}
html[data-theme="zone"] .gm-main .leaflet-popup-content-wrapper { padding-top: 6px; }
html[data-theme="zone"] .gm-main .leaflet-popup-content-wrapper::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: repeating-linear-gradient(45deg, #e0a526 0 10px, #1d1e18 10px 20px); }
html[data-theme="zone"] .gm-header { border-bottom: 3px solid; border-image: repeating-linear-gradient(45deg, #e0a526 0 12px, #11120e 12px 24px) 3; }
html[data-theme="zone"] .gm-main .gta-found-button.is-found { background: #5c6b2e; color: #e4e1cf; box-shadow: none; }

/* --- Elden Ring: black and the gold of grace, thin lines and wide letters ------------------------------------------------- */
html[data-theme="elden"] {
    --gm-bg: #0b0a08; --gm-surface: #14120e; --gm-surface-2: #1b1813; --gm-border: #3b3223; --gm-text: #ebe1c9; --gm-muted: #a8987a;
    --gm-pink: #d4b26a; --gm-orange: #f2dca0; --th-soft: #cfc3a6; --th-link: #e6cd8c;
    --th-body-bg: radial-gradient(ellipse 900px 520px at 50% -18%, rgba(212, 178, 106, .2), transparent 70%), #0b0a08;
    --th-head-font: 'Literata', Georgia, serif; --th-head-transform: uppercase; --th-head-spacing: .16em; --th-head-weight: 500; --th-h1-color: #e6cd8c;
    --th-radius: 2px; --th-btn-radius: 2px; --th-pill-radius: 2px; --th-btn-font: 'Literata', Georgia, serif; --th-btn-transform: uppercase; --th-btn-spacing: .14em;
    --th-primary: transparent; --th-accent-ink: #f2dca0;
    --th-popup-bg: radial-gradient(ellipse at top, #241f16, #110f0b 75%); --th-popup-border: 1px solid rgba(212, 178, 106, .5); --th-popup-radius: 2px;
    --th-popup-shadow: 0 0 28px rgba(212, 178, 106, .16), 0 18px 44px rgba(0, 0, 0, .75); --th-popup-tip: #15130e;
    --th-found-bg: rgba(212, 178, 106, .08); --th-found-ink: #f2dca0; --th-found-border: 1px solid rgba(212, 178, 106, .7);
}
html[data-theme="elden"] h1 { text-shadow: 0 0 18px rgba(212, 178, 106, .35); font-size: clamp(1.4rem, 3.4vw, 2.2rem); }
html[data-theme="elden"] .gm-primary { border: 1px solid rgba(212, 178, 106, .7); }
html[data-theme="elden"] .gm-main .gta-popup-name { text-align: center; font-size: .98rem; padding: 0 1.2rem; margin-right: 0; }
html[data-theme="elden"] .gm-main .gta-popup-type { text-align: center; padding: 0 1.2rem; }
html[data-theme="elden"] .gm-main .gta-found-button:hover { background: rgba(212, 178, 106, .18); filter: none; }
html[data-theme="elden"] .gm-main .gta-found-button.is-found { background: rgba(212, 178, 106, .22); color: #fff2c8; box-shadow: none; }

/* --- Dredge: fog over dark water and the warm light of the lantern ------------------------------------------------------ */
html[data-theme="dredge"] {
    --gm-bg: #0a1416; --gm-surface: #0f1f1f; --gm-surface-2: #142927; --gm-border: #24433f; --gm-text: #dbe8e1; --gm-muted: #8aa79c;
    --gm-pink: #e0b061; --gm-orange: #7fc0a8; --th-soft: #b9cec4; --th-link: #e0b061;
    --th-body-bg: radial-gradient(ellipse 1100px 420px at 30% -5%, rgba(127, 192, 168, .14), transparent 70%), radial-gradient(ellipse 700px 300px at 85% 0, rgba(224, 176, 97, .1), transparent 70%), #0a1416;
    --th-head-font: 'Literata', Georgia, serif; --th-head-style: italic; --th-head-weight: 600;
    --th-radius: 12px; --th-btn-radius: 10px; --th-primary: #e0b061; --th-accent-ink: #1a1307;
    --th-popup-bg: linear-gradient(180deg, #17302d, #0f1f1f); --th-popup-border: 1px solid #2f5a52; --th-popup-radius: 12px;
    --th-popup-shadow: 0 0 40px rgba(224, 176, 97, .1), 0 18px 44px rgba(0, 0, 0, .65); --th-popup-tip: #10211f;
}
html[data-theme="dredge"] .gm-main .gta-found-button { box-shadow: 0 0 18px rgba(224, 176, 97, .35); }
html[data-theme="dredge"] .gm-main .gta-found-button.is-found { background: rgba(127, 192, 168, .16); color: #9fe0c8; box-shadow: inset 0 0 0 1px rgba(127, 192, 168, .5); }

/* --- Far Cry: the wild - sun-burnt orange, warning yellow, a bold sprayed stroke ----------------------------------------- */
html[data-theme="farcry"] {
    --gm-bg: #120c0a; --gm-surface: #1c1310; --gm-surface-2: #261a15; --gm-border: #45302a; --gm-text: #fbeee6; --gm-muted: #c4a493;
    --gm-pink: #ff5a1f; --gm-orange: #ffd23f; --th-soft: #e6cfc2; --th-link: #ffd23f;
    --th-body-bg: radial-gradient(900px 420px at 90% -10%, rgba(255, 90, 31, .22), transparent 62%), #120c0a;
    --th-head-transform: uppercase; --th-head-weight: 800; --th-head-spacing: .02em; --th-radius: 6px; --th-btn-radius: 4px; --th-btn-transform: uppercase; --th-btn-spacing: .04em;
    --th-primary: #ff5a1f; --th-accent-ink: #1a0b05;
    --th-popup-bg: #1c1310; --th-popup-border: 1px solid #45302a; --th-popup-radius: 6px; --th-popup-shadow: 0 18px 40px rgba(0, 0, 0, .65);
}
html[data-theme="farcry"] h1 { text-shadow: 3px 3px 0 rgba(255, 90, 31, .55); }
html[data-theme="farcry"] .gm-main .leaflet-popup-content-wrapper { border-left: 5px solid #ff5a1f; }
html[data-theme="farcry"] .gm-main .gta-found-button { transform: rotate(-.6deg); }
html[data-theme="farcry"] .gm-main .gta-found-button.is-found { background: #ffd23f; color: #1a0b05; box-shadow: none; }

/* --- Assassin's Creed: the Animus - white light panels, thin type, the red of the Brotherhood ----------------------------- */
html[data-theme="animus"] {
    --gm-bg: #0c0f13; --gm-surface: #141920; --gm-surface-2: #1b2129; --gm-border: #2e3741; --gm-text: #eef2f6; --gm-muted: #9aa6b2;
    --gm-pink: #c8102e; --gm-orange: #e9eef3; --th-soft: #c6ced6; --th-link: #f1f4f7;
    --th-body-bg: linear-gradient(180deg, rgba(233, 238, 243, .06), transparent 340px), repeating-linear-gradient(90deg, rgba(233, 238, 243, .025) 0 1px, transparent 1px 48px), #0c0f13;
    --th-head-transform: uppercase; --th-head-spacing: .2em; --th-head-weight: 500; --th-radius: 2px; --th-btn-radius: 2px; --th-pill-radius: 2px;
    --th-btn-transform: uppercase; --th-btn-spacing: .14em; --th-primary: #c8102e; --th-accent-ink: #fff;
    --th-popup-bg: rgba(242, 245, 248, .97); --th-popup-ink: #14181d; --th-popup-muted: #5d6874; --th-popup-soft: #2a3038;
    --th-popup-border: 0; --th-popup-radius: 2px; --th-popup-shadow: 0 18px 44px rgba(0, 0, 0, .55); --th-popup-tip: #f2f5f8;
    --th-action-bg: rgba(20, 24, 29, .06); --th-field-bg: #fff;
}
html[data-theme="animus"] h1 { font-size: clamp(1.3rem, 3.2vw, 2rem); }
html[data-theme="animus"] .gm-main .leaflet-popup-content-wrapper { border-left: 3px solid #c8102e; }
html[data-theme="animus"] .gm-main .gta-popup-name { font-size: .95rem; }
html[data-theme="animus"] .gm-main .gta-found-button.is-found { background: #14181d; color: #f2f5f8; box-shadow: none; }

/* --- Need for Speed: a street race at night - wet asphalt, neon magenta and cyan, slanted italic type ------------------- */
html[data-theme="street"] {
    --gm-bg: #07070d; --gm-surface: #10101b; --gm-surface-2: #171728; --gm-border: #2e2e4a; --gm-text: #f4f4ff; --gm-muted: #a6a6c8;
    --gm-pink: #ff2e88; --gm-orange: #2fd6ff; --th-soft: #cfcfe8; --th-link: #2fd6ff;
    --th-body-bg: radial-gradient(900px 380px at 92% -8%, rgba(47, 214, 255, .16), transparent 62%), radial-gradient(800px 420px at 0 105%, rgba(255, 46, 136, .16), transparent 62%), repeating-linear-gradient(100deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 46px), #07070d;
    --th-head-transform: uppercase; --th-head-style: italic; --th-head-weight: 800; --th-head-spacing: .01em;
    --th-radius: 4px; --th-btn-radius: 2px; --th-pill-radius: 4px; --th-btn-transform: uppercase; --th-btn-spacing: .06em;
    --th-primary: linear-gradient(100deg, #ff2e88, #b23cff 60%, #2fd6ff); --th-accent-ink: #fff;
    --th-popup-bg: linear-gradient(160deg, #1b1a30, #0f0f1a 70%); --th-popup-border: 1px solid #3a3a5e; --th-popup-radius: 4px;
    --th-popup-shadow: -4px 0 0 #ff2e88, 0 0 30px rgba(255, 46, 136, .25), 0 18px 44px rgba(0, 0, 0, .7); --th-popup-tip: #13131f;
}
html[data-theme="street"] h1 { text-shadow: 0 0 18px rgba(255, 46, 136, .55), 3px 2px 0 rgba(47, 214, 255, .55); }
html[data-theme="street"] .gm-header { border-bottom: 2px solid; border-image: linear-gradient(90deg, #ff2e88, #b23cff, #2fd6ff) 1; }
html[data-theme="street"] .gm-button, html[data-theme="street"] .gm-main .gta-found-button { clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%); }
html[data-theme="street"] .gm-main .gta-found-button { font-style: italic; font-weight: 800; }
html[data-theme="street"] .gm-main .gta-found-button.is-found { background: #2fd6ff; color: #07070d; box-shadow: none; }
html[data-theme="street"] .gm-total-bar i { background: linear-gradient(90deg, #ff2e88, #2fd6ff); }

/* --- Enshrouded: the crimson fog of the Shroud and the gold of the flame that holds it back ----------------------------- */
html[data-theme="shroud"] {
    --gm-bg: #0b0d0f; --gm-surface: #13171a; --gm-surface-2: #1a2023; --gm-border: #313b3e; --gm-text: #ebeee8; --gm-muted: #9eaba5;
    --gm-pink: #f0b24a; --gm-orange: #e0728e; --th-soft: #c9d0ca; --th-link: #f3c46f;
    --th-body-bg: radial-gradient(ellipse 1100px 420px at 50% 110%, rgba(150, 36, 82, .3), transparent 70%), radial-gradient(ellipse 800px 360px at 80% -10%, rgba(240, 178, 74, .14), transparent 70%), #0b0d0f;
    --th-head-font: 'Literata', Georgia, serif; --th-head-weight: 600; --th-h1-color: #f5dfae;
    --th-radius: 8px; --th-btn-radius: 6px; --th-pill-radius: 8px; --th-primary: linear-gradient(180deg, #f5c463, #d8952f); --th-accent-ink: #1d1406;
    --th-popup-bg: linear-gradient(180deg, #1c2326, #121618); --th-popup-border: 1px solid #3c494c; --th-popup-radius: 8px; --th-popup-tip: #131719;
    --th-popup-shadow: inset 0 -26px 34px -22px rgba(170, 40, 90, .55), 0 0 30px rgba(240, 178, 74, .12), 0 18px 44px rgba(0, 0, 0, .7);
}
html[data-theme="shroud"] h1 { text-shadow: 0 0 22px rgba(240, 178, 74, .3); }
html[data-theme="shroud"] .gm-main .gta-found-button { box-shadow: 0 0 16px rgba(240, 178, 74, .3); }
html[data-theme="shroud"] .gm-main .gta-found-button.is-found { background: rgba(224, 114, 142, .16); color: #f2a3b7; box-shadow: inset 0 0 0 1px rgba(224, 114, 142, .55); }

/* --- Horizon: wild country under a machine sky - Aloy's orange and the cyan hologram of the Focus ------------------------ */
html[data-theme="focus"] {
    --gm-bg: #0a1114; --gm-surface: #101a1e; --gm-surface-2: #152328; --gm-border: #27454e; --gm-text: #e8f5f6; --gm-muted: #93b4b9;
    --gm-pink: #ff8a3d; --gm-orange: #46e3f2; --th-soft: #c2d8db; --th-link: #46e3f2;
    --th-body-bg: radial-gradient(ellipse 1000px 420px at 15% -10%, rgba(255, 138, 61, .16), transparent 68%), radial-gradient(ellipse 800px 380px at 95% 0, rgba(70, 227, 242, .1), transparent 70%), #0a1114;
    --th-head-transform: uppercase; --th-head-spacing: .08em; --th-head-weight: 600;
    --th-radius: 4px; --th-btn-radius: 3px; --th-pill-radius: 4px; --th-btn-transform: uppercase; --th-btn-spacing: .08em;
    --th-primary: #ff8a3d; --th-accent-ink: #1b0d03;
    --th-popup-bg: linear-gradient(180deg, rgba(21, 44, 52, .97), rgba(12, 24, 29, .97)), repeating-linear-gradient(0deg, rgba(70, 227, 242, .05) 0 1px, transparent 1px 4px);
    --th-popup-border: 1px solid rgba(70, 227, 242, .55); --th-popup-radius: 4px; --th-popup-tip: #0f1d22;
    --th-popup-shadow: 0 0 24px rgba(70, 227, 242, .2), 0 18px 44px rgba(0, 0, 0, .7);
}
/* The Focus's corner marks: two small triangles of our own. */
html[data-theme="focus"] .gm-main .leaflet-popup-content-wrapper::before, html[data-theme="focus"] .gm-main .leaflet-popup-content-wrapper::after {
    content: ''; position: absolute; width: 10px; height: 10px; background: #46e3f2; pointer-events: none; }
html[data-theme="focus"] .gm-main .leaflet-popup-content-wrapper::before { top: 0; left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
html[data-theme="focus"] .gm-main .leaflet-popup-content-wrapper::after { bottom: 0; right: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
html[data-theme="focus"] .gm-main .gta-popup-type { color: #46e3f2; text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; }
html[data-theme="focus"] .gm-main .gta-found-button.is-found { background: rgba(70, 227, 242, .14); color: #8ff0f8; box-shadow: inset 0 0 0 1px rgba(70, 227, 242, .6); }

/* --- Hogwarts Legacy: a night sky over the castle, midnight blue, candle gold, the popup on parchment --------------------- */
html[data-theme="wizard"] {
    --gm-bg: #0c0f1c; --gm-surface: #141a2d; --gm-surface-2: #1b2238; --gm-border: #343e5e; --gm-text: #f1ead8; --gm-muted: #b0aa96;
    --gm-pink: #d9ad4a; --gm-orange: #a9bcff; --th-soft: #d6cfbb; --th-link: #e6c56f;
    --th-body-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='20' cy='30' r='1' opacity='.5'/%3E%3Ccircle cx='140' cy='70' r='.8' opacity='.4'/%3E%3Ccircle cx='220' cy='20' r='1.2' opacity='.45'/%3E%3Ccircle cx='90' cy='150' r='.7' opacity='.35'/%3E%3Ccircle cx='200' cy='190' r='1' opacity='.4'/%3E%3Ccircle cx='40' cy='230' r='.8' opacity='.35'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(ellipse 1100px 460px at 50% -12%, rgba(169, 188, 255, .16), transparent 70%), #0c0f1c;
    --th-head-font: 'Literata', Georgia, serif; --th-head-weight: 600; --th-head-spacing: .01em; --th-h1-color: #f0d68e;
    --th-radius: 6px; --th-btn-radius: 4px; --th-pill-radius: 6px; --th-btn-font: 'Literata', Georgia, serif;
    --th-primary: linear-gradient(180deg, #e3bb5c, #b98a2c); --th-accent-ink: #1e1607;
    --th-popup-bg: linear-gradient(175deg, #f4e9cd, #e5d4aa); --th-popup-ink: #2b2115; --th-popup-muted: #6b5634; --th-popup-soft: #3d2f1c;
    --th-popup-border: 1px solid #9c7b3d; --th-popup-radius: 4px; --th-popup-tip: #e7d7ae;
    --th-popup-shadow: inset 0 0 0 3px #f2e6c8, inset 0 0 0 4px rgba(156, 123, 61, .55), 0 0 30px rgba(217, 173, 74, .18), 0 16px 40px rgba(0, 0, 0, .65);
    --th-found-bg: #6b1d26; --th-found-ink: #f6ecd2; --th-action-bg: rgba(43, 33, 21, .08); --th-field-bg: #fbf5e4;
}
html[data-theme="wizard"] h1 { text-shadow: 0 0 20px rgba(217, 173, 74, .3); }
html[data-theme="wizard"] .gm-main .gta-popup-name { font-size: 1.12rem; }
html[data-theme="wizard"] .gm-main .gta-found-button.is-found { background: #24365e; color: #f1ead8; box-shadow: none; }

/* --- Clair Obscur: Expedition 33 - the Belle Époque in black and cream, a red accent and thin art nouveau lines ---------- */
html[data-theme="expedition"] {
    --gm-bg: #0e0d0c; --gm-surface: #171614; --gm-surface-2: #201e1b; --gm-border: #3e3a34; --gm-text: #f3eee5; --gm-muted: #aba49a;
    --gm-pink: #d2463b; --gm-orange: #e8d3a2; --th-soft: #d3ccc0; --th-link: #ead6a6;
    --th-body-bg: repeating-linear-gradient(-28deg, rgba(243, 238, 229, .018) 0 22px, transparent 22px 70px, rgba(243, 238, 229, .012) 70px 84px, transparent 84px 150px), radial-gradient(ellipse 900px 420px at 50% -12%, rgba(232, 211, 162, .12), transparent 70%), #0e0d0c;
    --th-head-font: 'Literata', Georgia, serif; --th-head-style: italic; --th-head-weight: 500; --th-head-spacing: 0; --th-h1-color: #f6ecd6;
    --th-radius: 2px; --th-btn-radius: 2px; --th-pill-radius: 2px; --th-btn-font: 'Literata', Georgia, serif;
    --th-primary: #d2463b; --th-accent-ink: #fff8ef;
    --th-popup-bg: #141311; --th-popup-border: 1px solid rgba(232, 211, 162, .6); --th-popup-radius: 2px; --th-popup-tip: #141311;
    --th-popup-shadow: inset 0 0 0 4px #141311, inset 0 0 0 5px rgba(232, 211, 162, .25), 0 18px 44px rgba(0, 0, 0, .75);
}
html[data-theme="expedition"] .gm-main .leaflet-popup-content-wrapper::before { content: ''; position: absolute; top: 0; left: 50%; width: 120px; height: 12px; transform: translateX(-50%); pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cg fill='none' stroke='%23e8d3a2' stroke-width='1'%3E%3Cpath d='M0 1h46M74 1h46M46 1c6 0 8 9 14 9s8-9 14-9'/%3E%3C/g%3E%3Ccircle cx='60' cy='6' r='1.6' fill='%23d2463b'/%3E%3C/svg%3E") no-repeat center / contain; }
html[data-theme="expedition"] .gm-main .gta-popup-name { font-size: 1.12rem; }
html[data-theme="expedition"] .gm-main .gta-found-button.is-found { background: rgba(232, 211, 162, .14); color: #f2e2bb; box-shadow: inset 0 0 0 1px rgba(232, 211, 162, .5); }

/* --- Kingdom Come: Deliverance - a manuscript: iron black, vellum, the red ink of a rubric and its initial --------------- */
html[data-theme="codex"] {
    --gm-bg: #121010; --gm-surface: #1b1817; --gm-surface-2: #24201e; --gm-border: #443a34; --gm-text: #f0e7d7; --gm-muted: #ae9f8b;
    --gm-pink: #b8302a; --gm-orange: #e0b866; --th-soft: #d4c8b5; --th-link: #e0b866;
    --th-body-bg: radial-gradient(ellipse 1100px 460px at 50% -12%, rgba(224, 184, 102, .1), transparent 70%), #121010;
    --th-head-font: 'Literata', Georgia, serif; --th-head-weight: 700; --th-head-spacing: .01em; --th-h1-color: #ecdcb8;
    --th-radius: 3px; --th-btn-radius: 2px; --th-pill-radius: 3px; --th-btn-font: 'Literata', Georgia, serif;
    --th-primary: #a8231c; --th-accent-ink: #f8eedb;
    --th-popup-bg: linear-gradient(172deg, #efe3c6, #e1d0a9); --th-popup-ink: #2a1d12; --th-popup-muted: #6e5838; --th-popup-soft: #3e2c1a;
    --th-popup-border: 1px solid #7d5a36; --th-popup-radius: 2px; --th-popup-tip: #e3d2ab;
    --th-popup-shadow: inset 0 3px 0 #a8231c, inset 0 6px 0 #efe3c6, inset 0 7px 0 rgba(168, 35, 28, .6), 0 16px 38px rgba(0, 0, 0, .65);
    --th-found-bg: #8f1d17; --th-found-ink: #f8eedb; --th-action-bg: rgba(42, 29, 18, .08); --th-field-bg: #fbf4e4;
}
html[data-theme="codex"] h1::first-letter { color: #d6463c; }
html[data-theme="codex"] .gm-main .gta-popup-name { font-size: 1.12rem; }
html[data-theme="codex"] .gm-main .gta-popup-name::first-letter { color: #a8231c; font-size: 1.45em; }
html[data-theme="codex"] .gm-main .gta-found-button.is-found { background: #3f5a2b; color: #f3e9d0; box-shadow: none; }

/* --- Gothic: the colony under the barrier - dark wood and stone, torchlight amber ---------------------------------------- */
html[data-theme="colony"] {
    --gm-bg: #0f0d0a; --gm-surface: #1a1611; --gm-surface-2: #221d16; --gm-border: #43392b; --gm-text: #e9dfc9; --gm-muted: #aa9c81;
    --gm-pink: #d98d34; --gm-orange: #a9bd7f; --th-soft: #cfc3aa; --th-link: #e6a352;
    --th-body-bg: radial-gradient(ellipse 700px 380px at 10% -10%, rgba(217, 141, 52, .2), transparent 70%), repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 52px), #0f0d0a;
    --th-head-font: 'Literata', Georgia, serif; --th-head-weight: 700; --th-head-transform: uppercase; --th-head-spacing: .04em; --th-h1-color: #f0c98c;
    --th-radius: 0; --th-btn-radius: 0; --th-pill-radius: 0; --th-btn-font: 'Literata', Georgia, serif;
    --th-primary: linear-gradient(180deg, #e39c45, #b56d1f); --th-accent-ink: #1a0f04;
    --th-popup-bg: linear-gradient(180deg, #2a2219, #17130e); --th-popup-border: 2px solid #5c4b36; --th-popup-radius: 0; --th-popup-tip: #19150f;
    --th-popup-shadow: inset 0 0 0 1px rgba(217, 141, 52, .35), 0 0 34px rgba(217, 141, 52, .14), 0 18px 44px rgba(0, 0, 0, .75);
}
html[data-theme="colony"] h1 { text-shadow: 0 2px 0 #000, 0 0 20px rgba(217, 141, 52, .35); }
html[data-theme="colony"] .gm-main .gta-found-button.is-found { background: rgba(169, 189, 127, .16); color: #c4d79a; box-shadow: inset 0 0 0 1px rgba(169, 189, 127, .5); }

/* --- The Elder Scrolls: cold northern nights, silver lines fading out at the ends, bronze for what matters --------------- */
html[data-theme="tamriel"] {
    --gm-bg: #0c0d0f; --gm-surface: #15171a; --gm-surface-2: #1c1f23; --gm-border: #393e45; --gm-text: #ecebe6; --gm-muted: #a5a39c;
    --gm-pink: #cfb57c; --gm-orange: #a9c2d6; --th-soft: #d0cec7; --th-link: #d9c38e;
    --th-body-bg: radial-gradient(ellipse 1000px 460px at 50% -14%, rgba(169, 194, 214, .14), transparent 70%), #0c0d0f;
    --th-head-font: 'Literata', Georgia, serif; --th-head-transform: uppercase; --th-head-spacing: .12em; --th-head-weight: 400; --th-h1-color: #f4f2ec;
    --th-radius: 0; --th-btn-radius: 0; --th-pill-radius: 0; --th-btn-transform: uppercase; --th-btn-spacing: .12em;
    --th-primary: rgba(0, 0, 0, .35); --th-accent-ink: #f4f2ec;
    --th-popup-bg: rgba(10, 11, 13, .94); --th-popup-border: 0; --th-popup-radius: 0; --th-popup-tip: #0b0c0e;
    --th-popup-shadow: 0 18px 44px rgba(0, 0, 0, .75);
    --th-found-bg: rgba(0, 0, 0, .35); --th-found-ink: #f4f2ec; --th-found-border: 1px solid rgba(236, 235, 230, .55);
}
html[data-theme="tamriel"] .gm-primary { border: 1px solid rgba(236, 235, 230, .55); }
html[data-theme="tamriel"] .gm-header { border-bottom: 1px solid; border-image: linear-gradient(90deg, transparent, rgba(236, 235, 230, .55), transparent) 1; }
html[data-theme="tamriel"] .gm-main .leaflet-popup-content-wrapper::before, html[data-theme="tamriel"] .gm-main .leaflet-popup-content-wrapper::after {
    content: ''; position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(236, 235, 230, .75), transparent); pointer-events: none; }
html[data-theme="tamriel"] .gm-main .leaflet-popup-content-wrapper::before { top: 0; }
html[data-theme="tamriel"] .gm-main .leaflet-popup-content-wrapper::after { bottom: 0; }
html[data-theme="tamriel"] .gm-main .gta-popup-name { font-size: .98rem; }
html[data-theme="tamriel"] .gm-main .gta-found-button:hover { background: rgba(236, 235, 230, .1); filter: none; }
html[data-theme="tamriel"] .gm-main .gta-found-button.is-found { background: rgba(207, 181, 124, .16); color: #e6d19f; box-shadow: none; border-color: rgba(207, 181, 124, .6); }

/* --- Just Cause: a tropical dictatorship going up in flames - red, sun yellow, the glow of an explosion ---------------- */
html[data-theme="chaos"] {
    --gm-bg: #0f0a08; --gm-surface: #1a1210; --gm-surface-2: #241915; --gm-border: #4a3026; --gm-text: #fff3ea; --gm-muted: #c9a796;
    --gm-pink: #ff3527; --gm-orange: #ffc21a; --th-soft: #ead2c4; --th-link: #ffc21a;
    --th-body-bg: radial-gradient(800px 420px at 92% -10%, rgba(255, 120, 20, .26), transparent 62%), radial-gradient(600px 300px at 0 0, rgba(255, 53, 39, .12), transparent 62%), #0f0a08;
    --th-head-transform: uppercase; --th-head-weight: 800; --th-head-spacing: .03em; --th-h1-color: #fff;
    --th-radius: 2px; --th-btn-radius: 0; --th-pill-radius: 2px; --th-btn-transform: uppercase; --th-btn-spacing: .05em;
    --th-primary: #e3261b; --th-accent-ink: #fff;
    --th-popup-bg: linear-gradient(180deg, #24160f, #160e0b); --th-popup-border: 1px solid #e3261b; --th-popup-radius: 2px; --th-popup-tip: #170f0b;
    --th-popup-shadow: 0 0 36px rgba(255, 120, 20, .32), 0 18px 44px rgba(0, 0, 0, .7);
}
html[data-theme="chaos"] h1 { text-shadow: 0 0 18px rgba(255, 120, 20, .5), 2px 2px 0 #e3261b; }
html[data-theme="chaos"] .gm-main .leaflet-popup-content-wrapper::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #e3261b, #ff7a14, #ffc21a); }
html[data-theme="chaos"] .gm-main .gta-found-button.is-found { background: #ffc21a; color: #1a0b05; box-shadow: none; }

/* --- Genshin Impact: a starry night, cream panels with gold trim, soft round shapes -------------------------------------- */
html[data-theme="teyvat"] {
    --gm-bg: #11142a; --gm-surface: #191e38; --gm-surface-2: #212746; --gm-border: #3b4470; --gm-text: #f3eddf; --gm-muted: #b4afc6;
    --gm-pink: #ecc56a; --gm-orange: #94d8ff; --th-soft: #dcd6c8; --th-link: #f0cf7c;
    --th-body-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='30' cy='40' r='1' opacity='.45'/%3E%3Ccircle cx='160' cy='90' r='1.3' opacity='.4'/%3E%3Ccircle cx='90' cy='180' r='.8' opacity='.35'/%3E%3Ccircle cx='200' cy='200' r='1' opacity='.3'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(ellipse 1000px 460px at 70% -12%, rgba(148, 216, 255, .16), transparent 70%), #11142a;
    --th-head-weight: 700; --th-radius: 16px; --th-btn-radius: 999px; --th-pill-radius: 999px;
    --th-primary: #ece5d8; --th-accent-ink: #3b4258;
    --th-popup-bg: #f5f0e5; --th-popup-ink: #3b4258; --th-popup-muted: #6f7488; --th-popup-soft: #4a5068;
    --th-popup-border: 1px solid #d8c08a; --th-popup-radius: 14px; --th-popup-tip: #f5f0e5;
    --th-popup-shadow: inset 0 0 0 3px #f5f0e5, inset 0 0 0 4px rgba(216, 192, 138, .6), 0 16px 40px rgba(0, 0, 0, .55);
    --th-found-bg: #3b4258; --th-found-ink: #f6eedb; --th-action-bg: rgba(59, 66, 88, .08); --th-field-bg: #fffdf7;
}
html[data-theme="teyvat"] .gm-primary { box-shadow: inset 0 0 0 1px #d8c08a; }
html[data-theme="teyvat"] .gm-main .gta-found-button { box-shadow: inset 0 0 0 1px #d8c08a; }
html[data-theme="teyvat"] .gm-main .gta-found-button.is-found { background: #e7dcbf; color: #3b4258; box-shadow: inset 0 0 0 1px #c9ac68; }

/* --- Zenless Zone Zero: street style - black, acid lime, a halftone print and fat rounded stickers ----------------------- */
html[data-theme="proxy"] {
    --gm-bg: #0b0b0b; --gm-surface: #151515; --gm-surface-2: #1e1e1e; --gm-border: #363636; --gm-text: #f6f6f2; --gm-muted: #ababa4;
    --gm-pink: #d4ff2a; --gm-orange: #ff8a1f; --th-soft: #d6d6cf; --th-link: #ff9d42;
    --th-body-bg: radial-gradient(rgba(212, 255, 42, .08) 1.2px, transparent 1.6px) 0 0 / 14px 14px, radial-gradient(ellipse 900px 400px at 90% -10%, rgba(255, 138, 31, .12), transparent 70%), #0b0b0b;
    --th-head-transform: uppercase; --th-head-style: italic; --th-head-weight: 800; --th-head-spacing: -.01em;
    --th-radius: 16px; --th-btn-radius: 999px; --th-pill-radius: 999px; --th-btn-transform: uppercase; --th-btn-spacing: .02em;
    --th-primary: #d4ff2a; --th-accent-ink: #0b0b0b;
    --th-popup-bg: #121212; --th-popup-border: 2px solid #d4ff2a; --th-popup-radius: 16px; --th-popup-tip: #d4ff2a;
    --th-popup-shadow: 5px 6px 0 #ff8a1f, 0 18px 40px rgba(0, 0, 0, .7);
}
html[data-theme="proxy"] h1 { color: #d4ff2a; text-shadow: 3px 3px 0 rgba(255, 138, 31, .55); }
html[data-theme="proxy"] .gm-main .gta-found-button { box-shadow: 0 3px 0 #6d8a00; }
html[data-theme="proxy"] .gm-main .gta-found-button.is-found { background: #ff8a1f; color: #0b0b0b; box-shadow: none; }

/* --- Honkai: Star Rail, Wuthering Waves: deep space, glassy panels, pale gold and a cool blue --------------------------- */
html[data-theme="astral"] {
    --gm-bg: #0a0c16; --gm-surface: #121628; --gm-surface-2: #181d33; --gm-border: #303a5e; --gm-text: #eef1fb; --gm-muted: #a4acca;
    --gm-pink: #f2d48a; --gm-orange: #8ad7ff; --th-soft: #cfd5ea; --th-link: #8ad7ff;
    --th-body-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='20' cy='60' r='.9' opacity='.5'/%3E%3Ccircle cx='130' cy='30' r='1.2' opacity='.45'/%3E%3Ccircle cx='200' cy='140' r='.8' opacity='.4'/%3E%3Ccircle cx='70' cy='200' r='1' opacity='.35'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(ellipse 800px 420px at 85% -10%, rgba(138, 215, 255, .16), transparent 70%), radial-gradient(ellipse 700px 380px at 5% 0, rgba(160, 120, 255, .12), transparent 70%), #0a0c16;
    --th-head-weight: 600; --th-head-spacing: .04em; --th-radius: 10px; --th-btn-radius: 6px; --th-pill-radius: 999px;
    --th-primary: linear-gradient(90deg, #f6e2a8, #e7bf64); --th-accent-ink: #1b1608;
    --th-popup-bg: linear-gradient(160deg, rgba(36, 44, 76, .96), rgba(17, 21, 38, .96)); --th-popup-border: 1px solid rgba(242, 212, 138, .45); --th-popup-radius: 8px; --th-popup-tip: #141a2e;
    --th-popup-shadow: 0 0 30px rgba(138, 215, 255, .14), 0 18px 44px rgba(0, 0, 0, .7);
}
html[data-theme="astral"] .gm-main .leaflet-popup-content-wrapper::before { content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 1px; background: linear-gradient(90deg, transparent, #f2d48a, transparent); }
html[data-theme="astral"] .gm-main .gta-found-button.is-found { background: rgba(138, 215, 255, .14); color: #b5e6ff; box-shadow: inset 0 0 0 1px rgba(138, 215, 255, .5); }

/* --- Black Myth: Wukong - ink wash mountains, old gold and the cinnabar of a seal ---------------------------------------- */
html[data-theme="wukong"] {
    --gm-bg: #0d0c0a; --gm-surface: #161411; --gm-surface-2: #1e1b17; --gm-border: #3b342b; --gm-text: #ede5d5; --gm-muted: #a89c88;
    --gm-pink: #c9a24a; --gm-orange: #d65045; --th-soft: #d2c8b6; --th-link: #dcb865;
    --th-body-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120V86q30-30 62-10t54-24q28-30 60 6t56-8q30-26 64 4t48-2q30-16 56 10v58z' fill='%23d2c8b6' opacity='.05'/%3E%3Cpath d='M0 120v-18q40-26 80-6t70-14q36-18 72 10t74-8q40-14 104 16v20z' fill='%23d2c8b6' opacity='.06'/%3E%3C/svg%3E") no-repeat center bottom / 100% 260px fixed, radial-gradient(ellipse 900px 420px at 50% -12%, rgba(201, 162, 74, .14), transparent 70%), #0d0c0a;
    --th-head-font: 'Literata', Georgia, serif; --th-head-weight: 600; --th-head-spacing: .06em; --th-h1-color: #e9cf8e;
    --th-radius: 2px; --th-btn-radius: 2px; --th-pill-radius: 2px; --th-btn-font: 'Literata', Georgia, serif;
    --th-primary: #a8322a; --th-accent-ink: #f8eedd;
    --th-popup-bg: radial-gradient(ellipse at 30% 0, #2a2620, #13110e 75%); --th-popup-border: 1px solid rgba(201, 162, 74, .45); --th-popup-radius: 2px; --th-popup-tip: #15130f;
    --th-popup-shadow: 0 18px 44px rgba(0, 0, 0, .75);
}
/* A seal pressed into the corner of the popup: a cinnabar square, no writing. */
html[data-theme="wukong"] .gm-main .leaflet-popup-content-wrapper::after { content: ''; position: absolute; right: 9px; bottom: 9px; width: 13px; height: 13px; background: #a8322a; box-shadow: inset 0 0 0 2px #a8322a, inset 0 0 0 3px rgba(248, 238, 221, .55); transform: rotate(4deg); opacity: .75; pointer-events: none; }
html[data-theme="wukong"] .gm-main .gta-popup-name { font-size: 1.1rem; }
html[data-theme="wukong"] .gm-main .gta-found-button.is-found { background: rgba(201, 162, 74, .16); color: #ecd294; box-shadow: inset 0 0 0 1px rgba(201, 162, 74, .55); }

/* --- God of War: the cold of Midgard - slate and frost blue, carved lines, a red that means war ------------------------- */
html[data-theme="norse"] {
    --gm-bg: #0c0f12; --gm-surface: #141a1f; --gm-surface-2: #1a2228; --gm-border: #34434e; --gm-text: #e9eff3; --gm-muted: #a0b2be;
    --gm-pink: #d23c30; --gm-orange: #a3d0ec; --th-soft: #c9d5dd; --th-link: #a3d0ec;
    --th-body-bg: radial-gradient(ellipse 1100px 460px at 50% -14%, rgba(163, 208, 236, .16), transparent 70%), #0c0f12;
    --th-head-transform: uppercase; --th-head-spacing: .1em; --th-head-weight: 700;
    --th-radius: 2px; --th-btn-radius: 2px; --th-pill-radius: 2px; --th-btn-transform: uppercase; --th-btn-spacing: .1em;
    --th-primary: linear-gradient(180deg, #d9463a, #9e2219); --th-accent-ink: #fff;
    --th-popup-bg: linear-gradient(180deg, #1d262d, #12171b); --th-popup-border: 1px solid #4c5e6b; --th-popup-radius: 2px; --th-popup-tip: #13181c;
    --th-popup-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 18px 44px rgba(0, 0, 0, .75);
}
/* Carved notches along the top edge of the popup and the header. */
html[data-theme="norse"] .gm-main .leaflet-popup-content-wrapper::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: repeating-linear-gradient(90deg, #a3d0ec 0 2px, transparent 2px 7px, #a3d0ec 7px 8px, transparent 8px 16px); opacity: .45; pointer-events: none; }
html[data-theme="norse"] .gm-header { border-bottom: 2px solid #34434e; box-shadow: 0 1px 0 rgba(163, 208, 236, .18); }
html[data-theme="norse"] .gm-main .gta-found-button.is-found { background: rgba(163, 208, 236, .14); color: #c3e3f6; box-shadow: inset 0 0 0 1px rgba(163, 208, 236, .5); }

/* --- Ghost of Tsushima: black ink and rice paper white, a red sun and a brush stroke ------------------------------------- */
html[data-theme="tsushima"] {
    --gm-bg: #0e0d0d; --gm-surface: #171515; --gm-surface-2: #201d1c; --gm-border: #3c3533; --gm-text: #f2ede5; --gm-muted: #aca297;
    --gm-pink: #d23a30; --gm-orange: #e8cc85; --th-soft: #d6cfc4; --th-link: #ead6a6;
    --th-body-bg: radial-gradient(circle 190px at 88% 120px, rgba(210, 58, 48, .2), rgba(210, 58, 48, .06) 70%, transparent 72%), #0e0d0d;
    --th-head-font: 'Literata', Georgia, serif; --th-head-weight: 600; --th-head-spacing: .04em; --th-h1-color: #f5efe6;
    --th-radius: 0; --th-btn-radius: 0; --th-pill-radius: 0; --th-btn-font: 'Literata', Georgia, serif;
    --th-primary: #f2ede5; --th-accent-ink: #141111;
    --th-popup-bg: #121010; --th-popup-border: 1px solid #3c3533; --th-popup-radius: 0; --th-popup-tip: #121010;
    --th-popup-shadow: 0 18px 44px rgba(0, 0, 0, .75);
}
html[data-theme="tsushima"] .gm-main .gta-popup-name { padding-bottom: .4rem; font-size: 1.1rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14'%3E%3Cpath d='M2 9C36 3 110 1 198 5c-40 4-120 9-196 6z' fill='%23d23a30'/%3E%3C/svg%3E") no-repeat left bottom / 130px 8px; }
html[data-theme="tsushima"] .gm-main .gta-found-button:hover { background: #d23a30; color: #fff; filter: none; }
html[data-theme="tsushima"] .gm-main .gta-found-button.is-found { background: #d23a30; color: #fff; box-shadow: none; }

/* --- Hollow Knight: the dark of a cavern kingdom, pale white with a faint glow, the blue of soul ------------------------ */
html[data-theme="hallownest"] {
    --gm-bg: #070a12; --gm-surface: #0d121e; --gm-surface-2: #121927; --gm-border: #283550; --gm-text: #eef2f8; --gm-muted: #9ca8c0;
    --gm-pink: #eef2f8; --gm-orange: #86b8ff; --th-soft: #c9d1e2; --th-link: #a6c9ff;
    --th-body-bg: radial-gradient(rgba(166, 201, 255, .12) 1px, transparent 1.5px) 0 0 / 90px 110px, radial-gradient(ellipse 1000px 480px at 50% -12%, rgba(134, 184, 255, .14), transparent 70%), #070a12;
    --th-head-font: 'Literata', Georgia, serif; --th-head-transform: uppercase; --th-head-spacing: .14em; --th-head-weight: 500;
    --th-radius: 0; --th-btn-radius: 0; --th-pill-radius: 0; --th-btn-font: 'Literata', Georgia, serif; --th-btn-transform: uppercase; --th-btn-spacing: .12em;
    --th-primary: #eef2f8; --th-accent-ink: #070a12;
    --th-popup-bg: rgba(8, 11, 19, .96); --th-popup-border: 1px solid rgba(238, 242, 248, .45); --th-popup-radius: 0; --th-popup-tip: #0a0e17;
    --th-popup-shadow: 0 0 26px rgba(166, 201, 255, .16), 0 18px 44px rgba(0, 0, 0, .8);
}
html[data-theme="hallownest"] h1, html[data-theme="hallownest"] .gm-main .gta-popup-name { text-shadow: 0 0 14px rgba(180, 210, 255, .4); }
html[data-theme="hallownest"] .gm-main .leaflet-popup-content-wrapper::before { content: ''; position: absolute; top: -5px; left: 50%; width: 9px; height: 9px; transform: translateX(-50%) rotate(45deg); background: #070a12; border: 1px solid rgba(238, 242, 248, .6); }
html[data-theme="hallownest"] .gm-main .leaflet-popup-content-wrapper { overflow: visible; }
html[data-theme="hallownest"] .gm-main .gta-popup-name, html[data-theme="hallownest"] .gm-main .gta-popup-type { text-align: center; padding: 0 1.1rem; margin-right: 0; }
html[data-theme="hallownest"] .gm-main .gta-found-button.is-found { background: rgba(134, 184, 255, .16); color: #bcd6ff; box-shadow: inset 0 0 0 1px rgba(134, 184, 255, .55); }

/* --- Stardew Valley: a farmhouse at evening - warm wood, cream boards in thick wooden frames, a pixel-step edge ---------- */
html[data-theme="farm"] {
    --gm-bg: #2a1a10; --gm-surface: #3a2617; --gm-surface-2: #4a311e; --gm-border: #7a5230; --gm-text: #fff4de; --gm-muted: #e3c89d;
    --gm-pink: #f5b83d; --gm-orange: #9ad86f; --th-soft: #f2dfbd; --th-link: #ffd36b;
    --th-body-bg: repeating-linear-gradient(0deg, transparent 0 38px, rgba(0, 0, 0, .22) 38px 40px), linear-gradient(90deg, #2c1b10, #26170d 50%, #2c1b10);
    --th-head-weight: 800; --th-head-spacing: 0; --th-h1-color: #ffe39a;
    --th-radius: 6px; --th-btn-radius: 4px; --th-pill-radius: 6px;
    --th-primary: #f5b83d; --th-accent-ink: #3a1f08;
    --th-popup-bg: linear-gradient(180deg, #fcefcb, #f2d99d); --th-popup-ink: #4a2c12; --th-popup-muted: #7a5430; --th-popup-soft: #5a3618;
    --th-popup-border: 4px solid #8a5a2b; --th-popup-radius: 6px; --th-popup-tip: #8a5a2b;
    --th-popup-shadow: inset 0 0 0 2px #d9a25a, 0 0 0 2px #3f230e, 0 16px 36px rgba(0, 0, 0, .6);
    --th-found-bg: #5f9a32; --th-found-ink: #fffbe8; --th-action-bg: rgba(74, 44, 18, .1); --th-field-bg: #fffaf0;
}
html[data-theme="farm"] h1 { text-shadow: 2px 2px 0 #5a3214; }
html[data-theme="farm"] .gm-panel, html[data-theme="farm"] .gm-game { box-shadow: inset 0 0 0 2px rgba(255, 211, 107, .12); }
html[data-theme="farm"] .gm-main .gta-found-button { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
html[data-theme="farm"] .gm-main .gta-found-button.is-found { background: #f5b83d; color: #3a1f08; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }

/* --- Subnautica: an alien ocean - light from the surface fading into the deep, the cyan glass of a PDA ------------------ */
html[data-theme="deepsea"] {
    --gm-bg: #03111b; --gm-surface: #08202e; --gm-surface-2: #0c2a3b; --gm-border: #1c4b64; --gm-text: #e6f7ff; --gm-muted: #94c3d9;
    --gm-pink: #3fd2ff; --gm-orange: #ffd166; --th-soft: #c3e2f0; --th-link: #7ee3ff;
    --th-body-bg: linear-gradient(115deg, transparent 30%, rgba(126, 227, 255, .05) 34%, transparent 40%, transparent 55%, rgba(126, 227, 255, .04) 58%, transparent 63%), linear-gradient(180deg, #0b3a52 0, #062033 420px, #03111b 900px);
    --th-head-weight: 700; --th-radius: 14px; --th-btn-radius: 999px; --th-pill-radius: 999px;
    --th-primary: #3fd2ff; --th-accent-ink: #022130;
    --th-popup-bg: linear-gradient(180deg, rgba(14, 58, 80, .96), rgba(6, 32, 46, .96)); --th-popup-border: 1px solid rgba(63, 210, 255, .6); --th-popup-radius: 14px; --th-popup-tip: #082636;
    --th-popup-shadow: 0 0 28px rgba(63, 210, 255, .25), 0 18px 44px rgba(0, 0, 0, .65);
}
html[data-theme="deepsea"] .gm-main .leaflet-popup-content-wrapper::before { content: ''; position: absolute; top: 0; left: 18px; right: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #7ee3ff, transparent); }
html[data-theme="deepsea"] .gm-main .gta-found-button { box-shadow: 0 0 16px rgba(63, 210, 255, .35); }
html[data-theme="deepsea"] .gm-main .gta-found-button.is-found { background: rgba(255, 209, 102, .16); color: #ffdf94; box-shadow: inset 0 0 0 1px rgba(255, 209, 102, .55); }

/* --- L.A. Noire, Mafia: a 1940s crime story - black and white film, art deco gold, a typewriter -------------------------- */
html[data-theme="noir"] {
    --gm-bg: #0e0e0d; --gm-surface: #171716; --gm-surface-2: #1f1f1d; --gm-border: #3b3a36; --gm-text: #ede9e0; --gm-muted: #a8a397;
    --gm-pink: #cfae5f; --gm-orange: #c9483a; --th-soft: #d2cdc2; --th-link: #d9bc74;
    --th-body-bg: radial-gradient(ellipse 900px 500px at 50% -10%, rgba(237, 233, 224, .08), transparent 70%), repeating-linear-gradient(90deg, rgba(207, 174, 95, .03) 0 1px, transparent 1px 9px), #0e0e0d;
    --th-head-font: 'Literata', Georgia, serif; --th-head-transform: uppercase; --th-head-spacing: .08em; --th-head-weight: 700; --th-h1-color: #f2eadb;
    --th-radius: 0; --th-btn-radius: 0; --th-pill-radius: 0; --th-btn-transform: uppercase; --th-btn-spacing: .1em;
    --th-primary: #cfae5f; --th-accent-ink: #14120d;
    --th-popup-bg: #151514; --th-popup-border: 1px solid #cfae5f; --th-popup-radius: 0; --th-popup-tip: #151514;
    --th-popup-shadow: inset 0 0 0 3px #151514, inset 0 0 0 4px rgba(207, 174, 95, .35), 0 18px 44px rgba(0, 0, 0, .8);
}
html[data-theme="noir"] .gm-header { border-bottom: 3px double rgba(207, 174, 95, .55); }
html[data-theme="noir"] .gm-main .gta-popup-type, html[data-theme="noir"] .gm-main .gta-popup-desc { font-family: ui-monospace, 'Courier New', monospace; }
html[data-theme="noir"] .gm-main .gta-popup-desc { font-size: .8rem; }
html[data-theme="noir"] .gm-main .gta-found-button.is-found { background: #c9483a; color: #fff; box-shadow: none; }

/* --- Dying Light, Dead Island, 7 Days to Die: an outbreak - grime, survival orange, dried blood ------------------------- */
html[data-theme="outbreak"] {
    --gm-bg: #0c0c0a; --gm-surface: #161613; --gm-surface-2: #1e1e1a; --gm-border: #3b3b32; --gm-text: #edebe0; --gm-muted: #a7a493;
    --gm-pink: #ff6a1a; --gm-orange: #a8dc4c; --th-soft: #d2cfc1; --th-link: #ffa167;
    --th-body-bg: radial-gradient(ellipse 900px 380px at 50% 112%, rgba(120, 14, 10, .32), transparent 70%), radial-gradient(ellipse 700px 320px at 85% -10%, rgba(255, 106, 26, .14), transparent 70%), #0c0c0a;
    --th-head-transform: uppercase; --th-head-weight: 800; --th-head-spacing: .04em;
    --th-radius: 2px; --th-btn-radius: 0; --th-pill-radius: 2px; --th-btn-transform: uppercase; --th-btn-spacing: .06em;
    --th-primary: #ff6a1a; --th-accent-ink: #1a0a02;
    --th-popup-bg: radial-gradient(circle at 92% 96%, rgba(130, 16, 12, .45), transparent 26%), radial-gradient(circle at 84% 100%, rgba(130, 16, 12, .3), transparent 14%), #181815;
    --th-popup-border: 1px solid #45453a; --th-popup-radius: 2px; --th-popup-tip: #181815; --th-popup-shadow: 0 18px 44px rgba(0, 0, 0, .75);
}
html[data-theme="outbreak"] h1 { text-shadow: 2px 2px 0 rgba(130, 16, 12, .8); }
html[data-theme="outbreak"] .gm-button, html[data-theme="outbreak"] .gm-main .gta-found-button {
    clip-path: polygon(0 3px, 6% 0, 30% 2px, 52% 0, 77% 3px, 100% 0, 100% calc(100% - 3px), 88% 100%, 63% calc(100% - 2px), 40% 100%, 18% calc(100% - 3px), 0 100%); }
html[data-theme="outbreak"] .gm-main .gta-found-button.is-found { background: #a8dc4c; color: #141a06; box-shadow: none; }

/* --- Watch Dogs: hackers in the city - black, stark white, a pink and a mint glitch, pixel chequers ----------------------- */
html[data-theme="dedsec"] {
    --gm-bg: #08080a; --gm-surface: #111114; --gm-surface-2: #18181c; --gm-border: #323238; --gm-text: #f5f5f7; --gm-muted: #a6a6b0;
    --gm-pink: #ff4d8d; --gm-orange: #5ef2d0; --th-soft: #d4d4da; --th-link: #ff7aa8;
    --th-body-bg: conic-gradient(rgba(255, 255, 255, .025) 25%, transparent 0 50%, rgba(255, 255, 255, .025) 0 75%, transparent 0) 0 0 / 8px 8px, #08080a;
    --th-head-transform: uppercase; --th-head-weight: 800; --th-head-spacing: .02em;
    --th-radius: 0; --th-btn-radius: 0; --th-pill-radius: 0; --th-btn-transform: uppercase; --th-btn-spacing: .06em;
    --th-primary: #f5f5f7; --th-accent-ink: #08080a;
    --th-popup-bg: #0d0d10; --th-popup-border: 1px solid #f5f5f7; --th-popup-radius: 0; --th-popup-tip: #f5f5f7;
    --th-popup-shadow: -3px 0 0 #ff4d8d, 3px 0 0 #5ef2d0, 0 18px 44px rgba(0, 0, 0, .8);
}
html[data-theme="dedsec"] h1 { text-shadow: -1.5px 0 rgba(255, 77, 141, .8), 1.5px 0 rgba(94, 242, 208, .8); }
html[data-theme="dedsec"] .gm-main .gta-popup-type { font-family: ui-monospace, monospace; color: #5ef2d0; }
html[data-theme="dedsec"] .gm-main .gta-found-button:hover { background: #ff4d8d; color: #fff; filter: none; }
html[data-theme="dedsec"] .gm-main .gta-found-button.is-found { background: #5ef2d0; color: #08080a; box-shadow: none; }

/* --- Sniper Ghost Warrior, Tarkov, PUBG, Counter-Strike: a tactical display - olive drab, sand, reticle corners --------- */
html[data-theme="tactical"] {
    --gm-bg: #0e100d; --gm-surface: #171a15; --gm-surface-2: #1e221b; --gm-border: #3b4234; --gm-text: #e6eadd; --gm-muted: #a2aa95;
    --gm-pink: #dcc46c; --gm-orange: #f0553d; --th-soft: #cdd3c3; --th-link: #e3cd7c;
    --th-body-bg: repeating-linear-gradient(0deg, rgba(220, 196, 108, .03) 0 1px, transparent 1px 48px), repeating-linear-gradient(90deg, rgba(220, 196, 108, .03) 0 1px, transparent 1px 48px), #0e100d;
    --th-head-transform: uppercase; --th-head-spacing: .12em; --th-head-weight: 700;
    --th-radius: 0; --th-btn-radius: 0; --th-pill-radius: 0; --th-btn-transform: uppercase; --th-btn-spacing: .1em;
    --th-primary: #dcc46c; --th-accent-ink: #14160f;
    --th-popup-bg: rgba(22, 25, 20, .96); --th-popup-border: 1px solid #3b4234; --th-popup-radius: 0; --th-popup-tip: #161914;
    --th-popup-shadow: 0 18px 44px rgba(0, 0, 0, .75);
}
/* Reticle brackets in the four corners of the popup. */
html[data-theme="tactical"] .gm-main .leaflet-popup-content-wrapper::before { content: ''; position: absolute; inset: 4px; pointer-events: none;
    background: linear-gradient(#dcc46c, #dcc46c) 0 0 / 12px 2px, linear-gradient(#dcc46c, #dcc46c) 0 0 / 2px 12px, linear-gradient(#dcc46c, #dcc46c) 100% 0 / 12px 2px, linear-gradient(#dcc46c, #dcc46c) 100% 0 / 2px 12px,
        linear-gradient(#dcc46c, #dcc46c) 0 100% / 12px 2px, linear-gradient(#dcc46c, #dcc46c) 0 100% / 2px 12px, linear-gradient(#dcc46c, #dcc46c) 100% 100% / 12px 2px, linear-gradient(#dcc46c, #dcc46c) 100% 100% / 2px 12px; background-repeat: no-repeat; }
html[data-theme="tactical"] .gm-main .gta-popup-type { font-family: ui-monospace, monospace; text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; }
html[data-theme="tactical"] .gm-main .gta-found-button.is-found { background: #f0553d; color: #fff; box-shadow: none; }

/* --- Baldur's Gate 3: candlelit gold and the violet of something in your head --------------------------------------------- */
html[data-theme="tav"] {
    --gm-bg: #0e0b10; --gm-surface: #18131b; --gm-surface-2: #201925; --gm-border: #413447; --gm-text: #f0e8db; --gm-muted: #ada0af;
    --gm-pink: #d2ad5c; --gm-orange: #b493ef; --th-soft: #d7ccc8; --th-link: #dcbc72;
    --th-body-bg: radial-gradient(ellipse 900px 420px at 80% -10%, rgba(155, 123, 214, .2), transparent 70%), radial-gradient(ellipse 700px 340px at 0 0, rgba(210, 173, 92, .1), transparent 70%), #0e0b10;
    --th-head-font: 'Literata', Georgia, serif; --th-head-weight: 600; --th-head-spacing: .02em; --th-h1-color: #ead5a1;
    --th-radius: 4px; --th-btn-radius: 3px; --th-pill-radius: 4px; --th-btn-font: 'Literata', Georgia, serif;
    --th-primary: linear-gradient(180deg, #dfbd6e, #a9852f); --th-accent-ink: #1d1508;
    --th-popup-bg: radial-gradient(ellipse at top, #271f2c, #151118 75%); --th-popup-border: 1px solid rgba(210, 173, 92, .6); --th-popup-radius: 3px; --th-popup-tip: #16121a;
    --th-popup-shadow: inset 0 0 0 3px #18131b, inset 0 0 0 4px rgba(180, 147, 239, .3), 0 0 32px rgba(155, 123, 214, .22), 0 18px 44px rgba(0, 0, 0, .7);
}
html[data-theme="tav"] .gm-main .gta-popup-name { color: #ead5a1; font-size: 1.1rem; }
html[data-theme="tav"] .gm-main .gta-found-button.is-found { background: rgba(180, 147, 239, .18); color: #d2bdf8; box-shadow: inset 0 0 0 1px rgba(180, 147, 239, .55); }

/* --- Control: a brutalist government building - concrete, black, white and one hard red ---------------------------------- */
html[data-theme="bureau"] {
    --gm-bg: #0c0c0c; --gm-surface: #151515; --gm-surface-2: #1c1c1c; --gm-border: #3b3b3b; --gm-text: #f3f3f3; --gm-muted: #a8a8a8;
    --gm-pink: #e2231a; --gm-orange: #f3f3f3; --th-soft: #d0d0d0; --th-link: #ff6a60;
    --th-body-bg: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 300px), repeating-linear-gradient(0deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 120px), #0c0c0c;
    --th-head-transform: uppercase; --th-head-weight: 800; --th-head-spacing: .02em;
    --th-radius: 0; --th-btn-radius: 0; --th-pill-radius: 0; --th-btn-transform: uppercase; --th-btn-spacing: .08em;
    --th-primary: #e2231a; --th-accent-ink: #fff;
    --th-popup-bg: #121212; --th-popup-border: 1px solid #3b3b3b; --th-popup-radius: 0; --th-popup-tip: #121212;
    --th-popup-shadow: inset 0 6px 0 #e2231a, 0 18px 44px rgba(0, 0, 0, .8);
}
html[data-theme="bureau"] h1 { border-left: 8px solid #e2231a; padding-left: .5em; }
html[data-theme="bureau"] .gm-main .leaflet-popup-content-wrapper { padding-top: 6px; }
html[data-theme="bureau"] .gm-main .gta-popup-type { text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; }
html[data-theme="bureau"] .gm-main .gta-found-button.is-found { background: #f3f3f3; color: #0c0c0c; box-shadow: none; }

/* --- theHunter, Sons of the Forest: deep woods - pine green, hunter orange, contour lines of a map ---------------------- */
html[data-theme="lodge"] {
    --gm-bg: #0d120e; --gm-surface: #152018; --gm-surface-2: #1b291f; --gm-border: #34493b; --gm-text: #eaf0e7; --gm-muted: #a2b5a6;
    --gm-pink: #ff7a1a; --gm-orange: #dccb9d; --th-soft: #cbd8cc; --th-link: #ffa25e;
    --th-body-bg: repeating-radial-gradient(circle at 80% 0, transparent 0 38px, rgba(220, 203, 157, .035) 38px 39px), radial-gradient(ellipse 900px 420px at 20% -10%, rgba(120, 170, 110, .14), transparent 70%), #0d120e;
    --th-head-transform: uppercase; --th-head-weight: 700; --th-head-spacing: .04em;
    --th-radius: 4px; --th-btn-radius: 3px; --th-pill-radius: 4px; --th-btn-transform: uppercase; --th-btn-spacing: .05em;
    --th-primary: #ff7a1a; --th-accent-ink: #1a0c02;
    --th-popup-bg: repeating-radial-gradient(circle at 100% 0, transparent 0 16px, rgba(220, 203, 157, .05) 16px 17px), linear-gradient(180deg, #1f3025, #142017);
    --th-popup-border: 1px solid #3d5544; --th-popup-radius: 4px; --th-popup-tip: #152118; --th-popup-shadow: 0 18px 44px rgba(0, 0, 0, .7);
}
html[data-theme="lodge"] .gm-main .leaflet-popup-content-wrapper { border-top: 3px solid #ff7a1a; }
html[data-theme="lodge"] .gm-main .gta-found-button.is-found { background: rgba(220, 203, 157, .16); color: #ece0bd; box-shadow: inset 0 0 0 1px rgba(220, 203, 157, .55); }

/* --- V Rising: a vampire's castle - black, blood red, a pale moon ----------------------------------------------------- */
html[data-theme="vampire"] {
    --gm-bg: #0c0809; --gm-surface: #170f11; --gm-surface-2: #1f1417; --gm-border: #46272d; --gm-text: #f2e6e6; --gm-muted: #b59ca0;
    --gm-pink: #c8183a; --gm-orange: #e3d3a8; --th-soft: #dacbcc; --th-link: #ef6d85;
    --th-body-bg: radial-gradient(circle 90px at 90% 110px, rgba(240, 230, 210, .13) 0 40px, rgba(240, 230, 210, .04) 42px, transparent 90px), radial-gradient(ellipse 1000px 420px at 50% -10%, rgba(200, 24, 58, .16), transparent 70%), #0c0809;
    --th-head-font: 'Literata', Georgia, serif; --th-head-transform: uppercase; --th-head-spacing: .08em; --th-head-weight: 700; --th-h1-color: #f4dede;
    --th-radius: 3px; --th-btn-radius: 2px; --th-pill-radius: 3px; --th-btn-font: 'Literata', Georgia, serif; --th-btn-transform: uppercase; --th-btn-spacing: .08em;
    --th-primary: linear-gradient(180deg, #d4223f, #8a0f26); --th-accent-ink: #fff2f2;
    --th-popup-bg: linear-gradient(180deg, #221418, #140c0e); --th-popup-border: 1px solid #7a1a2c; --th-popup-radius: 3px; --th-popup-tip: #150c0f;
    --th-popup-shadow: 0 0 30px rgba(200, 24, 58, .22), 0 18px 44px rgba(0, 0, 0, .8);
}
html[data-theme="vampire"] h1 { text-shadow: 0 0 20px rgba(200, 24, 58, .5); }
html[data-theme="vampire"] .gm-main .gta-found-button.is-found { background: rgba(227, 211, 168, .14); color: #efe2bf; box-shadow: inset 0 0 0 1px rgba(227, 211, 168, .5); }

/* --- Borderlands: a comic book - thick black outlines, hatching, loot yellow --------------------------------------------- */
html[data-theme="cel"] {
    --gm-bg: #14120e; --gm-surface: #1f1b14; --gm-surface-2: #29231a; --gm-border: #4d4130; --gm-text: #fbf3dc; --gm-muted: #c8b894;
    --gm-pink: #ffd21f; --gm-orange: #38c8ff; --th-soft: #e8dcbc; --th-link: #ffd21f;
    --th-body-bg: repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 7px), radial-gradient(ellipse 900px 420px at 85% -10%, rgba(255, 210, 31, .14), transparent 70%), #14120e;
    --th-head-transform: uppercase; --th-head-weight: 800; --th-head-spacing: .02em; --th-h1-color: #ffd21f;
    --th-radius: 6px; --th-btn-radius: 4px; --th-pill-radius: 6px; --th-btn-transform: uppercase; --th-btn-spacing: .03em;
    --th-primary: #ffd21f; --th-accent-ink: #120f08;
    --th-popup-bg: repeating-linear-gradient(45deg, rgba(0, 0, 0, .045) 0 1px, transparent 1px 6px), #fdf3d0; --th-popup-ink: #1a1408; --th-popup-muted: #5c4b2a; --th-popup-soft: #2e2512;
    --th-popup-border: 3px solid #0b0a08; --th-popup-radius: 6px; --th-popup-tip: #0b0a08; --th-popup-shadow: 6px 6px 0 #0b0a08, 0 16px 36px rgba(0, 0, 0, .5);
    --th-found-bg: #ffd21f; --th-found-ink: #120f08; --th-found-border: 2px solid #0b0a08; --th-action-bg: rgba(26, 20, 8, .08); --th-field-bg: #fffbea;
}
html[data-theme="cel"] h1 { text-shadow: 2px 2px 0 #0b0a08, -1px -1px 0 #0b0a08, 1px -1px 0 #0b0a08, -1px 1px 0 #0b0a08, 4px 4px 0 rgba(0, 0, 0, .6); }
html[data-theme="cel"] .gm-panel, html[data-theme="cel"] .gm-game { border: 2px solid #0b0a08; box-shadow: 4px 4px 0 rgba(0, 0, 0, .55); }
html[data-theme="cel"] .gm-primary, html[data-theme="cel"] .gm-button { border: 2px solid #0b0a08; box-shadow: 3px 3px 0 #0b0a08; }
html[data-theme="cel"] .gm-main .gta-found-button { box-shadow: 3px 3px 0 #0b0a08; }
html[data-theme="cel"] .gm-main .gta-found-button.is-found { background: #38c8ff; color: #06141a; }

@media (prefers-reduced-motion: reduce) { html[data-theme="farcry"] .gm-main .gta-found-button { transform: none; } }

/* Chinese, Japanese, Korean: the game looks without tracking, italics or small caps (site.css says why). */
html[data-theme]:is([lang="ja"], [lang="ko"], [lang="zh-Hans"]) :is(h1, h2, h3, .gm-button, .gm-primary, .gm-chip, .gta-popup-type, .gta-found-button) { letter-spacing: 0; font-style: normal; font-variant: normal; }
