/* Holubi: fotka holuba se na kartách, v seznamech a náhledech vždy ukáže CELÁ (žádné useknuté hlavy).
   Místo prázdných pruhů je pozadí rozmazaná kopie téže fotky (nastavuje js/holubi-doladeni.js do --foto-bg). */
.sq-avatar, .cl-portrait, .compact-avatar, .mini-photo-link { position: relative; overflow: hidden; }
.sq-avatar::before, .cl-portrait::before, .compact-avatar::before, .mini-photo-link::before {
  content: ''; position: absolute; inset: -12px; background-image: var(--foto-bg, none);
  background-size: cover; background-position: center; filter: blur(14px) saturate(1.1); opacity: .9; z-index: 0;
}
.sq-avatar img, .cl-portrait img, .compact-avatar img, .mini-photo-link img {
  position: relative; z-index: 1; object-fit: contain !important; object-position: center !important;
}

/* ── Horní lišta Financí, Soutěží a Kalendáře: jedna úhledná řada pastelových dlaždic (pořád stejná výška, bez zelených rámečků) ── */
html.compact-preview:is(.compact-finance, .compact-shows, .compact-calendar) #header-row2 { display:flex !important; flex-wrap:wrap; gap:6px; align-items:stretch; }
html.compact-preview:is(.compact-finance, .compact-shows, .compact-calendar) #header-row2 :is(.header-left-group, .header-right-group) { display:contents !important; }
html.compact-preview:is(.compact-finance, .compact-shows, .compact-calendar) #header-row2 :is(.header-left-group, .header-right-group) > :is(.h-tile, #header-shows-sort-wrap, #header-races-view-wrap, #header-shows-export-wrap, #header-cal-view-wrap) { flex:1 1 150px; min-width:0; width:auto !important; max-width:none !important; grid-column:auto !important; }
html.compact-preview:is(.compact-finance, .compact-shows, .compact-calendar) #header-row2 :is(#header-shows-sort-wrap, #header-races-view-wrap, #header-shows-export-wrap, #header-cal-view-wrap) > .h-tile { width:100% !important; }
html.compact-preview #header-row2 { --t:120,140,170; --td:70,90,125; }
html.compact-preview #header-row2 #add-income-btn { --t:110,185,140; --td:35,110,70; }
html.compact-preview #header-row2 #add-expense-btn { --t:235,140,140; --td:150,50,50; }
html.compact-preview #header-row2 #global-search-btn { --t:120,165,225; --td:40,85,150; }
html.compact-preview #header-row2 :is(#header-export-btn, #header-shows-export-btn) { --t:235,185,100; --td:140,90,20; }
html.compact-preview #header-row2 :is(#header-shows-sort-btn, #header-cal-view-btn) { --t:160,140,210; --td:90,65,150; }
html.compact-preview #header-row2 :is(#header-races-view-btn, #header-shows-mode-btn, #header-cal-notif-btn) { --t:110,190,190; --td:30,100,105; }
html.compact-preview #header-row2 :is(#add-income-btn,#add-expense-btn,#header-export-btn,#header-shows-export-btn,#header-shows-sort-btn,#header-cal-view-btn,#header-races-view-btn,#header-shows-mode-btn,#header-cal-notif-btn).h-tile { background:linear-gradient(135deg, rgba(var(--t),.20), rgba(var(--t),.06)) !important; border:1px solid rgba(var(--t),.55) !important; color:rgb(var(--td)) !important; }
html.compact-preview #header-row2 #add-adult-btn.h-tile { background:linear-gradient(135deg, rgba(var(--t),.20), rgba(var(--t),.06)) !important; border:1px solid rgba(var(--t),.55) !important; color:rgb(var(--td)) !important; }

/* ── Okno snůšky: Smazat / Zavřít / Uložit vždy v jedné řadě ── */
#litter-overlay .modal-footer { display:grid !important; grid-template-columns:repeat(3, minmax(0, 1fr)) !important; gap:6px !important; align-items:stretch !important; }
#litter-overlay .modal-footer > div { display:contents !important; }
#litter-overlay .modal-footer .btn { width:auto !important; min-width:0 !important; max-width:none !important; margin:0 !important; flex:none !important; grid-column:auto !important; white-space:nowrap; }

/* ── Finance na telefonu: dlaždice a filtry se vejdou na šířku (žádné vodorovné posouvání stránky) ── */
@media (max-width:700px) {
  #tab-platby div[style*="repeat(3, 1fr)"] { grid-template-columns:minmax(0,1fr) !important; }
  #tab-platby .finance-cat-bar { grid-template-columns:repeat(2, minmax(0,1fr)) !important; }
  #tab-platby .finance-cat-bar button { min-width:0 !important; white-space:normal !important; line-height:1.15; height:auto !important; min-height:38px; padding:4px 6px !important; }
}

/* ── Tmavý režim: čitelný text dlaždic (světlá varianta barvy dlaždice místo tmavého textu) ── */
html.dark #header-row2 :is(#add-adult-btn,#add-income-btn,#add-expense-btn,#header-export-btn,#header-shows-export-btn,#header-shows-sort-btn,#header-cal-view-btn,#header-races-view-btn,#header-shows-mode-btn,#header-cal-notif-btn,#global-search-btn).h-tile {
  color: color-mix(in srgb, rgb(var(--t)) 45%, #ffffff) !important;
  background: linear-gradient(135deg, rgba(var(--t),.28), rgba(var(--t),.10)) !important;
  border-color: rgba(var(--t),.7) !important;
}
html.dark .dog-sex-tab { color:#dfe5ee !important; background:rgba(255,255,255,.05) !important; border:1px solid rgba(255,255,255,.18) !important; }
html.dark .dog-sex-tab.active, html.dark .dog-sex-tab[aria-pressed="true"] { background:rgba(143,166,200,.25) !important; border-color:#8FA6C8 !important; color:#fff !important; }

/* Horní řada dlaždic na PC: viditelné dlaždice se rovnoměrně rozdělí přes celou šířku, bez děr (stejně jako u Koček). */
@media (min-width: 701px) {
  html.compact-preview:not(.compact-home):not(:has(#tab-nastaveni.active)) #header-row2 { display:grid !important; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); grid-template-columns:none !important; gap:4px !important; align-items:stretch; }
  html.compact-preview:not(.compact-home):not(:has(#tab-nastaveni.active)) #header-row2 :is(.header-left-group, .header-right-group) { display:contents !important; }
  html.compact-preview:not(.compact-home):not(:has(#tab-nastaveni.active)) #header-row2 :is(.header-left-group, .header-right-group) > :empty,
  html.compact-preview:not(.compact-home):not(:has(#tab-nastaveni.active)) #header-row2 > :empty { display:none !important; }
  html.compact-preview:not(.compact-home):not(:has(#tab-nastaveni.active)) #header-row2 :is(.header-left-group, .header-right-group) > *,
  html.compact-preview:not(.compact-home):not(:has(#tab-nastaveni.active)) #header-row2 > :not(.header-left-group):not(.header-right-group) { grid-column:auto !important; grid-row:1 !important; width:auto !important; min-width:0 !important; max-width:none !important; flex:none !important; box-sizing:border-box; }
}

/* Obsah záložek Finance, Soutěže a Lov na PC: stejný levý a pravý okraj jako horní řada dlaždic (14 px) a stejné mezery 4 px jako u Koček. */
@media (min-width: 701px) {
  html.compact-preview #tab-zkousky > div:first-child { max-width:none !important; margin:0 !important; padding:0 !important; }
  html.compact-preview #tab-platby > div:first-child { max-width:none !important; margin:0 !important; padding:12px 0 60px !important; }
  html.compact-preview #tab-lov > div:first-child { padding:0 !important; }
  html.compact-preview :is(#tab-zkousky, #tab-platby, #tab-lov) div[style*="grid-template-columns"] { gap:4px !important; }
}

/* Domovská záložka na PC: první řada (5 dlaždic) se roztáhne přes celou šířku; ostatní řady po 4 zůstávají (40 sloupců = 5 × 8 = 4 × 10). */
@media (min-width: 701px) {
  html.compact-preview.compact-home #header-row2 .header-left-group { grid-template-columns: repeat(40, minmax(0, 1fr)) !important; gap:4px !important; }
  html.compact-preview.compact-home #header-row2 .header-left-group > :is(#add-adult-btn, .compact-sort-cluster, #global-search-btn) { grid-column: span 8 !important; }
  html.compact-preview.compact-home #header-row2 .header-left-group > :not(#add-adult-btn):not(.compact-sort-cluster):not(#global-search-btn):not(#co-dnes) { grid-column: span 10 !important; }
  html.compact-preview.compact-home #co-dnes .top-info-tile { grid-column: span 8 !important; }
}

/* Přepínač vzhledu je v řadě čísel až za dlaždicemi počtů (jako u Koček), ne na začátku. */
html.compact-home #stats > .sz-tile { order: 7; }

/* První záložka (Petr 7. 11. 2026, návrh C): nástroje v jedné řadě po 8 (na telefonu po 4), pastelová výplň, bez ikon; přepínač vzhledu hned za „Celkem“. */
html.compact-home #stats > .sz-tile { order: 6 !important; }
html.compact-home #stats > .stat:nth-child(6) { order: 7 !important; }
html.compact-home .filters { display:grid !important; grid-template-columns:repeat(8, minmax(0, 1fr)) !important; gap:4px !important; }
html.compact-home .filters .fbtn-mating-icon { display:none !important; }
html.compact-home .filters > .quick-tile-wrap, html.compact-home .filters > .quick-tile { width:100% !important; height:44px !important; min-height:44px !important; }
html.compact-home .filters .quick-tile { font-size:12px !important; padding:0 4px !important; white-space:nowrap !important; justify-content:center !important; text-align:center !important; background:color-mix(in srgb, currentColor 14%, #fff) !important; }
html.compact-home .filters .quick-tile .mating-wrap { display:flex !important; justify-content:center !important; align-items:center !important; width:100% !important; gap:0 !important; }
html.compact-home .filters .quick-tile .mt-label { text-align:center !important; overflow:hidden; text-overflow:clip; }
html.dark.compact-home .filters .quick-tile { background:color-mix(in srgb, currentColor 18%, #1c1f26) !important; }
@media (max-width: 700px) {
  html.compact-home .filters { grid-template-columns:repeat(4, minmax(0, 1fr)) !important; }
}
html.compact-home .filters { margin-bottom:4px !important; }   /* stejná mezera 4 px jako mezi ostatními řadami */
html.compact-home #global-search-btn > span:first-child { display:none !important; }   /* bez ikon v řadě tlačítek (Petr 7. 11. 2026) */
html.compact-home #global-search-btn > span + span { margin-left:0 !important; }

/* Okno QR štítku: pravidlo .modal {left:50%;top:50%;transform} z style.css se přičítalo k vycentrování (okno uteklo doprava a dolů). */
#pigeon-qr-overlay > .modal { left:auto !important; top:auto !important; transform:none !important; }

/* Snůšky (Petr 7. 11. 2026): 6 dlaždic v první řadě (Snůška, Řazení, Hledat, Roky, Snůšky a líhnutí, Chovné páry), bez ikon, mezery 4 px. */
html.compact-litters #header-row2 .header-left-group { display:grid !important; grid-template-columns:repeat(6, minmax(0, 1fr)) !important; gap:4px !important; }
html.compact-litters #header-row2 .header-left-group > * { grid-column:auto !important; grid-row:auto !important; width:auto !important; min-width:0 !important; max-width:none !important; margin:0 !important; box-sizing:border-box; }
html.compact-litters .cl-tabs-moved { display:none !important; }
html.compact-litters #header-row2 .cl-tab-tile { height:44px; min-height:44px; padding:0 4px; border-radius:6px; box-shadow:none; font-size:12px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; background:#fff !important; border:1px solid var(--border,#cbd5e1) !important; color:#242c38 !important; cursor:pointer; }
html.compact-litters #header-row2 .cl-tab-tile.btn-primary { background:#5A6E8C !important; border-color:#5A6E8C !important; color:#fff !important; }
html.dark.compact-litters #header-row2 .cl-tab-tile { background:#1c1f26 !important; color:#e5e7eb !important; border-color:#3b4252 !important; }
html.dark.compact-litters #header-row2 .cl-tab-tile.btn-primary { background:#8FA6C8 !important; border-color:#8FA6C8 !important; color:#10151c !important; }
html.compact-litters #global-search-btn > span:first-child { display:none !important; }
html.compact-litters #global-search-btn > span + span { margin-left:0 !important; }
html.compact-litters #litter-sort-bar button span[style*="font-size:10px"], html.compact-litters #dog-sort-bar button span[style*="font-size:10px"] { display:none !important; }
html.compact-litters select.cl-year { appearance:none !important; -webkit-appearance:none !important; background-image:none !important; text-align:center; text-align-last:center; }
@media (max-width: 700px) {
  html.compact-litters #header-row2 .header-left-group { grid-template-columns:repeat(3, minmax(0, 1fr)) !important; }
}
html.compact-litters #header-row2 .cl-tab-tile { order:5; }
html.compact-litters #header-row2 select.cl-year { background-image:none !important; padding-right:6px !important; }

/* Seznam a Kompakt snůšek: fotky rodičů (matka | otec) místo velkého písmene. */
.po-foto2 { display:grid !important; grid-auto-flow:column; grid-auto-columns:1fr; gap:1px; }
.po-foto2 img { width:100%; height:100%; object-fit:cover; display:block; }

/* První záložka: první řada dlaždic stejně vysoká jako druhá (44 px; Petr 7. 11. 2026). */
html.compact-home #header-row2 .header-left-group > :is(#add-adult-btn, #global-search-btn, .compact-sort-cluster, #dog-sort-bar) { height:44px !important; min-height:44px !important; }
html.compact-home #header-row2 .header-left-group .compact-sort-cluster :is(#dog-sort-bar, button, div[style*="position:relative"]) { height:44px !important; min-height:44px !important; }
html.compact-home #co-dnes .top-info-tile { height:44px !important; min-height:44px !important; }

/* Hlavička: přepínač jazyka stejně vysoký jako dlaždice Zařízení / Google (44 px; Petr 7. 11. 2026). */
html.compact-preview #lang-pill-wrap, html.compact-preview #lang-pill { height:44px !important; min-height:44px !important; align-self:flex-start; margin-top:1px !important; }

/* Finance (Petr 7. 11. 2026): stejné mezery 4 px a stejný tvar dlaždic (rohy 6 px) jako na prvních dvou záložkách, bez ikon. */
html.compact-finance #tab-platby > div:first-child { padding:0 0 60px !important; }
html.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] { gap:4px !important; margin-bottom:4px !important; }
html.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] > div { height:60px !important; min-height:60px !important; border-radius:6px !important; border-width:1px !important; padding:6px 10px !important; justify-content:center !important; text-align:center !important; }
html.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] > div > div:first-child { text-align:center; }
html.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] > div > div:last-child:not(:first-child) { display:none !important; }
html.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] > div > div:first-child > div:last-child:not(:nth-child(2)) { display:none !important; }
html.compact-finance #tab-platby .finance-cat-bar { gap:4px !important; margin:0 0 4px !important; }
html.compact-finance #tab-platby .finance-cat-bar > button { height:44px !important; min-height:44px !important; border-radius:6px !important; border-width:1px !important; }
html.compact-finance #tab-platby .finance-cat-bar + div { gap:4px !important; }
html.compact-finance #tab-platby .finance-cat-bar + div > div { margin-bottom:0 !important; border-radius:6px !important; border-width:1px !important; }
html.compact-finance #global-search-btn > span:first-child, html.compact-finance #header-export-btn > span:first-child { display:none !important; }
html.compact-finance #global-search-btn > span + span, html.compact-finance #header-export-btn > span + span { margin-left:0 !important; }
html.compact-finance #header-row2 button span[style*="font-size:10px"] { display:none !important; }

/* Finance: tři dlaždice (Příjmy / Výdaje / Prodej holubů) jsou přepínač pohledu, aktivní je tmavá; stejné místo v Příjmech i ve Výdajích. */
html.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] > div { cursor:pointer; }
html.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] > div[data-aktivni] { background:#5A6E8C !important; border-color:#5A6E8C !important; }
html.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] > div[data-aktivni] * { color:#fff !important; }
html.dark.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] > div[data-aktivni] { background:#8FA6C8 !important; border-color:#8FA6C8 !important; }
html.dark.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] > div[data-aktivni] * { color:#10151c !important; }

/* === Zdraví + Soutěže: stejné dlaždice jako první záložky (bez ikon, mezery 4 px, výška 44, roh 6) === */
html.compact-preview :is(#tab-zkousky, #tab-lov) div[style*="grid-template-columns"]{gap:4px !important;margin-bottom:4px !important}
html.compact-preview :is(#tab-zkousky, #tab-lov) div[style*="grid-template-columns"] > button{height:44px !important;min-height:44px !important;border-radius:6px !important;border-width:1px !important;box-shadow:none !important;font-size:12px !important;font-weight:700 !important;white-space:nowrap !important;padding:0 4px !important;background:color-mix(in srgb, currentColor 14%, #fff) !important;justify-content:center !important}
html.compact-preview :is(#tab-zkousky, #tab-lov) div[style*="grid-template-columns"] > button[style*="background:var(--accent)"],html.compact-preview #tab-lov div[style*="grid-template-columns"] > button[style*="color:#fff"]{background:#3f4756 !important;color:#fff !important;border-color:#3f4756 !important}
html.compact-preview #tab-zkousky > div > div:first-child > div{border-radius:6px !important;box-shadow:none !important;padding:8px 6px !important;display:flex !important;flex-direction:column !important;align-items:center !important;justify-content:center !important;min-height:64px !important}
html.compact-preview #tab-zkousky > div > div:nth-child(n+4){gap:4px !important}
html.compact-preview #tab-zkousky > div > div:last-child{margin-bottom:0 !important}
html.compact-preview #tab-zkousky > div > div:last-child > div{border-radius:6px !important;box-shadow:none !important}
html.compact-preview #tab-lov .zd-root > div[style*="grid-template-columns:repeat(4"]{margin-bottom:6px !important;gap:6px !important}
html.compact-preview #tab-lov .zd-root > div[style*="grid-template-columns:repeat(4"] > button{height:44px !important}

/* === Kalendář: každý sloupec jiná pastelová barva, označená dlaždice ztmavne === */
html.compact-calendar .cc-stat.cc-todo{background:#fde7ec;color:#9c2441;border-color:#e6a0b2}
html.compact-calendar .cc-stat.cc-today{background:#e3f4ec;color:#1d6a47;border-color:#9fd3b9}
html.compact-calendar .cc-stat.cc-next{background:#e6eefc;color:#274a85;border-color:#a3bbe6}
html.compact-calendar .cc-stat.cc-stat-on{outline:0 !important}
html.compact-calendar .cc-stat.cc-todo.cc-stat-on{background:#9c2441;color:#fff;border-color:#9c2441}
html.compact-calendar .cc-stat.cc-today.cc-stat-on{background:#1d6a47;color:#fff;border-color:#1d6a47}
html.compact-calendar .cc-stat.cc-next.cc-stat-on{background:#274a85;color:#fff;border-color:#274a85}
html.compact-calendar .cc-todo .cc-card{background:#fff3f6 !important;border-color:#e6a0b2 !important;border-left-width:1px !important}
html.compact-calendar .cc-today .cc-card{background:#f0faf5 !important;border-color:#9fd3b9 !important;border-left-width:1px !important}
html.compact-calendar .cc-next .cc-card{background:#f2f6fe !important;border-color:#a3bbe6 !important;border-left-width:1px !important}
html.compact-calendar .cc-todo > .cc-section-heading::before{background:#e6718b}
html.compact-calendar .cc-today > .cc-section-heading::before{background:#4fb283}
html.compact-calendar .cc-next > .cc-section-heading::before{background:#5f86cc}
html.compact-calendar .cc-card{border-radius:6px !important;box-shadow:none !important}
html.compact-calendar .cc-todo .cc-card:is(:hover,:focus-within),html.compact-calendar .cc-todo .cc-card:has(.cc-done input:checked){background:#f7cdd7 !important}
html.compact-calendar .cc-today .cc-card:is(:hover,:focus-within),html.compact-calendar .cc-today .cc-card:has(.cc-done input:checked){background:#c8e9d8 !important}
html.compact-calendar .cc-next .cc-card:is(:hover,:focus-within),html.compact-calendar .cc-next .cc-card:has(.cc-done input:checked){background:#cddcf7 !important}

/* === Soutěže: kompaktní karty jako u Ptáků (3 sloupce, mezery 6 px) === */
html.compact-preview #tab-zkousky > div > div:last-child{grid-template-columns:minmax(0,1fr) !important;gap:6px !important}
@media (min-width:741px){html.compact-preview #tab-zkousky > div > div:last-child{grid-template-columns:repeat(2,minmax(0,1fr)) !important}}
@media (min-width:1101px){html.compact-preview #tab-zkousky > div > div:last-child{grid-template-columns:repeat(3,minmax(0,1fr)) !important}}
html.compact-preview #tab-zkousky > div > div:last-child > div{padding:8px !important;gap:6px !important;display:flex !important;flex-direction:column !important;border-radius:6px !important}
html.compact-preview #tab-zkousky > div > div:last-child > div > div:first-child{flex:1 1 auto}
html.compact-preview #tab-zkousky > div > div:last-child > div *{font-size:12px !important;line-height:1.3 !important}
html.compact-preview #tab-zkousky > div > div:last-child > div [style*="font-size:17px"],html.compact-preview #tab-zkousky > div > div:last-child > div [style*="font-size:16px"]{font-size:14px !important;font-weight:800 !important}
html.compact-preview #tab-zkousky > div > div:last-child > div [style*="border-radius:10px"],html.compact-preview #tab-zkousky > div > div:last-child > div [style*="background:var(--bg"]{border-radius:4px !important;padding:4px 6px !important;margin-top:4px !important}
html.compact-preview #tab-zkousky > div > div:last-child > div > div:last-child{display:grid !important;grid-template-columns:minmax(0,1fr) 72px !important;gap:6px !important;margin-top:auto !important}
html.compact-preview #tab-zkousky > div > div:last-child > div > div:last-child button{height:44px !important;min-height:44px !important;border-radius:6px !important;font-size:12px !important;font-weight:700 !important}

/* === Finance: seznam příjmů a výdajů jako u Ptáků (karty ve 3 sloupcích, bez ikon, 6 px) === */
html.compact-preview #tab-platby .finance-cat-bar + div{display:grid !important;grid-template-columns:minmax(0,1fr);gap:6px !important}
@media (min-width:741px){html.compact-preview #tab-platby .finance-cat-bar + div{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1101px){html.compact-preview #tab-platby .finance-cat-bar + div{grid-template-columns:repeat(3,minmax(0,1fr))}}
html.compact-preview #tab-platby .finance-cat-bar + div > div[onclick]{margin:0 !important;padding:8px !important;border-width:1px !important;border-radius:6px !important;box-shadow:none !important;flex-direction:column !important;align-items:stretch !important;gap:4px !important;text-align:center}
html.compact-preview #tab-platby .finance-cat-bar + div > div[onclick] > div[style*="width:38px"]{display:none !important}
html.compact-preview #tab-platby .finance-cat-bar + div > div[onclick] > div > div{justify-content:center !important}
html.compact-preview #tab-platby .finance-cat-bar + div > div[onclick] > div[style*="text-align:right"]{text-align:center !important}
html.compact-preview #tab-platby .finance-cat-bar + div > div[onclick]:hover{background:color-mix(in srgb,var(--accent) 10%,var(--surface)) !important}
html.compact-preview #tab-platby .finance-cat-bar + div > div:not([onclick]){grid-column:1 / -1 !important;margin:6px 0 0 !important;padding:2px 4px !important;border-bottom:1px solid var(--border) !important}

/* === Zdraví: všechny dlaždice v jedné řadě, každá jinou pastelovou barvou, jemné lemování; aktivní ztmavne === */
#header-row2 .zd-chip-tile{display:none !important}
html.compact-supplies #header-row2{grid-template-columns:repeat(8,minmax(0,1fr)) !important;gap:4px !important}
@media (max-width:700px){html.compact-supplies #header-row2{grid-template-columns:repeat(4,minmax(0,1fr)) !important}}
html.compact-supplies #header-row2 :is(#add-adult-btn,#dog-sort-bar,#global-search-btn){grid-column:span 1 !important;min-width:0 !important;width:100% !important}
html.compact-supplies #header-row2 .zd-chip-tile{display:flex !important;align-items:center;justify-content:center;height:44px !important;min-height:44px !important;width:100% !important;min-width:0 !important;border-radius:6px !important;box-shadow:none !important;padding:0 4px !important;font-size:12px !important;font-weight:700 !important;white-space:nowrap !important;border:1px solid var(--k) !important;background:var(--b) !important;color:var(--k) !important;cursor:pointer}
html.compact-supplies #header-row2 .zd-chip-1{--k:#44586a;--b:#e9eef3}
html.compact-supplies #header-row2 .zd-chip-2{--k:#2f7d4f;--b:#e3f3ea}
html.compact-supplies #header-row2 .zd-chip-3{--k:#8a6a00;--b:#fff3cf}
html.compact-supplies #header-row2 .zd-chip-4{--k:#2c5fa3;--b:#e3edfb}
html.compact-supplies #header-row2 .zd-chip-5{--k:#6b4aa0;--b:#efe8fa}
html.compact-supplies #header-row2 .zd-chip-tile[style*="color:#fff"]{background:var(--k) !important;color:#fff !important}
html.compact-supplies #header-row2 .zd-chip-tile:hover{background:color-mix(in srgb,var(--k) 16%,var(--b)) !important}
html.compact-supplies #header-row2 .zd-chip-tile[style*="color:#fff"]:hover{background:var(--k) !important}
html.compact-supplies #global-search-btn > span:first-child{display:none !important}
html.compact-supplies #dog-sort-bar button > :is(span,i,svg):last-child:not(:first-child){display:none !important}
html.compact-preview #tab-lov .zd-root .zd-tools > button.zd-tool{background:#e6f0fa !important;border:1px solid #6f9bd1 !important;color:#24558f !important;font-weight:700 !important;height:44px !important;min-height:44px !important}
html.compact-preview #tab-lov .zd-root .zd-tools > button.zd-tool:hover{background:#cfe0f4 !important}
html.compact-preview #tab-lov .zd-root .zd-btn:hover{background:color-mix(in srgb,var(--zd-b-fg) 18%,var(--zd-b-bg))}
html.compact-preview #tab-lov .zd-root .zd-btn.zd-del:hover{background:color-mix(in srgb,var(--zd-p-fg) 18%,var(--zd-p-bg))}
html.compact-preview #tab-lov .zd-root .zd-card:hover{box-shadow:0 0 0 1px var(--zc)}

/* === Soutěže: všech 8 dlaždic v jedné řadě, každá jinou pastelovou barvou, jemné lemování; po najetí ztmavne === */
#header-row2 .so-tile{display:none !important}
html.compact-shows:has(#tab-zkousky [data-so-races]) #header-row2{display:grid !important;grid-template-columns:repeat(8,minmax(0,1fr)) !important;gap:4px !important}
@media (max-width:700px){html.compact-shows:has(#tab-zkousky [data-so-races]) #header-row2{grid-template-columns:repeat(4,minmax(0,1fr)) !important}}
html.compact-shows:has(#tab-zkousky [data-so-races]) #header-row2 :is(#header-shows-sort-wrap,#header-races-view-wrap,#header-shows-export-wrap){width:100% !important;min-width:0 !important;max-width:none !important;grid-column:auto !important}
html.compact-shows:has(#tab-zkousky [data-so-races]) #header-row2 :is(#add-adult-btn,#header-shows-sort-btn,#header-races-view-btn,#header-shows-mode-btn,#header-shows-export-btn,.so-tile){display:flex !important;align-items:center;justify-content:center;width:100% !important;min-width:0 !important;height:44px !important;min-height:44px !important;padding:0 4px !important;border-radius:6px !important;box-shadow:none !important;font-size:12px !important;font-weight:700 !important;white-space:nowrap !important;border:1px solid var(--k) !important;background:var(--b) !important;color:var(--k) !important;cursor:pointer;font-family:inherit}
html.compact-shows #header-row2 #add-adult-btn{--k:#44586a;--b:#e9eef3}
html.compact-shows #header-row2 #header-shows-sort-btn{--k:#6b4aa0;--b:#efe8fa}
html.compact-shows #header-row2 #header-races-view-btn{--k:#1f7a7a;--b:#e1f3f3}
html.compact-shows #header-row2 #header-shows-mode-btn{--k:#a02a5c;--b:#fdeaf0}
html.compact-shows #header-row2 .so-tile-1{--k:#2f7d4f;--b:#e3f3ea;order:5}
html.compact-shows #header-row2 .so-tile-2{--k:#2c5fa3;--b:#e3edfb;order:6}
html.compact-shows #header-row2 .so-tile-3{--k:#b45f06;--b:#fff0dc;order:7}
html.compact-shows #header-row2 #header-shows-export-wrap{order:8}
html.compact-shows #header-row2 #header-shows-export-btn{--k:#8a6a00;--b:#fff3cf}
html.compact-shows:has(#tab-zkousky [data-so-races]) #header-row2 :is(#add-adult-btn,#header-shows-sort-btn,#header-races-view-btn,#header-shows-mode-btn,#header-shows-export-btn,.so-tile):hover{background:color-mix(in srgb,var(--k) 16%,var(--b)) !important}

/* === Snůšky: tři dlaždice jsou přepínač (Snůšky / Mláďata / Volných); aktivní je barevně zvýrazněná === */
html.compact-litters #tab-vrhy .litter-card.cl-skryta,html.compact-litters #tab-vrhy .po-row.cl-skryta{display:none !important}
html.compact-litters .cl-overview:not(#clx) > .cl-stat{cursor:pointer;border-width:1px !important;border-style:solid !important;border-radius:6px !important;box-shadow:none !important;background:var(--b) !important;color:var(--k) !important;border-color:var(--k) !important}
html.compact-litters .cl-overview:not(#clx) > .cl-stat *{color:inherit !important}
html.compact-litters .cl-overview:not(#clx) > .cl-stat-all{--k:#44586a;--b:#e9eef3}
html.compact-litters .cl-overview:not(#clx) > .cl-stat-pups{--k:#2f7d4f;--b:#e3f3ea}
html.compact-litters .cl-overview:not(#clx) > .cl-stat-free{--k:#b45f06;--b:#fff0dc}
html.compact-litters .cl-overview:not(#clx) > .cl-stat:hover{background:color-mix(in srgb,var(--k) 14%,var(--b)) !important}
html.compact-litters .cl-overview:not(#clx) > .cl-stat.cl-stat-on{background:var(--k) !important;color:#fff !important}
html.compact-litters .cl-overview:not(#clx) > .cl-stat.cl-stat-on *{color:#fff !important}

/* === Detail holuba: žádné zvýraznění textu „fixou" uvnitř štítku; když je barva potřeba, je obarvená celá dlaždice === */
html.compact-preview .adult-chip > span[style*="background"]{background:transparent !important;border:0 !important;padding:0 !important;border-radius:0 !important;color:inherit !important;font-size:inherit !important;font-weight:inherit !important}
html.compact-preview .adult-chip:has(> span[style*="background:#f0fdf4"]){background:#e3f3ea !important;border-color:#2f7d4f !important;color:#2f7d4f !important}
html.compact-preview .adult-chip:has(> span[style*="background:#fef2f2"]){background:#fdeaf0 !important;border-color:#a02a5c !important;color:#a02a5c !important}
html.compact-preview .adult-chip:has(> span[style*="rgba(52,152,219"]){background:#e3edfb !important;border-color:#2c5fa3 !important;color:#2c5fa3 !important}
html.compact-preview .adult-chip:has(> span[style*="rgba(155,89,182"]){background:#efe8fa !important;border-color:#6b4aa0 !important;color:#6b4aa0 !important}
html.compact-preview .adult-chip:has(> span[style*="background:#fef3c7"]){background:#fff3cf !important;border-color:#8a6a00 !important;color:#8a6a00 !important}

/* Snůšky: Mláďata / Volných ukážou seznam mláďat (jako Kočky a Ptáci) */
html.compact-litters #tab-vrhy.cl-kot-mode > :is(#litters-sortable-container, .sz-list[data-kind="vrhy"], .sz-km[data-kind="vrhy"], .sz-bar[data-kind="vrhy"]) { display: none !important; }
html.compact-litters .cl-kot-list { margin-top: 8px; }
html.compact-litters .cl-kot-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:6px; }
html.compact-litters .cl-kot-card { display:flex; flex-direction:column; gap:6px; padding:6px; border:1px solid var(--border,#ddd); border-radius:6px; background:var(--surface,#fff); cursor:pointer; min-width:0; }
html.compact-litters .cl-kot-card .po-av { width:100% !important; height:auto !important; aspect-ratio:1/1; border-radius:4px; overflow:hidden; display:flex; align-items:center; justify-content:center; font-size:48px; }
html.compact-litters .cl-kot-card .po-av img { width:100% !important; height:100% !important; object-fit:cover; display:block; }
html.compact-litters .cl-kot-card .po-t { min-width:0; }
html.compact-litters .cl-kot-card:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }

/* Telefon: první záložka bez děr v řadách – 3 počty, pak 2 + 2 dlaždice, pak Samci / Samice / Výletci / Archiv v jedné řadě */
@media (max-width: 767px) {
  html.compact-home .compact-overview > #stats > .stat:nth-child(1) { order: 1 !important; grid-column: span 4 !important; }
  html.compact-home .compact-overview > #stats > .stat:nth-child(2) { order: 2 !important; grid-column: span 4 !important; }
  html.compact-home .compact-overview > #stats > .stat:nth-child(5) { order: 3 !important; grid-column: span 4 !important; }
  html.compact-home .compact-overview > #stats > .stat:nth-child(4) { order: 4 !important; grid-column: span 6 !important; }
  html.compact-home .compact-overview > #stats > .stat:nth-child(3) { order: 5 !important; grid-column: span 6 !important; }
  html.compact-home .compact-overview > #stats > .sz-tile { order: 6 !important; grid-column: span 6 !important; }
  html.compact-home .compact-overview > #stats > .stat:nth-child(6) { order: 7 !important; grid-column: span 6 !important; height: auto !important; min-height: 59px !important; }
  html.compact-home .compact-overview > #dog-sex-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  html.compact-home .compact-overview > #dog-sex-tabs > * { grid-column: span 1 !important; min-width: 0 !important; padding-left: 2px !important; padding-right: 2px !important; white-space: nowrap !important; }
}

/* === Telefon: zhuštění Zdraví, Soutěží a Financí (menší dlaždice a karty, víc obsahu na obrazovce) === */
@media (max-width: 767px) {
  /* Soutěže: hlavička se 2 řadami po 4 dlaždicích (dřív se zúžila na 31 px) */
  html.compact-shows:has(#tab-zkousky [data-so-races]) #header-row2 :is(.header-left-group,.header-right-group) { display:contents !important; }
  /* Zdraví: 8 dlaždic ve 2 řadách po 4 */
  html.compact-supplies:not(#x) #header-row2:not(#y) { display:grid !important; grid-auto-flow:row !important; grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:4px !important; }
  html.compact-supplies:not(#x) #header-row2:not(#y) > *, html.compact-supplies:not(#x) #header-row2:not(#y) .header-left-group > * { width:100% !important; min-width:0 !important; }
  html.compact-supplies #header-row2 > * , html.compact-supplies #header-row2 :is(.header-left-group,.header-right-group) > * { grid-column:span 1 !important; }
  html.compact-supplies:not(#x) #header-row2:not(#y) :is(.header-left-group,.header-right-group):not(#z) { display:contents !important; }
  html.compact-supplies #header-row2 #add-adult-btn { order:1 !important; }
  html.compact-supplies #header-row2 #dog-sort-bar, html.compact-supplies #header-row2 .compact-sort-cluster { order:2 !important; }
  html.compact-supplies #header-row2 .zd-chip-1 { order:3 !important; }
  html.compact-supplies #header-row2 #global-search-btn { order:4 !important; }
  html.compact-supplies #header-row2 .zd-chip-2 { order:5 !important; }
  html.compact-supplies #header-row2 .zd-chip-3 { order:6 !important; }
  html.compact-supplies #header-row2 .zd-chip-4 { order:7 !important; }
  html.compact-supplies #header-row2 .zd-chip-5 { order:8 !important; }
  html.compact-supplies #header-row2 .zd-chip-tile { font-size:12px !important; padding:0 2px !important; white-space:nowrap !important; }
  /* Zdraví: počty a karty záznamů */
  html.compact-preview #tab-lov .zd-ov { height:46px !important; gap:0 !important; }
  html.compact-preview #tab-lov .zd-ov b { font-size:17px !important; line-height:20px !important; }
  html.compact-preview #tab-lov .zd-ov span { font-size:10px !important; line-height:12px !important; }
  html.compact-preview #tab-lov .zd-card { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:4px 6px !important; padding:6px !important; }
  html.compact-preview #tab-lov .zd-card > .zd-top, html.compact-preview #tab-lov .zd-card > .zd-text, html.compact-preview #tab-lov .zd-card > .zd-btns { grid-column:1 / -1; }
  html.compact-preview #tab-lov .zd-card > .zd-bird { grid-column:1; min-height:40px !important; align-self:stretch; }
  html.compact-preview #tab-lov .zd-card > .zd-dates { grid-column:2; align-self:center; flex-direction:column; gap:0 !important; }
  html.compact-preview #tab-lov .zd-card .zd-btn { min-height:36px !important; }
  html.compact-preview #tab-lov .zd-card .zd-cat { padding:2px 6px !important; }
  /* Finance: plná šířka, tři počty v řadě, karty ve dvou řádcích */
  html.compact-finance #tab-platby > div:first-child { max-width:none !important; width:100% !important; margin:0 !important; }
  html.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
  html.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] > div { height:52px !important; min-height:52px !important; padding:4px 4px !important; }
  html.compact-finance #tab-platby > div:first-child > div[style*="repeat(3"] > div div[style*="font-size:22px"] { font-size:15px !important; }
  html.compact-finance #tab-platby .finance-cat-bar > button { height:40px !important; min-height:40px !important; font-size:11.5px !important; }
  html.compact-preview #tab-platby .finance-cat-bar + div > div[onclick] { flex-direction:row !important; align-items:center !important; justify-content:space-between !important; text-align:left !important; padding:6px 8px !important; }
  html.compact-preview #tab-platby .finance-cat-bar + div > div[onclick] > div > div { justify-content:flex-start !important; }
  html.compact-preview #tab-platby .finance-cat-bar + div > div[onclick] > div[style*="text-align:right"] { text-align:right !important; }
}

/* Mláďata na první záložce: stejný vzhled a výška jako dospělí (jemné lemování, bez modrého pozadí a tlustého rámečku) */
html.compact-preview .dog-card.breeding-puppy { background:var(--surface) !important; border:1px solid var(--border) !important; border-radius:6px !important; box-shadow:none !important; margin:0 !important; overflow:hidden; }
html.compact-preview .dog-card.breeding-puppy .pup-row { background:transparent !important; border:0 !important; padding:6px 8px !important; gap:8px !important; box-shadow:none !important; }
html.compact-preview .dog-card.breeding-puppy .pup-row > div:first-child > div:first-child { margin-right:8px !important; }
html.compact-preview .dog-card.breeding-puppy .pup-row button { min-height:34px !important; height:34px !important; padding:0 8px !important; font-size:12px !important; border-radius:6px !important; }
html.compact-preview .dog-card.breeding-puppy .pup-row button { min-width:0 !important; padding:0 4px !important; font-size:11px !important; overflow:hidden; }
html.compact-preview .dog-card.breeding-puppy .pup-row button svg, html.compact-preview .dog-card.breeding-puppy .pup-row button > span:first-child:not(:last-child) { display:none !important; }
html.compact-home:not(#x) #dog-sex-tabs > :is(.active,[aria-selected="true"],[aria-pressed="true"]) { background:#5A6E8C !important; border-color:#5A6E8C !important; color:#fff !important; }
html.compact-home:not(#x) #dog-sex-tabs > :is(.active,[aria-selected="true"],[aria-pressed="true"]) * { color:#fff !important; }

/* Poloviční okno (741–1099 px): první záložka bez osamělé dlaždice Všichni a řada Samci / Samice / Výletci / Archiv přes celou šířku; Soutěže: prázdná karta */
@media (min-width: 741px) and (max-width: 1099px) {
  html.compact-home:not(#x) .compact-overview > #stats { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; }
  html.compact-home:not(#x) .compact-overview > #dog-sex-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  html.compact-home:not(#x) .compact-overview > #dog-sex-tabs > * { grid-column: span 1 !important; }
}
html.compact-preview:not(#x) #tab-zkousky .empty-state-card:not(#y) { display:flex !important; flex-direction:column !important; align-items:center !important; justify-content:center !important; text-align:center; }
html.compact-preview #tab-zkousky .empty-state-card > * { grid-column:auto !important; grid-row:auto !important; }

/* Tmavý režim: dlaždice Snůšky / Mláďata / Volných */
html.dark.compact-litters:not(#x) .cl-overview:not(#clx) > .cl-stat-all { --k:#a9bccf; --b:#232b36; }
html.dark.compact-litters:not(#x) .cl-overview:not(#clx) > .cl-stat-pups { --k:#6fcf97; --b:#1f2d26; }
html.dark.compact-litters:not(#x) .cl-overview:not(#clx) > .cl-stat-free { --k:#f0a95a; --b:#33281b; }
html.dark.compact-litters:not(#x) .cl-overview:not(#clx) > .cl-stat.cl-stat-on { background:var(--k) !important; color:#10151c !important; }
html.dark.compact-litters:not(#x) .cl-overview:not(#clx) > .cl-stat.cl-stat-on * { color:#10151c !important; }

/* Prázdná karta Financí: stejně jako v Kočkách vycentrovaná uvnitř (ikonka, nadpis, text, štítek), 7. 11. 2026 */
html.compact-preview:not(#x) #tab-platby .empty-state-card:not(#y) { display:flex !important; flex-direction:column !important; align-items:center !important; justify-content:center !important; text-align:center; }
html.compact-preview #tab-platby .empty-state-card > * { text-align:center; grid-column:auto !important; grid-row:auto !important; }
html.compact-preview #tab-platby .empty-state-card .card-action-nav { width:auto !important; max-width:100%; }

/* Finance na telefonu: čtyři horní tlačítka (Příjem, Výdej, Export, Hledat) v jedné řadě, 7. 11. 2026 */
@media (max-width:600px) {
  html.compact-finance:not(#x) #header-row2:not(#y) { display:flex !important; flex-wrap:nowrap !important; gap:4px !important; }
  html.compact-finance:not(#x) #header-row2:not(#y) :is(#add-income-btn,#add-expense-btn,#header-export-btn,#global-search-btn) { flex:1 1 0 !important; width:auto !important; min-width:0 !important; max-width:none !important; padding-left:2px !important; padding-right:2px !important; grid-column:auto !important; }
  html.compact-finance:not(#x) #header-row2:not(#y) #header-export-btn { order:3; }
  html.compact-finance:not(#x) #header-row2:not(#y) #global-search-btn { order:4; }
}

/* Telefon 7. 11. 2026: tři opravy */
/* 1) Dlaždice „Všichni“ a přepínač vzhledu stejně vysoké jako tlačítka (46 px), ne 59 px */
@media (max-width:600px) {
html.compact-home:not(#x) #stats:not(#y) > .stat.sz-tile,
html.compact-home:not(#x) #stats:not(#y) > .stat:has(+ .sz-tile) { height:46px !important; min-height:46px !important; padding-top:0 !important; padding-bottom:0 !important; box-sizing:border-box; }
html.compact-home:not(#x) #stats:not(#y) > .stat.sz-tile .sz-seg { height:100%; }
html.compact-home:not(#x) #stats:not(#y) > .stat.sz-tile .sz-seg button { min-height:0; height:100%; }
}
/* 2) Spodní lišta: nápis „Nastavení“ se vejde mezi okraje (bylo o 7 px širší) */
@media (max-width:480px) { html.compact-preview:not(#x) .ios-tab-bar:not(#y) .tab-label { font-size:calc(100vw / 38) !important; letter-spacing:-.03em; } }
/* 3) Zásobník kroužků: křížek v rohu už nepřekrývá „+ Nová série“ */
#ring-inventory-overlay .modal-body > div:first-child { padding-right:44px; box-sizing:border-box; }
/* 4) Kalendář: tlačítko Export bez ikonky 📥 (Petr 7. 11. 2026) */
html.compact-calendar:not(#x) #header-export-btn:not(#y) > span:first-child:not(#header-export-label) { display:none !important; }
html.compact-calendar:not(#x) #header-export-btn:not(#y) #header-export-label { margin-left:0 !important; }

/* Rychlost 7. 11. 2026: viditelná část karty mimo obrazovku se nekreslí (telefon měl při scrollu 16 snímků/s).
   POZOR: content-visibility NESMÍ být na samotné kartě (ořízne okna Detail a QR uvnitř karty, viz seznam-vzhled.css),
   proto jen na vnitřní části karty (.compact-summary / .cl-summary), okno Detail je její sourozenec.
   contain-intrinsic-size: auto = prohlížeč si po prvním vykreslení pamatuje skutečnou výšku. */
#dogs-list-content > .dog-card > .compact-disclosure > .compact-summary { content-visibility:auto; contain-intrinsic-size:auto 197px; }
#litters-sortable-container > .dog-card > .cl-summary { content-visibility:auto; contain-intrinsic-size:auto 264px; }
.zd-list > .zd-card { content-visibility:auto; contain-intrinsic-size:auto 205px; }   /* karta Zdraví nemá uvnitř žádná okna */
@media (max-width:600px) {
  #dogs-list-content > .dog-card > .compact-disclosure > .compact-summary { contain-intrinsic-size:auto 80px; }
  #litters-sortable-container > .dog-card > .cl-summary { contain-intrinsic-size:auto 116px; }
  .zd-list > .zd-card { contain-intrinsic-size:auto 150px; }
}
