:root {
    --bg: #f2f3f5;
    --ink: #15181d;
    --muted: #6b7280;
    --line: #e4e6ea;
    --card: #ffffff;
    --accent: #ff5b2e;       /* athletický oranžovo-červený akcent */
    --accent2: #e8431a;
    --graphite: #1b1f26;     /* tmavá grafitová – „seriózní" plochy */
    --good: #16a34a;
    --warn: #d97706;
    --bad: #ef4444;
    --radius: 18px;
    --shadow: 0 10px 28px rgba(15, 18, 24, 0.10);
    --shadow-sm: 0 2px 8px rgba(15, 18, 24, 0.07);
    --tabbar-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 16px;
    font-weight: 600;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 8px 18px rgba(255, 91, 46, .28);
}
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-danger { color: var(--bad); border-color: #fecaca; background: #fef2f2; }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 16px; font-size: 17px; }

/* ---------- Auth ---------- */
body.auth { display: grid; place-items: center; padding: 24px; }
.auth-card {
    width: 100%; max-width: 400px;
    background: var(--card); border-radius: 24px;
    box-shadow: var(--shadow); padding: 32px 26px;
    border: 1px solid var(--line);
}
.logo { font-size: 26px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; justify-content: center; gap: 12px; }
.logo-mark { height: 58px; width: auto; display: block; }
.auth-sub { color: var(--muted); text-align: center; margin: 6px 0 22px; }
.auth-switch { text-align: center; color: var(--muted); margin-top: 18px; font-size: 15px; }
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 600; min-width: 0; }
.form input, .form select {
    border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px;
    font-size: 16px; color: var(--ink); background: #fff; width: 100%;
}
.form input:focus, .form select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 38%, transparent); border-color: var(--accent); }
.form select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    padding-right: 42px; font-weight: 600; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ff5b2e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.form select::-ms-expand { display: none; }
.hint { font-weight: 400; opacity: .7; }
.alert { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }

/* ---------- App shell ---------- */
body.app { padding-bottom: 28px; touch-action: manipulation; }
/* jemné plovoucí gradientové „bloby" v pozadí (dle grafiky) */
body.app::before, body.app::after { content: ''; position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; }
body.app::before { top: -170px; right: -130px; width: 380px; height: 380px; background: radial-gradient(circle at 50% 50%, rgba(255,91,46,.12), rgba(255,91,46,0) 68%); animation: floatBlob 16s ease-in-out infinite; }
body.app::after { top: 360px; left: -160px; width: 360px; height: 360px; background: radial-gradient(circle at 50% 50%, rgba(44,115,224,.09), rgba(44,115,224,0) 70%); animation: floatBlob 22s ease-in-out infinite; }
@keyframes floatBlob { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(0,-24px) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { body.app::before, body.app::after { animation: none; } }
.hamburger { width: 42px; height: 42px; border: none; background: #fff; box-shadow: var(--shadow-sm); border-radius: 12px; display: grid; place-items: center; color: var(--ink); }
.hamburger svg { width: 22px; height: 22px; }
.topbar-sp { width: 42px; }
/* avatar uživatele vpravo nahoře */
.avatar { position: relative; width: 42px; height: 42px; flex: 0 0 auto; border: none; border-radius: 50%; background: linear-gradient(150deg, #3a3f4b, #16181d); color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .5px; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.avatar:active { transform: scale(.93); }
.avatar-chev { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(20,22,28,.22); }
.avatar-chev svg { width: 11px; height: 11px; display: block; }
.icon-btn { width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); border-radius: 13px; font-size: 22px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:active { transform: scale(.96); }

/* hamburger menu (drawer) */
.menu-back { position: fixed; inset: 0; z-index: 60; background: rgba(15,23,42,.42); }
.menu { position: absolute; top: 0; left: 0; bottom: 0; width: 82%; max-width: 320px; background: #fff;
    box-shadow: 6px 0 30px rgba(0,0,0,.18); padding: calc(22px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: 4px; animation: menuIn .22s cubic-bezier(.22,1,.36,1); }
@keyframes menuIn { from { transform: translateX(-100%); } to { transform: none; } }
.menu-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 18px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; cursor: pointer; }
.menu-brand .brand-logo { height: 30px; }
.menu-nav { display: flex; flex-direction: column; gap: 4px; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border: none; background: none; border-radius: 14px; font-size: 16px; font-weight: 700; color: var(--ink); text-align: left; width: 100%; }
.menu-item .icn { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); }
.menu-item .icn svg { width: 23px; height: 23px; }
.menu-item.is-active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.menu-item.is-active .icn { color: var(--accent); }
.menu-item:active { background: #f1f5f9; }
.menu-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.menu-foot { display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 16px; background: #f7f8fa; margin-bottom: 4px; }
.menu-foot-ic { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; }
.menu-foot b { font-size: 16px; font-weight: 800; display: block; }
.menu-foot span { font-size: 12px; color: var(--muted); }
.menu-logout { color: var(--bad); }
.menu-logout .icn { color: var(--bad); }

/* uživatelské menu vpravo */
#userBack { background: rgba(15,23,42,.12); }
.usermenu { position: absolute; top: calc(58px + env(safe-area-inset-top)); right: 14px; width: 290px; max-width: calc(100vw - 28px); background: #fff; border-radius: 20px; padding: 10px; box-shadow: 0 24px 60px rgba(20,22,28,.24); animation: umIn .16s ease; }
@keyframes umIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.um-head { display: flex; align-items: center; gap: 13px; padding: 12px 12px 14px; }
.um-av { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(150deg, #3a3f4b, #16181d); color: #fff; font-size: 17px; font-weight: 800; display: grid; place-items: center; }
.um-id { min-width: 0; }
.um-id b { display: block; font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-id span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.um-div { height: 1px; background: var(--line); margin: 2px 8px 6px; }
.um-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 12px; border: none; background: none; border-radius: 13px; font-size: 15.5px; font-weight: 700; color: var(--ink); text-align: left; }
.um-item .icn { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); }
.um-item .icn svg { width: 22px; height: 22px; }
.um-item:active { background: #f4f5f7; }
.um-logout { color: var(--bad); }
.um-logout .icn { color: var(--bad); }
.um-pro { background: linear-gradient(120deg, rgba(255,91,46,.10), rgba(255,91,46,.03)); border: 1px solid rgba(255,91,46,.22); }
.um-pro:active { background: rgba(255,91,46,.16); }
.um-pro .icn { font-size: 20px; color: inherit; }
.um-pro-tx { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; }
.um-pro-tx b { font-size: 15px; font-weight: 800; }
.um-pro-st { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-pro .avatar-chev { position: static; background: none; box-shadow: none; border-radius: 0; width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); }
.um-pro .avatar-chev svg { width: 18px; height: 18px; }
.um-pro.is-pro { background: linear-gradient(120deg, rgba(34,170,110,.12), rgba(34,170,110,.03)); border-color: rgba(34,170,110,.25); }
.um-pro.is-pro .um-pro-st { color: #1f9e63; }
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 18px; padding-top: calc(9px + env(safe-area-inset-top));
    background: rgba(242, 243, 245, .85); backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; border: none; background: none; color: var(--ink); padding: 4px 8px; cursor: pointer; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand:active { transform: scale(.96); }
.logout { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); color: var(--muted); font-size: 18px; }
.view { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 12px 16px 28px; }
@media (min-width: 920px) { .view { max-width: 980px; padding: 22px 24px 32px; } }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }

.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
}
.tab { border: none; background: none; color: var(--muted); font-size: 11px; font-weight: 600; display: grid; gap: 3px; justify-items: center; align-content: center; }
.tab span { font-size: 21px; line-height: 1; }
.tab.is-active { color: var(--accent); }

/* ---------- Kalendář historie ---------- */
.hist-nav { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.hist-arrow { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm); font-size: 22px; color: var(--ink); display: grid; place-items: center; }
.hist-arrow:active { transform: scale(.94); }
.hist-month { flex: 1; text-align: center; font-size: 18px; font-weight: 700; color: var(--ink); }
.cal-month { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 14px; margin-bottom: 14px; }
.cal-foot { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 10px; }
.lh-chip .ic, .beat-main .ic { font-style: normal; }
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; }
.cal-dow span { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-cell { aspect-ratio: 1 / 1; min-width: 0; display: grid; place-items: center; position: relative; border: none; background: #f6f7f9;
    border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; }
.cal-cell.empty { background: none; }
.cal-cell.today { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.cal-cell.has { background: var(--accent); color: #fff; font-weight: 800; box-shadow: 0 3px 8px rgba(255,91,46,.30); }
.cal-cell.has:active { transform: scale(.93); }
.cal-dot { position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.9); }

/* ---------- Headings ---------- */
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 18px; }
.set-list { display: block; }
.set-group { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 20px 6px 8px; }
.set-group:first-child { margin-top: 6px; }
.set-sec { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); margin-bottom: 10px; overflow: hidden; }
.set-sec > summary { list-style: none; cursor: pointer; padding: 14px 15px; display: flex; align-items: center; gap: 13px; }
.set-sec > summary:active { background: #f4f5f7; }
.set-sec > summary::-webkit-details-marker { display: none; }
.set-sec > summary::after { content: ''; margin-left: auto; flex: 0 0 auto; width: 9px; height: 9px; border-right: 2.5px solid #b9bec8; border-bottom: 2.5px solid #b9bec8; transform: translateY(-1px) rotate(-45deg); transition: transform .18s ease; }
.set-sec[open] > summary::after { transform: translateY(-2px) rotate(45deg); }
.set-sec[open] > summary { border-bottom: 1px solid var(--line); }
.ss-ic { font-size: 20px; width: 26px; text-align: center; flex: 0 0 auto; }
.ss-tx { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.ss-tx b { font-size: 15.5px; font-weight: 750; letter-spacing: -.01em; }
.ss-tx small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-sec .card { border: none; box-shadow: none; border-radius: 0; }
.set-sec .card + .card { border-top: 1px solid var(--line); }
.sub-status { display: flex; flex-direction: column; gap: 1px; padding: 12px 14px; border-radius: 12px; background: #f4f6f9; margin-bottom: 12px; }
.sub-status b { font-size: 15px; font-weight: 800; }
.sub-status span { font-size: 13px; color: var(--muted); }
.sub-status.is-pro { background: rgba(34,170,110,.10); } .sub-status.is-pro span { color: #1f9e63; }
.sub-status.is-trial { background: rgba(255,91,46,.09); } .sub-status.is-trial span { color: var(--accent); }
.quick-add { display: flex; gap: 8px; }
.qa { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--line); background: var(--card); border-radius: 14px; box-shadow: var(--shadow-sm); }
.qa:active { transform: translateY(1px) scale(.97); }
.qa-ic { font-size: 22px; line-height: 1; }
.qa-l { font-size: 12px; font-weight: 800; color: var(--ink); }
/* rozbalovací „Záznamy" (Váha / Pohyb / Historie) */
.rec-sec { margin-top: 18px; }
.rec-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 4px; font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rec-sec > summary::-webkit-details-marker { display: none; }
.rec-sec > summary::after { content: ''; flex: 0 0 auto; margin-left: auto; width: 10px; height: 10px; margin-right: 4px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .18s ease; }
.rec-sec[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.rec-sec .rec-n { background: #eef1f6; color: var(--ink); border-radius: 999px; padding: 1px 9px; font-size: 12px; letter-spacing: 0; }
.subnav { display: flex; gap: 6px; background: #eef1f6; border-radius: 12px; padding: 4px; margin: 6px 0 14px; }
.subnav-b { flex: 1; border: none; background: none; border-radius: 9px; padding: 9px 8px; font-size: 13.5px; font-weight: 800; color: var(--muted); }
.subnav-b.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.section-title { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 26px 4px 12px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; }
.card + .card { margin-top: 12px; }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 920px) { .tiles { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* kompaktní výběr partií – všechny na jednu obrazovku bez rolování */
.tiles-compact { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tiles-compact .tile-muscle { padding: 6px 3px 7px; border-radius: 15px; }
.tiles-compact .tile-muscle .ill-wrap { aspect-ratio: 1 / 1; }
.tiles-compact .ill-img { filter: drop-shadow(0 4px 5px rgba(11,27,51,.20)); }
.tiles-compact .t-label { font-size: 12px; margin-top: 2px; }
.tile {
    position: relative; border: none; border-radius: 24px;
    padding: 14px 8px 14px; text-align: center; overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease;
    display: grid; justify-items: center; align-content: center; gap: 6px;
    color: #fff; min-height: 178px;
    background: var(--c, var(--accent));
    background: linear-gradient(155deg, var(--c, var(--accent)) 0%, color-mix(in srgb, var(--c, var(--accent)) 68%, #000) 100%);
    box-shadow: var(--shadow-sm);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--c, var(--accent)) 30%, transparent);
}
.tile::after { /* jemný horní lesk */
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,.22), transparent 60%);
}
.tile:active { transform: scale(.96); }
.tile.is-selected { box-shadow: 0 0 0 3px #fff, 0 10px 22px color-mix(in srgb, var(--c, var(--accent)) 45%, transparent); }
.ill-wrap { height: 120px; display: grid; place-items: center; position: relative; z-index: 1; }
.ill { display: block; filter: drop-shadow(0 3px 6px rgba(0,0,0,.18)); }
.ill-ex { width: 108px; height: 108px; }
/* partie – bílá vzdušná karta, průhledná postava + stín */
.tile-muscle { position: relative; min-height: 0; border: 1px solid var(--line); border-radius: 22px; overflow: visible; padding: 12px 8px 12px;
    background: #fff; box-shadow: var(--shadow-sm); display: grid; justify-items: center; align-content: start; gap: 8px; }
.tile-muscle::after { display: none; }
.tile-muscle .ill-wrap { position: relative; inset: auto; width: 100%; aspect-ratio: 1 / 1.1; height: auto; display: grid; place-items: center; z-index: 1; }
.tile-muscle .t-label { position: static; margin: 0; text-align: center; color: #1f2733; font-weight: 800; font-size: 15px; text-shadow: none; }
.tile-muscle.is-selected { box-shadow: 0 0 0 3px var(--c, var(--accent)), var(--shadow); border-color: transparent; }
.tile-muscle .check { background: var(--c, var(--accent)); color: #fff; top: 10px; right: 10px; }
.ill-body { width: auto; height: 100%; max-height: 100%; filter: drop-shadow(0 8px 9px rgba(11,27,51,.20)); }
.ill-img { position: static; inset: auto; width: 100%; height: 100%; object-fit: contain; z-index: 1; filter: drop-shadow(0 9px 9px rgba(11,27,51,.24)); }
.t-label { font-weight: 700; font-size: 14px; line-height: 1.15; color: #fff; position: relative; z-index: 1; text-shadow: 0 1px 3px rgba(0,0,0,.22); }
.tile .check { position: absolute; top: 9px; right: 9px; width: 23px; height: 23px; border-radius: 50%; background: #fff; color: var(--c, var(--accent)); font-size: 13px; font-weight: 800; display: none; place-items: center; box-shadow: var(--shadow-sm); z-index: 2; }
.tile.is-selected .check { display: grid; }
.tile-add { background: #f4f8fc; color: var(--muted); box-shadow: var(--shadow-sm); border: 1.5px dashed #cbd5e1; }
.tile-add::after { display: none; }
.tile-add .ill-wrap { font-size: 34px; font-weight: 200; color: var(--c, var(--muted)); }

/* cvik jako fotka */
.tile-ex { padding: 0; min-height: 150px; overflow: hidden; position: relative; background: #1f242c; display: block; }
.tile-ex::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 58%; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.35) 55%, transparent); z-index: 1; }
.ex-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.ex-chip { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 8px; background: var(--c, var(--accent)); z-index: 2; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.ex-label { position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 2; text-align: left; font-size: 12.5px; line-height: 1.18; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.tile-ex.is-selected { box-shadow: 0 0 0 3px var(--c, var(--accent)); }
.ex-ill-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-add .t-label { color: var(--muted); text-shadow: none; }

/* výběr cviku – kompaktní vzdušný seznam (bez obrázků) */
.ex-list { display: flex; flex-direction: column; background: var(--card);
    border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.ex-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    background: none; border: none; border-top: 1px solid var(--line); padding: 12px 14px; }
.ex-row:first-child { border-top: none; }
.ex-row:active { background: #f1f5f9; }
.ex-row-name { flex: 1; font-weight: 600; font-size: 15px; color: var(--ink); line-height: 1.25; }
.ex-uses { flex: 0 0 auto; font-size: 11px; font-weight: 800; color: var(--accent);
    background: color-mix(in srgb, var(--accent) 13%, transparent); padding: 2px 8px; border-radius: 999px; }
.ex-row-add { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
    background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent); color: var(--c, var(--accent)); font-weight: 700; font-size: 17px; }
.ex-row-new .ex-row-add { display: none; }
.ex-row-new .ex-row-name { color: var(--c, var(--accent)); font-weight: 700; }
.ex-subhead { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); padding: 13px 14px 6px; background: #f8fafc; border-top: 1px solid var(--line); }
.ex-row:first-child, .ex-subhead:first-child { border-top: none; }

/* malá ilustrace v kartě cviku / řádku */
.ex-ill { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden;
    background: linear-gradient(155deg, var(--c, var(--accent)), color-mix(in srgb, var(--c, var(--accent)) 68%, #000)); }
.ex-ill .ill { width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.18)); }

/* ---------- Spodní plovoucí zápisník (dock) ---------- */
.dock-backdrop { position: fixed; inset: 0; z-index: 38; background: rgba(15,18,24,.22); pointer-events: none; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dock { position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40; max-width: 600px; margin: 0 auto;
    background: var(--card); border: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 18px 50px rgba(15,18,24,.30);
    padding: 10px 12px 12px; }
.dock-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.dock-title { flex: 1; min-width: 0; font-size: 13.5px; color: var(--muted); font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-title b { color: var(--ink); }
.dock-close { flex: 0 0 auto; width: 32px; height: 32px; border: none; border-radius: 50%;
    background: #eef2f7; color: #64748b; font-size: 15px; font-weight: 700; display: grid; place-items: center; }
.dock-close:active { transform: scale(.92); background: #e2e8f0; }
.dock-sets { max-height: 16vh; overflow-y: auto; -webkit-overflow-scrolling: touch; margin-bottom: 4px; }
.dock-sets .set-row { padding: 5px 0; }
.dock-sets .set-row:first-child { border-top: none; }
.dock-empty { text-align: center; color: var(--muted); font-size: 12.5px; padding: 6px 4px; }
.dock-addex { margin-top: 7px; padding: 9px; background: #f1f5f9; border: none; color: var(--accent); font-weight: 800; font-size: 14px; }
/* porovnání s minulým tréninkem – jemné podbarvení */
.set-row.cmp-up { background: color-mix(in srgb, var(--good) 14%, transparent); }
.set-row.cmp-down { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.set-row.cmp-eq { background: #f1f2f4; }
.set-row.is-editing { background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 8px; }
.cancel-edit { display: block; width: 100%; margin-top: 8px; padding: 9px; border: none; background: none;
    color: var(--muted); font-weight: 700; font-size: 13.5px; }

/* karta cviku v přehledu (ťuknutí aktivuje, série read-only) */
.ex-card.is-active { border-color: var(--c, var(--accent)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--accent)) 35%, transparent); }
.ex-card[data-act] { cursor: pointer; }
.ex-go { color: #cbd5e1; font-size: 20px; font-weight: 700; flex: 0 0 auto; }
.ex-active-badge { flex: 0 0 auto; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
    color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent); padding: 3px 8px; border-radius: 999px; }
.ex-sets-ro { margin-top: 4px; }
.set-row.ro { grid-template-columns: 28px 1fr 1fr 26px; }

/* ---------- Workout / exercise list ---------- */
.ex-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 14px 8px; margin-bottom: 12px; }
.ex-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ex-bar { width: 6px; align-self: stretch; border-radius: 6px; background: var(--c, var(--accent)); }
.ex-name { font-weight: 700; font-size: 16px; flex: 1; }
.ex-group { font-size: 12px; color: var(--muted); }
.ex-setcount { color: var(--accent); font-weight: 700; }
.ex-del { background: none; border: none; color: #cbd5e1; font-size: 20px; padding: 4px 6px; }
.ex-head { cursor: pointer; }
.ex-caret { color: var(--muted); font-size: 18px; flex: 0 0 auto; transition: transform .18s ease; transform: rotate(0deg); }
.ex-card.is-open .ex-caret { transform: rotate(180deg); }

/* sbalitelný zapisovač – šetří místo u již přidaných cviků */
.logger-wrap { display: none; }
.ex-card.is-open .logger-wrap { display: block; }
.ex-logtoggle { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 1px dashed var(--line);
    background: #f8fafc; border-radius: 12px; color: var(--accent); font-weight: 700; font-size: 14px; }
.ex-card.is-open .ex-logtoggle { display: none; }

.last-hint { margin: 2px 0 10px; }

/* inline ikona (činka / opakování) */
.bi { width: 15px; height: 15px; vertical-align: -2.5px; }

/* motivační „překonej minule" banner */
.beat { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent);
    border-radius: 12px; padding: 9px 11px; box-shadow: var(--shadow-sm); }
.beat-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); display: flex; gap: 6px; align-items: center; }
.beat-fire { font-size: 13px; }
.beat-date { margin-left: auto; color: var(--muted); font-weight: 700; text-transform: none; letter-spacing: 0; }
.beat-rows { display: flex; flex-direction: column; gap: 2px; margin-top: 7px; }
.beat-r { display: flex; align-items: center; gap: 10px; }
.beat-lbl { flex: 0 0 42px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.beat-vals { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.beat-v { display: inline-flex; align-items: center; gap: 5px; font-size: 14.5px; font-weight: 800; color: var(--ink); }
.beat-v .bi { color: var(--muted); }
.beat-or { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.beat-goal .beat-lbl { color: var(--accent); }
.beat-goal .beat-v { color: var(--accent); }
.beat-goal .beat-v .bi { color: var(--accent); }
.beat-sets { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 5px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); scrollbar-width: none; }
.beat-sets::-webkit-scrollbar { display: none; }
.lh-chip { background: #f6f7f9; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: 12px; color: var(--ink); font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.lh-chip .bi-w, .lh-chip .bi-r { display: inline-flex; color: var(--muted); }
.lh-chip .bi-w { margin-right: 1px; }
.lh-chip .bi-r { margin-left: 3px; }

/* analýza statistik */
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.an { background: #f6f7f9; border-radius: 12px; padding: 10px 12px; }
.an-n { font-size: 18px; font-weight: 800; color: var(--ink); }
.an-l { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.25; }
.an-text { font-size: 13.5px; color: #374151; line-height: 1.5; margin: 10px 0 0; }
.an-text b { color: var(--ink); }
.an-note { font-size: 12px; color: var(--muted); background: #f6f7f9; border-radius: 10px; padding: 9px 11px; }

.set-row { display: grid; grid-template-columns: 28px 1fr 1fr auto 22px 26px; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px dashed var(--line); cursor: pointer; }
.set-row:active { background: #f8fafc; }
.set-row .sn { color: var(--muted); font-weight: 700; font-size: 13px; text-align: center; }
.set-row .val { font-weight: 700; }
.set-row .val small { color: var(--muted); font-weight: 500; }
.set-row .sedit { color: #cbd5e1; font-size: 14px; text-align: center; }
.set-row .sdel { background: none; border: none; color: #cbd5e1; font-size: 16px; }

/* ---------- Logger: rolovací kolečko (váha / opakování) ---------- */
.logger { margin-top: 8px; }
.wmode { display: flex; gap: 5px; background: #f1f5f9; border-radius: 11px; padding: 3px; }
.wmode-b { flex: 1; border: none; background: none; padding: 7px 4px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.wmode-b.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.10); }

.wheels { position: relative; display: flex; gap: 8px; margin-top: 8px; }
.wheelbox { position: relative; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; padding-top: 5px; }
.wb-weight { flex: 1.7; }
.wb-rep { flex: 1; }
.wpair { display: flex; gap: 8px; }
.wpair .wheel { flex: 1; } /* int i des stejně široké → ',' přesně na rozhraní */
.wsep { position: absolute; left: 50%; transform: translateX(-50%); bottom: 44px; height: 40px; line-height: 40px;
    font-size: 22px; font-weight: 800; color: var(--ink); z-index: 3; pointer-events: none; }

/* režim „vlastní (tělesná) váha“ */
.wbody { display: none; position: relative; z-index: 4; flex: 1.7; background: #f8fafc; border: 1px solid var(--line);
    border-radius: 14px; padding: 12px; align-items: center; gap: 10px; }
.wbody-ic { font-size: 30px; }
.wbody-f label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.wbody-in { display: flex; align-items: baseline; gap: 4px; }
.wbody-in input { width: 80px; border: none; border-bottom: 2px solid var(--accent); background: none; font-size: 26px; font-weight: 800; color: var(--ink); }
.wbody-in input:focus { outline: none; }
.wbody-in span { font-weight: 700; color: var(--muted); }
.wheels.mode-telo .wb-weight { display: none; }
.wheels.mode-telo .wheel-band { display: none; }
.wheels.mode-telo .wbody { display: flex; }
.wlab { text-align: center; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 1px; }
.wheel {
    height: 128px; overflow-y: scroll; scroll-snap-type: y mandatory;
    padding-block: 44px; /* (128-40)/2 = 44 → vybraná položka je na středu */
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
            mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
}
.wheel::-webkit-scrollbar { display: none; }
.wheel-item {
    height: 40px; line-height: 40px; scroll-snap-align: center;
    text-align: center; font-size: 21px; font-weight: 800; color: var(--ink);
}
/* středový pásek přes obě kolečka (střed = 64px ode dna, pásek 40px) */
.wheel-band {
    position: absolute; left: 6px; right: 6px; bottom: 44px;
    height: 40px; border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 9%, transparent);
    pointer-events: none;
}
/* tlačítko = živý náhled toho, co se uloží (žádné zvláštní „Uložit") */
.addbtn { display: block; width: 100%; margin-top: 10px; padding: 12px; border: none; border-radius: 13px;
    background: var(--accent); color: #fff; font-size: 15px; font-weight: 800; letter-spacing: -.01em; box-shadow: var(--shadow-sm); }
.addbtn:active { transform: scale(.99); }
.custom-weight { margin-top: 6px; background: #f8fafc; border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 13.5px; }

/* ---------- Stats / chart ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 4px; }
.stat { background: #f8fafc; border-radius: 12px; padding: 10px; text-align: center; }
.stat .n { font-size: 19px; font-weight: 800; }
.stat .l { font-size: 11px; color: var(--muted); }
.chart { width: 100%; height: auto; display: block; }
.chart-wrap { overflow: hidden; }
.trend-up { color: var(--good); } .trend-down { color: var(--bad); }

/* ---------- Misc rows ---------- */
.row-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); margin-bottom: 10px; }

/* swipe-to-delete (iOS styl) */
.swipe { position: relative; overflow: hidden; border-radius: 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); background: var(--bad); }
.swipe-del { position: absolute; top: 0; right: 0; bottom: 0; width: 84px; border: none; background: var(--bad); color: #fff; font-size: 22px; display: grid; place-items: center; }
.swipe-content { position: relative; transform: translateX(0); transition: transform .18s ease; touch-action: pan-y; background: var(--card); }
.swipe-content.row-item { margin: 0; border: none; border-radius: 0; box-shadow: none; }

/* karta tréninku v přehledu „Poslední tréninky" / historii */
.swipe-content.wk-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--card); }
.wk-cal { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; align-content: center;
    background: color-mix(in srgb, var(--accent) 12%, #fff); }
.wk-cal-d { font-size: 19px; font-weight: 800; color: var(--accent); line-height: 1; }
.wk-cal-m { font-size: 9.5px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; margin-top: 2px; }
.wk-row-main { flex: 1; min-width: 0; }
.wk-row-title { font-weight: 700; font-size: 15px; text-transform: capitalize; }
.wk-row-stats { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.wg-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.wg-chip { font-size: 11.5px; font-weight: 700; color: var(--ink); background: #f3f4f6; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px 2px 7px; display: inline-flex; gap: 5px; align-items: center; }
.wg-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gc, var(--muted)); flex: 0 0 auto; }
.wg-chip b { color: var(--accent); font-weight: 800; }
.wk-row .ri-val { font-weight: 800; color: #cbd5e1; align-self: center; }
.wk-trash { flex: 0 0 auto; align-self: center; border: none; background: none; font-size: 18px; padding: 8px 6px; opacity: .55; }
.wk-trash:active { transform: scale(.9); opacity: 1; }

.date-edit { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.date-cal { font-size: 17px; opacity: .7; }
.row-item .ri-main { flex: 1; }
.row-item .ri-title { font-weight: 700; }
.row-item .ri-sub { font-size: 13px; color: var(--muted); }
.row-item .ri-val { font-weight: 800; color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .big { font-size: 40px; margin-bottom: 8px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mood-row { display: flex; gap: 8px; justify-content: space-between; }
.mood { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 0; font-size: 22px; }
.mood.is-on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 38%, transparent); border-color: var(--accent); }

/* ---------- Jídelníček ---------- */
.food-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }

/* mini kalendář jídelníčku – úzký vodorovný proužek dnů */
.fc-strip-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 8px 8px 10px; margin: 8px 0 12px; }
.fc-shead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 7px; }
.fc-sa { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 16px; color: var(--ink); display: grid; place-items: center; }
.fc-st { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.fc-st b { color: var(--accent); }
.fc-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 1px; touch-action: pan-x; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
.fc-d { scroll-snap-align: center; }
.fc-strip::-webkit-scrollbar { display: none; }
.fc-d { flex: 0 0 auto; width: 40px; height: 52px; border: 1px solid var(--line); background: #f6f7f9; border-radius: 11px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; color: var(--muted); }
.fc-d .fc-dw { font-size: 9.5px; font-weight: 700; text-transform: uppercase; opacity: .8; }
.fc-d .fc-nm { font-size: 15px; font-weight: 800; color: var(--ink); }
/* podbarvení dne podle výsledku: zeleně v cíli, červeně přes cíl, oranžově pod cílem */
.fc-d.log { background: #e2e8f0; }
.fc-d.ok { background: var(--good); border-color: var(--good); }
.fc-d.over { background: var(--bad); border-color: var(--bad); }
.fc-d.under { background: var(--warn); border-color: var(--warn); }
.fc-d.ok .fc-nm, .fc-d.ok .fc-dw,
.fc-d.over .fc-nm, .fc-d.over .fc-dw,
.fc-d.under .fc-nm, .fc-d.under .fc-dw { color: #fff; }
.fc-d.today { box-shadow: inset 0 0 0 2px var(--accent); }
.fc-d.sel { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.fc-d.sel .fc-nm { color: var(--accent); }
.fc-d.fc-o:not(.today):not(.sel):not(.ok):not(.over):not(.under):not(.log) { opacity: .4; }
.fc-d.sel.ok .fc-nm, .fc-d.sel.over .fc-nm, .fc-d.sel.under .fc-nm { color: #fff; }
.ac-connected { text-align: center; font-size: 13px; font-weight: 700; color: var(--good); padding: 6px 0; }
.ac-connected .linklike { background: none; border: none; color: var(--muted); font-weight: 700; text-decoration: underline; font-size: 13px; padding: 0; }

/* moderní karta nutrientů */
.nutri { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; box-shadow: 0 8px 26px rgba(15,18,24,.07); }
.nutri-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.nutri-date { font-size: 13px; font-weight: 800; color: var(--ink); text-transform: capitalize; letter-spacing: -.01em; }
.nutri-setgoal { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 12px; font-weight: 800; color: var(--accent); }
.nutri-body { display: flex; align-items: center; gap: 18px; }
.nutri-cal { position: relative; width: 110px; height: 110px; flex: 0 0 auto; }
.nring { width: 110px; height: 110px; display: block; }
.nutri-cal-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ncc-now { font-size: 27px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1; }
.ncc-goal { font-size: 10.5px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.nutri-bars { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 13px; }
.mbar-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.mbar-l { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.mbar-v { font-size: 12px; font-weight: 700; color: var(--muted); }
.mbar-v b { color: var(--ink); font-weight: 800; font-size: 13px; }
.mbar-track { height: 7px; background: #eef0f3; border-radius: 999px; overflow: hidden; }
.mbar-track i { display: block; height: 100%; border-radius: 999px; transition: width .45s cubic-bezier(.4,0,.2,1); }

.kcal-card { background: linear-gradient(150deg, #262b34, var(--graphite)); color: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); }
.kcal-day { font-size: 13px; font-weight: 700; opacity: .85; text-transform: capitalize; margin-bottom: 10px; }
.donuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dn { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.dn-r { width: 56px; }
.donut { width: 56px; height: 56px; }
.donut-t { fill: #fff; font-size: 15px; font-weight: 800; }
.dn-l { text-align: center; font-size: 11px; color: rgba(255,255,255,.8); line-height: 1.25; }
.dn-l b { color: #fff; font-size: 13px; font-weight: 800; }
.dn-l span { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .03em; opacity: .75; }
.kcal-setgoal { margin-top: 12px; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.24); font-weight: 700; }
.kcal-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 12px; font-size: 11px; color: rgba(255,255,255,.8); }
.kcal-leg .lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 3px; }
.kcal-leg .lg.ok { background: #22c55e; } .kcal-leg .lg.under { background: #f59e0b; } .kcal-leg .lg.over { background: #ef4444; }
.kcal-leg-x { opacity: .7; }
.di-swap { flex: 0 0 auto; border: 1px solid var(--line); background: #f6f7f9; border-radius: 9px; width: 30px; height: 30px; font-size: 15px; color: var(--accent); }
.seg { display: flex; gap: 6px; background: #f1f5f9; border-radius: 12px; padding: 4px; }
.seg-b { flex: 1; border: none; background: none; padding: 10px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--muted); }
.seg-b.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.calc-btn { background: #f1f5f9; color: var(--accent); font-weight: 800; }
.ef-swap { background: #f1f5f9; color: var(--accent); font-weight: 800; }
.ef-name { text-align: center; font-weight: 800; font-size: 15px; color: var(--ink); margin: -4px 0 2px; }
.kcal-big { font-size: 16px; opacity: .9; }
.kcal-big b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.macro-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.macro { background: rgba(255,255,255,.10); border-radius: 12px; padding: 8px; text-align: center; }
.macro .m-n { display: block; font-size: 16px; font-weight: 800; }
.macro .m-l { display: block; font-size: 10.5px; opacity: .8; text-transform: uppercase; letter-spacing: .03em; margin-top: 1px; }

/* tři akce pod prouhem maker – lehké, moderní, nadčasové */
.food-actions { display: flex; gap: 8px; margin: 14px 0 6px; }
.fa { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: none; background: none; }
.fa .fa-ic { width: 100%; aspect-ratio: 1 / 1; display: grid; place-items: center; border-radius: 16px; background: var(--card); color: var(--graphite);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.fa .fa-ic svg { width: 50%; height: 50%; }
.fa:active .fa-ic { transform: translateY(1px) scale(.96); border-color: var(--accent); box-shadow: 0 2px 6px rgba(15,18,24,.10); }
.fa .fa-l { font-size: 11.5px; font-weight: 700; letter-spacing: -.01em; color: var(--muted); text-align: center; line-height: 1.1; }

/* souhrn nutrice jídla – celé jídlo vs. porce */
.dish-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 14px; }
.ds-col { border-radius: 16px; padding: 14px 12px; text-align: center; background: #f4f5f7; border: 1px solid var(--line); }
.ds-col.ds-portion { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff; box-shadow: 0 8px 20px rgba(255,91,46,.30); }
.ds-lab { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ds-portion .ds-lab { color: rgba(255,255,255,.85); }
.ds-kcal { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; }
.ds-kcal span { font-size: 12px; font-weight: 700; opacity: .65; margin-left: 3px; }
.ds-mac { font-size: 11.5px; font-weight: 700; color: var(--muted); line-height: 1.4; }
.ds-portion .ds-mac { color: rgba(255,255,255,.92); }
.dplan-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; text-align: center; }
.dplan-note b { color: var(--ink); }
.st-hint { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); opacity: .85; font-size: 11.5px; }
.btn-save { background: #f1f5f9; color: var(--accent); font-weight: 800; }

/* knihovna uložených jídel */
.dish-list { display: flex; flex-direction: column; gap: 8px; }
.dl-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; border: 1px solid var(--line);
    background: var(--card); border-radius: 14px; box-shadow: var(--shadow-sm); transition: transform .12s ease; }
.dl-card:active { transform: scale(.99); }
.dl-main { flex: 1; min-width: 0; }
.dl-name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.dl-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.dl-go { flex: 0 0 auto; font-size: 24px; color: var(--muted); opacity: .55; line-height: 1; }

/* plánovací kalendář */
.pc-wrap { border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); padding: 12px; }
.pc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pc-title { font-size: 15px; font-weight: 800; }
.pc-nav { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; color: var(--ink); display: grid; place-items: center; }
.pc-nav:active { transform: scale(.94); }
.pc-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.pc-dow span { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.pc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pc-cell { position: relative; aspect-ratio: 1 / 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: none; background: #f4f5f7; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--ink); padding: 0; transition: transform .1s ease; }
.pc-cell.empty { background: none; pointer-events: none; }
.pc-cell.past { opacity: .38; }
.pc-cell.today { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.pc-cell.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 4px 10px rgba(255,91,46,.32); }
.pc-cell .pc-n { line-height: 1; }
.pc-cell.on .pc-n { font-size: 11px; opacity: .92; }
.pc-cell .pc-m { font-size: 14px; line-height: 1; margin-top: 1px; }
.pc-cell:active { transform: scale(.92); }
.meal-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.meal-pick .mp { border: 1px solid var(--line); background: #f6f7f9; border-radius: 999px; padding: 7px 11px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.meal-pick .mp.on { background: var(--accent); color: #fff; border-color: var(--accent); }
/* každé jídlo = jedna seskupená karta: tónovaná hlavička nahoře + položky jako oddělené řádky uvnitř */
.meal-sec { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.meal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; cursor: pointer;
    background: #f4f6f8; border: none; border-bottom: 1px solid var(--line); padding: 11px 14px; transition: background .12s ease; }
.meal-h:active { background: #eceff3; }
.meal-sec.collapsed .meal-h { border-bottom: none; }
.meal-h-l { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.meal-ic { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; font-size: 18px; line-height: 1; border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.meal-nm { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meal-cnt { flex: 0 0 auto; font-size: 11px; font-weight: 800; color: var(--muted); background: #e4e8ee; border-radius: 999px; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; }
.meal-h-r { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.meal-tot { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.meal-tot b { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.meal-tot i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.meal-chev { flex: 0 0 auto; box-sizing: border-box; width: 12px; height: 12px; font-size: 0; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.meal-sec.collapsed .meal-chev { transform: translateY(1px) rotate(-45deg); }
.meal-sec.collapsed .meal-items { display: none; }
/* položky uvnitř karty jídla – ploché řádky s jemnou linkou, ne samostatné karty */
.meal-items .fl-row { background: none; border: none; border-radius: 0; box-shadow: none; margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); }
.meal-items .fl-row:first-child { border-top: none; }
.meal-foot { display: flex; border-top: 1px solid var(--line); }
.meal-fb { flex: 1 1 0; min-width: 0; border: none; background: none; color: var(--muted); font-size: 12.5px; font-weight: 700; padding: 10px 6px; text-align: center; }
.meal-fb:first-child { border-right: 1px solid var(--line); color: var(--accent2); }
.meal-fb:active { background: #f7f8fa; }
.dtext { border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; font-size: 16px; resize: vertical; width: 100%; }
.dtext-lg { min-height: 140px; line-height: 1.45; }
.dtext:focus { outline: 2px solid color-mix(in srgb, var(--accent) 38%, transparent); border-color: var(--accent); }
.dchars { text-align: right; font-size: 11px; color: var(--muted); margin-top: -8px; }
/* seznam surovin / rozpoznaných položek – čistá seskupená karta */
.ing-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-sm); }
.di-row { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-top: 1px solid var(--line); }
.di-row:first-child { border-top: none; }
.di-info { flex: 1; min-width: 0; }
.di-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.di-new { font-size: 9.5px; font-weight: 800; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 1px 6px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.di-db { font-size: 9.5px; font-weight: 800; color: var(--good); background: color-mix(in srgb, var(--good) 15%, transparent); padding: 1px 6px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.di-macros { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.di-kc { color: var(--ink); }
.di-kcal { color: var(--ink); font-weight: 800; }
.di-mac { color: var(--muted); }
.di-mac b { color: var(--ink); font-weight: 700; }
/* součet rozpoznaných položek */
.di-total { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin: 12px 0 4px; padding: 11px 14px; border-radius: 12px; background: var(--graphite); color: #fff; }
.di-total .dt-k b { font-size: 17px; }
.di-total .dt-m { font-size: 12.5px; color: #c7ccd4; }
.di-amt { flex: 0 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.di-amt .di-g { width: 64px; border: 1px solid var(--line); background: #f4f6f8; border-radius: 10px; font-size: 14.5px; font-weight: 800; color: var(--ink); text-align: right; padding: 5px 9px; }
.di-amt .di-g:focus { outline: none; border-color: var(--accent); }
.di-units { display: flex; gap: 4px; justify-content: flex-end; }
.di-units .au-b { border: 1px solid var(--line); background: #f6f7f9; border-radius: 8px; padding: 3px 7px; font-weight: 700; font-size: 11px; color: var(--muted); white-space: nowrap; max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
.di-units .au-b.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.di-unit { font-size: 12px; font-weight: 700; color: var(--muted); }

.di-swap, .di-row .sdel { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 15px; display: grid; place-items: center; padding: 0; }
.di-swap { color: var(--accent); }
.di-row .sdel { color: var(--muted); position: static; }

.food-search { position: relative; margin: 14px 0 4px; display: flex; gap: 8px; }
.food-search #foodq { flex: 1; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; font-size: 16px; background: #fff; color: var(--ink); }
.food-search #foodq:focus { outline: 2px solid color-mix(in srgb, var(--accent) 38%, transparent); border-color: var(--accent); }
.food-mic { flex: 0 0 auto; width: 50px; border: 1px solid var(--line); border-radius: 13px; background: #fff; font-size: 20px; box-shadow: var(--shadow-sm); }
.food-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 25; background: #fff; border: 1px solid var(--line);
    border-radius: 14px; box-shadow: var(--shadow); max-height: 60vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.fs-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: none;
    border-top: 1px solid var(--line); padding: 11px 13px; }
.fs-item:first-child { border-top: none; }
.fs-item:active { background: #f1f5f9; }
.fs-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.fs-kcal { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--muted); }
.fs-more { color: var(--accent); font-weight: 700; background: #fafafa; }
/* našeptávač uvnitř okna (výměna potraviny) – v toku, ne absolutně */
.food-suggest.pick-sug { position: static; top: auto; left: auto; right: auto; max-height: 46vh; margin-top: 8px; box-shadow: none; border-radius: 12px; }
/* vyhledávací pole zůstane přišpendlené nahoře v okně, ať ho nezakryje klávesnice */
.ss-head { position: sticky; top: 0; z-index: 6; background: var(--card); padding-bottom: 10px; }
.quickg { display: flex; gap: 6px; flex-wrap: wrap; }
.quickg .qg { border: 1px solid var(--line); background: #f6f7f9; border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: 13px; color: var(--ink); }
/* množství + přepínač jednotky (kusy / g / ml) na jednom řádku */
.amt-lab { font-size: 13px; font-weight: 700; color: var(--muted); }
.amt-row { display: flex; gap: 8px; align-items: stretch; }
.amt-in { flex: 1 1 auto; min-width: 0; }
.amt-units { display: flex; gap: 6px; flex: 0 0 auto; }
.amt-units .au-b { border: 1px solid var(--line); background: #f6f7f9; border-radius: 12px; padding: 0 14px; font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.amt-units .au-b.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.gram-preview { background: #f6f7f9; border-radius: 12px; padding: 11px 13px; font-size: 14px; color: var(--muted); text-align: center; }
.gram-preview b { color: var(--ink); font-size: 16px; }
.fl-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); padding: 11px 12px; margin-bottom: 8px; }
.fl-removing { overflow: hidden; pointer-events: none; white-space: nowrap; transition: transform .3s cubic-bezier(.4,0,.6,1), opacity .25s ease, height .3s ease, padding .3s ease; }
@media (prefers-reduced-motion: reduce) { .fl-removing { transition: opacity .15s ease; } }
.fl-main { flex: 1; min-width: 0; }
.fl-name { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.fl-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fl-kcal { flex: 0 0 auto; font-weight: 800; font-size: 16px; color: var(--accent); text-align: right; }
.fl-kcal span { display: block; font-size: 9.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; }

/* ---------- Sheet / modal ---------- */
.sheet-back { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 60; display: flex; align-items: flex-end; justify-content: center; touch-action: none; }
.sheet { background: #fff; width: 100%; max-width: 640px; border-radius: 22px 22px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.2); max-height: calc(100% - 20px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; animation: up .2s ease; will-change: transform; }
/* když je otevřené okno, nech pozadí stát (ať „nešoupe celým webem") */
body:has(.sheet-back) { overflow: hidden; }
.sheet-grip { cursor: grab; touch-action: none; }
@keyframes up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 4px 0 14px; font-size: 18px; }
.sheet-grip { width: 40px; height: 4px; background: var(--line); border-radius: 4px; margin: 0 auto 14px; }

/* ---------- Toast ---------- */
.toast { position: fixed; top: calc(env(safe-area-inset-top) + 12px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 90; box-shadow: var(--shadow); animation: pop .2s ease; max-width: min(92vw, 460px); text-align: center; }
@keyframes pop { from { transform: translate(-50%, -8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.toast.toast-out { animation: toastout .26s ease forwards; }
@keyframes toastout { to { transform: translate(-50%, -10px); opacity: 0; } }
/* chybová / varovná hláška – větší, čitelná karta, drží déle */
.toast-error, .toast-warn { display: flex; align-items: flex-start; gap: 10px; text-align: left; border-radius: 16px; padding: 14px 16px; font-weight: 600; line-height: 1.4; background: #2a1416; color: #ffe9e9; border: 1px solid #7a2230; box-shadow: 0 14px 34px rgba(120,20,30,.35); }
.toast-error .toast-i, .toast-warn .toast-i { font-size: 18px; flex: 0 0 auto; line-height: 1.4; }
.toast-error .toast-msg, .toast-warn .toast-msg { flex: 1; }

.hero-cta { background: linear-gradient(150deg, #262b34, var(--graphite)); color: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 14px 30px rgba(15,18,24,.30); margin-bottom: 18px; }
.hero-cta h2 { margin: 0 0 4px; font-size: 21px; }
.hero-cta p { margin: 0 0 14px; opacity: .85; font-size: 14px; }
.hero-cta .btn { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.24); }
.hero-cta .btn-white { background: var(--accent); color: #fff; border: none; font-weight: 800; box-shadow: 0 6px 16px rgba(255,91,46,.35); }

.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; margin-bottom: 10px; background: none; border: none; padding: 4px 0; font-size: 15px; }
.toolbar { display:flex; gap:10px; align-items:center; }

/* kompaktní hlavička tréninku (jeden řádek) */
.wk-head { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; }
.wk-back, .wk-head .icon-btn { flex: 0 0 auto; width: 38px; height: 38px; }
.wk-back { border-radius: 50%; border: 1px solid var(--line);
    background: var(--card); box-shadow: var(--shadow-sm); font-size: 22px; line-height: 1; color: var(--ink); display: grid; place-items: center; }
.wk-back:active { transform: scale(.96); }
.wk-head .icon-btn { font-size: 19px; border-radius: 50%; }
.wk-head-mid { flex: 1; min-width: 0; }
.wk-date { font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; text-transform: capitalize;
    display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-date .date-cal { font-size: 13px; opacity: .6; flex: 0 0 auto; }
.wk-meta { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-meta .pill { margin-left: 2px; }
.ph-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.pill { display:inline-block; background:color-mix(in srgb, var(--accent) 14%, transparent); color:var(--accent); border-radius:999px; padding:3px 10px; font-size:12px; font-weight:700; }

/* ---------- Dashboard (úvodní přehled) ---------- */
.dash-hero { margin-bottom: 14px; }
.dash-hero .dh-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dash-hero h2 { margin: 0 0 2px; font-size: 22px; }
.dash-hero p { opacity: .82; font-size: 13.5px; }
.dh-share { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.14); color: #fff; font-size: 19px; display: grid; place-items: center; }
.dh-share:active { transform: scale(.94); }

.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.dst { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; border: 1px solid var(--line); background: var(--card); border-radius: 16px; box-shadow: var(--shadow-sm); }
.dst:active { transform: scale(.97); }
.dst-n { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.dst-l { font-size: 11.5px; font-weight: 700; color: var(--muted); }

.dash-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin-top: 12px; padding: 14px 16px; }
.dash-row:active { transform: scale(.99); }
.dash-ic { flex: 0 0 auto; width: 50px; height: 50px; display: grid; place-items: center; font-size: 24px; border-radius: 15px; background: #f1f3f6; }
.dnu-body { flex: 1; min-width: 0; }
.dnu-h { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.dnu-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.dnu-mac { font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 3px; }
.dash-go { flex: 0 0 auto; font-size: 24px; color: var(--muted); opacity: .5; }
.dnu-ring { position: relative; width: 64px; height: 64px; flex: 0 0 auto; }
.dnu-ring .nring { width: 64px; height: 64px; }
.dnu-mid { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 800; color: var(--ink); }
.dc-delta { flex: 0 0 auto; font-size: 13px; font-weight: 800; color: var(--muted); padding: 3px 9px; border-radius: 999px; background: #f1f3f6; }
.dc-delta.down { color: var(--good); background: color-mix(in srgb, var(--good) 13%, #fff); }
.dc-delta.up { color: var(--bad); background: color-mix(in srgb, var(--bad) 11%, #fff); }

.dash-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.dq { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 14px 6px; border: 1px solid var(--line); background: var(--card); border-radius: 16px; box-shadow: var(--shadow-sm); font-size: 12.5px; font-weight: 700; color: var(--ink); }
.dq span { font-size: 22px; }
.dq:active { transform: scale(.96); }

.di-add-row { display: flex; gap: 8px; }
.di-add-row .di-more { flex: 1; }
.ef-dish { background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); font-weight: 800; border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }

/* kompaktní editace položky jídelníčku */
.ef-row { display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; }
.ef-row + .ef-row { margin-top: 6px; }
.ef-fname { flex: 1 1 auto; min-width: 0; font-weight: 800; font-size: 15px; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
.ef-row .ef-amt { flex: 0 0 52px; width: 52px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 7px; font-size: 15px; font-weight: 800; text-align: right; background: #fff; color: var(--ink); }
.ef-row .ef-amt:focus { outline: 2px solid color-mix(in srgb, var(--accent) 38%, transparent); border-color: var(--accent); }
.ef-unit { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--muted); margin-left: -2px; }
.ef-row .ef-preset { flex: 0 1 70px; width: 70px; min-width: 0; padding: 10px 24px 10px 9px; font-weight: 700; background-position: right 7px center; }
.ef-row .ef-search { flex: 1 1 0; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 15px; background: #fff; color: var(--ink); }
.ef-row .ef-search:focus { outline: 2px solid color-mix(in srgb, var(--accent) 38%, transparent); border-color: var(--accent); }
.ef-row .ef-meal { flex: 0 1 126px; width: 126px; min-width: 0; padding: 11px 28px 11px 11px; font-weight: 700; background-position: right 9px center; }
.ef-actions { display: flex; gap: 8px; }
.ef-actions #esave { flex: 1 1 auto; }
.ef-actions #edel { flex: 0 0 auto; }
.ic-share { width: 21px; height: 21px; display: block; }

/* dashboard – týdenní aktivita + vylepšené prvky */
.dh-greet h2 { margin: 0 0 3px; }
.dh-greet p { margin: 0; opacity: .85; font-size: 13.5px; }
.wk-strip { display: flex; gap: 6px; margin-top: 16px; }
.wk-day { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wk-dow { font-size: 10px; font-weight: 800; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .03em; }
.wk-dot { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 900;
    background: rgba(255,255,255,.12); color: rgba(255,255,255,.45); border: 1.5px solid transparent; transition: transform .12s ease; }
.wk-day.done .wk-dot { background: var(--accent); color: #fff; box-shadow: 0 5px 12px rgba(255,91,46,.42); }
.wk-day.now .wk-dot { border-color: #fff; }
.wk-day.now .wk-dow { color: #fff; }
.wk-day.fut .wk-dot { opacity: .5; }

.dst-i { font-size: 17px; line-height: 1; margin-bottom: 1px; }
.dst-streak .dst-n { color: var(--accent); }

.dash-nutri2 { display: block; width: 100%; text-align: left; cursor: pointer; margin-top: 12px; transition: transform .12s ease; }
.dash-nutri2:active { transform: scale(.995); }
.dash-nutri2 .nutri-head { margin-bottom: 12px; }
.dash-nutri2 .dash-go { font-size: 22px; color: var(--muted); opacity: .5; }

/* ikona výměny v poli a v řádku suroviny */
.ef-search-wrap { position: relative; flex: 1 1 0; min-width: 0; }
.ef-search-wrap .ef-search { width: 100%; padding-left: 38px; }
.ef-search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--accent); pointer-events: none; display: grid; place-items: center; }
.ic-swap { width: 18px; height: 18px; display: block; }
.di-swap .ic-swap { width: 16px; height: 16px; }

/* tlačítko „Vyměnit za jinou potravinu" (otevře vyhledávač DB+AI+ručně) */
.ef-row .ef-swapbtn { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; text-align: left; color: var(--accent); }
.ef-row .ef-swapbtn:active { transform: scale(.99); }
.ef-swaptxt { flex: 1; min-width: 0; color: var(--muted); font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ef-swapchev { flex: 0 0 auto; color: var(--muted); opacity: .55; font-size: 18px; }

/* váha – tělesný tuk + návod na napojení */
.ri-fat { font-size: 12px; font-weight: 700; color: var(--accent); margin-left: 6px; }
.ws-steps { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.ws-steps li { margin-bottom: 7px; }
.ws-code { background: #f4f6f8; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; margin: 5px 0; word-break: break-word; }

/* váha – dlaždice 4 metrik */
.wm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 4px; }
.wm { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 12px 14px; }
.wm-l { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.wm-v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-top: 2px; }
.wm-d { font-size: 12px; font-weight: 800; color: var(--muted); margin-top: 1px; }
.wm-d.good { color: var(--good); }
.wm-d.bad { color: var(--bad); }

/* Pohyb – půlkruhové ukazatele (gauge), barvy dle webu */
.mg-card { padding: 16px 14px 14px; }
.mg-row { display: flex; gap: 8px; }
.mg { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.mg-svg { width: 100%; max-width: 150px; display: block; overflow: visible; }
.mg-val { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mg-lab { font-size: 13px; font-weight: 800; color: var(--ink); margin-top: 4px; }
.mg-goal { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 1px; text-align: center; }
/* čtyři prstence v matici 2×2 – větší */
.mg-row4 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 10px; }
.mg-row4 .mg-svg { max-width: 156px; }
.mg-total { text-align: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.mg-total b { color: var(--accent); font-size: 15px; }

.ac-xrow { display: flex; gap: 10px; margin-top: 12px; }
.ac-x { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 1px; }
.ac-x-i { font-size: 17px; }
.ac-x b { font-size: 18px; }
.ac-x span:last-child { font-size: 11px; color: var(--muted); }

/* týdenní přehled – sloupce */
.ac-week { display: flex; justify-content: space-between; gap: 4px; padding: 12px 10px 10px; }
.aw-d { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.aw-bar { width: 12px; height: 56px; background: #eef1f6; border-radius: 999px; display: flex; align-items: flex-end; overflow: hidden; }
.aw-bar i { display: block; width: 100%; background: var(--accent); border-radius: 999px; min-height: 3px; transition: height .25s ease; }
.aw-l { font-size: 11px; font-weight: 700; color: var(--muted); }
.aw-d.on .aw-l { color: var(--accent); font-weight: 800; }
.aw-d.on .aw-bar { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }

.ac-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

/* provizorní log odeslání ze zkratky */
.ws-logwrap { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.ilog { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.ilog.err { border-color: #f3c2c2; background: #fff6f6; }
.ilog-h { font-size: 12px; font-weight: 700; color: var(--ink); }
.ilog.err .ilog-h { color: var(--bad); }
.ilog-v { font-size: 12px; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-word; margin-top: 2px; }

/* energetická bilance – rovnice příjem − výdej = výsledek */
.eq-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 800; font-size: 15px; margin: 18px 2px 10px; }
.eq-hint { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.eq-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 12px 12px 11px; margin-bottom: 10px; }
.eq-title { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 9px; }
.eq-sub { font-weight: 700; text-transform: none; letter-spacing: 0; }
.eq-row { display: flex; align-items: flex-end; gap: 2px; }
.eq-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.eq-lab { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.eq-val { font-size: 22px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.eq-op { flex: 0 0 auto; font-size: 17px; font-weight: 800; color: var(--muted); padding-bottom: 3px; }
.eq-res.good .eq-val { color: var(--good); }
.eq-res.bad .eq-val { color: var(--bad); }
.eq-break { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.eq-break b { color: var(--ink); font-weight: 700; }
.eq-status { text-align: center; font-size: 13px; font-weight: 800; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); }
.eq-status.good { color: var(--good); }
.eq-status.bad { color: var(--bad); }
.eq-grid2 { display: flex; gap: 10px; }
.eq-grid2 .eq-card { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
.eq-card.compact { padding: 10px 8px; }
.eq-card.compact .eq-title { font-size: 11px; margin-bottom: 7px; }
.eq-card.compact .eq-val { font-size: 15px; }
.eq-card.compact .eq-op { font-size: 12px; padding-bottom: 2px; }
.eq-card.compact .eq-lab { font-size: 8.5px; }
.eq-card.compact .eq-status { font-size: 11px; margin-top: 7px; padding-top: 6px; }
/* výdej energie za období */
.vyd-row { display: flex; gap: 8px; margin-top: 10px; }
.vyd { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 1px; }
.vyd span { font-size: 10.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.vyd b { font-size: 19px; color: var(--accent); font-variant-numeric: tabular-nums; }
.vyd i { font-size: 10px; color: var(--muted); font-style: normal; }
.vyd-sub { font-size: 12px; font-weight: 800; color: var(--muted); margin: 16px 4px 8px; }
.vyd-sub span { font-weight: 600; text-transform: none; }

/* energetická bilance na dashboardu (staré, ponecháno) */
.eb-card { margin-top: 14px; }
.eb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.eb-title { font-weight: 800; font-size: 15px; }
.eb-seg { display: flex; gap: 4px; background: #f1f3f6; border-radius: 10px; padding: 3px; }
.eb-seg-b { border: none; background: none; border-radius: 8px; padding: 5px 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.eb-seg-b.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.eb-warn { background: #fff6ec; border: 1px solid #f3d9bd; color: #9a5a12; border-radius: 10px; padding: 8px 10px; font-size: 12.5px; margin-bottom: 10px; }
.eb-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.eb-row span { color: var(--muted); }
.eb-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.eb-sub { font-size: 12px; padding: 2px 0 6px; border: none; }
.eb-sub span { color: var(--muted); }
.eb-net { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; font-weight: 800; }
.eb-net span { font-size: 13px; }
.eb-net b { font-size: 17px; font-variant-numeric: tabular-nums; }
.eb-net.good { background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--good); }
.eb-net.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.eb-status { text-align: center; font-size: 13px; font-weight: 700; margin-top: 8px; color: var(--muted); }
.eb-status.good { color: var(--good); }
.eb-status.bad { color: var(--bad); }

/* přepínač variant přehledu */
.dh-variant { display: flex; gap: 4px; background: #eef1f5; border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.dh-variant .dv { flex: 1 1 0; border: none; background: none; border-radius: 9px; padding: 8px 10px; font-size: 13px; font-weight: 800; color: var(--muted); }
.dh-variant .dv.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* ===== Přehled – finální návrh (nd-) ===== */
.nd-head { margin-bottom: 12px; }
.nd-head-d { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nd-head-t { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-top: 2px; }
.nd-seg { position: relative; display: flex; background: #e7e9ed; border-radius: 999px; padding: 5px; margin-bottom: 14px; }
.nd-seg-thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); transition: transform .4s cubic-bezier(.34,1.4,.5,1); }
.nd-seg.seg4 .nd-seg-thumb { width: calc((100% - 10px) / 4); }
.nd-seg.seg4 .nd-sg { font-size: 12.5px; padding: 9px 4px; }
.nd-sg { position: relative; z-index: 1; flex: 1; border: none; background: none; border-radius: 999px; padding: 9px; font-size: 13.5px; font-weight: 800; color: var(--muted); }
.nd-sg.on { color: var(--ink); }

.nd-card { background: #fff; border-radius: 22px; box-shadow: 0 10px 30px rgba(20,22,28,.06); padding: 18px 18px 16px; margin-bottom: 14px; }
.nd-card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.nd-sub { font-size: 12px; font-weight: 600; color: var(--muted); }
.nd-cap { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.nd-hero-top { display: flex; align-items: center; justify-content: space-between; }
.nd-status { font-size: 12.5px; font-weight: 800; padding: 6px 13px; border-radius: 999px; }
.nd-ring { position: relative; width: 210px; height: 210px; margin: 6px auto 4px; }
.nd-ring svg { width: 100%; height: 100%; display: block; }
.nd-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.nd-ring-note { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.nd-ring-n { font-size: 52px; font-weight: 800; letter-spacing: -.04em; line-height: 1.04; font-variant-numeric: tabular-nums; }
.nd-ring-u { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: -2px; }
.nd-ring-f { font-size: 13px; font-weight: 800; margin-top: 8px; }
.nd-iv { margin-top: 8px; padding-top: 16px; border-top: 1px solid #eef0f3; display: flex; flex-direction: column; gap: 11px; }
.nd-iv-row { display: flex; align-items: center; gap: 12px; }
.nd-iv-l { width: 78px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #6b7280; flex: 0 0 auto; }
.nd-iv-l i { width: 11px; height: 11px; border-radius: 4px; }
.nd-iv-tr { flex: 1 1 0; min-width: 0; height: 16px; background: #f2f3f5; border-radius: 999px; overflow: hidden; }
.nd-iv-tr i { display: block; height: 100%; border-radius: 999px; }
.nd-iv-row b { width: 62px; text-align: right; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.nd-warn { margin-top: 14px; background: #fff6ec; border: 1px solid #f3d9bd; color: #9a5a12; border-radius: 12px; padding: 9px 12px; font-size: 12.5px; font-weight: 700; }

.nd-comp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nd-ct { background: #f7f8fa; border-radius: 16px; padding: 13px 11px 11px; display: flex; flex-direction: column; gap: 6px; }
.nd-ct-l { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.nd-ct-v { font-size: 23px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.nd-ct-v span { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.nd-spark { width: 100%; height: 28px; display: block; }
.nd-ct-d { font-size: 11.5px; font-weight: 800; }

.nd-trend { position: relative; height: 150px; display: flex; align-items: flex-end; gap: 7px; }
.nd-tb { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 10px; transition: background .2s ease; }
.nd-tb.sel { background: #f2f3f5; }
.nd-tl-dumb { display: inline-flex; }
.nd-tl-dumb svg { width: 14px; height: 14px; vertical-align: middle; }
.nd-trend-labs span { display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.nd-tdetail { margin-top: 16px; background: #f7f8fa; border-radius: 16px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nd-td-l { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 800; color: var(--ink); }
.nd-td-chip { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,91,46,.1); color: var(--accent2); font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.nd-td-chip svg { width: 14px; height: 14px; }
.nd-td-r { display: flex; gap: 16px; }
.nd-td-r > div { display: flex; flex-direction: column; align-items: flex-end; }
.nd-td-r span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.nd-td-r b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* makra: kcal donut + pruhy */
.nd-macrow { display: flex; align-items: center; gap: 16px; }
.nd-kcal { position: relative; width: 116px; height: 116px; flex: 0 0 auto; }
.nd-kcal svg { width: 100%; height: 100%; display: block; }
.nd-kcal-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.nd-kcal-c b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nd-kcal-c span { font-size: 10.5px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.nd-kcal-u { font-weight: 700; }
/* číslo uprostřed koláče jako SVG text – škáluje se s grafem, jednotné napříč zařízeními */
.nd-kc-n { fill: var(--ink); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nd-kc-s { fill: var(--muted); font-weight: 600; }
.nd-kc-u { fill: var(--muted); font-weight: 700; }
/* střed hero prstenu jako SVG text – škáluje se s velikostí prstenu */
.nd-ring-note-s { fill: var(--muted); font-weight: 700; }
.nd-ring-n-s { font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.nd-ring-u-s { fill: var(--muted); font-weight: 700; }
.nd-ring-f-s { font-weight: 800; }
.nd-macrow .nd-macros { flex: 1 1 0; min-width: 0; }
.nd-kcal-prog { transition: stroke-dasharray .9s cubic-bezier(.22,1,.36,1); }
.nd-tb-cols { display: flex; align-items: flex-end; justify-content: center; gap: 4px; width: 100%; height: 100%; }
.nd-tb-cols i { width: 38%; border-radius: 5px 5px 2px 2px; }
.nd-bi { background: linear-gradient(180deg,#FF8A4D,#FF5B2E); }
.nd-be { background: linear-gradient(180deg,#5A7BA3,#34557F); }
.nd-goal { position: absolute; left: 0; right: 0; border-top: 2px dashed #C9CDD6; z-index: 1; pointer-events: none; }
.nd-trend-labs { display: flex; gap: 7px; margin-top: 8px; }
.nd-trend-labs span { flex: 1 1 0; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.nd-trend-labs span.on { color: var(--ink); }
.nd-avgs { display: flex; gap: 18px; }
.nd-avgs > div { display: flex; flex-direction: column; align-items: flex-end; }
.nd-avgs b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.nd-leg { display: flex; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef0f3; }
.nd-leg span { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: #6b7280; }
.nd-leg i { width: 12px; height: 12px; border-radius: 4px; }
.nd-leg-line { width: 18px !important; height: 0 !important; border-top: 2px dashed #C9CDD6; border-radius: 0 !important; }

.nd-macros { display: flex; flex-direction: column; gap: 14px; }
.nd-mac-h { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.nd-mac-v { font-size: 13px; font-weight: 500; color: var(--muted); }
.nd-mac-v b { color: var(--ink); font-weight: 800; }
.nd-mac-tr { height: 12px; background: #f2f3f5; border-radius: 999px; overflow: hidden; }
.nd-mac-tr i { display: block; height: 100%; border-radius: 999px; }
.nd-burn-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: middle; }
.nd-burnrow { flex-direction: row-reverse; }

.nd-qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.nd-qb { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 4px; background: #fff; border: none; border-radius: 16px; box-shadow: 0 10px 26px rgba(20,22,28,.07); font-size: 12.5px; font-weight: 800; color: var(--ink); }
.nd-qb svg { width: 22px; height: 22px; flex: 0 0 auto; }
.nd-qb.primary { background: linear-gradient(145deg,#FF7A3D,#FF5B2E); color: #fff; box-shadow: 0 12px 28px rgba(255,91,46,.30); }
.nd-qb:active { transform: scale(.96); }

/* animace */
.nd-ring-prog { transition: stroke-dasharray .9s cubic-bezier(.22,1,.36,1); }
.nd-iv-tr i, .nd-mac-tr i { transition: width .85s cubic-bezier(.22,1,.36,1); }
.nd-tb-cols i { transition: height .9s cubic-bezier(.22,1,.36,1); }
@keyframes ndUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.nd-card, .nd-qa { animation: ndUp .5s cubic-bezier(.22,1,.36,1) both; }
.nd-card:nth-of-type(2) { animation-delay: .06s; }
.nd-card:nth-of-type(3) { animation-delay: .12s; }
.nd-card:nth-of-type(4) { animation-delay: .18s; }
.nd-qa { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .nd-card, .nd-qa { animation: none; } .nd-ring-prog, .nd-kcal-prog, .nd-iv-tr i, .nd-mac-tr i, .nd-tb-cols i { transition: none; } }

/* ===== Tělesná kompozice (Composition) ===== */
.kw-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 2px 0 12px; }
.kw-hero { position: relative; overflow: hidden; background: #fff; color: var(--ink); border-radius: 22px; padding: 18px 18px 18px; box-shadow: 0 10px 30px rgba(20,22,28,.06); margin-bottom: 14px; }
.kw-hero-glow { position: absolute; top: -70px; right: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,91,46,.12), rgba(255,91,46,0) 70%); pointer-events: none; }
.kw-hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kw-hero-range { font-size: 12px; font-weight: 700; color: var(--muted); }
.kw-hero-badge { font-size: 12px; font-weight: 800; color: var(--ink); background: #f2f3f5; border-radius: 999px; padding: 5px 11px; }
.kw-hero-net { position: relative; display: flex; align-items: baseline; gap: 7px; margin: 8px 0 2px; }
.kw-net { font-size: 50px; font-weight: 800; letter-spacing: -.04em; line-height: 1; background: linear-gradient(120deg, #FF7A45, #FFB07A); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-variant-numeric: tabular-nums; }
.kw-net-u { font-size: 16px; font-weight: 700; color: var(--muted); }
.kw-hero-msg { position: relative; display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; margin-top: 4px; color: var(--ink); }
.kw-check { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #2FA374; color: #fff; font-size: 12px; font-weight: 900; flex: none; }
.kw-hero-sub { position: relative; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.kw-split { position: relative; margin-top: 16px; }
.kw-splitbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #eef0f3; }
.kw-splitbar.light { background: #eef0f3; height: 14px; }
.kw-sb-fat { background: linear-gradient(90deg, #FF5B2E, #FF8154); }
.kw-sb-lean { flex: 1; background: #C7CCD4; }
.kw-sb-lean2 { flex: 1; background: #C7CCD4; }
.kw-split-leg { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.kw-split-leg span { display: inline-flex; align-items: center; gap: 6px; }
.kw-split-leg i, .kw-bd i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.kw-split-leg b { color: var(--ink); }

/* AI trenér – chat */
.menu-item-coach .icn { color: var(--accent); }
.coach-wrap { position: relative; display: flex; flex-direction: column; height: calc(100dvh - 100px - env(safe-area-inset-top)); }
.coach-main { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.coach-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex: 0 0 auto; }
.coach-title { flex: 1; text-align: center; font-size: 16px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* seznam konverzací – na mobilu rozbalovací panel, na PC stálý levý sloupec */
.coach-side { position: absolute; top: 0; left: 0; right: 0; z-index: 20; display: none; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(20,22,28,.12); padding: 6px; max-height: 62vh; overflow-y: auto; }
.coach-wrap.side-open .coach-side { display: flex; }
.coach-side-scroll { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.coach-side-back { display: none; }
.coach-wrap.side-open .coach-side-back { display: block; position: absolute; inset: 0; z-index: 15; }
.ct-new { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border: none; background: none; border-radius: 10px; font-size: 14px; font-weight: 800; color: var(--accent); cursor: pointer; }
.ct-new svg { width: 16px; height: 16px; flex: 0 0 auto; }
.ct-new:hover { background: #f4f5f7; }
.ct-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.ct-row:hover { background: #f4f5f7; }
.ct-row.sel { background: color-mix(in srgb, var(--accent) 9%, #fff); }
.ct-t { flex: 1; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-x { flex: 0 0 auto; border: none; background: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 3px 7px; border-radius: 6px; }
.ct-x:hover { background: rgba(194,74,66,.12); color: #C24A42; }
.ct-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.coach-msgs { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 4px 2px 8px; -webkit-overflow-scrolling: touch; }
.cb { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere; }
.cb-user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.cb-coach { align-self: flex-start; background: #fff; color: var(--ink); box-shadow: 0 4px 14px rgba(20,22,28,.06); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.cb-coach b { font-weight: 800; }
.cb-typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px; }
.cb-typing span { width: 7px; height: 7px; border-radius: 50%; background: #c3c8d0; animation: cbdot 1s infinite; }
.cb-typing span:nth-child(2) { animation-delay: .15s; }
.cb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cbdot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.coach-input { display: flex; align-items: flex-end; gap: 8px; padding-top: 8px; flex: 0 0 auto; }
.coach-input textarea { flex: 1 1 auto; resize: none; border: 1px solid var(--line); border-radius: 18px; padding: 11px 15px; font-size: 14.5px; font-family: inherit; line-height: 1.4; max-height: 140px; background: #fff; color: var(--ink); }
.coach-input textarea:focus { outline: none; border-color: var(--accent); }
.coach-send { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px rgba(255,91,46,.26); }
.coach-send:hover { background: var(--accent2); }
.coach-send svg { width: 19px; height: 19px; }
.coach-welcome { margin: auto 0; text-align: center; padding: 20px 10px; }
.cw-emoji { font-size: 42px; }
.cw-t { font-size: 16px; font-weight: 800; color: var(--ink); margin-top: 8px; }
.cw-s { font-size: 13.5px; font-weight: 500; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.cw-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.cw-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.cw-chip:hover { border-color: var(--accent); color: var(--accent); }

/* „Kolik ještě dnes sníst" – řádek v kartě Výdej */
.nd-eatline { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.35; }
.nd-eat-t { font-size: 13.5px; font-weight: 800; letter-spacing: -.01em; }
.nd-eat-s { font-weight: 600; color: var(--muted); }

/* Podrobné (dopočítané) metriky kompozice */
.rm-grid { display: flex; flex-direction: column; }
.rm-row { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.rm-row:first-child { border-top: none; }
.rm-l { font-size: 14px; font-weight: 700; color: var(--ink); }
.rm-v { font-size: 16px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.rm-v i { font-size: 11px; font-weight: 600; color: var(--muted); font-style: normal; margin-left: 2px; }
.rm-d { font-size: 12.5px; font-weight: 800; text-align: right; min-width: 46px; }


.kw-strip { display: flex; align-items: stretch; padding: 10px 6px; }
.kw-m { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 8px 4px; min-width: 0; border: none; background: none; font: inherit; cursor: pointer; border-radius: 14px; transition: background .15s ease; position: relative; }
.kw-m[disabled] { cursor: default; opacity: .55; }
.kw-m.sel { background: var(--bg); }
.kw-m.sel::after { content: ''; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); width: 18px; height: 3px; border-radius: 3px; background: var(--ink); }
.kc-hint { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 8px; }
.kw-m-ic { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.kw-m-ic svg { width: 19px; height: 19px; }
.kw-m-v { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kw-m-v span { font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.kw-m-l { font-size: 11px; font-weight: 700; color: var(--muted); }
.kw-m-d { font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 2px 7px; }
.kw-sep { width: 1px; background: var(--line); align-self: stretch; margin: 2px 0; }

.kw-card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.kw-card-t { font-size: 16px; font-weight: 800; color: var(--ink); }
.kw-badge { font-size: 12.5px; font-weight: 800; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.kw-badge.good { color: #0F7A52; background: rgba(15,122,82,.10); }
.kw-badge.bad { color: #C24A42; background: rgba(194,74,66,.10); }

.kw-bd { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.kw-bd > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kw-bd span { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.kw-bd b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kw-note { margin-top: 14px; background: rgba(15,122,82,.08); color: #0F7A52; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; font-weight: 700; line-height: 1.4; }

.kw-pace { position: relative; height: 8px; border-radius: 999px; margin: 16px 0 8px; background: linear-gradient(90deg, #E9B949 0%, #2FA374 30%, #2FA374 65%, #E07A4A 100%); }
.kw-pace-dot { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid #16181D; transform: translate(-50%, -50%); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.kw-pace-tag { font-size: 12px; font-weight: 800; color: #C24A42; background: rgba(194,74,66,.10); border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.kw-pace-tag.ok { color: #0F7A52; background: rgba(15,122,82,.10); }
.kw-pace-lab { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--muted); }

.kw-coach-h { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.kw-coach-ic { width: 30px; height: 30px; border-radius: 10px; background: rgba(255,91,46,.12); display: flex; align-items: center; justify-content: center; flex: none; }
.kw-coach-ic svg { width: 18px; height: 18px; }
.kw-coach-t { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.kw-coach-note { margin-top: 12px; background: var(--bg); color: var(--muted); border-radius: 12px; padding: 10px 12px; font-size: 12px; font-weight: 600; line-height: 1.45; }

.kw-rec { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.kw-rec:first-of-type { border-top: none; }
.kw-rec-t { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.kw-rec-s { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.kw-rec-x { border: none; background: var(--bg); color: var(--muted); width: 30px; height: 30px; border-radius: 50%; font-size: 13px; font-weight: 700; flex: none; }

.kw-cta { display: flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(120deg, #FF5B2E, #FF7A45); color: #fff; border-radius: 16px; padding: 15px; font-size: 15.5px; font-weight: 800; box-shadow: 0 12px 26px rgba(255,91,46,.30); margin-bottom: 14px; cursor: pointer; }
.kw-cta svg { width: 20px; height: 20px; }

/* ===== Nový přehled (Dashboard) ===== */
.dh-hero { background: linear-gradient(160deg, #1b1f27, #11141a); color: #fff; border-radius: 22px; padding: 18px 16px 16px; text-align: center; box-shadow: 0 14px 32px rgba(15,18,24,.20); margin-bottom: 12px; }
.dh-hero-l { font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #9ca3af; }
.dh-ring { position: relative; width: 168px; height: 168px; margin: 8px auto 6px; }
.dh-ring svg { width: 100%; height: 100%; display: block; }
.dh-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dh-net { font-size: 40px; font-weight: 800; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; line-height: 1; }
.dh-net.good { color: #34d399; }
.dh-net.bad { color: #fb7185; }
.dh-net-u { font-size: 12px; font-weight: 700; color: #9ca3af; margin-top: 4px; }
.dh-tag { font-size: 13px; font-weight: 800; color: #cbd5e1; margin-top: 4px; }
.dh-tag.good { color: #34d399; }
.dh-tag.bad { color: #fb7185; }
.dh-warn { margin-top: 11px; background: rgba(255,255,255,.08); color: #fde68a; border-radius: 11px; padding: 8px 10px; font-size: 12px; font-weight: 700; }

.dh-rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.mr { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; }
.mr svg { width: 100%; max-width: 62px; }
.mr-pct { font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mr-l { font-size: 10.5px; font-weight: 800; color: var(--ink); margin-top: 4px; }

.dh-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 13px 14px; margin-bottom: 12px; }
.dh-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.dh-card-h b { font-variant-numeric: tabular-nums; }
.dh-macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mm { display: flex; flex-direction: column; align-items: center; }
.mm svg { width: 100%; max-width: 66px; }
.mm-pct { font-size: 23px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mm-l { font-size: 11px; font-weight: 800; color: var(--ink); margin-top: 5px; }
.mm-v { font-size: 10.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 1px; }

.dh-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.dh-tile { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.dh-tile:active { transform: scale(.98); }
.dh-tile-h { font-size: 12px; font-weight: 800; color: var(--muted); }
.dh-tile-v { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.dh-tile-d { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.dh-tile-d.good { color: var(--good); }
.dh-tile-d.bad { color: var(--bad); }
.dh-streak { background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--accent) 11%, #fff)); border-color: color-mix(in srgb, var(--accent) 26%, var(--line)); }
.dh-streak .dh-tile-v { color: var(--accent2); }

.dh-qa { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dh-qb { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 12px 6px; font-size: 12.5px; font-weight: 800; color: var(--ink); }
.dh-qb span { font-size: 20px; line-height: 1; }
.dh-qb:active { transform: scale(.96); }

/* ===== Kompaktní dashboard (Přehled) ===== */
.dsec { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 13px; margin-bottom: 11px; box-shadow: var(--shadow-sm); border-left-width: 4px; }
.dsec-comp { --sc: #8b5cf6; border-left-color: var(--sc); }   /* fialová */
.dsec-bal  { --sc: #2563eb; border-left-color: var(--sc); }   /* modrá */
.dsec-in   { --sc: #fcd34d; border-left-color: var(--sc); }   /* žlutá */
.dsec-out  { --sc: #8a5a2c; border-left-color: var(--sc); }   /* hnědá */
.dsec-h { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 800; color: var(--ink); margin-bottom: 10px; letter-spacing: -.01em; }
/* ikona sekce v barvě levé čáry – jemné vizuální propojení */
.dsec-ic { flex: 0 0 auto; display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; font-size: 14px; background: color-mix(in srgb, var(--sc) 16%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc) 32%, transparent); }
.dsec-info { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.dsec-add { margin-left: auto; width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--sc) 38%, var(--line)); background: #fff; color: var(--ink); border-radius: 9px; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.dsec-add:active { transform: scale(.92); }

/* tělesná kompozice – 4 dlaždice vedle sebe s mini grafem progresu */
.comp4 { display: flex; gap: 7px; }
.comp4 .wm { flex: 1 1 0; min-width: 0; padding: 8px 6px 7px; text-align: center; border-radius: 12px; }
.comp4 .wm-l { font-size: 9.5px; }
.comp4 .wm-v { font-size: 15px; margin-top: 1px; white-space: nowrap; }
.comp4 .wm { display: flex; flex-direction: column; align-items: center; }
.comp4 .wm-d { display: block; font-size: 9.5px; font-weight: 800; margin-top: 1px; }
.comp4 .wm-d.flat { color: var(--muted); }
.wm-spark { display: block; width: 100%; height: auto; margin-top: 5px; }

/* energetická bilance – 3 grafické karty vedle sebe */
.bal3 { display: flex; gap: 8px; }
.bc { flex: 1 1 0; min-width: 0; background: #f7f8fa; border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px 9px; text-align: center; }
.bc-l { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 7px; }
.bc-bars { display: flex; flex-direction: column; gap: 4px; }
.bc-bar { display: flex; align-items: center; gap: 4px; background: none; border: none; padding: 0; width: 100%; }
.bc-ic { font-size: 11px; flex: 0 0 auto; }
.bc-track { flex: 1 1 0; min-width: 0; height: 7px; background: #e7eaef; border-radius: 999px; overflow: hidden; }
.bc-track b { display: block; height: 100%; border-radius: 999px; }
.bc-track .bc-in { background: #2563eb; }
.bc-track .bc-out { background: var(--accent); }
.bc-v { display: none; flex: 0 0 auto; font-size: 10px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.bc-bar.on .bc-v { display: inline; }
.bc-net { margin-top: 8px; font-size: 19px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.bc-net .bc-u { font-size: 9.5px; font-weight: 700; font-style: normal; color: var(--ink); margin-left: 2px; letter-spacing: 0; }
.bc-net.good { color: var(--good); }
.bc-net.bad { color: var(--bad); }
.bc-fat { font-size: 10px; font-weight: 800; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.bc-fat.good { color: var(--good); }
.bc-fat.bad { color: var(--bad); }

.bal-warn { margin-top: 8px; background: #fff6ec; border: 1px solid #f3d9bd; color: #9a5a12; border-radius: 10px; padding: 7px 10px; font-size: 12px; font-weight: 700; }

/* přepínač rozsahu grafu */
.dsec-rg { display: flex; align-items: center; gap: 8px; margin: 2px 2px 11px; }
.dsec-rg > span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rp-row { display: flex; gap: 3px; margin-left: auto; background: #eef1f5; border-radius: 10px; padding: 3px; }
.rp { border: none; background: none; border-radius: 8px; padding: 5px 9px; font-size: 12px; font-weight: 800; color: var(--muted); }
.rp.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* složený sloupcový graf (cihličky) */
.sb { width: 100%; }
.sb-plot { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 124px; padding-top: 14px; }
.sb-bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; background: none; border: none; padding: 0; position: relative; transition: opacity .12s ease; }
.sb-stack { display: flex; flex-direction: column-reverse; width: 100%; border-radius: 5px 5px 2px 2px; overflow: hidden; min-height: 3px; }
.sb-stack > span { display: block; width: 100%; min-height: 0; }
.sb-bar.sel .sb-stack { outline: 2px solid var(--ink); outline-offset: 1px; border-radius: 5px; }
.sb-val { font-size: 9px; font-weight: 800; color: var(--muted); text-align: center; line-height: 1; margin-bottom: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-bar.sel .sb-val { color: var(--ink); }
.sb-goal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed #94a3b8; pointer-events: none; z-index: 1; }
.sb-goal span { position: absolute; right: 0; top: -13px; font-size: 9px; font-weight: 700; color: #94a3b8; background: var(--card); padding: 0 3px; }
.sb-labs { display: flex; gap: 3px; margin-top: 4px; }
.sb-lab { flex: 1 1 0; min-width: 0; text-align: center; font-size: 9.5px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; }
.sb-lab.sel { color: var(--ink); font-weight: 800; }
/* činka v patě sloupce grafu výdeje (absolutně → neovlivní výšku sloupce) */
.sb-dumb { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); z-index: 2; width: 26px; height: 26px; padding: 0; border: none; display: grid; place-items: center; border-radius: 8px; background: #fff; color: var(--sc, var(--accent2)); box-shadow: 0 1px 4px rgba(15,18,24,.28); }
.sb-dumb svg { width: 18px; height: 18px; }
.sb-dumb:active { transform: translateX(-50%) scale(.9); }
.dc-empty { font-size: 12.5px; color: var(--muted); text-align: center; min-height: 142px; display: flex; align-items: center; justify-content: center; padding: 8px; }

/* pata grafu: jednotka vlevo, legenda vpravo */
.ch-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.ch-unit { font-size: 10.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.ch-foot .dleg { margin-top: 0; justify-content: flex-end; flex: 1 1 auto; }

/* legenda barev grafu */
.dleg { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; margin-top: 8px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.dleg span { display: inline-flex; align-items: center; gap: 4px; }
.dleg i { width: 9px; height: 9px; border-radius: 3px; }

/* rozpad maker vybraného dne – vodorovné čáry */
.dib { margin-top: 11px; background: #f7f8fa; border: 1px solid var(--line); border-radius: 13px; padding: 10px 11px; }
.dib-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.dib-date { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.dib-kc { font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dib-kc b { font-size: 15px; font-weight: 800; color: var(--ink); }
.dib .mbar { margin-top: 7px; }


/* nabídka přidání jídla (z plusku v sekci příjem) */
.add-menu { display: flex; flex-direction: column; gap: 8px; }
.am-i { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 13px; border: 1px solid var(--line); background: var(--card); border-radius: 14px; }
.am-i:active { transform: scale(.985); background: #f7f8fa; }
.am-ic { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: #f1f3f6; color: var(--graphite); }
.am-ic svg { width: 20px; height: 20px; }
.am-tx { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.am-tx b { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.am-tx i { font-size: 12px; font-style: normal; color: var(--muted); }
.am-go { flex: 0 0 auto; font-size: 20px; color: #c2c9d2; font-weight: 700; }

/* dopočet denních cílů */
.goal-calc { display: flex; gap: 8px; flex-wrap: wrap; }
.goal-calc .calc-btn { flex: 1; min-width: 90px; font-size: 13px; padding: 9px 6px; }

/* překryv „pracuji…" se spinnerem */
.load-ov { position: fixed; inset: 0; z-index: 95; background: rgba(15,23,42,.38); display: grid; place-items: center; backdrop-filter: blur(2px); animation: pop .15s ease; }
.load-box { background: #fff; border-radius: 16px; padding: 22px 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow); max-width: 80%; }
.load-tx { font-size: 14px; font-weight: 700; color: var(--ink); text-align: center; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* přepínač na PC verzi (patička) */
.ui-foot { display: flex; justify-content: center; padding: 6px 16px calc(18px + env(safe-area-inset-bottom)); position: relative; z-index: 1; }
.ui-foot button { border: 1px solid var(--line); background: #fff; color: var(--muted); font-weight: 700; font-size: 12.5px; padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); }

/* Odznak, který AI model rozpoznal data (test/porovnání) */
.ai-used { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 6px 11px; border-radius: 999px; margin: 12px 0 2px; }
.ai-used b { font-weight: 800; }
.ai-used code { font-size: 11px; font-weight: 600; opacity: .8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ai-gemini { background: rgba(52,85,127,.12); color: #34557F; }
.ai-groq { background: rgba(255,91,46,.12); color: #C24A42; }

/* ===== Cíl tělesné kompozice ===== */
.kg-empty { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.kg-empty-ic { font-size: 26px; flex: none; }
.kg-empty-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.kg-empty-tx b { font-size: 15px; font-weight: 800; color: var(--ink); }
.kg-empty-tx span { font-size: 12.5px; color: var(--muted); font-weight: 600; line-height: 1.4; }
.kg-go { color: var(--muted); font-size: 22px; font-weight: 700; flex: none; }
.kg-edit { font-size: 12.5px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.kg-eta-main { background: rgba(15,122,82,.08); color: #0F7A52; border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 700; margin: 2px 0 8px; line-height: 1.4; }
.kg-eta-main b { font-weight: 800; }
.kg-eta-main span { font-weight: 600; opacity: .85; }
.kg-eta-main.warn { background: rgba(194,74,66,.08); color: #C24A42; }
.kg-eta-hint { background: var(--bg); color: var(--muted); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; font-weight: 700; margin: 2px 0 8px; line-height: 1.45; }
.kg-eta-hint b { color: var(--ink); }
.kg-term { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.kg-rows { display: flex; flex-direction: column; gap: 15px; }
.kg-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.kg-v { color: var(--muted); font-weight: 600; }
.kg-v b { color: var(--ink); font-weight: 800; }
.kg-bar { height: 10px; border-radius: 999px; background: #eef0f3; overflow: hidden; }
.kg-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FF8A4D, #FF5B2E); transition: width .9s cubic-bezier(.22,1,.36,1); }
.kg-sub { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.kg-eta.ok { color: #0F7A52; }
.kg-eta.warn { color: #C24A42; }
.kg-plan-sum { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.5; margin: 0 0 10px; }
.kg-plan-pace { background: var(--bg); border-radius: 10px; padding: 8px 11px; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.kg-plan-h { font-size: 13.5px; font-weight: 800; color: var(--ink); margin: 14px 0 6px; }
.kg-plan-ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.kg-plan-ul li { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.kg-plan-note { margin-top: 14px; background: rgba(232,148,26,.10); color: #9a6a12; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; font-weight: 700; line-height: 1.45; }
.kg-plan-btn { margin-top: 14px; }

/* ---- administrace ---- */
.adm { max-width: 960px; margin: 0 auto; }
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.adm-head h1 { margin: 0; font-size: 24px; }
.adm-seg { display: flex; width: max-content; max-width: 100%; background: #eceef2; border-radius: 12px; padding: 4px; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.adm-seg::-webkit-scrollbar { display: none; }
.adm-seg-b { flex: 0 0 auto; white-space: nowrap; border: 0; background: transparent; font: inherit; font-weight: 700; color: #5c6370; padding: 8px 16px; border-radius: 9px; cursor: pointer; }
.adm-seg-b.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.adm-tblwrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.adm-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-tbl th, .adm-tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #8a909b; background: #fafbfc; }
.adm-tbl tr:last-child td { border-bottom: 0; }
.adm-e { font-weight: 600; }
.adm-n { font-size: 12px; color: var(--muted); }
.adm-c { white-space: nowrap; color: #5c6370; }
.adm-never { color: #b0b4bd; }
.adm-role { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.adm-plan { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; margin-top: 6px; max-width: 100%; }
.adm-plan:disabled { opacity: .5; cursor: not-allowed; }
.adm-plan-now { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.adm-plan-now.is-pro { color: #1f9e63; }
/* --- marketingový/launch plán v administraci --- */
.mkt-goal { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: linear-gradient(120deg, rgba(255,91,46,.12), rgba(255,91,46,.03)); border: 1px solid rgba(255,91,46,.22); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.mkt-goal-k { display: block; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.mkt-goal-t { font-size: 18px; font-weight: 850; letter-spacing: -.01em; }
.mkt-goal-num { font-size: 26px; font-weight: 850; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mkt-goal-num b { color: var(--accent); }
.mkt-prog { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.mkt-prog-top { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mkt-bar { height: 8px; border-radius: 99px; background: var(--line); margin-top: 9px; overflow: hidden; }
.mkt-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff8a5c); border-radius: 99px; transition: width .4s ease; }
.mkt-phase { margin-bottom: 18px; }
.mkt-ph-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 3px; flex-wrap: wrap; }
.mkt-ph-h b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.mkt-ph-tag { font-size: 12px; font-weight: 700; color: var(--muted); }
.mkt-ph-c { margin-left: auto; font-size: 12.5px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.mkt-ph-d { font-size: 13px; color: var(--muted); margin-bottom: 9px; }
.mkt-task { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); padding: 12px 13px; margin-bottom: 7px; cursor: pointer; transition: border-color .15s; }
.mkt-task:active { transform: translateY(1px); }
.mkt-task:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.mkt-box { flex: 0 0 auto; width: 23px; height: 23px; border-radius: 7px; border: 2px solid var(--line); background: #f4f5f7; display: grid; place-items: center; margin-top: 1px; transition: all .16s ease; }
.mkt-box svg { width: 13px; height: 13px; opacity: 0; transform: scale(.4); transition: all .16s ease; }
.mkt-task.done .mkt-box { background: #1f9e63; border-color: #1f9e63; }
.mkt-task.done .mkt-box svg { opacity: 1; transform: scale(1); }
.mkt-b { min-width: 0; }
.mkt-t { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.mkt-task.done .mkt-t { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.mkt-w { font-size: 13px; color: var(--muted); margin-top: 2px; }
/* pencil pro záměnu cviku v docku + výběr cviku */
.dock-swap { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--accent-soft, rgba(255,91,46,.10)); color: var(--accent); font-size: 15px; cursor: pointer; line-height: 1; }
.dock-swap:active { transform: translateY(1px); }
.swap-search { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.swap-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.swap-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; font-weight: 650; cursor: pointer; }
.swap-row:active { background: #f4f5f7; }
.swap-ghead { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 12px 2px 4px; }
.swap-ghead:first-child { margin-top: 2px; }
.swap-gdot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.swap-subhead { font-size: 12px; font-weight: 700; color: var(--muted); margin: 6px 2px 2px; }
.swap-nm { flex: 1 1 auto; min-width: 0; }
.swap-own { flex: 0 0 auto; font-size: 11px; font-weight: 800; color: #8a5a00; background: #fdf1dc; padding: 3px 8px; border-radius: 999px; }
.mkt-copybox { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 13px; line-height: 1.55; background: #f4f6f9; border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; margin: 0 0 10px; color: var(--ink); max-height: 340px; overflow: auto; }
.adm-hint { margin-top: 10px; color: var(--muted); font-size: 13px; }
.adm-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.adm-tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.adm-tt { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #8a909b; }
.adm-tv { font-size: 28px; font-weight: 850; line-height: 1.1; margin-top: 4px; }
.adm-ts { font-size: 12px; color: var(--muted); margin-top: 2px; }
.adm-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.adm-card-h { font-weight: 800; margin-bottom: 12px; }
.adm-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.adm-bar { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.adm-bar i { display: block; width: 100%; background: linear-gradient(180deg, #ff7a4f, #ff5b2e); border-radius: 3px 3px 0 0; min-height: 3px; }
.adm-empty { color: var(--muted); padding: 20px 0; text-align: center; width: 100%; }
.adm-areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.adm-areas > div { display: flex; flex-direction: column; gap: 2px; background: #fafbfc; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.adm-areas span { font-size: 13px; color: #5c6370; }
.adm-areas b { font-size: 20px; }
@media (max-width: 640px) { .adm-tiles { grid-template-columns: repeat(2, 1fr); } .adm-areas { grid-template-columns: 1fr; } }

/* ---- admin: obrázky cviků ---- */
.admi-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.admi-tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.admi-tile b { display: block; font-size: 24px; font-weight: 850; }
.admi-tile span { font-size: 12px; color: var(--muted); font-weight: 700; }
.admi-tile.ok b { color: #12a150; }
.admi-tile.bad b { color: #e5484d; }
.admi-group { margin-bottom: 16px; }
.admi-group-h { display: flex; align-items: center; gap: 8px; font-weight: 850; font-size: 15px; margin: 4px 2px 8px; }
.admi-dot { width: 12px; height: 12px; border-radius: 4px; flex: 0 0 auto; }
.admi-count { margin-left: auto; font-size: 12px; font-weight: 800; color: #5c6370; background: #eceef2; border-radius: 20px; padding: 2px 10px; }
.admi-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.admi-row.is-missing { background: #fff7f7; border-color: #f4caca; }
.admi-th { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; background: #f4f6f9; flex: 0 0 auto; }
.admi-th-none { display: grid; place-items: center; font-size: 22px; }
.admi-main { flex: 1; min-width: 0; }
.admi-name { font-weight: 800; font-size: 14px; }
.admi-slug { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }
.admi-ok { font-size: 12px; font-weight: 800; color: #12a150; white-space: nowrap; }
.admi-bad { font-size: 12px; font-weight: 800; color: #e5484d; white-space: nowrap; text-align: right; }
.admi-orphan { margin-top: 10px; padding: 12px; background: #fafbfc; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; line-height: 1.9; }
.admi-orphan code { background: #eceef2; border-radius: 6px; padding: 1px 6px; font-size: 12px; }

/* editor cviku (admin) */
.exed { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.exed-head { display: flex; align-items: center; gap: 12px; }
.exed-th { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: #f4f6f9; flex: 0 0 auto; }
.exed-th-none { display: grid; place-items: center; font-size: 22px; }
.exed-hmain { flex: 1; min-width: 0; }
.exed-name { font-weight: 850; font-size: 15px; line-height: 1.25; }
.exed-slug { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }
.exed-badge { flex: 0 0 auto; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.exed-badge.ok { color: #12a150; background: #e7f7ee; }
.exed-badge.bad { color: #e5484d; background: #fdeceb; }
.exed-badge.custom { color: #8a5a00; background: #fdf1dc; }
.exed-actions { display: flex; gap: 8px; margin-top: 2px; }
.exed-actions .exed-save { flex: 1 1 auto; margin-top: 0; }
.exed-del { flex: 0 0 auto; background: #fdeceb; color: #c9302c; border: none; border-radius: 11px; padding: 12px 14px; font: inherit; font-weight: 800; cursor: pointer; }
.exed-del:active { transform: translateY(1px); }
.exed-fields { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.exed-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #4b5563; }
.exed-fields input, .exed-fields select { border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; font: inherit; font-size: 15px; background: #fff; width: 100%; }
.exed-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.exed-imgrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.exed-imgcur { font-size: 12px; color: var(--muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.exed-upl { display: inline-flex; align-items: center; gap: 6px; background: #eef1f6; border: 1px solid #e2e6ee; border-radius: 20px; padding: 8px 14px; font-weight: 800; font-size: 13px; color: #1f2733; cursor: pointer; flex-direction: row !important; }
.exed-save { background: var(--accent); color: #fff; border: none; border-radius: 11px; padding: 12px; font: inherit; font-weight: 850; cursor: pointer; margin-top: 2px; }
.exed-msel { position: relative; }
.exed-mbtn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; font: inherit; font-size: 15px; font-weight: 600; background: #fff; color: #1f2733; cursor: pointer; text-align: left; }
.exed-msum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exed-mcar { color: var(--muted); flex: 0 0 auto; font-size: 12px; }
.exed-mpanel { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; max-height: 240px; overflow-y: auto; }
.exed-mpanel[hidden] { display: none; }
.exed-mopt { flex-direction: row !important; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; font-size: 14px; font-weight: 700; color: #1f2733; cursor: pointer; }
.exed-mopt:hover { background: #f4f6fa; }
.exed-mopt input { width: auto !important; border: 0 !important; padding: 0 !important; margin: 0; accent-color: var(--accent); }
.exfilter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; position: sticky; top: 0; z-index: 3; background: var(--bg, #f4f6fa); padding: 8px 0; }
.exf-search { flex: 1 1 180px; min-width: 140px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; background: #fff; }
.exf-sel { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font: inherit; font-size: 13px; font-weight: 700; background: #fff; color: #1f2733; cursor: pointer; }
.exf-count { font-size: 12px; font-weight: 800; color: var(--muted); margin-left: auto; }
.exf-off { display: none !important; }
@media (max-width: 520px) { .exed-two { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .admi-sum { grid-template-columns: repeat(3, 1fr); } }

/* ---- auth: souhlas + právní odkazy ---- */
.auth-legal { text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.auth-legal a { color: var(--muted); }
.auth-consent { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.auth-consent input { width: 18px; height: 18px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--accent); }
.auth-consent a { color: var(--accent); }
.um-legal { padding: 10px 6px 4px; margin-top: 2px; font-size: 13px; color: var(--muted); text-align: center; }
.um-legal a { color: var(--muted); text-decoration: none; display: inline-block; padding: 8px 10px; border-radius: 9px; font-weight: 600; }
.um-legal a:active { background: #f4f5f7; color: var(--ink); }

/* ---- statistiky: seskupení podle svalových partií ---- */
/* ---- Statistiky: dlaždice partií → cviky s ikonami ---- */
.stat-tiles { margin-top: 6px; }
.tile-muscle .tile-count { position: absolute; top: 8px; right: 8px; z-index: 3; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 12px; background: var(--c, var(--accent)); color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }

.stat-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.stat-back { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 20px; font-weight: 800; color: #1f2733; cursor: pointer; flex: 0 0 auto; }
.stat-head-ill { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; }
.stat-head-ill img, .stat-head-ill svg { width: 100%; height: 100%; object-fit: contain; }
.stat-head-t { font-weight: 850; font-size: 18px; display: flex; flex-direction: column; line-height: 1.1; }
.stat-head-t small { font-size: 12px; font-weight: 700; color: var(--muted); }

.stat-ex-list { display: flex; flex-direction: column; gap: 10px; }
.stat-ex { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); cursor: pointer; }
.stat-ex-ill { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--c, var(--accent)) 13%, #fff); }
.stat-ex-ill img, .stat-ex-ill svg { width: 34px; height: 34px; object-fit: contain; }
.stat-ex-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stat-ex-name { font-weight: 800; font-size: 15px; line-height: 1.2; }
.stat-ex-sub { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-ex-val { font-weight: 850; color: var(--accent); white-space: nowrap; }
.stat-ex-go { color: #cbd5e1; font-size: 18px; font-weight: 800; flex: 0 0 auto; }

/* úprava záznamu aktivity */
.ri-edit { color: var(--muted); font-size: 15px; }

/* admin: zpětná vazba */
.fb-row { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.fb-msg { white-space: pre-wrap; }
.fb-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* varování na rychlý úbytek (bezpečnost) */
.kw-warn { background: #fff4e6; border: 1px solid #f4d199; color: #7a4a00; border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.5; margin-bottom: 10px; }
.kw-warn b { font-weight: 850; }

/* ---- instruktážní videa ke cvikům ---- */
.vid-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.vid-play { position: absolute; inset: 0; width: 100%; height: 100%; border: none; padding: 0; cursor: pointer; background: #000; display: grid; place-items: center; }
.vid-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.vid-play-ic { position: relative; z-index: 1; width: 66px; height: 66px; border-radius: 50%; background: rgba(230,40,40,.92); color: #fff; font-size: 26px; display: grid; place-items: center; padding-left: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.vid-hint { position: absolute; bottom: 10px; left: 0; right: 0; z-index: 1; color: #fff; font-size: 12px; font-weight: 700; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.vid-frame { width: 100%; height: 100%; border: 0; display: block; }
/* tlačítko videa „jak cvik provést" */
.vidbtn { display: inline-flex; align-items: center; gap: 7px; border: none; background: none; cursor: pointer; padding: 0; flex: 0 0 auto; -webkit-tap-highlight-color: transparent; }
.vidbtn-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 3px 8px rgba(255,91,46,.35); transition: transform .12s ease; }
.vidbtn-ic svg { width: 15px; height: 15px; margin-left: 2px; }
.vidbtn:active .vidbtn-ic { transform: scale(.9); }
.vidbtn-pill { background: #fff; border: 1px solid color-mix(in srgb, var(--accent) 30%, #fff); border-radius: 24px; padding: 4px 13px 4px 4px; box-shadow: var(--shadow-sm); }
.vidbtn-pill .vidbtn-ic { width: 28px; height: 28px; box-shadow: none; }
.vidbtn-pill .vidbtn-ic svg { width: 13px; height: 13px; }
.vidbtn-tx { font-size: 13px; font-weight: 850; color: var(--accent); letter-spacing: .01em; }
/* řádek ve výběru cviku: cvik + video pilulka zarovnané na střed */
.ex-row-wrap { display: flex; align-items: center; gap: 8px; }
.ex-row-wrap .ex-row { flex: 1; min-width: 0; }
/* admin videa */
.admi-top { display: flex; align-items: center; gap: 12px; }
.admi-vidrow { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.admi-vlbl { font-size: 16px; flex: 0 0 auto; }
.admi-vinput { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 13px; }
.admi-vsave { flex: 0 0 auto; background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 7px 12px; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }

/* ---- odznaky (gamifikace) ---- */
.ach-count { margin-left: 8px; font-size: 12px; font-weight: 800; color: #5c6370; background: #eceef2; border-radius: 20px; padding: 2px 10px; }
.ach-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.ach { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.ach-info { text-align: center; padding: 6px 4px 4px; }
.ach-info-ic { font-size: 52px; line-height: 1; margin-bottom: 10px; }
.ach-info-d { color: var(--ink); font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.ach-info-s { display: inline-block; font-size: 13px; font-weight: 800; color: #5c6370; background: #eceef2; border-radius: 20px; padding: 6px 14px; }
.ach-info-s.got { color: #1c7a4a; background: #e4f6ec; }
.ach.got { background: linear-gradient(160deg,#fff4e0,#ffe6c7); box-shadow: inset 0 0 0 2px #ffd08a; }
.ach.lock { background: #eef0f3; filter: grayscale(1); opacity: .45; }
.ach-next { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ---- tréninkové plány (šablony) ---- */
.plans-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pl-ai-btn { background: var(--accent); color: #fff; border: none; border-radius: 20px; padding: 6px 12px; font: inherit; font-weight: 800; font-size: 12px; cursor: pointer; white-space: nowrap; }
.pl-empty { color: var(--muted); font-size: 14px; background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 14px; line-height: 1.5; }
.pl-list { display: flex; flex-direction: column; gap: 10px; }
.pl-row { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 4px 8px 4px 4px; }
.pl-main { flex: 1; min-width: 0; text-align: left; background: none; border: none; padding: 10px; cursor: pointer; font: inherit; }
.pl-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.pl-badge { font-size: 10px; font-weight: 800; color: #fff; background: linear-gradient(90deg,#8b5cf6,#ec4899); border-radius: 8px; padding: 1px 6px; letter-spacing: .04em; }
.pl-sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-start { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; border: none; background: var(--accent); color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; }
.pl-del { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; border: none; background: none; color: #cbd5e1; font-size: 15px; cursor: pointer; }
.ap-focus.on { box-shadow: 0 0 0 3px var(--accent); border-color: transparent; }

/* ---- AI akce (report / jídlo / trénink) ---- */
.cw-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.cw-action { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer; font: inherit; font-weight: 800; font-size: 13px; color: #1f2733; box-shadow: var(--shadow-sm); }
.cw-action:active { background: #f8fafc; }
.cwa-i { font-size: 24px; }
.ai-insight { line-height: 1.6; }
.ai-insight b, .ai-insight strong { font-weight: 800; }
@media (max-width: 420px) { .cw-actions { grid-template-columns: 1fr; } .cw-action { flex-direction: row; justify-content: center; gap: 8px; } }

/* ---- tělesné míry (obvody) ---- */
.meas-card { margin-top: 12px; }
.meas-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.meas-add { background: var(--accent); color: #fff; border: none; border-radius: 20px; padding: 6px 14px; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.meas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.meas-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; background: #f4f6f9; border-radius: 12px; padding: 10px 4px; text-align: center; }
.meas-cell.empty { opacity: .55; }
.meas-i { font-size: 18px; } .meas-l { font-size: 11px; color: var(--muted); font-weight: 700; } .meas-v { font-weight: 850; font-size: 14px; font-variant-numeric: tabular-nums; }
.meas-d { font-size: 10px; font-weight: 800; } .meas-d.up { color: #e5484d; } .meas-d.dn { color: #12a150; }
.meas-note { color: var(--muted); font-size: 12px; margin-top: 10px; }
.meas-form label { font-size: 13px; }
@media (max-width: 560px) { .meas-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- onboarding (první spuštění) ---- */
.onb-back { position: fixed; inset: 0; z-index: 2500; background: rgba(15,20,30,.55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 18px; }
.onb-card { background: var(--card); border-radius: 22px; padding: 24px 22px; width: 100%; max-width: 440px; box-shadow: 0 24px 70px rgba(0,0,0,.4); max-height: 92vh; overflow-y: auto; }
.onb-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.onb-dots span { width: 8px; height: 8px; border-radius: 50%; background: #d8dce3; }
.onb-dots span.on { background: var(--accent); width: 22px; border-radius: 5px; }
.onb-h { font-size: 22px; font-weight: 850; text-align: center; }
.onb-sub { color: var(--muted); text-align: center; margin: 6px 0 16px; font-size: 14px; }
.onb-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.onb-goal { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer; text-align: center; }
.onb-goal.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff); }
.onb-goal .og-i { font-size: 26px; } .onb-goal .og-t { font-weight: 800; font-size: 14px; } .onb-goal .og-s { font-size: 11px; color: var(--muted); }
.onb-seg { margin-bottom: 12px; }
.onb-skip { display: block; width: 100%; background: none; border: none; color: var(--muted); font: inherit; font-weight: 600; margin-top: 10px; padding: 8px; cursor: pointer; }
.onb-kcal { text-align: center; margin: 10px 0; } .onb-kcal .ok-n { font-size: 44px; font-weight: 850; color: var(--accent); } .onb-kcal .ok-l { display: block; color: var(--muted); font-weight: 700; margin-top: -4px; }
.onb-macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.onb-macros .om { background: #f4f6f9; border-radius: 14px; padding: 12px 6px; text-align: center; } .onb-macros .om b { display: block; font-size: 18px; font-weight: 850; } .onb-macros .om span { font-size: 11px; color: var(--muted); font-weight: 700; }
.onb-bmr { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 16px; }

/* ---- interaktivní prohlídka (spotlight tour) ---- */
.tour-back { position: fixed; inset: 0; z-index: 2600; }
.tour-ring { position: fixed; border-radius: 13px; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgba(12,16,24,.62), 0 0 0 4px rgba(255,91,46,.35); pointer-events: none; transition: left .28s, top .28s, width .28s, height .28s; }
.tour-pop { position: fixed; z-index: 2602; background: var(--card); border-radius: 18px; padding: 16px 18px 15px; width: min(340px, calc(100vw - 28px)); box-shadow: 0 22px 64px rgba(0,0,0,.42); animation: umIn .2s ease; }
.tour-step { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--accent); text-transform: uppercase; }
.tour-h { font-size: 18px; font-weight: 850; margin-top: 3px; }
.tour-tx { font-size: 14px; color: var(--muted); line-height: 1.45; margin-top: 5px; }
.tour-btns { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tour-btns .btn-primary { padding: 9px 18px; }
.tour-skip { background: none; border: none; color: var(--muted); font: inherit; font-weight: 700; padding: 8px 4px; cursor: pointer; }

/* ---- oslava osobního rekordu (PR) ---- */
.pr-pop { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .25s; }
.pr-pop.show { opacity: 1; pointer-events: auto; }
.pr-card { background: #16181d; color: #fff; border-radius: 20px; padding: 22px 30px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.45); transform: scale(.8) translateY(10px); transition: transform .3s cubic-bezier(.2,1.4,.4,1); max-width: 84vw; }
.pr-pop.show .pr-card { transform: scale(1) translateY(0); }
.pr-emoji { font-size: 46px; line-height: 1; }
.pr-t { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #ffb020; margin-top: 6px; }
.pr-ex { font-size: 20px; font-weight: 850; margin-top: 4px; }
.pr-val { font-size: 15px; margin-top: 6px; opacity: .95; }
.pr-prev { font-size: 12px; opacity: .6; margin-top: 4px; }
.pr-conf-wrap { position: absolute; inset: 0; overflow: hidden; }
.pr-conf { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: pr-fall linear forwards; }
@keyframes pr-fall { to { transform: translateY(102vh) rotate(540deg); opacity: .9; } }

/* ---- stopky tréninku ---- */
.wk-timer-toggle.on { background: var(--accent); color: #fff; }
.wk-timer { background: #16181d; color: #fff; border-radius: 14px; padding: 12px 16px; margin: 10px 0 4px; transition: background .2s; }
.wk-timer.is-rest { background: #1f3a2e; }
.wk-timer-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.wk-timer-lbl { font-size: 13px; font-weight: 700; opacity: .85; }
.wk-timer-val { font-size: 30px; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.wk-timer-sub { display: flex; gap: 10px; margin-top: 8px; }
.wkt-sub-c { flex: 1; display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,.08); border-radius: 10px; padding: 6px 4px; }
.wkt-sub-v { font-size: 16px; font-weight: 850; font-variant-numeric: tabular-nums; }
.wkt-sub-l { font-size: 10px; font-weight: 700; opacity: .8; text-align: center; }
.wk-clk-btn { width: 100%; margin-top: 10px; background: #fff; color: #16181d; border: none; border-radius: 10px; padding: 11px; font: inherit; font-weight: 850; font-size: 15px; cursor: pointer; }
.wk-timer.is-rest .wk-clk-btn { background: #35c07f; color: #062b1a; }
.wk-doneline { text-align: center; color: var(--muted); font-weight: 700; font-size: 14px; margin-top: 12px; }
.btn-finish { background: #16181d; color: #fff; }
/* přepínač stopek v „Detaily tréninku" */
.det-timer { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; padding: 4px 0; }
.det-timer .seg { flex: 0 0 auto; }
/* ovládání stopek přímo v zápisníku série */
.dock-clk { margin-left: auto; margin-right: 8px; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 850; color: #16181d; background: #eef1f6; border: 1px solid #e2e6ee; border-radius: 20px; padding: 5px 12px; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.dock-clk.is-rest { background: #e2f7ec; border-color: #b9e9cf; color: #0d6b41; }

/* souhrn časů = kompaktní přístrojový panel, vizuálně oddělený od akčních dlaždic */
.wk-time-sum { background: #f4f6f9; border: 1px solid #e6e9ef; border-radius: 12px; padding: 7px 9px 8px; margin: 8px 0 16px; }
.wk-time-sum.done { background: #eef7f1; border-color: #cfe8d8; }
.wkts-title { font-size: 10px; font-weight: 800; color: var(--muted); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .05em; }
.wkts-row { display: flex; gap: 6px; }
.wkts-c { flex: 1; background: #fff; border: 1px solid #eceef2; border-radius: 9px; padding: 6px 4px 5px; text-align: center; }
.wkts-ic { display: none; }
.wkts-v { display: block; font-weight: 850; font-size: 15px; font-variant-numeric: tabular-nums; }
.wkts-l { display: block; font-size: 9px; font-weight: 800; margin-top: 1px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
/* barevné rozlišení: oranžová = cvičení, zelená = pauzy, černá = celkem */
.wkts-work .wkts-v { color: #d1471f; }
.wkts-rest .wkts-v { color: #157a49; }
.wkts-total { background: #16181d; border-color: #16181d; }
.wkts-total .wkts-v { color: #fff; }
.wkts-total .wkts-l { color: rgba(255,255,255,.72); }

/* tři fáze tréninku vedle sebe (Rozcvička · Přidat cvik · Protažení) */
.wk-phases { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 10px 0; }
.wk-ph { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 15px 6px; border-radius: 15px; border: 1px solid #e6e9ef; background: #f4f6f9; font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; text-align: center; }
.wk-ph-ic { font-size: 23px; line-height: 1; }
.wk-ph-l { font-size: 12.5px; }
.wk-ph.add { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(255,91,46,.28); }
.wk-ph.done { background: #eef7f1; border-color: #cfe8d8; }
.wk-ph-chk { position: absolute; top: 6px; right: 8px; color: #2fa374; font-weight: 900; font-size: 13px; }
.wk-start-hint { text-align: center; color: var(--muted); font-weight: 700; font-size: 13px; padding: 14px 8px; }

/* časy u jednotlivé série */
.set-times { font-size: 10px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }

/* fixní plovoucí indikátor běžícího tréninku (viditelný v celé apce) */
/* plovoucí tažitelné stopky tréninku (černý counter, START/STOP) */
.wk-float { position: fixed; right: 14px; top: calc(66px + env(safe-area-inset-top)); z-index: 95; width: 176px; background: #16181d; color: #fff; border-radius: 16px; padding: 10px 12px 11px; box-shadow: 0 10px 30px rgba(0,0,0,.38); touch-action: none; user-select: none; -webkit-user-select: none; transition: background .2s; }
.wk-float.is-rest { background: #17352a; }
.wk-float.dragging { opacity: .93; box-shadow: 0 14px 38px rgba(0,0,0,.5); }
.wkf-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; cursor: grab; }
.wkf-main:active { cursor: grabbing; }
.wkf-lbl { font-size: 11px; font-weight: 800; opacity: .85; }
.wkf-val { font-size: 27px; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: .5px; margin-left: auto; }
.wkf-total { flex-basis: 100%; font-size: 11px; opacity: .7; font-weight: 700; font-variant-numeric: tabular-nums; margin: 1px 0 9px; }
.wkf-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wkf-b { border: 0; border-radius: 9px; padding: 10px 6px; font: inherit; font-weight: 850; font-size: 12.5px; cursor: pointer; background: rgba(255,255,255,.14); color: #fff; }
.wkf-b.work.on { background: #ff5b2e; color: #fff; }
.wkf-b.rest.on { background: #35c07f; color: #062b1a; }
/* malé ✎ pro nepovinnou poznámku k rozcvičce/protažení */
.wk-ph-note { position: absolute; top: 5px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; background: rgba(0,0,0,.07); color: #6b7280; font-size: 12px; font-weight: 800; cursor: pointer; display: grid; place-items: center; }
.wk-ph.done .wk-ph-note { background: #cfe8d8; color: #1c7a4a; }

/* spinner v tlačítku (AI počítá) */
.btn-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: btnspin .7s linear infinite; }
@keyframes btnspin { to { transform: rotate(360deg); } }
.btn.is-loading { opacity: .8; }

/* předplatné (freemium) */
.plan-box { border: 1px solid #e6e9ef; border-radius: 14px; padding: 14px; background: linear-gradient(180deg,#fbfcfe,#f4f6f9); }
.plan-h { font-weight: 850; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.plan-soon { font-size: 11px; font-weight: 800; color: #fff; background: var(--accent); border-radius: 12px; padding: 2px 8px; text-transform: uppercase; letter-spacing: .4px; }
.plan-list { margin: 10px 0 12px; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
/* upgrade dialog – výběr plánu */
.up-plans { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 2px; }
.up-plan { position: relative; text-align: left; border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; cursor: pointer; font: inherit; }
.up-plan.best { border-color: var(--accent); background: #fff7f3; }
.up-badge { position: absolute; top: -10px; left: 14px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 850; text-transform: uppercase; letter-spacing: .03em; border-radius: 20px; padding: 3px 10px; }
.up-price { font-size: 15px; color: var(--muted); font-weight: 700; }
.up-price b { font-size: 26px; color: var(--ink); font-weight: 850; letter-spacing: -.02em; }
.up-sub { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.up-plan[disabled] { opacity: .6; }
