/*
 * FamiTime – vizuální systém v3 podle brand kitu (koncept A).
 * Tlumená modrá #4A6FA5 + navy #2E4A73, grafitový text, světle šedé pozadí #F5F6F8.
 * Zelená a oranžová z brandu jsou GRAFICKÉ barvy (tečky, ikony, plochy) – text na bílé jen
 * v tmavších odstínech (*-ink), aby kontrast splnil WCAG 2.2 AA (≥ 4,5 : 1).
 * Zaoblené písmo Nunito, velké dotykové cíle (≥ 48 px), radius 12 px (brand --tblr-border-radius).
 * Tabler 1.7 zůstává jako základ (grid, formuláře, utility); vzhled určují tokeny --ft-*.
 */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url("fonts/nunito-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url("fonts/nunito-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* brand kit (famitime-tokens.css) */
  --ft-blue: #4A6FA5;
  --ft-blue-light: #B9CDEA;
  --ft-navy: #2E4A73;
  --ft-green: #6BAF8D;        /* jen grafika */
  --ft-orange: #F08A4B;       /* jen grafika – ne text na bílé */
  --ft-graphite: #2B2F36;
  /* plochy */
  --ft-bg: #F5F6F8;
  --ft-sidebar-width: 264px;
  --ft-content-narrow: 760px;
  --ft-content-wide: 1180px;
  --ft-bg-deep: #E9ECF1;
  --ft-surface: #FFFFFF;
  --ft-surface-soft: #FAFBFC;
  /* text (kontrast na --ft-bg: 13,2 / 5,6) */
  --ft-text: var(--ft-graphite);
  --ft-text-muted: #5B6370;
  /* role */
  --ft-primary: var(--ft-blue);       /* 5,0 : 1 na bílé */
  --ft-primary-hover: var(--ft-navy);
  --ft-primary-soft: #E4ECF6;
  --ft-secondary: #357052;            /* text-safe odstín brand zelené (5,8 : 1) */
  --ft-secondary-soft: #E3F2EA;
  --ft-accent: var(--ft-orange);      /* plochy, tečky, odznaky (s tmavým textem) */
  --ft-accent-ink: #A9521C;           /* oranžová pro text (5,0 : 1) */
  --ft-accent-soft: #FDEBDD;
  --ft-danger: #B42318;
  --ft-danger-soft: #FDECEA;
  --ft-border: #E3E7ED;
  --ft-border-strong: #8A939D;
  /* barvy osob/rodin: výplň + sytější proužek (1 = společná, brand modrá/navy) */
  --ft-family-1: #E4ECF6; --ft-family-1-ink: #2E4A73;
  --ft-family-2: #E3F2EA; --ft-family-2-ink: #357052;
  --ft-family-3: #FDEBDD; --ft-family-3-ink: #A9521C;
  --ft-family-4: #EDE3F6; --ft-family-4-ink: #6B4C9A;
  --ft-family-5: #FCE4EC; --ft-family-5-ink: #A23B66;
  --ft-family-6: #F3EFD9; --ft-family-6-ink: #7A6A1E;
  --ft-family-7: #D7F0EE; --ft-family-7-ink: #1F6F6B;
  --ft-family-8: #FBE0DD; --ft-family-8-ink: #B03A2E;
  --ft-family-9: #EFE3D8; --ft-family-9-ink: #7A4F2A;
  --ft-personal: #ECEEF2; --ft-personal-ink: #5B6370;
  /* tvar */
  --ft-radius-card: 20px;
  --ft-radius-btn: 12px;
  --ft-radius-pill: 999px;
  --ft-touch: 52px;
  --ft-nav-height: 68px;
  --ft-shadow: 0 1px 2px rgba(43, 47, 54, .04), 0 6px 20px rgba(46, 74, 115, .07);
  --ft-shadow-lift: 0 10px 30px rgba(46, 74, 115, .16);
  --ft-font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* mapování na Tabler */
  --tblr-font-sans-serif: var(--ft-font);
  --tblr-body-font-family: var(--ft-font);
  --tblr-body-font-size: 1.0625rem;
  --tblr-body-line-height: 1.5;
  --tblr-body-bg: var(--ft-bg);
  --tblr-body-color: var(--ft-text);
  --tblr-secondary-color: var(--ft-text-muted);
  --tblr-primary: var(--ft-primary);
  --tblr-primary-rgb: 47, 102, 144;
  --tblr-link-color: var(--ft-primary);
  --tblr-border-color: var(--ft-border);
  --tblr-border-radius: var(--ft-radius-btn);
}

/* ---------- základ ---------- */
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ft-bg);
  color: var(--ft-text);
  font-family: var(--ft-font);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .h1, .h2, .h3 { font-family: var(--ft-font); font-weight: 800; letter-spacing: -.01em; color: var(--ft-text); }
a { color: var(--ft-primary); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ft-primary); outline-offset: 2px; border-radius: 6px; }
.text-muted, .text-secondary { color: var(--ft-text-muted) !important; }
.icon { width: 24px; height: 24px; flex: none; vertical-align: middle; }
.icon-lg { width: 28px; height: 28px; }
.visually-hidden-focusable:not(:focus):not(:focus-within) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---------- tlačítka ---------- */
.btn {
  min-height: var(--ft-touch);
  border-radius: var(--ft-radius-btn);
  font-family: var(--ft-font);
  font-size: 1.0625rem;
  font-weight: 800;
  padding: .7rem 1.25rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  box-shadow: none;
  transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { --tblr-btn-bg: var(--ft-primary); --tblr-btn-border-color: var(--ft-primary); --tblr-btn-hover-bg: var(--ft-primary-hover); --tblr-btn-hover-border-color: var(--ft-primary-hover); --tblr-btn-color: #fff; --tblr-btn-hover-color: #fff; --tblr-btn-active-bg: var(--ft-primary-hover); box-shadow: 0 6px 16px rgba(74, 111, 165, .25); }
.btn-soft { background: var(--ft-primary-soft); color: var(--ft-navy); border: 0; }
.btn-soft:hover { background: #D3E4F1; color: var(--ft-primary-hover); }
.btn-quiet { background: transparent; color: var(--ft-text-muted); border: 0; }
.btn-pill { border-radius: var(--ft-radius-pill); min-height: 44px; padding: 0 16px; }
.btn-quiet:hover { background: var(--ft-bg-deep); color: var(--ft-text); }
.btn-success-soft { background: var(--ft-secondary-soft); color: var(--ft-secondary); border: 0; }
.btn-danger-soft { background: var(--ft-danger-soft); color: var(--ft-danger); border: 0; }
.btn-outline-primary { --tblr-btn-color: var(--ft-primary); --tblr-btn-border-color: var(--ft-blue-light); --tblr-btn-hover-bg: var(--ft-primary-soft); --tblr-btn-hover-color: var(--ft-primary); --tblr-btn-hover-border-color: var(--ft-primary); background: var(--ft-surface); }
.btn-icon { width: var(--ft-touch); min-width: var(--ft-touch); padding: 0; border-radius: var(--ft-radius-pill); }
.btn-block { width: 100%; }

/* ---------- formuláře ---------- */
.form-label { font-weight: 800; font-size: .95rem; margin-bottom: .4rem; }
.form-hint { color: var(--ft-text-muted); font-size: .9rem; margin-top: .35rem; }
.form-control, .form-select {
  min-height: var(--ft-touch);
  font-family: var(--ft-font);
  font-size: 1.0625rem; font-weight: 600;
  background-color: var(--ft-surface-soft);
  border: 2px solid var(--ft-border);
  border-radius: var(--ft-radius-btn);
  padding: .6rem .9rem;
}
.form-control:focus, .form-select:focus { border-color: var(--ft-primary); box-shadow: 0 0 0 4px rgba(74, 111, 165, .18); background: #fff; }
.form-control::placeholder { color: #8C949C; font-weight: 500; }
textarea.form-control { min-height: 96px; }
.form-check { display: flex; align-items: center; gap: .75rem; min-height: var(--ft-touch); padding: .35rem .25rem; margin: 0; cursor: pointer; }
.form-check-input, .form-check .form-check-input { width: 1.6rem; height: 1.6rem; margin: 0; float: none; flex: none; border: 2px solid var(--ft-border-strong); border-radius: 8px; }
.form-check { padding-left: .25rem; } /* Tabler odsazuje vlevo a vstup posouvá záporným okrajem → v panelu se uřízne */
.form-check-input:checked { background-color: var(--ft-primary); border-color: var(--ft-primary); }
.form-check-label { font-weight: 700; }
.invalid-feedback { display: block; color: var(--ft-danger); font-weight: 700; font-size: .9rem; margin-top: .35rem; }
.is-invalid { border-color: var(--ft-danger) !important; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-size: .95rem; }
.ft-field { margin-bottom: 1.1rem; }
.ft-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ---------- karty a sekce ---------- */
.card, .ft-card { background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: var(--ft-radius-card); box-shadow: var(--ft-shadow); }
.ft-card { padding: 1.25rem; }
.ft-card + .ft-card { margin-top: .9rem; }
.ft-card--soft { background: var(--ft-surface-soft); box-shadow: none; }
.ft-section { margin-top: 1.75rem; }
.ft-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 .25rem .75rem; }
.ft-section-title { font-size: 1.2rem; font-weight: 900; margin: 0; }
.ft-section-link { font-weight: 800; text-decoration: none; font-size: .95rem; }
.ft-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 900; color: var(--ft-text-muted); }

/* sada ikon (<symbol>) – CSP zakazuje inline styly, proto skrytí třídou */
.ft-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- kostra aplikace ---------- */
.ft-app { min-height: 100vh; padding-bottom: calc(var(--ft-nav-height) + env(safe-area-inset-bottom) + 28px); }
.ft-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 246, 248, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  display: flex; align-items: center; gap: 10px; min-height: 64px;
}
.ft-header__brand { width: 40px; height: 40px; border-radius: 12px; background: var(--ft-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ft-header__text { flex: 1; min-width: 0; }
.ft-header__eyebrow { display: block; font-size: .78rem; font-weight: 800; color: var(--ft-text-muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-header__title { font-size: 1.3rem; font-weight: 900; margin: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-header__action { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--ft-radius-pill); color: var(--ft-text); background: var(--ft-surface); box-shadow: var(--ft-shadow); text-decoration: none; }
.ft-header__avatar { width: 46px; height: 46px; border-radius: var(--ft-radius-pill); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; color: var(--ft-navy); background: var(--ft-primary-soft); text-decoration: none; border: 2px solid #fff; box-shadow: var(--ft-shadow); }
.ft-main { max-width: 720px; margin: 0 auto; padding: 8px 16px 16px; }

/* spodní navigace – plovoucí lišta */
.ft-bottom-nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30;
  max-width: 560px; margin: 0 auto;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--ft-border); border-radius: 26px; box-shadow: var(--ft-shadow-lift);
  display: flex; justify-content: space-around; padding: 6px;
}
.ft-bottom-nav__item {
  flex: 1; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ft-text-muted); text-decoration: none; font-size: .78rem; font-weight: 800; border-radius: 20px;
}
.ft-bottom-nav__item:hover { color: var(--ft-text); }
.ft-bottom-nav__item[aria-current="page"] { color: var(--ft-navy); background: var(--ft-primary-soft); }
.ft-bottom-nav__item[aria-current="page"] .icon { stroke-width: 2.4; }

.ft-fab {
  position: fixed; right: 20px; bottom: calc(var(--ft-nav-height) + env(safe-area-inset-bottom) + 30px); z-index: 25;
  height: 60px; min-width: 60px; padding: 0 22px 0 18px; border-radius: var(--ft-radius-pill);
  background: var(--ft-primary); color: #fff; border: 0; font-weight: 900; font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  box-shadow: 0 10px 24px rgba(181, 83, 26, .35);
}
.ft-fab .icon { width: 28px; height: 28px; stroke-width: 2.4; }
@media (min-width: 900px) { .ft-fab { right: calc(50% - 340px); } }

/* ---------- počítač: boční menu, široký obsah (≥ 1024 px) ---------- */
.ft-sidebar { display: none; }
@media (min-width: 1024px) {
  .ft-app { padding-bottom: 40px; padding-left: var(--ft-sidebar-width); }
  .ft-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--ft-sidebar-width);
    display: flex; flex-direction: column; gap: 6px; padding: 26px 18px 18px; overflow-y: auto;
    background: var(--ft-surface); border-right: 1px solid var(--ft-border);
  }
  .ft-sidebar__logo { display: inline-flex; padding: 4px 10px 14px; }
  .ft-sidebar__logo img { width: 150px; height: auto; }
  .ft-sidebar__tenant { margin: 0 0 14px; padding: 12px 14px; border-radius: 16px; background: var(--ft-bg); font-weight: 900; line-height: 1.25; }
  .ft-sidebar__tenant span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ft-text-muted); font-weight: 900; }
  .ft-sidebar__nav { display: flex; flex-direction: column; gap: 4px; }
  .ft-sidebar__item {
    position: relative; display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 0 14px; border-radius: 16px;
    color: var(--ft-text); text-decoration: none; font-weight: 800; font-size: 1.02rem;
  }
  .ft-sidebar__item .icon { width: 24px; height: 24px; color: var(--ft-text-muted); flex: none; }
  .ft-sidebar__item:hover { background: var(--ft-bg); }
  .ft-sidebar__item[aria-current="page"] { background: var(--ft-primary-soft); color: var(--ft-navy); }
  .ft-sidebar__item[aria-current="page"] .icon { color: var(--ft-navy); stroke-width: 2.4; }
  .ft-sidebar__item[aria-current="page"]::before { content: ""; position: absolute; left: -18px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ft-primary); }
  .ft-sidebar__item .ft-badge { position: static; margin-left: auto; }
  .ft-sidebar__group { margin: 18px 14px 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; color: var(--ft-text-muted); }
  .ft-sidebar__me {
    margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px;
    background: var(--ft-bg); color: var(--ft-text); text-decoration: none;
  }
  .ft-sidebar__me:hover, .ft-sidebar__me[aria-current="page"] { background: var(--ft-primary-soft); }
  .ft-sidebar__me > .icon { margin-left: auto; color: var(--ft-text-muted); flex: none; }
  .ft-sidebar__avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; color: var(--ft-navy); background: var(--ft-primary-soft); border: 2px solid #fff; }
  .ft-sidebar__me-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .ft-sidebar__me-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ft-sidebar__me-text small { color: var(--ft-text-muted); font-weight: 700; }

  /* hlavička = nadpis stránky; logo, zprávy a profil jsou v bočním menu */
  .ft-header { padding: 26px 40px 12px; min-height: 0; background: rgba(245, 246, 248, .94); }
  .ft-header .ft-header__logo, .ft-header .ft-header__msgs, .ft-header .ft-header__avatar { display: none; }
  .ft-header__title { font-size: 1.9rem; }
  .ft-header__eyebrow { font-size: .85rem; }
  .ft-header, .ft-main { max-width: calc(var(--ft-content-narrow) + 80px); margin-left: auto; margin-right: auto; }
  .ft-main { padding: 12px 40px 24px; }
  .ft-app:has(.ft-main--wide) .ft-header, .ft-main--wide { max-width: calc(var(--ft-content-wide) + 80px); }
  .ft-bottom-nav { display: none; }
  .ft-fab { right: 40px; bottom: 32px; }
  .ft-app:has(.ft-fab) .ft-main { padding-bottom: 110px; }
  .ft-hello__title { font-size: 2.4rem; }

  /* rozvržení stránek do sloupců */
  .ft-desk { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .ft-desk__side > .ft-section:first-child { margin-top: 0; }
  .ft-desk__side { position: sticky; top: 110px; }

  /* Rodina: členové vlevo, akce a dostupnost vpravo (pořadí v HTML zůstává mobilní) */
  .ft-fam { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); column-gap: 28px; align-items: start;
    grid-template-areas: "tabs tabs" "hero hero" "note note" "members actions" "members avail" "members new" "members .";
    grid-template-rows: auto auto auto auto auto auto 1fr; }
  .ft-fam > * { grid-column: 1 / -1; }
  .ft-fam > .ft-fam__tabs { grid-area: tabs; }
  .ft-fam > .ft-fam__hero { grid-area: hero; }
  .ft-fam > .ft-notice, .ft-fam > .ft-empty { grid-area: note; }
  .ft-fam > .ft-fam__members { grid-area: members; }
  .ft-fam > .ft-fam__actions { grid-area: actions; margin-top: 1.75rem; }
  .ft-fam > .ft-fam__avail { grid-area: avail; }
  .ft-fam > .ft-fam__new { grid-area: new; }

  /* Kalendář: ovládání a přehled vlevo (drží se při posunu), den po dni vpravo */
  .ft-cal { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 36px; align-items: start; }
  .ft-cal__controls { position: sticky; top: 110px; }
  .ft-cal__agenda > .ft-day-title:first-child { margin-top: 0; }

  /* Nákupy: seznamy jako svislé menu vlevo, položky vpravo */
  .ft-shop { display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 32px; align-items: start; grid-template-rows: repeat(6, auto) 1fr; }
  .ft-shop > * { grid-column: 2; }
  .ft-shop > .ft-shop__lists { grid-column: 1; grid-row: 1 / -1; flex-direction: column; align-items: stretch; overflow: visible; position: sticky; top: 110px; }
  .ft-shop__lists .ft-tab { justify-content: space-between; }
  .ft-shop > .ft-list-head:first-of-type, .ft-shop > .ft-section-head { margin-top: 0; }
}
@media (min-width: 1440px) {
  .ft-app { --ft-sidebar-width: 288px; }
}

/* ---------- uvítání a přehled ---------- */
.ft-hello { margin: 4px 4px 18px; }
.ft-hello__date { font-weight: 800; color: var(--ft-text-muted); }
.ft-hello__title { font-size: 2rem; font-weight: 900; margin: 0; line-height: 1.15; }

.ft-today { background: linear-gradient(160deg, #2E4A73 0%, #4A6FA5 100%); color: #fff; border-radius: 26px; padding: 18px; box-shadow: 0 14px 30px rgba(46, 74, 115, .28); }
.ft-today__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ft-today__title { color: #fff; font-size: 1.15rem; font-weight: 900; margin: 0; }
.ft-today__link { color: #fff; font-weight: 800; text-decoration: none; opacity: .9; }
.ft-today__empty { margin: 6px 0 2px; opacity: .92; font-weight: 700; }
.ft-today__free { display: flex; align-items: center; gap: 10px; margin: 0 4px 4px; font-weight: 800; color: #fff; }
.ft-today__free .icon { width: 24px; height: 24px; color: #FFD7A8; }
.ft-today .ft-event { background: rgba(255, 255, 255, .96); color: var(--ft-text); border: 2px solid #fff; }

.ft-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ft-action {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 16px; min-height: 112px; border-radius: 22px; background: var(--ft-surface); border: 1px solid var(--ft-border);
  box-shadow: var(--ft-shadow); color: var(--ft-text); text-decoration: none; font-weight: 900; font-size: 1.02rem; line-height: 1.25; text-align: left;
}
.ft-action:hover { color: var(--ft-text); transform: translateY(-1px); box-shadow: var(--ft-shadow-lift); }
.ft-action__icon { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; }
.ft-action__meta { display: block; font-weight: 700; font-size: .85rem; color: var(--ft-text-muted); }
.ft-tone-blue { background: var(--ft-family-1); color: var(--ft-family-1-ink); }
.ft-tone-green { background: var(--ft-family-2); color: var(--ft-family-2-ink); }
.ft-tone-orange { background: var(--ft-family-3); color: var(--ft-family-3-ink); }
.ft-tone-purple { background: var(--ft-family-4); color: var(--ft-family-4-ink); }
.ft-tone-navy { background: #1E3352; color: #F7B955; }
.ft-tone-teal { background: var(--ft-family-7); color: var(--ft-family-7-ink); }
.ft-tone-gold { background: var(--ft-family-6); color: var(--ft-family-6-ink); }

/* ---------- události ---------- */
.ft-events { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.ft-event {
  position: relative; display: flex; align-items: center; gap: 14px;
  background: var(--ft-surface); border-radius: 18px; padding: 12px 12px 12px 18px; min-height: 68px;
  border: 1px solid var(--ft-border); overflow: hidden;
}
.ft-event::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--stripe, var(--ft-primary)); }
.ft-event__time { flex: none; width: 58px; font-weight: 900; font-size: 1.05rem; line-height: 1.15; }
.ft-event__time small { display: block; font-weight: 700; color: var(--ft-text-muted); font-size: .8rem; }
.ft-event__body { flex: 1; min-width: 0; }
.ft-event__title { display: block; font-weight: 800; line-height: 1.3; }
.ft-event__meta { display: block; color: var(--ft-text-muted); font-size: .9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* barvy rodin (výplň + proužek) */
.ft-family-1 { --stripe: var(--ft-family-1-ink); --fill: var(--ft-family-1); }
.ft-family-2 { --stripe: var(--ft-family-2-ink); --fill: var(--ft-family-2); }
.ft-family-3 { --stripe: var(--ft-family-3-ink); --fill: var(--ft-family-3); }
.ft-family-4 { --stripe: var(--ft-family-4-ink); --fill: var(--ft-family-4); }
.ft-family-5 { --stripe: var(--ft-family-5-ink); --fill: var(--ft-family-5); }
.ft-family-6 { --stripe: var(--ft-family-6-ink); --fill: var(--ft-family-6); }
.ft-family-7 { --stripe: var(--ft-family-7-ink); --fill: var(--ft-family-7); }
.ft-family-8 { --stripe: var(--ft-family-8-ink); --fill: var(--ft-family-8); }
.ft-family-9 { --stripe: var(--ft-family-9-ink); --fill: var(--ft-family-9); }
.ft-personal { --stripe: var(--ft-personal-ink); --fill: var(--ft-personal); }

/* týdenní pás dnů */
.ft-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 4px 0 18px; }
.ft-week__day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 66px; border-radius: 16px; text-decoration: none; color: var(--ft-text);
  background: var(--ft-surface); border: 1px solid var(--ft-border); font-weight: 900; font-size: 1.1rem;
}
.ft-week__day small { font-size: .72rem; font-weight: 800; color: var(--ft-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.ft-week__day[aria-current="date"] { background: var(--ft-primary); border-color: var(--ft-primary); color: #fff; }
.ft-week__day[aria-current="date"] small { color: rgba(255, 255, 255, .85); }
.ft-week__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ft-accent); }
.ft-week__day:not(.has-events) .ft-week__dot { visibility: hidden; }
.ft-week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.ft-week-nav__label { font-weight: 900; font-size: 1.05rem; text-align: center; flex: 1; }
.ft-day-title { font-size: 1.05rem; font-weight: 900; margin: 22px 4px 10px; display: flex; align-items: center; gap: 8px; }
.ft-day-title .ft-chip { font-size: .75rem; }

/* ---------- seznamy ---------- */
.ft-list { list-style: none; margin: 0; padding: 6px; background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: var(--ft-radius-card); box-shadow: var(--ft-shadow); }
.ft-list__item { display: flex; align-items: center; gap: 14px; padding: 10px 10px; min-height: 64px; border-radius: 16px; }
.ft-list__item + .ft-list__item { border-top: 1px solid #F1EAE0; border-radius: 0; }
.ft-list__main { flex: 1; min-width: 0; }
.ft-list__title { font-weight: 800; display: block; line-height: 1.3; }
.ft-list__meta { color: var(--ft-text-muted); font-size: .9rem; font-weight: 700; display: block; }
a.ft-list__item { color: inherit; text-decoration: none; }
a.ft-list__item:hover { background: var(--ft-bg); }

.ft-avatar { width: 46px; height: 46px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.1rem; background: var(--fill, var(--ft-family-1)); color: var(--stripe, var(--ft-family-1-ink)); flex: none; }
.ft-avatar--round { border-radius: var(--ft-radius-pill); }
.ft-avatar-stack { display: flex; }
.ft-avatar-stack .ft-avatar { width: 38px; height: 38px; font-size: .95rem; border-radius: var(--ft-radius-pill); border: 3px solid var(--ft-surface); margin-left: -8px; }
.ft-avatar-stack .ft-avatar:first-child { margin-left: 0; }

.ft-chip { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--ft-radius-pill); padding: 3px 10px; font-size: .8rem; font-weight: 800; background: var(--ft-primary-soft); color: var(--ft-navy); white-space: nowrap; }
.ft-chip--green { background: var(--ft-secondary-soft); color: var(--ft-secondary); }
.ft-chip--orange { background: var(--ft-accent-soft); color: var(--ft-accent-ink); }
.ft-chip--grey { background: var(--ft-bg-deep); color: var(--ft-text-muted); }
.ft-chip--red { background: var(--ft-danger-soft); color: var(--ft-danger); }
.ft-pill { display: inline-block; border-radius: var(--ft-radius-pill); padding: 1px 9px; font-size: .8rem; font-weight: 900; background: rgba(255, 255, 255, .25); }

/* přepínač (rodiny, seznamy) */
.ft-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px 14px; scrollbar-width: none; }
.ft-tabs::-webkit-scrollbar { display: none; }
.ft-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: var(--ft-radius-pill); background: var(--ft-surface); border: 1px solid var(--ft-border); color: var(--ft-text); font-weight: 800; text-decoration: none; white-space: nowrap; }
.ft-tab[aria-current="page"] { background: var(--ft-navy); border-color: var(--ft-navy); color: #fff; }
.ft-tab .ft-count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--ft-bg-deep); color: var(--ft-text); font-size: .8rem; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
.ft-tab[aria-current="page"] .ft-count { background: rgba(255, 255, 255, .2); color: #fff; }
.ft-tab--add { border-style: dashed; color: var(--ft-primary); background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.ft-tab__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--stripe, var(--ft-primary)); }

/* ---------- nákupy ---------- */
.ft-quick-add { display: flex; gap: 8px; padding: 8px; background: var(--ft-surface); border: 2px solid var(--ft-border); border-radius: 20px; box-shadow: var(--ft-shadow); margin-bottom: 16px; }
.ft-quick-add:focus-within { border-color: var(--ft-primary); }
.ft-quick-add .form-control { border: 0; background: transparent; box-shadow: none; font-size: 1.1rem; }
.ft-quick-add .btn { flex: none; }
.ft-check { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 8px 8px; background: none; border: 0; text-align: left; color: var(--ft-text); border-radius: 14px; cursor: pointer; font: inherit; }
.ft-check:hover { background: var(--ft-bg); }
.ft-check + .ft-check { border-top: 1px solid #F1EAE0; border-radius: 0; }
.ft-check__box { width: 32px; height: 32px; flex: none; border-radius: 10px; border: 2.5px solid var(--ft-border-strong); display: inline-flex; align-items: center; justify-content: center; color: transparent; background: #fff; }
.ft-check__box .icon { width: 20px; height: 20px; stroke-width: 3; }
.ft-check[aria-pressed="true"] .ft-check__box { background: var(--ft-secondary); border-color: var(--ft-secondary); color: #fff; }
.ft-check__name { font-weight: 800; font-size: 1.1rem; display: block; }
.ft-check__qty { font-weight: 700; color: var(--ft-text-muted); font-size: .9rem; }
.ft-check[aria-pressed="true"] .ft-check__name { text-decoration: line-through; color: var(--ft-text-muted); }
.ft-done-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 4px 8px; }
.ft-check--static { cursor: default; }
.ft-check--static:hover { background: none; }
.ft-check--static .ft-check__box { border-radius: 50%; width: 12px; height: 12px; border: 0; background: var(--ft-border-strong); margin: 0 10px; }
.ft-check--static.is-done .ft-check__box { background: var(--ft-secondary); }
.ft-check--static.is-done .ft-check__name { text-decoration: line-through; color: var(--ft-text-muted); }
.ft-hint-card { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 14px 16px; border-radius: 18px; background: var(--ft-primary-soft); color: var(--ft-navy); font-weight: 700; }
.ft-hint-card .icon { flex: none; width: 22px; height: 22px; margin-top: 1px; }

/* ---------- hlídání ---------- */
.ft-care { border-radius: var(--ft-radius-card); background: var(--ft-surface); border: 1px solid var(--ft-border); box-shadow: var(--ft-shadow); padding: 18px; }
.ft-care + .ft-care { margin-top: 12px; }
.ft-care__when { font-size: 1.2rem; font-weight: 900; line-height: 1.25; margin: 6px 0 2px; }
.ft-care__kids { font-weight: 800; }
.ft-care__time { display: block; font-size: 1rem; color: var(--ft-accent-ink); }
.ft-care__cancel { color: var(--ft-danger); }
.ft-care__note { margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--ft-bg); font-weight: 600; }
.ft-care__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.ft-care__asked { margin: 10px 0 0; color: var(--ft-text-muted); font-weight: 700; font-size: .95rem; }
/* prosba o hlídání na domovské obrazovce – vlídná, výrazná, s odpovědí na jedno klepnutí */
.ft-ask { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; padding: 18px; border-radius: var(--ft-radius-card);
  background: linear-gradient(135deg, var(--ft-accent-soft), var(--ft-surface) 75%); border: 2px solid #F6C9A6; box-shadow: var(--ft-shadow); }
.ft-ask__icon { flex: none; width: 48px; height: 48px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: var(--ft-surface); color: var(--ft-accent-ink); }
.ft-ask__icon .icon { width: 28px; height: 28px; }
.ft-ask__body { flex: 1; min-width: 0; }
.ft-ask__title { font-size: 1.1rem; font-weight: 900; line-height: 1.3; margin: 0 0 4px; }
.ft-ask__when { margin: 0; font-weight: 800; color: var(--ft-accent-ink); }
.ft-ask__place { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-weight: 700; }
.ft-ask__place .icon { width: 18px; height: 18px; color: var(--ft-text-muted); }
.ft-ask__note { margin: 8px 0 0; color: var(--ft-text-muted); font-weight: 600; }
.ft-ask__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.ft-meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ft-text-muted); font-weight: 700; font-size: .92rem; }
.ft-meta-row span { display: inline-flex; align-items: center; gap: 5px; }
.ft-meta-row .icon { width: 18px; height: 18px; }

/* dostupnost */
.ft-avail { display: flex; align-items: center; gap: 12px; padding: 10px; }
.ft-avail + .ft-avail { border-top: 1px solid #F1EAE0; }
.ft-avail__busy { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ---------- rodina ---------- */
.ft-family-hero { border-radius: 26px; padding: 18px; background: var(--fill, var(--ft-family-1)); color: var(--ft-text); display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.ft-family-hero__name { font-size: 1.5rem; font-weight: 900; margin: 0; line-height: 1.2; }
.ft-family-hero__meta { font-weight: 800; color: var(--stripe, var(--ft-primary)); }
.ft-family-hero .ft-avatar-stack .ft-avatar { border-color: var(--fill); }

/* ---------- nastavení (profil) ---------- */
.ft-settings { background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: var(--ft-radius-card); box-shadow: var(--ft-shadow); overflow: hidden; }
.ft-settings + .ft-settings { margin-top: 14px; }
details.ft-disclosure > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 64px; cursor: pointer; font-weight: 900; }
details.ft-disclosure > summary::-webkit-details-marker { display: none; }
details.ft-disclosure > summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2.5px solid var(--ft-text-muted); border-bottom: 2.5px solid var(--ft-text-muted); transform: rotate(45deg); transition: transform .15s ease; }
details.ft-disclosure[open] > summary::after { transform: rotate(225deg); }
.ft-disclosure__icon { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ft-disclosure__body { padding: 4px 16px 18px; }
.ft-profile-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.ft-profile-card .ft-avatar { width: 64px; height: 64px; font-size: 1.6rem; border-radius: 22px; }

/* ---------- přihlášení (brand kit: fotka rodiny, logo, bílý panel) ---------- */
.ft-auth-page { min-height: 100vh; background: #fff; }
.ft-auth { min-height: 100vh; display: flex; flex-direction: column; }
.ft-auth__hero { position: relative; height: clamp(260px, 42vh, 420px); flex: none; overflow: hidden; background: #B9CDEA; }
.ft-auth__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; }
.ft-auth__logo { position: absolute; left: 50%; top: calc(26px + env(safe-area-inset-top)); transform: translateX(-50%); display: inline-flex; align-items: center; padding: 12px 24px; border-radius: var(--ft-radius-pill); background: rgba(255, 255, 255, .92); box-shadow: 0 8px 24px rgba(43, 47, 54, .14); }
.ft-auth__logo img { display: block; width: 150px; height: auto; }
.ft-auth__sheet { position: relative; flex: 1; margin-top: -32px; background: #fff; border-radius: 28px 28px 0 0; padding: 30px 22px calc(28px + env(safe-area-inset-bottom)); width: 100%; max-width: 32rem; margin-left: auto; margin-right: auto; }
.ft-auth__sheet h1 { font-size: 1.9rem; font-weight: 900; margin: 0 0 6px; color: var(--ft-text); letter-spacing: -.01em; }
.ft-auth__lead { color: var(--ft-text-muted); font-size: 1.05rem; margin: 0 0 22px; }
.ft-auth .form-control { background: #fff; border-color: var(--ft-border); }
.ft-auth .btn-primary { width: 100%; min-height: 56px; font-size: 1.1rem; }
.ft-auth__links { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; text-align: center; font-weight: 800; }
.ft-auth__links:empty { display: none; }
.ft-auth__first { margin: 0; font-weight: 600; color: var(--ft-text-muted); }
.ft-auth__first a { font-weight: 800; }
.ft-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ft-label-row__link { font-weight: 800; font-size: .95rem; text-decoration: none; }
.ft-password { position: relative; }
.ft-password .form-control { padding-right: 56px; }
.ft-password__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; background: transparent; color: var(--ft-text-muted); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ft-password__toggle:hover { color: var(--ft-text); }
.ft-password__toggle:focus-visible { outline: 3px solid var(--ft-primary); outline-offset: 0; }
/* příběh u fotky a „Powered by“ – příběh jen na počítači, patička všude */
.ft-auth__panel { position: relative; flex: 1; display: flex; flex-direction: column; }
.ft-auth__story { display: none; }
.ft-auth__powered { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); color: var(--ft-text-muted); font-size: .9rem; font-weight: 600; background: #fff; }
.ft-auth__powered strong { color: var(--ft-graphite); font-weight: 900; letter-spacing: .06em; }
.ft-cremg { width: 11px; height: 11px; border-radius: 3px; background: #5B5BD6; margin-left: 4px; }
@media (min-width: 720px) {
  .ft-auth-page { background: var(--ft-bg); }
  .ft-auth__hero { height: 46vh; }
  .ft-auth__sheet { flex: none; margin-top: -90px; margin-bottom: 24px; border-radius: 28px; box-shadow: var(--ft-shadow-lift); }
  .ft-auth__powered { background: transparent; margin-top: auto; }
}
/* počítač: fotka s příběhem vlevo, klidný formulář vpravo */
@media (min-width: 1024px) {
  .ft-auth { flex-direction: row; min-height: 100vh; }
  .ft-auth__hero { flex: 0 0 56%; height: auto; min-height: 100vh; position: sticky; top: 0; align-self: flex-start; }
  .ft-auth__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 51, 82, .05) 0%, rgba(30, 51, 82, .18) 38%, rgba(30, 51, 82, .86) 100%); }
  .ft-auth__photo { object-position: 58% 32%; }
  .ft-auth__logo { left: 48px; top: 40px; transform: none; z-index: 2; }
  .ft-auth__story { display: block; position: absolute; left: 56px; right: 56px; bottom: 40px; z-index: 2; color: #fff; }
  .ft-auth__eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 900; color: #FFC79E; }
  .ft-auth__headline { font-size: clamp(2rem, 3vw, 2.9rem); font-weight: 900; line-height: 1.12; margin: 10px 0 22px; max-width: 16ch; letter-spacing: -.01em; }
  .ft-auth__perks { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 12px; font-weight: 700; font-size: 1.05rem; }
  .ft-auth__perks li { display: flex; align-items: center; gap: 12px; }
  .ft-auth__perks .icon { flex: none; width: 36px; height: 36px; padding: 7px; border-radius: 12px; background: rgba(255, 255, 255, .16); color: #fff; }
  .ft-auth__copy { margin: 0; font-size: .9rem; color: rgba(255, 255, 255, .78); font-weight: 600; }
  .ft-auth__panel { min-height: 100vh; background: var(--ft-bg); }
  .ft-auth__sheet { flex: 1; display: flex; flex-direction: column; justify-content: center; margin: 0 auto; max-width: 30rem; padding: 48px 40px; background: transparent; border-radius: 0; box-shadow: none; }
  .ft-auth__sheet h1 { font-size: 2.3rem; }
  .ft-auth__powered { border-top: 1px solid var(--ft-border); padding: 20px 16px; }
}

/* ---------- bottom sheet ---------- */
dialog.ft-sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 640px; max-height: 92vh; border-radius: 28px 28px 0 0; background: var(--ft-surface); color: var(--ft-text); box-shadow: var(--ft-shadow-lift); }
dialog.ft-sheet::backdrop { background: rgba(31, 41, 51, .5); }
dialog.ft-sheet[open] { animation: ft-sheet-in .22s ease-out; }
@keyframes ft-sheet-in { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.ft-sheet__body { padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); overflow-y: auto; }
.ft-sheet__body::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--ft-border); margin: 0 auto 14px; }
.ft-sheet__title { font-size: 1.4rem; font-weight: 900; margin: 0 0 16px; }
@media (min-width: 768px) { dialog.ft-sheet { margin: auto; border-radius: 28px; } }

/* ---------- zprávy ---------- */
.ft-toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--ft-nav-height) + env(safe-area-inset-bottom) + 100px); z-index: 50; max-width: 26rem; margin: 0 auto; background: var(--ft-text); color: #fff; border-radius: 16px; padding: 14px 18px; font-weight: 800; box-shadow: var(--ft-shadow-lift); }
.ft-alert { border-radius: 16px; padding: 12px 16px; background: var(--ft-danger-soft); color: var(--ft-danger); font-weight: 800; margin-bottom: 16px; }
.ft-notice { border-radius: 18px; padding: 14px 16px; background: var(--ft-accent-soft); color: #7A3510; font-weight: 700; margin-bottom: 16px; display: flex; gap: 12px; align-items: flex-start; }
.ft-notice .btn { margin-top: 8px; }
.ft-empty { text-align: center; color: var(--ft-text-muted); padding: 26px 16px; font-weight: 700; }
.ft-empty__icon { width: 64px; height: 64px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; background: var(--ft-bg-deep); color: var(--ft-text-muted); }
.ft-empty__icon .icon { width: 32px; height: 32px; }
.ft-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; background: var(--ft-bg); border-radius: 10px; padding: 10px 12px; display: block; }

/* ---------- chybová stránka ---------- */
.ft-error { max-width: 30rem; margin: 18vh auto; padding: 0 18px; text-align: center; }
.ft-error__status { font-size: 4rem; margin: 0; color: var(--ft-primary); font-weight: 900; line-height: 1; }
.ft-error__message { font-size: 1.4rem; margin: 12px 0 22px; }
.ft-error__ref { color: var(--ft-text-muted); font-size: .85rem; margin-top: 18px; }

/* ---------- administrace ---------- */
.ft-admin .ft-main { max-width: 1100px; }
.ft-admin table { background: var(--ft-surface); }
.ft-admin .table { font-size: .95rem; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

details.ft-field > summary { list-style: none; width: auto; }
details.ft-field > summary::-webkit-details-marker { display: none; }

/* v2.1 – doladění podle náhledů */
.ft-family-hero .ft-avatar-stack .ft-avatar { background: #fff; color: var(--stripe); border-color: var(--fill); }
.ft-app:has(.ft-fab) .ft-main { padding-bottom: 96px; }
.btn-neutral { background: var(--ft-bg-deep); color: var(--ft-text); border: 0; }
.btn-neutral:hover { background: #E9E0D2; color: var(--ft-text); }
.ft-today__day { color: #fff; font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; margin: 12px 4px 6px; }
.ft-today__day:first-of-type { margin-top: 2px; }

/* v2.2 – detail události a výběr účastníků */
button.ft-event { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.ft-event:hover { box-shadow: var(--ft-shadow); }
button.ft-event > .icon:last-child { color: var(--ft-text-muted); }
.ft-events > li { list-style: none; }
.ft-event--birthday { background: linear-gradient(90deg, rgba(240, 138, 75, .10), transparent 70%), var(--ft-surface, #fff); }
.ft-event--birthday .ft-event__time { color: var(--ft-accent-ink); display: flex; align-items: center; }
.ft-event--birthday .ft-event__time .icon { width: 28px; height: 28px; }
.ft-birthday { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.ft-birthday .icon { width: 15px; height: 15px; flex: none; color: var(--ft-accent-ink); }
.ft-event__repeat { width: 16px; height: 16px; color: var(--ft-text-muted); margin-left: 2px; }
.ft-event__who { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: .85rem; font-weight: 800; color: var(--stripe, var(--ft-primary)); }
.ft-event__who .icon { width: 16px; height: 16px; }
.ft-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.ft-choice { position: relative; cursor: pointer; margin: 0; }
.ft-choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ft-choice span { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 14px; border-radius: var(--ft-radius-pill); border: 2px solid var(--ft-border); background: var(--ft-surface); font-weight: 800; }
.ft-choice span .icon { width: 18px; height: 18px; }
.ft-choice input:checked + span { background: var(--ft-primary); border-color: var(--ft-primary); color: #fff; }
.ft-choice input:focus-visible + span { outline: 3px solid var(--ft-primary); outline-offset: 2px; }
.ft-detail p { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; font-weight: 700; }
.ft-detail .icon { color: var(--ft-text-muted); margin-top: 1px; }
.ft-row > * { min-width: 0; }
.ft-row .form-control { width: 100%; }
@media (max-width: 480px) { .ft-row:has(input[type="datetime-local"]) { grid-template-columns: 1fr; } }

/* v2.3 – barvy osob */
.ft-person { display: inline-flex; align-items: center; gap: 4px; color: var(--stripe, var(--ft-primary)); }
.ft-person::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--stripe, var(--ft-primary)); flex: none; }
.ft-event__who .ft-person + .ft-person { margin-left: 4px; }
button.ft-avatar { border: 0; cursor: pointer; font: inherit; font-weight: 900; }
button.ft-avatar:focus-visible { outline: 3px solid var(--ft-primary); outline-offset: 2px; }
.ft-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ft-swatch { position: relative; }
.ft-swatch input { position: absolute; opacity: 0; inset: 0; }
.ft-swatch span { display: flex; align-items: center; justify-content: center; height: var(--ft-touch); border-radius: 16px; background: var(--fill); color: var(--stripe); border: 3px solid transparent; font-weight: 900; }
.ft-swatch input:checked + span { border-color: var(--stripe); box-shadow: var(--ft-shadow); }
.ft-swatch input:checked + span::after { content: "✓"; }
.ft-swatch input:focus-visible + span { outline: 3px solid var(--ft-primary); outline-offset: 2px; }

/* v2.4 – měsíční pohled a tisk */
.ft-cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.ft-segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--ft-radius-pill); background: var(--ft-surface); border: 1px solid var(--ft-border); }
.ft-segmented a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 20px; border-radius: var(--ft-radius-pill); font-weight: 800; color: var(--ft-text); text-decoration: none; }
.ft-segmented a[aria-current="page"] { background: var(--ft-primary); color: #fff; }
.ft-segmented a:focus-visible { outline: 3px solid var(--ft-primary); outline-offset: 2px; }

.ft-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 4px 0 18px; }
.ft-month__head { text-align: center; font-size: .72rem; font-weight: 800; color: var(--ft-text-muted); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 2px; }
.ft-month__day { min-height: 54px; border-radius: 12px; background: var(--ft-surface); border: 1px solid var(--ft-border); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 6px 2px 4px; gap: 4px; color: var(--ft-text); text-decoration: none; font-weight: 800; }
.ft-month__day.is-out { background: transparent; color: var(--ft-text-muted); border-color: transparent; }
.ft-month__day[aria-current="date"] { background: var(--ft-primary); border-color: var(--ft-primary); color: #fff; }
a.ft-month__day:hover { box-shadow: var(--ft-shadow); }
a.ft-month__day:focus-visible { outline: 3px solid var(--ft-primary); outline-offset: 2px; }
.ft-month__num { line-height: 1; }
.ft-month__dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px; }
.ft-month__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--stripe); }
.ft-month__day[aria-current="date"] .ft-month__dots i { box-shadow: 0 0 0 1.5px #fff; }
.ft-month__dots small { font-size: .65rem; line-height: 1; }


/* v2.5 – zprávy */
.ft-header__msgs { position: relative; }
.ft-header__msgs[aria-current="page"] { color: var(--ft-primary); }
.ft-badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ft-accent); color: var(--ft-graphite); font-size: .75rem; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--ft-bg); }
.ft-badge[hidden] { display: none; }
.ft-badge--inline { position: static; border: 0; flex: none; }

.ft-convs { list-style: none; padding: 0; margin: 0; }
.ft-conv { text-decoration: none; color: inherit; }
.ft-conv__top, .ft-conv__bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.ft-conv__time { flex: none; font-size: .8rem; color: var(--ft-text-muted); font-weight: 700; }
.ft-conv__preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ft-conv.is-unread .ft-list__title, .ft-conv.is-unread .ft-conv__preview { font-weight: 900; color: var(--ft-text); }
.ft-conv.is-unread .ft-conv__time { color: var(--ft-accent-ink); }

/* vlákno: bez spodní lišty, psací pole dole */
.ft-chat .ft-bottom-nav, .ft-chat .ft-fab { display: none; }
.ft-chat .ft-app { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.ft-thread__empty { text-align: center; color: var(--ft-text-muted); margin: 32px 0; }
.ft-msgs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ft-msgs__day { align-self: center; margin: 14px 0 6px; padding: 4px 12px; border-radius: var(--ft-radius-pill); background: var(--ft-surface); border: 1px solid var(--ft-border); font-size: .8rem; font-weight: 800; color: var(--ft-text-muted); }
.ft-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; }
.ft-msg--mine { align-self: flex-end; align-items: flex-end; }
.ft-msg__who { font-size: .78rem; font-weight: 800; color: var(--ft-text-muted); margin: 6px 0 2px 12px; }
.ft-msg__body { padding: 9px 13px 6px; border-radius: 20px 20px 20px 6px; background: var(--ft-surface); border: 1px solid var(--ft-border); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02rem; line-height: 1.35; }
.ft-msg--mine .ft-msg__body { background: var(--ft-primary); border-color: var(--ft-primary); color: #fff; border-radius: 20px 20px 6px 20px; cursor: pointer; }
.ft-msg__time { display: block; text-align: right; font-size: .7rem; font-weight: 700; opacity: .7; margin-top: 2px; }
.ft-msg.is-deleted .ft-msg__body { font-style: italic; opacity: .7; background: transparent; color: var(--ft-text-muted); border-style: dashed; border-color: var(--ft-border-strong); }
.ft-msg__delete { margin-top: 4px; border: 0; background: var(--ft-danger-soft); color: var(--ft-danger); font: inherit; font-size: .85rem; font-weight: 800; border-radius: var(--ft-radius-pill); padding: 6px 12px; min-height: 36px; }
.ft-msg__delete[hidden] { display: none; }

.ft-composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--ft-bg); border-top: 1px solid var(--ft-border); max-width: 720px; margin: 0 auto; }
.ft-composer textarea { flex: 1; resize: none; min-height: var(--ft-touch); max-height: 160px; border-radius: 24px; padding: 13px 16px; font-size: 1rem; line-height: 1.35; }
.ft-composer__send { width: var(--ft-touch); height: var(--ft-touch); border-radius: 50%; flex: none; }
.ft-composer--closed { position: fixed; margin: 0 auto; }
button.ft-header__action { border: 0; font: inherit; cursor: pointer; }
.ft-header__action[aria-current="page"] { background: var(--ft-primary-soft); color: var(--ft-primary-hover); box-shadow: inset 0 0 0 2px var(--ft-primary); }
.ft-chat .ft-header__msgs { display: none; }

/* v2.6 – push upozornění */
.ft-push { padding: 16px 18px; }
.ft-push[hidden] { display: none; }
.ft-push__head { display: flex; align-items: center; gap: 12px; }
.ft-push__head .ft-list__title { font-size: 1.05rem; margin: 0; }
.ft-push__head .ft-list__meta { margin: 2px 0 0; }
.ft-push__actions { display: grid; gap: 8px; margin-top: 12px; }
.ft-push__actions [hidden] { display: none; }
.ft-push-banner[hidden] { display: none; }

/* v2.7 – zprávy: stav doručení, šedý čas, smajlíky */
.ft-msg--mine .ft-msg__body { background: var(--ft-primary-soft); border-color: var(--ft-blue-light); color: var(--ft-text); cursor: pointer; }
.ft-msg__text { display: block; }
.ft-msg__meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 2px; }
.ft-msg__time { display: inline; margin: 0; font-size: .72rem; font-weight: 700; color: var(--ft-text-muted); opacity: 1; }
.ft-msg__status { display: inline-flex; color: var(--ft-text-muted); }
.ft-msg__status .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.ft-msg__status[data-status="read"] { color: #1A73E8; }
.ft-msg__status[data-status="failed"] { color: var(--ft-danger); }
.ft-msg.is-pending .ft-msg__body { opacity: .75; }
.ft-msg.is-failed .ft-msg__body { border-color: var(--ft-danger); }
.ft-msg__retry { margin-top: 4px; border: 0; background: transparent; color: var(--ft-danger); font: inherit; font-size: .8rem; font-weight: 800; padding: 4px 2px; min-height: 32px; cursor: pointer; }
.ft-msg.is-jumbo .ft-msg__body { background: transparent; border-color: transparent; padding: 0 4px; }
.ft-msg.is-jumbo .ft-msg__text { font-size: 2.6rem; line-height: 1.15; }

.ft-composer { flex-wrap: wrap; }
.ft-composer__emoji { width: var(--ft-touch); height: var(--ft-touch); border-radius: 50%; flex: none; }
.ft-emoji { flex-basis: 100%; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 200px; overflow-y: auto; padding: 4px 0 6px; }
.ft-emoji[hidden] { display: none; }
.ft-emoji__btn { border: 0; background: transparent; font-size: 1.6rem; line-height: 1; min-height: 44px; border-radius: 12px; cursor: pointer; }
.ft-emoji__btn:hover, .ft-emoji__btn:focus-visible { background: var(--ft-primary-soft); outline: none; }

.ft-composer { background: var(--ft-bg); }
.ft-chat.ft-emoji-open .ft-app { padding-bottom: calc(310px + env(safe-area-inset-bottom)); }

/* v3 – brand: symbol v hlavičce */
.ft-header__logo { display: inline-flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; }
.ft-header__logo img { width: 36px; height: 36px; display: block; }
.ft-header__logo:focus-visible { outline: 3px solid var(--ft-primary); outline-offset: 2px; }

/* Škola (ADR-030): výuka v kalendáři vede na rozvrh, odkaz u dítěte v Rodině */
a.ft-event { color: inherit; text-decoration: none; }
a.ft-event > .icon:last-child { color: var(--ft-text-muted); margin-left: auto; }
.ft-school-line { list-style: none; }
.ft-school-line a { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px; border-left: 3px dashed var(--stripe, var(--ft-primary));
  border-radius: 0 12px 12px 0; color: var(--ft-text-muted); font-weight: 700; font-size: .92rem; text-decoration: none; }
.ft-school-line a:hover { background: var(--fill, var(--ft-primary-soft)); color: var(--ft-text); }
.ft-school-line a:focus-visible { outline: 3px solid var(--ft-primary); outline-offset: 2px; }
.ft-school-line .icon { width: 18px; height: 18px; flex: none; color: var(--stripe, var(--ft-primary)); }
.ft-school-line__kind { padding: 2px 8px; border-radius: var(--ft-radius-pill); background: var(--fill, var(--ft-primary-soft)); color: var(--stripe, var(--ft-primary)); font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.ft-school-line__name { color: var(--ft-text); }
.ft-school-line__name small { color: var(--ft-text-muted); font-weight: 700; }
.ft-school-line__time { margin-left: auto; font-variant-numeric: tabular-nums; }
.ft-school-link { display: inline-flex; align-items: center; gap: 4px; color: var(--ft-secondary); font-weight: 800; text-decoration: none; }
.ft-school-link .icon { width: 15px; height: 15px; }

/* Předplatné (ADR-031) */
.ft-notice--warn { background: var(--ft-danger-soft); color: var(--ft-danger); }
.ft-notice a { color: inherit; text-decoration: underline; font-weight: 900; }
.ft-segmented button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 20px; border: 0; border-radius: var(--ft-radius-pill); background: transparent; font: inherit; font-weight: 800; color: var(--ft-text); cursor: pointer; }
.ft-segmented button[aria-pressed="true"] { background: var(--ft-primary); color: #fff; }
.ft-segmented button:focus-visible { outline: 3px solid var(--ft-primary); outline-offset: 2px; }
.bl-status { background: linear-gradient(135deg, var(--ft-primary-soft), var(--ft-surface) 70%); margin-bottom: 1.25rem; }
.bl-status.is-off { background: var(--ft-danger-soft); }
.bl-status__title { display: flex; align-items: center; gap: 8px; font-size: 1.4rem; font-weight: 900; margin: 4px 0 6px; }
.bl-status__title .icon { width: 26px; height: 26px; }
.bl-plans { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .bl-plans { grid-template-columns: 1fr 1fr; } }
.bl-plan { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--ft-radius-card); background: var(--ft-surface); border: 2px solid var(--ft-border); }
.bl-plan--best { border-color: var(--ft-primary); box-shadow: var(--ft-shadow); }
.bl-plan__badge { position: absolute; top: -12px; right: 16px; padding: 4px 12px; border-radius: var(--ft-radius-pill); background: var(--ft-secondary); color: #fff; font-weight: 900; font-size: .85rem; }
.bl-plan__name { font-size: 1.05rem; font-weight: 900; margin: 0; color: var(--ft-text-muted); }
.bl-plan__price { font-size: 2rem; font-weight: 900; margin: 0; line-height: 1.1; }
.bl-plan__price small { font-size: .95rem; font-weight: 700; color: var(--ft-text-muted); margin-left: 4px; }
.bl-plan__note { margin: 0 0 6px; color: var(--ft-secondary); font-weight: 800; }
.bl-plan .btn { margin-top: auto; }
a.ft-disclosure--link { display: block; color: var(--ft-text); text-decoration: none; }
.ft-disclosure__summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 64px; font-weight: 900; }
.ft-disclosure__summary > .icon:last-child { color: var(--ft-text-muted); }
.ft-today .ft-school-line a { color: rgba(255, 255, 255, .85); border-left-color: rgba(255, 255, 255, .7); }
.ft-today .ft-school-line a:hover { background: rgba(255, 255, 255, .12); }
.ft-today .ft-school-line__name, .ft-today .ft-school-line .icon, .ft-today .ft-school-line__name small { color: #fff; }
.ft-today .ft-school-line__kind { background: rgba(255, 255, 255, .18); color: #fff; }

/* Rodina: údaje člena jako štítky, akce v jedné nabídce */
.ft-member__facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ft-fact { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--ft-radius-pill); font-size: .85rem; font-weight: 800; white-space: nowrap; text-decoration: none; }
.ft-fact .icon { width: 15px; height: 15px; }
.ft-fact--school { background: var(--ft-secondary-soft); color: var(--ft-secondary); }
.ft-fact--birthday { background: var(--ft-accent-soft); color: var(--ft-accent-ink); }
.ft-menu { display: flex; flex-direction: column; gap: 6px; }
.ft-menu__item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 1px solid var(--ft-border); border-radius: 16px;
  background: var(--ft-surface); color: var(--ft-text); font: inherit; font-weight: 800; text-align: left; text-decoration: none; cursor: pointer; }
.ft-menu__item > .icon:last-child { margin-left: auto; color: var(--ft-text-muted); }
.ft-menu__item:hover { background: var(--ft-surface-soft); color: var(--ft-text); }
.ft-menu__item:focus-visible { outline: 3px solid var(--ft-primary); outline-offset: 2px; }
.ft-menu__icon { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }
.ft-menu__icon:not([class*="ft-tone-"]) { background: var(--ft-bg-deep); }
.ft-menu__icon .icon { width: 20px; height: 20px; }
.ft-menu__item--danger { color: var(--ft-danger); }
.ft-menu__item--danger .ft-menu__icon { background: var(--ft-danger-soft); }
.ft-feed-result { margin-top: 12px; padding: 16px; border-radius: 18px; background: var(--ft-secondary-soft); }
.ft-feed-result[hidden] { display: none; }
