/* Chytrá Kačka – zápis pohybu: plovoucí pilulka přepínačů, rychlý zápis, oblíbené · © 2026 Jakub Caska, všechna práva vyhrazena */

/* ---------- přepínače .seg: bílá pilulka pod vybranou volbou, pružně dojede, dá se chytit a přetáhnout ---------- */
@supports selector(:has(a)) {
  .seg { position: relative; isolation: isolate; touch-action: pan-y; user-select: none; -webkit-user-select: none; --n: 2; --i: 0; }
  .seg::before {
    content: ''; position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px;
    width: calc((100% - 8px) / var(--n)); border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgba(90, 40, 50, .12);
    transform: translateX(calc(var(--i) * 100% + var(--drag, 0px)));
    transition: transform .5s cubic-bezier(.34, 1.45, .5, 1), box-shadow .2s;
  }
  .seg:has(> button:nth-of-type(3)) { --n: 3; }
  .seg:has(> button:nth-of-type(4)) { --n: 4; }
  .seg:has(> button:nth-of-type(2).on) { --i: 1; }
  .seg:has(> button:nth-of-type(3).on) { --i: 2; }
  .seg:has(> button:nth-of-type(4).on) { --i: 3; }
  .seg:not(:has(> button.on))::before { opacity: 0; }
  .seg > button { position: relative; z-index: 1; transition: color .3s, transform .15s; cursor: pointer; }
  .seg > button.on, .seg > button.on:hover { background: transparent !important; box-shadow: none !important; }
  .seg > button:active { transform: scale(.96); }
  .seg.dragging::before { transition: none; box-shadow: 0 6px 18px rgba(90, 40, 50, .18); }
  .seg.dragging { cursor: grabbing; }
  html[data-mode="dark"] .seg::before { background: #3A3541; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
}

/* ---------- přejezd obsahu při přepnutí Výdaj ↔ Příjem ---------- */
@keyframes qzInR { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes qzInL { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
@keyframes qzPop { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }
.qz-in-r { animation: qzInR .42s cubic-bezier(.22, 1, .36, 1); }
.qz-in-l { animation: qzInL .42s cubic-bezier(.22, 1, .36, 1); }

/* ---------- Rychlý zápis (Domů na počítači) ---------- */
.qz .seg { margin-bottom: 4px; }
.qz-amt { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 18px 0 2px; cursor: text; }
.qz-amt input {
  all: unset; box-sizing: content-box; width: 1.3ch; min-width: 1.3ch; max-width: 9ch; text-align: right; /* kurzor bliká hned za nulou / číslem, ne uprostřed */
  font: inherit; font-size: 54px; font-weight: 900; letter-spacing: -1.5px; line-height: 1.1; color: var(--ink); caret-color: var(--pink-dd);
  transition: width .15s;
}
.qz-amt input::placeholder { color: #E6DADA; opacity: 1; }
html[data-mode="dark"] .qz-amt input::placeholder { color: #4A4450; }
.qz-sign { font-size: 38px; font-weight: 900; color: var(--pink-dd); opacity: 0; transform: translateX(8px) scale(.6); transition: opacity .25s, transform .35s cubic-bezier(.34, 1.45, .5, 1), color .3s; }
.qz-amt.has .qz-sign { opacity: 1; transform: none; }
.qz-cur { font-size: 22px; font-weight: 800; color: var(--mut); }
.qz-amt.pop input { animation: qzPop .4s ease-out; }
.qz.inc .qz-sign { color: var(--green); }
.qz.inc .qz-amt input { caret-color: var(--green); }
.qz-pick { text-align: center; font-size: 13.5px; color: var(--mut); min-height: 22px; margin: 2px 0 6px; transition: color .25s; }
.qz-pick.on { color: var(--ink2); }
.qz-pick .e { margin-right: 5px; }
.qz-pick b { color: var(--ink); }
.qz-body { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.qz-lbl { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 2px 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.qz-lbl a { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--pink-dd); }
.qz.inc .qz-lbl a { color: var(--green); }
.qz-favs { display: flex; flex-wrap: wrap; gap: 8px; }
.qz-favs .fav, .qz-sheetfavs .fav { transition: transform .15s, border-color .2s, background .2s; }
.qz-favs .fav:active, .qz-sheetfavs .fav:active, .qz-cat:active { transform: scale(.94); }
.fav.add { background: transparent; box-shadow: none; border: 1.5px dashed var(--line); color: var(--mut); }
.qz.inc .fav.on, .sheet:has(#kind.inc) .qz-sheetfavs .fav.on { border-color: var(--green); background: color-mix(in srgb, var(--green) 12%, var(--card)); }
.qz-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.qz-cat {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 70px; padding: 10px 6px;
  border-radius: 14px; background: var(--bg); border: 1.5px solid transparent; color: var(--ink2);
  font-weight: 700; font-size: 12.5px; line-height: 1.2; text-align: center; cursor: pointer;
  transition: transform .15s, border-color .2s, background .2s, box-shadow .2s, color .2s;
}
.qz-cat .e { font-size: 22px; line-height: 1; }
.qz-cat .t { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.qz-cat.on { background: var(--card); border-color: var(--pink); color: var(--ink); box-shadow: 0 4px 14px rgba(217, 83, 91, .16); }
.qz.inc .qz-cat.on, .fv-cats.inc .qz-cat.on { border-color: var(--green); box-shadow: 0 4px 14px rgba(46, 150, 100, .16); }
.qz-cat.more { color: var(--mut); border: 1.5px dashed var(--line); background: transparent; }
@media (hover: hover) {
  .qz-cat:not(.on):hover { border-color: var(--line); background: var(--card); }
  .qz-favs .fav:not(.on):hover { transform: translateY(-1px); }
}
.qz-note { margin: 16px 0 10px; }
.qz-save { transition: background .3s, opacity .25s, transform .15s; }
.qz.inc .qz-save { background: var(--green); }

/* ---------- okno s otevřenou klávesnicí (app.js sheet → .kb): sedí přesně nad klávesnicí ---------- */
.sheet { transition: transform .32s cubic-bezier(.2, .9, .3, 1), bottom .22s ease-out, max-height .22s ease-out; }
.sheet.kb { padding-bottom: 14px; border-radius: 24px 24px 0 0; }
.sheet.kb .grab { margin-bottom: 8px; }
.sheet.kb h2 { margin-bottom: 8px; }

/* ---------- rychlé částky +20 / +50 … a − pod částkou ---------- */
.amount { position: relative; }
.sheet .qk + .qz-sheetfavs, .sheet .qk + .cats { margin-top: 0; }
/* čisté a jednotné: plus i mínus stejná bílá karta s jemným obrysem, liší se jen barvou znaménka (plus = značková, mínus = šedá) */
.qk { --qa: var(--pink-dd); --qbg: var(--pink-ll); --qbd: var(--pink-l); display: grid; gap: 6px; margin: -4px 0 14px; }
.sheet:has(#kind.inc) .qk { --qa: var(--green); --qbg: var(--green-l); --qbd: color-mix(in srgb, var(--green) 30%, var(--card)); }
.qk-row { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 6px; }
.qk-row button {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: center; gap: 1px;
  min-height: 38px; padding: 6px 2px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(90, 40, 50, .04);
  font-weight: 800; font-size: 14.5px; color: var(--ink); white-space: nowrap; letter-spacing: -.2px; font-variant-numeric: tabular-nums;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform .14s cubic-bezier(.34, 1.56, .64, 1), background .15s, border-color .15s, color .15s;
}
.qk-row button .s { color: var(--qa); margin-right: 1px; }
.qk-row.m button { color: var(--ink2); }
.qk-row.m button .s { color: var(--mut); }
/* stisk: jemné promáčknutí a nádech barvy */
.qk-row button:active, .qk-row button.held { transform: scale(.94); background: var(--qbg); border-color: var(--qbd); }
.qk-row.m button:active, .qk-row.m button.held { background: var(--bg); border-color: var(--line); }
.qk-row button.held { animation: qkHeld .5s ease-in-out infinite alternate; }
@keyframes qkHeld { from { transform: scale(.94); } to { transform: scale(.97); } }
/* vlnka od prstu */
.qk-row button .rp { position: absolute; z-index: -1; border-radius: 50%; background: var(--qa); opacity: .12; transform: scale(0); animation: qkRp .55s ease-out forwards; pointer-events: none; }
.qk-row.m button .rp { background: var(--mut); }
@keyframes qkRp { to { transform: scale(1); opacity: 0; } }
.qk.pv { margin: 0; pointer-events: none; }
.amount.pop input { animation: qzPop .32s ease-out; }
@keyframes qkShake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.amount.shake { animation: qkShake .28s ease; }
@keyframes qkFly { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, -6px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -34px); } }
.qk-fly { position: absolute; left: 50%; top: -6px; pointer-events: none; font-weight: 900; font-size: 17px; color: var(--pink-dd); animation: qkFly .72s ease-out forwards; }
.qk-fly.m { color: var(--mut); }
.sheet:has(#kind.inc) .qk-fly:not(.m) { color: var(--green); }
@media (hover: hover) { .qk-row button:not(:active):not(.held):hover { border-color: var(--qbd); } }
html[data-mode="dark"] .qk { --qbg: color-mix(in srgb, var(--qa) 16%, var(--card)); --qbd: color-mix(in srgb, var(--qa) 35%, var(--card)); }
html[data-mode="dark"] .qk-row button { border-color: #3A3541; box-shadow: none; }
html[data-look="klidny"] .qk-row button { box-shadow: none; transition-duration: .1s; }
html[data-look="klidny"] .qk-row button.held, html[data-look="klidny"] .qk-row button .rp { animation: none; }
html[data-look="klidny"] .amount.pop input { animation: none; }
html[data-look="klidny"] .qk-fly { display: none; }
@media (prefers-reduced-motion: reduce) { .amount.pop input, .amount.shake { animation: none; } .qk-fly { display: none; } }
/* nastavení v Oblíbených */
.qk-ins { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.qk-ins .inp { text-align: center; padding-left: 4px; padding-right: 4px; font-weight: 800; }
.qk-tg { margin-top: 10px; }
.qk-card.fv-saved { animation: fvSaved .9s ease-out; }
@media (max-width: 380px) { .qk { gap: 5px; } .qk-row { gap: 5px; } .qk-row button { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .qk-row button.held, .qk-row button .rp { animation: none; } }

/* ---------- vlastní číselná klávesnice (assets/numpad.js, jen telefon) ---------- */
/* okno: nahoře částka · uprostřed posuvné tělo · dole pevný dok (rychlé částky, klávesnice, Uložit) */
.sheet.np { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
.sheet.np.kb { padding-bottom: 0; }
.sheet.np > * { flex: none; }
.sheet.np > .np-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  margin: 0 -18px; padding: 2px 18px 12px; }
.np-body > .field { margin-bottom: 12px; }
.np-body .split { margin-bottom: 4px; }
.np-dock { margin: 0 -18px; padding: 8px 12px calc(10px + var(--safe-b)); background: var(--bg);
  border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -14px rgba(90, 40, 50, .18); }
.sheet.np.kb .np-dock { padding-bottom: 8px; }
.np-dock .qk { margin: 0 0 8px; }

/* klávesnice se schová plynule (poznámka = systémová klávesnice) */
.np-pad-w { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows .34s cubic-bezier(.2, .9, .3, 1), opacity .22s ease, margin .34s; margin-bottom: 8px; }
.np-pad-in { min-height: 0; overflow: hidden; }
.sheet.np-off .np-pad-w { grid-template-rows: 0fr; opacity: 0; margin-bottom: 0; }
.np-pad { display: grid; grid-template-columns: repeat(3, 1fr) 1.15fr; gap: 6px;
  grid-template-areas: "k1 k2 k3 dl" "k4 k5 k6 go" "k7 k8 k9 go" "cm z z go"; }
/* vysoké tlačítko Přidat vpravo – na dosah palce; neaktivní = tlumené (klepnutí ukáže, co chybí) */
.np-go { grid-area: go; display: flex; }
.np-go #save {
  width: 100%; height: auto; min-height: 0; margin: 0; padding: 8px 6px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 15.5px; font-weight: 800; line-height: 1.15; text-align: center; white-space: normal; overflow-wrap: anywhere;
  transition: transform .16s cubic-bezier(.34, 1.56, .64, 1), background .25s, color .25s, box-shadow .25s, opacity .25s;
}
.np-go #save::before {
  content: ''; width: 30px; height: 30px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.np-go #save:disabled { pointer-events: none; opacity: 1; background: color-mix(in srgb, var(--line) 70%, var(--card)); color: var(--mut); box-shadow: none; }
.np-go #save:not(:disabled):active { transform: scale(.95); }
.sheet:has(#kind.inc) .np-go #save:not(:disabled) { background: var(--green); box-shadow: 0 8px 20px rgba(34, 176, 125, .28); }
@keyframes npReady { 0% { transform: scale(.94); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
.np-go #save:not(:disabled) { animation: npReady .35s cubic-bezier(.34, 1.56, .64, 1); }
/* „vyber kategorii“ – kategorie krátce zapulzují */
@keyframes npNeed { 0%, 100% { box-shadow: none; } 30%, 70% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 45%, transparent); } }
#cats.np-need .cat { animation: npNeed .9s ease; }
.np-k {
  height: 54px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(90, 40, 50, .05);
  display: flex; align-items: center; justify-content: center;
  font-size: 25px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer;
  transition: transform .16s cubic-bezier(.34, 1.56, .64, 1), background .12s, box-shadow .12s;
}
.np-k.fn { background: transparent; box-shadow: none; color: var(--ink2); }
.np-k.cm { font-size: 30px; font-weight: 800; padding-bottom: 8px; }
.np-k svg { width: 27px; height: 27px; }
.np-k.dn { transform: scale(.94); background: var(--pink-ll); box-shadow: inset 0 0 0 1px var(--pink-l); transition-duration: .06s; }
.np-k.fn.dn { background: color-mix(in srgb, var(--line) 80%, transparent); box-shadow: none; }
.sheet:has(#kind.inc) .np-k:not(.fn).dn { background: var(--green-l); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 30%, var(--card)); }
html[data-mode="dark"] .np-k { box-shadow: inset 0 0 0 1px #3A3541; }
html[data-mode="dark"] .np-k.fn { box-shadow: none; }
html[data-mode="dark"] .np-dock { border-top-color: #2B2731; box-shadow: 0 -10px 24px -14px rgba(0, 0, 0, .6); }
/* částka: vlastní blikající kurzor, menší písmo u dlouhých čísel, jemné „ťuk“ po každé číslici */
.np .amount { margin: 0 0 10px; cursor: pointer; -webkit-user-select: none; user-select: none; }
.np .amount input { caret-color: transparent; transition: font-size .18s ease; pointer-events: none; }
.np .amount[data-len="l"] input { font-size: 42px; }
.np .amount[data-len="xl"] input { font-size: 34px; }
.np-caret { flex: none; align-self: center; width: 3px; height: 44px; margin-left: -4px; border-radius: 2px; background: var(--pink-dd); animation: npBlink 1.1s steps(1) infinite; transition: opacity .2s; }
.sheet:has(#kind.inc) .np-caret { background: var(--green); }
.np.np-off .np-caret { opacity: 0; animation: none; }
@keyframes npBlink { 50% { opacity: 0; } }
@keyframes npTick { 0% { transform: scale(1); } 45% { transform: scale(1.035); } 100% { transform: scale(1); } }
.np .amount.np-tick input { animation: npTick .18s ease-out; }
html[data-look="klidny"] .np .amount.np-tick input, html[data-look="klidny"] .np-pad-w { animation: none; transition-duration: .12s; }
@media (prefers-reduced-motion: reduce) { .np .amount.np-tick input { animation: none; } .np-pad-w { transition: none; } .np-caret { animation: none; } }
@media (max-height: 700px) { .np-k { height: 46px; font-size: 23px; } .sheet.np h2 { margin-bottom: 8px; } }

/* ---------- cvaknutí na iPhonu (numpad.js): neviditelný systémový přepínač přes celé tlačítko, klepnutí ho přepne = haptika ---------- */
#fab:has(> .hx), .np-k:has(> .hx), .qk-row button:has(> .hx), .np-go #save:has(> .hx), .sheet .cat:has(> .hx), .sheet .fav:has(> .hx), .sheet #kind > button:has(> .hx), .sheet .days > button:has(> .hx) { position: relative; overflow: hidden; }
.hx {
  position: absolute !important; left: 50%; top: 50%; z-index: 4; margin: 0 !important; padding: 0; border: 0;
  width: 100%; height: 100%; min-width: 100%; min-height: 100%; transform: translate(-50%, -50%) scale(2.4);
  opacity: .012; cursor: pointer; -webkit-tap-highlight-color: transparent; accent-color: transparent; outline: none;
}
.hx:focus, .hx:focus-visible { outline: none; box-shadow: none; }

/* ---------- „Zahodit rozepsaný zápis?“ (app.js sheet → el._guard) ---------- */
.sh-ask {
  position: absolute; left: 12px; right: 12px; top: 10px; z-index: 5; display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 10px 14px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: var(--sh-l);
  font-weight: 700; font-size: 14.5px; opacity: 0; transform: translateY(-10px) scale(.97);
  transition: opacity .2s, transform .28s cubic-bezier(.34, 1.4, .64, 1);
}
.sh-ask.on { opacity: 1; transform: none; }
.sh-ask span { flex: 1; min-width: 0; }
.sh-ask button { flex: none; padding: 8px 12px; border-radius: 11px; font-weight: 800; font-size: 14px; }
.sh-ask .sh-no { background: rgba(255, 255, 255, .14); color: #fff; }
.sh-ask .sh-yes { background: var(--red); color: #fff; }
html[data-mode="dark"] .sh-ask { background: #3A3541; }

/* ---------- 🔁 Opakovat: Měsíčně / Čtvrtletně / Půlročně / Ročně plynule vyjedou až po zapnutí (app.js drawSplit → .rec-evw.on) ---------- */
.rec-evw { display: grid; grid-template-rows: 0fr; opacity: 0; margin: 0; pointer-events: none;
  transition: grid-template-rows .4s cubic-bezier(.2, .9, .3, 1), opacity .22s ease, margin .4s cubic-bezier(.2, .9, .3, 1); }
.rec-evw.on { grid-template-rows: 1fr; opacity: 1; margin: 8px 0 12px; pointer-events: auto; transition-timing-function: cubic-bezier(.2, .9, .3, 1), ease-out, cubic-bezier(.2, .9, .3, 1); }
.rec-evin { min-height: 0; overflow: hidden; margin: 0 -3px; padding: 0 3px 3px; }
.rec-evw .rec-ev { margin: 0; }
@keyframes recEvIn { from { opacity: 0; transform: translateY(-10px) scale(.92); } to { opacity: 1; transform: none; } }
.rec-evw.on .rec-ev button { animation: recEvIn .38s cubic-bezier(.34, 1.45, .5, 1) backwards; }
.rec-evw.on .rec-ev button:nth-child(1) { animation-delay: .06s; }
.rec-evw.on .rec-ev button:nth-child(2) { animation-delay: .1s; }
.rec-evw.on .rec-ev button:nth-child(3) { animation-delay: .14s; }
.rec-evw.on .rec-ev button:nth-child(4) { animation-delay: .18s; }
.rec-evw .rec-ev button { transition: transform .16s cubic-bezier(.34, 1.56, .64, 1), border-color .2s, color .2s, background .2s; }
.rec-evw .rec-ev button:active { transform: scale(.95); }
/* přepínač plynule přejde do růžové a jezdec dojede s malým pérem */
.rec-tg i, .rec-tg i::after { transition: background .25s ease, transform .34s cubic-bezier(.34, 1.45, .5, 1), left .34s cubic-bezier(.34, 1.45, .5, 1); }
html[data-look="klidny"] .rec-evw { transition-duration: .15s; }
html[data-look="klidny"] .rec-evw.on .rec-ev button { animation: none; }
@media (prefers-reduced-motion: reduce) { .rec-evw { transition: none; } .rec-evw.on .rec-ev button { animation: none; } }

/* ---------- okno Nový pohyb (mobil) a stránka Oblíbené ---------- */
.qz-sheetfavs .favs { touch-action: pan-x pan-y; }
/* v2.23: poznámka hned pod oblíbenými (desktop.js favChipsInSheet) */
.sheet .field.note-top { margin: 10px 0 12px; }
.sheet #cats { touch-action: pan-y; }
.fv-tabs { margin: 4px 0 14px; }
.fv-tabs button small { display: inline-block; min-width: 20px; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: rgba(0, 0, 0, .06); font-size: 12px; font-weight: 800; }
.fv-cats { margin-bottom: 14px; }
.btn.fv-inc { background: var(--green); }

/* Oblíbené: úchyt ⠿ vlevo (přetahování), ✏️ úprava, klepnutí na řádek = úprava */
.fv-list { position: relative; }
.fv-list .fv-row { position: relative; background: var(--card); cursor: pointer; transition: transform .24s cubic-bezier(.22, 1, .36, 1), box-shadow .2s, background .2s; }
.fv-grip {
  all: unset; box-sizing: border-box; flex: none; width: 30px; height: 46px; margin: 0 2px 0 -8px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 21px; line-height: 1; color: var(--mut);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: background .15s, color .15s;
}
.fv-grip:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.fv-grip:active { cursor: grabbing; }
.fv-list.fv-sorting, .fv-list.fv-sorting * { user-select: none; -webkit-user-select: none; cursor: grabbing !important; }
.fv-row.fv-drag { z-index: 3; transition: box-shadow .2s, background .2s; border-radius: 14px; background: var(--card); box-shadow: 0 12px 30px rgba(90, 40, 50, .2), 0 0 0 1.5px var(--pink-l); }
.fv-row.fv-drag .fv-grip { color: var(--pink-dd); background: var(--pink-l); }
.fv-row.fv-drop { transition: transform .19s ease-out, box-shadow .2s; }
@keyframes fvSaved { 0% { background: var(--pink-l); } 100% { background: var(--card); } }
.fv-row.fv-saved { animation: fvSaved .9s ease-out; }
.fv-row .fv-ed { font-size: 15px; }
.fv-dhint { margin: 10px 2px 0; }
@media (hover: hover) {
  .fv-grip:hover { background: var(--bg); color: var(--ink2); }
  .fv-list .fv-row:not(.fv-drag):hover { background: color-mix(in srgb, var(--pink-l) 35%, var(--card)); }
}
html[data-mode="dark"] .fv-row.fv-drag { box-shadow: 0 12px 30px rgba(0, 0, 0, .5), 0 0 0 1.5px var(--line); }
html[data-look="klidny"] .fv-list .fv-row { transition-duration: .12s; }
@media (prefers-reduced-motion: reduce) { .fv-list .fv-row, .fv-row.fv-drop { transition: none; } .fv-row.fv-saved { animation: none; } }

/* klidný styl a „omezit pohyb“: bez přejezdů */
html[data-look="klidny"] .qz-in-r, html[data-look="klidny"] .qz-in-l, html[data-look="klidny"] .qz-amt.pop input { animation: none; }
html[data-look="klidny"] .seg::before { transition-duration: .15s; transition-timing-function: ease; }
@media (prefers-reduced-motion: reduce) {
  .qz-in-r, .qz-in-l, .qz-amt.pop input { animation: none; }
  .seg::before { transition: none; }
}

/* ---------- Domů: hlavní karta měsíce – na den, běžné tempo, tlačítko „Jak se to počítá?“ ---------- */
.hero .lbl { display: flex; align-items: center; gap: 8px; }
.hero-i { font: inherit; font-size: 12px; font-weight: 800; width: 21px; height: 21px; padding: 0; line-height: 1; border-radius: 50%; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .18); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, transform .15s; }
.hero-i:hover { background: rgba(255, 255, 255, .35); transform: scale(1.08); }
.hero .perday { position: relative; font-size: 15px; font-weight: 600; line-height: 1.45; margin: 2px 0 8px; color: #fff; cursor: pointer; }
.hero .perday b { font-weight: 800; font-size: 17px; background: rgba(255, 255, 255, .24); padding: 1px 9px; border-radius: 9px; white-space: nowrap; }
.hero .perday small { display: block; font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .88); margin-top: 3px; }
.hero .proj.warn, .hero .proj.ok { display: inline-block; background: rgba(255, 255, 255, .18); border-radius: 11px; padding: 6px 11px; font-size: 13.5px; line-height: 1.4; margin: 0 0 10px; }
.hero .stat[title] { cursor: help; }

/* okno „Jak Kačka počítá tvůj měsíc“ */
.hm { border: 1.5px solid var(--grid, #F1E6E6); border-radius: 16px; padding: 2px 14px; margin: 4px 0 18px; overflow: hidden; }
.hm-r { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--grid, #F1E6E6); }
.hm-r:last-child { border-bottom: 0; }
.hm-r .e { width: 26px; flex: none; text-align: center; font-size: 18px; font-weight: 800; color: var(--mut, #9A8A8C); }
.hm-r .grow { min-width: 0; }
.hm-r small { display: block; font-size: 12.5px; font-weight: 600; color: var(--mut, #9A8A8C); margin-top: 2px; line-height: 1.35; }
.hm-r b { white-space: nowrap; font-size: 15px; }
.hm-r.tot { font-weight: 800; }
.hm-r.tot b { font-size: 17px; }
.hm-r.hi { background: var(--pink-l, #FFE3E3); margin: 0 -14px; padding: 13px 14px; font-weight: 800; }
.hm-r.hi b { font-size: 20px; color: var(--pink-dd, #D9535B); }
.sheet h3 { font-size: 15px; margin: 14px 0 4px; }
