:root {
  /* bílá, tmavý text, žlutá kachna (Robin 15. 10.: „pozadí bílé, ne zelené nebo černé“) – vždy světlé */
  color-scheme: light;
  --bg: #FFFFFF; --card: #F5F6F4; --ink: #161A17; --muted: #66706A; --line: #E3E7E3;
  --accent: #161A17; --accent-ink: #FFFFFF; --sun: #FFC93C; --sun-deep: #F2AE1C; --warn: #B4471C;
  --ok-bg: #E2F2E7; --ok-ink: #1C5A36; --est-bg: #FFF1C9; --est-ink: #6B4A00; --unk-bg: #EEF0EE; --unk-ink: #4E5852;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: env(safe-area-inset-bottom); }
.top { position: sticky; top: 0; z-index: 2; background: var(--bg); display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 8px; align-items: center; font-weight: 700; letter-spacing: .2px; }
.daynav { display: flex; gap: 4px; align-items: center; }
.daynav button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 20px; }
main { max-width: 560px; margin: 0 auto; padding: 16px; display: grid; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
h2 { font-size: 15px; margin: 0 0 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
input, select, button { font: inherit; color: var(--ink); }
input, select { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
input[type=search] { width: 100%; }
button[type=submit] { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 0 16px; min-height: 44px; font-weight: 600; }
.totals .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.kcal { font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.kcal small { font-size: 16px; font-weight: 500; color: var(--muted); }
.daytype { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.macros div { background: var(--bg); border-radius: 10px; padding: 8px 10px; display: grid; }
.macros b { font-size: 20px; font-variant-numeric: tabular-nums; }
.macros span { font-size: 12px; color: var(--muted); }
.badge { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; letter-spacing: .4px; border-radius: 999px; padding: 3px 10px; }
.badge.OVERENO { background: var(--ok-bg); color: var(--ok-ink); }
.badge.ODHAD { background: var(--est-bg); color: var(--est-ink); }
.badge.NEZJISTENO { background: var(--unk-bg); color: var(--unk-ink); }
.results, .entries { list-style: none; margin: 8px 0 0; padding: 0; }
.results li button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 4px; display: grid; gap: 2px; }
.results li button small, .entries small { color: var(--muted); font-size: 13px; }
.picked { font-weight: 600; margin: 4px 0 8px; }
.picked small { display: block; font-weight: 400; color: var(--muted); }
.amount { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.amount input { min-width: 0; }
.preview { margin-top: 8px; color: var(--muted); font-size: 14px; min-height: 1.2em; font-variant-numeric: tabular-nums; }
.error { color: var(--warn); font-size: 14px; }
.entries li { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.entries li:last-child { border-bottom: 0; }
.entries .kc { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.entries .del { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 4px 0 0; text-decoration: underline; }
.empty { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.note { color: var(--muted); font-size: 13px; text-align: center; margin: 0; }
.acct label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.amount.two { grid-template-columns: 1fr auto; }
#login-btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 0 16px; min-height: 44px; font-weight: 600; }
.acct-in { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); padding: 0 4px; }
.acct-in b { color: var(--ink); font-weight: 600; word-break: break-all; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 14px; padding: 4px 0; }
.status { margin: 0; font-size: 14px; color: var(--ok-ink); min-height: 0; }
.status:empty { display: none; }
.status.err { color: var(--warn); }
[hidden] { display: none !important; }
.dayinfo { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.dayinfo:empty { display: none; }
.note2 { font-size: 12px; }
#imp-open { justify-self: center; }
#imp-file { width: 100%; margin: 8px 0; }
.tablewrap { overflow-x: auto; margin: 8px 0; }
table.imp { border-collapse: collapse; font-size: 13px; width: 100%; font-variant-numeric: tabular-nums; }
table.imp th, table.imp td { text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.imp th { color: var(--muted); font-weight: 600; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 0 16px; min-height: 44px; font-weight: 600; width: 100%; }

.hint { font-size: .85rem; opacity: .7; margin: .3rem 0 0; }
#new-food { display: grid; gap: .5rem; margin-top: .6rem; }
.nf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.nf-grid label { display: grid; gap: .2rem; font-size: .8rem; opacity: .85; }
.sources summary { cursor: pointer; font-weight: 600; }
.sources li { font-size: .82rem; margin: .3rem 0; opacity: .85; }
.tag-ref { font-size: .72rem; opacity: .7; }

.country { display: flex; align-items: center; gap: 8px; }
.country select { min-height: 36px; padding: 4px 8px; font-size: .9rem; }
.other { opacity: .75; }

.sent { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.sent textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; min-height: 44px; }
.sent-list { list-style: none; padding: 0; margin: 8px 0 0; }
.sent-list li { border-bottom: 1px solid var(--line); padding: 8px 0; display: grid; gap: 4px; }
.sent-list .sent-head { display: flex; justify-content: space-between; gap: 8px; }
.sent-list select { width: 100%; min-height: 40px; }
.sent-list small { color: var(--muted); font-size: 13px; }
.sent-list small.err { color: #c0392b; }
.sent-list .link { justify-self: start; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 0 16px; min-height: 44px; font-weight: 600; }
.primary:disabled { opacity: .5; }

#hist summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 8px; }
#hist summary::-webkit-details-marker { display: none; }
#hist summary::before { content: '▸'; color: var(--muted); }
#hist[open] summary::before { content: '▾'; }
h2.inline { display: inline; margin: 0; }
.hist { list-style: none; padding: 0; margin: 8px 0 0; }
.hist li button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 2px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; color: var(--ink); font: inherit; }
.hist li button small { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.hist .kc { font-weight: 600; }
.hist .month { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 2px 2px; }
#hist-chart svg { width: 100%; height: auto; display: block; margin-top: 8px; }
#hist-chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; }
#hist-chart .dot { fill: var(--accent); }
#hist-chart text { fill: var(--muted); font-size: 11px; }
#hist-chart .grid { stroke: var(--line); }

.journal { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.journal h3 { font-size: 16px; margin: 4px 0 6px; }
.journal h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 4px; }
.journal p { margin: 0 0 6px; }
.journal .jt { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0 8px; }
.journal .jt td { border-bottom: 1px solid var(--line); padding: 4px 6px 4px 0; vertical-align: top; }
.journal .jt tr:first-child td { font-weight: 600; }
.journal .tw { overflow-x: auto; }
.journal .src { font-size: 12px; color: var(--muted); margin-top: 10px; }

.dayform { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.dayform label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.dayform .wide { grid-column: 1 / -1; }
.dayform button { grid-column: 1 / -1; }
.dayform .error { grid-column: 1 / -1; margin: 0; }
.noteform { display: grid; gap: 8px; }
.noteform textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; }
.mynotes { list-style: none; padding: 0; margin: 8px 0 0; }
.mynotes li { border-bottom: 1px solid var(--line); padding: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mynotes small { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.dayform label, .dayform input { min-width: 0; }
.dayform input { width: 100%; box-sizing: border-box; }

.tdee { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.tdee .big { font-size: 28px; font-weight: 700; }
.tdee small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }

.safety { border: 2px solid var(--warn); }
.safety h2 { color: var(--warn); }
.safety p { margin: 6px 0; }
.safety-tel { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.safety-tel a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; background: var(--warn); color: #fff; font-weight: 700; text-decoration: none; }
.safety .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.safety .row button { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.stopka-card { border: 2px solid var(--accent); }
body.stopka .kcal, body.stopka .macros, body.stopka #t-label, body.stopka #food-card, body.stopka #hist-card,
body.stopka #df-weight-l, body.stopka .entries .kc, body.stopka .entries small, body.stopka #dayinfo, body.stopka #daynote,
body.stopka #journal, body.stopka #plan-card { display: none !important; }
#safety, #stopka-card { scroll-margin-top: 130px; }

.kouc-log { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.kouc-log > li { padding: 10px 12px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.kouc-log > .q { background: var(--bg); border: 1px solid var(--line); justify-self: end; max-width: 90%; }
.kouc-log > .a { background: color-mix(in srgb, var(--accent) 10%, transparent); max-width: 95%; }
.kouc-log .meta { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.kouc-prop { border: 1px dashed var(--accent); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.kouc-prop ul { margin: 0; padding-left: 18px; }
.kouc-prop .row { display: flex; gap: 8px; flex-wrap: wrap; }
.kouc-prop button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; }
.kouc-prop button.link { background: none; color: var(--muted); font-weight: 400; }

.close-day { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.close-day summary { cursor: pointer; font-weight: 600; }
.close-day fieldset { border: 0; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.close-day fieldset label { display: flex; gap: 8px; align-items: center; min-height: 36px; }
.close-day .cd-q { display: grid; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.close-day .primary { width: 100%; }

.favs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.favs:empty { display: none; }
.fav { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); overflow: hidden; }
.fav button { border: 0; background: none; color: var(--ink); font: inherit; min-height: 36px; padding: 0 10px; }
.fav .x { color: var(--muted); padding: 0 10px 0 4px; }

.lifts { margin-top: 10px; }
.lifts summary, .lift summary { cursor: pointer; }
.lifts summary { font-weight: 600; }
.lift { border-bottom: 1px solid var(--line); padding: 6px 0; }
.lift summary { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.lift summary small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.lift ol { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.day-lifts table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.day-lifts th { text-align: left; color: var(--muted); font-weight: 400; }
.day-lifts td, .day-lifts th { border-bottom: 1px solid var(--line); padding: 4px 6px 4px 0; }
body.stopka .day-lifts, body.stopka #lifts { display: none !important; }

.day-lifts { overflow-x: auto; }
.lift summary > * { min-width: 0; overflow-wrap: anywhere; }
main > * { min-width: 0; }
.lift-tips { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .85rem; color: var(--muted); }
.deload { margin: .5rem 0; padding: .45rem .6rem; border-radius: 8px; font-size: .9rem; background: var(--est-bg); color: var(--est-ink); }
.deload.planovat { background: var(--unk-bg); color: var(--unk-ink); }
.lift .next { margin: .3rem 0; font-size: .88rem; }
.lift .next.pridat { color: var(--ok-ink); font-weight: 600; }
.plan-now p { margin: .25rem 0; }
.plan-now table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: .3rem 0; }
.plan-now td, .plan-now th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.plan-now tr.today td { font-weight: 700; }
.plan-today { font-size: .95rem; }
.plan-today .bad { color: var(--warn); }
.plan-pending { margin: .5rem 0; padding: .5rem .6rem; border-radius: 10px; background: var(--est-bg); color: var(--est-ink); }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: .5rem 0; }
.plan-grid label, .plan-edit label.wide { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.plan-grid input, .plan-grid select { width: 100%; min-width: 0; }
.plan-edit label.wide input { width: 100%; }
.plan-edit button { margin-top: 8px; }
.dogs { margin: .4rem 0; }
.dog { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.dog b { margin-right: .4rem; }
.dog .st { font-size: .75rem; padding: 2px 6px; border-radius: 6px; background: var(--unk-bg); color: var(--unk-ink); }
.dog .st.aktivovan { background: var(--est-bg); color: var(--est-ink); font-weight: 700; }
.dog .st.neaktivni { background: var(--ok-bg); color: var(--ok-ink); }
.dog p { margin: .25rem 0 0; font-size: .88rem; }
.dog small { color: var(--muted); display: block; margin-top: 2px; }
.rev-list { list-style: none; padding: 0; margin: .3rem 0; }
.rev-list li { padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.rev-list li.due { background: var(--est-bg); color: var(--est-ink); padding: .45rem .5rem; border-radius: 8px; }
.rev-list li.done { opacity: .6; }
.rev-list small { display: block; color: inherit; opacity: .85; }
.rev-list .row { display: flex; gap: 8px; margin-top: 4px; }
#rev-form label.wide { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); margin-top: 6px; }
#rev-form label.wide input { width: 100%; }
.screen-card fieldset { border: 0; padding: 0; margin: .6rem 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.screen-card legend { font-weight: 600; margin-bottom: 4px; padding: 0; width: 100%; }
.screen-card fieldset input:not([type]) , .screen-card fieldset input[autocomplete] { width: 100%; }
.screen-card label { display: inline-flex; gap: 6px; align-items: center; }
.screen-card .plan-grid label { display: grid; }
#sc-result p { margin: .4rem 0; }
.morning { margin: .6rem 0; }
.morning .ms-alk { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; margin: .4rem 0; }
.morning button { margin-top: 6px; }
body.stopka #ms-pas, body.stopka label:has(#ms-pas) { display: none !important; }
.cd-done { margin: .5rem 0 0; padding: .45rem .6rem; border-radius: 8px; background: var(--ok-bg); color: var(--ok-ink); font-size: .92rem; }
/* ---- jednoduchá obrazovka: Dnes + Kouč nahoře, ruční zápis sbalený ---- */
.today .td-kcal { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.today .td-bar { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.today .td-bar span { display: block; height: 100%; background: var(--accent); border-radius: 6px; width: 0; transition: width .3s; }
.today .td-bar.over span { background: var(--warn); }
.today .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.today .chip { font-size: 13px; padding: 4px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
#kouc-card .composer textarea { min-height: 28px; }
.manual > summary { cursor: pointer; list-style: none; }
.manual > summary::-webkit-details-marker { display: none; }
.manual > summary::before { content: "▸ "; color: var(--muted); }
.manual[open] > summary::before { content: "▾ "; }
.manual > section.card { border: 0; background: none; padding: 12px 0 0; border-top: 1px solid var(--line); border-radius: 0; margin-top: 12px; }
body.stopka #today-card { display: none !important; }
.today .td-bal { margin: 6px 0 0; padding: 6px 9px; border-radius: 8px; background: var(--est-bg); color: var(--est-ink); font-size: 14px; }
.a3 { margin: .5rem 0; }
.a3 label.wide { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.a3 select, .a3 label.wide select { width: 100%; min-width: 0; }
.a3 .a3-z { display: flex; gap: 8px; align-items: center; font-size: .88rem; margin: .4rem 0; }
.a3-steps { font-size: .85rem; padding-left: 1.2rem; margin: .5rem 0; }
.a3-steps li { margin: 2px 0; }
.start-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 8px; }
.start-steps li.done { opacity: .55; }
.start-steps li.done b::after { content: " ✔"; color: var(--ok-ink); }
body.stopka #start-card { display: none !important; }
.eval-list { font-size: .82rem; padding-left: 1rem; margin: .4rem 0; word-break: break-word; }
.kouc-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.kouc-row #kouc-send { flex: 1; }
.kouc-row .cam { display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; white-space: nowrap; min-height: 44px; }
.kouc-thumb { position: relative; display: inline-block; }
.kouc-thumb img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.kouc-thumb .x { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; font-size: 14px; line-height: 1; }

/* ================= CHAT JAKO HLAVNÍ OBRAZOVKA (Robin 15. 10.: „jako u Clauda“) ================= */
.off { display: none !important; }
.splash { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 10px; background: #FFFFFF; transition: opacity .35s ease; overflow: hidden; }
.splash.out { opacity: 0; pointer-events: none; }
.splash { cursor: pointer; }
.sp-film { display: block; width: min(340px, 88vw); aspect-ratio: 4 / 3; object-fit: contain; background: #FFFFFF; pointer-events: none; }
/* nápis: tučně „dagvis“ + tenký proužek se žlutou výplní (jako proužek Dnes) */
.wm { display: inline-grid; line-height: 1; color: var(--ink); }
/* DAGVIS velkými: písmena od nejtučnějšího D po nejtenčí S (Robin 15. 10.) */
.wm-t { display: inline-flex; letter-spacing: .04em; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wm-t .wl { display: inline-block; }
.wm i { display: block; height: 3px; border-radius: 3px; background: var(--line); margin-top: 3px; overflow: hidden; position: relative; }
.wm i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 62%; background: var(--sun); border-radius: 3px; }

.top { flex-wrap: nowrap; padding: 10px 12px; }
.iconbtn { width: 40px; height: 40px; min-height: 40px; border: 0; background: none; color: var(--ink); border-radius: 10px; display: inline-grid; place-content: center; gap: 5px; font-size: 22px; padding: 0; cursor: pointer; }
#menu-btn span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
#menu-btn span:nth-child(2) { width: 14px; }
.brand { border: 0; background: none; color: var(--ink); font: inherit; font-size: 21px; padding: 0; cursor: pointer; margin-right: auto; display: flex; gap: 8px; align-items: center; }
.daynav input[type=date] { max-width: 132px; padding: 6px 8px; min-height: 36px; }

.drawer { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(82vw, 320px); background: var(--card); border-right: 1px solid var(--line);
  padding: max(14px, env(safe-area-inset-top)) 10px 14px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; transform: translateX(-102%); transition: transform .22s ease; }
.drawer.open { transform: none; }
.drawer[hidden] { display: flex; }
.drawer-head { display: flex; gap: 10px; align-items: center; padding: 6px 10px 16px; font-size: 22px; }
.drawer button { text-align: left; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; padding: 12px 12px; border-radius: 10px; min-height: 46px; cursor: pointer; }
.drawer button.on { background: var(--card); font-weight: 650; box-shadow: inset 3px 0 0 var(--sun); }
.drawer-bg { position: fixed; inset: 0; z-index: 39; background: rgb(22 26 23 / .28); }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }

.panel-head { display: none; align-items: center; gap: 6px; margin: -4px 0 2px; }
.panel-head h1 { font-size: 20px; margin: 0; letter-spacing: -.02em; }
body[data-view]:not([data-view="chat"]):not([data-view="all"]) .panel-head { display: flex; }

/* chat: proužek Dnes nahoře, rozhovor, psaní dole */
body[data-view="chat"] main { padding-bottom: 130px; gap: 10px; }
body[data-view="chat"] #today-card { padding: 10px 14px; cursor: pointer; }
body[data-view="chat"] #today-card h2, body[data-view="chat"] #today-card #td-sub { display: none; }
body[data-view="chat"] #today-card .td-kcal { font-size: 18px; }
body[data-view="chat"] #today-card .td-bar { margin: 6px 0 2px; height: 6px; }
body[data-view="chat"] #today-card .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: 6px; }
body[data-view="chat"] #today-card .chip { white-space: nowrap; font-size: 12px; }
body[data-view="chat"] #kouc-card { background: none; border: 0; padding: 0; }
body[data-view="chat"] #kouc-card > h2 { display: none; }
.kouc-empty { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 18px 4px; }
.kouc-empty span { font-size: 14px; opacity: .85; }
body[data-view="chat"] .composer { position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 5; margin: 0 auto; max-width: 540px;
  padding: 8px 8px 8px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 -8px 24px var(--bg); }
.composer textarea { width: 100%; resize: none; min-height: 28px; max-height: 160px; border: 0; background: none; padding: 6px 2px; font-size: 16px; line-height: 1.4; outline: none; }
.composer textarea:focus-visible { outline: none; }
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.composer .kouc-row { margin-top: 2px; }
.composer #kouc-send { flex: 0 0 auto; width: 40px; height: 40px; min-height: 40px; border-radius: 50%; padding: 0; font-size: 19px; font-weight: 800; margin-left: auto; }
.composer .cam { width: 40px; height: 40px; min-height: 40px; border-radius: 50%; justify-content: center; font-size: 22px; padding: 0; margin-left: -6px; }
.composer .hint { margin: 0 0 4px; }
.composer .hint:empty { display: none; }

/* chat: zpráva klienta v šedé bublině vpravo, kouč vlevo s tenkým žlutým proužkem (náš motiv, ne kopie) */
.kouc-log > .q { background: var(--card); border: 0; border-radius: 18px 18px 4px 18px; padding: 10px 14px; }
.kouc-log > .a { background: none; border-radius: 0; padding: 2px 0 2px 14px; box-shadow: inset 3px 0 0 var(--sun); max-width: 100%; }
.kouc-prop { border: 1px solid var(--line); background: var(--bg); }
.kouc-prop button { background: var(--ink); color: #fff; }
.today .td-bar span { background: var(--sun); }
.today .td-bar.over span { background: var(--warn); }
.today .chip { background: var(--bg); }
body[data-view="chat"] #today-card { background: var(--bg); border: 1px solid var(--line); }
.composer #kouc-send { background: var(--sun); color: var(--ink); border: 0; }
.composer .cam { background: var(--card); border: 0; }
body[data-view="chat"] .composer { background: var(--bg); box-shadow: 0 -10px 28px #fff, 0 2px 10px rgb(22 26 23 / .06); }
/* hlavička se vejde i na 360 px */
.top { gap: 6px; }
.daynav { gap: 2px; min-width: 0; }
.daynav input[type=date] { min-width: 0; max-width: 128px; }
@media (max-width: 400px) {
  .brand img { display: none; }
  .daynav button { width: 32px; height: 34px; }
  .daynav input[type=date] { max-width: 118px; padding: 6px 4px; font-size: 14px; }
}

/* týdenní rozpis */
.rz-grid { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: end; }
.rz-grid label { margin: 0; }
.rz-typ select { min-width: 92px; }
