/*
 * Fosatós.hu — "1970s panel-block bathroom + restaurant hygiene sticker".
 *
 * Color carries meaning:
 *   mustard = fosatás, pink = flegmázás, mint = clean, alarm red = trouble.
 * Things you act on (search, primary buttons, picked choices, the sticker) carry an ink offset shadow.
 * One typeface (Bricolage Grotesque, variable weight), self-hosted under the SIL OFL.
 */

@font-face {
    font-family: "Bricolage Grotesque";
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

@font-face {
    font-family: "Bricolage Grotesque";
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --tile: #FAFBF8;
    --grout: #E3E9E4;
    --paper: #FFFFFF;
    --paper-2: #F2F5F1;
    --ink: #2A1A12;
    --ink-soft: #6F5E54;
    --line: #E2DDD4;

    --mustard: #E3A920;
    --mustard-ink: #7A5500;
    --pink: #E98BA3;
    --pink-ink: #9E3150;
    --mint: #7FCDB8;
    --mint-ink: #1F6E5B;
    --alarm: #E5322D;
    --on-color: #2A1A12;

    --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --shade: var(--ink);
    --press: 4px 4px 0 var(--shade);
    --footer-bg: var(--ink);
    --footer-fg: var(--tile);
    --ease-out: cubic-bezier(.2, .8, .2, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

    /* Aliases used by admin.css */
    --bg: var(--tile);
    --surface: var(--paper);
    --surface-2: var(--paper-2);
    --text: var(--ink);
    --muted: var(--ink-soft);
    --border: var(--line);
    --strong-border: var(--ink);
    --red: var(--alarm);
    --red-soft: color-mix(in srgb, var(--alarm) 12%, var(--paper));
    --green: var(--mint-ink);
    --teal: var(--mint-ink);
    --orange: var(--mustard);
    --serif: var(--font);
    --sans: var(--font);
    --radius: 14px;
    --shadow: none;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --tile: #1C1310;
        --grout: #2B1F1A;
        --paper: #261A16;
        --paper-2: #30221D;
        --ink: #F6EDE6;
        --ink-soft: #B9A79C;
        --line: #3E2E27;
        --mustard: #F0B52A;
        --mustard-ink: #F5C65A;
        --pink: #F29AB1;
        --pink-ink: #F7A9BE;
        --mint: #8ED9C4;
        --mint-ink: #9BE3CE;
        --alarm: #FF5A4F;
        --shade: #000;
        --press: 4px 4px 0 #000;
        --footer-bg: #120C0A;
        --footer-fg: #F6EDE6;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --tile: #1C1310;
    --grout: #2B1F1A;
    --paper: #261A16;
    --paper-2: #30221D;
    --ink: #F6EDE6;
    --ink-soft: #B9A79C;
    --line: #3E2E27;
    --mustard: #F0B52A;
    --mustard-ink: #F5C65A;
    --pink: #F29AB1;
    --pink-ink: #F7A9BE;
    --mint: #8ED9C4;
    --mint-ink: #9BE3CE;
    --alarm: #FF5A4F;
    --shade: #000;
    --press: 4px 4px 0 #000;
    --footer-bg: #120C0A;
    --footer-fg: #F6EDE6;
    color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    font-weight: 420;
    line-height: 1.5;
    color: var(--ink);
    background: var(--tile);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: inherit; }

svg { max-width: 100%; }

h1, h2, h3 { text-wrap: balance; }

::selection { background: var(--mustard); color: var(--on-color); }

:focus-visible { outline: 3px solid var(--mint-ink); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.muted { color: var(--ink-soft); }

.icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.skip {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--tile);
    border-radius: 10px;
    font-weight: 700;
}

.skip:focus { top: 12px; }

/* ---------- top bar ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--tile) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
}

.topbar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }

.logo__mark { width: 36px; height: 36px; flex: none; transition: transform .4s var(--ease-spring); }

.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.06); }

.logo__mark rect { fill: var(--mustard); stroke: var(--ink); stroke-width: 2; }

.logo__grout { stroke: var(--ink); stroke-width: 1.2; opacity: .25; }

.logo__line { fill: none; stroke: var(--alarm); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

.logo__word { font-weight: 800; font-size: 24px; letter-spacing: -.035em; line-height: 1; white-space: nowrap; }

.logo__word span { color: var(--ink-soft); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 550; }

.nav__link { text-decoration: none; padding: 8px 12px; border-radius: 10px; color: var(--ink-soft); }

.nav__link:hover { color: var(--ink); background: var(--paper-2); }

.dropdown { position: relative; }

.dropdown summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--ink-soft);
    white-space: nowrap;
}

.dropdown summary::-webkit-details-marker { display: none; }

.dropdown summary::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s;
}

.dropdown[open] summary::after { transform: rotate(225deg) translate(-1px, -1px); }

.dropdown summary:hover, .dropdown[open] summary { background: var(--paper-2); color: var(--ink); }

.dropdown__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 14px;
    box-shadow: var(--press);
    transform-origin: top right;
    animation: pop-in .18s var(--ease-out);
}

.dropdown__menu a { display: block; padding: 9px 12px; border-radius: 9px; text-decoration: none; }

.dropdown__menu a:hover { background: var(--paper-2); }

.dropdown__menu a[aria-current="true"] { font-weight: 750; }

.dropdown__code { display: none; font-weight: 700; }

.flag { font-size: 17px; line-height: 1; }

.theme-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-left: 4px;
    border: 2px solid var(--ink);
    border-radius: 12px;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    transition: transform .3s var(--ease-spring);
}

.theme-toggle:hover { transform: rotate(-12deg); }

.theme-toggle .icon { grid-area: 1 / 1; }

.icon--sun { display: none; }

:root[data-theme="dark"] .icon--sun { display: block; }

:root[data-theme="dark"] .icon--moon { display: none; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon--sun { display: block; }
    :root:not([data-theme="light"]) .icon--moon { display: none; }
}

/* ---------- hero: the tiled wall ---------- */

.hero {
    position: relative;
    z-index: 2; /* above the board, so the search dropdown can overlap it */
    overflow-x: clip;
    padding: 56px 0 64px;
    background-color: var(--tile);
    background-image:
        linear-gradient(var(--grout) 2px, transparent 2px),
        linear-gradient(90deg, var(--grout) 2px, transparent 2px);
    background-size: 72px 72px;
    background-position: center -1px;
    border-bottom: 2px solid var(--ink);
}

.hero__chart {
    position: absolute;
    left: 0;
    right: 28px;
    bottom: 0;
    height: 62%;
    pointer-events: none;
}

.hero__chart svg { width: 100%; height: 100%; display: block; animation: draw 1.8s .15s var(--ease-out) both; }

.hero__line { stroke: var(--alarm); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }

.hero__area { fill: var(--alarm); opacity: .07; }

.hero__now {
    position: absolute;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--alarm);
    animation: fade-in .3s 1.8s both;
}

.hero__now::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--alarm);
    animation: ping 2.2s 2.1s var(--ease-out) infinite;
}

.hero__inner { position: relative; text-align: center; }

.live {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 22px;
    padding: 7px 14px 7px 12px;
    font-size: 15px;
    font-weight: 650;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 999px;
}

.live__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--alarm); }

.hero__title {
    font-size: clamp(42px, 7.4vw, 100px);
    font-weight: 800;
    line-height: .94;
    letter-spacing: -.045em;
    margin: 0 auto 36px;
    max-width: 13ch;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: fit-content;
    margin: 0 auto 44px;
}

.stat {
    display: grid;
    gap: 2px;
    min-width: 250px;
    padding: 16px 26px 18px;
    text-align: left;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 18px;
}

.stat--warn { background: var(--mustard); color: var(--on-color); }

.stat__label { font-size: 16px; font-weight: 650; }

.stat__value {
    font-size: clamp(40px, 5vw, 60px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat__unit { font-size: 14px; opacity: .72; }

/* The CTA is printed like a tag stuck onto the search bar. */
.cta {
    position: relative;
    z-index: 2;
    display: inline-block;
    margin: 0 0 -16px;
    padding: .05em .45em .12em;
    font-size: clamp(30px, 4.4vw, 48px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.05;
    color: var(--on-color);
    background: var(--mustard);
    border: 2px solid var(--ink);
    border-radius: 14px;
    transform: rotate(-2.5deg);
}

/* ---------- search ---------- */

.search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 780px;
    margin: 0 auto;
    padding-top: 6px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 22px;
    box-shadow: var(--press);
    transition: box-shadow .2s, transform .2s;
}

.search:focus-within { box-shadow: 6px 6px 0 var(--shade); transform: translate(-2px, -2px); }

.search__icon {
    width: 22px;
    height: 22px;
    margin-left: 16px;
    fill: none;
    stroke: var(--ink-soft);
    stroke-width: 2.2;
    flex: none;
}

.search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 18px 12px;
    font: inherit;
    font-size: 19px;
    font-weight: 500;
    color: var(--ink);
    outline: none;
}

.search__input::placeholder { color: var(--ink-soft); opacity: .85; }

.search__input::-webkit-search-cancel-button { display: none; }

.search__kbd {
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    padding: 2px 8px;
    border: 1.5px solid var(--line);
    border-bottom-width: 3px;
    border-radius: 7px;
}

/* Optional city, the first compartment of the same bar. */
.search__city {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 210px;
    min-width: 0;
    margin-left: 10px;
    padding-right: 4px;
    border-right: 2px solid var(--line);
}

.search__locate {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.search__locate:hover { background: color-mix(in srgb, var(--mustard) 28%, var(--paper)); }

.search__locate:hover .search__pin { stroke: var(--ink); }

.search__locate.is-busy .search__pin { stroke: var(--mustard-ink); animation: bob .7s ease-in-out infinite alternate; }

.search__pin {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: var(--ink-soft);
    stroke-width: 2.2;
}

.search__city-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 18px 6px;
    font: inherit;
    font-size: 17px;
    font-weight: 650;
    color: var(--ink);
    outline: none;
}

.search__city-input::placeholder { color: var(--ink-soft); font-weight: 500; opacity: .85; }

.search__clear {
    flex: none;
    padding: 2px 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.search__clear:hover { color: var(--ink); background: var(--line); }

/* The button is a mustard sticker with its own ink shadow, so it reads as "press me" even on a phone. */
.search__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    margin: 6px 9px 9px 12px;
    padding: 12px 22px;
    border: 2px solid var(--ink);
    border-radius: 15px;
    background: var(--mustard);
    color: var(--on-color);
    box-shadow: 3px 3px 0 var(--shade);
    font: inherit;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}

.search__btn-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.8;
    stroke-linecap: round;
    flex: none;
}

.search__btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shade); }

.search__btn:hover .search__btn-icon { animation: pop .4s ease-out; }

.search__btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shade); }

/* On the home page the bar nudges now and then until someone starts typing. */
.search--hero { animation: halo 3.2s ease-out 1.2s infinite; }

.search--hero .search__btn { animation: nudge 3.2s ease-in-out 1.2s infinite; }

.search--hero:focus-within,
.search--hero:focus-within .search__btn,
.search--hero:hover .search__btn { animation: none; }

@keyframes nudge {
    0%, 70%, 100% { transform: none; }
    76% { transform: translateY(-3px) rotate(-4deg); }
    82% { transform: translateY(0) rotate(3deg); }
    88% { transform: translateY(-1px) rotate(-2deg); }
    94% { transform: none; }
}

@keyframes halo {
    0%, 66% { box-shadow: var(--press), 0 0 0 0 color-mix(in srgb, var(--mustard) 70%, transparent); }
    100% { box-shadow: var(--press), 0 0 0 16px color-mix(in srgb, var(--mustard) 0%, transparent); }
}

.search__list {
    position: absolute;
    left: -2px;
    right: -2px;
    top: calc(100% + 10px);
    z-index: 30;
    margin: 0;
    padding: 6px;
    list-style: none;
    text-align: left;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 18px;
    box-shadow: var(--press);
    animation: pop-in .16s var(--ease-out);
    transform-origin: top center;
}

.search__list a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
}

.search__list a:hover { background: color-mix(in srgb, var(--mustard) 28%, var(--paper)); }

/* The keyboard-selected item must be unmistakable, so it gets the solid mustard fill. */
.search__list a.is-active { background: var(--mustard); color: var(--on-color); box-shadow: inset 0 0 0 2px var(--ink); }

.search__list a.is-active small { color: var(--on-color); opacity: .8; }

.search__list a.is-active.search__more { color: var(--on-color); }

.search__list small { color: var(--ink-soft); font-weight: 450; white-space: nowrap; }

.search__list .search__more { color: var(--mustard-ink); }

/* The city dropdown hangs from the city compartment, lined up with the bar's outer edge. */
.search__list--city { left: -12px; right: auto; top: calc(100% + 12px); min-width: 290px; }

.search__list button {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.search__list button:hover { background: color-mix(in srgb, var(--mustard) 28%, var(--paper)); }

.search__list button.is-active { background: var(--mustard); color: var(--on-color); box-shadow: inset 0 0 0 2px var(--ink); }

.search__list button.is-active small { color: var(--on-color); opacity: .8; }

/* Two lines per hit: name (+ report count), then the address that tells same-name chains apart. */
.search__list a.search__hit { display: grid; grid-template-columns: 1fr auto; gap: 1px 12px; }

.search__list a.search__hit small { grid-column: 1 / -1; white-space: normal; }

.search__list em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

.search__list a.is-active em { color: var(--on-color); }

/* ---------- board ---------- */

.board { padding: 48px 0 72px; }

.switch {
    --or: 3.6em;
    position: relative;
    display: grid;
    grid-template-columns: 1fr var(--or) 1fr;
    align-items: center;
    width: min(440px, 100%);
    margin: 0 auto 10px;
    padding: 5px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 999px;
}

.switch::before {
    content: "";
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc((100% - 10px - var(--or)) / 2);
    border-radius: 999px;
    background: var(--mustard);
    border: 2px solid var(--ink);
    transition: transform .45s var(--ease-spring), background-color .3s;
}

.switch[data-active="flegma"]::before { transform: translateX(calc(100% + var(--or))); background: var(--pink); }

.switch__btn {
    position: relative;
    z-index: 1;
    padding: 11px 10px;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -.01em;
    border-radius: 999px;
    color: var(--ink-soft);
    transition: color .25s;
}

.switch__btn[aria-selected="true"] { color: var(--on-color); }

.switch__or { position: relative; z-index: 1; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-soft); }

.board__note { text-align: center; color: var(--ink-soft); font-size: 15px; margin: 0 0 36px; }

.panel-board { --cat: var(--mustard); --cat-ink: var(--mustard-ink); }

.panel-board--flegma { --cat: var(--pink); --cat-ink: var(--pink-ink); }

.row {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    align-items: start;
    padding: 22px 0;
    border-top: 2px dashed var(--line);
}

.row:first-child { border-top: 0; padding-top: 0; }

.row__head { display: grid; gap: 6px; justify-items: start; padding-top: 10px; }

.row__title {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1;
    overflow-wrap: anywhere;
}

.row--top .row__title { font-size: 44px; }

.row__count {
    font-size: 14px;
    font-weight: 650;
    padding: 2px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cat) 28%, transparent);
    color: var(--cat-ink);
}

.row__cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.row--top .row__cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 168px;
    padding: 14px 16px 12px;
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-bottom-width: 4px;
    border-radius: 14px;
    text-decoration: none;
    transition: transform .25s var(--ease-spring), border-color .2s;
}

a.tile:hover { transform: translateY(-4px) rotate(-.6deg); border-color: var(--ink); }

a.tile:active { transform: translateY(-1px); }

.tile__top { display: flex; justify-content: space-between; align-items: center; min-height: 22px; gap: 8px; }

.tile__rank { font-size: 14px; font-weight: 750; color: var(--cat-ink); }

.tile__hot {
    margin-left: auto;
    font-size: 12px;
    font-weight: 750;
    padding: 2px 9px;
    border-radius: 7px;
    background: var(--alarm);
    color: #fff;
}

.tile__name {
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -.02em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.tile__meta { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 14px; color: var(--ink-soft); }

.tile__meta strong { color: var(--ink); font-weight: 650; }

.tile .spark { margin-top: auto; }

.tile--lead { grid-column: span 2; background: var(--cat); border-color: var(--ink); color: var(--on-color); }

.tile--lead .tile__name { font-size: 30px; letter-spacing: -.035em; }

.tile--lead .tile__rank, .tile--lead .tile__meta, .tile--lead .tile__meta strong { color: var(--on-color); }

.tile--lead .spark { height: 72px; }

.tile--lead .spark__line, .tile--lead.is-hot .spark__line { stroke: var(--on-color); }

.tile--lead .spark__area { fill: var(--on-color); opacity: .12; }

.tile--empty { border: 1.5px dashed var(--line); background: transparent; min-height: 168px; }

.spark { width: 100%; height: 52px; display: block; overflow: visible; }

.spark__line { stroke: var(--cat); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }

.spark__area { fill: var(--cat); opacity: .16; }

.is-hot .spark__line { stroke: var(--alarm); }

.is-hot .spark__area { fill: var(--alarm); }

/* Played only when switching categories, as feedback for the click. */
.panel-board.is-entering .tile { animation: tile-in .45s var(--ease-out) both; }

.panel-board.is-entering .row:nth-child(2) .tile { animation-delay: .05s; }

.panel-board.is-entering .row:nth-child(3) .tile { animation-delay: .1s; }

.panel-board.is-entering .row:nth-child(n+4) .tile { animation-delay: .15s; }

.empty {
    max-width: 34em;
    margin: 0 auto;
    text-align: center;
    color: var(--ink-soft);
    padding: 36px 16px;
    font-size: 19px;
}

.favorites { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: -16px 0 32px; }

.favorites a {
    padding: 6px 14px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}

.favorites a::before { content: "★ "; color: var(--mustard); }

/* ---------- place page ---------- */

.place { max-width: 1040px; padding-top: 24px; padding-bottom: 72px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; margin-bottom: 20px; color: var(--ink-soft); }

.crumbs a { text-decoration: none; font-weight: 550; }

.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.crumbs [aria-current] { color: var(--ink); font-weight: 650; }

.door {
    --level: var(--mint);
    --level-ink: var(--mint-ink);
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 36px;
    align-items: center;
    padding: 36px;
    margin-bottom: 20px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 26px;
}

.door--some { --level: var(--mustard); --level-ink: var(--mustard-ink); }

.door--alert { --level: var(--alarm); --level-ink: var(--alarm); }

.sticker {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    width: 210px;
    aspect-ratio: 1;
    padding: 18px;
    text-align: center;
    color: var(--on-color);
    background: var(--level);
    border: 3px solid var(--ink);
    border-radius: 34px;
    box-shadow: 6px 6px 0 var(--shade);
    transform: rotate(-4deg);
    animation: slap .6s .1s var(--ease-spring) both;
}

.door--alert .sticker { color: #fff; }

.sticker__icon { font-size: 60px; line-height: 1.1; }

.sticker__word { font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }

.sticker__caption { font-size: 12px; font-weight: 550; line-height: 1.3; opacity: .85; margin-top: 6px; }

.door__name { margin: 0 0 8px; font-size: clamp(34px, 5vw, 58px); font-weight: 800; letter-spacing: -.045em; line-height: .98; padding-right: 40px; }

.door__status { margin: 0 0 20px; font-size: clamp(19px, 2.2vw, 24px); font-weight: 600; line-height: 1.3; color: var(--level-ink); max-width: 30em; }

.door__counts { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; }

.count {
    display: flex;
    flex-direction: row-reverse;
    align-items: baseline;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--c) 22%, transparent);
}

.count--fos { --c: var(--mustard); }

.count--flegma { --c: var(--pink); }

.count dt { font-size: 14px; font-weight: 600; color: var(--ink-soft); }

.count dd { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }

.door__meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--ink-soft); font-size: 15px; }

.door__meta li { display: flex; gap: 8px; align-items: center; }

.fav {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    cursor: pointer;
    transition: border-color .2s;
}

.fav:hover { border-color: var(--ink); }

.fav svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }

.fav[aria-pressed="true"] svg { fill: var(--mustard); stroke: var(--ink); animation: pop .4s var(--ease-spring); }

.sheet, .panel { padding: 26px; margin-bottom: 20px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 22px; }

.sheet__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }

.sheet__title { margin: 0; font-size: 21px; font-weight: 750; letter-spacing: -.02em; }

.chart { width: 100%; height: auto; display: block; overflow: visible; }

.chart__series { animation: draw 1.2s .3s var(--ease-out) both; }

.chart__grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 6; }

.chart__line { stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }

.chart__series--fos { --c: var(--mustard); }

.chart__series--flegma { --c: var(--pink); }

.chart__line { stroke: var(--c); }

.chart__area { fill: var(--c); opacity: .14; }

.chart__dot { fill: var(--c); stroke: var(--paper); stroke-width: 2.5; }

.chart__label { fill: var(--ink-soft); font-size: 13px; font-family: var(--font); font-weight: 500; }

.legend { display: flex; gap: 18px; font-size: 15px; font-weight: 600; }

.legend__item::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 7px;
    vertical-align: -1px;
    border-radius: 4px;
    background: var(--mustard);
}

.legend__item--flegma::before { background: var(--pink); }

.report__title { margin: 0; text-align: center; font-size: clamp(24px, 3vw, 32px); font-weight: 750; letter-spacing: -.03em; line-height: 1.1; }

.report__title span {
    display: inline-block;
    padding: 0 .3em .05em;
    background: var(--mustard);
    color: var(--on-color);
    border-radius: 10px;
    transform: rotate(-2deg);
}

.report__hint { text-align: center; color: var(--ink-soft); margin: 10px 0 24px; font-size: 16px; }

.report__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.report__col { border: 0; margin: 0; padding: 0; min-width: 0; --cat: var(--mustard); }

.report__col--flegma { --cat: var(--pink); }

.report__col legend { font-size: 20px; font-weight: 750; letter-spacing: -.02em; margin-bottom: 12px; padding: 0; }

.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.choice {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 6px;
    min-height: 118px;
    padding: 14px 8px;
    text-align: center;
    background: var(--paper-2);
    border: 2px solid transparent;
    border-radius: 18px;
    cursor: pointer;
    user-select: none;
    transition: transform .25s var(--ease-spring), border-color .2s, background-color .2s, box-shadow .2s;
}

.choice:hover { border-color: var(--ink); transform: translateY(-2px); }

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice__icon { font-size: 38px; line-height: 1; transition: transform .35s var(--ease-spring); }

.choice__label { font-size: 15px; font-weight: 650; line-height: 1.2; }

.choice__count {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 24px;
    padding: 1px 7px;
    font-size: 12px;
    font-weight: 750;
    border-radius: 999px;
    background: var(--paper);
    border: 1.5px solid var(--line);
}

.choice:has(input:checked) {
    background: var(--cat);
    color: var(--on-color);
    border-color: var(--ink);
    box-shadow: 4px 4px 0 var(--shade);
    transform: translate(-2px, -2px);
}

.choice:has(input:checked) .choice__icon { transform: scale(1.2) rotate(-8deg); }

.choice:has(input:focus-visible) { outline: 3px solid var(--mint-ink); outline-offset: 3px; }

/* Optional fields slide open once a choice is picked (JS adds .is-open). */
.report__extra { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--ease-out); }

.js .report__extra:not(.is-open) { grid-template-rows: 0fr; }

.report__extra-inner { overflow: hidden; }

.report__fields { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; padding-top: 24px; }

.report__send { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; }

.report__disclaimer { font-size: 13px; color: var(--ink-soft); margin: 22px auto 0; text-align: center; max-width: 60em; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field { display: grid; gap: 6px; font-size: 14px; }

.field > span { font-weight: 650; }

.field input, .field textarea, .field select, .filters input, .inline-form select {
    font: inherit;
    font-size: 16px;
    padding: 11px 14px;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    color: var(--ink);
    width: 100%;
    transition: border-color .15s;
}

.field textarea { resize: vertical; }

.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }

.btn {
    display: inline-block;
    font: inherit;
    font-weight: 700;
    padding: 11px 20px;
    border: 2px solid var(--ink);
    border-radius: 13px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}

.btn--primary { background: var(--ink); color: var(--tile); box-shadow: 4px 4px 0 var(--mustard); }

.btn--primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--mustard); }

.btn--primary:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--mustard); }

.btn--big { font-size: 19px; padding: 15px 30px; border-radius: 16px; }

.btn:disabled { opacity: .6; cursor: progress; }

.alert { padding: 14px 18px; border-radius: 14px; margin: 0 0 18px; font-weight: 550; }

.alert--ok { background: color-mix(in srgb, var(--mint) 35%, var(--paper)); color: var(--ink); border: 2px solid var(--mint-ink); }

.alert--error { background: color-mix(in srgb, var(--alarm) 12%, var(--paper)); color: var(--ink); border: 2px solid var(--alarm); }

.alert--info { background: var(--paper); border: 1.5px solid var(--line); color: var(--ink-soft); }

.comments { margin-top: 8px; }

.comments > summary {
    display: flex;
    width: fit-content;
    margin: 0 auto;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    padding: 12px 22px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    list-style: none;
    transition: transform .2s var(--ease-spring);
}

.comments > summary::-webkit-details-marker { display: none; }

.comments > summary:hover { transform: scale(1.03); }

.comments__n { min-width: 26px; padding: 0 8px; border-radius: 999px; background: var(--mustard); color: var(--on-color); text-align: center; font-size: 15px; }

.comments[open] .comments__list { animation: slide-down .35s var(--ease-out); }

.comments__list { display: grid; gap: 12px; margin-top: 18px; }

.comments__list > .muted { text-align: center; }

.comment {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: 18px;
    padding: 16px 18px;
}

.comment header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; }

.comment time { color: var(--ink-soft); margin-left: auto; font-size: 14px; }

.comment p { margin: 6px 0 0; overflow-wrap: anywhere; max-width: 68ch; }

.avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-weight: 800;
    font-size: 18px;
    color: var(--on-color);
    border: 2px solid var(--ink);
    background: var(--mustard);
}

.avatar--1 { background: var(--pink); }

.avatar--2 { background: var(--mint); }

.avatar--3 { background: var(--grout); color: var(--ink); }

.tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--paper-2);
}

.tag--fos { background: color-mix(in srgb, var(--mustard) 30%, transparent); }

.tag--flegma { background: color-mix(in srgb, var(--pink) 30%, transparent); }

/* ---------- generic pages ---------- */

.page { max-width: 880px; padding-top: 32px; padding-bottom: 72px; }

.page--text { max-width: 980px; }

.page--text p { font-size: 18px; line-height: 1.65; max-width: 64ch; }

.page--text a { color: var(--mustard-ink); font-weight: 650; }

.page--text h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: 56px 0 20px; }

.page--text .lead {
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.2;
    max-width: 26ch;
    margin: 0 0 24px;
}

.page--text .signoff { margin-top: 48px; font-size: 20px; font-weight: 650; }

/* A real sequence, so the numbers carry meaning. */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.steps li {
    counter-increment: step;
    position: relative;
    padding: 58px 20px 20px;
    font-size: 16px;
    line-height: 1.55;
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-bottom-width: 4px;
    border-radius: 18px;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    top: 16px;
    left: 20px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    font-weight: 800;
    border-radius: 10px;
    background: var(--ink);
    color: var(--tile);
}

.steps strong { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }

.plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.plate {
    --c: var(--mint);
    padding: 22px;
    color: var(--on-color);
    background: var(--c);
    border: 2px solid var(--ink);
    border-radius: 20px;
}

.plate--mustard { --c: var(--mustard); }

.plate--pink { --c: var(--pink); }

.plate--off { background: var(--paper); color: var(--ink); border-style: dashed; }

.plate__icon { font-size: 40px; line-height: 1; display: block; margin-bottom: 12px; }

.plate h3 { margin: 0 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -.025em; }

.page--text .plate p { font-size: 16px; line-height: 1.5; margin: 0; }

.page--text .plate .plate__price { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 0 0 12px; }

.plate--off .plate__price { text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: var(--alarm); }

.faq { display: grid; gap: 10px; }

.faq details { background: var(--paper); border: 1.5px solid var(--line); border-radius: 16px; transition: border-color .2s; }

.faq details[open] { border-color: var(--ink); }

.faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.015em;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "+";
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    font-size: 20px;
    font-weight: 700;
    border-radius: 9px;
    background: var(--paper-2);
    transition: transform .3s var(--ease-spring);
}

.faq details[open] summary::after { transform: rotate(45deg); background: var(--mustard); color: var(--on-color); }

.faq details[open] p { animation: slide-down .3s var(--ease-out); }

.page--text .faq p { margin: 0; padding: 0 20px 18px; font-size: 17px; }

.page--center { text-align: center; }

.page__title { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -.045em; line-height: 1; margin: 28px 0 20px; }

.page--404 .flush { font-size: 110px; line-height: 1; margin-top: 40px; display: inline-block; cursor: pointer; }

.page--404 .flush:hover { animation: flush 1s var(--ease-out); }

.results { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }

.result {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 14px;
    padding: 16px 20px;
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-bottom-width: 4px;
    border-radius: 16px;
    text-decoration: none;
    transition: transform .2s var(--ease-spring), border-color .2s;
}

.result:hover { border-color: var(--ink); transform: translateX(4px); }

.result__name { font-weight: 750; font-size: 20px; letter-spacing: -.02em; }

.result__addr { grid-column: 1; color: var(--ink-soft); font-size: 15px; }

.result__area { font-weight: 700; color: var(--ink); }

.result__area::before { content: "· "; font-weight: 400; color: var(--ink-soft); }

.badge {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--on-color);
    background: var(--mustard);
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ---------- footer ---------- */

.footer { background: var(--footer-bg); color: var(--footer-fg); padding: 34px 0; font-size: 15px; }

.footer__inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }

.footer__brand .logo__word { font-size: 30px; }

.footer__brand .logo__word span { color: inherit; opacity: .6; }

.footer p { margin: 8px 0 0; opacity: .75; max-width: 42ch; }

.footer__side { display: flex; flex-direction: column; align-items: flex-end; gap: 22px; }

.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }

.footer__links a { text-decoration: none; font-weight: 600; opacity: .85; }

.footer__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.tp-button { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 12px; border-radius: 14px; background: var(--mustard); color: var(--on-color); text-decoration: none; box-shadow: 4px 4px 0 var(--footer-fg); transform: rotate(-1.5deg); transition: transform .2s var(--ease-spring), box-shadow .2s var(--ease-out); }

.tp-button:hover { transform: rotate(0) translate(-2px, -2px); box-shadow: 6px 6px 0 var(--footer-fg); }

.tp-button:hover .tp-button__icon { transform: rotate(-20deg) scale(1.1); }

.tp-button:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--footer-fg); }

.tp-button__icon { font-size: 30px; line-height: 1; transition: transform .3s var(--ease-spring); }

.tp-button__label { display: block; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }

.tp-button__caption { display: block; font-size: 12px; font-weight: 550; opacity: .8; }

@media (max-width: 640px) { .footer__side { align-items: flex-start; } }

@media (prefers-reduced-motion: reduce) { .tp-button, .tp-button__icon { transition: none; } }

/* ---------- confetti (after a successful report) ---------- */

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }

.confetti span { position: absolute; top: -60px; font-size: 28px; animation: fall var(--t, 2.4s) var(--d, 0s) cubic-bezier(.3, .6, .4, 1) forwards; }

/* ---------- keyframes ---------- */

@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

@keyframes fade-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }

@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 80%, 100% { transform: scale(2.2); opacity: 0; } }

@keyframes bob { to { transform: translateY(-4px); } }

@keyframes pop-in { from { opacity: 0; transform: scale(.94) translateY(-4px); } to { opacity: 1; transform: none; } }

@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(-12deg); } 100% { transform: scale(1); } }

@keyframes tile-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@keyframes slap {
    0% { opacity: 0; transform: scale(1.5) rotate(8deg); }
    60% { opacity: 1; transform: scale(.94) rotate(-5deg); }
    100% { transform: scale(1) rotate(-4deg); }
}

@keyframes flush { to { transform: rotate(720deg) scale(.2); opacity: 0; } }

@keyframes fall {
    0% { transform: translate(0, 0) rotate(0); opacity: 1; }
    100% { transform: translate(var(--x, 0), 110vh) rotate(var(--r, 360deg)); opacity: .9; }
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
    .row { grid-template-columns: 1fr; gap: 12px; }
    .row__head { grid-auto-flow: column; align-items: baseline; justify-content: start; gap: 12px; padding-top: 0; }
    .row--top .row__title { font-size: 34px; }
    .tile--empty { display: none; }

    /* Cards become a swipeable strip. */
    .row__cards, .row--top .row__cards {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(220px, 42%);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 4px 16px 12px;
        margin: 0 -16px;
        scrollbar-width: none;
    }
    .row__cards::-webkit-scrollbar { display: none; }
    .tile { scroll-snap-align: start; scroll-margin-left: 16px; }
    .tile--lead { grid-column: auto; }

    .steps, .plates { grid-template-columns: 1fr; }
    .door { grid-template-columns: 1fr; gap: 24px; padding: 26px; }
    .sticker { width: 170px; justify-self: start; }
}

@media (max-width: 700px) {
    body { font-size: 16px; }
    .hide-sm { display: none; }
    .nav { gap: 0; }
    .dropdown summary { padding: 8px; }
    .dropdown__label { display: none; }
    .dropdown__code { display: inline; }
    .logo__word { font-size: 21px; }
    .hero { padding: 36px 0 48px; background-size: 56px 56px; }
    /* Search comes first on a phone; the numbers follow below it. */
    .hero__inner { display: flex; flex-direction: column; align-items: center; }
    .hero__title { margin-bottom: 28px; }
    .cta { margin-bottom: -6px; }
    .search { align-self: stretch; }
    .stats { order: 1; gap: 10px; width: 100%; margin: 32px 0 0; }
    .stat { min-width: 0; padding: 12px 14px 14px; border-radius: 16px; align-content: start; }
    .stat__label { font-size: 14px; line-height: 1.2; hyphens: auto; }
    .stat__value { font-size: 36px; margin-top: 4px; }
    .stat__unit { font-size: 12.5px; line-height: 1.25; }
    .search__kbd { display: none; }
    .search__btn { padding: 11px 15px; }
    .search__input { font-size: 16px; padding: 15px 8px; }
    /* The city gets its own top row; the place name and the button share the second. */
    .search { flex-wrap: wrap; }
    .search__city { flex: 1 1 100%; margin-left: 0; padding: 0 6px 0 10px; border-right: 0; border-bottom: 2px solid var(--line); }
    .search__city-input { font-size: 16px; padding: 12px 8px; }
    .search__list--city { left: -2px; right: -2px; min-width: 0; }
    .row__cards, .row--top .row__cards { grid-auto-columns: 74%; }
    .report__cols { grid-template-columns: 1fr; }
    .report__fields { grid-template-columns: 1fr; }
    .choice { min-height: 100px; }
    .choice__icon { font-size: 32px; }
    .choice__label { font-size: 14px; }
    .sheet { padding: 20px 16px; }
    .door { padding: 22px 18px; }
    .sticker { width: 150px; border-radius: 28px; }
    .sticker__icon { font-size: 44px; }
    .sticker__word { font-size: 27px; }
    .sticker__caption { display: none; }
    .fav { top: 14px; right: 14px; }
}

@media (max-width: 380px) {
    /* Too narrow for the word, but the button stays: just the magnifier. */
    .search__btn { padding: 11px 12px; margin-left: 6px; }
    .search__btn-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .confetti { display: none; }
}

/* ---------- map ---------- */

.nav__link--map { display: inline-flex; align-items: center; gap: 6px; }

.nav__link--map[aria-current="page"] { color: var(--ink); background: var(--paper-2); }

/* isolate: keeps Leaflet's pane/control z-indexes (400–1000) inside the map, below the top bar's dropdowns. */
.map-page { position: relative; isolation: isolate; }

/* Grout grid shows while tiles load, so the empty map still reads as the bathroom wall. */
.map {
    height: calc(100svh - 66px);
    min-height: 480px;
    background-color: var(--tile);
    background-image:
        linear-gradient(var(--grout) 2px, transparent 2px),
        linear-gradient(90deg, var(--grout) 2px, transparent 2px);
    background-size: 72px 72px;
    border-bottom: 2px solid var(--ink);
    font-family: var(--font);
}

/* OSM tiles, washed into the warm 70s palette; the dark theme inverts them into a dim, brown map. */
.map .leaflet-tile-pane { filter: grayscale(.6) sepia(.28) saturate(1.15) brightness(1.04) contrast(.9); }

:root[data-theme="dark"] .map .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) grayscale(.55) sepia(.35) brightness(.78) contrast(.92);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .map .leaflet-tile-pane {
        filter: invert(1) hue-rotate(180deg) grayscale(.55) sepia(.35) brightness(.78) contrast(.92);
    }
}

.map-page.is-loading .map-panel__status { opacity: .5; }

.map .leaflet-bar { border: 2px solid var(--ink); border-radius: 12px; box-shadow: var(--press); overflow: hidden; }

.map .leaflet-bar a {
    width: 36px;
    height: 36px;
    background: var(--paper);
    color: var(--ink);
    border-bottom-color: var(--line);
    font: 700 20px/34px var(--font);
}

.map .leaflet-bar a:hover { background: var(--mustard); color: var(--on-color); }

.map .leaflet-control-attribution { background: color-mix(in srgb, var(--paper) 85%, transparent); color: var(--ink-soft); font-size: 11px; }

.map .leaflet-control-attribution a { color: var(--ink); }

/* Floating panel: a card stuck on the wall. */
.map-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 900;
    width: 330px;
    max-height: calc(100% - 40px);
    overflow-y: auto;
    padding: 18px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 20px;
    box-shadow: var(--press);
}

.map-panel__title { margin: 0 0 14px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }

.map-panel__status { margin: 12px 0 0; font-size: 14px; color: var(--ink-soft); transition: opacity .2s; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.chip {
    padding: 6px 12px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--paper-2);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: transform .15s var(--ease-spring), background .15s;
}

.chip:hover { border-color: var(--ink); }

.chip:active { transform: scale(.95); }

.chip[aria-pressed="true"] { background: var(--ink); color: var(--tile); border-color: var(--ink); }

.chip--fos[aria-pressed="true"] { background: var(--mustard); color: var(--on-color); }

.chip--flegma[aria-pressed="true"] { background: var(--pink); color: var(--on-color); }

.map-locate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
    padding: 12px 16px;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: var(--ink);
    color: var(--tile);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--mustard);
    transition: transform .15s, box-shadow .15s;
}

.map-locate:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--mustard); }

.map-locate:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--mustard); }

.map-locate:disabled { opacity: .7; cursor: progress; }

.map-locate:disabled .icon { animation: bob .7s ease-in-out infinite alternate; }

.nearby { margin-top: 14px; padding-top: 12px; border-top: 2px dashed var(--line); }

.nearby__title { margin: 0 0 6px; font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }

.nearby__list { list-style: none; margin: 0; padding: 0; }

.nearby__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 6px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}

.nearby__item:hover { background: color-mix(in srgb, var(--mustard) 22%, var(--paper)); }

.nearby__dot { flex: none; width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 4px; background: var(--mustard); }

.nearby__dot--flegma { background: var(--pink); }

.nearby__name { flex: 1; min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nearby__dist { flex: none; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* Markers: little hygiene stickers, tilted like they were slapped on. */
.pin-wrap { background: none; border: 0; }

.pin {
    --size: 34px;
    position: relative;
    display: grid;
    place-items: center;
    width: var(--size);
    height: var(--size);
    font-size: calc(var(--size) * .52);
    line-height: 1;
    background: var(--mustard);
    border: 2px solid var(--ink);
    border-radius: 30%;
    box-shadow: 3px 3px 0 var(--shade);
    transform: rotate(-6deg);
    transition: transform .2s var(--ease-spring);
    animation: pin-in .35s var(--ease-spring) both;
}

.pin--flegma { background: var(--pink); transform: rotate(5deg); }

.pin:hover { transform: rotate(0) scale(1.15); }

.pin__count {
    position: absolute;
    top: -9px;
    right: -11px;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    font-size: 12px;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 999px;
}

.pin.is-hot .pin__count { color: #fff; background: var(--alarm); }

/* A pile: the same sticker with two more peeking out underneath, showing how many places it holds. */
.pin--stack {
    border-radius: 26%;
    font-size: calc(var(--size) * .4);
    font-weight: 800;
    color: var(--on-color);
    box-shadow: 4px 4px 0 var(--paper), 6px 6px 0 var(--ink), 9px 9px 0 var(--paper), 11px 11px 0 var(--ink);
    cursor: zoom-in;
}

@keyframes pin-in { from { opacity: 0; scale: .3; } }

/* The visitor: a mint dot with the same "live" ping as the hero. */
.me { background: none; border: 0; }

.me span {
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
    background: var(--mint);
    border: 3px solid var(--ink);
    border-radius: 50%;
}

.me span::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid var(--mint-ink);
    animation: ping 1.8s var(--ease-out) infinite;
}

.map .leaflet-popup-content-wrapper {
    background: var(--paper);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 16px;
    box-shadow: var(--press);
}

.map .leaflet-popup-tip { background: var(--paper); border: 2px solid var(--ink); box-shadow: none; }

.map .leaflet-popup-content { margin: 14px 16px; font-size: 15px; line-height: 1.35; }

.map .leaflet-container a.leaflet-popup-close-button { color: var(--ink-soft); font-size: 20px; top: 6px; right: 6px; }

.popup { display: grid; gap: 4px; font-family: var(--font); }

.popup__name { font-size: 18px; font-weight: 750; letter-spacing: -.02em; padding-right: 14px; }

.popup__addr { color: var(--ink-soft); font-size: 14px; }

.popup__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }

.tag { padding: 2px 9px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--on-color); }

.tag--fos { background: var(--mustard); }

.tag--flegma { background: var(--pink); }

.map .popup__link { font-weight: 750; color: var(--mustard-ink); text-decoration: none; }

.map .popup__link:hover { text-decoration: underline; }

.map-noscript { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; }

/* On phones the panel becomes a bottom sheet and the zoom buttons move up out of its way. */
@media (max-width: 700px) {
    .map { height: calc(100svh - 58px); }
    .map-panel { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; max-height: 52%; padding: 14px; border-radius: 18px; }
    .map-panel__title { font-size: 18px; margin-bottom: 10px; }
    .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .chip { flex: none; }
    .map .leaflet-bottom.leaflet-right { bottom: auto; top: 0; }
}
