/* B7: okno Obnovit ze zálohy v rozložení Koček, ptačí modrá, ostrý styl bez stínů */
#restore-modal { --xl:#3d4d65; --xs:#d9dde4; --xi:#222b38; --xm:#606875; --l-bg:#eceff4; --l-fg:#566c8c; }
html.dark #restore-modal { --xl:#758bab; --xs:#373f4a; --xi:#eaeef4; --xm:#a4aebe; --l-bg:#20262e; --l-fg:#aab8ce; }
#restore-modal.rs-wrap { position:fixed; inset:0; z-index:4000; display:flex; align-items:center; justify-content:center; padding:12px; box-sizing:border-box; background:rgba(24,29,36,.6); }
#restore-modal .rs-win { width:100%; max-width:760px; height:min(88vh,860px); max-height:94vh; max-height:min(94dvh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 20px)); display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--xl); border-radius:6px; background:var(--surface); color:var(--xi); }
#restore-modal .rs-hd { position:relative; flex:0 0 auto; text-align:center; padding:16px 64px 14px; border-bottom:1px solid var(--xs); min-height:72px; box-sizing:border-box; display:flex; align-items:center; justify-content:center; }
#restore-modal .rs-hd h2 { margin:0; font-size:22px; font-weight:800; line-height:1.2; color:var(--xi); }
#restore-modal .rs-x { position:absolute; right:14px; top:14px; width:44px; height:44px; padding:0; display:flex; align-items:center; justify-content:center; border:1px solid var(--xs); border-radius:6px; background:var(--surface); color:var(--xm); font-size:15px; cursor:pointer; }
#restore-modal .rs-tabs { display:flex; gap:8px; padding:8px 6px 0; background:var(--l-bg); flex:0 0 auto; }
html body #restore-modal .rs-tabs button { flex:1; min-height:48px; padding:4px 6px; border:1px solid var(--l-fg) !important; border-radius:6px !important; background:var(--surface) !important; color:var(--l-fg) !important; font-size:14px !important; font-weight:700 !important; box-shadow:none !important; }
html body #restore-modal .rs-tabs button.btn-primary { background:color-mix(in srgb,var(--l-fg) 24%,var(--surface)) !important; }
#restore-modal .rs-list { flex:1; min-height:0; overflow-y:auto; padding:6px; background:var(--l-bg); }
#restore-modal .rs-wait { text-align:center; color:var(--xm); padding:24px; }
html body #restore-modal #backup-bulk-bar { background:var(--surface) !important; border:1px solid var(--l-fg) !important; border-radius:6px !important; min-height:52px; box-sizing:border-box; }
html body #restore-modal .backup-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 10px; padding:8px 10px; margin-bottom:6px; border:1px solid var(--xl) !important; border-radius:6px !important; background:var(--surface) !important; box-shadow:none !important; }
html body #restore-modal .backup-card-top, html body #restore-modal .backup-card-bottom { padding:0 !important; margin:0 !important; border:0 !important; }
html body #restore-modal .backup-card-bottom { display:flex; align-items:center; gap:6px; }
html body #restore-modal .backup-restore-btn { min-height:48px; padding:0 14px; border:1px solid #0f6e5a !important; border-radius:6px !important; background:#b2d6c8 !important; color:#0c5848 !important; font-weight:700 !important; box-shadow:none !important; }
html body #restore-modal .backup-tool-btn { width:48px; height:48px; min-width:48px; border:1px solid var(--l-fg) !important; border-radius:6px !important; background:var(--l-bg) !important; box-shadow:none !important; }
html body #restore-modal .backup-tool-btn.del { border-color:#a02a5c !important; background:#fdeaf0 !important; }
html body #restore-modal .backup-badge { padding:3px 8px; border-radius:6px !important; font-weight:700; }
html body #restore-modal .backup-badge-manual { background:#edf1f6 !important; color:#4c6283 !important; border:1px solid #4c6283 !important; }
html body #restore-modal .backup-badge-auto { background:var(--l-bg) !important; color:var(--l-fg) !important; border:1px solid var(--l-fg) !important; }
#restore-modal .backup-item-checkbox, #restore-modal #backup-select-all { width:24px !important; height:24px !important; }
html.dark body #restore-modal .backup-restore-btn { background:#16382f !important; color:#86dcc4 !important; border-color:#86dcc4 !important; }
html.dark body #restore-modal .backup-tool-btn.del { background:#3d1a2a !important; border-color:#f2a0c0 !important; }
html.dark body #restore-modal .backup-badge-manual { background:#212832 !important; color:#adbdd5 !important; border-color:#adbdd5 !important; }
@media (max-width:820px) {
  #restore-modal.rs-wrap { padding:6px; }
  #restore-modal .rs-win { height:96vh; height:min(96dvh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 20px)); }
  #restore-modal .rs-hd h2 { font-size:18px; }
}
#restore-modal .rs-hd h2 { min-width:0; max-width:100%; overflow-wrap:anywhere; }
html body #restore-modal .backup-card-bottom { flex-wrap:wrap; min-width:0; }
html body #restore-modal .backup-restore-btn { flex:1 1 auto; min-width:0; }
html body #restore-modal .backup-card-tools { display:flex; gap:6px; flex:0 0 auto; margin-left:auto; }
@media (max-width:820px) {
  html body #restore-modal .backup-tool-btn { width:44px; height:44px; min-width:44px; }
  html body #restore-modal .backup-card-bottom { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; }
}

/* B7: okno Hlášení (Napište nám) – ostrý styl Koček, ptačí modrá (úprava vzhledu přes selektory, logika beze změny) */

/* B7: Nastavení – texty se zalamují místo třech teček a přetečení (němčina, největší písmo) */
html body #tab-nastaveni .set-brand-sub, html body #tab-nastaveni .set-danger-sub { white-space:normal !important; overflow:visible !important; text-overflow:clip !important; overflow-wrap:anywhere; }
html body #tab-nastaveni .settings-tile { min-width:0; padding-left:4px; padding-right:4px; }
html body #tab-nastaveni .settings-tile span { overflow-wrap:anywhere; hyphens:auto; text-align:center; line-height:1.15; max-width:100%; }
/* B7: okna otevřená z Nastavení (stránka tam zoomuje celou html) se nesmí zvětšit přes obrazovku – protizoom; v záložkách s vlastním měřítkem (zoom 1) se nic nemění */
html.font-large:not(.compact-home,.compact-litters,.compact-finance,.compact-calendar,.compact-shows,.compact-supplies) :is(.of-modal, #restore-modal, #feedback-modal, #generic-modal-overlay, #confirm-overlay, #prompt-overlay) { zoom:calc(1 / 1.18); }
html.font-small:not(.compact-home,.compact-litters,.compact-finance,.compact-calendar,.compact-shows,.compact-supplies) :is(.of-modal, #restore-modal, #feedback-modal, #generic-modal-overlay, #confirm-overlay, #prompt-overlay) { zoom:calc(1 / .88); }
/* B7: dlaždice Nastavení – odznak „nové“ uvnitř dlaždice, ostrý styl bez stínu; mřížka bez roztažení slovy */
html body #tab-nastaveni .help-tile-badge { top:4px; right:4px; border-radius:4px; box-shadow:none; }
html body #tab-nastaveni div[style*="repeat(3,1fr)"] { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
