/* =========================================================
   PODSTRONY (akta, karta sprawy, kraj, tablica, o grze, 404)
   Styl v3 „Wydział XIII · nocna zmiana”: noc w biurze, linie kineskopu, logo-pieczątka PS1,
   kartki z maszyny do pisania (Courier Prime), teleks (VT323), czerwone pieczątki,
   teczki jak w szafie kartotekowej, tablica jak w pokoju 3D.
   Wersja klasyczna (?v=lite) ma własne style — ten plik jej nie dotyczy.
   ========================================================= */

:root {
    --night: #07090e;
    --night-2: #10141d;
    --paper: #ece4cc;
    --paper-2: #e2d6b6;
    --manila: #d9bf86;
    --manila-2: #c9a964;
    --ink: #1b1a17;
    --red: #b3261e;
    --amber: #f2c230;
    --type: 'Courier Prime', 'Courier New', monospace;
    --term: 'VT323', 'Courier New', monospace;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }

html { background: var(--night); }
body.page {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font: 16px/1.6 var(--type);
    background:
        repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px),
        radial-gradient(ellipse 900px 500px at 50% 0, rgba(242, 194, 48, 0.10), transparent 70%),
        linear-gradient(var(--night-2), var(--night) 900px);
    background-color: var(--night);
}
/* światło przez żaluzje — neon baru z naprzeciwka, jak w pokoju */
.page-desk {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: repeating-linear-gradient(-14deg, transparent 0 26px, rgba(214, 60, 60, 0.045) 26px 40px);
    -webkit-mask-image: linear-gradient(100deg, transparent 5%, #000 40%, transparent 85%);
            mask-image: linear-gradient(100deg, transparent 5%, #000 40%, transparent 85%);
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px dashed var(--red); outline-offset: 3px; }

/* ---------- NAGŁÓWEK ---------- */
.page-top {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 26px 16px 8px;
}
.page-logo { display: block; line-height: 0; }
.page-logo img {
    width: 240px;
    height: auto;
    padding: 6px;
    background: #e9e2c8;
    image-rendering: pixelated;
    transform: rotate(-2deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    transition: transform 0.15s;
}
.page-logo:hover img { transform: rotate(-1deg) scale(1.02); }
.page-sub {
    margin: 2px 0 0;
    font: 18px var(--term);
    letter-spacing: 4px;
    color: var(--amber);
    text-shadow: 0 0 8px rgba(242, 194, 48, 0.35);
    text-align: center;
}
/* zakładki kartoteki */
.page-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    margin-top: 6px;
}
.page-nav > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px 6px;
    background: var(--manila);
    border-radius: 6px 6px 0 0;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transform: translateY(3px);
    transition: transform 0.12s, background 0.12s;
}
.page-nav > a:hover { transform: translateY(0); background: #e3cb93; }
.page-nav > a.active { background: var(--paper); color: var(--red); transform: translateY(0); box-shadow: none; }
.page-nav .ph { font-size: 16px; }
.page-lang {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-left: 8px;
    padding: 6px 10px;
    font: 18px var(--term);
    color: var(--paper);
}
.page-lang a { text-decoration: none; opacity: 0.6; }
.page-lang a.active { opacity: 1; color: var(--amber); text-decoration: underline; }

/* ---------- TREŚĆ ---------- */
.page-main {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px 40px;
}
/* okruszki: taśma teleksu */
.crumbs {
    display: inline-block;
    margin: 6px 0 14px;
    padding: 2px 12px;
    background: #e9e2c8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font: 18px var(--term);
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: rotate(-0.6deg);
}
.crumbs a { color: var(--red); }

/* kartka z maszyny do pisania */
.sheet {
    position: relative;
    margin: 0 0 28px;
    padding: 34px 40px 36px;
    background:
        linear-gradient(var(--red), var(--red)) 0 14px / 100% 2px no-repeat,
        radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.35), transparent 60%),
        var(--paper);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
}
.sheet-narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.case-no {
    margin: 0 0 2px;
    font: 18px var(--term);
    letter-spacing: 3px;
    color: var(--red);
}
.typed-title {
    margin: 0 0 12px;
    font: bold clamp(26px, 4.4vw, 40px)/1.15 var(--type);
    letter-spacing: 2px;
    text-transform: uppercase;
}
.lead { margin: 0 0 18px; font-size: 16.5px; }
.sheet h2, .section-label {
    margin: 26px 0 10px;
    font: bold 17px var(--type);
    letter-spacing: 3px;
    text-transform: uppercase;
}
.sheet h2::before, .section-label::before { content: '■ '; color: var(--red); }
.sheet h3 { margin: 18px 0 4px; font-size: 16px; }
.section-label { color: var(--paper); }
.sheet .section-label { color: var(--ink); }
.ink-link { color: var(--red); font-weight: bold; }
.ink-link:hover { text-decoration: none; }
.ink-btn {
    display: inline-block;
    padding: 9px 18px;
    background: var(--ink);
    color: var(--paper);
    font: bold 14px var(--type);
    letter-spacing: 3px;
    text-decoration: none;
    box-shadow: 3px 3px 0 var(--red);
    transition: transform 0.12s, box-shadow 0.12s;
}
.ink-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--red); }
.cta-row { margin-top: 26px; }

/* pieczątki */
.stamp {
    position: absolute;
    padding: 4px 12px;
    border: 3px double currentColor;
    font: bold 18px var(--type);
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.85;
    pointer-events: none;
}
.stamp-red { color: var(--red); }
.stamp-corner, .declassified { top: 26px; right: 26px; transform: rotate(7deg); }
.stamp-big { position: static; display: inline-block; margin: 0 0 18px; font-size: 30px; transform: rotate(-4deg); }

/* ---------- SPIS AKT: filtr krajów i teczki ---------- */
.country-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 24px;
}
.country-filter a {
    padding: 2px 9px;
    border: 1px dashed rgba(0, 0, 0, 0.45);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
}
.country-filter a:hover { border-style: solid; color: var(--red); }
.country-filter a.active { background: var(--ink); color: var(--paper); border-style: solid; }
.country-filter small { opacity: 0.65; }

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px 16px;
    padding-top: 12px;
}
.folder {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 118px;
    padding: 14px 14px 10px;
    background: linear-gradient(180deg, #e4cd96, var(--manila) 40%, var(--manila-2));
    border-radius: 0 4px 4px 4px;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.folder:nth-child(3n+1) { transform: rotate(-0.6deg); }
.folder:nth-child(3n) { transform: rotate(0.5deg); }
.folder:hover { transform: translateY(-4px) rotate(0deg); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45); }
.folder-tab {
    position: absolute;
    left: 0;
    bottom: 100%;
    max-width: 75%;
    padding: 2px 10px 0;
    background: #e4cd96;
    border-radius: 5px 5px 0 0;
    font: 15px/1.2 var(--term);
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.folder-name { font-weight: bold; font-size: 17px; line-height: 1.2; letter-spacing: 1px; text-transform: uppercase; }
.folder:hover .folder-name { color: var(--red); }
.folder-alias { min-height: 1.4em; font-size: 13px; font-style: italic; opacity: 0.75; }
.folder-meta { margin-top: auto; padding-top: 6px; border-top: 1px dashed rgba(0, 0, 0, 0.35); font-size: 12px; letter-spacing: 1px; }
.map-cta { margin: 26px 0 0; }

/* ---------- KARTA SPRAWY (jak karta ewidencyjna w grze) ---------- */
.case-head { display: flex; gap: 30px; align-items: flex-start; margin-top: 10px; }
.polaroid {
    position: relative;
    flex: none;
    width: 190px;
    padding: 9px 9px 34px;
    background: #f8f4ea;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    transform: rotate(-2deg);
    color: var(--ink);
    text-decoration: none;
}
.polaroid img { display: block; width: 100%; height: 210px; object-fit: cover; object-position: top; filter: grayscale(1) sepia(0.35) contrast(1.15) brightness(0.95); }
.tape {
    position: absolute;
    top: -10px;
    left: 50%;
    width: 70px;
    height: 20px;
    background: rgba(235, 225, 190, 0.75);
    transform: translateX(-50%) rotate(-3deg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.silhouette {
    display: grid;
    place-items: center;
    height: 210px;
    background: repeating-linear-gradient(to bottom, #3a3b3e 0 2px, #2f3033 2px 4px);
}
.silhouette i { font-size: 120px; color: #141416; }
.classified-label {
    position: absolute;
    top: 80px;
    left: 50%;
    padding: 2px 8px;
    border: 3px double var(--red);
    background: rgba(248, 244, 234, 0.85);
    color: var(--red);
    font: bold 12px var(--type);
    letter-spacing: 2px;
    white-space: nowrap;
    transform: translateX(-50%) rotate(-12deg);
}
.polaroid-caption { position: absolute; left: 6px; right: 6px; bottom: 8px; font-size: 13px; text-align: center; }
.case-title { padding-top: 26px; min-width: 0; }
.case-alias { margin: -6px 0 6px; font-size: 18px; font-style: italic; }
.case-country { margin: 0; font: 20px var(--term); letter-spacing: 2px; }

/* dane z gry — jak wiersz w protokole */
.evidence { margin-top: 26px; }
.evidence-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.evidence-head span {
    padding: 4px 2px;
    border-bottom: 2px solid var(--ink);
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
}
.evidence-row:not(.evidence-head) span {
    display: grid;
    place-items: center;
    min-height: 56px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    font-size: 21px;
    font-weight: bold;
}
.evidence-row span:not(:last-child) { border-right: 1px dashed rgba(0, 0, 0, 0.25); }
.evidence-row .ph { font-size: 26px; }
.zodiac-glyph { font-size: 26px; }
.evidence-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0 26px;
    margin: 16px 0 0;
}
.evidence-list div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dotted rgba(0, 0, 0, 0.4); }
.evidence-list dt { font-size: 12px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; }
.evidence-list dd { margin: 0; text-align: right; }
.case-report p { margin: 0; }

/* notatka służbowa — jak memo w protokole */
.memo {
    position: relative;
    max-width: 560px;
    margin: 28px auto 6px;
    padding: 18px 22px 16px;
    background:
        repeating-linear-gradient(to bottom, transparent 0 25px, rgba(60, 90, 140, 0.16) 25px 26px) 0 40px,
        #f6efd7;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
    transform: rotate(-1deg);
}
.memo .memo-head { margin: 0 0 4px; font-weight: bold; letter-spacing: 3px; color: var(--red); }
.memo p { margin: 0; }
.paper-clip {
    position: absolute;
    top: -14px;
    left: 26px;
    width: 14px;
    height: 38px;
    border: 3px solid #8e8e88;
    border-radius: 8px;
}
.memo-stamp {
    position: absolute;
    right: 14px;
    bottom: 8px;
    padding: 0 6px;
    border: 2px solid var(--red);
    color: var(--red);
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    transform: rotate(-6deg);
    opacity: 0.8;
}
.case-log .ink-btn { margin-top: 10px; }
.related { margin-top: 10px; }

/* ---------- O GRZE ---------- */
.typed-list { margin: 6px 0 12px; padding-left: 0; list-style: none; }
.typed-list li { position: relative; padding: 3px 0 3px 26px; }
.typed-list li::before { content: '▶'; position: absolute; left: 2px; top: 7px; color: var(--red); font-size: 12px; }
.mark-ok { padding: 0 4px; border: 2px solid #2f6b34; border-radius: 50%; }
.mark-no { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }

/* ---------- TABLICA ŚLEDCZEGO ---------- */
.board-title {
    margin: 6px 0 18px;
    font: bold clamp(24px, 4vw, 36px) var(--type);
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    color: var(--paper);
}
.corkboard {
    position: relative;
    margin-bottom: 30px;
    padding: 26px 24px 30px;
    border: 14px solid #3b2a1c;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.12) 0 1px, transparent 2px) 0 0 / 7px 7px,
        radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.08) 0 1px, transparent 2px) 0 0 / 9px 9px,
        #9a6b3f;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), 0 14px 34px rgba(0, 0, 0, 0.6);
}
.board-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-bottom: 24px; }
.stat-card {
    position: relative;
    padding: 8px 24px 10px;
    background: var(--paper);
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.45);
    text-align: center;
    transform: rotate(-2deg);
}
.stat-card:nth-child(2) { transform: rotate(1.5deg); }
.stat-card span { font: 46px/1 var(--term); }
.stat-card small { margin-left: 4px; font-size: 15px; }
.stat-card em { display: block; font-size: 12px; font-style: normal; letter-spacing: 2px; text-transform: uppercase; }

.map-sheet {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
    padding: 14px 14px 10px;
    background: #e6d8b6;
    border: 8px solid #2c2118;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5);
    transform: rotate(-0.4deg);
}
.pin {
    position: absolute;
    z-index: 2;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff7a6e, var(--red) 55%, #6b0f0b);
    box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.5);
}
.pin-tl { top: -10px; left: -10px; }
.pin-tr { top: -10px; right: -10px; }
.pin-top { top: -7px; left: 50%; transform: translateX(-50%); }
.world-map { display: block; width: 100%; height: auto; touch-action: pan-y; }
.land { fill: #d4bf8e; stroke: #8a6d3e; stroke-width: calc(0.5px * var(--k, 1)); }
.land-case { fill: #c4a66b; }
.map-pin { cursor: pointer; transition: none; }
.pin-head { fill: #23324f; stroke: rgba(0, 0, 0, 0.5); stroke-width: 0.8; transition: fill 0.2s; }
.map-pin.solved .pin-head { fill: var(--red); }
.pin-shine { fill: rgba(255, 255, 255, 0.55); }
.pin-shadow { fill: rgba(0, 0, 0, 0.3); }
.pin-label, .pin-name {
    font: bold 11px var(--type);
    fill: #2a1f10;
    paint-order: stroke;
    stroke: rgba(240, 230, 205, 0.92);
    stroke-width: 3px;
}
.pin-name { display: none; }
.show-names .pin-label { display: none; }
.show-names .pin-name { display: block; }
.map-pin:hover .pin-head, .map-pin:focus .pin-head { fill: var(--red); }
.map-pin:hover .pin-label, .map-pin:hover .pin-name { fill: var(--red); }

/* czerwona nitka — „rozwija się” przy wejściu */
.string, .string-shadow {
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw-string 1.8s ease-out 0.3s forwards;
}
.string { stroke: #b3121b; stroke-width: calc(1.6px * var(--k, 1)); }
.string-shadow {
    stroke: rgba(0, 0, 0, 0.25);
    stroke-width: calc(2px * var(--k, 1));
    transform: translate(calc(1.5px * var(--k, 1)), calc(2.5px * var(--k, 1)));
}
@keyframes draw-string { to { stroke-dashoffset: 0; } }
.map-sheet figcaption { margin-top: 8px; font-size: 13px; text-align: center; }

/* przybliżanie i przesuwanie (map-zoom.js) */
.map-viewport {
    position: relative;
    overflow: hidden;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}
.map-viewport.is-dragging { cursor: grabbing; }
.map-viewport:focus-visible { outline: 2px dashed var(--red); outline-offset: 2px; }
.map-controls, .map-presets { position: absolute; z-index: 3; display: flex; gap: 6px; }
.map-controls { top: 8px; right: 8px; flex-direction: column; }
.map-presets { top: 8px; left: 8px; flex-wrap: wrap; max-width: 62%; }
.map-viewport button {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
    color: var(--ink);
    font: bold 20px/1 var(--type);
    cursor: pointer;
}
.map-presets button { height: 30px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.map-controls button .ph { font-size: 17px; }
.map-viewport button:hover:not(:disabled) { color: var(--red); }
.map-viewport button:active:not(:disabled) { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.55); }
.map-viewport button:disabled { opacity: 0.4; cursor: default; }
.map-hint {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 3;
    padding: 4px 14px;
    background: rgba(12, 12, 10, 0.88);
    color: var(--paper);
    font: 17px var(--term);
    letter-spacing: 1px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 6px);
    transition: opacity 0.2s, transform 0.2s;
}
.map-hint.show { opacity: 1; transform: translate(-50%, 0); }

.board-empty { display: flex; justify-content: center; margin-top: 28px; }
.note-card {
    position: relative;
    max-width: 440px;
    margin: 0;
    padding: 20px 24px;
    background:
        repeating-linear-gradient(to bottom, transparent 0 25px, rgba(60, 90, 140, 0.16) 25px 26px) 0 12px,
        #f6efd7;
    box-shadow: 2px 5px 12px rgba(0, 0, 0, 0.4);
    font-weight: bold;
    text-align: center;
    transform: rotate(1.5deg);
}
.note-card .ink-btn { margin-top: 14px; }

/* polaroidy złapanych */
.polaroid-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 36px 22px;
    margin-top: 36px;
}
.wall-polaroid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: auto;
    padding: 9px 9px 12px;
    text-align: center;
    transform: rotate(var(--tilt, -2deg));
    transition: transform 0.2s;
}
.wall-polaroid img { width: 100%; height: 180px; }
.wall-polaroid:hover { z-index: 3; transform: rotate(0deg) scale(1.05); }
.wall-polaroid .polaroid-caption,
.wall-polaroid .polaroid-date,
.wall-polaroid .polaroid-link,
.wall-polaroid .polaroid-stamp { position: static; width: 100%; }
.wall-polaroid .polaroid-caption { margin-top: 6px; font-weight: bold; line-height: 1.2; }
.polaroid-date { font-size: 11px; line-height: 1.3; opacity: 0.75; }
.polaroid-link, .polaroid-stamp { margin-top: 2px; font-size: 12px; font-weight: bold; color: var(--red); }

.country-list { columns: 2 240px; column-gap: 40px; margin: 14px 0 0; padding: 0; list-style: none; }
.country-list li { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; break-inside: avoid; }
.country-list .dots { flex: 1; border-bottom: 2px dotted rgba(0, 0, 0, 0.4); }
.country-list li.solved a { color: var(--red); font-weight: bold; }

/* ---------- STOPKA ---------- */
.page-foot {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 10px 16px 36px;
    color: var(--paper);
    font-size: 12.5px;
    text-align: center;
    opacity: 0.8;
}
.page-foot-links { font: 17px var(--term); letter-spacing: 2px; }
.page-foot a { color: var(--amber); }

/* ---------- TELEFON ---------- */
@media (max-width: 700px) {
    .page-top { padding-top: 18px; }
    .page-logo img { width: 190px; }
    .page-sub { font-size: 15px; letter-spacing: 2px; }
    .page-nav > a { padding: 6px 8px 5px; font-size: 12px; letter-spacing: 1px; }
    .page-nav .ph { display: none; }
    .page-lang { margin-left: 2px; }
    .sheet { padding: 30px 18px 26px; }
    .stamp-corner, .declassified { top: 22px; right: 10px; font-size: 13px; letter-spacing: 2px; }
    .case-head { flex-direction: column; align-items: center; gap: 14px; text-align: center; }
    .case-title { padding-top: 0; }
    .evidence-head span { font-size: 9px; letter-spacing: 0; }
    .evidence-row:not(.evidence-head) span { min-height: 44px; font-size: 15px; }
    .evidence-row .ph, .zodiac-glyph { font-size: 20px; }
    .folder-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 12px; }
    .folder-name { font-size: 15px; }
    .corkboard { padding: 18px 10px 24px; border-width: 9px; }
    .map-sheet { padding: 8px; border-width: 5px; }
    .pin-label { font-size: 15px; stroke-width: 4px; }
    .polaroid-wall { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 28px 14px; }
    .wall-polaroid img { height: 140px; }
    /* przyciski mapy pod mapą, żeby jej nie zasłaniały */
    .map-viewport { display: flex; flex-direction: column; gap: 10px; }
    .map-viewport .world-map { order: 1; }
    .map-presets, .map-controls { position: static; max-width: none; justify-content: center; flex-direction: row; flex-wrap: wrap; }
    .map-presets { order: 2; }
    .map-controls { order: 3; margin-bottom: 4px; }
    .map-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .string, .string-shadow { stroke-dashoffset: 0; }
}

/* ---------- TRYB „W TECZCE” (?embed=1) ---------- */
body.page.embed { min-height: 0; background: transparent; }
body.embed .page-main { max-width: none; padding: 6px 4px 16px; }
body.embed .sheet { padding: 26px 22px; margin-bottom: 18px; }
body.embed .board-title { margin-top: 4px; color: var(--ink); }
