/* ════════════════════════════════════════════════════════════════════
   10base – sjednocený vzhled s ostatními aplikacemi 10men (Marek)
   Přídavná vrstva nad style.css. Modrá zůstává identitou 10base.
   Zapnutí: <link rel="stylesheet" href="redesign.css"> za style.css
            + <script src="platform.js"></script> v <head>.
   Vypnutí: odebrat ty dva řádky. Nic jiného se nemění.
   ════════════════════════════════════════════════════════════════════ */

/* ── 1) Tokeny: jedna plocha, bez dekorativních čar ──────────────────
   Tmavý režim je čistě černý (#000): na OLED displejích pixely nesvítí,
   takže šetří baterii. Karty se od pozadí oddělují plochou, ne okrajem. */
:root {
  --r-card: 18px;
  --r-ctl: 14px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 22px rgba(0, 0, 0, 0.06);
  --hair: rgba(60, 60, 67, 0.12);
  --card-border: transparent;
  --raised: #ffffff;
  --btn-bg: #ffffff;   /* tlačítko na pozadí stránky: bílá plocha se stínem */
}
body.dark {
  --bg: #000000;
  --card: #151517;
  --raised: #1d1d20;
  --text: #ececee;
  --muted: #8e8e93;
  --btn-bg: #1f1f22;
  --shadow-card: none;
  --hair: rgba(255, 255, 255, 0.08);
}
html { background: #f2f2f7; }
body { background: var(--bg); }
body.dark, html:has(body.dark) { background: #000000; }

/* ── 2) Karty: jednotné zaoblení a plocha, žádný okraj ─────────────── */
.card, .event-card, .swipe-card, #detail-panel {
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  border-color: transparent;
}
.card { margin-bottom: 14px; }
.card.next, .event-card.main { border-radius: var(--r-card); }
.section-title { letter-spacing: 0.06em; }
.info-row, .event-row { border-color: var(--hair); }   /* čáry uvnitř karet oddělují řádky údajů, zůstávají */
.modal-content { border-radius: 24px; }
.profile-menu { border-radius: 16px; }
input, select, textarea, .ios-textarea { border-radius: var(--r-ctl); }
button, .btn-group button, .attendance-buttons button { border-radius: var(--r-ctl); }
.profile-btn { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }

/* ── 3) Hlavička: průhledné sklo bez čáry pod sebou ──────────────────
   Obsah pod ní se při rolování měkce ztrácí (místo ostré hrany).       */
header {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(24px);
  backdrop-filter: saturate(1.6) blur(24px);
  border-bottom: none;
  box-shadow: none;
}
header::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 84%, transparent), transparent);
}
header h1 { letter-spacing: -0.03em; }

/* ── 4) Tmavý režim: černá plocha, karty #151517, vyvýšené prvky #1d1d20 ── */
body.dark .splash { background: #000000; }
body.dark header { background: rgba(0, 0, 0, 0.84); border-bottom: none; }
body.dark header::after { background: linear-gradient(to bottom, rgba(0, 0, 0, 0.84), transparent); }
body.dark .modal-content,
body.dark .profile-menu { background: var(--raised); }
body.dark #detail-panel,
body.dark .swipe-card,
body.dark .event-card,
body.dark .skeleton-card { background: var(--card); }
/* postranní panel má stejný odstín jako karty (světlý #fff, tmavý #151517); karta profilu je o stupeň světlejší */
.sidebar { background: var(--card); border-right: none; }
body.dark .sidebar { background: var(--card); border-right: none; }
body.dark .sidebar-profile { background: #1d1d20; }
body.dark button { background: var(--btn-bg); border-color: transparent; }
body.dark .profile-btn, body.dark .active-member, body.dark .member-row,
body.dark .sidebar-profile-avatar, body.dark .days-badge { background: #222225; }
body.dark input, body.dark select, body.dark textarea { background: #1c1c1f; border-color: #2a2a2e; }
body.dark .event-row, body.dark .profile-menu-divider,
body.dark .heatmap-desktop tr { border-color: var(--hair) !important; }
body.dark .sidebar-nav-item:hover, body.dark .sidebar-action:hover { background: #1d1d20; }
body.dark .prog-song-row { background: #151517 !important; }
body.dark .card[style*="padding:0"] div[style*="border-bottom"] { border-color: var(--hair) !important; }

/* ── 5) Desktop postranní panel: bez dělicí čáry, členění dává mezera ── */
.sidebar { border-right: none; }
.sidebar-divider, body.dark .sidebar-divider { border: 0 !important; height: 14px; margin: 0; background: none !important; }
.sidebar-nav-item { border-radius: 12px; }
.sidebar-nav-item.active { box-shadow: inset 3px 0 0 #007aff; }

/* ── 5b) Tlačítka: plocha odlišná od podkladu, ne okraj ──────────────
   Původní okraj tlačítek používal barvu okraje karet (teď průhlednou), takže ve světlém
   režimu splývala s pozadím. Tlačítko na stránce je bílé se stínem, uvnitř karty a okna
   je tmavší šedé; v tmavém režimu jsou o stupeň světlejší než podklad. */
.card, .modal-content, #detail-panel, .event-card, .swipe-card { --btn-bg: #ebebf0; }
body.dark :is(.card, .modal-content, #detail-panel, .event-card, .swipe-card) { --btn-bg: #2a2a2e; }
button { border-color: transparent; }
body:not(.dark) button { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 3px 10px rgba(0, 0, 0, 0.05); }
body:not(.dark) :is(.card, .modal-content, #detail-panel, .event-card, .swipe-card) button { box-shadow: none; }
body:not(.dark) .sidebar button { box-shadow: none; }
/* zvýrazněná položka si drží proužek (stejně jako v 10space a 10korun) */
body .sidebar .sidebar-nav-item.active { box-shadow: inset 3px 0 0 #007aff; }
body.dark .sidebar .sidebar-nav-item.active { box-shadow: inset 3px 0 0 #0a84ff; }
body.sb-collapsed .sidebar .sidebar-nav-item.active { box-shadow: none; }

/* ── 6) Místo pro plovoucí lištu ────────────────────────────────────── */
@media (max-width: 1024px) {
  main { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
}

/* ════════════════════════════════════════════════════════════════════
   7) SPODNÍ PLOVOUCÍ LIŠTA
   Výchozí (Apple i ostatní): Liquid Glass
   ════════════════════════════════════════════════════════════════════ */
.bottom-wrap { padding: 0 16px calc(10px + env(safe-area-inset-bottom)); }
/* ════════════════════════════════════════════════════════════════════
   Spodní lišta, Apple (iOS 26 „Liquid Glass“). Android a ostatní: viz níže, beze změny.
   Vrstvy (vkládá platform.js do .bottom): .lg-blur jemně rozostřený základ, .lg-edge okraj čočky
   (silnější sytost a světlo na obvodu, jako když sklo láme obraz pod hranou), .lg-spec odlesk po obvodu (světlo shora vlevo),
   .lg-pill vybraná záložka jako vlastní kapka skla, která se mezi záložkami přesouvá.
   Safari neumí SVG filtr v backdrop-filter, takže lom obrazu je nahrazen vrstvami sytosti, jasu a odlesku.
   ════════════════════════════════════════════════════════════════════ */
html:not([data-platform="android"]) .bottom {
  --lg-accent: #007aff; --lg-accent-dark: #0a84ff;
  --h: 64px;
  position: relative; isolation: isolate; height: var(--h); width: min(100%, 420px); padding: 6px; gap: 0;
  border-radius: 999px; background: none; border: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 12px 30px rgba(20, 24, 40, 0.14), 0 3px 8px rgba(20, 24, 40, 0.08), 0 0 0 0.5px rgba(20, 24, 40, 0.10);
}
html:not([data-platform="android"]) .bottom::before, html:not([data-platform="android"]) .bottom::after { display: none; }
html:not([data-platform="android"]) .bottom .lg { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
/* základ: čiré sklo, jemné rozostření, zvýšená sytost barev pod ním */
html:not([data-platform="android"]) .bottom .lg-blur {
  z-index: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.10) 55%, rgba(255, 255, 255, 0.10));
  -webkit-backdrop-filter: blur(8px) saturate(1.55) brightness(1.04); backdrop-filter: blur(8px) saturate(1.55) brightness(1.04);
}
/* okraj čočky: na obvodu se barvy sytěji a jasněji vrství (3 pásy s klesající silou) */
html:not([data-platform="android"]) .bottom .lg-edge {
  z-index: 0;
  -webkit-backdrop-filter: blur(1px) saturate(1.3) brightness(0.98); backdrop-filter: blur(1px) saturate(1.3) brightness(0.98);
  -webkit-mask: linear-gradient(#000 0 0) exclude, linear-gradient(#000 0 0) content-box; mask: linear-gradient(#000 0 0) exclude, linear-gradient(#000 0 0) content-box;
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 4px; opacity: 0.85;
}
/* odlesk: tenká světlá hrana, nejjasnější vlevo nahoře a vpravo dole, a vnitřní záře */
html:not([data-platform="android"]) .bottom .lg-spec {
  z-index: 2;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.18), inset 0 1px 1px -0.5px rgba(255, 255, 255, 0.55), inset 0 -1px 1px -0.5px rgba(255, 255, 255, 0.25),
    inset 0 0 10px rgba(255, 255, 255, 0.10), inset 0 -8px 14px -10px rgba(20, 24, 40, 0.08);
}
html:not([data-platform="android"]) .bottom .lg-spec::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: conic-gradient(from 200deg at 50% 50%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.0) 22%, rgba(255, 255, 255, 0.0) 44%, rgba(255, 255, 255, 0.5) 62%, rgba(255, 255, 255, 0.0) 84%, rgba(255, 255, 255, 0.7));
  -webkit-mask: linear-gradient(#000 0 0) exclude, linear-gradient(#000 0 0) content-box; mask: linear-gradient(#000 0 0) exclude, linear-gradient(#000 0 0) content-box;
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* vybraná záložka: kapka skla, která se přesouvá */
html:not([data-platform="android"]) .bottom .lg-pill {
  position: absolute; z-index: 1; top: 6px; bottom: 6px; left: 0; width: 0; border-radius: 999px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.50), rgba(255, 255, 255, 0.22));
  -webkit-backdrop-filter: blur(3px) saturate(1.15) brightness(1.10); backdrop-filter: blur(3px) saturate(1.15) brightness(1.10);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.7), inset 0 1.5px 1px -0.5px rgba(255, 255, 255, 1), inset 0 -1px 1px -0.5px rgba(255, 255, 255, 0.5),
    inset 0 0 10px rgba(255, 255, 255, 0.35), 0 3px 10px rgba(20, 24, 40, 0.12);
  transition: transform 0.48s cubic-bezier(0.3, 1.3, 0.4, 1), width 0.48s cubic-bezier(0.3, 1.3, 0.4, 1), opacity 0.2s ease;
}
html:not([data-platform="android"]) .bottom button { position: relative; z-index: 3; flex: 1; background: transparent !important; box-shadow: none !important; min-height: 52px; }
html:not([data-platform="android"]) .bottom button.active { color: var(--lg-accent); background: transparent !important; box-shadow: none !important; }
html:not([data-platform="android"]) .bottom button.active .icon svg { stroke: var(--lg-accent); }
html:not([data-platform="android"]) .bottom button:not(.active) { color: #3c3c43; }

/* tmavý režim */
body.dark .bottom .lg-blur { background: linear-gradient(180deg, rgba(120, 120, 128, 0.30), rgba(60, 60, 67, 0.16) 55%, rgba(90, 90, 98, 0.24)); -webkit-backdrop-filter: blur(8px) saturate(1.4) brightness(1.0); backdrop-filter: blur(8px) saturate(1.4) brightness(1.0); }
body.dark .bottom .lg-edge { -webkit-backdrop-filter: blur(1px) saturate(1.2) brightness(1.25); backdrop-filter: blur(1px) saturate(1.2) brightness(1.25); opacity: 0.55; }
body.dark .bottom .lg-spec { box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.22), inset 0 1.5px 1px -0.5px rgba(255, 255, 255, 0.45), inset 0 -1.5px 1px -0.5px rgba(255, 255, 255, 0.22), inset 0 0 14px rgba(255, 255, 255, 0.07); }
body.dark .bottom .lg-spec::before { background: conic-gradient(from 200deg at 50% 50%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 22%, rgba(255, 255, 255, 0) 44%, rgba(255, 255, 255, 0.55) 62%, rgba(255, 255, 255, 0) 84%, rgba(255, 255, 255, 0.75)); }
body.dark .bottom .lg-pill { background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.3), inset 0 1.5px 1px -0.5px rgba(255, 255, 255, 0.55), inset 0 0 10px rgba(255, 255, 255, 0.10), 0 3px 12px rgba(0, 0, 0, 0.4); }
body.dark .bottom { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 3px 8px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(255, 255, 255, 0.08); }
body.dark .bottom button:not(.active) { color: #c7c7cc; }
body.dark .bottom { --lg-accent: #0a84ff; }


html:not([data-platform="android"]) .bottom button { padding: 8px 2px 7px; gap: 3px; border-radius: 999px; border: none; font-size: 10px; font-weight: 600; letter-spacing: 0.01em; transition: color 0.25s ease, transform 0.15s ease; }
html:not([data-platform="android"]) .bottom button small { font-size: 10px; margin-top: 0; }
html:not([data-platform="android"]) .bottom button .icon { width: 22px; height: 22px; }
html:not([data-platform="android"]) .bottom button .icon svg { width: 23px; height: 23px; }
html:not([data-platform="android"]) .bottom button:active { transform: scale(0.96); opacity: 1; }

/* ── Android: Samsung One UI ─────────────────────────────────────────
   Plná plovoucí lišta, velké zaoblení (superelipsa), indikátor „pilulka“
   za ikonou aktivní položky, štítky pod ikonou, měkký stín bez skla.    */
html[data-platform="android"] .bottom-wrap { padding: 0 12px calc(12px + env(safe-area-inset-bottom)); }
html[data-platform="android"] .bottom {
  width: 100%; max-width: 520px; gap: 0; padding: 8px 6px 6px; border-radius: 30px;
  background: #ffffff; border: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.10);
}
html[data-platform="android"] .bottom::before { display: none; }
html[data-platform="android"] .bottom button {
  gap: 5px; padding: 4px 2px 2px; border-radius: 18px;
  color: #5f5f66; font-size: 11px; font-weight: 500; background: transparent; box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
html[data-platform="android"] .bottom button small { font-size: 11px; font-weight: 500; }
html[data-platform="android"] .bottom button .icon { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 32px; }
html[data-platform="android"] .bottom button .icon::before {
  content: ""; position: absolute; left: 50%; top: 0; width: 64px; height: 32px; border-radius: 16px;
  transform: translateX(-50%) scaleX(0.5); opacity: 0; background: rgba(0, 122, 255, 0.16);
  transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1), opacity 0.18s ease;
}
html[data-platform="android"] .bottom button .icon svg { position: relative; width: 24px; height: 24px; transition: none; }
html[data-platform="android"] .bottom button.active { background: transparent; box-shadow: none; color: #1c1c1e; font-weight: 600; }
html[data-platform="android"] .bottom button.active small { font-weight: 700; }
html[data-platform="android"] .bottom button.active .icon::before { transform: translateX(-50%) scaleX(1); opacity: 1; }
html[data-platform="android"] .bottom button.active .icon svg { stroke: #0a5fd6; transform: none; }
html[data-platform="android"] .bottom button:active { transform: none; opacity: 1; }
html[data-platform="android"] .bottom button:active .icon::before { transform: translateX(-50%) scaleX(1); opacity: 1; background: rgba(0, 0, 0, 0.08); }

html[data-platform="android"] body.dark .bottom,
body.dark html[data-platform="android"] .bottom { background: #1f1f21; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04); }
html[data-platform="android"] body.dark .bottom button { color: #a9a9b0; background: transparent; }
html[data-platform="android"] body.dark .bottom button.active { color: #f2f2f7; background: transparent; box-shadow: none; }
html[data-platform="android"] body.dark .bottom button .icon::before { background: rgba(10, 132, 255, 0.28); }
html[data-platform="android"] body.dark .bottom button.active .icon svg { stroke: #6cb0ff; }
html[data-platform="android"] body.dark .bottom button:active .icon::before { background: rgba(255, 255, 255, 0.10); }

@media (prefers-reduced-motion: reduce) {
  .bottom button, html[data-platform="android"] .bottom button .icon::before { transition: none; }
}

/* ════════════════════════════════════════════════════════════════════
   8) Záložka Energie je skrytá (nepoužívá se).
   Kód v app.js zůstává a data v databázi (/energie) se nemažou.
   Záloha dat: rules-backup/ENERGIE-20261027-212908.json (+ .csv).
   Zpět: smazat tento blok a blok „Energie“ v platform.js.
   ════════════════════════════════════════════════════════════════════ */
#btnEnergy, #sidebarEnergy { display: none !important; }

/* ════════════════════════════════════════════════════════════════════
   9) MENU PROFILU
   Profilový obrázek (nebo iniciály), jednotná sada SVG ikon, bez dělicích čar
   (skupiny odděluje mezera) a animace otevření i zavření.
   ════════════════════════════════════════════════════════════════════ */
.profile-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 1000;
  width: min(304px, calc(100vw - 32px)); min-width: 0; padding: 8px; overflow: hidden;
  border-radius: 22px;
  background: var(--raised);   /* plná plocha: menu leží v hlavičce, která má sama rozmazání, vnořené by nic nerozostřilo */
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 0 0 0.5px rgba(255, 255, 255, 0.55);
  transform-origin: calc(100% - 22px) 0;
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.2s ease, transform 0.36s cubic-bezier(0.2, 1.25, 0.3, 1), visibility 0s;
}
/* zavřené menu zůstává v dokumentu, aby se dalo animovat (původní .hidden ho vypínalo hned) */
.profile-menu.hidden {
  display: block !important; opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-10px) scale(0.88);
  transition: opacity 0.14s ease, transform 0.18s cubic-bezier(0.4, 0, 1, 1), visibility 0s linear 0.18s;
}
body.dark .profile-menu {
  background: #18181b;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.7), inset 0 0 0 0.5px rgba(255, 255, 255, 0.10);
}

.profile-menu-info { display: flex; align-items: center; gap: 14px; padding: 12px 12px 14px; }
.pm-avatar {
  flex: none; width: 54px; height: 54px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #4aa0ff, #007aff); color: #fff; font-size: 19px; font-weight: 700; letter-spacing: 0.02em;
  box-shadow: 0 0 0 3px color-mix(in srgb, #007aff 22%, transparent);
}
.pm-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-id { min-width: 0; display: grid; gap: 2px; }
.profile-menu-name { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu-email { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.profile-menu-role, .profile-menu-voice {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1;
  padding: 4px 8px; border-radius: 999px; margin: 0;
}
.profile-menu-role { color: #007aff; background: color-mix(in srgb, #007aff 13%, transparent); }
body.dark .profile-menu-role { color: #4aa0ff; }
.profile-menu-voice { color: var(--muted); background: color-mix(in srgb, var(--text) 8%, transparent); }
.profile-menu-role:empty, .profile-menu-voice:empty { display: none; }

.pm-group { display: flex; flex-direction: column; gap: 2px; }
.pm-group + .pm-group { margin-top: 6px; }
.pm-group:not(:has(.profile-menu-item:not(.hidden))) { display: none; }
.profile-menu-item {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 10px 0 8px;
  border-radius: 14px; font-size: 15px; font-weight: 500; color: var(--text); opacity: 1;
  transition: background 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.profile-menu-item:hover { background: color-mix(in srgb, var(--text) 6%, transparent); opacity: 1; }
.profile-menu-item:active { background: color-mix(in srgb, var(--text) 11%, transparent); transform: scale(0.98); }
.profile-menu-item.hidden { display: none; }
.pm-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-icon {
  flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  color: var(--muted); background: color-mix(in srgb, currentColor 12%, transparent);
}
.pm-icon svg { width: 18px; height: 18px; display: block; }
.pm-icon.pm-blue { color: #007aff; }
body.dark .pm-icon.pm-blue { color: #4aa0ff; }
.pm-icon.pm-discord { color: #5865f2; }
.pm-icon.pm-red { color: #ff3b30; }
.profile-menu-logout { color: #ff3b30; }

/* obsah menu naskočí postupně po otevření */
.profile-menu:not(.hidden) .profile-menu-info { animation: pmIn 0.38s cubic-bezier(0.2, 0.9, 0.3, 1) 0.03s both; }
.profile-menu:not(.hidden) .profile-menu-item { animation: pmIn 0.36s cubic-bezier(0.2, 0.9, 0.3, 1) both; animation-delay: calc(70ms + var(--i, 0) * 34ms); }
@keyframes pmIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
.profile-btn { transition: transform 0.15s ease, box-shadow 0.2s ease; }
.profile-btn:active { transform: scale(0.94); }

@media (prefers-reduced-motion: reduce) {
  .profile-menu, .profile-menu.hidden { transition: opacity 0.12s ease, visibility 0s; transform: none; }
  .profile-menu:not(.hidden) .profile-menu-info, .profile-menu:not(.hidden) .profile-menu-item { animation: none; }
}

/* Logo v postranním panelu: černá 10 a modré „base“ (bez podtitulku) */
.sidebar-logo .logo-rest { color: #007aff; }
body.dark .sidebar-logo .logo-rest { color: #0a84ff; }

/* ════════════════════════════════════════════════════════════════════
   Postranní panel: stejné písmo, velikosti, odsazení a pořadí jako v 10space a 10korun
   (logo, karta profilu, položky 14 px, akce 13 px, pořadí: režim, Nastavení, Odhlásit se, čára, Skrýt panel)
   Písmo tlačítek se dědí ze stránky (systémové), stejně jako v 10space.
   ════════════════════════════════════════════════════════════════════ */
.sidebar { padding: 0; overflow-y: auto; }
body.sb-collapsed .sidebar { padding: 0; }
.sidebar-logo { padding: 22px 20px 6px; margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; color: var(--text); }
body.sb-collapsed .sidebar-logo { display: block; padding: 22px 0 6px; text-align: center; }
body.sb-collapsed .sidebar-logo .logo-rest { display: none; }
.sidebar-profile { margin: 10px 16px 8px; padding: 10px 12px; border-radius: 16px; gap: 10px; }
body.sb-collapsed .sidebar-profile { margin: 10px 10px 8px; padding: 8px 0; }
.sidebar-profile-avatar { background: #007aff; color: #fff; }
body.dark .sidebar-profile-avatar { background: #0a84ff; }
.sidebar-nav { padding: 4px 8px; gap: 2px; }
.sidebar-nav-item { font-family: inherit; font-size: 14px; font-weight: 400; color: #1c1c1e; padding: 9px 12px; gap: 10px; border-radius: 12px; }
body.dark .sidebar-nav-item { color: #8e8e93; }
.sidebar-nav-item:hover { background: #f2f2f7; opacity: 1; }
body.dark .sidebar-nav-item:hover { background: #1d1d20; }
.sidebar-nav-item.active { font-weight: 600; color: #007aff; background: rgba(0, 122, 255, 0.08); }
body.dark .sidebar-nav-item.active { color: #0a84ff; background: rgba(10, 132, 255, 0.15); }
.sidebar-bottom { padding: 0 8px 16px; margin-top: auto; gap: 2px; }
.sidebar-action { font-family: inherit; font-size: 13px; font-weight: 500; color: #6b6b70; padding: 9px 12px; gap: 10px; border-radius: 8px; }
body.dark .sidebar-action { color: #8e8e93; }
.sidebar-action:hover { background: #f2f2f7; opacity: 1; }
body.dark .sidebar-action:hover { background: #1d1d20; }
.sidebar-action-sep { margin: 8px 12px; }
.sidebar-nav-item .icon, .sidebar-action .icon { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-nav-item .icon svg, .sidebar-action .icon svg { width: 16px; height: 16px; }

/* ════════════════════════════════════════════════════════════════════
   Jednotná typografie a velikosti (vzor 10space), stejné ve všech třech aplikacích
   Písmo systémové i u tlačítek a polí; tlačítka 14 px / 500, výška 38 px, zaoblení 14; karty zaoblení 18, odsazení 18;
   nadpisy karet 11 px / 600 / verzálky; profilové tlačítko 40 px kolečko v barvě aplikace.
   ════════════════════════════════════════════════════════════════════ */
html, body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font-family: inherit; }
button { font-size: 14px; font-weight: 500; min-height: 38px; }
.card { padding: 18px; }
.section-title { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; }
.profile-btn { width: 40px; height: 40px; background: #007aff; color: #fff; font-size: 14px; font-weight: 700; }
body.dark .profile-btn { background: #0a84ff; color: #fff; }

/* okno s formulářem se klikem mimo nezavře, jen se zatřese */
@keyframes nudge { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.modal-content.nudge { animation: nudge .25s ease; }

/* barva aplikace pro Android */
html[data-platform="android"] { --and-accent: #0b57d0; --and-accent-dk: #a8c7fa; }

/* ═══ ANDROID: prostředí podle Material Design 3 (Google) ═══════════════════
   Platí jen pro Android (html[data-platform="android"]); Apple se nemění.
   Roboto/Google Sans, ploché plochy bez stínů, karty s tenkým obrysem, plná zaoblená tlačítka,
   pole s ostřejšími rohy, dialogy 28 px a spodní lišta od kraje ke kraji. */
html[data-platform="android"] {
  --and-font: "Google Sans Flex", Roboto, "Noto Sans", system-ui, sans-serif;
  --and-bg: #ffffff; --and-card: #f0f4f9; --and-outline: #e1e3e1; --and-field: #747775; --and-fieldbg: #f0f4f9; --and-fieldbg-card: #ffffff;
  --and-text: #1f1f1f; --and-muted: #5f6368; --and-bar: #f0f4f9; --and-tonal: #dde4ee;
  --and-accent-c: color-mix(in srgb, var(--and-accent) 14%, #ffffff);
  --and-on-accent-c: var(--and-accent);
  --r-card: 28px; --r-ctl: 4px; --shadow-card: none; --shadow-modal: none;
  --bg: var(--and-bg); --card: var(--and-card); --raised: #ffffff; --text: var(--and-text); --muted: var(--and-muted);
  --hair: var(--and-outline); --border: var(--and-outline); --btn-bg: var(--and-tonal); --btn-color: var(--and-text);
  --field-bg: var(--and-fieldbg); --input-bg: var(--and-fieldbg); --input-border: transparent; --surface-2: #f0f4f9;
  background: var(--and-bg);
}
html[data-platform="android"] body.dark {
  --and-bg: #131314; --and-card: #1e1f20; --and-outline: #444746; --and-field: #8e918f;
  --and-text: #e3e3e3; --and-muted: #a8abb0; --and-bar: #1e1f20; --and-tonal: #2d2f31; --and-fieldbg: #2d2f31; --and-fieldbg-card: #2d2f31;
  --and-accent: var(--and-accent-dk);
  --and-accent-c: color-mix(in srgb, var(--and-accent-dk) 26%, #1e1f20);
  --and-on-accent-c: var(--and-accent-dk);
  --bg: var(--and-bg); --card: var(--and-card); --raised: #2b2d30; --text: var(--and-text); --muted: var(--and-muted);
  --hair: #333537; --border: #333537; --btn-bg: var(--and-tonal); --btn-color: var(--and-text);
  --field-bg: var(--and-fieldbg); --input-bg: var(--and-fieldbg); --input-border: transparent; --surface-2: #2d2f31;
}
html[data-platform="android"]:has(body.dark) { background: #131314; }
html[data-platform="android"], html[data-platform="android"] body, html[data-platform="android"] button,
html[data-platform="android"] input, html[data-platform="android"] select, html[data-platform="android"] textarea { font-family: var(--and-font); }
html[data-platform="android"] body { background: var(--and-bg); color: var(--and-text); letter-spacing: 0; }

/* nadpisy: Material 3 (title large 22/400, bez záporného prostrkání) */
html[data-platform="android"] h1, html[data-platform="android"] .topbar-left h1, html[data-platform="android"] header h1,
html[data-platform="android"] .view-title, html[data-platform="android"] .dashboard-greeting { font-weight: 400; font-size: 22px; letter-spacing: 0; }
html[data-platform="android"] .section-title, html[data-platform="android"] .exp-group-title, html[data-platform="android"] .stat-card h3,
html[data-platform="android"] .card h3, html[data-platform="android"] .dashboard-card h3, html[data-platform="android"] .dashboard-card-title, html[data-platform="android"] .event-label, html[data-platform="android"] .projekt-sekce-title, html[data-platform="android"] .stat-label {
  text-transform: none; letter-spacing: .01em; font-size: 14px; font-weight: 500; color: var(--and-muted);
}

/* horní lišta: plochá, plná barva, bez rozmazání */
html[data-platform="android"] header, html[data-platform="android"] .topbar, html[data-platform="android"] .view-header {
  background: var(--and-bg); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; border: 0;
}
html[data-platform="android"] header::after { display: none; }

/* karty: ploché, obrys 1 px (tmavý režim bez obrysu, odliší je odstín) */
html[data-platform="android"] :is(.card, .event-card, .swipe-card, #detail-panel, .stat-card, .transit-row, .ledger, .acct-card, .bal-table, .settings-group,
  .inv-card, .exp-card, .rep-scroll, .dashboard-card, .projekt-card, .projekt-sekce, .login-card, .upload-progress-panel, .acct-switch) {
  border-radius: 28px; box-shadow: none; border: 0; background: var(--and-card);
}
html[data-platform="android"] body.dark :is(.card, .event-card, .swipe-card, #detail-panel, .stat-card, .transit-row, .ledger, .acct-card, .bal-table, .settings-group,
  .inv-card, .exp-card, .rep-scroll, .dashboard-card, .projekt-card, .projekt-sekce, .login-card, .upload-progress-panel, .acct-switch) { border-color: transparent; background: var(--and-card); }
html[data-platform="android"] :is(.projekt-card, .dashboard-card):hover { box-shadow: none; }

/* tlačítka: plná (výplň) a tonální, kapsle 40 px, bez stínu */
html[data-platform="android"] :is(button, .btn-group button, .attendance-buttons button, .btn-secondary, .btn-primary, .btn-danger, .modal-btn, .filter-btn,
  .projekt-card-btn, .projekt-wiki-btn, .detail-save-btn, .detail-cancel-btn, .drive-toolbar-btn, .multi-toolbar-btn, .upload-btn, .primary-btn, .modal-skupina-btn) {
  border-radius: 999px; box-shadow: none; font-size: 14px; font-weight: 500; letter-spacing: .01em; min-height: 40px; text-transform: none;
}
html[data-platform="android"] :is(.btn-primary, .modal-btn-primary, .drive-toolbar-btn.primary, .upload-btn, .projekt-card-btn.primary, .detail-save-btn, .primary-btn) {
  background: var(--and-accent); color: #fff; border: 0;
}
html[data-platform="android"] body.dark :is(.btn-primary, .modal-btn-primary, .drive-toolbar-btn.primary, .upload-btn, .projekt-card-btn.primary, .detail-save-btn, .primary-btn) { color: #0b0b0c; }
html[data-platform="android"] :is(.btn-secondary, .modal-btn-secondary, .filter-btn, .projekt-card-btn, .projekt-wiki-btn, .detail-cancel-btn, .drive-toolbar-btn, .multi-toolbar-btn, .modal-skupina-btn) {
  background: var(--and-tonal); color: var(--and-text); border: 0;
}
html[data-platform="android"] :is(.filter-btn.active, .modal-skupina-btn.selected, .drive-toolbar-btn.active-filter) { background: var(--and-accent-c); color: var(--and-on-accent-c); }
html[data-platform="android"] :is(.btn-primary, .modal-btn-primary, .btn-secondary, .modal-btn-secondary):active { filter: brightness(.92); transform: none; }
html[data-platform="android"] .modal-btn-ghost { background: transparent; color: var(--and-accent); }

/* pole: vyplněná bez rámečku (jako ve formulářích Google), po zaostření podtržení v barvě aplikace */
html[data-platform="android"] :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea, input.field, select.field, textarea.field, .detail-input, .ios-textarea) {
  border-radius: 999px; background: var(--and-fieldbg); border: 0; box-shadow: none; padding-left: 18px; padding-right: 18px; min-height: 48px;
}
html[data-platform="android"] textarea { border-radius: 24px; padding-top: 14px; }
html[data-platform="android"] :is(.card, .event-card, .swipe-card, #detail-panel, .stat-card, .transit-row, .ledger, .acct-card, .settings-group, .inv-card, .exp-card, .dashboard-card, .projekt-card, .projekt-sekce) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea, input.field, .detail-input) { background: var(--and-fieldbg-card); }
html[data-platform="android"] body.dark :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea, input.field, select.field, textarea.field, .detail-input) { background: var(--and-fieldbg); border: 0; }
html[data-platform="android"] :is(input, select, textarea, .detail-input):focus { outline: none; border: 0; box-shadow: inset 0 -2px 0 var(--and-accent); }
html[data-platform="android"] .field label, html[data-platform="android"] label { color: var(--and-muted); font-weight: 500; font-size: 12px; letter-spacing: .02em; }
html[data-platform="android"] :is(input[type=checkbox], input[type=radio], input[type=range], progress) { accent-color: var(--and-accent); }
html[data-platform="android"] body.dark :is(.modal, .tn-dlg, .modal-content) :is(input, select, textarea) { background: #383b3e; }

/* dialogy a okna: 28 px, plochá, hlavička vlevo, tlačítka vpravo jako v Material 3 */
html[data-platform="android"] :is(.modal:not(:has(> .modal-backdrop)), .modal-content) { border-radius: 28px; box-shadow: none; background: var(--and-card); border: 0; }
html[data-platform="android"] body:not(.dark) :is(.modal:not(:has(> .modal-backdrop)), .modal-content) { background: #ffffff; }
html[data-platform="android"] body:not(.dark) :is(.modal, .modal-content, .tn-dlg) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) { background: #f0f4f9; }
html[data-platform="android"] body.dark :is(.modal:not(:has(> .modal-backdrop)), .modal-content) { background: #2b2d30; }
html[data-platform="android"] :is(.modal-overlay, .modal-backdrop, .tn-ov) { background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-platform="android"] :is(.modal-title, .modal-header, .tn-dlg h2, .modal h2) { font-size: 24px; font-weight: 400; letter-spacing: 0; line-height: 1.3; color: var(--and-text); }
html[data-platform="android"] .modal .modal-header, html[data-platform="android"] .modal-content .modal-header { background: transparent; text-align: left; }
html[data-platform="android"] .modal-close { background: transparent; color: var(--and-muted); }
html[data-platform="android"] :is(.modal-footer, .btn-group) { gap: 8px; }
html[data-platform="android"] .modal-footer { justify-content: flex-end; }
html[data-platform="android"] .modal-footer > :is(button, .modal-btn):not(.modal-footer-stack *) { flex: 0 0 auto; padding-left: 24px; padding-right: 24px; }
html[data-platform="android"] .modal-footer-stack > * { flex: none; width: 100%; }
html[data-platform="android"] .modal-footer .btn-secondary, html[data-platform="android"] .modal-footer .modal-btn-secondary { background: transparent; color: var(--and-accent); }

/* menu a nabídky: plochý povrch, 12 px */
html[data-platform="android"] :is(.pmenu, .profile-menu, .menu, .inv-menu, .context-menu, .desktop-profile-menu, .mobile-profile-menu, .autocomplete-dropdown, .search-results) {
  border-radius: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, .18), 0 4px 8px 3px rgba(0, 0, 0, .09); border: 0;
}
html[data-platform="android"] body.dark :is(.pmenu, .profile-menu, .menu, .inv-menu, .context-menu, .desktop-profile-menu, .mobile-profile-menu) { box-shadow: none; background: #2b2d30; }

/* odznaky a štítky: 8 px, bez velkých písmen */
html[data-platform="android"] :is(.badge, .chip, .tag, .status, .pill, .doc-type, .profile-menu-role, .profile-menu-voice, .pm-role, .exp-status) { border-radius: 8px; letter-spacing: .01em; text-transform: none; }

/* profilové tlačítko, oznámení, přepínač záložek */
html[data-platform="android"] .profile-btn { background: var(--and-accent); box-shadow: none; }
html[data-platform="android"] body.dark .profile-btn { color: #0b0b0c; }
html[data-platform="android"] .tn-toast, html[data-platform="android"] #toast, html[data-platform="android"] .toast {
  background: #313033; color: #f4eff4; border-radius: 4px; box-shadow: none; font-size: 14px;
}

/* ── spodní lišta: od kraje ke kraji, navazuje na spodní hranu ────────────────
   Lišta má vlastní barvu až do dolního okraje obrazovky a pod ikonami si ponechává odsazení
   pro systémová tlačítka (env(safe-area-inset-bottom): u gest i u tří tlačítek se doplní samo,
   u prohlížeče, který si lištu systému řeší sám, je odsazení 0 a lišta těsně sedí nad ní). */
html[data-platform="android"] .bottom-wrap { padding: 0; bottom: 0; left: 0; right: 0; display: block; }
html[data-platform="android"] .bottom {
  width: 100%; max-width: none; margin: 0; gap: 0; border-radius: 0; border: 0;
  padding: 12px 8px calc(16px + env(safe-area-inset-bottom));
  background: var(--and-bar); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
html[data-platform="android"] .bottom button { padding: 0 2px; gap: 4px; min-height: 0; border-radius: 16px; background: transparent !important; color: var(--and-muted); font-size: 12px; font-weight: 500; letter-spacing: .02em; }
html[data-platform="android"] .bottom button small { font-size: 12px; font-weight: 500; letter-spacing: .02em; }
html[data-platform="android"] .bottom button .icon { height: 32px; }
html[data-platform="android"] .bottom button .icon::before { width: 64px; background: var(--and-accent-c); }
html[data-platform="android"] .bottom button.active { color: var(--and-text); }
html[data-platform="android"] .bottom button.active small { font-weight: 600; }
html[data-platform="android"] .bottom button.active .icon svg { stroke: var(--and-on-accent-c); }
html[data-platform="android"] .bottom button:not(.active) .icon svg { stroke: var(--and-muted); }
html[data-platform="android"] body.dark .bottom { background: var(--and-bar); box-shadow: none; }
html[data-platform="android"] body.dark .bottom button { color: var(--and-muted); }
html[data-platform="android"] body.dark .bottom button.active { color: var(--and-text); }
html[data-platform="android"] body.dark .bottom button .icon::before { background: var(--and-accent-c); }
html[data-platform="android"] body.dark .bottom button.active .icon svg { stroke: var(--and-on-accent-c); }

/* systémové dialogy (10space) a vyhledávací pole */
html[data-platform="android"] .tn-dlg { border-radius: 28px; box-shadow: none; padding: 24px 24px 16px; background: var(--and-card); }
html[data-platform="android"] body.dark .tn-dlg { background: #2b2d30; }
html[data-platform="android"] .tn-dlg h2 { font-size: 24px; font-weight: 400; letter-spacing: 0; }
html[data-platform="android"] .tn-btn { min-height: 40px; border-radius: 20px; flex: 0 0 auto; padding: 0 20px; font-size: 14px; font-weight: 500; letter-spacing: .01em; background: transparent; color: var(--and-accent); }
html[data-platform="android"] body.dark .tn-btn:not(.tn-primary):not(.tn-danger) { background: transparent; }
html[data-platform="android"] .tn-btn.tn-primary, html[data-platform="android"] .tn-btn.tn-danger { background: var(--and-accent); color: #fff; }
html[data-platform="android"] body.dark :is(.tn-btn.tn-primary, .tn-btn.tn-danger) { color: #0b0b0c; }
html[data-platform="android"] .tn-actions { gap: 8px; }
html[data-platform="android"] .search-bar { border-radius: 28px; border: 0; box-shadow: none; background: var(--and-tonal); }
html[data-platform="android"] .search-bar :is(input, select) { border: 0; background: transparent !important; }
html[data-platform="android"] .modal-backdrop { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: rgba(0, 0, 0, .32) !important; }

/* popisky bez velkých písmen (Material 3 používá běžnou velikost písmen) */
html[data-platform="android"] :is(.ob-step-label, .rep-controls label, .rep-table th, .acct-table th, .stat-label, .kd-sum-row.head, .bal-table caption, .group-title, table.rep th, .exp-group-title, .section-title,
  .modal-section-title, .detail-label, .sidebar-section-title, .event-label, .projekt-sekce-title, .dashboard-card-title, h3, .info-label) { text-transform: none; letter-spacing: .01em; }
html[data-platform="android"] .modal .modal-header .modal-title, html[data-platform="android"] .modal .modal-title { font-size: 24px; font-weight: 400; letter-spacing: 0; }

/* tlačítka na šedé kartě se od ní musí odlišit */
html[data-platform="android"] :is(.card, .event-card, .swipe-card, #detail-panel, .stat-card, .transit-row, .ledger, .acct-card, .settings-group, .inv-card, .exp-card, .dashboard-card, .projekt-card, .projekt-sekce, .modal-content, .modal, .tn-dlg) { --btn-bg: var(--and-tonal); }
html[data-platform="android"] body.dark :is(.card, .event-card, .swipe-card, #detail-panel, .modal-content) { --btn-bg: var(--and-tonal); }
html[data-platform="android"] body:not(.dark) :is(.card, .event-card, .swipe-card, #detail-panel) button:not(.btn-primary):not([style*="background"]) { background: var(--and-tonal); }

/* dialog s polem: okno a pole se od sebe a od okolí musí odlišit v obou režimech */
html[data-platform="android"] body:not(.dark) .tn-dlg { background: #ffffff; }
html[data-platform="android"] body:not(.dark) :is(.tn-dlg, .modal, .modal-content) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) { background: #eef1f6; }
html[data-platform="android"] body.dark .tn-dlg { background: #2b2d30; }
html[data-platform="android"] body.dark :is(.tn-dlg, .modal, .modal-content) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) { background: #3c4043; }
html[data-platform="android"] :is(.tn-dlg, .modal) :is(input, select, textarea):focus { box-shadow: inset 0 -2px 0 var(--and-accent); }
html[data-platform="android"] .tn-dlg input { border-radius: 999px; min-height: 48px; padding: 0 14px; border: 0; width: 100%; box-sizing: border-box; }

/* ── formuláře: blok polí s ikonou a zástupným textem, výběry jako pilulky ───────── */
html[data-platform="android"] { --and-unit: #eef1f6; }
html[data-platform="android"] body.dark { --and-unit: #3c4043; }
html[data-platform="android"] .and-unit { position: relative; display: block; margin: 0 !important; background: var(--and-unit); border-radius: 0; min-height: 56px; box-sizing: border-box; }
html[data-platform="android"] .and-unit.and-g1, html[data-platform="android"] .and-unit.and-pill { border-radius: 999px; margin-bottom: 12px !important; }
html[data-platform="android"] .and-unit.and-g1.and-area { border-radius: 28px; }
html[data-platform="android"] .and-unit.and-gf { border-radius: 28px 28px 0 0; }
html[data-platform="android"] .and-unit.and-gl { border-radius: 0 0 28px 28px; margin-bottom: 12px !important; }
html[data-platform="android"] .and-unit.and-gm { border-radius: 0; }
html[data-platform="android"] .and-unit:not(.and-g1):not(.and-gf):not(.and-gm):not(.and-gl):not(.and-pill) { border-radius: 999px; margin-bottom: 12px !important; }
html[data-platform="android"] .and-unit > label:not(.and-wrap), html[data-platform="android"] .and-unit > .detail-label { display: none; }
html[data-platform="android"] label.and-unit { font-size: 0; line-height: 0; }
html[data-platform="android"] .and-unit :is(input, select, textarea) {
  width: 100%; min-height: 56px; box-sizing: border-box; background: transparent !important; border: 0 !important; border-radius: inherit !important;
  padding: 0 18px 0 56px !important; font-size: 16px; line-height: 1.4; box-shadow: none !important; margin: 0; color: var(--and-text);
}
html[data-platform="android"] .and-unit textarea { padding-top: 16px !important; padding-bottom: 12px !important; min-height: 96px; }
html[data-platform="android"] .and-unit.and-float :is(input, select) { padding-top: 20px !important; padding-bottom: 4px !important; }
html[data-platform="android"] .and-unit input[type=file] { padding-top: 22px !important; font-size: 14px; }
html[data-platform="android"] .and-unit input[type=file]::file-selector-button { margin-right: 10px; }
html[data-platform="android"] .and-ico { position: absolute; left: 18px; top: 16px; width: 24px; height: 24px; color: var(--and-muted); pointer-events: none; line-height: 0; z-index: 1; }
html[data-platform="android"] .and-ico svg { width: 24px; height: 24px; display: block; }
html[data-platform="android"] .and-cap { position: absolute; left: 56px; top: 8px; font-size: 12px; line-height: 1; color: var(--and-muted); letter-spacing: .02em; pointer-events: none; z-index: 1; }
/* čára se objeví až po ťuknutí do pole */
html[data-platform="android"] .and-unit:focus-within { box-shadow: inset 0 -2px 0 var(--and-accent); }
html[data-platform="android"] .and-unit:focus-within .and-ico { color: var(--and-accent); }
html[data-platform="android"] .and-unit.and-gl, html[data-platform="android"] .and-unit.and-g1 { overflow: hidden; }
html[data-platform="android"] .and-cap { right: 48px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-platform="android"] :is(.card, .event-card, .swipe-card, .inv-card, .exp-card, .settings-group) .and-unit { background: var(--and-fieldbg-card); }
html[data-platform="android"] body:not(.dark) .acct-form { background: #ffffff; }
html[data-platform="android"] body.dark .acct-form { background: #2b2d30; }
html[data-platform="android"] .acct-form-head { background: transparent; }

/* formulář v okně není obalen další kartou: bloky polí leží přímo v okně */
html[data-platform="android"] :is(.modal-content, .modal) .card { background: transparent !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; border: 0 !important; margin: 0 !important; }
html[data-platform="android"] :is(.modal-content, .modal) .card .and-unit { background: var(--and-unit); }
html[data-platform="android"] label.and-unit > span:not(.and-cap) { display: none; }
html[data-platform="android"] label.and-unit > br { display: none; }
html[data-platform="android"] :is(.modal-content, .modal) label:has(> input[type=checkbox]) { margin: 4px 0 14px 8px !important; }

/* jemné doladění: text pole se opticky zarovná na střed ikony, šipka výběru má odstup od kraje */
html[data-platform="android"] .and-unit:not(.and-float) :is(input, select) { padding-top: 3px !important; }
html[data-platform="android"] .and-unit:not(.and-float) textarea { padding-top: 19px !important; }
html[data-platform="android"] .and-unit select {
  -webkit-appearance: none; appearance: none; padding-right: 52px !important;
  background-color: transparent !important; background-repeat: no-repeat !important; background-position: right 22px center !important; background-size: 14px 14px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E") !important;
}
html[data-platform="android"] body.dark .and-unit select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4c7c5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E") !important;
}
html[data-platform="android"] .and-unit input[type=date], html[data-platform="android"] .and-unit input[type=time] { padding-right: 14px !important; }
html[data-platform="android"] .and-unit ::-webkit-calendar-picker-indicator { margin-right: 6px; }

/* spodní lišta: nižší, menší ikony i popisky; aktivní záložka v barvě aplikace */
html[data-platform="android"] .bottom { padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); }
html[data-platform="android"] .bottom button { gap: 2px; }
html[data-platform="android"] .bottom button .icon { height: 28px; }
html[data-platform="android"] .bottom button .icon::before { width: 56px; height: 28px; border-radius: 14px; }
html[data-platform="android"] .bottom button .icon svg { width: 21px; height: 21px; }
html[data-platform="android"] .bottom button, html[data-platform="android"] .bottom button small { font-size: 11px; }
html[data-platform="android"] .bottom button.active, html[data-platform="android"] body.dark .bottom button.active { color: var(--and-on-accent-c); }

/* ═══ POČÍTAČ: kompaktní hustota (myš a klávesnice, šířka od 768 px) ═══════════
   Menší písmo a pole, užší okna a formuláře ve dvou sloupcích; dotyková zařízení a telefony se nemění. */
@media (min-width: 768px) and (pointer: fine) {
  :root { --r-ctl: 10px; --r-card: 14px; }
  body { font-size: 14px; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea, .detail-input,
  .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
    font-size: 13px; min-height: 32px; padding-top: 5px; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; border-radius: 10px;
  }
  .field input[type=date], .field input[type=time] { padding-right: 8px; }
  select, .field select { padding-right: 26px; }
  textarea { min-height: 64px; }
  input.field, select.field, textarea.field { min-height: 34px; }
  label, .field label, .detail-label { font-size: 11px; margin-bottom: 2px; letter-spacing: .01em; line-height: 1.3; }
  .field { margin-bottom: 0; }
  .field-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin-bottom: 12px; }
  .field-group .field { margin: 0; min-width: 0; }
  .field-group .field:is(:has(input[type=url]), .autocomplete-wrap, :has(textarea), :has(select[id$="code"]), :has(input[id$="desc"]), :has(input[id$="party"]), :has(input[id$="note"]), :has(input[id$="name"]), :has(input[id$="vendor"]), [style*="display:flex"], .field-wide) { grid-column: 1 / -1; }
  button { font-size: 13px; }
  .btn-primary, .btn-secondary, .btn-danger, .modal-btn, .tn-btn, .filter-btn, .type-btn { font-size: 13px; min-height: 34px; padding: 7px 14px; border-radius: 10px; }
  .btn-primary, .btn-secondary, .modal-btn { font-weight: 600; }
  /* okna */
  .modal:not(:has(> .modal-backdrop)) { max-width: 640px; border-radius: 18px; }
  .modal:not(:has(> .modal-backdrop)):not(:has(.field-group)) { max-width: 460px; }
  .modal-content { max-width: 600px; border-radius: 18px; padding: 18px 20px; }
  .modal-content .card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; align-items: start; }
  .modal-content .card > :not(label), .modal-content .card > label:is(:has(textarea), :has(input[type=url]), :has(#fName), :has(input[placeholder*="Místo"]), :has(input[placeholder*="discord"]), :has(select[id*="Recurrence"])) { grid-column: 1 / -1; }
  .modal-content .card > label { margin: 0 !important; display: block; font-size: 11px; }
  .modal-content .card label input:not([type=checkbox]), .modal-content .card label select, .modal-content .card label textarea { width: 100%; margin-top: 2px; box-sizing: border-box; }
  .modal-content .card textarea { min-height: 56px !important; padding: 6px 10px !important; border: 0 !important; border-radius: 10px !important; background: var(--field-bg, #f2f2f7); }
  .modal-header { padding: 14px 20px 6px; }
  .modal-title, .modal h2, .tn-dlg h2 { font-size: 16px; }
  .modal-body { padding: 10px 20px 4px; }
  .modal-footer { padding: 10px 20px 16px; gap: 8px; }
  .modal-footer > button, .modal-footer .btn-primary { flex: 0 0 auto; }
  .modal-close { width: 26px; height: 26px; font-size: 13px; }
  .tn-dlg { max-width: 360px; padding: 18px 20px 14px; border-radius: 18px; }
  .tn-btn { min-height: 34px; padding: 0 16px; font-size: 13px; border-radius: 10px; }
  .tn-dlg input { min-height: 34px; font-size: 13.5px; }
  /* karty, statistiky, tabulky */
  .stat-card, .transit-row, .dashboard-card, .card, .projekt-card, .projekt-sekce { padding: 14px 16px; }
  .stat-value { font-size: 20px; }
  .stat-label, .section-title, .exp-group-title, .dashboard-card-title { font-size: 11px; }
  .view-title, header h1 { font-size: 20px; }
  .acct-form { padding: 8px 14px 12px; gap: 6px 10px; }
  .acct-form .field input, .acct-form .field select { min-height: 30px; }
  .acct-table, .acct-table td, .acct-table th, #rep-journal, .rep-table td, .rep-table th { font-size: 12.5px; }
  .acct-table td, .rep-table td { padding: 7px 10px; }
  .acct-table th, .rep-table th { padding: 7px 10px; font-size: 10.5px; }
  .type-btn { padding: 6px 12px; }
  .btn-group { margin-bottom: 10px; }
  .inv-card { padding: 0 !important; }
  .inv-card .inv-main { padding: 10px 14px !important; gap: 3px !important; }
  .inv-card .inv-r1, .inv-card .inv-name, .inv-card .inv-r3, .inv-card .inv-code { margin: 0 !important; }
  .profile-btn { width: 34px; height: 34px; font-size: 12px; }
}

/* karty vedle sebe tam, kde se vejde víc (jen počítač s myší a širším oknem; tablety se nemění) */
@media (min-width: 1000px) and (pointer: fine) {
  /* 10space: Přehled ve sloupcích bez mezer, karty projektů v mřížce */
  .dashboard-grid { display: block !important; column-width: 400px; column-gap: 16px; }
  .dashboard-grid > * { break-inside: avoid; margin: 0 0 14px; }
  .dashboard-grid > .dashboard-empty { column-span: all; }
  .projekty-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px !important; align-items: stretch; }
  .projekty-grid > * { margin: 0; min-width: 0; }
  /* 10korun: faktury a náhrady ve dvou sloupcích */
  .doc-list { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 10px !important; align-items: start; }
  #exp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 12px; align-items: start; }
  #exp-list > .exp-group-title { grid-column: 1 / -1; margin: 6px 0 0; }
  #exp-list > .exp-card, #exp-list > div:not(.exp-group-title) { margin: 0; }
}

/* odkaz vypadající jako tlačítko v kartě (Proplatit výdaje): stejný vzhled jako ostatní tlačítka v kartách */
.btn-card-link {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%;
  min-height: 38px; padding: 8px 14px; border-radius: var(--r-ctl); background: var(--btn-bg); color: #007aff;
  font-size: 14px; font-weight: 500; text-decoration: none; text-align: center; -webkit-tap-highlight-color: transparent;
}
body.dark .btn-card-link { color: #0a84ff; }
.btn-card-link:active { filter: brightness(0.94); }
html[data-platform="android"] .btn-card-link { border-radius: 999px; min-height: 40px; background: var(--and-tonal); color: var(--and-accent); letter-spacing: .01em; }
@media (min-width: 768px) and (pointer: fine) { .btn-card-link { min-height: 34px; padding: 7px 14px; font-size: 13px; border-radius: 10px; } }

/* ── Audit vzhledu: drobné opravy (klikací plochy, oddělovače nabídek, pozadí detailu na Androidu) ── */
.bottom-sheet-sep { height: 1px; margin: 0 20px; background: var(--hair, rgba(60, 60, 67, 0.12)); }
body.dark .bottom-sheet-sep { background: rgba(255, 255, 255, 0.08); }
html[data-platform="android"] .projekt-overlay { background: var(--and-bg); }
html[data-platform="android"] body.dark .projekt-overlay { background: var(--and-bg); }
@media (pointer: coarse) {
  .modal-close { width: 36px; height: 36px; }
  .dots-btn { min-width: 40px; min-height: 40px; }
  .kd-add, .a-neutral, .exp-actions button { min-height: 32px; }
}

/* ── Audit (10base): klikací plochy a popisky formulářů v oknech ── */
@media (pointer: coarse) {
  button[onclick^="eventsMonth"], button[onclick^="heatmap"], button[onclick^="klavesyShift"] { min-width: 40px; min-height: 40px; }
  html:not([data-platform="android"]) .modal-content .card > label { font-size: 12px; font-weight: 500; color: var(--muted); display: block; margin-bottom: 0; }
  html:not([data-platform="android"]) .modal-content .card > label > input, html:not([data-platform="android"]) .modal-content .card > label > select, html:not([data-platform="android"]) .modal-content .card > label > textarea { margin-top: 4px; }
  html:not([data-platform="android"]) .modal-content .card > label + label { margin-top: 12px; }
}
@media (min-width: 768px) and (pointer: fine) {
  body.dark .modal-content .card textarea { background: #1c1c1f !important; color: var(--text); }
  body:not(.dark) .modal-content .card textarea { background: #f2f2f7 !important; }
}

/* ═══ APPLE: profilové menu ve stylu Liquid Glass (jako spodní lišta) ═══════════
   Průsvitné sklo s rozostřením a sytostí pod ním, světlá hrana s odleskem; vnitřek menu je průhledný.
   Android tím není dotčen. */
html:not([data-platform="android"]) :is(.pmenu, .profile-menu, .mobile-profile-menu, .desktop-profile-menu) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(246, 247, 252, 0.93)) !important;
  -webkit-backdrop-filter: blur(30px) saturate(1.8) brightness(1.04); backdrop-filter: blur(30px) saturate(1.8) brightness(1.04);
  border: none !important; isolation: isolate;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.55), inset 0 1.5px 1px -0.5px rgba(255, 255, 255, 0.95), inset 0 -1px 1px -0.5px rgba(255, 255, 255, 0.4),
    inset 0 0 16px rgba(255, 255, 255, 0.25), 0 18px 44px rgba(20, 24, 40, 0.20), 0 3px 10px rgba(20, 24, 40, 0.10), 0 0 0 0.5px rgba(20, 24, 40, 0.10) !important;
}
html:not([data-platform="android"]) :is(.pmenu, .profile-menu, .mobile-profile-menu, .desktop-profile-menu)::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 5;
  background: conic-gradient(from 200deg at 50% 50%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 22%, rgba(255, 255, 255, 0) 44%, rgba(255, 255, 255, 0.55) 62%, rgba(255, 255, 255, 0) 84%, rgba(255, 255, 255, 0.75));
  -webkit-mask: linear-gradient(#000 0 0) exclude, linear-gradient(#000 0 0) content-box; mask: linear-gradient(#000 0 0) exclude, linear-gradient(#000 0 0) content-box;
  -webkit-mask-composite: xor; mask-composite: exclude;
}
html:not([data-platform="android"]) :is(.pmenu, .profile-menu, .mobile-profile-menu, .desktop-profile-menu) :is(.mobile-profile-menu-header, .pm-info, .profile-menu-info, .desktop-profile-menu-header, .pm-item, .pm-group, .profile-menu-item, .desktop-profile-menu-item, .mobile-profile-menu-item) { background-color: transparent; }
html:not([data-platform="android"]) :is(.pmenu, .profile-menu, .mobile-profile-menu, .desktop-profile-menu) :is(.pm-item, .profile-menu-item, .desktop-profile-menu-item, .mobile-profile-menu-item):hover { background: rgba(255, 255, 255, 0.45); }
html:not([data-platform="android"]) :is(.pmenu, .profile-menu, .mobile-profile-menu, .desktop-profile-menu) :is(.pm-item, .profile-menu-item, .desktop-profile-menu-item, .mobile-profile-menu-item):active { background: rgba(255, 255, 255, 0.6); }
html:not([data-platform="android"]) :is(.pmenu, .profile-menu, .mobile-profile-menu, .desktop-profile-menu) :is(.pm-icon, .pm-ic) { background-color: rgba(255, 255, 255, 0.55); }
/* tmavý režim */
html:not([data-platform="android"]) body.dark :is(.pmenu, .profile-menu, .mobile-profile-menu, .desktop-profile-menu) {
  background: linear-gradient(180deg, rgba(68, 68, 74, 0.97), rgba(46, 46, 51, 0.94)) !important;
  -webkit-backdrop-filter: blur(30px) saturate(1.5) brightness(1.0); backdrop-filter: blur(30px) saturate(1.5) brightness(1.0);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.22), inset 0 1.5px 1px -0.5px rgba(255, 255, 255, 0.4), inset 0 -1.5px 1px -0.5px rgba(255, 255, 255, 0.18),
    inset 0 0 18px rgba(255, 255, 255, 0.06), 0 20px 54px rgba(0, 0, 0, 0.6), 0 3px 10px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(255, 255, 255, 0.08) !important;
}
html:not([data-platform="android"]) body.dark :is(.pmenu, .profile-menu, .mobile-profile-menu, .desktop-profile-menu) :is(.pm-item, .profile-menu-item, .desktop-profile-menu-item, .mobile-profile-menu-item):hover { background: rgba(255, 255, 255, 0.12); }
html:not([data-platform="android"]) body.dark :is(.pmenu, .profile-menu, .mobile-profile-menu, .desktop-profile-menu) :is(.pm-item, .profile-menu-item, .desktop-profile-menu-item, .mobile-profile-menu-item):active { background: rgba(255, 255, 255, 0.18); }
html:not([data-platform="android"]) body.dark :is(.pmenu, .profile-menu, .mobile-profile-menu, .desktop-profile-menu) :is(.pm-icon, .pm-ic) { background-color: rgba(255, 255, 255, 0.10); }

/* ===== Tlačítka akcí na mobilu: mřížka 1 / 2 / hlavní + 2 / 2+2 / hlavní + 2+2 (viz platform.js) ===== */
@media (max-width: 768px) {
  [data-ar-n] { --ar-g: 8px; display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: var(--ar-g); align-items: stretch; justify-content: stretch !important; }
  [data-ar-n] > :not(button):not(a):not(input) { display: contents !important; }
  [data-ar-n] button, [data-ar-n] a[class*="btn"], [data-ar-n] input[type="button"], [data-ar-n] input[type="submit"] {
    width: auto !important; min-width: 0; max-width: none !important; margin: 0 !important; flex: 1 1 calc(50% - var(--ar-g) / 2) !important;
    white-space: normal; text-align: center; justify-content: center; overflow-wrap: anywhere; }
  [data-ar-n="1"] :is(button, a[class*="btn"], input[type="button"], input[type="submit"]), [data-ar-n] [data-ar-main] { flex: 1 1 100% !important; }
  /* dvojice s nestejnou šířkou: kratší text = užší tlačítko, delší se nemusí zalamovat (viz fit() v platform.js) */
  [data-ar-n] [data-ar-f] { flex: 0 0 calc((100% - var(--ar-g)) * var(--ar-f)) !important; }
  [data-ar-n] [data-ar-main] { order: -1; }
}

/* Android (Material 3): hlavní tlačítko je plná pilulka, ostatní jsou čistě textová tlačítka bez pozadí.
   Přepínače voleb (typ příjem/výdaj, filtry) si nechávají vlastní vzhled s označenou volbou. */
@media (max-width: 768px) {
  :where(html[data-platform="android"] [data-ar-n] :is(button, a[class*="btn"], input[type="button"], input[type="submit"]):not(.type-btn):not(.filter-btn)) {
    border-radius: 999px !important; min-height: 38px; font-size: 14px; font-weight: 600; letter-spacing: .01em; box-shadow: none !important; border: 0 !important;
    background: transparent !important; color: var(--and-accent) !important; }
  html[data-platform="android"] [data-ar-n] :is(button, a[class*="btn"]):not(.type-btn):not(.filter-btn):is(:active, :focus-visible):not([data-ar-main]):not(.btn-primary):not(.modal-btn-primary) { background: color-mix(in srgb, var(--and-accent) 12%, transparent) !important; }
  html[data-platform="android"] [data-ar-n] :is(button, a, input):is(.btn-danger, .modal-btn-danger, .a-no, .tn-danger):not(.tn-primary):not(.type-btn) { color: #b3261c !important; }
  html[data-platform="android"] body.dark [data-ar-n] :is(button, a, input):is(.btn-danger, .modal-btn-danger, .a-no):not(.type-btn) { color: #f2b8b5 !important; }
  html[data-platform="android"] [data-ar-n] :is(button, a, input):is(.btn-primary, .modal-btn-primary, .tn-primary, .primary-btn, .detail-save-btn, .ar-primary, [data-ar-main]),
  html[data-platform="android"] [data-ar-n="1"] :is(button, a, input):not(.type-btn):not(.filter-btn) { background: var(--and-accent) !important; color: #ffffff !important; }
  html[data-platform="android"] body.dark [data-ar-n] :is(button, a, input):is(.btn-primary, .modal-btn-primary, .tn-primary, .primary-btn, .detail-save-btn, .ar-primary, [data-ar-main]),
  html[data-platform="android"] body.dark [data-ar-n="1"] :is(button, a, input):not(.type-btn):not(.filter-btn) { color: #0b0b0c !important; }
  html[data-platform="android"] [data-ar-n] :is(button, a):is(.tn-danger) { background: #b3261c !important; color: #ffffff !important; }
  html[data-platform="android"] body.dark [data-ar-n] :is(button, a):is(.tn-danger) { background: #f2b8b5 !important; color: #601410 !important; }
  html[data-platform="android"] [data-ar-n] :is(button, a[class*="btn"]):disabled { opacity: .38; }
}

/* Apple (iOS 26): větší zaoblení, pilulková tlačítka, vzdušnější rozestupy, zavírání ikonou ✕ ve skleněném kruhu */
@media (max-width: 768px) {
  html[data-platform="apple"] { --r-card: 26px; --r-ctl: 18px; }
  html[data-platform="apple"] :is(.modal:not(:has(> .modal-backdrop)), .modal-content, .tn-dlg) { border-radius: 34px !important; }
  html[data-platform="apple"] .bottom-sheet { border-radius: 34px 34px 0 0; }
  html[data-platform="apple"] [data-ar-n] { --ar-g: 10px; gap: 10px; }
  html[data-platform="apple"] [data-ar-n] :is(button, a[class*="btn"], input[type="button"], input[type="submit"]):not(.type-btn):not(.filter-btn) {
    border-radius: 999px !important; min-height: 38px; font-size: 14px; font-weight: 600; padding-left: 14px; padding-right: 14px; }
  html[data-platform="apple"] :is(.modal-footer, .tn-actions, .rep-actions, .st-foot, .dk-foot)[data-ar-n] :is(button, a[class*="btn"], input[type="button"], input[type="submit"]):not(.type-btn):not(.filter-btn) { min-height: 38px; }
    html[data-platform="apple"] :is(.modal-footer, .tn-actions, .rep-actions) { padding-top: 14px; padding-bottom: 22px; }
  html[data-platform="apple"] .tn-btn { border-radius: 999px; min-height: 38px; }
  html[data-platform="apple"] [data-ar-n] .tn-btn:not(.tn-primary):not(.tn-danger) { background: rgba(120, 120, 128, .16); }
  /* nadpisy sekcí: větný tvar a o trochu větší, ne VELKÁ PÍSMENA (iOS 26) */
  html[data-platform="apple"] :is(.modal-section-title, .detail-label, .projekt-sekce-title, .dashboard-card-title, .prog-add-title, .stat-label, .exp-group-title, .group-title, .rep-controls label, .section-title, .season-title, .event-label, .bal-table caption) {
    text-transform: none !important; letter-spacing: 0 !important; font-size: 13px; font-weight: 600; }
  html[data-platform="apple"] body h3 { text-transform: none !important; letter-spacing: 0 !important; }
  /* víceřádková pole v oknech: stejné zaoblení a výplň jako ostatní pole, bez tvrdého rámečku */
  html[data-platform="apple"] :is(.modal-content, .modal) textarea { border: 0 !important; border-radius: var(--r-ctl, 18px) !important; background: rgba(120, 120, 128, .14) !important; padding: 12px 14px !important; }
  html[data-platform="apple"] [data-ar-icon] { display: none !important; }
  html[data-platform="apple"] [data-ar-n][data-ar-empty] { display: none !important; }
  html[data-platform="apple"] :is(.modal-content, .modal, .tn-dlg):has(> .ar-x) { position: relative; }
  html[data-platform="apple"] :is(.ar-x, .modal-close) {
    width: 38px; height: 38px; min-height: 0; padding: 0; border: 0; border-radius: 50%; flex: none;
    display: inline-flex; align-items: center; justify-content: center; color: inherit; cursor: pointer;
    background: color-mix(in srgb, currentColor 8%, rgba(255, 255, 255, .55)); -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
    box-shadow: 0 1px 8px rgba(0, 0, 0, .14), inset 0 0 0 .5px rgba(255, 255, 255, .6); }
  html[data-platform="apple"] .ar-x { position: absolute; top: 14px; right: 14px; z-index: 6; }
  html[data-platform="apple"] body.dark :is(.ar-x, .modal-close) { background: rgba(120, 120, 128, .32); box-shadow: 0 1px 8px rgba(0, 0, 0, .4), inset 0 0 0 .5px rgba(255, 255, 255, .14); }
  html[data-platform="apple"] .modal-close { font-size: 18px; line-height: 1; }
}

/* Apple: systémové písmo SF Pro (na iPhonu, iPadu a Macu se načte samo, soubor písma se nevkládá), optická velikost, těsnější velké nadpisy, částky číslicemi stejné šířky */
html[data-platform="apple"] body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, sans-serif; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html[data-platform="apple"] :is(.view-title, header h1, .modal h2, .modal-title, .tn-dlg h2, h1) { letter-spacing: -0.022em; }
html[data-platform="apple"] :is(.stat-value, .rep-table td, .acct-table td, td.r, th.r, .amount, .tx-amount, .bal-table td) { font-variant-numeric: tabular-nums; }

/* samostatné tlačítko = celá šířka; pole na Apple zaoblená; odkazy-tlačítka v mřížce přebíjí vložené styly */
@media (max-width: 768px) {
  [data-ar-solo] { display: flex !important; align-items: center; justify-content: center; width: 100% !important; box-sizing: border-box; margin-left: 0 !important; margin-right: 0 !important; white-space: normal; text-align: center; }
  html[data-platform="apple"] [data-ar-solo] { min-height: 38px !important; border-radius: 999px !important; font-size: 14px !important; font-weight: 600; }
  html[data-platform="apple"] [data-ar-n] a[class*="btn"] { min-height: 38px !important; border: 0 !important; font-size: 14px !important; }
  html[data-platform="apple"] :is(input, select, textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=search]):not(.search-select):not(#progSearch) { border-radius: 18px !important; }
  html[data-platform="apple"] textarea { border-radius: 18px !important; }
  html[data-platform="android"] [data-ar-solo] { min-height: 40px !important; border-radius: 999px !important; border: 0 !important; background: var(--and-accent) !important; color: #ffffff !important; font-size: 14px !important; font-weight: 600; box-shadow: none !important; }
  html[data-platform="android"] body.dark [data-ar-solo] { color: #0b0b0c !important; }
}

/* jednotná výška tlačítek na mobilu: 38 px (Apple i Android) */
@media (max-width: 768px) {
  html[data-platform] [data-ar-n] :is(button, a[class*="btn"], input[type="button"], input[type="submit"]):not(.type-btn):not(.filter-btn):not(.ar-x):not(.modal-close) { min-height: 38px !important; }
  html[data-platform] :is(.drive-toolbar-btn, .kd-add, .st-add) { min-height: 38px; }
}

/* Apple (iOS 26): přepínače (segmentované volby, záložky, filtry, typ příjem/výdaj) jsou pilulky, i jejich vnitřní tlačítka */
html[data-platform="apple"] :is(.st-seg, .pj-seg, .detail-tabs, .mobile-detail-modal-tabs, .acct-switch, .prog-seg, .doc-filters, .tabs, .type-toggle),
html[data-platform="apple"] :is(.st-seg, .pj-seg, .detail-tabs, .mobile-detail-modal-tabs, .acct-switch, .prog-seg, .tabs, .type-toggle) > :is(button, a, .tab),
html[data-platform="apple"] :is(.type-btn, .filter-btn, .doc-filters > button),
html[data-platform="apple"] .btn-group:has(> .type-btn) { border-radius: 999px !important; }

/* přepínače (segmenty, záložky, filtry, typ příjem/výdaj) jsou menší než tlačítka: 30 px */
@media (max-width: 768px) {
  html[data-platform] :is(.st-seg, .pj-seg, .detail-tabs, .mobile-detail-modal-tabs, .acct-switch, .prog-seg) { padding: 3px !important; gap: 2px !important; }
  html[data-platform] :is(.st-seg, .pj-seg, .detail-tabs, .mobile-detail-modal-tabs, .acct-switch, .prog-seg) > :is(button, a) {
    min-height: 30px !important; height: 30px; padding-top: 0 !important; padding-bottom: 0 !important; font-size: 13px !important; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
  html[data-platform] :is(.doc-filters > button, .type-btn, .filter-btn) { min-height: 30px !important; height: 30px; padding-top: 0 !important; padding-bottom: 0 !important; font-size: 13px !important; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
}

/* ===== Editor programu akce (přidávání skladeb) ===== */
.modal-content:has(.prog-foot) { --prog-bg: #ffffff; --prog-fill: rgba(120, 120, 128, .12); --prog-hair: rgba(60, 60, 67, .12); background: var(--prog-bg); }
body.dark .modal-content:has(.prog-foot) { --prog-bg: var(--raised, #1d1d20); --prog-fill: rgba(255, 255, 255, .08); --prog-hair: rgba(255, 255, 255, .1); }
html[data-platform="android"] body.dark .modal-content:has(.prog-foot) { --prog-bg: var(--and-card); }
.prog-seg { display: flex; gap: 4px; padding: 3px; margin: 6px 0 12px; border-radius: 12px; background: var(--prog-fill); }
.prog-seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0 !important; border-radius: 10px; background: transparent !important; color: inherit !important; box-shadow: none !important; padding: 9px 8px; font-size: 14px; font-weight: 600; }
.prog-seg button.active { background: var(--prog-bg) !important; box-shadow: 0 1px 4px rgba(0, 0, 0, .18) !important; color: var(--accent, #007aff) !important; }
.prog-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--prog-fill); font-size: 12px; font-weight: 700; color: inherit; opacity: .85; }
.prog-selected { margin-bottom: 14px; border-radius: 14px; background: var(--prog-fill); padding: 4px 12px; }
.prog-empty { margin: 0; padding: 12px 0; font-size: 14px; color: var(--muted, #8e8e93); }
.prog-sel-row { display: flex; align-items: center; gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--prog-hair); }
.prog-sel-row:last-child { border-bottom: 0; }
.prog-num { flex: 0 0 22px; font-weight: 700; font-size: 13px; color: var(--muted, #8e8e93); }
.prog-sel-name { flex: 1; min-width: 0; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.prog-ico { flex: 0 0 auto; width: 34px !important; min-height: 34px; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 10px !important; background: var(--prog-bg) !important; color: inherit !important; box-shadow: none !important; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }
.prog-ico:disabled { opacity: .3; }
.prog-ico.prog-del { color: #d93025 !important; }
.prog-add-title { margin: 4px 2px 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #8e8e93); }
.prog-search { width: 100%; box-sizing: border-box; margin-bottom: 4px; }
.prog-list { margin: 0 0 4px; }
html body .prog-list .prog-song-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; margin: 0 -6px; border-bottom: 1px solid var(--prog-hair); border-radius: 10px; background: transparent !important; color: inherit; cursor: pointer; }
html body .prog-list .prog-song-row.selected { background: color-mix(in srgb, var(--accent, #007aff) 12%, transparent) !important; }
.prog-song-text { flex: 1; min-width: 0; }
.prog-song-text b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.prog-pdf { flex: 0 0 auto; padding: 6px; text-decoration: none; font-size: 15px; }
.prog-badge { flex: 0 0 auto; min-width: 30px; height: 30px; box-sizing: border-box; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--prog-fill); color: var(--accent, #007aff); font-weight: 700; font-size: 16px; }
.prog-song-row.selected .prog-badge { background: var(--accent, #007aff); color: var(--prog-bg); font-size: 14px; }
.prog-song-row.in-other .prog-badge { font-size: 12px; color: var(--muted, #8e8e93); }
.prog-foot { position: sticky; bottom: -20px; z-index: 3; margin: 12px -20px -20px !important; padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); background: var(--prog-bg); border-radius: 0 0 24px 24px; }
.prog-sel-row { position: relative; transition: transform .16s ease; }
.prog-sel-row.dragging { transition: none; z-index: 5; background: var(--prog-bg); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); }
.prog-selected.is-dragging { user-select: none; -webkit-user-select: none; }
.prog-grip { flex: 0 0 30px; width: 30px !important; min-height: 40px; padding: 0 !important; margin: 0 -4px 0 -8px !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; box-shadow: none !important; color: var(--muted, #8e8e93) !important; display: inline-flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; }
.prog-sel-row.dragging .prog-grip { cursor: grabbing; color: var(--accent, #007aff) !important; }
.prog-grip:focus-visible { outline: 2px solid var(--accent, #007aff); }
.prog-copy { width: 100%; margin: 4px 0 0; min-height: 40px; border: 0 !important; border-radius: 12px !important; background: var(--prog-fill) !important; color: var(--accent, #007aff) !important; box-shadow: none !important; font-weight: 600; font-size: 14px; }
.prog-copy:disabled { opacity: .6; }
.prog-copy-row { display: flex; gap: 8px; margin: 4px 0 0; }
.prog-copy-row .prog-copy { flex: 1 1 0; width: auto; margin: 0; min-width: 0; }
.prog-copy[aria-expanded="true"] { background: color-mix(in srgb, var(--accent, #007aff) 16%, transparent) !important; }
.prog-src { margin: 8px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--prog-fill); }
.prog-src.hidden { display: none; }
.prog-src .prog-search { margin: 0 0 8px; }
.prog-src-mode { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 0 0 6px; }
.prog-src-mode input { width: auto; margin: 0; }
.prog-src-list { max-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.prog-src-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--prog-hair); cursor: pointer; }
.prog-src-row:last-child { border-bottom: 0; }
.prog-src-row:active { opacity: .6; }
.prog-src-row .prog-badge { font-size: 13px; }

/* ===== Přepínač měsíců (Akce, Docházka skupiny): jednotný vzhled ===== */
.month-switch { display: flex; align-items: center; gap: 8px; padding: 4px; margin: 0 0 16px; border-radius: 999px; background: rgba(120, 120, 128, .14); }
.month-switch > span { flex: 1; min-width: 0; text-align: center; font-weight: 600; font-size: 14px; }
.month-switch > button { flex: none; width: 30px; height: 30px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; background: var(--raised, #fff); color: inherit; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.month-switch > button:active { filter: brightness(.94); }
html[data-platform="android"] .month-switch > button { background: var(--and-card, #fff); box-shadow: none; color: var(--and-accent); }
.prog-pdf { color: var(--accent, #007aff); display: inline-flex; align-items: center; }

/* ===== Posuvný přepínač měsíců ===== */
.month-slider { position: relative; height: 36px; margin: 0 0 16px; border-radius: 999px; background: rgba(120, 120, 128, .14); overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; outline: none; -webkit-tap-highlight-color: transparent; }
.month-slider.dragging { cursor: grabbing; }
.month-slider::before { content: ""; position: absolute; left: calc(100% / 3); width: calc(100% / 3); top: 3px; bottom: 3px; border-radius: 999px; background: var(--raised, #fff); box-shadow: 0 1px 3px rgba(0, 0, 0, .16); pointer-events: none; }
.month-slider:focus-visible { box-shadow: 0 0 0 2px var(--accent, #007aff); }
.ms-track { position: absolute; left: 0; top: 0; height: 100%; display: flex; will-change: transform; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%); }
.ms-item { flex: none; display: flex; align-items: center; justify-content: center; height: 100%; font-size: clamp(11px, 3.5vw, 14px); white-space: nowrap; pointer-events: none; }
html[data-platform="android"] .month-slider { background: var(--and-card, #f0f4f9); }
html[data-platform="android"] .month-slider::before { background: var(--and-accent-c, #d3e3fd); box-shadow: none; }

/* ===== Postupné zobrazení karet a rozbalení nabídek (viz platform.js, tenReveal) ===== */
.rv { opacity: 0; transform: translateY(18px); }
.rv, .rv.rv-in, .rv-done { animation: none !important; }
.rv.rv-in { opacity: 1; transform: none; transition: opacity 0.5s ease var(--rvd, 0ms), transform 0.62s cubic-bezier(0.2, 0.85, 0.25, 1) var(--rvd, 0ms) !important; }
@keyframes mBlind { from { clip-path: inset(0 0 100% 0 round 18px); opacity: 0.4; transform: translateY(-6px); } to { clip-path: inset(0 0 0 0 round 18px); opacity: 1; transform: none; } }
@keyframes mSheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes mFadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

/* Spodní lišta, Apple: zmenšení při posunu dolů (schované popisky) a přetahovatelná kapka vybrané záložky (viz platform.js) */
html:not([data-platform="android"]) .bottom { touch-action: pan-y; transition: height 0.38s cubic-bezier(0.3, 0.9, 0.3, 1), width 0.38s cubic-bezier(0.3, 0.9, 0.3, 1); }
html:not([data-platform="android"]) .bottom button small { max-height: 14px; overflow: hidden; transition: opacity 0.2s ease, max-height 0.32s ease, margin 0.32s ease; }
html:not([data-platform="android"]) .bottom button { transition: color 0.25s ease, transform 0.15s ease, min-height 0.38s ease, padding 0.38s ease, gap 0.38s ease; }
html:not([data-platform="android"]) .bottom.lg-min { --h: 46px; width: min(78%, 300px); }
html:not([data-platform="android"]) .bottom.lg-min button { min-height: 34px; padding-top: 5px; padding-bottom: 5px; gap: 0; }
html:not([data-platform="android"]) .bottom.lg-min button small { opacity: 0; max-height: 0; margin: 0; }
html:not([data-platform="android"]) .bottom.lg-drag button { transition: color 0.12s ease; }
html:not([data-platform="android"]) .bottom.lg-drag button.active:not(.lg-hot) { color: #3c3c43; }
html:not([data-platform="android"]) .bottom.lg-drag button.active:not(.lg-hot) .icon svg { stroke: currentColor; }
html:not([data-platform="android"]) .bottom button.lg-hot { color: var(--lg-accent); }
html:not([data-platform="android"]) .bottom button.lg-hot .icon svg { stroke: var(--lg-accent); }
body.dark .bottom.lg-drag button.active:not(.lg-hot) { color: #c7c7cc; }
html:not([data-platform="android"]) .bottom.lg-drag .lg-pill { background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.32)); }
@media (prefers-reduced-motion: reduce) {
  html:not([data-platform="android"]) .bottom, html:not([data-platform="android"]) .bottom button, html:not([data-platform="android"]) .bottom button small { transition: none !important; }
}

/* 3.6.0: Apple – tlačítka mají kapsli na všech velikostech (iOS/macOS 26), ne jen na mobilu; postranní panel má jednotné zaoblení */
html[data-platform="apple"] :is(.btn-primary, .btn-secondary, .btn-danger, .modal-btn, .tn-btn, .drive-toolbar-btn, .multi-toolbar-btn, .projekt-card-btn, .projekt-wiki-btn, .detail-save-btn, .detail-cancel-btn, .modal-skupina-btn, .upload-btn) { border-radius: 999px; }
html[data-platform="apple"] :is(.sidebar-nav-item, .sidebar-action) { border-radius: 12px; }

/* 3.6.0: počítač a tablet po vzoru telefonu – tlačítka a pole 38 px (kapsle), přepínače 30 px, karty a okna se nemění, jen sidebar (bez spodní lišty) */
@media (min-width: 769px) {
  html[data-platform] :is(.btn-primary, .btn-secondary, .btn-danger, .modal-btn, .tn-btn, .drive-toolbar-btn, .multi-toolbar-btn, .projekt-card-btn, .projekt-wiki-btn, .detail-save-btn, .detail-cancel-btn, .modal-skupina-btn, .upload-btn) { min-height: 38px !important; font-size: 14px; padding: 0 18px; line-height: 1.2; }
  html[data-platform] :is(.st-seg, .pj-seg, .detail-tabs, .mobile-detail-modal-tabs, .acct-switch, .prog-seg) { padding: 3px !important; gap: 2px !important; }
  html[data-platform] :is(.st-seg, .pj-seg, .detail-tabs, .mobile-detail-modal-tabs, .acct-switch, .prog-seg) > :is(button, a) { min-height: 30px !important; height: 30px; padding-top: 0 !important; padding-bottom: 0 !important; font-size: 13px !important; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
  html[data-platform] :is(.doc-filters > button, .type-btn, .filter-btn) { min-height: 30px !important; height: 30px; padding-top: 0 !important; padding-bottom: 0 !important; font-size: 13px !important; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
  html[data-platform="android"] .bottom-wrap { display: none !important; }
  body.sb-collapsed .sidebar-logo { display: none; }
  body.sb-collapsed .sidebar-profile { margin-top: 22px; }
}

/* Android na počítači a tabletu: pole jsou ve více sloupcích, seskupení rohů z telefonu tam neplatí – každé pole je samostatná kapsle */
@media (min-width: 769px) {
  html[data-platform="android"] .and-unit { border-radius: 999px !important; margin-bottom: 8px !important; }
  html[data-platform="android"] .and-unit.and-area { border-radius: 28px !important; }
  #btn-ares, #btn-ares-edit, #btn-ares-fav, #btn-ares-contact { height: 38px !important; }
}

/* Apple na počítači a tabletu: pole formulářů jsou kapsle o výšce 38 px jako tlačítka; víceřádková pole mají měkčí zaoblení */
@media (min-width: 769px) {
  html[data-platform="apple"] :is(.field, .modal, .modal-content, .tn-dlg, .acct-form, .rep-controls, .transit-edit) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=color]), select) { height: 38px !important; min-height: 38px !important; box-sizing: border-box; border-radius: 999px !important; padding: 0 16px !important; font-size: 14px; line-height: normal; }
  html[data-platform="apple"] :is(.field, .modal, .modal-content, .tn-dlg, .acct-form, .rep-controls, .transit-edit) select { padding-right: 34px !important; }
  html[data-platform="apple"] :is(.field, .modal, .modal-content, .tn-dlg, .acct-form, .rep-controls, .transit-edit) textarea { border-radius: 18px !important; font-size: 14px; }
}

/* Tablet (dotyk): karty vedle sebe všude, kde se vejdou (užší sloupec než na počítači s myší) */
@media (min-width: 769px) and (pointer: coarse) {
  .dashboard-grid { display: block !important; column-width: 320px; column-gap: 14px; }
  .dashboard-grid > * { break-inside: avoid; margin: 0 0 14px; }
  .dashboard-grid > .dashboard-empty { column-span: all; }
  .projekty-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px !important; align-items: stretch; }
  .projekty-grid > * { margin: 0; min-width: 0; }
  .doc-list { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px !important; align-items: start; }
  #exp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
  #exp-list > .exp-group-title { grid-column: 1 / -1; margin: 6px 0 0; }
  #exp-list > .exp-card, #exp-list > div:not(.exp-group-title) { margin: 0; }
}

@keyframes presSheetIn { from { transform: translateY(100%); } }
@keyframes presDlgIn { from { transform: translateY(-18px) scale(.97); opacity: 0; } }
/* ── 3.11.0: pravidla zobrazení oken na mobilu ──
   • dialog (potvrzení, krátký formulář s jedním polem): nahoře nad klávesnicí, modální okno
   • menu a formulář s mnoha kolonkami (data-pres="sheet" nastaví platform.js): bottom sheet jako přidání dokladu v 10korun,
     bez držátka, jen křížek a tlačítka dole */
@media (max-width: 768px) {
  .modal { justify-content: center !important; padding: 0 !important;  transition: opacity .3s ease, visibility 0s linear .3s !important; }
  .modal:not(.hidden) {  transition: opacity .3s ease, visibility 0s linear 0s !important; }
  .modal:not([data-pres="sheet"]) { align-items: flex-start !important; padding: calc(env(safe-area-inset-top) + 9vh) 12px 0 !important; }
  .modal[data-pres="sheet"] { align-items: flex-end !important; }
  .modal:not([data-pres="sheet"]) > .modal-content {
    width: 100% !important; max-width: 420px !important; margin: 0 !important;
    max-height: calc(100vh - 9vh - 24px) !important; max-height: calc(100dvh - env(safe-area-inset-top) - 9vh - 16px) !important;
    border-radius: 24px !important; animation: none !important; opacity: 0;
    transform: translateY(-18px) scale(.97); transition: transform .3s cubic-bezier(.32, .72, 0, 1), opacity .22s ease;
  }
  .modal:not(.hidden):not([data-pres="sheet"]) > .modal-content { transform: none; opacity: 1; animation: presDlgIn .3s cubic-bezier(.32, .72, 0, 1) backwards !important; }
  html[data-platform="android"] .modal:not([data-pres="sheet"]) > .modal-content { border-radius: 28px !important; }
  .modal[data-pres="sheet"] > .modal-content {
    width: 100% !important; max-width: none !important; margin: 0 !important;
    max-height: calc(100vh - 28px) !important; max-height: calc(100dvh - 28px) !important;
    border-radius: 34px 34px 0 0 !important; box-shadow: 0 -8px 40px rgba(0, 0, 0, .18);
    padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
    overscroll-behavior: contain; animation: none !important;
    transform: translateY(100%); transition: transform .34s cubic-bezier(.32, .72, 0, 1);
  }
  .modal:not(.hidden)[data-pres="sheet"] > .modal-content { transform: none; animation: presSheetIn .34s cubic-bezier(.32, .72, 0, 1) backwards !important; }
  html[data-platform="android"] .modal[data-pres="sheet"] > .modal-content { border-radius: 28px 28px 0 0 !important; }
  /* křížek doplněný do oken, která ho nemají (platform.js) */
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) { .modal:not([data-pres="sheet"]) > .modal-content, .modal[data-pres="sheet"] > .modal-content, .modal { transition-duration: 0s !important; } }

/* ── 3.11.1: sheet má pevné záhlaví (nadpis + jednotný křížek jako v přidání dokladu v 10korun); obsah se posouvá pod ním ── */
@media (max-width: 768px) {
  .modal[data-pres="sheet"] > .modal-content { padding: 0 20px max(20px, env(safe-area-inset-bottom)) !important; }
  .modal[data-pres="sheet"] > .modal-content > .modal-header, .modal[data-pres="sheet"] > .modal-content > .sheet-head { position: sticky; top: 0; z-index: 8; background: inherit; }
  .modal[data-pres="sheet"] > .modal-content > .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -20px 6px; padding: 14px 20px 8px; font-size: 16px; font-weight: 700; color: var(--text, inherit); }
  .modal[data-pres="sheet"] > .modal-content > .sheet-head .sheet-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .modal[data-pres="sheet"] > .modal-content .sheet-src { display: none !important; }
}

/* ── 3.11.2: sjednocený nadpis a oddělení pevného záhlaví od posouvaného obsahu ── */
@media (max-width: 768px) {
  html[data-platform] .modal[data-pres="sheet"] > .modal-content :is(.modal-title, .sheet-title) { font-size: 16px !important; font-weight: 700 !important; letter-spacing: 0 !important; line-height: 1.3 !important; color: var(--text, inherit) !important; text-align: left; }
  .modal[data-pres="sheet"] > .modal-content > :is(.modal-header, .sheet-head) { padding-bottom: 12px; transition: box-shadow .15s ease; }
  .modal[data-pres="sheet"] > .modal-content.is-scrolled > :is(.modal-header, .sheet-head) { box-shadow: 0 1px 0 rgba(60, 60, 67, .16); }
  body.dark .modal[data-pres="sheet"] > .modal-content.is-scrolled > :is(.modal-header, .sheet-head) { box-shadow: 0 1px 0 rgba(255, 255, 255, .12); }
}
@media (max-width: 768px) {
  .modal[data-pres="sheet"] > .modal-content > .modal-footer { box-shadow: 0 -1px 0 rgba(60, 60, 67, .12); }
  body.dark .modal[data-pres="sheet"] > .modal-content > .modal-footer { box-shadow: 0 -1px 0 rgba(255, 255, 255, .1); }
}

/* ── 3.12.0: sjednocení tlačítek: Apple (iPhone, iPad, desktop) jedna sada, Android (telefon, tablet) jedna sada; barvy jen z akcentu aplikace ── */
html[data-platform] .sheet-head, html[data-platform] .sheet-x { display: none !important; }   /* záhlaví sheetu jen na telefonu */
@media (max-width: 768px) {
  html[data-platform] .modal[data-pres="sheet"] > .modal-content > .sheet-head { display: flex !important; }
  html[data-platform] .modal[data-pres="sheet"] > .modal-content > .sheet-head .sheet-x { display: block !important; }
}
/* hlavní tlačítka: stejná výška, nezalamovat (kromě rozložení z platform.js, které si šířky hlídá samo) */
:is(.btn-group > button):not([data-ar-n] *) { box-sizing: border-box !important; height: 38px !important; min-height: 38px !important; white-space: nowrap; }
html[data-platform="apple"] :is(.btn-group > button):not(.filter-btn):not(.type-btn) { font-weight: 600 !important; }
html[data-platform="android"] :is(.btn-group > button):not(.filter-btn):not(.type-btn) { font-weight: 500 !important; }
/* zavírací křížek: Apple skleněné kolečko 34 px, Android samotný křížek (dotyková plocha 40 px); kříž kreslený čarami, vždy na středu */
html[data-platform] :is(.modal-close, .ar-x, .sheet-x) { box-sizing: border-box; flex: none; margin: 0; padding: 0 !important; min-width: 0 !important; min-height: 0 !important; border: 0 !important; font-size: 0 !important; line-height: 0 !important; cursor: pointer; overflow: visible; -webkit-tap-highlight-color: transparent; display: block !important; }
html[data-platform] :is(.modal-close, .sheet-x) { position: relative !important; }
html[data-platform] :is(.modal-close, .ar-x, .sheet-x) > * { display: none !important; }
html[data-platform] :is(.modal-close, .ar-x, .sheet-x)::before, html[data-platform] :is(.modal-close, .ar-x, .sheet-x)::after { content: "" !important; position: absolute; left: 50%; top: 50%; border-radius: 2px; background: currentColor; }
html[data-platform] :is(.modal-close, .ar-x, .sheet-x)::before { transform: translate(-50%, -50%) rotate(45deg); }
html[data-platform] :is(.modal-close, .ar-x, .sheet-x)::after { transform: translate(-50%, -50%) rotate(-45deg); }
html[data-platform="apple"] :is(.modal-close, .ar-x, .sheet-x) { width: 34px !important; height: 34px !important; border-radius: 50% !important; color: var(--text, #1c1c1e) !important;
  background: color-mix(in srgb, currentColor 8%, rgba(255, 255, 255, .55)) !important; -webkit-backdrop-filter: blur(14px) saturate(1.6) !important; backdrop-filter: blur(14px) saturate(1.6) !important;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .14), inset 0 0 0 .5px rgba(255, 255, 255, .6) !important; }
html[data-platform="apple"] body.dark :is(.modal-close, .ar-x, .sheet-x) { background: rgba(120, 120, 128, .32) !important; box-shadow: 0 1px 8px rgba(0, 0, 0, .4), inset 0 0 0 .5px rgba(255, 255, 255, .14) !important; }
html[data-platform="apple"] :is(.modal-close, .ar-x, .sheet-x)::before, html[data-platform="apple"] :is(.modal-close, .ar-x, .sheet-x)::after { width: 13px; height: 2px; }
html[data-platform="android"] :is(.modal-close, .ar-x, .sheet-x) { width: 40px !important; height: 40px !important; border-radius: 50% !important; background: transparent !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; color: var(--and-muted, var(--muted, #5f6368)) !important; }
html[data-platform="android"] :is(.modal-close, .ar-x, .sheet-x)::before, html[data-platform="android"] :is(.modal-close, .ar-x, .sheet-x)::after { width: 16px; height: 2px; }

/* 10base: akcent je modrý. Uložit / potvrdit nebyly modré (světle zelené podle inline stylu), na tabletu a desktopu se tlačítka navíc neřídila telefonním vzorem */
:root { --btn-acc: #007aff; }
body.dark { --btn-acc: #0a84ff; }
html[data-platform="apple"] button:is(.ar-primary, [onclick*="saveEvent"], [onclick*="saveProgram"], [onclick*="recordPayment"], [onclick*="saveEnergyPhase"])[style*="#d4f5e2"] { background: var(--btn-acc) !important; color: #fff !important; }
html[data-platform="android"] button:is(.ar-primary, [onclick*="saveEvent"], [onclick*="saveProgram"], [onclick*="recordPayment"], [onclick*="saveEnergyPhase"])[style*="#d4f5e2"] { background: var(--and-accent) !important; color: #fff !important; }
@media (min-width: 769px) {
  html[data-platform="apple"] :is(.modal-content, .modal) .btn-group > button { border-radius: 999px !important; padding: 0 18px !important; font-size: 14px !important; border: 0 !important; }
  html[data-platform="apple"] :is(.modal-content, .modal) .btn-group > button:not(:is(.ar-primary, [onclick*="saveEvent"], [onclick*="saveProgram"], [onclick*="recordPayment"], [onclick*="saveEnergyPhase"])):not([style*="#fde8e8"]):not([style*="#007aff"]) { background: #ebebf0; color: #111; }
  html[data-platform="apple"] body.dark :is(.modal-content, .modal) .btn-group > button:not(:is(.ar-primary, [onclick*="saveEvent"], [onclick*="saveProgram"], [onclick*="recordPayment"], [onclick*="saveEnergyPhase"])):not([style*="#fde8e8"]):not([style*="#007aff"]) { background: #2a2a2e; color: #f2f2f7; }
  html[data-platform="android"] :is(.modal-content, .modal) .btn-group > button { border-radius: 999px !important; padding: 0 18px !important; font-size: 14px !important; border: 0 !important; }
  html[data-platform="android"] :is(.modal-content, .modal) .btn-group > button:not(:is(.ar-primary, [onclick*="saveEvent"], [onclick*="saveProgram"], [onclick*="recordPayment"], [onclick*="saveEnergyPhase"])):not([style*="#fde8e8"]) { background: transparent !important; color: var(--and-accent) !important; }
}
html[data-platform="android"] [data-ar-n] :is(button, a[class*="btn"], input[type="button"], input[type="submit"]):not(.type-btn):not(.filter-btn) { padding-left: 12px !important; padding-right: 12px !important; }   /* dlouhý popisek se vejde do poloviny řádku bez zalomení */
/* tablet a počítač: tlačítka v liště okna jsou kompaktní vpravo (na telefonu se dělí o šířku) */
@media (min-width: 769px) {
  html[data-platform] :is(.modal-footer, .modal-content .btn-group) > :is(button, .btn-primary, .btn-secondary, .btn-danger, .modal-btn) { flex: 0 0 auto !important; }
  html[data-platform] .modal-footer { justify-content: flex-end; }
}
/* ── 3.13.0: rozbalovací bloky jako roleta (platform.js, tenAcc) a výrazná šipka: v zavřeném stavu míří na text, v otevřeném dolů ── */
.acc-chev {
  display: inline-block; flex: none; box-sizing: border-box; width: 10px; height: 10px; margin: 0 7px; padding: 0; vertical-align: middle;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; border-radius: 1.5px;
  color: var(--text, #1c1c1e); opacity: .85; font-size: 0 !important; line-height: 0 !important; transform: rotate(135deg);
  transition: transform .34s cubic-bezier(.32, .72, 0, 1), color .2s ease, opacity .2s ease;
}
.acc-chev[data-side="start"], .acc-chev[data-side="start"] { transform: rotate(-45deg); }
.acc-chev[data-acc="open"] { transform: rotate(45deg) translate(-1px, -1px); color: var(--accent, currentColor); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .acc-chev { transition: none; } }

/* 10base: šipky dosud textové (› / ‹, id chevron… a accChevron_…) se kreslí stejně; stav nese data-acc, text se skrývá */
[id^="chevron"], [id^="accChevron_"] {
  display: inline-block; flex: none; box-sizing: border-box; width: 10px; height: 10px; margin: 0 7px; padding: 0; vertical-align: middle;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; border-radius: 1.5px;
  color: var(--text, #1c1c1e); opacity: .85; font-size: 0 !important; line-height: 0 !important; transform: rotate(135deg);
  transition: transform .34s cubic-bezier(.32, .72, 0, 1), color .2s ease, opacity .2s ease;
}
[id^="chevron"][data-acc="open"], [id^="accChevron_"][data-acc="open"] { transform: rotate(45deg) translate(-1px, -1px); color: var(--accent, currentColor); opacity: 1; }
.accordion-body { max-height: none !important; opacity: 1 !important; transition: none !important; }   /* výšku řídí tenAcc */


/* ── Třídy tlačítek (stejné názvy jako v 10korun): primární, sekundární, nebezpečné + stavové ──
   Nahrazují inline styly s barvami; tmavý režim a Android se řídí stejnými třídami. */
.btn-primary { background: #007aff; color: #fff; border: none; }
.btn-secondary { background: var(--btn-bg); color: var(--text); border-color: transparent; }
.btn-danger { background: #fde8e8; color: #c00; border: none; }
.btn-success { background: #d4f5e2; color: #1a7a3a; border: none; }
.btn-info { background: #e8f0fe; color: #007aff; border: none; }
.btn-neutral { background: #e8e8ed; color: #000; border: none; }
body.dark .btn-danger { background: #3d1a1a; color: #ff453a; }
body.dark .btn-success { background: #1a3d2b; color: #30d158; }
body.dark .btn-info { background: #1c2a3a; color: #0a84ff; }
body.dark .btn-neutral { background: #2c2c2e; color: #8e8e93; }
body.dark .btn-primary, body.dark .primary-btn { background: #0a84ff; color: #fff; }   /* style.css barví v tmavém režimu všechna tlačítka modře na šedé, primární by splynulo */
body.dark .btn-secondary { background: var(--btn-bg); color: var(--text); }
.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-info, .btn-neutral { min-height: 40px; }


/* ── Android: stavové třídy tlačítek v barvách Material 3 (tonální) ── */
html[data-platform="android"] .btn-danger { background: #fde8e8; color: #b3261e; }
html[data-platform="android"] .btn-success { background: #d4f5e2; color: #0d652d; }
html[data-platform="android"] .btn-info, html[data-platform="android"] .btn-neutral { background: var(--and-accent-c); color: var(--and-on-accent-c); }
html[data-platform="android"] body.dark .btn-danger { background: #3d1a1a; color: #f2b8b5; }
html[data-platform="android"] body.dark .btn-success { background: #1a3d2b; color: #81c995; }
html[data-platform="android"] .btn-primary { background: var(--and-accent); color: #fff; }
html[data-platform="android"] body.dark .btn-primary { color: #0b0b0c; }

:root { --ten-tint: #007aff; }
body.dark { --ten-tint: #0a84ff; }

/* ═══ TLAČÍTKA: iOS 26 (Apple) a Material 3 (Android), stejný blok ve všech třech aplikacích ═══════════════
   Apple: kapsle, „liquid glass“ (průsvitná výplň + rozostření + světlý okraj), primární tlačítko tónované barvou aplikace,
          odezva stiskem (zmenšení), žádný zdvih při najetí. Velikost 44 px na dotykových zařízeních, 34 px s myší (Mac).
   Android: Material 3 od Googlu: kapsle 40 px, plná / tonální / textová tlačítka bez stínu, odezva stavovou vrstvou
          (ztmavení při najetí a stisku), vypnuté tlačítko 38 % krytí.
   Seznam tříd je společný; třída, která v aplikaci není, nic nedělá. Segmentové přepínače (.type-btn, .filter-btn) se nemění. */

/* společné rozdělení tlačítek: P = primární, D = nebezpečné, S = ostatní */
/* ── Apple: iOS 26 ── */
html:not([data-platform="android"]) :is(.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-info, .btn-neutral, .btn-add, .btn-google, .primary-btn,
  .modal-btn, .modal-btn-primary, .modal-btn-secondary, .modal-btn-danger, .drive-toolbar-btn, .multi-toolbar-btn, .projekt-card-btn, .upload-btn,
  .detail-save-btn, .detail-cancel-btn, .accordion-btn, .btn-group button, .attendance-buttons button, .tn-btn):not([style*="padding"]) {
  min-height: 38px; padding-left: 18px; padding-right: 18px;
}
html:not([data-platform="android"]) :is(.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-info, .btn-neutral, .btn-add, .btn-google, .primary-btn,
  .modal-btn, .modal-btn-primary, .modal-btn-secondary, .modal-btn-danger, .drive-toolbar-btn, .multi-toolbar-btn, .projekt-card-btn, .upload-btn,
  .detail-save-btn, .detail-cancel-btn, .accordion-btn, .btn-group button, .attendance-buttons button, .tn-btn) {
  border-radius: 999px !important; border-width: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; text-transform: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .32s cubic-bezier(.2, 1.1, .3, 1), background-color .2s ease, box-shadow .2s ease, filter .2s ease, opacity .2s ease;
}
/* sklo: výchozí (sekundární) tlačítko */
html:not([data-platform="android"]) :is(.btn-secondary, .btn-add, .btn-google, .modal-btn:not(.modal-btn-primary):not(.modal-btn-danger), .modal-btn-secondary, .drive-toolbar-btn:not(.primary), .multi-toolbar-btn:not(.danger),
  .projekt-card-btn:not(.primary):not(.danger), .detail-cancel-btn, .accordion-btn.edit, .accordion-btn.pdf, .btn-group button:not([class*="btn-"]):not(.primary-btn),
  .attendance-buttons button, .tn-btn:not(.tn-primary):not(.tn-danger)):not(.primary) {
  background-color: rgba(255, 255, 255, .62); color: var(--text, #1c1c1e);
  -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 .5px rgba(255, 255, 255, .55), 0 0 0 .5px rgba(0, 0, 0, .05), 0 2px 10px rgba(0, 0, 0, .07);
}
html:not([data-platform="android"]) :is(.card, .event-card, .swipe-card, .modal, .modal-content, .settings-group, .stat-card, .acct-card, .exp-card, .doc-row, .projekt-sekce, .dashboard-card) 
  :is(.btn-secondary, .btn-add, .modal-btn:not(.modal-btn-primary):not(.modal-btn-danger), .modal-btn-secondary, .drive-toolbar-btn:not(.primary), .projekt-card-btn:not(.primary):not(.danger), .detail-cancel-btn, .accordion-btn.edit, .accordion-btn.pdf, .btn-group button:not([class*="btn-"]):not(.primary-btn), .attendance-buttons button) {
  background-color: rgba(120, 120, 128, .14); box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .5);
}
html:not([data-platform="android"]) body.dark :is(.btn-secondary, .btn-add, .btn-google, .modal-btn:not(.modal-btn-primary):not(.modal-btn-danger), .modal-btn-secondary, .drive-toolbar-btn:not(.primary), .multi-toolbar-btn:not(.danger),
  .projekt-card-btn:not(.primary):not(.danger), .detail-cancel-btn, .accordion-btn.edit, .accordion-btn.pdf, .btn-group button:not([class*="btn-"]):not(.primary-btn),
  .attendance-buttons button, .tn-btn:not(.tn-primary):not(.tn-danger)) {
  background-color: rgba(255, 255, 255, .14); color: var(--text, #f2f2f7); box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .28), inset 0 0 0 .5px rgba(255, 255, 255, .08);
}
html:not([data-platform="android"]) body.dark :is(.card, .event-card, .modal, .modal-content, .doc-row, .projekt-sekce) :is(.btn-secondary, .modal-btn:not(.modal-btn-primary):not(.modal-btn-danger), .detail-cancel-btn, .accordion-btn.edit, .btn-group button:not([class*="btn-"]):not(.primary-btn)) { background-color: rgba(255, 255, 255, .14); }
/* primární: tónované sklo v barvě aplikace */
html:not([data-platform="android"]) :is(.btn-primary, .primary-btn, .modal-btn-primary, .drive-toolbar-btn.primary, .projekt-card-btn.primary, .upload-btn, .detail-save-btn, .tn-btn.tn-primary) {
  background-color: var(--ten-tint, var(--accent)); background-image: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 55%);
  color: #fff; border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .10), 0 6px 18px color-mix(in srgb, var(--ten-tint, var(--accent)) 34%, transparent);
}
/* nebezpečné: průsvitná červená, text v červené */
html:not([data-platform="android"]) :is(.btn-danger, .modal-btn-danger, .projekt-card-btn.danger, .multi-toolbar-btn.danger, .tn-btn.tn-danger, .accordion-btn.delete) {
  background-color: rgba(255, 59, 48, .14); color: #d70015; background-image: none;
  box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .5);
}
html:not([data-platform="android"]) body.dark :is(.btn-danger, .modal-btn-danger, .projekt-card-btn.danger, .multi-toolbar-btn.danger, .accordion-btn.delete) { background-color: rgba(255, 69, 58, .22); color: #ff6961; }
/* stavové (zelená, modrá, šedá): stejný tvar, průsvitné */
html:not([data-platform="android"]) :is(.btn-success, .btn-info, .btn-neutral) { box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .5); }
/* odezva: stisk zmenší tlačítko (pružně), při najetí myší jen mírné zesvětlení, žádný zdvih */
html:not([data-platform="android"]) :is(.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-info, .btn-neutral, .btn-add, .btn-google, .primary-btn,
  .modal-btn, .modal-btn-primary, .modal-btn-secondary, .modal-btn-danger, .drive-toolbar-btn, .multi-toolbar-btn, .projekt-card-btn, .upload-btn,
  .detail-save-btn, .detail-cancel-btn, .accordion-btn, .btn-group button, .attendance-buttons button, .tn-btn):active:not(:disabled) { transform: scale(.95); filter: brightness(.96); transition-duration: .12s; }
@media (hover: hover) {
  html:not([data-platform="android"]) :is(.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-info, .btn-neutral, .btn-add, .btn-google, .primary-btn,
    .modal-btn, .modal-btn-primary, .modal-btn-secondary, .modal-btn-danger, .drive-toolbar-btn, .multi-toolbar-btn, .projekt-card-btn, .upload-btn,
    .detail-save-btn, .detail-cancel-btn, .accordion-btn, .btn-group button, .attendance-buttons button, .tn-btn):hover:not(:disabled):not(:active) { transform: none; filter: brightness(1.05); }
}
html:not([data-platform="android"]) :is(.btn-primary, .btn-secondary, .btn-danger, .primary-btn, .modal-btn, .drive-toolbar-btn, .projekt-card-btn, .upload-btn, .detail-save-btn, .accordion-btn, .btn-add, .btn-google):disabled { opacity: .4; box-shadow: none; }
/* Mac a myš: kompaktní kapsle 34 px (hustota počítače, jako dosud); dotyk má všude 38 px */
@media (pointer: fine) and (min-width: 768px) {
  html:not([data-platform="android"]) :is(.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-info, .btn-neutral, .btn-add, .btn-google, .primary-btn,
    .modal-btn, .modal-btn-primary, .modal-btn-secondary, .modal-btn-danger, .drive-toolbar-btn, .multi-toolbar-btn, .projekt-card-btn, .upload-btn,
    .detail-save-btn, .detail-cancel-btn, .accordion-btn, .btn-group button, .attendance-buttons button, .tn-btn):not([style*="padding"]) { min-height: 34px; height: auto; padding-left: 16px; padding-right: 16px; font-size: 14px; font-weight: 500; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-platform="android"]) :is(.btn-primary, .btn-secondary, .btn-danger, .primary-btn, .modal-btn, .drive-toolbar-btn, .projekt-card-btn, .accordion-btn):active { transform: none; }
}

/* ── Android: Material 3 ── */
html[data-platform="android"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-info, .btn-neutral, .btn-add, .btn-google, .primary-btn,
  .modal-btn, .modal-btn-primary, .modal-btn-secondary, .modal-btn-danger, .drive-toolbar-btn, .multi-toolbar-btn, .projekt-card-btn, .upload-btn,
  .detail-save-btn, .detail-cancel-btn, .accordion-btn, .btn-group button, .attendance-buttons button, .tn-btn) {
  min-height: 40px !important; height: auto; border-radius: 999px !important; box-shadow: none !important; font-size: 14px; font-weight: 500; letter-spacing: .1px; text-transform: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, background-image .2s ease, color .2s ease, opacity .2s ease;
}
html[data-platform="android"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-info, .btn-neutral, .btn-add, .btn-google, .primary-btn,
  .modal-btn, .modal-btn-primary, .modal-btn-secondary, .modal-btn-danger, .drive-toolbar-btn, .multi-toolbar-btn, .projekt-card-btn, .upload-btn,
  .detail-save-btn, .detail-cancel-btn, .accordion-btn, .btn-group button, .attendance-buttons button, .tn-btn):not([style*="padding"]) { padding-left: 24px; padding-right: 24px; }
/* stavová vrstva (state layer): najetí 8 %, stisk 12 %, žádný zdvih ani zmenšení */
html[data-platform="android"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-info, .btn-neutral, .btn-add, .btn-google, .primary-btn,
  .modal-btn, .modal-btn-primary, .modal-btn-secondary, .modal-btn-danger, .drive-toolbar-btn, .multi-toolbar-btn, .projekt-card-btn, .upload-btn,
  .detail-save-btn, .detail-cancel-btn, .accordion-btn, .btn-group button, .attendance-buttons button, .tn-btn):active:not(:disabled) {
  transform: none; filter: none; background-image: linear-gradient(rgba(0, 0, 0, .12), rgba(0, 0, 0, .12));
}
@media (hover: hover) {
  html[data-platform="android"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-info, .btn-neutral, .btn-add, .btn-google, .primary-btn,
    .modal-btn, .modal-btn-primary, .modal-btn-secondary, .modal-btn-danger, .drive-toolbar-btn, .multi-toolbar-btn, .projekt-card-btn, .upload-btn,
    .detail-save-btn, .detail-cancel-btn, .accordion-btn, .btn-group button, .attendance-buttons button, .tn-btn):hover:not(:disabled):not(:active) {
    transform: none; background-image: linear-gradient(rgba(0, 0, 0, .08), rgba(0, 0, 0, .08));
  }
}
html[data-platform="android"] body.dark :is(.btn-primary, .btn-secondary, .btn-danger, .primary-btn, .modal-btn, .drive-toolbar-btn, .projekt-card-btn, .upload-btn, .detail-save-btn, .accordion-btn, .btn-add, .btn-google, .btn-group button, .tn-btn):active:not(:disabled) {
  background-image: linear-gradient(rgba(255, 255, 255, .12), rgba(255, 255, 255, .12));
}
html[data-platform="android"] :is(.btn-primary, .btn-secondary, .btn-danger, .primary-btn, .modal-btn, .drive-toolbar-btn, .projekt-card-btn, .upload-btn, .detail-save-btn, .accordion-btn, .btn-add, .btn-google):disabled { opacity: .38; }
/* obrysová varianta (outlined) pro „přidat“ a Google přihlášení, jako u Google */
html[data-platform="android"] :is(.btn-add, .btn-google) { background: transparent !important; color: var(--and-accent) !important; border: 1px solid var(--and-outline, #79747e) !important; }

/* iOS 26: tlačítka ve skupině mají stejné šířky sloupců a menší písmo */
html:not([data-platform="android"]) :is(.btn-group, .attendance-buttons) > button { flex: 1 1 0; min-width: 0; padding-left: 10px; padding-right: 10px; font-size: 14px; }

/* ── Apple: kulatější tvary jako v iOS 26 (karty 26 px, okna a spodní listy 34 px, nabídky 22 px; na počítači s myší menší) ── */
html:not([data-platform="android"]) { --r-card: 26px; }
html:not([data-platform="android"]) :is(.card, .event-card, .swipe-card, #detail-panel, .stat-card, .transit-row, .ledger, .acct-card, .bal-table, .settings-group, .inv-card,
  .exp-card, .rep-scroll, .dashboard-card, .projekt-card, .projekt-sekce, .login-card, .upload-progress-panel, .doc-list) { border-radius: var(--r-card); }
html:not([data-platform="android"]) :is(.modal:not(:has(> .modal-backdrop)), .modal-content, .tn-dlg) { border-radius: 34px !important; }
html:not([data-platform="android"]) .bottom-sheet { border-radius: 34px 34px 0 0; }
html:not([data-platform="android"]) :is(.profile-menu, .pmenu, .menu, .context-menu, .desktop-profile-menu, .mobile-profile-menu, .search-results, .inv-menu, .autocomplete-dropdown) { border-radius: 22px; }
@media (pointer: fine) and (min-width: 768px) {
  html:not([data-platform="android"]) { --r-card: 20px; }
  html:not([data-platform="android"]) :is(.modal:not(:has(> .modal-backdrop)), .modal-content, .tn-dlg) { border-radius: 26px !important; }
  html:not([data-platform="android"]) :is(.profile-menu, .pmenu, .menu, .context-menu, .desktop-profile-menu, .mobile-profile-menu, .search-results, .inv-menu, .autocomplete-dropdown) { border-radius: 16px; }
}

/* ── Android: vedlejší tlačítka jsou textová (bez výplně), jako u Googlu; výplň mají jen hlavní a destruktivní akce ── */
html[data-platform="android"] :is(.btn-secondary, .modal-btn:not(.modal-btn-primary):not(.modal-btn-danger), .modal-btn-secondary, .detail-cancel-btn,
  .drive-toolbar-btn:not(.primary):not(.active-filter), .projekt-card-btn:not(.primary):not(.danger), .multi-toolbar-btn:not(.danger),
  .accordion-btn.edit, .accordion-btn.pdf, .btn-neutral, .btn-info, .tn-btn:not(.tn-primary):not(.tn-danger), .modal-footer .btn-danger) {
  background-color: transparent !important; color: var(--and-accent) !important; border: 0 !important;
  padding-left: 12px !important; padding-right: 12px !important;
}
html[data-platform="android"] .modal-footer .btn-danger { color: #b3261e !important; }
html[data-platform="android"] body.dark .modal-footer .btn-danger { color: #f2b8b5 !important; }
html[data-platform="android"] :is(.btn-secondary, .modal-btn:not(.modal-btn-primary):not(.modal-btn-danger), .modal-btn-secondary, .detail-cancel-btn,
  .drive-toolbar-btn:not(.primary):not(.active-filter), .projekt-card-btn:not(.primary):not(.danger), .multi-toolbar-btn:not(.danger),
  .accordion-btn.edit, .accordion-btn.pdf, .btn-neutral, .btn-info, .tn-btn:not(.tn-primary):not(.tn-danger)):hover:not(:disabled):not(:active) {
  background-image: linear-gradient(color-mix(in srgb, var(--and-accent) 8%, transparent), color-mix(in srgb, var(--and-accent) 8%, transparent)) !important;
}
html[data-platform="android"] :is(.btn-secondary, .modal-btn:not(.modal-btn-primary):not(.modal-btn-danger), .modal-btn-secondary, .detail-cancel-btn,
  .drive-toolbar-btn:not(.primary):not(.active-filter), .projekt-card-btn:not(.primary):not(.danger), .multi-toolbar-btn:not(.danger),
  .accordion-btn.edit, .accordion-btn.pdf, .btn-neutral, .btn-info, .tn-btn:not(.tn-primary):not(.tn-danger)):active:not(:disabled) {
  background-image: linear-gradient(color-mix(in srgb, var(--and-accent) 12%, transparent), color-mix(in srgb, var(--and-accent) 12%, transparent)) !important;
}

/* Android: hlavička rozbalovacího bloku má vlastní spodní odsazení (karta je zaoblená 28 px a jinak by oříznula text) */
html[data-platform="android"] .event-card > .event-label[onclick] { padding-bottom: 16px !important; margin-bottom: 0; }
/* Android: primární tlačítko je vždy plné v barvě aplikace, i uvnitř karet (pravidlo pro tonální tlačítka v kartách ho jinak přebíjelo) */
html[data-platform="android"] body :is(.btn-primary, .primary-btn, .modal-btn-primary, .drive-toolbar-btn.primary, .projekt-card-btn.primary, .upload-btn, .detail-save-btn, .tn-btn.tn-primary) { background-color: var(--and-accent) !important; color: #fff !important; }
html[data-platform="android"] body.dark :is(.btn-primary, .primary-btn, .modal-btn-primary, .drive-toolbar-btn.primary, .projekt-card-btn.primary, .upload-btn, .detail-save-btn, .tn-btn.tn-primary) { color: #0b0b0c !important; }

/* ═══ PÍSMO: Apple = systémové (SF Pro), Android = Google Sans Flex + stupnice Material 3 ═══════════════════════
   Apple: SF Pro (-apple-system) má vestavěné optické velikosti i prostrkání podle velikosti písma, proto se ruční letter-spacing
          u nadpisů ruší. Stupnice podle iOS (Dynamic Type): velký nadpis 28/34, nadpis 22/28, okno 20/25, nadpis karty 17/22 (600),
          popisek sekce 12/16 (600), drobný text 13/18.
   Android: Google Sans Flex (písmo Pixelů, licence OFL, vlastní hosting ve složce fonts/), záloha Roboto a systémové.
          Stupnice Material 3: headline small 24/32, title large 22/28, title medium 16/24 (500), title small 14/20 (500),
          body medium 14/20, body small 12/16, label large 14/20 (500). */
@font-face { font-family: "Google Sans Flex"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/google-sans-flex-latin-ext.woff2") format("woff2");
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Google Sans Flex"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/google-sans-flex-latin.woff2") format("woff2");
  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; }

/* ── Apple ── */
html:not([data-platform="android"]) body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro", system-ui, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; font-optical-sizing: auto; font-synthesis: none; }
html:not([data-platform="android"]) :is(button, input, select, textarea) { font-family: inherit; }
html:not([data-platform="android"]) body :is(h1, .topbar-left h1, header h1, .view-title, .login-card h1) { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: normal; }
html:not([data-platform="android"]) body .dashboard-greeting { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: normal; }
html:not([data-platform="android"]) body :is(.modal-title, .modal-header h2, .modal h2, .tn-dlg h2) { font-size: 20px; line-height: 25px; font-weight: 600; letter-spacing: normal; }
html:not([data-platform="android"]) body :is(h2, .event-title, .projekt-title) { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: normal; }
html:not([data-platform="android"]) body :is(h3, .section-title, .event-label, .stat-label, .dashboard-card-title, .projekt-sekce-title, .exp-group-title) { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; }
html:not([data-platform="android"]) body .stat-value { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: normal; font-variant-numeric: tabular-nums; }
html:not([data-platform="android"]) body :is(.small, small):not(.bottom *) { font-size: 13px; line-height: 18px; }

/* ── Android ── */
html[data-platform="android"] { --and-font: "Google Sans Flex", Roboto, "Noto Sans", system-ui, sans-serif; }
html[data-platform="android"] body { letter-spacing: .015em; }
html[data-platform="android"] body :is(h1, .topbar-left h1, header h1, .view-title, .login-card h1) { font-size: 22px; line-height: 28px; font-weight: 400; letter-spacing: 0; }
html[data-platform="android"] body .dashboard-greeting { font-size: 24px; line-height: 32px; font-weight: 400; letter-spacing: 0; }
html[data-platform="android"] body :is(.modal-title, .modal-header h2, .modal h2, .tn-dlg h2) { font-size: 24px; line-height: 32px; font-weight: 400; letter-spacing: 0; }
html[data-platform="android"] body :is(h2, .event-title, .projekt-title) { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: .01em; }
html[data-platform="android"] body :is(h3, .section-title, .event-label, .stat-label, .dashboard-card-title, .projekt-sekce-title, .exp-group-title) { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .007em; text-transform: none; }
html[data-platform="android"] body .stat-value { font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
html[data-platform="android"] body :is(.small, small):not(.bottom *) { font-size: 12px; line-height: 16px; letter-spacing: .033em; }
html[data-platform="android"] body :is(label, .field label):not(.and-unit) { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .04em; }   /* label.and-unit má popisek skrytý (font-size 0), nahrazuje ho placeholder */

/* spodní lišta: popisek má pevný box (max-height 14 px, overflow hidden), proto vlastní výška řádku, ať se neuřízne spodek písmen */
html:not([data-platform="android"]) .bottom button small { line-height: 13px; padding-bottom: 1px; }
/* hlavička rozbalovacího bloku: stejné odsazení nahoře i dole (16 px) na všech platformách, text nesedí u spodní hrany kulaté karty */
.event-card > .event-label[onclick] { padding-bottom: 16px !important; margin-bottom: 0; align-items: center; }

/* Formulář akce: vnitřní „karta“ uvnitř okna není další karta (okno už je plocha), jen drží rozložení kolonek */
#eventFormModalBody > .card { background: transparent; box-shadow: none; border: 0; border-radius: 0; padding: 0; margin: 0; animation: none; }
/* ── Docházka skupiny: seskupení podle hlasů, poměr přítomných, stav rozlišitelný i bez barvy ── */
.hm, #hmModal { --hm-y: #34c759; --hm-m: #ff9f0a; --hm-n: #ff3b30; --hm-u: #8e8e93; --hm-y-bg: rgba(52,199,89,.16); --hm-m-bg: rgba(255,159,10,.18); --hm-n-bg: rgba(255,59,48,.14); }
body.dark .hm, body.dark #hmModal { --hm-y: #30d158; --hm-m: #ffb340; --hm-n: #ff6961; --hm-u: #98989d; --hm-y-bg: rgba(48,209,88,.22); --hm-m-bg: rgba(255,179,64,.22); --hm-n-bg: rgba(255,105,97,.22); }
.hm-event { padding: 14px 0; border-top: 1px solid var(--hair, rgba(60,60,67,.12)); }
.hm-event:first-of-type { border-top: 0; padding-top: 4px; }
.hm-head { display: flex; align-items: center; gap: 12px; }
.hm-date { flex: none; width: 44px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--text, #1c1c1e) 7%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.hm-date b { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hm-date span { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 3px; }
.hm-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hm-title a { font-size: 16px; font-weight: 600; color: var(--text); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-title small { font-size: 12px; color: var(--muted); }
.hm-cancel { text-decoration: line-through; color: var(--muted) !important; }
.hm-badge { color: var(--hm-n) !important; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 11px !important; }
.hm-count { flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.hm-count b { font-size: 24px; font-weight: 700; color: var(--hm-y); letter-spacing: -.01em; }
.hm-count small, .hm-vh small { font-size: 13px; color: var(--muted); font-weight: 500; }
.hm-bar { display: flex; gap: 3px; height: 8px; margin: 12px 0 14px; border-radius: 999px; overflow: hidden; }
.hm-seg { border-radius: 2px; min-width: 6px; }
.hm-seg.hm-y { background: var(--hm-y); } .hm-seg.hm-m { background: var(--hm-m); } .hm-seg.hm-n { background: var(--hm-n); }
.hm-seg.hm-u { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--hm-u) 55%, transparent) 0 3px, transparent 3px 6px); }
.hm-voices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.hm-vh { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.hm-vh b { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.hm-dots { display: flex; flex-wrap: wrap; gap: 3px; }
html[data-platform] body .hm-dot { width: 26px; height: 26px; min-height: 0 !important; padding: 0 !important; border-radius: 50% !important; font-size: 9.5px !important; font-weight: 700; letter-spacing: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; box-shadow: none !important; background-image: none !important; transform: none; }
.hm-dot.hm-y, .hm-cell.hm-y { background: var(--hm-y) !important; color: #fff !important; }
.hm-dot.hm-m, .hm-cell.hm-m { background: var(--hm-m) !important; color: #fff !important; }
.hm-dot.hm-n { background: var(--hm-n-bg) !important; color: var(--hm-n) !important; text-decoration: line-through; }
.hm-cell.hm-n { background: var(--hm-n-bg) !important; color: var(--hm-n) !important; }
html[data-platform] body :is(.hm-dot, .hm-cell).hm-u { background: transparent !important; color: var(--hm-u) !important; border: 1.5px solid color-mix(in srgb, var(--hm-u) 55%, transparent) !important; }
html[data-platform] body .hm-dot.hm-u { border-style: dashed !important; }
.hm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--hair, rgba(60,60,67,.12)); font-size: 12px; color: var(--muted); }
.hm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hm-sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.hm-sw.hm-y { background: var(--hm-y); } .hm-sw.hm-m { background: var(--hm-m); } .hm-sw.hm-n { background: var(--hm-n-bg); box-shadow: inset 0 0 0 1.5px var(--hm-n); } .hm-sw.hm-u { box-shadow: inset 0 0 0 1.5px var(--hm-u); }
.hm-off { padding-top: 10px; padding-bottom: 10px; }
/* počítač */
.hm-scroll { overflow-x: auto; }
.hm-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.hm-table th, .hm-table td { padding: 3px 3px; text-align: center; font-weight: 500; }
.hm-vg { font-size: 11px; font-weight: 700 !important; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding-bottom: 4px !important; border-bottom: 2px solid var(--hair, rgba(60,60,67,.12)); }
.hm-mh { font-size: 11px; color: var(--muted); white-space: nowrap; line-height: 1.25; padding: 6px 4px !important; } .hm-mh small { display: block; font-size: 10.5px; opacity: .8; }
.hm-corner, .hm-sum-h { font-size: 11px; font-weight: 700 !important; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: left !important; vertical-align: bottom; }
.hm-sep { border-left: 1px solid var(--hair, rgba(60,60,67,.12)); padding-left: 8px !important; }
.hm-ev { position: sticky; left: 0; z-index: 1; background: var(--card, #fff); display: flex !important; align-items: center; gap: 10px; text-align: left !important; padding: 8px 16px 8px 0 !important; min-width: 190px; }
.hm-ev .hm-date { width: 38px; height: 42px; border-radius: 12px; } .hm-ev .hm-date b { font-size: 16px; }
.hm-ev .hm-title a { font-size: 14px; }
html[data-platform] body .hm-cell { width: 32px; height: 32px; min-height: 0 !important; padding: 0 !important; border-radius: 10px !important; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 0; box-shadow: none; background-image: none !important; transform: none; }
.hm-sum { white-space: nowrap; text-align: left !important; font-variant-numeric: tabular-nums; } .hm-sum b { font-size: 18px; color: var(--hm-y); } .hm-sum small { color: var(--muted); font-size: 12px; } .hm-sum em { font-style: normal; font-size: 11px; color: var(--hm-m); margin-left: 6px; font-weight: 600; }
.hm-table tbody tr + tr > * { border-top: 1px solid var(--hair, rgba(60,60,67,.08)); }
.hm-off { opacity: .6; }
@media (prefers-reduced-motion: no-preference) { .hm-seg { transition: flex .4s ease; } }

/* kuličky a buňky mají pevný rozměr (pravidlo pro dotyk „button[onclick^=heatmap] { min-width: 40px }“ je jinak roztahovalo) */
html[data-platform] body :is(.hm-dot, .hm-cell) { min-width: 0 !important; max-width: none; flex: none; box-sizing: border-box; }
html[data-platform] body .hm-dot { width: 26px !important; height: 26px !important; }
html[data-platform] body .hm-cell { width: 32px !important; height: 32px !important; }

/* okno s podrobnostmi člena */
.hm-dlg-name { font-size: 22px; font-weight: 700; line-height: 1.2; padding-right: 36px; }
.hm-dlg-name small { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hm-dlg-main { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--hm-u) 14%, transparent); }
.hm-dlg-main.hm-y { background: var(--hm-y-bg); } .hm-dlg-main.hm-m { background: var(--hm-m-bg); } .hm-dlg-main.hm-n { background: var(--hm-n-bg); }
.hm-dlg-main b { display: block; font-size: 16px; font-weight: 600; } .hm-dlg-main small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.hm-chip { flex: none; font-style: normal; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; background: color-mix(in srgb, var(--hm-u) 18%, transparent); color: var(--muted); }
.hm-chip.hm-y { background: var(--hm-y); color: #fff; } .hm-chip.hm-m { background: var(--hm-m); color: #fff; } .hm-chip.hm-n { background: var(--hm-n-bg); color: var(--hm-n); }
.hm-reason { margin: 6px 2px 0; font-size: 13px; color: var(--muted); }
.hm-next { margin-top: 14px; }
.hm-next-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.hm-next-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 12.5px; color: var(--muted); }
.hm-next-row .hm-chip { font-size: 11px; padding: 3px 9px; }
.hm-act { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hair, rgba(60,60,67,.12)); display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 12px; }
.hm-act-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hm-pct { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.hm-pct.hm-y { color: var(--hm-y); } .hm-pct.hm-m { color: var(--hm-m); } .hm-pct.hm-n { color: var(--hm-n); } .hm-pct.hm-u { color: var(--muted); }
.hm-act-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--hm-u) 20%, transparent); overflow: hidden; }
.hm-act-bar i { display: block; height: 100%; border-radius: inherit; }
.hm-act-bar i.hm-y { background: var(--hm-y); } .hm-act-bar i.hm-m { background: var(--hm-m); } .hm-act-bar i.hm-n { background: var(--hm-n); }
.hm-act small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
#hmModal .btn-group { margin-top: 18px; }

/* proběhlé akce: zašedlé, ale čitelné, aby šla docházka zpětně zkontrolovat */
.hm-past .hm-date, .hm-past .hm-title, .hm-past .hm-count { opacity: .6; }
.hm-past .hm-bar, .hm-past .hm-dots, .hm-past .hm-cell, .hm-past .hm-sum { opacity: .72; filter: saturate(.6); }

/* odškrtnutí docházky (administrátor) */
.hm-link { color: var(--accent, #007aff); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.att-admin { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--hair, rgba(60,60,67,.12)); }
.att-sum { display: flex; align-items: baseline; gap: 4px; margin: 14px 0 6px; font-variant-numeric: tabular-nums; }
.att-sum b { font-size: 28px; font-weight: 700; color: var(--hm-y); } .att-sum small { font-size: 13px; color: var(--muted); }
.att-quick { margin-left: auto; display: flex; gap: 6px; }
.att-quick button { min-height: 0 !important; padding: 5px 11px !important; font-size: 12px !important; border-radius: 999px !important; }
.att-group { margin-top: 12px; }
.att-gh { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-bottom: 4px; }
.att-gh b { color: var(--text); font-size: 14px; } .att-gh small { color: var(--muted); font-weight: 500; }
html[data-platform] body .att-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px !important; padding: 6px 4px !important; border: 0; border-top: 1px solid var(--hair, rgba(60,60,67,.1)); border-radius: 0 !important; background: transparent !important; box-shadow: none !important; background-image: none !important; color: var(--text) !important; text-align: left; font-weight: 500; transform: none; justify-content: flex-start; }
.att-box { flex: none; width: 24px; height: 24px; border-radius: 8px; box-sizing: border-box; border: 2px solid color-mix(in srgb, var(--muted) 70%, transparent); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; line-height: 1; color: #fff; transition: background .15s ease, border-color .15s ease; }
.att-row.on .att-box { background: var(--hm-y); border-color: var(--hm-y); }
.att-name { flex: 1; min-width: 0; font-size: 15px; }
.att-decl { flex: none; font-size: 11px; color: var(--muted); }
#attModal { --hm-y: #34c759; --hm-m: #ff9f0a; --hm-n: #ff3b30; --hm-u: #8e8e93; }
body.dark #attModal { --hm-y: #30d158; }

/* okno odškrtnutí: záhlaví a tlačítka zůstávají vidět, seznam se posouvá */
.modal-content.att-content { display: flex; flex-direction: column; max-height: 90vh; max-height: min(90vh, 90dvh); overflow: hidden; }
#attModalBody { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.att-head { flex: none; }
.att-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px; }
.att-foot { flex: none; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--hair, rgba(60,60,67,.12)); }

/* ── Okna jako karta (telefon): pevné záhlaví a zápatí s tlačítky, obsah se posouvá, jako v okně odškrtnutí docházky ──
   Záhlaví a zápatí jsou „lepivé“ (sticky) v okně, které se posouvá; odsazení okna (--card-pt, --card-pb z platform.js) pohltí, aby navazovaly na okraj. */
@media (max-width: 768px) {
  .modal:not([data-pres="sheet"]) > .modal-content, .modal-overlay:not([data-pres="sheet"]) > .modal { overflow-y: auto; overscroll-behavior: contain; }
  .modal:not([data-pres="sheet"]) > .modal-content > :is(.modal-header, .sheet-head),
  .modal:not([data-pres="sheet"]) > .modal-content > #eventFormModalBody > h2,
  .modal-overlay:not([data-pres="sheet"]) > .modal > :is(.modal-header, .sheet-head, h2:first-child) {
    position: sticky; top: calc(-1 * var(--card-pt, 0px)); z-index: 8; background: var(--card-bg, inherit);
    margin-top: calc(-1 * var(--card-pt, 0px)); padding-top: max(var(--card-pt, 0px), 20px); padding-bottom: 12px; transition: box-shadow .15s ease;
  }
  .modal:not([data-pres="sheet"]) > .modal-content.is-scrolled > :is(.modal-header, .sheet-head),
  .modal:not([data-pres="sheet"]) > .modal-content.is-scrolled > #eventFormModalBody > h2,
  .modal-overlay:not([data-pres="sheet"]) > .modal.is-scrolled > :is(.modal-header, .sheet-head, h2:first-child) { box-shadow: 0 1px 0 var(--hair, rgba(60, 60, 67, .16)); }
  .modal:not([data-pres="sheet"]) > .modal-content > .btn-group:last-child,
  .modal:not([data-pres="sheet"]) > .modal-content .form-foot,
  .modal-overlay:not([data-pres="sheet"]) > .modal .modal-footer {
    position: sticky; bottom: calc(-1 * var(--card-pb, 0px)); z-index: 8; background: var(--card-bg, inherit);
    margin-bottom: calc(-1 * var(--card-pb, 0px)); padding-top: 12px; padding-bottom: max(var(--card-pb, 0px), 20px);   /* vždy aspoň 20 px, ať tlačítka a nadpis nedosedají na okraj karty */
    box-shadow: 0 -1px 0 var(--hair, rgba(60, 60, 67, .16));
  }
}

/* Apple: karta má záhlaví s názvem a křížkem (platform.js, data-pres="card"), vzhledově stejné jako dřív u sheetu */
@media (max-width: 768px) {
  html[data-platform] :is(.modal[data-pres="card"] > .modal-content, .modal-overlay[data-pres="card"] > .modal) > .sheet-head { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 700; color: var(--text, inherit); }
  html[data-platform] :is(.modal[data-pres="card"] > .modal-content, .modal-overlay[data-pres="card"] > .modal) > .sheet-head .sheet-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  html[data-platform] :is(.modal[data-pres="card"] > .modal-content, .modal-overlay[data-pres="card"] > .modal) > .sheet-head .sheet-x { display: block !important; }
  html[data-platform] :is(.modal[data-pres="card"] > .modal-content, .modal-overlay[data-pres="card"] > .modal) .sheet-src { display: none !important; }
}

/* vlastní křížek oken docházky (člen, odškrtnutí) vpravo nahoře; okno se neposouvá, takže může být přilepený */
html[data-platform] .modal-content:has(> .hm-x) { position: relative; }
html[data-platform] .hm-x { position: absolute !important; top: 14px; right: 14px; z-index: 12; }

/* ── Spodní lišta soustředná s rohy displeje iPhonu (jen v aplikaci přidané na plochu, kde okno končí na hraně displeje) ──
   Kapsle lišty má poloměr 32 px (výška 64). Oblouk rohu displeje má poloměr R (--screen-r z platform.js: 39 / 47 / 55 / 62 px).
   Soustředné jsou, když je lišta od boku i spodní hrany vzdálená R − 32 px (iPhone 15: 23 px). */
@media (display-mode: standalone) and (max-width: 500px) {
  html:not([data-platform="android"]) .bottom-wrap { padding: 0 max(8px, calc(var(--screen-r, 55px) - 32px)) max(8px, calc(var(--screen-r, 55px) - 32px)); }
  html:not([data-platform="android"]) .bottom-wrap > .bottom { margin: 0; }
}

/* Android: tlačítka ve skupinách mají stejnou výšku 40 px jako ostatní (starší pravidlo skupin dávalo 38 px) */
html[data-platform="android"] :is(.btn-group > button):not(.filter-btn):not(.type-btn):not([style*="padding"]) { height: 40px !important; min-height: 40px !important; }
html[data-platform="android"] [data-ar-n] :is(button, a[class*="btn"], input[type="button"], input[type="submit"]):not(.type-btn):not(.filter-btn):not(.ar-x):not(.modal-close) { min-height: 40px !important; }

/* Android: nebezpečné tlačítko je tonální červená všude kromě patičky okna, kde je (Material 3) červený text bez výplně */
html[data-platform="android"] :is(.btn-danger, .modal-btn-danger, .projekt-card-btn.danger, .multi-toolbar-btn.danger, .accordion-btn.delete):not(.modal-footer *) { background-color: #fde8e8 !important; color: #b3261e !important; }
html[data-platform="android"] body.dark :is(.btn-danger, .modal-btn-danger, .projekt-card-btn.danger, .multi-toolbar-btn.danger, .accordion-btn.delete):not(.modal-footer *) { background-color: #3d1a1a !important; color: #f2b8b5 !important; }

/* ovládání akordeonů klávesnicí: viditelné zaostření */
[role="button"][aria-controls]:focus-visible { outline: 2px solid var(--accent, #007aff); outline-offset: 2px; border-radius: 10px; }
html[data-platform="android"] body :is(.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-info, .btn-neutral, .btn-add, .btn-google, .primary-btn, .modal-btn, .detail-save-btn, .detail-cancel-btn):not([style*="padding"]):not(.accordion-btn):not(#_a):not(#_b) { min-height: 40px !important; height: auto !important; padding-top: 0 !important; padding-bottom: 0 !important; line-height: 1.25; }   /* :not(#_a) zvyšuje specificitu nad pravidlo s #btn-ares; svislé odsazení 0, výšku drží min-height */

/* ===== Formulář akce: průvodce (typ → kdy → kde → podrobnosti), volby jako segmentové přepínače, přepínače, rozbalovací sekce ===== */
:root { --ev-acc: #007aff; }
html[data-platform="android"] body { --ev-acc: var(--and-accent); }
.ev .ev-ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ev label { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }
.ev label > input, .ev label > textarea { margin-top: 4px; }
.ev-sec { margin-top: 18px; }
.ev-q { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--text, inherit); }
.ev-q label { margin: 0; font-size: inherit; color: inherit; }
.ev-q small, .ev-q label small { margin-left: 8px; font-weight: 500; color: var(--muted); font-size: 12px; }
.ev .nm { width: 100%; box-sizing: border-box; }

/* přepínač voleb (segmentový) podle pravidel přepínačů: rodič padding 3 px a mezera 2 px, volby 30 px, písmo 13 px, pilulka;
   vybraná volba je pilulka v barvě aplikace, která se plynule přesune (polohu měří evSegLayout) */
.ev-seg { position: relative; display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(120, 120, 128, 0.14); overflow-x: auto; scrollbar-width: none; }
.ev-seg::-webkit-scrollbar { display: none; }
html[data-platform="apple"] .ev-seg { border-radius: 999px; }
.ev-seg::before { content: ""; position: absolute; top: 3px; left: 3px; height: 30px; width: var(--w, 0px); border-radius: 999px; background: var(--ev-acc); transform: translateX(var(--x, 0px)); transition: transform 0.32s cubic-bezier(0.2, 1.2, 0.3, 1), width 0.32s cubic-bezier(0.2, 1.2, 0.3, 1), opacity 0.2s ease; }
.ev-seg.none::before { opacity: 0; }
.ev .ev-segb { position: relative; z-index: 1; flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; min-height: 30px !important; padding: 0 8px !important; border: 0 !important; border-radius: 999px !important; background: transparent !important; box-shadow: none !important; color: var(--text, inherit) !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1; white-space: nowrap; transition: color 0.2s ease; }
html[data-platform="android"] .ev .ev-segb { font-weight: 500 !important; }
.ev .ev-segb .ev-ic { width: 16px; height: 16px; }
.ev .ev-types .ev-segb, .ev .ev-acc .ev-segb { padding: 0 5px !important; gap: 4px; }
.ev .ev-segb.on { color: #fff !important; }
body.dark .ev .ev-segb.on { color: #0b0b0c !important; }
.ev-grid3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; margin-top: 12px; }
.ev-grid3 > div { min-width: 0; }
.ev-grid3 label { margin-top: 0; }
.ev-sum { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: var(--r-ctl, 18px); background: rgba(120, 120, 128, 0.1); }
.ev-sum .ev-ic { width: 24px; height: 24px; color: var(--ev-acc); }
.ev-sum .big { font-size: 16px; font-weight: 700; }
.ev-sum small { color: var(--muted); font-size: 13px; }
.ev .ev-sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 14px; color: var(--text, inherit); }
.ev .ev-swin { -webkit-appearance: none; appearance: none; flex: none; width: 51px !important; height: 31px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 16px !important; background: rgba(120, 120, 128, 0.32); position: relative; cursor: pointer; transition: background 0.2s ease; }
.ev .ev-swin::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s cubic-bezier(0.2, 1, 0.3, 1); }
.ev .ev-swin:checked { background: var(--ev-acc); }
.ev .ev-swin:checked::after { transform: translateX(20px); }
.ev .ev-swin:focus-visible { outline: 2px solid var(--ev-acc); outline-offset: 2px; }
/* Android (Material 3): dráha 52 × 32, vypnuto = obrys a malý palec, zapnuto = plná dráha a velký bílý palec */
html[data-platform="android"] .ev .ev-swin { width: 52px !important; height: 32px !important; background: transparent; box-shadow: inset 0 0 0 2px var(--and-muted, #79747e); }
html[data-platform="android"] .ev .ev-swin::after { top: 8px; left: 8px; width: 16px; height: 16px; background: var(--and-muted, #79747e); box-shadow: none; transition: transform 0.2s cubic-bezier(0.2, 1, 0.3, 1), width 0.2s, height 0.2s, top 0.2s, left 0.2s, background 0.2s; }
html[data-platform="android"] .ev .ev-swin:checked { background: var(--ev-acc); box-shadow: none; }
html[data-platform="android"] .ev .ev-swin:checked::after { top: 4px; left: 4px; width: 24px; height: 24px; background: #fff; transform: translateX(20px); }
.ev-acc { margin-top: 10px; border-radius: var(--r-ctl, 18px); background: rgba(120, 120, 128, 0.08); overflow: hidden; }
.ev-acc > summary { display: flex; align-items: center; gap: 10px; padding: 13px 14px; font-weight: 600; cursor: pointer; list-style: none; }
.ev-acc > summary::-webkit-details-marker { display: none; }
.ev-acc > summary::after { content: "›"; margin-left: 4px; color: var(--muted); font-size: 18px; transition: transform 0.2s ease; }
.ev-acc[open] > summary::after { transform: rotate(90deg); }
.ev-acc .tt { flex: none; }
.ev-acc .sm { margin-left: auto; min-width: 0; color: var(--muted); font-weight: 500; font-size: 12px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-acc .ck { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--card-border, rgba(60, 60, 67, 0.3)); box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; color: transparent; }
.ev-acc .ck .ev-ic { width: 14px; height: 14px; stroke-width: 3; }
.ev-acc.done .ck { background: #34c759; border-color: #34c759; color: #fff; }
html[data-platform="android"] .ev-acc.done .ck { background: var(--ev-acc); border-color: var(--ev-acc); }
html[data-platform="android"] :is(.ev-acc, .ev-sum, .au-prev) { border-radius: 20px; }
.ev-acc .b { padding: 0 14px 14px; }
.ev-hint { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.ev .ev-ta { width: 100%; box-sizing: border-box; min-height: 72px; font-family: inherit; }
.ev .ev-err { border-color: #ff3b30 !important; }
html[data-platform="android"] .ev .ev-err { border-color: #b3261c !important; }
.ev .ev-errmsg { margin-top: 4px; font-size: 12px; color: #ff3b30; }
html[data-platform="android"] :is(.ev .ev-errmsg, .ev .ev-warn) { color: #b3261c; }
html[data-platform="android"] body.dark :is(.ev .ev-errmsg, .ev .ev-warn) { color: #f2b8b5; }
.ev .ev-foot .ev-sw { margin-top: 0; margin-bottom: 12px; }
@media (max-width: 640px) { .ev-grid3 { grid-template-columns: 1fr 1fr; } .ev-grid3 > div:first-child { grid-column: 1 / -1; } }

/* ===== Harmonogram koncertu (10space): banka dílků a osa programu, tažení za úchyt ===== */
.hg-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.hg-bar label { margin: 0 !important; width: 200px; }
.hg-bar .hg-sum { font-size: 13px; color: var(--muted); padding-bottom: 12px; }
.hg-bar .hg-sum b { color: var(--text, inherit); }
.hg-ok { color: #34c759; font-weight: 600; }
html[data-platform="android"] .hg-ok { color: #146c2e; }
.hg { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .hg { grid-template-columns: 210px minmax(0, 1fr); align-items: start; } .hg-bank { position: sticky; top: 8px; } }
.hg-bank { padding: 12px; border-radius: var(--r-ctl, 18px); background: rgba(120, 120, 128, 0.08); }
html[data-platform="android"] :is(.hg-bank, .hg-item) { border-radius: 20px; }
.hg-bank.hg-over { outline: 2px dashed var(--ev-acc); outline-offset: -2px; }
.hg-bt { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.hg-bt:not(:first-child) { margin-top: 12px; }
.hg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hg-chip { display: inline-flex; align-items: center; max-width: 100%; height: 30px; border-radius: 999px; background: rgba(120, 120, 128, 0.14); }
.hg .hg-grip { flex: none; width: 26px !important; height: 28px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--muted) !important; cursor: grab; touch-action: none; display: inline-flex; align-items: center; justify-content: center; }
.hg .hg-grip svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.hg .hg-chip .hg-grip { width: 24px !important; margin-left: 2px !important; }
.hg .hg-add { min-width: 0; height: 30px; min-height: 30px !important; padding: 0 12px 0 2px !important; border: 0 !important; border-radius: 999px !important; background: transparent !important; box-shadow: none !important; color: var(--text, inherit) !important; font-size: 13px !important; font-weight: 600 !important; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-platform="android"] .hg .hg-add { font-weight: 500 !important; }
.hg .hg-add .ev-ic { width: 16px; height: 16px; color: var(--ev-acc); }
.hg-axis { display: flex; flex-direction: column; gap: 8px; min-height: 56px; }
.hg-empty { padding: 18px 12px; border: 2px dashed var(--card-border, rgba(60, 60, 67, 0.2)); border-radius: var(--r-ctl, 18px); color: var(--muted); font-size: 13px; text-align: center; }
.hg-item { padding: 8px 10px 10px; border-radius: var(--r-ctl, 18px); background: rgba(120, 120, 128, 0.08); }
.hg-head { display: flex; align-items: center; gap: 4px; }
.hg-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.hg-badge .ev-ic { width: 18px; height: 18px; }
.hg-blok .hg-badge { color: var(--ev-acc); }
.hg-moderace .hg-badge { color: #ff9500; }
.hg-prichod .hg-badge { color: #34c759; }
.hg-odchod .hg-badge, .hg-pribeh .hg-badge { color: #8e8e93; }
.hg-spolecna .hg-badge { color: #af52de; }
.hg-time { margin-left: auto; padding-right: 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hg .hg-ib { flex: none; width: 30px !important; height: 30px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; box-shadow: none !important; color: var(--muted) !important; display: inline-flex; align-items: center; justify-content: center; }
.hg .hg-ib svg { width: 16px; height: 16px; }
.hg .hg-ib.on svg { transform: rotate(90deg); }
.hg-fields { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.hg-fields .hg-name { flex: 1 1 auto; min-width: 0; }
.hg .hg-min { flex: none; width: 84px; margin: 0 !important; }
.hg .hg-min input { margin: 0 !important; }
.hg-detail { margin-top: 6px; }
.hg-songs { margin-top: 8px; padding: 4px 0 2px 8px; border-left: 2px solid var(--card-border, rgba(60, 60, 67, 0.2)); display: flex; flex-direction: column; gap: 4px; min-height: 30px; }
.hg-song { display: flex; align-items: center; gap: 4px; min-height: 34px; padding-right: 2px; border-radius: 10px; background: var(--card); }
.hg-sname { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-hint { padding: 6px 4px; font-size: 12px; color: var(--muted); }
.hg-ins { flex: none; height: 4px; margin: 1px 0; border-radius: 2px; background: var(--ev-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ev-acc) 25%, transparent); }
.hg-dragging { opacity: 0.35; }
.hg-ghost { position: fixed; left: 0; top: 0; z-index: 100000; pointer-events: none; max-width: 70vw; padding: 7px 14px; border-radius: 999px; background: var(--ev-acc); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
body.dark .hg-ghost { color: #0b0b0c; }
body.hg-active { user-select: none; -webkit-user-select: none; cursor: grabbing; }

/* telefon: banka dílků je pod osou a zůstává přilepená dole nad zápatím formuláře; dílky se v ní posouvají do strany */
@media (max-width: 819px) {
  .hg { display: flex; flex-direction: column; }
  .hg-axis { order: 1; }
  .hg-bank { order: 2; position: sticky; bottom: var(--hg-bottom, 0px); z-index: 6; padding: 8px 10px; background: color-mix(in srgb, var(--card, #fff) 90%, #808080 10%); box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.14); }
  .hg-bank .hg-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .hg-bank .hg-chips::-webkit-scrollbar { display: none; }
  .hg-bank .hg-chip { flex: none; }
  .hg-bank .hg-bt { margin: 0 0 6px; }
  .hg-bank .hg-bt:not(:first-child) { margin-top: 8px; }
}

/* ===== Harmonogram na telefonu a dotykových zařízeních: bez tažení =====
   Tlačítko + otevře panel s dílky a skladbami, vybraný dílek se vloží klepnutím na pruh „Vložit sem“; položky se posouvají tlačítky ↑ ↓.
   Pravidla jako jinde v aplikaci: dotykový cíl aspoň 44 px, stupnice písma 11/12/13/14/16/20/24/28, zaoblení 8/14/20/26/34/pilulka,
   časování z motion.css (--m-fast / --m-base / --m-slow), okno bez držátka (jen křížek), Apple sklo a Android Material 3. */
.hg-t, .hg-fab, .hg-pickbar, .hg-root { display: none; }
.hg, .hg-ui { --hg-ease: cubic-bezier(0.32, 0.72, 0, 1); --hg-spring: var(--m-spring, cubic-bezier(0.2, 1.2, 0.3, 1)); --hg-d2: var(--m-base, 0.22s); --hg-d3: var(--m-slow, 0.34s);
  --hg-tint: var(--ten-tint, var(--accent, var(--ev-acc))); }
.hg-ui svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hg-flash { animation: hgFlash var(--hg-d3) var(--hg-ease) 2; }
@keyframes hgFlash { 0% { box-shadow: 0 0 0 3px var(--ev-acc); } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (max-width: 819px), (pointer: coarse) {
  .hg-d { display: none !important; }
  span.hg-t { display: inline; }
  .hg-mv.hg-t { display: inline-flex; }
  div.hg-tb.hg-t { display: flex; }
  .hg { display: block; }
  .hg-bank { display: none; }
  .hg .hg-item .hg-grip, .hg .hg-song .hg-grip { display: none !important; }
  .hg-axis { gap: 0; }
  .hg-item { margin-bottom: 8px; }

  /* hlavička položky: vlevo název a pod ním čas, vpravo ↑ ↓ a šipka detailu (každé 44 px) */
  .hg-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 4px; }
  .hg-head > .hg-badge { grid-area: 1 / 1; align-self: end; }
  .hg-head > .hg-time { grid-area: 2 / 1; align-self: start; margin: 0; padding: 0; }
  .hg-head > .hg-up { grid-area: 1 / 2 / 3 / 3; }
  .hg-head > .hg-dn { grid-area: 1 / 3 / 3 / 4; }
  .hg-head > .hg-chv { grid-area: 1 / 4 / 3 / 5; }
  .hg .hg-mv, .hg .hg-ib { flex: none; position: relative; width: 44px !important; height: 44px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; display: inline-flex; align-items: center; justify-content: center; transition: opacity var(--hg-d2) ease, transform var(--hg-d2) var(--hg-ease); }
  .hg .hg-mv { border-radius: 50% !important; background: rgba(120, 120, 128, 0.14) !important; color: var(--text, inherit) !important; }
  .hg .hg-mv svg, .hg .hg-ib svg { width: 18px; height: 18px; }
  .hg .hg-mv:disabled { opacity: 0.35; }
  .hg .hg-mv:active:not(:disabled) { transform: scale(0.92); }
  html[data-platform="android"] .hg .hg-mv:active { transform: none; }
  /* skladby v bloku: dotykový cíl 44 px, vidět je kolečko 32 px */
  .hg .hg-song .hg-mv { background: transparent !important; }
  .hg .hg-song .hg-mv::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: rgba(120, 120, 128, 0.14); }
  .hg .hg-song .hg-mv svg { position: relative; width: 16px; height: 16px; }
  .hg-song { min-height: 44px; padding-left: 8px; gap: 0; border-radius: 14px; }

  /* detail položky: Přesunout jinam, Odebrat */
  .hg-tb { gap: 8px; margin-top: 10px; }
  .hg .hg-tbb { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px !important; padding: 0 14px !important; border: 0 !important; border-radius: 999px !important; background: rgba(120, 120, 128, 0.14) !important; box-shadow: none !important; color: var(--text, inherit) !important; font-size: 14px !important; font-weight: 600 !important; transition: transform var(--hg-d2) var(--hg-ease), background-color var(--hg-d2) ease; }
  .hg .hg-tbb:active { transform: scale(0.95); }
  .hg .hg-tbb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
  .hg .hg-tbb.rm { background: rgba(255, 59, 48, 0.14) !important; color: #d70015 !important; }
  body.dark .hg .hg-tbb.rm { background: rgba(255, 69, 58, 0.22) !important; color: #ff6961 !important; }
  html[data-platform="android"] .hg .hg-tbb { font-weight: 500 !important; }
  html[data-platform="android"] .hg .hg-tbb:active { transform: none; }
  html[data-platform="android"] .hg .hg-tbb.rm { background: rgba(179, 38, 30, 0.12) !important; color: #b3261c !important; }
  html[data-platform="android"] body.dark .hg .hg-tbb.rm { background: rgba(242, 184, 181, 0.16) !important; color: #f2b8b5 !important; }

  /* vkládání: pruhy mezi položkami (jsou jen v tomto režimu) */
  .hg-picked { outline: 2px solid var(--ev-acc); outline-offset: -2px; }
  .hg-pick { padding-bottom: 76px; }                                      /* poslední pruh nesmí zůstat pod lištou */
  .hg-pick .hg-item { opacity: 0.55; }
  .hg-pick .hg-picked { opacity: 1; }
  .hg-slot { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px !important; margin: 0 0 8px !important; padding: 0 12px !important; border: 2px dashed var(--ev-acc) !important; border-radius: 14px !important; background: color-mix(in srgb, var(--ev-acc) 9%, transparent) !important; box-shadow: none !important; color: var(--ev-acc) !important; font-size: 13px !important; font-weight: 600 !important; animation: hgSlotIn var(--hg-d2) var(--hg-ease) both; transition: transform var(--hg-d2) var(--hg-ease), background-color var(--hg-d2) ease; }
  .hg-slot:active { transform: scale(0.98); background: color-mix(in srgb, var(--ev-acc) 18%, transparent) !important; }
  .hg-slot svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
  .hg-slot.in { margin: 2px 0 !important; }
  html[data-platform="android"] .hg-slot { border-radius: 20px !important; font-size: 14px !important; font-weight: 500 !important; }
  html[data-platform="android"] .hg-slot:active { transform: none; }
  @keyframes hgSlotIn { from { opacity: 0; transform: scaleY(0.5); } }
  .hg-songs { gap: 0; }

  /* plovoucí tlačítko +: Apple tónované sklo v barvě aplikace (jako primární tlačítko), Android tonální FAB Material 3 */
  .hg-fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: 16px; z-index: 10040; width: 58px; height: 58px; padding: 0 !important; min-height: 0 !important; border: 0 !important; border-radius: 50% !important; color: #fff !important;
    background-color: var(--hg-tint) !important; background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 55%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.10), 0 6px 18px color-mix(in srgb, var(--hg-tint) 34%, transparent), 0 8px 22px rgba(0, 0, 0, 0.16) !important;
    opacity: 0; transform: scale(0.4) translateY(30px); pointer-events: none; transition: transform var(--hg-d3) var(--hg-spring), opacity var(--hg-d2) ease; }
  .hg-fab.on { opacity: 1; transform: none; pointer-events: auto; }
  .hg-fab.on:active { transform: scale(0.94); transition-duration: var(--hg-d2); }
  .hg-fab svg { width: 28px; height: 28px; stroke-width: 2.2; }
  html[data-platform="android"] .hg-fab { width: 56px; height: 56px; border-radius: 20px !important; background-color: var(--and-tonal) !important; background-image: none !important; color: var(--and-accent) !important; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.2) !important; }
  html[data-platform="android"] .hg-fab.on:active { transform: none; filter: brightness(0.94); }

  /* panel s dílky: okno jako ostatní sheety (bez držátka, jen křížek), Apple 34, Android 28 */
  .hg-root { display: block; position: fixed; inset: 0; z-index: 10050; pointer-events: none; }
  .hg-root.on { pointer-events: auto; }
  .hg-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); opacity: 0; transition: opacity var(--hg-d2) ease; touch-action: none; }
  .hg-root.on .hg-dim { opacity: 1; }
  .hg-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: min(82vh, calc(100dvh - 28px)); overflow-y: auto; overscroll-behavior: contain; padding: 20px 16px max(20px, env(safe-area-inset-bottom)); border-radius: 34px 34px 0 0; background: var(--card, #fff); color: var(--text, inherit); box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18); transform: translateY(105%); transition: transform var(--hg-d3) var(--hg-ease); }
  html[data-platform="android"] .hg-sheet { border-radius: 28px 28px 0 0; box-shadow: none; background: #ffffff; color: var(--and-text, inherit); }
  html[data-platform="android"] body.dark .hg-sheet { background: #2b2d30; }
  .hg-root.on .hg-sheet { transform: none; }
  .hg-sh { display: flex; align-items: center; margin: 0 0 12px; font-size: 20px; line-height: 25px; font-weight: 600; }
  html[data-platform="android"] .hg-sh { font-size: 24px; line-height: 32px; font-weight: 400; }
  .hg-sh .hg-x { position: relative; margin: -8px -8px -8px auto; width: 44px; height: 44px; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; box-shadow: none !important; color: var(--text, inherit) !important; display: grid; place-items: center; transition: transform var(--hg-d2) var(--hg-ease); }
  .hg-sh .hg-x::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: color-mix(in srgb, currentColor 8%, rgba(255, 255, 255, 0.55)); -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6); box-shadow: 0 1px 8px rgba(0, 0, 0, 0.14), inset 0 0 0 0.5px rgba(255, 255, 255, 0.6); }
  body.dark .hg-sh .hg-x::before { background: rgba(120, 120, 128, 0.32); box-shadow: 0 1px 8px rgba(0, 0, 0, 0.4), inset 0 0 0 0.5px rgba(255, 255, 255, 0.14); }
  html[data-platform="android"] .hg-sh .hg-x { color: var(--and-muted) !important; }
  html[data-platform="android"] .hg-sh .hg-x::before { inset: 2px; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hg-sh .hg-x:active { transform: scale(0.92); }
  .hg-sh .hg-x svg { position: relative; width: 14px; height: 14px; stroke-width: 2.2; }
  .hg-lb { margin: 14px 2px 6px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
  html[data-platform="android"] .hg-lb { font-weight: 500; letter-spacing: 0.01em; text-transform: none; }
  .hg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hg-tile { display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; align-items: center; min-height: 54px !important; padding: 8px 12px !important; border: 0 !important; border-radius: 14px !important; background: rgba(120, 120, 128, 0.14) !important; box-shadow: none !important; color: var(--text, inherit) !important; text-align: left; }
  html[data-platform="android"] .hg-tile { border-radius: 20px !important; }
  .hg-tile.wide { grid-column: 1 / -1; }
  .hg-tile svg { grid-row: 1 / 3; width: 22px; height: 22px; color: var(--ev-acc); }
  .hg-tile b { align-self: end; font-size: 14px; font-weight: 600; line-height: 1.2; }
  html[data-platform="android"] .hg-tile b { font-weight: 500; }
  .hg-tile small { align-self: start; font-size: 12px; font-weight: 400; color: var(--muted); line-height: 16px; }
  .hg-slist { display: flex; flex-direction: column; }
  .hg-srow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px !important; padding: 0 !important; border: 0 !important; border-top: 1px solid var(--card-border, rgba(60, 60, 67, 0.14)) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--text, inherit) !important; font-size: 16px !important; font-weight: 400 !important; text-align: left; }
  .hg-srow em { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ev-acc) 14%, transparent); color: var(--ev-acc); }
  .hg-srow em svg { width: 15px; height: 15px; stroke-width: 2.4; }
  .hg-srow span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hg-tile, .hg-srow { opacity: 0; transform: translateY(14px); transition: opacity var(--hg-d2) var(--hg-ease), transform var(--hg-d3) var(--hg-ease); }
  .hg-root.on .hg-tile, .hg-root.on .hg-srow { opacity: 1; transform: none; }
  .hg-root.on .hg-tile:nth-child(1) { transition-delay: 0.06s; } .hg-root.on .hg-tile:nth-child(2) { transition-delay: 0.09s; }
  .hg-root.on .hg-tile:nth-child(3) { transition-delay: 0.12s; } .hg-root.on .hg-tile:nth-child(4) { transition-delay: 0.15s; } .hg-root.on .hg-tile:nth-child(5) { transition-delay: 0.18s; }
  .hg-root.on .hg-srow:nth-child(1) { transition-delay: 0.2s; } .hg-root.on .hg-srow:nth-child(2) { transition-delay: 0.23s; } .hg-root.on .hg-srow:nth-child(3) { transition-delay: 0.26s; } .hg-root.on .hg-srow:nth-child(n+4) { transition-delay: 0.29s; }

  /* lišta s vybraným dílkem: Apple sklo jako spodní lišta, Android plná lišta */
  .hg-pickbar { display: flex; align-items: center; gap: 10px; position: fixed; left: 10px; right: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 10060; padding: 8px 8px 8px 10px; border-radius: 999px; color: var(--text, inherit);
    background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 0.5px rgba(255, 255, 255, 0.55), 0 0 0 0.5px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.18);
    transform: translateY(140%); transition: transform var(--hg-d3) var(--hg-ease); }
  body.dark .hg-pickbar { background: rgba(44, 44, 46, 0.72); box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.28), inset 0 0 0 0.5px rgba(255, 255, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.5); }
  html[data-platform="android"] .hg-pickbar { border-radius: 28px; background: var(--and-bar); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18); }
  .hg-pickbar.on { transform: none; }
  .hg-pc { flex: none; max-width: 48%; padding: 0 16px; min-height: 36px; display: inline-flex; align-items: center; border-radius: 999px; background-color: var(--hg-tint); background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 55%); color: #fff; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html[data-platform="android"] .hg-pc { background-color: var(--and-accent); background-image: none; font-size: 14px; font-weight: 500; }
  html[data-platform="android"] body.dark .hg-pc { color: #062e6f; }                     /* text na světle modré (on-primary Material 3) */
  .hg-ph { flex: 1; min-width: 0; font-size: 12px; line-height: 16px; color: var(--muted); }
  .hg-pickbar .hg-pcancel { flex: none; min-height: 44px !important; padding: 0 14px !important; border: 0 !important; border-radius: 999px !important; background: transparent !important; box-shadow: none !important; color: var(--hg-tint) !important; font-size: 14px !important; font-weight: 600 !important; transition: opacity var(--hg-d2) ease; }
  html[data-platform="android"] .hg-pickbar .hg-pcancel { color: var(--and-accent) !important; font-weight: 500 !important; }
}
@media (prefers-reduced-motion: reduce) {
  .hg-ui, .hg-ui *, .hg-slot, .hg-flash { transition-duration: 0.01s !important; transition-delay: 0s !important; animation-duration: 0.01s !important; }
}
