/* Slavičínská – budovatelská hra v barvách pražských smaltovaných cedulí:
   červená uliční tabule, modrá domovní čísla, žluté světlo lamp. */

@font-face {
  font-family: 'Sofia Sans';
  font-style: normal;
  font-weight: 1 1000;
  font-display: swap;
  src: url('/fonts/sofia-sans/sofia-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sofia Sans';
  font-style: normal;
  font-weight: 1 1000;
  font-display: swap;
  src: url('/fonts/sofia-sans/sofia-sans-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Sofia Sans Condensed';
  font-style: normal;
  font-weight: 1 1000;
  font-display: swap;
  src: url('/fonts/sofia-sans-condensed/sofia-sans-condensed-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sofia Sans Condensed';
  font-style: normal;
  font-weight: 1 1000;
  font-display: swap;
  src: url('/fonts/sofia-sans-condensed/sofia-sans-condensed-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Barvy a míry ------------------------------------------------------
   Web je postavený jako budovatelská hra pro dospělé: ulice je herní plocha, obsah leží
   v oknech, dole běží stavový řádek. Linky jsou tenké, stíny měkké, žlutá jen tam, kde něco čeká.
   Tmavý vzhled se řídí systémem; přepínač v řádku ho umí přebít (data-theme na <html>). */

:root {
  color-scheme: light;
  --ground: #e7e9e4;      /* omítka – herní plocha */
  --surface: #ffffff;     /* smalt – tělo okna */
  --surface-2: #f2f3ef;   /* zapuštěná plocha */
  --field: #ffffff;       /* pole formuláře */
  --text: #17233b;
  --muted: #4c576d;
  --line: #dcdfe3;
  --edge: #8f9aac;
  --frame: #c6ccd4;       /* obrys oken */
  --outline: #26324c;     /* linka kreseb */
  --chrome: #17233b;      /* lišty hry: stavový řádek, nástroje mapy */
  --chrome-2: #24304c;
  --pill: #24304c;        /* vybraná záložka a rubrika */
  --chrome-muted: #b9c5dc;
  --sign: #be1622;        /* uliční cedule */
  --sign-soft: #fbe4e2;
  --sign-ink: #7c1017;
  --number: #1e4c9a;      /* domovní číslo */
  --number-dark: #173d7d;
  --number-deep: #102c5e;
  --number-soft: #e6eefb;
  --meter: #1e4c9a;       /* výplň ukazatelů */
  --link: #1e4c9a;
  --link-hover: #173d7d;
  --lamp: #f2b21b;        /* světlo lampy – „čeká na vás“ a „vybráno“ */
  --lamp-deep: #a87200;
  --lamp-soft: #fdf3d3;
  --lamp-ink: #6b4a00;
  --lamp-line: #e9cf86;
  --on-lamp: #1b2436;     /* text na žluté – stejný ve dne i v noci */
  --paid: #1f7a4c;
  --paid-soft: #e3f2e8;
  --paid-ink: #134a2f;
  --night: #0e1627;
  --track: #e1e4e8;
  --show-moon: block;
  --show-sun: none;

  --body: 'Sofia Sans', system-ui, sans-serif;
  --display: 'Sofia Sans Condensed', 'Sofia Sans', system-ui, sans-serif;

  --r-plate: 5px;         /* cedulky a štítky */
  --r-ctl: 8px;           /* tlačítka a pole */
  --r-win: 12px;          /* okna */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --drop: 0 1px 2px rgb(23 35 59 / 0.06), 0 12px 28px -18px rgb(23 35 59 / 0.35);
  --press: inset 0 -2px 0 rgb(0 0 0 / 0.16), 0 1px 2px rgb(23 35 59 / 0.12);
  --press-quiet: inset 0 -2px 0 rgb(23 35 59 / 0.06), 0 1px 2px rgb(23 35 59 / 0.06);

  --bar: 4rem;         /* spodní lišta na telefonu */
  --foot: 3rem;           /* stavový řádek na počítači */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --ground: #0b121d;
    --surface: #162033; --surface-2: #101829; --field: #0c1422;
    --text: #e9edf5; --muted: #a5b1c9; --line: #2b3852; --edge: #5b6a8e;
    --frame: #2a364f; --outline: #05080e;
    --drop: 0 1px 2px rgb(0 0 0 / 0.4), 0 14px 30px -18px rgb(0 0 0 / 0.8);
    --press-quiet: inset 0 -2px 0 rgb(0 0 0 / 0.25), 0 1px 2px rgb(0 0 0 / 0.3);
    --chrome: #060b15; --chrome-2: #1b2743; --pill: #2a4d92; --chrome-muted: #9fadc9;
    --sign-soft: #3a161a; --sign-ink: #ffb9b5;
    --number-soft: #1b2e55; --meter: #5a8fe6; --link: #9cc0ff; --link-hover: #c6dbff;
    --lamp-soft: #382c0b; --lamp-ink: #f7d57a; --lamp-line: #6b5413;
    --paid: #4dba82; --paid-soft: #12301f; --paid-ink: #a3e4c0;
    --track: #0c1422;
    --show-moon: none; --show-sun: block;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --ground: #0b121d;
  --surface: #162033; --surface-2: #101829; --field: #0c1422;
  --text: #e9edf5; --muted: #a5b1c9; --line: #2b3852; --edge: #5b6a8e;
  --frame: #2a364f; --outline: #05080e;
    --drop: 0 1px 2px rgb(0 0 0 / 0.4), 0 14px 30px -18px rgb(0 0 0 / 0.8);
    --press-quiet: inset 0 -2px 0 rgb(0 0 0 / 0.25), 0 1px 2px rgb(0 0 0 / 0.3);
  --chrome: #060b15; --chrome-2: #1b2743; --pill: #2a4d92; --chrome-muted: #9fadc9;
  --sign-soft: #3a161a; --sign-ink: #ffb9b5;
  --number-soft: #1b2e55; --meter: #5a8fe6; --link: #9cc0ff; --link-hover: #c6dbff;
  --lamp-soft: #382c0b; --lamp-ink: #f7d57a; --lamp-line: #6b5413;
  --paid: #4dba82; --paid-soft: #12301f; --paid-ink: #a3e4c0;
  --track: #0c1422;
  --show-moon: none; --show-sun: block;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; scrollbar-color: var(--edge) transparent; background: var(--ground); }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--body);
  caret-color: var(--link);
  accent-color: var(--number);
  padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom));
}
body.is-guest { padding-bottom: 0; }
::selection { background: var(--number); color: #fff; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 2.875rem); font-weight: 800; margin-bottom: 0.75rem; }
h2 { font-size: 1.625rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.375rem; margin: 1.5rem 0 0.5rem; }
p { margin: 0 0 1rem; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
strong { font-weight: 700; }
small { font-size: 0.875rem; }

:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; border-radius: 4px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 0.5rem; top: -4rem; z-index: 40; background: var(--chrome); color: #fff; padding: 0.5rem 0.75rem; border-radius: var(--r-ctl); }
.skip:focus, .skip:hover { color: #fff; }
.skip:focus { top: 0.5rem; }
.muted { color: var(--muted); }
.late { color: var(--sign); font-weight: 600; }
.soon { color: var(--lamp-ink); font-weight: 600; }
:root[data-theme='dark'] .late { color: var(--sign-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .late { color: var(--sign-ink); } }
.nowrap { white-space: nowrap; }
.lead { font-size: 1.1875rem; max-width: 40rem; }

/* Piktogramy: jedna sada, jeden tah */
.ic { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.with-ic { display: inline-flex; align-items: center; gap: 0.3rem; }
.with-ic .ic, .row-meta .ic { width: 1.125rem; height: 1.125rem; }

/* ---- Hlavička: uliční cedule + lišta nástrojů ------------------------ */

.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 76rem; margin: 0 auto; padding: 0.5rem 1rem; display: flex; align-items: center; gap: 1rem; }

.sign {
  display: inline-flex; flex-direction: column; align-items: center; flex: none;
  background: var(--sign); color: #fff; text-decoration: none;
  padding: 0.4rem 1rem 0.35rem; border-radius: 7px;
  box-shadow: inset 0 0 0 3px var(--sign), inset 0 0 0 4.5px #fff;
  font-family: var(--display); line-height: 1;
}
.sign:hover { color: #fff; }
.sign-name { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.01em; }
.sign-district { font-size: 0.8125rem; font-weight: 600; margin-top: 0.2rem; padding-top: 0.2rem; border-top: 1px solid rgb(255 255 255 / 0.7); min-width: 60%; text-align: center; }

/* Telefon: lišta dole, pět míst, palec na ně dosáhne */
.nav {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--chrome); padding-bottom: env(safe-area-inset-bottom);
}
.nav a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
  min-height: var(--bar); min-width: 0; padding: 0 0.125rem;
  color: var(--chrome-muted); text-decoration: none;
  font-size: 0.6875rem; font-weight: 600; line-height: 1.2;
}
.nav a::before { content: ''; position: absolute; top: 0; left: 24%; right: 24%; height: 3px; border-radius: 0 0 3px 3px; background: transparent; }
.nav a[aria-current] { color: #fff; }
.nav a[aria-current]::before { background: var(--lamp); }
.nav a:active .nav-ic { transform: scale(0.9); }
.nav-ic { position: relative; display: grid; transition: transform 0.12s var(--ease); }
.nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-wide { display: none !important; }

.badge {
  position: absolute; top: -0.35rem; right: -0.6rem;
  min-width: 1.2rem; height: 1.2rem; padding: 0 0.3rem; border-radius: 99px;
  display: inline-grid; place-items: center;
  background: var(--sign); color: #fff; font: 700 0.75rem/1 var(--body);
}
.badge-inline { position: static; margin-left: 0.4rem; }

.who { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.75rem; min-width: 2.75rem; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9375rem; }
.who:hover { color: var(--text); }
.who:hover .who-name { text-decoration: underline; }
.who-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 66rem) {
  body { padding-bottom: calc(var(--foot) + 1rem); }
  .nav { position: static; display: flex; gap: 0.125rem; padding: 0; background: none; }
  .nav a { flex-direction: row; gap: 0.4rem; min-height: 2.75rem; padding: 0 0.7rem; font-size: 0.9375rem; color: var(--text); border-radius: var(--r-ctl); }
  .nav a::before { content: none; }
  .nav a:hover { background: var(--surface-2); color: var(--text); }
  .nav a[aria-current], .nav a[aria-current]:hover { color: #fff; background: var(--pill); }
  .nav-ic .ic { width: 1.25rem; height: 1.25rem; }
  .nav-ic .badge { position: static; margin-left: 0.35rem; }
  .nav-wide { display: flex !important; }
  .nav-narrow { display: none !important; }
}
@media (min-width: 66rem) and (max-width: 80rem) { .who-name { display: none; } .nav-ic .ic { display: none; } .nav-ic:empty { display: none; } }

/* ---- Stavový řádek: pokladna, stav ulice, zprávy ----------------------
   Na telefonu pruh pod hlavičkou, na počítači přilepený ke spodnímu okraji okna. */

.hud { background: var(--chrome); color: #fff; font-size: 0.875rem; }
.hud-in { max-width: 76rem; margin: 0 auto; padding: 0 0.5rem 0 1rem; display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; }
.hud-stat { flex: none; display: inline-flex; align-items: center; min-height: 2.75rem; color: #fff; text-decoration: none; }
.hud-stat:hover { color: #fff; }
.hud-well {
  display: inline-flex; align-items: center; gap: 0.35rem; height: 2rem; padding: 0 0.6rem 0 0.45rem;
  background: rgb(255 255 255 / 0.08); border-radius: 6px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
  font: 700 1.0625rem/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; color: #fff; white-space: nowrap;
}
.hud-well .ic { width: 1.125rem; height: 1.125rem; color: var(--lamp); }
.hud-well small { font: 600 0.75rem/1 var(--body); color: var(--chrome-muted); }
.hud-stat:hover .hud-well { background: rgb(255 255 255 / 0.16); }
.hud-date { display: none; flex: none; align-items: center; gap: 0.35rem; color: var(--chrome-muted); white-space: nowrap; }
.hud-date .ic { width: 1.125rem; height: 1.125rem; }

.hud-news { position: relative; flex: 1 1 0; min-width: 0; height: 2.75rem; overflow: hidden; }
.hud-news a {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 0.4rem;
  color: #fff; text-decoration: none; font-weight: 600;
  opacity: 0; visibility: hidden; transform: translateY(70%);
  transition: transform 0.45s var(--ease), opacity 0.3s linear, visibility 0s 0.45s;
}
.hud-news a.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.hud-news a.is-out { transform: translateY(-70%); }
.hud-news a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-news a:hover span { text-decoration: underline; }
.hud-news .ic { width: 1.125rem; height: 1.125rem; color: var(--lamp); }
.hud-news .is-alert .ic { color: #ff8d86; }
.hud-contact { display: none; flex: none; color: var(--chrome-muted); white-space: nowrap; }
.hud-nav { display: none; }
.hud-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; min-width: 2.75rem; height: 2.75rem; padding: 0 0.5rem;
  font: inherit; font-weight: 600; color: #fff; text-decoration: none; background: none; border: 0; border-radius: var(--r-ctl); cursor: pointer;
}
.hud-btn[hidden] { display: none; }
.hud-btn:hover { color: #fff; background: var(--chrome-2); }
.hud-btn .ic { width: 1.25rem; height: 1.25rem; }
.theme-moon { display: var(--show-moon); }
.theme-sun { display: var(--show-sun); }

@media (min-width: 66rem) {
  .hud { position: fixed; inset: auto 0 0 0; z-index: 20; height: var(--foot); }
  .hud-in { height: 100%; min-height: 0; padding: 0 1rem; gap: 0.75rem; }
  .hud-date { display: inline-flex; }
  .hud-news { height: 100%; }
  .hud-nav { display: flex; align-items: center; flex: none; }
  .hud-btn { height: 2.5rem; }
  .hud form { margin: 0; }
}
@media (min-width: 84rem) { .hud-contact { display: block; } }

/* ---- Stránka --------------------------------------------------------- */

.page { max-width: 76rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.narrow { max-width: 30rem; }
.narrow-wide { max-width: 44rem; }
.is-guest .page { padding-top: 3rem; }
.is-guest .top-in { justify-content: center; }
.is-guest .narrow { margin: 0 auto; }

.page-head, .block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.page-head h1, .block-head h2 { margin: 0; }
.page-sub { margin: 0; color: var(--muted); }
.crumb { margin: 0 0 0.25rem; font-size: 0.9375rem; }
.crumb a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }
.crumb a::before { content: '‹'; margin-right: 0.3rem; }

.cols { display: grid; gap: 0 1.25rem; }
@media (min-width: 56rem) { .cols { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Okno: smaltové tělo, pevný obrys, lišta s názvem jako domovní cedulka */
.block, .gw {
  position: relative; margin-top: 1.5rem; padding: 1rem;
  background: var(--surface); border: 1px solid var(--frame); border-radius: var(--r-win); box-shadow: var(--drop);
}
.block > h2:first-child, .block > .block-head:first-child, .gw-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.75rem;
  margin: -1rem -1rem 1rem; padding: 0.55rem 1rem; min-height: 3.25rem;
  border-bottom: 1px solid var(--line);
  font: 700 1.3125rem/1.15 var(--display); letter-spacing: 0.01em; color: var(--text);
}
.block-head > h2, .gw-bar > h2 { font: inherit; letter-spacing: inherit; color: inherit; margin: 0; display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; }
/* ikona okna v barevném štítku: modrá = přehled, žlutá = čeká na vás */
.gw-bar h2 > .ic, .block-head h2 > .ic { width: 1.875rem; height: 1.875rem; padding: 0.3rem; border-radius: 7px; background: var(--number-soft); color: var(--link); }
.gw-task > .gw-bar h2 > .ic, .gw-task > .block-head h2 > .ic { background: var(--lamp); color: var(--on-lamp); }
.gw-note { margin: 0 0 0 auto; font: 400 0.9375rem/1.2 var(--body); letter-spacing: 0; color: var(--muted); }
.gw-note strong { font: 700 1.25rem/1 var(--display); font-variant-numeric: tabular-nums; color: var(--text); }
.block > :last-child, .gw > :last-child { margin-bottom: 0; }
.block-head .btn, .gw-bar .btn { position: relative; min-height: 2.25rem; padding: 0.3rem 0.75rem; font-size: 0.9375rem; }
.block-head .btn::after, .gw-bar .btn::after { content: ''; position: absolute; inset: -0.35rem -0.2rem; }

.flash { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 1rem; border-radius: 10px; background: var(--paid-soft); color: var(--paid-ink); max-width: 44rem; animation: drop 0.4s var(--ease); }
.flash .ic { color: var(--paid); margin-top: 0.05rem; }
.flash a { color: inherit; font-weight: 600; }
.flash-warn { background: var(--lamp-soft); color: var(--lamp-ink); }
.flash-warn .ic { color: var(--lamp-deep); }
@keyframes drop { from { opacity: 0; transform: translateY(-0.5rem); } }

.empty { color: var(--muted); padding: 1rem 1.25rem; border-radius: 10px; background: var(--surface); border: 1px dashed var(--edge); max-width: 44rem; }
.block .empty, .gw .empty { background: var(--surface-2); border: 0; max-width: none; }

/* Patička: jen na telefonu na konci stránky; na počítači ji nahrazuje stavový řádek */
.foot { color: var(--muted); font-size: 0.9375rem; }
.foot-in { max-width: 76rem; margin: 0 auto; padding: 0 1rem 1.25rem; }
.foot-about { margin: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
@media (min-width: 66rem) { .foot { display: none; } }

/* ---- Domovní čísla --------------------------------------------------- */

.plate {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.75rem; min-height: 2.25rem; padding: 0.35rem 0.4rem;
  border-radius: var(--r-plate);
  font: 700 1.1875rem/1 var(--display); font-variant-numeric: tabular-nums;
  text-decoration: none;
  /* „ne“: jen obrys, jako prázdné místo po cedulce */
  color: var(--muted); background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--edge);
}
.plate.is-on {
  color: #fff; background: var(--number);
  box-shadow: inset 0 0 0 2px var(--number), inset 0 0 0 3.25px #fff;
}
a.plate.is-on:hover { color: #fff; background: var(--number-dark); }
.plate.is-me { outline: 3px solid var(--lamp); outline-offset: 2px; }
.plate-s { min-width: 1.75rem; min-height: 1.5rem; font-size: 0.875rem; border-radius: 4px; padding: 0.2rem 0.3rem; }
.plate-s.is-on { box-shadow: inset 0 0 0 1.5px var(--number), inset 0 0 0 2.5px #fff; }
.plate-s.is-me { outline-width: 2px; }
.plate-l { min-width: 4.25rem; min-height: 3.5rem; font-size: 2rem; border-radius: 8px; padding: 0.5rem 0.6rem; }
.plate-l.is-on { box-shadow: inset 0 0 0 3px var(--number), inset 0 0 0 5px #fff; }

.street { list-style: none; margin: 0; padding: 0.375rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.street a.plate { min-width: 2.875rem; min-height: 2.75rem; }
.street-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0.625rem 0 0; font-size: 0.875rem; color: var(--muted); }
.street-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.street-legend .plate-s { min-width: 1.25rem; min-height: 0; height: 1rem; padding: 0; }

/* ---- Mapa ulice: herní plocha v rámu ---------------------------------- */

.map { margin-top: 0.25rem; background: var(--chrome); border: 1px solid var(--frame); border-radius: var(--r-win); box-shadow: var(--drop); overflow: hidden; }
.map-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1.25rem; padding: 0.4rem; }

.seg { display: inline-flex; gap: 0.3rem; }
.seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 2.75rem; padding: 0 0.85rem; border: 0; border-radius: 7px; cursor: pointer;
  font: 600 0.9375rem/1.1 var(--body); color: #fff; background: transparent;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.seg button .ic { width: 1.25rem; height: 1.25rem; }
.seg button b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--chrome-muted); }
.seg button:hover { background: var(--chrome-2); }
.seg button[aria-pressed='true'] { background: #fff; color: #17233b; }
.seg button[aria-pressed='true'] b { color: #4c576d; }
.map-legend { margin: 0; padding-right: 0.5rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; color: var(--chrome-muted); min-width: 0; }
.map-legend .plate-s { flex: none; min-width: 1.25rem; min-height: 0; height: 1rem; padding: 0; }
.map-legend [data-legend] { display: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map[data-mode='platby'] [data-legend='platby'],
.map[data-mode='hlasovani'] [data-legend='hlasovani'],
.map[data-mode='trh'] [data-legend='trh'] { display: block; }

.map-view {
  position: relative; overflow: hidden;
  height: clamp(21rem, 56vh, 34rem);
  background: #e6e9e3;
  transition: background-color 0.7s linear;
}
.map[data-variant='full'] .map-view { height: clamp(24rem, calc(100vh - 19rem), 46rem); }
.map.is-night .map-view { background: var(--night); }

.map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; outline: 0; }
.map[data-variant='full'] .map-canvas { touch-action: none; }
.map-canvas:active { cursor: grabbing; }
.map-canvas.is-pointing { cursor: pointer; }

/* 2D plánek (bez WebGL) */
.map-plan { display: block; width: 100%; height: 100%; }
.map-plan[hidden] { display: none; }
.mp-road { fill: none; stroke: #d3d8dd; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.mp-road-main { stroke: #bcc2ca; stroke-width: 5.6; }
.map-plan .mp polygon { fill: #fff; stroke: #8f9aac; stroke-width: 0.35; transition: fill 0.2s var(--ease); }
.map-plan .mp text { font: 700 4.6px var(--display); fill: #4c576d; text-anchor: middle; pointer-events: none; }
.map-plan a.mp:hover polygon, .map-plan a.mp:focus-visible polygon { stroke: #17233b; stroke-width: 0.8; }
.map-plan .mp.is-me polygon { stroke: var(--lamp); stroke-width: 1.3; }
.map[data-mode='platby'] .map-plan .is-paid polygon,
.map[data-mode='hlasovani'] .map-plan .is-voted polygon,
.map[data-mode='trh'] .map-plan .has-offers polygon { fill: var(--number); }
.map[data-mode='platby'] .map-plan .is-paid text,
.map[data-mode='hlasovani'] .map-plan .is-voted text,
.map[data-mode='trh'] .map-plan .has-offers text { fill: #fff; }

/* Cedulky nad 3D modelem */
.map-labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.map-labels .mp {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer;
  min-width: 2.5rem; min-height: 2rem; font-size: 1.0625rem;
  color: #17233b; background: #fff;
  box-shadow: inset 0 0 0 1.5px #8f9aac, 0 3px 8px -2px rgb(15 23 42 / 0.4);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.map-labels .mp.is-out { display: none; }
.map[data-mode='platby'] .map-labels .is-paid,
.map[data-mode='hlasovani'] .map-labels .is-voted,
.map[data-mode='trh'] .map-labels .has-offers {
  color: #fff; background: var(--number);
  box-shadow: inset 0 0 0 2px var(--number), inset 0 0 0 3.25px #fff, 0 3px 8px -2px rgb(15 23 42 / 0.45);
}
.map-labels .mp.is-selected { outline: 3px solid var(--lamp); outline-offset: 2px; }
.map-labels .mp.is-small:not(:focus-visible) { min-width: 0; min-height: 0; width: 1rem; height: 0.8rem; padding: 0; font-size: 0; border-radius: 3px; }
@media (max-width: 35rem) { .map-labels .mp { min-width: 2rem; min-height: 1.625rem; padding: 0.3rem 0.35rem; font-size: 0.9375rem; } }

.map-tools { position: absolute; z-index: 4500; top: 0.625rem; right: 0.625rem; display: grid; gap: 0.375rem; }
.map-tools[hidden] { display: none; }
.tool {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
  color: #17233b; background: #fff; border: 0; border-radius: 10px; cursor: pointer;
  box-shadow: 0 2px 8px -2px rgb(15 23 42 / 0.4);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.12s var(--ease);
}
.tool:hover { background: #eceeea; color: #17233b; }
.tool:active { transform: scale(0.94); }
.tool[aria-pressed='true'] { background: var(--lamp); color: var(--on-lamp); }

.map-rover {
  z-index: 4500;
  position: absolute; top: 0.625rem; left: 0.625rem; margin: 0; max-width: calc(100% - 4.75rem);
  display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.85rem 0.45rem 0.6rem;
  background: #17233b; color: #fff; border-radius: 99px; font-size: 0.875rem; font-weight: 600; line-height: 1.25;
}
.map-rover[hidden], .map-card[hidden], .map-hint[hidden] { display: none; }
.map-rover .ic { color: var(--lamp); width: 1.375rem; height: 1.375rem; }

/* Karta leží nad cedulkami domů a lamp (ty mají z-index až 4000), ať se tlačítko nedá minout. */
.map-card {
  z-index: 5000;
  position: absolute; left: 0.625rem; bottom: 0.625rem; width: min(21rem, calc(100% - 1.25rem));
  padding: 1rem; background: var(--surface); color: var(--text); border: 1px solid var(--frame); border-radius: var(--r-win); box-shadow: 0 10px 28px -12px rgb(15 23 42 / 0.5);
  display: grid; gap: 0.75rem; animation: rise 0.32s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(0.75rem); } }
.card-close { position: absolute; top: 0.375rem; right: 0.375rem; box-shadow: none; background: transparent; color: var(--text); }
.card-close:hover { background: var(--surface-2); color: var(--text); }
.card-head { display: flex; align-items: center; gap: 0.75rem; padding-right: 2.5rem; }
.card-title { display: grid; min-width: 0; line-height: 1.3; }
.card-title strong { font: 700 1.25rem/1.15 var(--display); }
.card-title span { color: var(--muted); font-size: 0.9375rem; }
.card-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.9375rem; }
.card-facts:empty { display: none; }
.card-facts li { display: flex; gap: 0.5rem; align-items: flex-start; }
.card-facts .ic { width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; }
.card-facts .is-ok .ic { color: var(--paid); }
.card-facts .is-no { color: var(--muted); }

.map-hint {
  position: absolute; left: 50%; bottom: 0.75rem; transform: translateX(-50%); margin: 0; white-space: nowrap; pointer-events: none;
  padding: 0.35rem 0.8rem; border-radius: 99px; background: rgb(23 35 59 / 0.85); color: #fff; font-size: 0.8125rem;
  animation: hint 6s linear forwards;
}
@keyframes hint { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.map-credit { margin: 0; padding: 0.35rem 0.75rem; font-size: 0.8125rem; color: var(--chrome-muted); }
.map-credit a { color: inherit; }
.map > details.admin { margin: 0.5rem; max-width: none; }

@media (max-width: 35rem) {
  .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .seg button { flex-direction: column; gap: 0.1rem; padding: 0.3rem 0.25rem; min-height: 3rem; }
  .seg button .ic { display: none; }
  .seg button b { font-size: 0.8125rem; }
  .map-legend { padding: 0 0.35rem 0.15rem; font-size: 0.875rem; }
  .map-view { height: clamp(18rem, 46vh, 25rem); }
  .map-rover { top: auto; bottom: 0.5rem; left: 0.5rem; max-width: calc(100% - 1rem); font-size: 0.8125rem; padding: 0.35rem 0.7rem 0.35rem 0.5rem; }
  .map[data-variant='full'] .map-view { height: clamp(22rem, calc(100vh - 21rem), 34rem); }
  .map-card { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; width: auto; }
}

/* Úvodní stránka: mapa a vedle ní úkoly */
.world { display: grid; gap: 1.25rem; align-items: start; }
.world > * { margin-top: 0; min-width: 0; }

.duo { display: grid; gap: 0 1.25rem; align-items: start; }
@media (min-width: 60rem) { .duo { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }

/* ---- Co vás čeká ------------------------------------------------------ */

.todo { list-style: none; margin: -0.5rem 0; padding: 0; }
.todo li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.6rem 0.75rem; align-items: center; padding: 0.75rem 0; }
.todo li + li { border-top: 1px solid var(--line); }
.todo-ic { color: var(--link); display: grid; }
.todo-main { display: grid; line-height: 1.35; }
.todo-main strong { overflow-wrap: anywhere; }
.todo-main span { font-size: 0.9375rem; }
.allclear { display: flex; gap: 0.6rem; align-items: center; margin: 0; padding: 0.75rem 0.875rem; background: var(--paid-soft); color: var(--paid-ink); border-radius: var(--r-ctl); }
.allclear .ic { color: var(--paid); }
@media (max-width: 26rem) {
  .todo li { grid-template-columns: auto minmax(0, 1fr); }
  .todo li > .btn, .todo li > form { grid-column: 2; justify-self: start; }
}

/* ---- Ukazatele -------------------------------------------------------- */

progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 0.5rem; border: 0; border-radius: 99px; background: var(--track); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--track); }
progress::-webkit-progress-value { background-color: var(--meter); border-radius: 99px; }
progress::-moz-progress-bar { background-color: var(--meter); border-radius: 99px; }
.meter { margin-top: 1rem; }
.meter p { margin: 0.4rem 0 0; }
.meter-big progress { height: 0.75rem; }
.meter-big p { font-size: 1.1875rem; }

/* ---- Pokladna a sbírky ------------------------------------------------- */

.fund { background: var(--surface); border: 1px solid var(--frame); border-radius: var(--r-win); box-shadow: var(--drop); padding: 1rem; margin-bottom: 1rem; }
.block .fund, .gw .fund { background: var(--surface-2); border-color: var(--line); box-shadow: none; }
.fund-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.75rem; }
.fund-head h3 { margin: 0; }
.fund-head h3 a { color: var(--text); display: inline-block; padding: 0.6rem 0; }
.fund-head p { margin: 0; }

.mine { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; margin: 1rem 0 0; padding: 0.75rem 1rem; border-radius: var(--r-ctl); }
.mine-due { background: var(--lamp-soft); color: var(--lamp-ink); box-shadow: inset 0 0 0 1.5px var(--lamp-line); }
.mine-done { background: var(--paid-soft); color: var(--paid-ink); }

/* Trezor: stav pokladny jako počitadlo */
.vault { display: grid; gap: 1rem 1.5rem; align-items: center; }
@media (min-width: 44rem) { .vault { grid-template-columns: auto 1fr; } }
.balance { margin: 0; color: var(--muted); }
.balance-sum { display: block; font: 800 2.5rem/1.05 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.balance-big { display: inline-grid; gap: 0.3rem; padding: 0.875rem 1.25rem 0.75rem; background: var(--chrome); color: #b9c5dc; border-radius: 10px; }
.balance-big .balance-sum { font-size: clamp(2.75rem, 2rem + 4vw, 4rem); color: #fff; letter-spacing: 0.01em; }
.ledger-top { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem 3rem; }
.sums { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }
.sums div { padding: 0.5rem 0.875rem; background: var(--surface); border: 1px solid var(--frame); border-radius: var(--r-ctl); }
.sums dt { color: var(--muted); font-size: 0.875rem; }
.sums dd { margin: 0; font: 800 1.375rem/1.2 var(--display); font-variant-numeric: tabular-nums; }

.pay { display: grid; gap: 1.25rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-bottom: 1rem; max-width: 44rem; }
@media (min-width: 40rem) { .pay { grid-template-columns: auto 1fr; align-items: start; } }
.pay-qr { margin: 0; max-width: 220px; }
.pay-qr img { display: block; width: 220px; height: 220px; border: 1px solid var(--frame); border-radius: var(--r-ctl); background: #fff; }
.pay-qr figcaption { font-size: 0.875rem; color: var(--muted); margin-top: 0.5rem; }

.facts { margin: 0; display: grid; gap: 0.625rem; }
.facts div { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: 0.75rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.facts + p { margin-top: 1rem; }
.facts-box { background: var(--surface); border: 1px solid var(--frame); border-radius: var(--r-win); box-shadow: var(--drop); padding: 1rem 1.25rem; margin: 1.25rem 0; }

/* Řádky plateb pro správce */
.payrows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.payrow { display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem 1rem; align-items: start; padding: 0.75rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 6rem; }
.payrow:last-child { border-bottom: 0; }
.payrow:target, .house:target { background: var(--lamp-soft); box-shadow: 0 0 0 0.5rem var(--lamp-soft); border-radius: 4px; }
.payrow-name { font-weight: 600; display: block; }
.payrow-list { list-style: none; margin: 0; padding: 0; }
.payrow-list li { display: flex; flex-wrap: wrap; gap: 0 0.75rem; align-items: center; }
.payrow-ok { color: var(--paid); font-weight: 700; align-self: center; }
.payrow-go { align-self: center; }

/* ---- Seznamy --------------------------------------------------------- */

.rows { list-style: none; margin: 0 0 1rem; padding: 0; }
.row { border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.block > .rows, .gw > .rows { margin-top: -0.5rem; }
.block > .rows:last-child, .gw > .rows:last-child { margin-bottom: -0.5rem; }
.row-link { display: block; padding: 0.75rem 0; text-decoration: none; color: var(--text); }
.row-link:hover { color: var(--text); }
.row-link:hover .row-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.row-title { display: block; font-weight: 700; font-size: 1.125rem; line-height: 1.3; overflow-wrap: anywhere; }
.rows-roomy .row-link { padding: 1rem 0; }
.rows-roomy .row-title { font-size: 1.25rem; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.75rem; margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9375rem; }
h1 + .row-meta { margin: 0 0 1.25rem; }
.row-ic .row-link, .row-plain { display: flex; gap: 0.875rem; align-items: center; }
.row-plain { padding: 0.75rem 0; align-items: center; }
.row-icon { color: var(--link); display: grid; margin-top: 0.1rem; }
.row-plain .row-icon { color: var(--muted); margin: 0; }
.row-body { min-width: 0; }
.seller { display: inline-flex; align-items: center; gap: 0.4rem; }
.price { color: var(--text); font-weight: 800; }
.more { display: inline-flex; align-items: center; gap: 0.15rem; min-height: 2.75rem; font-weight: 700; }
.more .ic { width: 1.125rem; height: 1.125rem; transition: transform 0.2s var(--ease); }
.more:hover .ic { transform: translateX(3px); }

.tag { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 4px; font-size: 0.8125rem; font-weight: 700; background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tag-oznameni { background: var(--sign-soft); color: var(--sign-ink); box-shadow: none; }
.tag-napad { background: var(--number-soft); color: var(--link-hover); box-shadow: none; }
.tag-akce, .tag-done { background: var(--paid-soft); color: var(--paid-ink); box-shadow: none; }
.tag-zavada, .tag-due { background: var(--lamp-soft); color: var(--lamp-ink); box-shadow: inset 0 0 0 1px var(--lamp-line); }
.pin { font-size: 0.8125rem; font-weight: 700; color: var(--sign); }

/* Rubriky */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.filters a {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; padding: 0 0.9rem; border-radius: var(--r-ctl);
  text-decoration: none; color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--frame);
  font-weight: 600; font-size: 0.9375rem;
}
.filters a .ic { width: 1.125rem; height: 1.125rem; }
.filters a:hover { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--edge); }
.filters a[aria-current], .filters a[aria-current]:hover { background: var(--pill); color: #fff; box-shadow: none; }
@media (max-width: 40rem) {
  /* na telefonu se rubriky posouvají do strany, ať nezaberou půl obrazovky */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -1rem; padding: 0.25rem 1rem; scrollbar-width: none; scroll-snap-type: x proximity; }
  .filters::-webkit-scrollbar { display: none; }
  .filters a { flex: none; scroll-snap-align: start; }
}

.prose { max-width: 40rem; overflow-wrap: anywhere; }
.prose p:last-child { margin-bottom: 0; }
article > .prose { font-size: 1.125rem; margin-bottom: 1.5rem; }
/* Detail příspěvku, nabídky a hlasování je jedno okno */
article.narrow { background: var(--surface); border: 1px solid var(--frame); border-radius: var(--r-win); box-shadow: var(--drop); padding: 0.5rem 1.25rem 1.25rem; }
article.narrow > .block, article.narrow > .panel, article.narrow > .facts-box, article.narrow > .gw { box-shadow: none; }
article.narrow > .panel, article.narrow > .facts-box { background: var(--surface-2); border-color: var(--line); }
article.narrow.is-bare { background: none; border: 0; box-shadow: none; padding: 0; }
article.narrow.is-bare > .block, article.narrow.is-bare > .gw { box-shadow: var(--drop); }

.comments { margin-top: 2rem; padding-top: 1.25rem; border-top: 2px solid var(--line); }
.comment-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.comment { padding: 0.75rem 0 0.875rem; border-bottom: 1px solid var(--line); }
.comment .row-meta { margin: 0 0 0.25rem; }
.comment .row-meta strong { color: var(--text); }

.table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; max-width: 52rem; }
.table th, .table td { text-align: left; padding: 0.625rem 0.75rem 0.625rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: 0.875rem; color: var(--muted); font-weight: 600; }
.table tfoot th, .table tfoot td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 0; }
.table td.num + td.num { padding-left: 1rem; }
.table td .link { min-height: 2.75rem; }
@media (max-width: 30rem) {
  .table { font-size: 0.9375rem; }
  .table th, .table td { padding-right: 0.5rem; }
  .table td:nth-child(2) { overflow-wrap: anywhere; }
  .table td.num + td.num { padding-left: 0.25rem; }
}

/* Výsledky hlasování */
.result-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 1rem; }
.result-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.3rem; }
.result-head strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.result progress { height: 0.75rem; }
.result:not(.is-top) progress::-webkit-progress-value { background-color: var(--edge); }
.result:not(.is-top) progress::-moz-progress-bar { background-color: var(--edge); }
.result.is-top .result-head { font-weight: 700; }

/* Sousedé a dům */
.houses { list-style: none; margin: 0; padding: 0; }
.house { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; padding: 0.875rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 6rem; }
.house:last-child { border-bottom: 0; }
.house-label { margin: 0; font-weight: 700; }
.house-main > .muted { margin: 0; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; flex-wrap: wrap; gap: 0 0.75rem; align-items: baseline; padding: 0.15rem 0; }
.people .inline-more { flex-basis: 100%; }
.people .muted { overflow-wrap: anywhere; min-width: 0; }
.person-name { font-weight: 600; }
.house-label + .people .person-name { font-weight: 400; }
.house-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.house-head h1 { margin: 0; }
.house-head p { margin: 0.2rem 0 0; }

/* Trh */
.offer-head { display: flex; gap: 0.875rem; align-items: flex-start; }
.offer-head h1 { margin-bottom: 0.4rem; }
.offer-head .row-meta { margin: 0 0 1rem; }
.offer-ic { color: var(--link); margin-top: 0.3rem; }
.offer-ic .ic { width: 2.25rem; height: 2.25rem; stroke-width: 1.5; }
.offer-price { font: 800 1.75rem/1.1 var(--display); margin: 0 0 1rem; }

.orders { list-style: none; margin: -0.5rem 0; padding: 0; }
.order { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.order:last-child { border-bottom: 0; }
.order.is-closed .order-main { color: var(--muted); }
.order-main { flex: 1 1 18rem; min-width: 0; }
.order-title { margin: 0; font-weight: 700; font-size: 1.125rem; }
.order-title a { color: inherit; }
.order-note { margin: 0.35rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.order-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.order-acts:empty { display: none; }
.order .tag { margin: 0.5rem 0 0; }

.steps { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; max-width: 26rem; font-size: 0.8125rem; line-height: 1.25; color: var(--muted); }
.steps li { position: relative; display: grid; gap: 0.3rem; justify-items: start; padding-right: 0.25rem; }
.steps li::before { content: ''; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--edge); position: relative; z-index: 1; }
.steps li:not(:last-child)::after { content: ''; position: absolute; top: 0.33rem; left: 0.75rem; right: 0; height: 2px; background: var(--line); }
.steps .is-done { color: var(--text); }
.steps .is-done::before { background: var(--meter); box-shadow: none; }
.steps .is-done:not(:last-child)::after { background: var(--meter); }
.steps .is-now { color: var(--text); font-weight: 700; }
.steps .is-now::before { background: var(--lamp); box-shadow: 0 0 0 3px var(--lamp-soft); }

/* Domácnost: všechny platby */
.total { font-size: 1.1875rem; }
.bills, .poffers { list-style: none; margin: -0.5rem 0; padding: 0; }
.page > .poffers { margin: 0 0 1rem; padding: 0 1rem; background: var(--surface); border: 1px solid var(--frame); border-radius: var(--r-win); box-shadow: var(--drop); }
.bill, .poffer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.5rem 1rem; padding: 1rem 0; }
.bill + .bill, .poffer + .poffer { border-top: 1px solid var(--line); }
.bill-ic { color: var(--link); display: grid; margin-top: 0.1rem; }
.bill-title { margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.bill-title span { color: var(--muted); }
.bill-sum { margin: 0.15rem 0 0; font-size: 1.1875rem; }
.bill-sum strong { font: 700 1.375rem/1.1 var(--display); }
.bill-bar { height: 0.375rem; max-width: 22rem; margin: 0.4rem 0 0.2rem; }
.bill-note { margin: 0.25rem 0 0; font-size: 0.9375rem; }
.bill-links { margin: 0.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.bill-links a { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem; font-weight: 600; font-size: 0.9375rem; }
.bill-links .ic { width: 1.125rem; height: 1.125rem; }
.bill-due, .poffer-go { display: grid; gap: 0.5rem; justify-items: end; align-content: start; text-align: right; }
.bill-due p { margin: 0; display: inline-flex; gap: 0.4rem; align-items: flex-start; line-height: 1.25; }
.bill-due .ic { width: 1.25rem; height: 1.25rem; }
.poffer .prose { font-size: 0.9375rem; color: var(--muted); margin-top: 0.3rem; }
.tip { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.6rem 0 0; padding: 0.7rem 0.875rem; border-radius: var(--r-ctl); background: var(--number-soft); color: var(--text); font-size: 0.9375rem; }
.tip .ic { color: var(--link); width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; }
.tip a { font-weight: 600; white-space: nowrap; }
@media (max-width: 36rem) {
  .bill, .poffer { grid-template-columns: auto minmax(0, 1fr); }
  .bill-due, .poffer-go { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; gap: 0.5rem 1rem; }
}

.quick { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.quick a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.875rem; padding: 0 0.6rem 0 0.8rem; border-radius: var(--r-ctl); background: var(--field); box-shadow: inset 0 0 0 1px var(--edge); color: var(--text); text-decoration: none; font-weight: 600; }
.quick a:hover { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.quick a .ic:first-child { color: var(--link); }
.quick a .ic:last-child { width: 1.125rem; height: 1.125rem; color: var(--muted); }
.quick small { font-weight: 400; }
.privacy { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1.5rem; font-size: 0.9375rem; max-width: 44rem; }
.privacy .ic { width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; }

/* Rozcestník „Více“ */
.menu { list-style: none; margin: 0 0 1.5rem; padding: 0; background: var(--surface); border: 1px solid var(--frame); border-radius: var(--r-win); box-shadow: var(--drop); overflow: hidden; }
.menu li + li { border-top: 1px solid var(--line); }
.menu a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.875rem; min-height: 4rem; padding: 0.6rem 1rem; color: var(--text); text-decoration: none; }
.menu a > .ic:first-child { color: var(--link); }
.menu a > .ic:last-child { color: var(--muted); width: 1.25rem; height: 1.25rem; }
.menu a > span:not(.badge) { display: grid; line-height: 1.3; }
.menu small { color: var(--muted); }
.menu a:hover { color: var(--text); background: var(--surface-2); }
.menu a:active { background: var(--surface-2); }
.menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* ---- Formuláře ------------------------------------------------------- */

.panel { background: var(--surface); border: 1px solid var(--frame); border-radius: var(--r-win); box-shadow: var(--drop); padding: 1.25rem; margin-bottom: 1rem; }
.block .panel, .gw .panel { background: var(--surface-2); border-color: var(--line); box-shadow: none; }
.panel h2 { font-size: 1.375rem; margin: 0.5rem 0 0; }
.panel h2:first-child { margin-top: 0; }
.stack { display: grid; gap: 1rem; }
.stack > p { margin: 0; }

.field { display: grid; gap: 0.3rem; min-width: 0; }
.field > span, .choice legend, .ballot legend { font-weight: 600; display: inline-flex; align-items: center; gap: 0.4rem; }
.field > span .ic { width: 1.25rem; height: 1.25rem; }
.field small { color: var(--muted); }
.field-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: end; }
.field-row .field { flex: 1 1 14rem; }
.field-row .field-short, .field-short { flex: 0 1 11rem; max-width: 14rem; }
@media (max-width: 30rem) { .field-row .field-short { flex: 1 1 8rem; max-width: none; } }

input[type='text'], input[type='email'], input[type='date'], input[type='file'], textarea, select {
  font: inherit; color: var(--text); width: 100%; min-width: 0;
  padding: 0.6rem 0.75rem; min-height: 2.875rem;
  background: var(--field); border: 1.5px solid var(--edge); border-radius: var(--r-ctl);
}
input[type='file'] { padding: 0.45rem; }
input[type='file']::file-selector-button { font: inherit; font-weight: 600; margin-right: 0.75rem; padding: 0.4rem 0.8rem; border: 0; border-radius: 6px; background: var(--surface-2); color: var(--text); cursor: pointer; }
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--lamp); outline-offset: 0; border-color: var(--text); }
::placeholder { color: var(--muted); opacity: 0.85; }

.check, .choice label, .ballot label { display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer; }
.check { min-height: 2.75rem; align-items: center; }
input[type='checkbox'], input[type='radio'] { width: 1.3rem; height: 1.3rem; margin: 0.15rem 0 0; flex: none; }
.check input { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 0.5rem; }
.choice { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice legend { flex-basis: 100%; }
.choice label { align-items: center; min-height: 2.75rem; padding: 0 0.9rem 0 0.7rem; border-radius: var(--r-ctl); background: var(--field); box-shadow: inset 0 0 0 1.5px var(--edge); }
.choice input { margin: 0; }
.choice label:has(:checked) { box-shadow: inset 0 0 0 2px var(--link); background: var(--number-soft); }
.ballot { display: grid; gap: 0.5rem; }
.ballot label { padding: 0.8rem 0.9rem; border-radius: var(--r-ctl); background: var(--field); box-shadow: inset 0 0 0 1.5px var(--edge); font-size: 1.125rem; }
.ballot label:has(:checked) { box-shadow: inset 0 0 0 2px var(--link); background: var(--number-soft); font-weight: 600; }

/* Tlačítka: plná, s jemnou spodní hranou */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font: 700 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; text-align: center;
  min-height: 2.875rem; padding: 0.5rem 1.1rem;
  color: #fff; background: var(--number); border: 0; border-radius: var(--r-ctl);
  box-shadow: var(--press);
  transition: background-color 0.15s var(--ease), box-shadow 0.12s var(--ease), transform 0.12s var(--ease);
}
.btn .ic { width: 1.25rem; height: 1.25rem; }
.btn:hover { background: var(--number-dark); color: #fff; }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn-quiet { color: var(--text); background: var(--field); box-shadow: inset 0 0 0 1.5px var(--edge), var(--press-quiet); }
.btn-quiet:hover { color: var(--text); background: var(--field); box-shadow: inset 0 0 0 2px var(--text); }
.btn-gold { color: var(--on-lamp); background: var(--lamp); }
.btn-gold:hover { color: var(--on-lamp); background: #ffc93d; }
.btn-danger { color: var(--sign); background: transparent; box-shadow: inset 0 0 0 1.5px rgb(190 22 34 / 0.45); }
:root[data-theme='dark'] .btn-danger { color: var(--sign-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .btn-danger { color: var(--sign-ink); } }
.btn-danger:hover, :root .btn-danger:hover { color: #fff; background: var(--sign); box-shadow: none; }
.link { display: inline-flex; align-items: center; min-height: 2.75rem; font: inherit; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.link-danger { color: var(--sign); }

.actions { display: flex; flex-wrap: wrap; gap: 0.625rem; align-items: center; }
.actions-tools { margin-top: 1.25rem; }
form.actions-tools { margin-top: 1rem; }

/* Rozbalovací části pro správce */
details.admin { background: var(--surface-2); border: 1px dashed var(--edge); border-radius: 10px; margin-top: 0.75rem; max-width: 44rem; }
.page > details.admin { background: var(--surface); }
details.admin > summary { cursor: pointer; padding: 0.8rem 1rem; font-weight: 700; color: var(--link); }
details.admin > summary:hover { color: var(--link-hover); }
details.admin[open] > summary { border-bottom: 1px dashed var(--edge); }
details.admin > form { padding: 1rem; }
.inline-more { margin-top: 0.25rem; }
.inline-more > summary { cursor: pointer; color: var(--link); font-size: 0.9375rem; font-weight: 600; width: fit-content; min-height: 2.75rem; align-content: center; }
.inline-more[open] { padding: 0 0 0.75rem; }
.inline-more[open] > summary { margin-bottom: 0.375rem; }
.inline-more .field > span { font-size: 0.875rem; }

.copy { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.copy input { flex: 1 1 16rem; font-size: 0.9375rem; }

@media (max-width: 30rem) {
  .who-name { display: none; }
  .payrow { grid-template-columns: auto 1fr; }
  .payrow-go, .payrow-ok { grid-column: 2; justify-self: start; }
  .facts div { grid-template-columns: 1fr; gap: 0; }
  .mine .btn { width: 100%; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1 1 auto; }
}

/* ---- Výběr dlaždicemi s piktogramem ----------------------------------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr)); gap: 0.5rem; }
.tiles legend { grid-column: 1 / -1; font-weight: 600; }
.tiles legend small { font-weight: 400; }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 26rem; }
.tiles label {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 0.35rem;
  min-height: 5.25rem; padding: 0.6rem 0.4rem; text-align: center; cursor: pointer;
  border-radius: 10px; background: var(--field); box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 0.9375rem; font-weight: 600; line-height: 1.2; color: var(--text);
  transition: box-shadow 0.15s var(--ease), background-color 0.15s var(--ease), transform 0.12s var(--ease);
}
.tiles label .ic { width: 1.75rem; height: 1.75rem; color: var(--muted); transition: color 0.15s var(--ease); }
.tiles label small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8125rem; }
.tiles input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tiles label:hover { box-shadow: inset 0 0 0 1.5px var(--edge); }
.tiles label:active { transform: scale(0.97); }
.tiles label:has(:checked) { background: var(--number-soft); box-shadow: inset 0 0 0 2px var(--link); }
.tiles label:has(:checked) .ic { color: var(--link); }
.tiles label:has(:focus-visible) { outline: 3px solid var(--lamp); outline-offset: 2px; }

/* Nabídky poskytovatelů k vybrání klepnutím */
.pick-title { margin: 0 0 0.5rem; font-weight: 600; }
.pick-list { display: grid; gap: 0.5rem; }
.pick-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem;
  min-height: 3.25rem; padding: 0.5rem 0.875rem; text-align: left; cursor: pointer;
  font: inherit; color: var(--text); background: var(--field); border: 0; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--line);
}
.pick-item[hidden], .lamp-flag[hidden], .thumb[hidden] { display: none; }
.pick-item .ic { color: var(--link); }
.pick-item span { display: grid; line-height: 1.25; }
.pick-item small { color: var(--muted); }
.pick-item b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pick-item:hover { box-shadow: inset 0 0 0 1.5px var(--edge); }
.pick-item[aria-pressed='true'] { background: var(--number-soft); box-shadow: inset 0 0 0 2px var(--link); }

/* ---- Fotky nabídek ---------------------------------------------------- */

.thumb { flex: none; width: 4.5rem; height: 4.5rem; border-radius: var(--r-ctl); object-fit: cover; background: var(--surface-2); }
.thumb-ic { display: grid; place-items: center; color: var(--link); background: var(--number-soft); }
.thumb-ic .ic { width: 1.75rem; height: 1.75rem; }
.thumb-l { width: 6rem; height: 6rem; }
.rows-roomy .thumb { width: 5.5rem; height: 5.5rem; }
.offer-photo { display: block; width: 100%; max-height: 24rem; object-fit: cover; border: 1px solid var(--frame); border-radius: var(--r-ctl); margin: 0.5rem 0 1.25rem; background: var(--surface-2); }
.photo-field > label { font-weight: 600; display: inline-flex; align-items: center; gap: 0.4rem; }
.photo-field > label .ic { width: 1.25rem; height: 1.25rem; }
.photo-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.photo-pick input { flex: 1 1 14rem; }

/* Trh jako katalog */
.shop { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1rem; }
.shop .row { border: 1px solid var(--frame); border-radius: 10px; background: var(--surface); box-shadow: var(--drop); overflow: hidden; transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.shop .row:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgb(23 35 59 / 0.08), 0 18px 32px -18px rgb(23 35 59 / 0.5); }
.shop .row-link { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; height: 100%; }
.shop .thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 0; }
.shop .thumb-ic .ic { width: 3rem; height: 3rem; stroke-width: 1.4; }
.shop .row-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.7rem 0.8rem 0.8rem; flex: 1; }
.shop .row-title { font-size: 1.125rem; line-height: 1.25; }
.shop .row-meta { margin: auto 0 0; gap: 0.4rem 0.6rem; }
.shop .price { font-size: 1.0625rem; flex-basis: 100%; }
@media (max-width: 34rem) {
  .shop { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; }
  .shop .row-body { padding: 0.55rem 0.6rem 0.65rem; }
  .shop .row-title { font-size: 1rem; }
  .shop .row-meta { font-size: 0.875rem; }
}

/* ---- Můj dům: dům v řezu ------------------------------------------------
   Každá místnost je jedna služba. Svítí, když je zapsaná; klepnutím se vpravo
   otevře její karta (bez JavaScriptu jsou karty pod sebou). */

.hq-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.stat { display: grid; gap: 0.25rem; align-content: start; min-width: 0; padding: 0.6rem 0.8rem 0.7rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.stat p { margin: 0; }
.stat-level { grid-column: 1 / -1; }
.stat-label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.875rem; color: var(--muted); }
.stat-label .ic { width: 1.125rem; height: 1.125rem; }
.stat-num { font: 800 1.75rem/1.05 var(--display); font-variant-numeric: tabular-nums; }
.stat-num small { font: 400 0.9375rem/1.2 var(--body); color: var(--muted); }
.stat-save .stat-num { color: var(--paid); }
.stat-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.75rem; font: 800 1.5rem/1.1 var(--display); }
.stars { display: inline-flex; gap: 0.1rem; color: var(--edge); }
.stars .ic { width: 1.25rem; height: 1.25rem; }
.stars .is-on { color: var(--lamp-deep); fill: var(--lamp); }
.hb-xp { margin-top: 0.15rem; }
.hb-xp::-webkit-progress-value { background-color: var(--lamp); }
.hb-xp::-moz-progress-bar { background-color: var(--lamp); }
.hb-next { font-size: 0.875rem; color: var(--muted); }
@media (min-width: 48rem) {
  .hq-stats { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); }
  .stat-level { grid-column: auto; }
}

.hq { display: grid; gap: 1.25rem; margin-top: 1rem; }
@media (min-width: 58rem) { .hq { grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); align-items: start; } }

/* Barvy průčelí podle skutečné řady domů */
.cut { --wall: #f1ede2; --roof: #b9523a; --trim: #6a4a3a; position: relative; width: 100%; max-width: 27rem; margin: 1.1rem auto 0; padding-right: 6rem; max-width: 30.5rem; }
.hb-salmon .cut { --wall: #e39c7c; --roof: #5e4740; }
.hb-terracotta .cut { --wall: #bd6b43; --roof: #5e4740; }
.hb-green .cut { --wall: #c9d4a0; --roof: #5e4740; }
.cut-roof { position: relative; display: grid; padding: 0.9rem 19% 0.5rem; }
.cut-roof::before, .cut-roof::after { content: ''; position: absolute; clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%); }
.cut-roof::before { inset: 0; background: var(--outline); }
.cut-roof::after { inset: 1.5px 2.5px 0; background: var(--roof) repeating-linear-gradient(to bottom, transparent 0 0.6rem, rgb(0 0 0 / 0.17) 0.6rem calc(0.6rem + 2px)); }
.cut-chimney { position: absolute; left: 22%; bottom: 100%; width: 1.5rem; height: 1.1rem; background: var(--trim); border: 1.5px solid var(--outline); border-bottom: 0; border-radius: 3px 3px 0 0; }
.cut-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0 3.5%; padding: 0.5rem; background: var(--wall); border: 1.5px solid var(--outline); }
.cut-ground { height: 0.7rem; margin-right: -6rem; border: 1.5px solid var(--outline); border-radius: 0 0 5px 5px; background: #b9bfc7; }

.room {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  min-height: 9rem; padding: 0; overflow: hidden;
  border: 1.5px solid var(--outline); border-radius: 5px; text-decoration: none; cursor: pointer;
  color: #1b2436; background: #f8e7b5 radial-gradient(circle at 50% 30%, #fff6da 0, transparent 70%);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  animation: light-up 0.6s var(--ease) backwards;
}
.cut-roof .room { min-height: 7.75rem; }
.room:nth-child(2) { animation-delay: 90ms; }
.room:nth-child(3) { animation-delay: 180ms; }
.room:nth-child(4) { animation-delay: 270ms; }
.cut-roof .room { animation-delay: 360ms; }
@keyframes light-up { from { background-color: #27324b; filter: brightness(0.55); } }
.room:hover { color: #1b2436; transform: translateY(-2px); }
.room.is-selected, .thing.is-selected { box-shadow: 0 0 0 3px var(--lamp), 0 0 0 4.5px var(--outline); z-index: 2; }
.room.is-empty { color: #fff; background: #27324b; animation: none; }
.room.is-empty:hover { color: #fff; }
.room.is-unused { background: #e6e1d1; animation: none; }
.room-garage.is-ok { background: #f3dfa6 repeating-linear-gradient(to bottom, transparent 0 0.85rem, rgb(27 36 54 / 0.13) 0.85rem calc(0.85rem + 2px)); }
.room-garage.is-empty { background: #27324b repeating-linear-gradient(to bottom, transparent 0 0.85rem, rgb(0 0 0 / 0.3) 0.85rem calc(0.85rem + 2px)); }

.room-art { flex: 1 1 0; min-height: 0; display: block; width: 100%; padding: 0.35rem 0.35rem 0; pointer-events: none; }
.a-l { fill: none; stroke: #1b2436; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.a-w { fill: #fff; stroke: #1b2436; stroke-width: 1.75; stroke-linejoin: round; }
.a-d { fill: #1b2436; }
.a-y { fill: #f2b21b; stroke: #1b2436; stroke-width: 1.75; stroke-linejoin: round; }
.a-glow { fill: #f2b21b; opacity: 0.3; }
.a-water { fill: #3f8fe0; stroke: #1b2436; stroke-width: 1.75; stroke-linejoin: round; }
.a-flame { fill: #f2761b; }
.a-green { fill: #3d8a5f; stroke: #1b2436; stroke-width: 1.75; stroke-linejoin: round; }
.a-blue { fill: #2f66c4; stroke: #1b2436; stroke-width: 1.75; stroke-linejoin: round; }
.a-led { fill: #3bb273; }
.is-empty .a-l { stroke: #8fa0c2; }
.is-empty .a-w, .is-empty .a-y, .is-empty .a-green, .is-empty .a-blue { fill: #36435f; stroke: #8fa0c2; }
.is-empty .a-d { fill: #151d30; }
.is-empty .a-on, .is-unused .a-on { display: none; }
.is-unused .room-art { opacity: 0.5; }
.is-ok .a-wave { animation: wave 2.4s ease-in-out infinite; }
.is-ok .a-wave + .a-wave { animation-delay: 0.3s; }
@keyframes wave { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.is-ok .a-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.1s ease-in-out infinite alternate; }
@keyframes flicker { to { transform: scale(0.86, 1.08); } }
.is-ok .a-drip { animation: drip 1.8s ease-in infinite; }
@keyframes drip { 0%, 15% { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }

/* Popisek místnosti: stojí na něm zařízení jako na podlaze */
.room-cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.1rem 0.4rem; padding: 0.3rem 0.45rem; background: #1b2436; color: #fff; font-size: 0.875rem; line-height: 1.25; }
.room-name { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 700; }
.room-name .ic { width: 1.125rem; height: 1.125rem; }
.room-val { font: 700 1.0625rem/1.15 var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; color: #fff; white-space: nowrap; }
.is-empty .room-cap { background: #151d30; }
.is-empty .room-val { display: inline-flex; align-items: center; gap: 0.15rem; padding: 0.1rem 0.45rem 0.1rem 0.25rem; border-radius: var(--r-plate); background: var(--lamp); color: var(--on-lamp); font: 700 0.8125rem/1.2 var(--body); letter-spacing: 0; }
.is-empty .room-val .ic { width: 1rem; height: 1rem; }
.is-unused .room-cap { background: #5b6478; }
.is-unused .room-val { color: #e3e7ef; font: 600 0.8125rem/1.3 var(--body); letter-spacing: 0; }
.room-flag { position: absolute; z-index: 1; top: 0.4rem; left: 0.4rem; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid #fff; color: #fff; background: var(--sign); }
.room-flag .ic { width: 1.05rem; height: 1.05rem; stroke-width: 2.2; }
.room-flag.is-late { animation: blink 1.4s ease-in-out infinite; }
.room-flag.is-soon { background: var(--lamp); color: var(--on-lamp); border-color: #1b2436; }
.room-flag.is-tip { background: #1f7a4c; }

/* Lampa ulice vedle domu: svítí, když je zaplacený příspěvek do společné pokladny. Popisek je nad ní. */
.cut-lamp { position: absolute; right: 0; bottom: 0.7rem; width: 6rem; display: grid; justify-items: center; gap: 0.35rem; color: var(--text); text-decoration: none; }
.cut-lamp:hover { color: var(--text); }
.cut-lamp svg { display: block; width: 4.25rem; height: 10rem; overflow: visible; }
.cl-post { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.cl-glass { fill: #6c7890; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.cut-lamp.is-on .cl-glass { fill: var(--lamp); }
.cl-glow { fill: var(--lamp); opacity: 0; }
.cl-beam { fill: var(--lamp); opacity: 0; }
.cut-lamp.is-on .cl-glow { opacity: 0.3; }
.cut-lamp.is-on .cl-beam { opacity: 0.13; }
.cut-lamp-cap { display: grid; justify-items: center; text-align: center; font-size: 0.8125rem; line-height: 1.25; }
.cut-lamp-cap strong { font-size: 0.875rem; }
.cut-lamp-cap span { display: inline-flex; align-items: center; gap: 0.2rem; font-weight: 600; color: var(--lamp-ink); }
.cut-lamp-cap .ic { width: 0.9375rem; height: 0.9375rem; stroke-width: 2.4; }
.cut-lamp.is-on .cut-lamp-cap span { color: var(--paid); }
.cut-lamp:hover .cut-lamp-cap strong { text-decoration: underline; }
.cl-flag { fill: var(--sign); stroke: #fff; stroke-width: 1.75; }
.cl-mark { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.cut-lamp.is-on .cl-flag, .cut-lamp.is-on .cl-mark { display: none; }

/* Obývák: další výdaje domu jako věci na polici */
.cut-living { margin: 0 3.5%; padding: 0.5rem 0.5rem 0; background: var(--wall); border: 1.5px solid var(--outline); border-width: 0 1.5px; }
.living { position: relative; z-index: 1; display: flex; flex-direction: column; border: 1.5px solid var(--outline); border-radius: 5px; overflow: hidden; background: #f8e7b5 radial-gradient(circle at 50% 20%, #fff6da 0, transparent 70%); }
.living.is-empty { background: #27324b; }
.things { list-style: none; margin: 0; padding: 0.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr)); gap: 0.4rem; }
.thing {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 0.1rem; height: 100%; min-height: 5.25rem; padding: 0.5rem 0.3rem 0.4rem;
  border-radius: 6px; background: rgb(255 255 255 / 0.82); color: #1b2436; text-decoration: none; text-align: center; line-height: 1.2;
  box-shadow: inset 0 0 0 1px rgb(27 36 54 / 0.22); transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.thing:hover { color: #1b2436; transform: translateY(-2px); }
.thing-ic { display: grid; }
.thing-ic .ic { width: 1.625rem; height: 1.625rem; }
.thing-name { max-width: 100%; font-size: 0.8125rem; font-weight: 700; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.thing-val { font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: #4a546b; }
.thing .room-flag { top: 0.25rem; left: 0.25rem; width: 1.4rem; height: 1.4rem; }
.thing .room-flag .ic { width: 0.9rem; height: 0.9rem; }
.thing-add { background: transparent; box-shadow: inset 0 0 0 1.5px rgb(27 36 54 / 0.4); border-radius: 6px; }
.thing-add .thing-val { white-space: normal; }
.living.is-empty .thing-add { color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.4); }
.living.is-empty .thing-add:hover { color: #fff; }
.living.is-empty .thing-add .thing-val { color: #b9c5dc; }
.living.is-empty .thing-add .thing-ic { color: var(--lamp); }
.living.is-empty .things { grid-template-columns: 1fr; }
.living.is-empty .room-cap { background: #151d30; }
.cut-body { border-top: 0; }

/* Karta služby */
.insp-list { display: grid; gap: 0.75rem; align-content: start; min-width: 0; }
.insp { display: grid; gap: 0.75rem; align-content: start; min-width: 0; padding: 1rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; scroll-margin-top: 6.5rem; }
.is-live .insp:not(.is-open) { display: none; }
.is-live .insp.is-open { animation: rise 0.28s var(--ease); }
.insp p, .insp form { margin: 0; }
.insp h3 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; font-size: 1.625rem; }
.insp h3 .ic { width: 1.625rem; height: 1.625rem; color: var(--link); }
.insp h3 .tag { font-family: var(--body); }
.insp-who { font-weight: 600; font-size: 1.125rem; overflow-wrap: anywhere; }
.insp-who span { font-weight: 400; color: var(--muted); }
.insp-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem; }
.insp-sum strong { font: 800 2.25rem/1 var(--display); font-variant-numeric: tabular-nums; }
.insp-sum small { color: var(--muted); flex-basis: 100%; }
.insp-due { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.6rem 0.75rem; border-radius: var(--r-ctl); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.insp-due > span { display: inline-flex; align-items: center; gap: 0.5rem; line-height: 1.25; font-weight: 600; }
.insp-due small { display: block; font-weight: 400; }
.insp-due .ic { width: 1.25rem; height: 1.25rem; }
.insp-due.is-soon { background: var(--lamp-soft); color: var(--lamp-ink); box-shadow: inset 0 0 0 1.5px var(--lamp-line); }
.insp-due.is-late { background: var(--sign-soft); color: var(--sign-ink); box-shadow: none; }
.insp-due .btn { margin-bottom: 3px; }

/* Srovnání: vy, průměr ulice, nejlevnější nabídka */
.cmp { margin: 0; display: grid; gap: 0.45rem; }
.cmp figcaption { font-size: 0.875rem; color: var(--muted); }
.cmp-row { display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(2rem, 1fr) auto; align-items: center; gap: 0.6rem; font-size: 0.9375rem; line-height: 1.25; }
.cmp-row span { overflow-wrap: anywhere; }
.cmp-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp progress { height: 0.625rem; border-radius: 4px; }
.cmp progress::-webkit-progress-value { border-radius: 0 4px 4px 0; }
.cmp progress::-moz-progress-bar { border-radius: 0 4px 4px 0; }
.cmp-street progress::-webkit-progress-value { background-color: var(--edge); }
.cmp-street progress::-moz-progress-bar { background-color: var(--edge); }
.cmp-best progress::-webkit-progress-value { background-color: var(--paid); }
.cmp-best progress::-moz-progress-bar { background-color: var(--paid); }
.cmp-me span { font-weight: 700; }
.insp-tip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.6rem 0.75rem; border-radius: var(--r-ctl); background: var(--paid-soft); color: var(--paid-ink); }
.insp-tip span { flex: 1 1 13rem; }
.insp-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem; }
.insp-links a, .insp-links .link { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem; font-weight: 600; font-size: 0.9375rem; }
.insp-links .ic { width: 1.125rem; height: 1.125rem; }
.insp-note { font-size: 0.9375rem; flex-basis: 100%; order: 9; }
.hb-money { margin: 1rem 0 0; }

@media (max-width: 34rem) {
  .cut-roof { padding-inline: 17%; }
  .cut-body { gap: 0.375rem; padding: 0.375rem; }
  .cut-living { padding: 0.375rem 0.375rem 0; }
  .things { grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); padding: 0.375rem; }
  .room { min-height: 8.25rem; }
  .room-cap { font-size: 0.8125rem; padding: 0.25rem 0.35rem; }
  .room-val { font-size: 1rem; }
  .insp-sum strong { font-size: 2rem; }
  .cmp-row { grid-template-columns: minmax(0, 6.5rem) minmax(1.5rem, 1fr) auto; }
}

/* Úkoly a nápady: řádek, odměna, jeden krok */
.moves { list-style: none; margin: -0.5rem 0; padding: 0; }
.move { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.5rem 0.875rem; align-items: center; padding: 0.75rem 0; }
.move + .move { border-top: 1px solid var(--line); }
.move-ic { color: var(--link); display: grid; }
.move-main { display: grid; line-height: 1.35; }
.move-main strong { overflow-wrap: anywhere; }
.move-main span { font-size: 0.9375rem; }
.move-go { display: flex; align-items: center; gap: 0.625rem; }
.move-pts { padding: 0.15rem 0.5rem; border-radius: 99px; background: var(--lamp-soft); color: var(--lamp-ink); font-weight: 700; font-size: 0.875rem; font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--lamp-line); }
details .moves { margin-top: 0.25rem; }
.gw > details.inline-more { margin-top: 0.75rem; }
@media (max-width: 34rem), (min-width: 60rem) and (max-width: 74rem) {
  .move { grid-template-columns: auto minmax(0, 1fr); }
  .move-go { grid-column: 2; }
}

/* Stav ulice: hodnocení jako ve hře */
.sg-main { display: grid; gap: 1rem 1.25rem; }
@media (min-width: 36rem) { .sg-main { grid-template-columns: auto minmax(0, 1fr); align-items: center; } }
.sg-dial { display: grid; justify-items: center; gap: 0.15rem; min-width: 8.5rem; margin: 0; padding: 0.75rem 1rem 0.7rem; text-align: center; background: var(--chrome); color: #b9c5dc; border-radius: 10px; font-size: 0.875rem; line-height: 1.25; }
.sg-dial strong { font: 800 3.25rem/1 var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.sg-dial b { color: #fff; font-size: 0.9375rem; }
.sg-stats { list-style: none; margin: 0; padding: 0; }
.sg-stats li { display: grid; grid-template-columns: minmax(0, 10.5rem) minmax(3rem, 1fr); align-items: center; gap: 0 0.75rem; padding: 0.3rem 0; }
.sg-label { grid-row: span 2; display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; line-height: 1.25; }
.sg-label .ic { color: var(--link); width: 1.375rem; height: 1.375rem; }
.sg-text { color: var(--muted); font-size: 0.875rem; }
.sg-stats .is-weak progress::-webkit-progress-value { background-color: var(--lamp); }
.sg-stats .is-weak progress::-moz-progress-bar { background-color: var(--lamp); }
.sg-weak { margin: 0.75rem 0 0; color: var(--muted); }
@media (max-width: 26rem) { .sg-stats li { grid-template-columns: minmax(0, 8rem) minmax(3rem, 1fr); } }

.wish-rows { margin-top: 1.25rem; }

/* ---- Lampy, které nesvítí --------------------------------------------- */

.lamp-dot { flex: none; display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--sign); color: #fff; }
.lamp-dot .ic { width: 1.375rem; height: 1.375rem; }
.lamp-dot.is-ok { background: var(--lamp); color: var(--on-lamp); }
.lamp-alerts { list-style: none; margin: 0; padding: 0; }
.lamp-alerts li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.5rem 0.75rem; background: var(--sign-soft); color: var(--sign-ink); }
.lamp-alerts li + li { border-top: 1px solid rgb(190 22 34 / 0.18); }
.lamp-alerts li > span:nth-child(2) { flex: 1 1 14rem; }
.lamp-alerts .muted { color: inherit; opacity: 0.8; }
.lamp-alerts .lamp-dot, .lamp-flag { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { box-shadow: 0 0 0 0.45rem rgb(190 22 34 / 0); background-color: #e5352b; } 0%, 100% { box-shadow: 0 0 0 0 rgb(190 22 34 / 0.55); } }
.lamp-flag {
  position: absolute; left: 0; top: 0; z-index: 4000; pointer-events: auto; cursor: pointer;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 2px solid #fff; border-radius: 50%;
  background: var(--sign); color: #fff;
}
.lamp-flag .ic { width: 1.5rem; height: 1.5rem; }
.card-facts .is-bad { color: var(--sign); font-weight: 600; }
.map-card form.stack { gap: 0.5rem; }
.tiles-lamps { grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); }
.mp-paved { fill: #d9dde2; }
.mp-lamp { fill: var(--lamp); stroke: #fff; stroke-width: 0.5; }
.mp-lamp.is-broken { fill: var(--sign); animation: plan-blink 1.4s ease-in-out infinite; }
@keyframes plan-blink { 50% { opacity: 0.25; } }

/* ---- Pohyb ------------------------------------------------------------ */

/* Přechod mezi stránkami: hlavička a lišty zůstanou stát, obsah se prolne. */
@view-transition { navigation: auto; }
.top { view-transition-name: top; }
.hud { view-transition-name: hud; }
.nav { view-transition-name: nav; }
::view-transition-old(root) { animation: 0.12s ease-in both vt-out; }
::view-transition-new(root) { animation: 0.28s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(0.5rem); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .map-hint { animation: none; }
  .lamp-alerts .lamp-dot, .lamp-flag, .mp-lamp.is-broken, .room-flag.is-late, .a-wave, .a-flame, .a-drip { animation: none !important; }
  .a-drip { opacity: 1; }
}

@media print {
  .top, .nav, .hud, .foot, details.admin, .actions, .skip, .map-tools { display: none; }
  body { background: #fff; padding: 0; }
  .block, .gw, .panel, .fund { box-shadow: none; }
}

/* Stránka domu */
.house-page > .house-head { margin-bottom: 1rem; }
.house-more { margin: 0.75rem 0 0; }

/* Úvodní stránka: pravý sloupec vedle mapy – můj dům a úkoly */
.side { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
.side > * { margin-top: 0; }
.myhouse { display: grid; gap: 0.75rem; }
.myhouse-top { display: flex; align-items: center; gap: 0.875rem; }
.myhouse-top h2 { margin: 0; font-size: 1.625rem; }
.myhouse-top p { margin: 0.1rem 0 0; }
.myhouse-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 0; }
.myhouse-facts dt { font-size: 0.875rem; color: var(--muted); }
.myhouse-facts dd { margin: 0; font: 700 1.375rem/1.2 var(--display); font-variant-numeric: tabular-nums; }
.myhouse-facts small { font: 400 0.875rem/1.2 var(--body); color: var(--muted); }
.page-head .house-head { margin: 0; }
.page-head .house-head p { max-width: 34rem; }
.living.is-empty .room-val { padding: 0; background: none; color: #b9c5dc; font: 400 0.8125rem/1.3 var(--body); }
@media (min-width: 58rem) { .insp-list { position: sticky; top: 5.75rem; } }


/* Značky nad domem, který něco nabízí: svítí jako vývěsní štít */
.mp-offers {
  position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%);
  display: flex; gap: 0.2rem; padding: 0.2rem 0.4rem; border-radius: 99px;
  background: var(--lamp); color: var(--on-lamp); box-shadow: 0 0 0 1.5px rgb(27 36 54 / 0.55), 0 0 14px 2px rgb(242 178 27 / 0.55);
  pointer-events: none;
}
.mp-offers .ic { width: 0.9375rem; height: 0.9375rem; stroke-width: 2; }
.mp-offers::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 4px; background: rgb(27 36 54 / 0.55); }
.map-labels .mp { position: absolute; }
.map-labels .mp.is-small .mp-offers { display: none; }
.card-offers { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.card-offers:empty { display: none; }
.card-offers a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.3rem 0.6rem; border-radius: var(--r-ctl); background: var(--lamp-soft); color: var(--text); text-decoration: none; font-size: 0.9375rem; line-height: 1.25; }
.card-offers a:hover { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--lamp-deep); }
.card-offers .ic { width: 1.25rem; height: 1.25rem; color: var(--lamp-ink); }
.card-offers span { font-weight: 600; overflow-wrap: anywhere; }
.card-offers b { font-size: 0.875rem; white-space: nowrap; color: var(--muted); font-weight: 600; }
.card-more { font-size: 0.875rem; color: var(--muted); }

.lamp-box { background: var(--sign-soft); color: var(--sign-ink); scroll-margin-top: 6rem; }
.lamp-box > summary { display: flex; align-items: center; gap: 0.75rem; min-height: 3.25rem; padding: 0.5rem 0.75rem; cursor: pointer; list-style: none; }
.lamp-box > summary::-webkit-details-marker { display: none; }
.lamp-box > summary > span:nth-child(2) { flex: 1; }
.lamp-box > summary > .ic { width: 1.25rem; height: 1.25rem; transition: transform 0.2s var(--ease); }
.lamp-box[open] > summary > .ic { transform: rotate(90deg); }
.lamp-box .muted { color: inherit; opacity: 0.8; }
.lamp-box .lamp-alerts li { border-top: 1px solid rgb(190 22 34 / 0.18); }
.lamp-box > summary .lamp-dot { animation: blink 1.4s ease-in-out infinite; }

/* Úvodní stránka: mapa přes celou šířku, panel „můj dům + co mě čeká“ leží přes její levý okraj */
.dock { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.dock > * { margin-top: 0; }
.myhouse-line { margin: 0; font-size: 0.9375rem; color: var(--muted); }
.myhouse-line strong { color: var(--text); }
/* Mapa na úvodní stránce zabírá celé okno prohlížeče: od okraje k okraji, mezi hlavičkou a stavovým řádkem. */
.page.is-world { max-width: none; padding: 0 0 3rem; }
.page.is-world > .flash { margin: 1rem; }
.page-in { max-width: 76rem; margin: 0 auto; padding: 0 1rem; }
.is-world .world { display: block; }
.is-world .map { margin: 0; border-width: 0 0 1px; border-radius: 0; box-shadow: none; }
.is-world .dock { padding: 1rem 1rem 0; }
@media (min-width: 66rem) {
  /* výška: okno bez hlavičky (4,6 rem), lišty mapy (3,55 rem) a stavového řádku (3 rem) */
  .world { --map-h: max(26rem, calc(100vh - 11.15rem)); position: relative; }
  .world .map-view { height: var(--map-h); }
  .is-world .map-bar { padding-inline: 1rem; }
  /* na herní obrazovce se i hlavička a stavový řádek roztáhnou k okrajům, ať vše lícuje s mapou */
  .is-world .dock {
    position: absolute; z-index: 4600; left: 1rem; top: 4.3rem; width: 21rem; gap: 0.75rem; padding: 0;
    max-height: calc(var(--map-h) - 1.5rem); overflow-y: auto; scrollbar-width: thin; border-radius: var(--r-win);
  }
  .dock > .gw { padding: 0.875rem; box-shadow: 0 12px 30px -14px rgb(8 14 28 / 0.7); background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(8px); }
  .dock > .gw .gw-bar { margin: -0.875rem -0.875rem 0.875rem; padding: 0.4rem 0.875rem; min-height: 3rem; }
  .dock .myhouse { gap: 0.6rem; }
  .dock .myhouse-top .plate-l { min-width: 3.25rem; min-height: 2.75rem; font-size: 1.5rem; }
  .dock .myhouse-top h2 { font-size: 1.375rem; }
  .dock .todo li { grid-template-columns: auto minmax(0, 1fr); gap: 0.4rem 0.6rem; padding: 0.6rem 0; }
  .dock .todo li > .btn, .dock .todo li > form { grid-column: 2; justify-self: start; }
  .dock .todo .btn { min-height: 2.75rem; padding: 0.3rem 0.9rem; }
  .map[data-variant='hero'] .map-card { left: auto; right: 4.5rem; }
  .map[data-variant='hero'] .map-rover { left: 23rem; }
  .map[data-variant='hero'] .map-tools { right: 1rem; }
  .map[data-variant='hero'] .map-hint { left: calc(50% + 10.5rem); }
}

/* Věci v obýváku jsou nakreslené stejně jako zařízení v místnostech */
.thing-art { display: block; width: 3.5rem; height: 2.5rem; margin-bottom: 0.15rem; }
.a-ok { fill: none; stroke: #1f7a4c; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.thing { min-height: 6.25rem; }

/* ---- Sousedé: domky v barvě své řady ----------------------------------- */

.hico { flex: none; width: 2.75rem; height: 2.5rem; }
.hico path { stroke: var(--outline); stroke-width: 1.25; stroke-linejoin: round; }
.hico-wall { fill: #f7f5ef; }
.hico-roof { fill: #c4573a; }
.hico-base { fill: #e9d8ba; }
.hico-dark { fill: #44506a; stroke-width: 0 !important; }
.hico-salmon .hico-wall { fill: #e39c7c; }
.hico-terracotta .hico-wall { fill: #bd6b43; }
.hico-terracotta .hico-base { fill: #e3cfa9; }
.hico-green .hico-wall { fill: #c9d4a0; }
.hico-green .hico-base { fill: #e6e4c8; }
.hico-salmon .hico-roof, .hico-terracotta .hico-roof, .hico-green .hico-roof { fill: #5e4740; }
.hico-plain .hico-wall { fill: var(--surface-2); }
.hico-plain .hico-roof { fill: var(--edge); }

.nb-stats { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.nb-stats li { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.25rem; padding: 0 0.75rem 0 0.6rem; border-radius: var(--r-ctl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--frame); font-size: 0.9375rem; color: var(--muted); }
.nb-stats .ic { width: 1.125rem; height: 1.125rem; color: var(--link); }
.nb-stats strong { color: var(--text); font: 700 1.125rem/1 var(--display); font-variant-numeric: tabular-nums; }
.nb-stats .is-due { background: var(--lamp-soft); color: var(--lamp-ink); box-shadow: inset 0 0 0 1px var(--lamp-line); }
.nb-stats .is-due .ic, .nb-stats .is-due strong { color: var(--lamp-ink); }

.nb-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.25rem; }
.nb-tools > details > summary { list-style: none; }
.nb-tools > details > summary::-webkit-details-marker { display: none; }
.nb-tools > details[open] { flex: 1 1 100%; order: 9; }
.nb-tools > details[open] > summary { background: var(--pill); color: #fff; box-shadow: none; margin-bottom: 0.75rem; }
.nb-tools > details > .panel { margin: 0; max-width: 44rem; }
.nb-tools form { margin: 0; }

.nb-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: 0.875rem; align-items: start; }
.nb { min-width: 0; padding: 0.75rem; background: var(--surface); border: 1px solid var(--frame); border-radius: var(--r-win); box-shadow: var(--drop); scroll-margin-top: 6rem; }
.nb.is-me { border-color: var(--lamp-deep); box-shadow: 0 0 0 2px var(--lamp), var(--drop); }
.nb.is-empty { background: transparent; box-shadow: none; border-style: dashed; border-color: var(--edge); }
.nb:target { box-shadow: 0 0 0 3px var(--lamp), var(--drop); }
.nb-head { display: flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; color: var(--text); text-decoration: none; }
.nb-head:hover { color: var(--text); }
.nb-head:hover strong { text-decoration: underline; text-underline-offset: 0.18em; }
.nb-title { display: grid; min-width: 0; line-height: 1.25; }
.nb-title strong { font: 700 1.1875rem/1.2 var(--display); overflow-wrap: anywhere; }
.nb-title small { color: var(--muted); }
.nb-people { list-style: none; margin: 0.5rem 0 0; padding: 0.25rem 0 0; border-top: 1px solid var(--line); }
.nb-people li { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 0.6rem; min-height: 2.75rem; padding: 0.2rem 0; }
.nb-people li:has(.nb-edit) { padding-right: 2.75rem; }
.nb-people li + li { border-top: 1px solid var(--line); }
.nb-dot { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--lamp-soft); color: var(--lamp-ink); }
.nb-dot .ic { width: 1rem; height: 1rem; stroke-width: 2; }
.nb-dot.is-in { background: var(--paid-soft); color: var(--paid); }
.nb-dot.is-plain { background: var(--surface-2); color: var(--muted); }
.nb-name { min-width: 0; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.nb-name small { display: block; font-weight: 400; color: var(--muted); }
.nb-edit { grid-column: 1 / -1; }
.nb-edit > summary { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--r-ctl); color: var(--muted); cursor: pointer; list-style: none; }
.nb-edit > summary::-webkit-details-marker, .nb-house > summary::-webkit-details-marker { display: none; }
.nb-edit > summary:hover { background: var(--surface-2); color: var(--text); }
.nb-edit[open] > summary { background: var(--pill); color: #fff; }
.nb-edit > summary .ic { width: 1.25rem; height: 1.25rem; }
.nb-form { display: grid; gap: 0.6rem; margin: 0.6rem 0 0; }
.nb-form .field > span { font-size: 0.875rem; }
.nb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.nb-form .btn { justify-self: start; }
.nb-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0.5rem; }
.nb-acts form { margin: 0; }
.nb-acts .btn { min-height: 2.75rem; padding: 0.3rem 0.8rem; font-size: 0.9375rem; }
.nb-house { margin-top: 0.35rem; }
.nb-house > summary { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; color: var(--muted); font-size: 0.9375rem; font-weight: 600; cursor: pointer; list-style: none; }
.nb-house > summary:hover { color: var(--text); }
.nb-house > summary .ic { width: 1.125rem; height: 1.125rem; }
.nb-loose { margin: -0.5rem 0; border-top: 0; max-width: 34rem; }

/* ---- Herní rám na všech stránkách --------------------------------------
   Nahoře tmavá lišta se záložkami, dole stavový řádek; obě od okraje k okraji okna. */
.top { background: var(--chrome); border-bottom: 0; }
.top-in, .hud-in { max-width: none; }
.who, .who:hover { color: #fff; }
.hud { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08); }
@media (min-width: 66rem) {
  .top-in { padding-block: 0.4rem; }
  .nav { align-self: stretch; gap: 0.25rem; }
  .nav a { position: relative; min-height: 3.25rem; padding: 0 0.85rem; color: #d5ddec; border-radius: 6px; font-weight: 600; }
  .nav a:hover { color: #fff; background: rgb(255 255 255 / 0.08); }
  .nav a[aria-current], .nav a[aria-current]:hover { color: #fff; background: rgb(255 255 255 / 0.1); }
  /* vybraná záložka svítí žlutou linkou jako lampa */
  .nav a[aria-current]::after { content: ''; position: absolute; left: 0.6rem; right: 0.6rem; bottom: -0.4rem; height: 3px; border-radius: 3px 3px 0 0; background: var(--lamp); box-shadow: 0 0 10px 1px rgb(242 178 27 / 0.6); }
}

/* ---- Úvodní obrazovka: záložky panelu na mapě ---------------------------- */
.dock-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.25rem; padding: 0.25rem; background: var(--chrome); border-radius: 10px; box-shadow: 0 12px 30px -14px rgb(8 14 28 / 0.7); }
.dock-tabs[hidden] { display: none; }
.dock-tabs button {
  position: relative; display: grid; justify-items: center; gap: 0.1rem; min-height: 3.25rem; padding: 0.35rem 0.2rem 0.3rem;
  font: 600 0.8125rem/1.2 var(--body); color: #c9d3e6; background: transparent; border: 0; border-radius: 7px; cursor: pointer;
}
.dock-tabs button .ic { width: 1.25rem; height: 1.25rem; }
.dock-tabs button:hover { color: #fff; background: rgb(255 255 255 / 0.08); }
.dock-tabs button[aria-selected='true'] { color: var(--on-lamp); background: #fff; }
.dock-tabs .badge { top: 0.2rem; right: 0.35rem; }
.dock-pane[hidden] { display: none; }
.dock-sub { font-size: 1.125rem; margin: 1rem 0 0.25rem; }
.sg-name { margin: 0 0 0.5rem; font-size: 0.9375rem; color: var(--muted); }
.sg-name strong { color: var(--text); }
.sg-compact li { display: block; padding: 0; }
.sg-go { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(2.5rem, 1fr); align-items: center; gap: 0 0.6rem; width: 100%; min-height: 2.75rem; padding: 0.25rem 0.4rem; margin: 0 -0.4rem; font: inherit; color: inherit; text-align: left; background: none; border: 0; border-radius: var(--r-ctl); }
button.sg-go { width: calc(100% + 0.8rem); cursor: pointer; }
button.sg-go:hover { background: var(--surface-2); }
.chips { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 2.75rem; padding: 0 0.7rem 0 0.5rem; font: 700 0.9375rem/1 var(--body); color: var(--sign-ink); background: var(--sign-soft); border: 0; border-radius: var(--r-ctl); cursor: pointer; }
.chip .ic { width: 1.125rem; height: 1.125rem; }
.chip:hover { box-shadow: inset 0 0 0 1.5px currentColor; }
.rows-pin .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.25rem; }
.pin-btn { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; color: var(--link); background: none; border: 0; border-radius: var(--r-ctl); cursor: pointer; }
.pin-btn:hover { background: var(--number-soft); }
.pin-btn .ic { width: 1.375rem; height: 1.375rem; }
button.plate { border: 0; cursor: pointer; }
.is-world { padding-bottom: 1.5rem !important; }
@media (min-width: 66rem) {
  .is-world .dock { width: 22.5rem; }
  .is-world .dock .dock-pane { overflow: visible; }
  .is-world.page { padding-bottom: 0 !important; }
  body:has(.page.is-world) { padding-bottom: var(--foot); }
  .map[data-variant='hero'] .map-rover { left: 24.5rem; }
  .map[data-variant='hero'] .map-hint { left: calc(50% + 11.25rem); }
  .dock .moves .move { grid-template-columns: auto minmax(0, 1fr); padding: 0.6rem 0; }
  .dock .moves .move-go { grid-column: 2; }
  .dock .rows .row-link { padding: 0.55rem 0; }
  .dock .rows .row-title { font-size: 1rem; }
  .dock .rows .row-meta { font-size: 0.875rem; }
}

.insp-acts .btn { min-height: 2.75rem; padding: 0.35rem 0.85rem; font-size: 0.9375rem; }
.insp-links:empty { display: none; }

/* Dům: víc místa pro lampu; na telefonu menší */
@media (min-width: 58rem) { .hq { grid-template-columns: minmax(0, 30.5rem) minmax(0, 1fr); } }
@media (max-width: 34rem) {
  .cut { padding-right: 4.5rem; }
  .cut-ground { margin-right: -4.5rem; }
  .cut-lamp { width: 4.5rem; }
  .cut-lamp svg { width: 3.25rem; height: 8rem; }
}
.insp-tip-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.insp-solar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.6rem 0.75rem; border-radius: var(--r-ctl); background: var(--lamp-soft); color: var(--lamp-ink); }
.insp-solar > .ic { width: 1.375rem; height: 1.375rem; }
.insp-solar > span { flex: 1 1 13rem; }

/* Formulář výdaje: dlaždice po skupinách */
.tiles-head { grid-column: 1 / -1; margin: 0.5rem 0 0; font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.tiles-groups legend + .tiles-head { margin-top: 0; }
.kind-hint { margin: -0.5rem 0 0; min-height: 1.5rem; font-size: 0.9375rem; }
.kind-hint span[hidden] { display: none; }

/* Platby po skupinách */
.bill-group { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin: 0 -1rem; padding: 0.55rem 1rem; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bill-group:first-child { border-top: 0; margin-top: -0.5rem; }
.bill-group strong { font: 700 1.125rem/1.2 var(--display); }
.bill-group span { font-weight: 600; font-variant-numeric: tabular-nums; }
.bill-group + .bill { border-top: 0; }

/* Přechod k jinému poskytovateli */
.swap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 0.75rem; margin: 0 0 1rem; }
.swap-side { padding: 0.75rem 1rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.swap-side.is-new { background: var(--paid-soft); border-color: transparent; color: var(--paid-ink); }
.swap-side.is-new .muted { color: inherit; opacity: 0.8; }
.swap-side p { margin: 0; }
.swap-name { font-weight: 700; font-size: 1.125rem; overflow-wrap: anywhere; }
.swap-name small { display: block; font-weight: 400; }
.swap-sum strong { font: 800 1.75rem/1.2 var(--display); font-variant-numeric: tabular-nums; }
.swap-arrow { display: grid; place-items: center; color: var(--muted); }
.swap-details { margin: 1rem 0; color: var(--muted); }
.swap-steps { margin: 0; padding: 0; list-style: none; counter-reset: krok; display: grid; gap: 1rem; }
.swap-steps > li { position: relative; padding: 0 0 1rem 3.25rem; counter-increment: krok; border-bottom: 1px solid var(--line); }
.swap-steps > li:last-child { border-bottom: 0; padding-bottom: 0; }
.swap-steps > li::before { content: counter(krok); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--number); color: #fff; font: 700 1.125rem/1 var(--display); }
.swap-steps h3 { margin: 0.2rem 0 0.4rem; }
.swap-steps p { margin: 0 0 0.6rem; }
.swap-steps textarea { font-size: 0.9375rem; }
@media (max-width: 30rem) {
  .swap { grid-template-columns: 1fr; }
  .swap-arrow .ic { transform: rotate(90deg); }
  .swap-steps > li { padding-left: 2.75rem; }
}

/* ---- Kalendář plateb ---------------------------------------------------- */
.cal { scroll-margin-top: 5.5rem; }
.cal-body { display: grid; gap: 1.25rem; }
@media (min-width: 58rem) { .cal-body { grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); align-items: start; } }
.cal-head, .cal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.25rem; }
.cal-head { margin-bottom: 0.3rem; font-size: 0.8125rem; font-weight: 600; color: var(--muted); text-align: center; }
.cal-day > a, .cal-day > span { display: grid; grid-template-rows: auto 1fr auto; justify-items: start; gap: 0.1rem; min-height: 4rem; height: 100%; padding: 0.3rem 0.35rem; border-radius: 7px; background: var(--surface-2); color: var(--text); text-decoration: none; line-height: 1.15; }
.cal-num { font: 700 0.9375rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.cal-num small { margin-left: 0.2rem; font: 400 0.75rem/1 var(--body); color: var(--muted); }
.cal-day.is-weekend > span { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.cal-day.is-past > span, .cal-day.is-past > a { opacity: 0.5; }
.cal-day.has-pay > a { background: var(--number-soft); box-shadow: inset 0 0 0 1px rgb(30 76 154 / 0.25); }
.cal-day.has-pay > a:hover { box-shadow: inset 0 0 0 2px var(--link); }
.cal-day.is-late > a { background: var(--sign-soft); color: var(--sign-ink); box-shadow: inset 0 0 0 1px rgb(190 22 34 / 0.3); }
.cal-day.is-today > a, .cal-day.is-today > span { outline: 2.5px solid var(--lamp); outline-offset: -1px; opacity: 1; }
.cal-ics { display: flex; gap: 0.1rem; color: var(--link); align-self: center; }
.cal-ics .ic { width: 1rem; height: 1rem; }
.cal-sum { font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-nodate { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.75rem 0 0; font-size: 0.9375rem; }
.cal-nodate .ic { width: 1.125rem; height: 1.125rem; margin-top: 0.15rem; }
.cal-sub { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.25rem; font-size: 1.125rem; scroll-margin-top: 6rem; }
.cal-list + .cal-sub { margin-top: 1rem; }
.cal-sub.is-late { color: var(--sign); }
.cal-sub .ic { width: 1.25rem; height: 1.25rem; }
.cal-list { list-style: none; margin: -0.4rem 0 0; padding: 0; }
.cal-anchor { height: 0; scroll-margin-top: 6.5rem; }
.cal-item { display: grid; grid-template-columns: 3.75rem auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.3rem 0.75rem; min-height: 3.5rem; padding: 0.45rem 0.5rem; margin: 0 -0.5rem; border-radius: var(--r-ctl); border-top: 1px solid var(--line); }
.cal-list > .cal-item:first-of-type, .cal-anchor:first-child + .cal-item { border-top: 0; }
.cal-anchor:target + .cal-item, .cal-anchor:target + .cal-item + .cal-item:not(.cal-anchor + .cal-item) { background: var(--lamp-soft); }
.cal-date { display: grid; line-height: 1.15; }
.cal-date strong { font: 700 1.125rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.cal-date small { font-size: 0.75rem; color: var(--muted); }
.cal-ic { display: grid; color: var(--link); }
.cal-main { display: grid; min-width: 0; line-height: 1.3; }
.cal-main span { font-size: 0.875rem; overflow-wrap: anywhere; }
.cal-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-item .btn { min-height: 2.75rem; padding: 0.3rem 0.8rem; font-size: 0.9375rem; }
.cal-item form { margin: 0; }
.cal-gap { width: 0; }
.cal-item.is-late { color: var(--sign-ink); }
.cal-item.is-late .cal-ic, .cal-item.is-late .cal-date small { color: inherit; }
.cal-item.is-soon .cal-date strong { color: var(--lamp-ink); }
.cal-item[data-repeat] { color: var(--muted); }
.cal-item[data-repeat] .cal-ic { color: var(--muted); }
@media (max-width: 34rem) {
  /* na telefonu dny roztáhneme k okrajům okna, ať se do každého dá trefit prstem */
  .cal-grid-wrap { margin-inline: -0.5rem; }
  .cal-head, .cal-grid { gap: 2px; }
  .cal-day > a, .cal-day > span { min-height: 3.4rem; padding: 0.25rem; }
  .cal-ics .ic:nth-child(n + 2) { display: none; }
  .cal-sum { font-size: 0.6875rem; }
  .cal-item { grid-template-columns: 3.25rem auto minmax(0, 1fr) auto; }
  .cal-item .btn, .cal-item form { grid-column: 3 / -1; justify-self: start; }
  .cal-gap { display: none; }
}

/* ---- Rok domu: sloupcový graf po měsících -------------------------------
   Barvy skupin jsou ověřené sadou (rozlišitelné i při poruchách barvocitu); jména skupin nese tabulka. */
.yr {
  --yr-1: #2a78d6; --yr-2: #eb6834; --yr-3: #1baf7a; --yr-4: #eda100;
  scroll-margin-top: 5.5rem;
}
:root[data-theme='dark'] .yr { --yr-1: #3987e5; --yr-2: #d95926; --yr-3: #199e70; --yr-4: #c98500; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .yr { --yr-1: #3987e5; --yr-2: #d95926; --yr-3: #199e70; --yr-4: #c98500; } }
.yr-lead { margin: 0 0 0.5rem; min-height: 3.1em; max-width: 46rem; }
.yr-scroll { overflow-x: auto; margin: 0 -0.25rem; padding: 0 0.25rem; scrollbar-width: thin; }
.yr-chart { display: block; width: 100%; max-width: 46rem; min-width: 34rem; height: auto; }
.yr-grid { stroke: var(--line); stroke-width: 1; }
.yr-axis { stroke: var(--edge); stroke-width: 1; }
.yr-tick, .yr-month, .yr-year { font: 400 12px var(--body); fill: var(--muted); font-variant-numeric: tabular-nums; }
.yr-year { font-size: 11px; }
.yr-col { cursor: pointer; outline: 0; }
.yr-hit { fill: transparent; }
.yr-col:hover .yr-hit, .yr-col.is-on .yr-hit { fill: var(--surface-2); }
.yr-col:focus-visible .yr-hit { fill: var(--surface-2); stroke: var(--lamp); stroke-width: 2; }
.yr-col.is-now .yr-month, .yr-col.is-on .yr-month { fill: var(--text); font-weight: 700; }
.yr-g1 { fill: var(--yr-1); background: var(--yr-1); }
.yr-g2 { fill: var(--yr-2); background: var(--yr-2); }
.yr-g3 { fill: var(--yr-3); background: var(--yr-3); }
.yr-g4 { fill: var(--yr-4); background: var(--yr-4); }
.yr-table { width: 100%; max-width: 46rem; margin-top: 0.75rem; border-collapse: collapse; }
.yr-table th, .yr-table td { padding: 0.5rem 0 0.5rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-weight: 400; }
.yr-table th:first-child { padding-left: 0; }
.yr-table thead th { font-size: 0.875rem; color: var(--muted); }
.yr-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.yr-table tbody th:first-child { position: relative; padding-left: 1.5rem; }
.yr-key { position: absolute; left: 0; top: 0.85rem; width: 0.875rem; height: 0.875rem; border-radius: 3px; }
.yr-name { display: grid; font-weight: 600; line-height: 1.3; }
.yr-name small { font-weight: 400; color: var(--muted); }
.yr-table tfoot th, .yr-table tfoot td { border-bottom: 0; font-weight: 700; }
.yr-note { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.75rem 0 0; font-size: 0.9375rem; }
.yr-note .ic { width: 1.125rem; height: 1.125rem; margin-top: 0.15rem; }
@media (max-width: 34rem) {
  .yr-table thead th:nth-child(3), .yr-table td:nth-child(3) { display: none; }
  .yr-table th, .yr-table td { padding-left: 0.6rem; }
}

/* ---- Můj dům: skoky po stránce a archiv dokumentů ------------------------ */
.page-jump { margin: 0.25rem 0 1.25rem; }
#h-hb, #h-ukoly, #h-platby { scroll-margin-top: 6.5rem; }
.docs { scroll-margin-top: 5.5rem; }
.docs-add > summary { list-style: none; width: fit-content; }
.docs-add > summary::-webkit-details-marker { display: none; }
.docs-add[open] > summary { background: var(--pill); color: #fff; box-shadow: none; }
.docs-form { max-width: 44rem; margin-top: 1rem; padding: 1rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.docs-groups { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 0.875rem; }
.docs-group { min-width: 0; padding: 0.75rem 0.875rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.docs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; margin: 0 0 0.25rem; }
.docs-head .ic { width: 1.25rem; height: 1.25rem; color: var(--link); }
.docs-head .muted { font-size: 0.9375rem; overflow-wrap: anywhere; }
.docs-list { list-style: none; margin: 0; padding: 0; }
.docs-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.25rem; border-top: 1px solid var(--line); }
.docs-list form { margin: 0; }
.doc { display: flex; align-items: center; gap: 0.6rem; min-height: 3.25rem; padding: 0.35rem 0; color: var(--text); text-decoration: none; }
.doc:hover { color: var(--text); }
.doc:hover strong { text-decoration: underline; text-underline-offset: 0.18em; }
.doc-ic { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 7px; background: var(--surface); color: var(--link); box-shadow: inset 0 0 0 1px var(--line); }
.doc-ic .ic { width: 1.25rem; height: 1.25rem; }
.doc-main { display: grid; min-width: 0; line-height: 1.3; }
.doc-main strong { overflow-wrap: anywhere; }
.doc-main small { color: var(--muted); }
.doc-del { color: var(--muted); }
.doc-del:hover { color: var(--sign); background: var(--sign-soft); }
a.pin-btn { color: var(--muted); }
.docs-privacy { margin-top: 1rem; }
.docs > .empty { margin-top: 1rem; }

/* ---- Historie cen --------------------------------------------------------- */
.hist { scroll-margin-top: 5.5rem; }
.hist-rows { list-style: none; margin: -0.5rem 0 0; padding: 0; }
.hist-row { display: grid; grid-template-columns: minmax(0, 15rem) 11.25rem minmax(0, 1fr); align-items: center; gap: 0.25rem 1.25rem; padding: 0.75rem 0; border-top: 1px solid var(--line); }
.hist-row:first-child { border-top: 0; }
.hist-row p { margin: 0; }
.hist-name { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.hist-name .ic { color: var(--link); }
.hist-name span { display: grid; min-width: 0; line-height: 1.3; }
.hist-name small { color: var(--muted); overflow-wrap: anywhere; }
.hist-spark { display: block; width: 11.25rem; height: 2.75rem; }
.hist-line { fill: none; stroke: var(--meter); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.hist-dot { fill: var(--meter); stroke: var(--surface); stroke-width: 2; }
.hist-now { line-height: 1.35; }
.hist-now strong { font: 700 1.25rem/1.2 var(--display); font-variant-numeric: tabular-nums; }
.hist-now > span { display: flex; align-items: center; gap: 0.3rem; font-size: 0.9375rem; }
.hist-delta .ic { width: 1.125rem; height: 1.125rem; }
.hist-delta .ic.is-flip { transform: scaleY(-1); }
.hist-delta.is-up, .hist-steps .is-up { color: var(--sign); }
.hist-delta.is-down, .hist-steps .is-down { color: var(--paid); }
:root[data-theme='dark'] .hist-delta.is-up, :root[data-theme='dark'] .hist-steps .is-up { color: var(--sign-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .hist-delta.is-up, :root:not([data-theme='light']) .hist-steps .is-up { color: var(--sign-ink); } }
.hist-more { grid-column: 1 / -1; }
.hist-more > summary { width: fit-content; min-height: 2.75rem; align-content: center; cursor: pointer; color: var(--link); font-weight: 600; font-size: 0.9375rem; }
.hist-steps { list-style: none; margin: 0 0 0.5rem; padding: 0.25rem 0.875rem; max-width: 40rem; background: var(--surface-2); border-radius: 10px; }
.hist-steps li { display: grid; grid-template-columns: 5.75rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: baseline; padding: 0.5rem 0; }
.hist-steps li + li { border-top: 1px solid var(--line); }
.hist-date { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9375rem; }
.hist-what { overflow-wrap: anywhere; line-height: 1.3; }
.hist-what small { display: block; color: var(--muted); }
.hist-amount { display: grid; justify-items: end; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.3; }
.hist-amount small { font-weight: 600; }
.hist-note { margin: 0.75rem 0 0; font-size: 0.9375rem; }
@media (max-width: 44rem) {
  .hist-row { grid-template-columns: minmax(0, 1fr) auto; }
  .hist-spark { width: 7.5rem; height: 2.5rem; }
  .hist-now { grid-column: 1 / -1; }
  .hist-steps li { grid-template-columns: 5.9rem minmax(0, 1fr) auto; gap: 0.5rem; }
  .hist-date { white-space: nowrap; font-size: 0.875rem; }
}

/* ---- Čtení účtů a smluv (Claude) ------------------------------------------ */
.scan-box { display: grid; gap: 0.75rem; border-color: var(--link); box-shadow: 0 0 0 1px var(--link), var(--drop); }
.scan-box h2 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.3rem; font-size: 1.5rem; }
.scan-box h2 .ic { color: var(--link); }
.scan-box p { margin: 0; }
.scan-note, .scan-attached { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.875rem; }
.scan-note .ic, .scan-attached .ic { width: 1.125rem; height: 1.125rem; margin-top: 0.1rem; }
.scan-or { margin: 1rem 0; text-align: center; color: var(--muted); font-size: 0.9375rem; }
.scan-done { display: flex; gap: 0.75rem; align-items: flex-start; margin: 0 0 1rem; padding: 0.875rem 1rem; border-radius: 10px; background: var(--paid-soft); color: var(--paid-ink); }
.scan-done > .ic { color: var(--paid); margin-top: 0.1rem; }
.scan-done p { margin: 0; }
.scan-done p + p { margin-top: 0.35rem; }
form.is-busy { cursor: progress; }
form.is-busy .btn[disabled] { opacity: 0.75; cursor: progress; }
.btn[disabled] { cursor: default; }

.docs-list li.doc-row { grid-template-columns: minmax(0, 1fr) auto; scroll-margin-top: 6.5rem; }
.doc-row:target > .doc { background: var(--lamp-soft); box-shadow: 0 0 0 0.3rem var(--lamp-soft); border-radius: 4px; }
.doc-facts, .doc-read { grid-column: 1 / -1; }
.doc-read { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; padding: 0 0 0.6rem; }
.doc-read .btn { min-height: 2.75rem; padding: 0.3rem 0.8rem; font-size: 0.9375rem; }
.doc-facts { margin: 0 0 0.6rem; padding: 0.25rem 0.875rem 0.75rem; background: var(--surface); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.doc-facts > summary { min-height: 2.75rem; align-content: center; cursor: pointer; font-weight: 700; }
.doc-facts p { margin: 0 0 0.6rem; }
.doc-facts .facts div { grid-template-columns: 1fr; gap: 0; }
.doc-facts .facts dd { font-weight: 400; }
.doc-facts .facts dt { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.doc-sub { font-weight: 700; margin: 0.75rem 0 0.25rem !important; }
.doc-steps { margin: 0 0 0.5rem; padding-left: 1.4rem; display: grid; gap: 0.35rem; }
.doc-quotes { margin: 0; padding-left: 1.1rem; color: var(--muted); display: grid; gap: 0.35rem; font-size: 0.9375rem; }
.doc-ai { font-size: 0.8125rem; margin: 0.5rem 0 0 !important; }
/* skupina s přečtenou smlouvou potřebuje víc místa než jeden sloupec mřížky */
.docs-group:has(.doc-facts) { grid-column: 1 / -1; }
.docs-group:has(.doc-facts) .doc-facts { max-width: 52rem; }
.swap-facts { margin: 0.5rem 0 0.75rem; padding: 0.75rem 1rem; background: var(--surface-2); border-radius: 10px; }
.swap-facts dd { font-weight: 400; }

/* ---- Dům: jedna značka stavu na místnost ----------------------------------
   zelená fajfka = zaplaceno, žluté hodiny = platba do týdne, červený vykřičník = po termínu.
   Modrý štítek vpravo říká, o kolik to jde měsíčně levněji. */
.room-flag.is-paid { background: #1f7a4c; }
.room-save { position: absolute; z-index: 1; top: 0.4rem; right: 0.4rem; display: inline-flex; align-items: center; gap: 0.15rem; padding: 0.1rem 0.45rem 0.1rem 0.3rem; border-radius: 99px; background: #fff; color: #173d7d; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 0 0 1.5px #173d7d; }
.room-save .ic { width: 0.875rem; height: 0.875rem; stroke-width: 2.2; }
.room-save .ic.is-flip { transform: scaleY(-1); }
.thing .room-save { top: 0.25rem; right: 0.25rem; padding: 0.1rem 0.25rem; font-size: 0; gap: 0; }
.insp-paid, .insp-nodate { display: flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.55rem 0.75rem; border-radius: var(--r-ctl); background: var(--paid-soft); color: var(--paid-ink); }
.insp-paid .ic { width: 1.25rem; height: 1.25rem; color: var(--paid); stroke-width: 2.2; }
.insp-nodate { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.insp-nodate .ic { width: 1.25rem; height: 1.25rem; }
.hb-paid { display: inline-flex; align-items: center; gap: 0.25rem; margin-right: 0.875rem; font-weight: 600; color: var(--lamp-ink); }
.hb-paid.is-all { color: var(--paid); }
.hb-paid .ic { width: 1.125rem; height: 1.125rem; stroke-width: 2.2; }

/* Vyfotit účet nebo smlouvu */
.add-acts form { margin: 0; }
.snap label.btn { cursor: pointer; }
.snap label.btn:focus-within { outline: 3px solid var(--lamp); outline-offset: 2px; }
.snap.is-busy label.btn { opacity: 0.8; cursor: progress; pointer-events: none; }
.snap-note { display: flex; gap: 0.5rem; align-items: flex-start; margin: -0.25rem 0 1rem; font-size: 0.875rem; }
.snap-note .ic { width: 1.125rem; height: 1.125rem; margin-top: 0.1rem; }

.thing .room-art { flex: none; width: 3.5rem; height: 2.5rem; padding: 0; margin-bottom: 0.15rem; }
@media (max-width: 34rem) { .room-save { padding: 0.1rem 0.25rem; font-size: 0; gap: 0; } }
.bill-due p a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ---- Nabídky z trhu: podmínky a zájem domů ------------------------------- */
.poffer { scroll-margin-top: 6.5rem; }
.poffer.is-expired .poffer-main > .bill-title, .poffer.is-expired .bill-sum { opacity: 0.6; }
.poffer-terms { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 0; }
.poffer-terms .tag { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.55rem; font-weight: 600; }
.poffer-terms .ic { width: 1rem; height: 1rem; }
.poffer-want { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; margin: 0.75rem 0 0; }
.poffer-want .btn { min-height: 2.75rem; padding: 0.3rem 0.85rem; font-size: 0.9375rem; }
.poffer-want .muted { flex: 1 1 14rem; font-size: 0.9375rem; }
.scan-box h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.3rem; }
.scan-box h3 .ic { color: var(--link); }
.block .scan-box { max-width: 44rem; box-shadow: 0 0 0 1px var(--link); }
.draft-note { margin: 1rem 1rem 0; }

/* ---- Výdělek z trhu -------------------------------------------------------- */
a.stat { color: var(--text); text-decoration: none; }
a.stat:hover { color: var(--text); border-color: var(--edge); }
.stat-earn .stat-label .ic { color: var(--link); }
@media (min-width: 62rem) { .hq-stats.has-earn { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); } }
@media (min-width: 48rem) and (max-width: 62rem) { .hq-stats.has-earn { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hq-stats.has-earn .stat-level { grid-column: 1 / -1; } }
.order-pay { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem; margin: 0; }
.order-pay .field { flex: 0 1 9.5rem; }
.order-pay .field > span { font-size: 0.875rem; }
.order-got { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; color: var(--paid); }
.order-got strong { color: var(--text); }
.order-got .ic { width: 1.25rem; height: 1.25rem; }
