/*
 * Chytrolín v2 – „kuchyňský přístroj“. Tablet 1280×800 na šířku.
 * Koncept: chladná ocelová šedá jako přístrojová deska; JEDINÁ barevná věc je Chytrolín (oranžová „Jiskra“).
 * Oranžovou nese jen avatar, tlačítko Mluvit, připomínky a nejbližší událost – „oranžová = Chytrolín ke mně mluví“.
 * Ve dne světlé téma (čitelnost pro starší oči v osvětlené kuchyni), večer tmavé (data-theme="dark").
 * Limity: písmo min. 22 px, ovládání min. 96 px, text kontrast ≥ 7:1, žádné sklo ani blur pod textem.
 */

@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin-ext.woff2") format("woff2"); font-weight: 300 700; font-display: swap;
  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: "Atkinson Hyperlegible Next"; src: url("../fonts/atkinson-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/atkinson-latin-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  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; }

/* Layout: mřížka 8 px, okraje 24 px; domů = tři sloupce 360 | 352 | 472 + navigační lišta 104 px */
:root {
  --bg: #e4e8eb;            /* ocelová šedá */
  --surface: #f6f7f8;
  --surface-2: #eceff2;     /* zapuštěné plochy, tlačítka */
  --line: rgba(20, 23, 26, 0.09);
  --line-strong: rgba(20, 23, 26, 0.26);
  --ink: #14171a;           /* 15:1 na surface */
  --ink-2: #454d56;         /* 8:1 */
  --ink-3: #59616b;         /* 6:1 – jen ≥ 22 px */
  --signal: #ff5b1f;        /* Chytrolín – jen výplně, nikdy text */
  --signal-press: #e84a10;
  --on-signal: #14171a;     /* text na oranžové 5.8:1 */
  --signal-text: #b23409;   /* oranžová jako text 5.6:1 */
  --signal-soft: #ffe4d7;
  --holiday: #a8231b;
  --photo-bg: #101316;

  --font-display: "Space Grotesk", "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --font-text: "Atkinson Hyperlegible Next", "Roboto", system-ui, sans-serif;

  --r-xl: 32px;
  --r-lg: 28px;
  --r: 22px;
  --gap: 24px;
  --btn-h: 96px;
}
:root[data-theme="dark"] {
  --bg: #0c0f12;
  --surface: #161a1f;
  --surface-2: #1e2329;
  --line: rgba(233, 236, 239, 0.08);
  --line-strong: rgba(233, 236, 239, 0.26);
  --ink: #e9ecef;
  --ink-2: #b2bac3;
  --ink-3: #98a1ab;
  --signal: #ff7a45;
  --signal-press: #ff8f61;
  --on-signal: #0c0f12;
  --signal-text: #ff936a;
  --signal-soft: #3a2117;
  --holiday: #ff8a80;
  --photo-bg: #07090b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 26px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.6s;
}
input, textarea { user-select: text; -webkit-user-select: text; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.cap::first-letter { text-transform: uppercase; }

/* ------------------------------------------------------------ obrazovka, plochy */
.screen { height: 100vh; display: flex; flex-direction: column; padding: var(--gap); gap: var(--gap); }
.card { background: var(--surface); border-radius: var(--r-lg); padding: 26px 28px; min-height: 0; border: 1px solid var(--line); }
.eyebrow { font-size: 22px; font-weight: 600; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.015em; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-link { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; font-size: 22px; font-weight: 700; color: var(--ink-2); }
.empty { color: var(--ink-3); font-size: 24px; }
.message { font-size: 26px; color: var(--ink-2); padding: 40px; text-align: center; }
.message.error { color: var(--holiday); }
.wx { color: var(--ink); flex: none; }

/* ------------------------------------------------------------ tlačítka */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--btn-h); min-width: 96px; padding: 0 30px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface-2); color: var(--ink);
  font: inherit; font-size: 26px; font-weight: 700;
  cursor: pointer; transition: background-color 0.1s, transform 0.08s;
}
.btn .icon { flex: none; }
.btn:active { transform: scale(0.97); filter: brightness(0.94); }
.btn.primary { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn.primary:active { background: var(--signal-press); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.selected { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn:disabled { opacity: 0.38; cursor: default; transform: none; }
.btn.icon-only { padding: 0; width: var(--btn-h); }

/* ------------------------------------------------------------ horní lišta */
.topbar { display: flex; align-items: center; gap: 16px; flex: none; min-height: var(--btn-h); }
.topbar h1 { flex: 1; font-size: 40px; padding-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .btn-home { min-width: 180px; }
.topbar .btn.save { min-width: 220px; }

/* ------------------------------------------------------------ stavové prvky */
.offline-banner {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--surface);
  font-size: 22px; font-weight: 700; padding: 10px 22px; border-radius: 999px;
}
.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%); z-index: 120;
  display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: var(--surface);
  font-size: 26px; font-weight: 700; padding: 22px 34px; border-radius: var(--r);
}

/* Svislé posouvání s tlačítky ▲▼ (bez nutnosti gest) */
.scroll-wrap { display: flex; gap: 14px; min-height: 0; flex: 1; }
.scroll-area { flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: none; }
.scroll-area::-webkit-scrollbar { display: none; }
.scroll-buttons { display: flex; flex-direction: column; gap: 12px; flex: none; }
.scroll-buttons .btn { flex: 1; width: 88px; min-width: 88px; padding: 0; max-height: 150px; }

/* ================================================================ DOMŮ */
.home {
  display: grid;
  grid-template-columns: 360px 352px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 104px;
  gap: var(--gap);
  height: 100%;
}
.home-left { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--gap); min-height: 0; }
.home-right { display: grid; grid-template-rows: 330px minmax(0, 1fr); gap: var(--gap); min-height: 0; }

/* Čas – volně na ploše, bez karty */
.clock { padding: 4px 4px 0; }
.clock-time { font-family: var(--font-display); font-size: 124px; font-weight: 600; line-height: 0.92; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; margin-left: -6px; }
.clock-date { font-size: 28px; font-weight: 700; margin-top: 12px; }
.clock-date::first-letter { text-transform: uppercase; }
.clock-names { font-size: 24px; color: var(--ink-2); margin-top: 4px; }
.clock-names b { color: var(--ink); font-weight: 700; }
.holiday-chip { display: inline-flex; margin-top: 10px; font-size: 22px; font-weight: 700; color: var(--holiday); }

/* Počasí */
.home-weather { display: flex; flex-direction: column; gap: 8px; cursor: pointer; padding: 22px 26px; }
.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-now .wx { width: 76px; height: 76px; }
.wx-now .temp { font-family: var(--font-display); font-size: 76px; font-weight: 600; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.wx-cond { font-size: 24px; font-weight: 700; }
.wx-feels { font-size: 22px; color: var(--ink-3); }
.wx-days { margin-top: auto; display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 8px; }
.wx-day { display: grid; grid-template-columns: 1fr 40px 112px; align-items: center; gap: 10px; font-size: 24px; min-height: 40px; }
.wx-day .d { font-weight: 700; }
.wx-day .wx { width: 34px; height: 34px; }
.wx-day .mm { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.wx-day .mm b { color: var(--ink); font-weight: 700; }

/* Střed: Chytrolín */
.home-center { display: flex; flex-direction: column; align-items: center; min-height: 0; }
.avatar-stage { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.avatar-canvas { width: 300px; height: 300px; display: block; touch-action: manipulation; cursor: pointer; }
.avatar-name { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.01em; }
.avatar-status { font-size: 23px; color: var(--ink-2); text-align: center; min-height: 32px; }
.talk-btn { width: 100%; min-height: 120px; border-radius: var(--r-xl); font-size: 32px; gap: 16px; }
.talk-btn .icon { width: 38px; height: 38px; }

/* Vpravo: fotky + události */
.photo-frame { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--photo-bg); cursor: pointer; }
.pf-layer { position: absolute; inset: 0; background: center / contain no-repeat; opacity: 0; transition: opacity 1.5s ease; }
.pf-layer.cover { background-size: cover; }
.pf-layer.visible { opacity: 1; }
.photo-caption {
  position: absolute; left: 16px; bottom: 16px;
  background: var(--signal); color: var(--on-signal);
  font-size: 22px; font-weight: 700; padding: 6px 16px; border-radius: 999px;
}
.photo-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; color: #c9cfd5; font-size: 23px; text-align: center; padding: 24px; }

.home-events { display: flex; flex-direction: column; gap: 8px; cursor: pointer; padding: 18px 26px; overflow: hidden; }
.agenda { display: grid; gap: 6px; }
.agenda + .agenda { border-top: 1px solid var(--line); padding-top: 8px; }
.agenda-head { display: flex; align-items: baseline; justify-content: space-between; }
.agenda-head .section-title { font-size: 24px; }
.agenda-head .count { font-size: 22px; color: var(--ink-3); }
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.event-item { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; font-size: 24px; line-height: 1.3; }
.event-item .time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.event-item.next .time { color: var(--signal-text); }
.event-item.next .title { font-weight: 700; }
.event-item .time.allday { font-size: 22px; font-weight: 700; white-space: nowrap; }
.event-item .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-more { font-size: 22px; color: var(--ink-3); }

/* Navigační lišta */
.home-nav { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 8px; }
.nav-item {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  border: 0; border-radius: var(--r); background: transparent; color: var(--ink);
  font: inherit; font-size: 27px; font-weight: 700; cursor: pointer;
}
.nav-item .icon { width: 38px; height: 38px; }
.nav-item:active { background: var(--surface-2); }
.nav-item + .nav-item { box-shadow: -13px 0 0 -12px var(--line-strong); }

/* ================================================================ POČASÍ */
.weather-screen { display: grid; grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: var(--gap); flex: 1; min-height: 0; }
.weather-current { grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 6px; }
.weather-current .wx { width: 112px; height: 112px; margin: 6px 0 0 -6px; }
.weather-current .temp { font-family: var(--font-display); font-size: 96px; font-weight: 600; line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.weather-current .facts { margin-top: auto; display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.weather-cond { font-size: 28px; font-weight: 700; }
.fact { display: flex; justify-content: space-between; font-size: 23px; }
.fact span:first-child { color: var(--ink-3); }
.fact span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.weather-source { font-size: 22px; color: var(--ink-3); margin-top: 10px; }
.weather-screen .card { padding: 20px 24px; }
.weather-screen .section-title { margin-bottom: 8px; font-size: 27px; }
.hourly { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); text-align: center; }
.hourly > div + div { border-left: 1px solid var(--line); }
.hourly .h { font-size: 22px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hourly .wx { width: 46px; height: 46px; margin: 4px auto; display: block; }
.hourly .t { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.precip { font-size: 22px; color: var(--ink-2); font-weight: 700; min-height: 31px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.daily { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.daily > div { padding: 0 4px; }
.daily > div + div { border-left: 1px solid var(--line); }
.daily .d { font-size: 23px; font-weight: 700; }
.daily .d::first-letter { text-transform: uppercase; }
.daily .date { font-size: 22px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.daily .wx { width: 50px; height: 50px; margin: 6px auto; display: block; }
.daily .max { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.daily .min { font-size: 24px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.daily .txt { font-size: 22px; line-height: 1.15; min-height: 51px; margin-top: 4px; color: var(--ink-2); }

/* ================================================================ KALENDÁŘ */
.calendar-screen { display: grid; grid-template-columns: 720px minmax(0, 1fr); gap: var(--gap); flex: 1; min-height: 0; }
.month { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; }
.month-nav { display: flex; align-items: center; gap: 12px; }
.month-nav h2 { flex: 1; font-size: 32px; padding-left: 6px; }
.month-nav .btn { min-height: 80px; }
.month-nav .btn.icon-only { width: 80px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: auto repeat(6, minmax(0, 1fr)); gap: 4px; flex: 1; min-height: 0; }
.month-grid .wd { text-align: center; font-size: 22px; font-weight: 700; color: var(--ink-3); padding: 4px 0 6px; }
.day-cell {
  position: relative; border: 0; border-radius: 16px; background: transparent;
  font: inherit; font-size: 27px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 0; padding: 0; cursor: pointer;
}
.day-cell:active { background: var(--surface-2); }
.day-cell.other { color: var(--ink-3); opacity: 0.55; }
.day-cell.holiday-day { color: var(--holiday); }
.day-cell.today { box-shadow: inset 0 0 0 2.5px var(--ink); font-weight: 700; }
.day-cell.selected { background: var(--ink); color: var(--surface); box-shadow: none; }
.day-cell .dots { display: flex; gap: 4px; height: 7px; }
.day-cell .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.day-detail { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.day-detail h2 { font-size: 32px; }
.day-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 23px; color: var(--ink-2); }
.day-meta .holiday-chip { margin-top: 0; }
.day-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.day-events li { background: var(--surface-2); border-radius: var(--r); padding: 14px 18px; display: grid; gap: 2px; }
.day-events .time { font-weight: 700; color: var(--ink-2); font-size: 23px; display: flex; align-items: center; gap: 8px; }
.day-events .title { font-size: 27px; font-weight: 700; line-height: 1.25; }
.day-events .note { font-size: 23px; color: var(--ink-2); }

/* ================================================================ FORMULÁŘ UDÁLOSTI */
.form { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.form-row { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 16px; padding: 10px 0; }
.form-row + .form-row { border-top: 1px solid var(--line); }
.form-row > .label { font-weight: 700; font-size: 25px; color: var(--ink-2); }
.form-row > .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.text-input {
  width: 100%; min-height: 88px; font: inherit; font-size: 32px;
  padding: 0 24px; border: 1.5px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
}
.text-input::placeholder { color: var(--ink-3); opacity: 0.8; }
.text-input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 4px var(--signal-soft); }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
.stepper .btn { border: 0; border-radius: 0; min-height: 88px; width: 84px; min-width: 84px; padding: 0; background: transparent; }
.stepper .value { min-width: 120px; padding: 0 12px; text-align: center; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; border-left: 1.5px solid var(--line); border-right: 1.5px solid var(--line); line-height: 88px; background: var(--surface); }
.stepper .value.wide { min-width: 440px; font-size: 27px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chips .btn { font-size: 23px; padding: 0 18px; min-height: 80px; }
.controls > .btn { min-height: 88px; }
.form-error { color: var(--holiday); font-size: 26px; font-weight: 700; min-height: 34px; }

/* ================================================================ RECEPTY */
.recipes-tools { display: flex; gap: 12px; flex: none; }
.search-box { position: relative; flex: 1; }
.search-box .icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.recipes-tools .text-input { min-height: var(--btn-h); padding-left: 64px; }
.categories { display: flex; gap: 10px; flex-wrap: wrap; flex: none; }
.categories .btn { min-height: 64px; font-size: 22px; padding: 0 18px; border-radius: 999px; }
.recipe-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: var(--gap); flex: 1; min-height: 0; }
.recipe-card {
  display: grid; grid-template-columns: 44% 1fr; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden; font: inherit; text-align: left; padding: 0; cursor: pointer; color: var(--ink); min-height: 0;
}
.recipe-card:active { transform: scale(0.99); }
.recipe-card .photo { min-height: 0; background: var(--surface-2) center / cover no-repeat; display: grid; place-items: center; color: var(--ink-3); }
.recipe-card .body { padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.recipe-card .title { font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.18; letter-spacing: -0.01em; }
.recipe-card .meta { font-size: 22px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.meta-item { display: inline-flex; align-items: center; gap: 6px; }
.pager { display: flex; align-items: center; justify-content: center; gap: var(--gap); flex: none; }
.pager .info { font-size: 24px; color: var(--ink-2); min-width: 200px; text-align: center; }

.recipe-detail { display: grid; grid-template-columns: 430px minmax(0, 1fr); gap: var(--gap); flex: 1; min-height: 0; }
.recipe-col { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.recipe-col .hero { border-radius: var(--r); height: 190px; width: 100%; object-fit: cover; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 22px; color: var(--ink-2); }
.ingredients { list-style: none; margin: 0; padding: 0; font-size: 25px; }
.ingredients li { padding: 10px 0; border-bottom: 1px solid var(--line); line-height: 1.3; }
.ingredients li:last-child { border-bottom: 0; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; font-size: 26px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 12px 0; line-height: 1.4; }
.steps li::before {
  content: counter(step); width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--surface);
  font-size: 22px; font-weight: 700; display: grid; place-items: center;
}
.col-actions { display: flex; gap: 12px; }
.col-actions .btn { flex: 1; }

/* Vařicí režim */
.cooking { display: flex; flex-direction: column; gap: var(--gap); flex: 1; min-height: 0; padding: 26px 30px; }
.cooking .progress { display: flex; align-items: center; gap: 18px; }
.progress-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--signal); border-radius: inherit; transition: width 0.25s; }
.progress-label { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cooking .step-text {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 46px; font-weight: 600; line-height: 1.32; padding: 0 40px; overflow-y: auto; text-wrap: balance;
}
.cooking .step-text.long { font-size: 37px; }
.cooking-actions { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: var(--gap); flex: none; }
.cooking-actions .btn { min-height: 120px; font-size: 32px; }

/* ================================================================ ZPRÁVY */
.news-list { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: var(--gap); flex: 1; min-height: 0; }
.news-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; min-height: 0; overflow: hidden; padding: 20px 28px; }
.news-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.news-meta { font-size: 22px; color: var(--ink-3); }
.news-source { font-weight: 700; color: var(--ink-2); }
.news-title { flex-shrink: 0; font-size: 28px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-perex { font-size: 23px; color: var(--ink-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.news-item .btn { min-height: 88px; }

/* ================================================================ PŘEKRYVNÁ OKNA */
.overlay { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 40px; }
.overlay.dim { background: rgba(12, 15, 18, 0.62); }
.dialog {
  background: var(--surface); border-radius: var(--r-xl); border: 1px solid var(--line);
  padding: 44px 52px; width: 100%; max-width: 1040px;
  display: flex; flex-direction: column; gap: 20px; align-items: center; text-align: center;
}
.dialog .actions { display: flex; gap: var(--gap); margin-top: 10px; }
.dialog .actions .btn { min-width: 280px; min-height: 112px; font-size: 32px; }
.dialog.sheet { align-items: stretch; text-align: left; max-height: 88vh; }
.dialog.sheet .actions { justify-content: flex-end; }

/* Scéna Chytrolína (asistent, připomínka): avatar vlevo, text vpravo – plná plocha, žádný dialog v dialogu */
.stage { position: fixed; inset: 0; z-index: 105; background: var(--bg); display: grid; grid-template-columns: 390px minmax(0, 1fr); align-items: center; gap: 24px; padding: 40px 48px 40px 24px; }
.stage .avatar-canvas { width: 380px; height: 380px; }
.stage-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stage-kicker { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--signal-text); }
.stage-title { font-family: var(--font-display); font-size: 52px; font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; overflow-wrap: anywhere; }
.stage-title:empty { display: none; }
.stage-heard { font-size: 24px; color: var(--ink-3); }
.stage-reply { font-size: 34px; font-weight: 600; line-height: 1.3; text-wrap: pretty; }
.stage-when { font-size: 36px; font-weight: 700; color: var(--signal-text); }
.stage-note { font-size: 28px; color: var(--ink-2); }
.stage-extra:empty { display: none; }
.stage .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.stage .actions .btn { min-width: 0; min-height: 104px; font-size: 28px; padding: 0 28px; }
.stage .actions .btn.wide { min-width: 260px; }
.as-summary { font-size: 28px; font-weight: 700; background: var(--signal-soft); padding: 16px 22px; border-radius: var(--r); }
.as-preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 22px; max-height: 300px; overflow: auto; }
.as-preview-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin-bottom: 8px; }
.as-preview-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; font-size: 22px; }
.as-preview-cols ul, .as-preview-cols ol { margin: 0; padding-left: 26px; }

/* ================================================================ SPOŘIČ A NOC */
.screensaver { position: fixed; inset: 0; z-index: 90; background: var(--photo-bg); color: #eef1f4; cursor: pointer; overflow: hidden; }
.ss-photo { position: absolute; inset: 0 0 128px; background: center / contain no-repeat; opacity: 0; transition: opacity 1.6s ease; }
.ss-photo.visible { opacity: 1; }
/* Plný pruh dole – text nikdy neleží na fotce */
.ss-info { position: absolute; left: 0; right: 0; bottom: 0; height: 128px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 44px; background: #0c0f12; }
.ss-time { font-family: var(--font-display); font-size: 84px; font-weight: 600; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.ss-date { font-size: 28px; font-weight: 600; color: #c3cad1; }
.ss-date::first-letter { text-transform: uppercase; }
.ss-left { display: flex; align-items: baseline; gap: 24px; }
.ss-caption { font-size: 24px; color: #c3cad1; text-align: right; display: grid; gap: 4px; justify-items: end; }
.ss-caption .new { display: inline-block; background: #ff7a45; color: #0c0f12; font-weight: 700; font-size: 22px; padding: 4px 14px; border-radius: 999px; }
.screensaver.no-photo .ss-info, .screensaver.night .ss-info { top: 0; height: auto; flex-direction: column; justify-content: center; text-align: center; background: transparent; }
.screensaver.no-photo .ss-left, .screensaver.night .ss-left { flex-direction: column; align-items: center; gap: 12px; }
.screensaver.no-photo .ss-time { font-size: 220px; }
.screensaver.no-photo .ss-caption { text-align: center; justify-items: center; }
.screensaver.night { background: #000; color: #9c7a5e; }
.screensaver.night .ss-photo { display: none; }
.screensaver.night .ss-time { font-size: 200px; color: #a07c5f; }
.screensaver.night .ss-date, .screensaver.night .ss-caption { color: #5f5145; }

/* ================================================================ SERVISNÍ PIN, NESPÁROVÁNO */
.pin-dialog { max-width: 520px; gap: 18px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; min-height: 22px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); }
.pin-dots i.on { background: var(--ink); border-color: var(--ink); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 110px); gap: 12px; }
.pin-pad .btn { min-height: 84px; font-size: 32px; }
.pair-screen { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 40px; text-align: center; }
.pair-screen h1 { font-size: 44px; }
.pair-screen p { font-size: 26px; color: var(--ink-2); max-width: 760px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
