/* La Pisa Skener — PWA. Tmavá neutrální šeď, korálově červený akcent,
   zelená jen pro finální „odesláno/doručeno", Archivo (nadpisy
   condensed přes font-stretch — písmo značky Spárováno), pill
   tlačítka, dotykové cíle >= 48 px. */

:root {
  --bg: #161616;
  --card: #1f1f1f;
  --card-2: #2a2a2a;
  --border: #2e2e2e;
  --text: #f5f5f5;
  --muted: #8e8e93;
  --accent: #f4503c;          /* brand — primární akce, aktivní stavy */
  --accent-soft: rgba(244, 80, 60, .15);
  --green: #35c759;           /* jen finální potvrzení (jako „Doručeno") */
  --yellow: #eab308;
  --red: #f4503c;
  --radius: 16px;
  --font: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Archivo', -apple-system, sans-serif; /* condensed přes font-stretch */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* overscroll i na html: gesto stažení dolů nesmí obnovit stránku
   uprostřed kontroly dokladu (reload = návrat do skeneru) */
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body.app {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font);
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior: none;
}

#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
[data-screen] { flex: 1; display: flex; flex-direction: column; padding-top: var(--safe-top); }
[hidden] { display: none !important; }

h1 { font-family: var(--font-head); font-stretch: 84%; font-size: 1.75rem; font-weight: 760; margin-bottom: .5rem; }
h2 { font-family: var(--font-head); font-stretch: 84%; font-size: 1.2rem; font-weight: 760; margin-bottom: .6rem; }
/* Malé logo + margin-top:auto — spolu s margin-top:auto na .bottom-hint
   drží přihlašovací blok vertikálně na středu (PWA instalační lišta
   nahoře pak nic nepřekrývá) a nápovědu s podpisem u spodního okraje. */
.pair-logo { width: 88px; margin: auto 0 .8rem; display: block; }
/* název produktu pod logem; větší mezera odděluje značku od nadpisu */
.pair-sub {
  font-family: var(--font-head); font-stretch: 84%; font-weight: 760; font-size: 1.05rem;
  margin-bottom: 2.6rem;
}
.muted { color: var(--muted); }
.center { text-align: center; }
.screen-pad {
  padding: 2.2rem 1.4rem calc(1.4rem + var(--safe-bottom)); max-width: 480px; margin: 0 auto; width: 100%;
  transition: transform .25s ease; /* měkké zvednutí PIN polí nad klávesnici (app.js) */
  /* flex sloupec: .bottom-hint s margin-top:auto (a logo pod ním) sedí u spodního okraje */
  display: flex; flex-direction: column; flex: 1;
}
.field-label { display: block; margin: 1.6rem 0 .5rem; font-weight: 500; }

/* ---------- tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.5rem;
  border: none; border-radius: 999px;
  background: var(--card-2); color: var(--text);
  font-family: var(--font);
  font-size: 1.02rem; font-weight: 500; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-success { background: var(--green); color: #06170c; }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.btn-warn { background: var(--yellow); color: #241c02; }
.btn-block { width: 100%; margin-top: 1.4rem; }
.linklike { background: none; border: none; color: var(--text); font: inherit; cursor: pointer; padding: .4rem; }
.pill-link {
  display: inline-block; padding: .55rem 1.2rem; border-radius: 999px;
  background: var(--card-2); color: var(--text); text-decoration: none; font-weight: 500;
  border: none; cursor: pointer; font-family: var(--font); font-size: 1rem;
  -webkit-tap-highlight-color: transparent;
}

/* mini-dialog s odpovědí („Kde vezmu PIN?") */
/* dobrovolné odhlášení zařízení dole v Aktivitě — decentní */
.device-logout-row { text-align: center; margin: 1.8rem 0 .6rem; }
.device-logout-row .linklike { color: var(--muted); font-size: .92rem; }

/* ---------- prohlížeč naskenovaného dokladu (z potvrzení) ---------- */
.doc-viewer {
  position: fixed; inset: 0; z-index: 140; background: var(--bg);
  display: flex; flex-direction: column;
}
.dv-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(.9rem + var(--safe-top)) 1.2rem .9rem;
  border-bottom: 1px solid var(--border); flex: none;
}
.dv-title { font-family: var(--font-head); font-stretch: 84%; font-weight: 760; }
.dv-scroll {
  overflow-y: auto; flex: 1;
  padding: 1rem 1rem calc(1.6rem + var(--safe-bottom));
  display: grid; gap: 1rem; align-content: start;
}
.dv-hint { color: var(--muted); font-size: .85rem; text-align: center; }
.dv-page { position: relative; }
.dv-page img { width: 100%; display: block; border-radius: 10px; }
.dv-frame { width: 100%; height: 72vh; border: none; border-radius: 10px; background: var(--card); }
/* pás přes nejistý řádek — poloprůhledná červená, ať zůstane čitelný */
.dv-band {
  position: absolute; left: 0; right: 0;
  background: rgba(244, 80, 60, .28);
  border-top: 2px solid rgba(244, 80, 60, .85);
  border-bottom: 2px solid rgba(244, 80, 60, .85);
  border-radius: 3px;
}
.dv-empty { color: var(--muted); text-align: center; padding: 1.6rem 0; }

/* ---------- fullscreen dialog (náhrada alert/confirm) ---------- */
.app-dialog {
  position: fixed; inset: 0; z-index: 130; background: var(--bg);
  display: flex; flex-direction: column;
  padding: calc(2.2rem + var(--safe-top)) 1.4rem calc(1.4rem + var(--safe-bottom));
}
.app-dialog .ad-body { margin: auto 0; text-align: center; padding-bottom: 1rem; }
.ad-icon {
  width: 104px; height: 104px; border-radius: 50%; margin: 0 auto 1.6rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(234, 179, 8, .15); color: var(--yellow);
  animation: sent-pop .4s cubic-bezier(.2, 1.4, .4, 1);
}
.ad-icon svg { width: 46px; height: 46px; }
.ad-icon.danger { background: var(--accent-soft); color: #ff7a69; }
.app-dialog p { line-height: 1.5; max-width: 420px; margin: 0 auto; }
.ad-actions { display: grid; gap: .75rem; max-width: 480px; margin: 0 auto; width: 100%; }
.ad-actions .btn-block { margin-top: 0; }

.app-tip-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  display: flex; align-items: center; justify-content: center; padding: 1.2rem;
}
.app-tip {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.5rem 1.6rem; width: min(400px, 100%);
}
.app-tip p { margin-bottom: .6rem; line-height: 1.5; }

/* naznačený terminál Reservo Eats — kde PIN hledat */
.tip-terminal {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: .75rem .9rem .6rem; margin: .9rem 0 1rem;
}
.tt-tabs { display: flex; gap: .4rem; margin-bottom: .8rem; }
.tt-tabs span {
  padding: .22rem .65rem; border-radius: 999px;
  background: var(--card-2); color: var(--muted);
  font-size: .72rem; font-weight: 500;
}
.tt-tabs span.active { background: var(--accent); color: #fff; }
.tt-label { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; text-align: center; }
.tt-pin {
  font-family: var(--font-head); font-stretch: 84%; font-weight: 760; font-size: 1.7rem;
  letter-spacing: .3em; text-align: center; padding-left: .3em;
}
.bottom-hint { margin-top: auto; text-align: center; padding-top: 2rem; }

/* Inline SVG ikony — barvu dědí z textu. */
svg.icon { width: 1em; height: 1em; vertical-align: -0.12em; }

/* patička přihlášení: instalační pill, nápověda, podpis */
.pair-footer {
  margin-top: auto; padding-top: 2rem;
  display: grid; gap: .75rem; justify-items: center; text-align: center;
}
/* horní lišta s výzvou k instalaci — vlastní náhrada Chromí mini-infobar
   (vzor „app banner": dlaždice s ikonou, název, popisek, akce) */
.install-bar {
  display: flex; align-items: center; gap: .8rem;
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: .65rem .9rem;
  padding-top: calc(.65rem + var(--safe-top));
}
.install-bar .ib-appicon {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem;
}
.install-bar .ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.install-bar .ib-text strong { font-weight: 500; font-size: .95rem; }
.install-bar .ib-sub { color: var(--muted); font-size: .8rem; }
.install-bar .ib-action {
  flex: none; border: none; border-radius: 999px;
  background: var(--accent); color: #fff;
  font: inherit; font-weight: 500; padding: .45rem 1.1rem; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.install-bar .ib-close {
  flex: none; background: none; border: none; color: var(--muted);
  font-size: 1.35rem; line-height: 1; padding: .2rem .35rem; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- stavové lišty ---------- */
.flash {
  border-radius: 10px; padding: .8rem 1rem; margin: 1rem 0;
  font-weight: 500; font-size: .95rem;
}
.flash-success { background: var(--green); color: #06170c; }
.flash-warning { background: var(--yellow); color: #241c02; }
.flash-error { background: var(--red); color: #fff; }

.offline-bar {
  background: var(--yellow); color: #241c02;
  text-align: center; padding: .55rem .8rem; font-weight: 500; font-size: .9rem;
  padding-top: calc(.55rem + var(--safe-top));
}

/* PIN zámek nemá logo ani patičku — na střed jde celý obsah. */
[data-screen="pin"] .screen-pad { justify-content: center; }

/* ---------- PIN — 6 samostatných políček (jako pokladní appka) ---------- */
.pin-boxes { display: flex; gap: .5rem; margin-top: 1.2rem; }
.pin-boxes input {
  flex: 1; min-width: 0; max-width: 60px; min-height: 58px; aspect-ratio: 4/5; padding: 0;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); font-family: var(--font);
  font-size: 1.5rem; font-weight: 500; text-align: center;
  caret-color: var(--accent);
}
.pin-boxes input:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* decentní podpis Reservo Eats dole na přihlášení */
.eats-brand { text-align: center; padding-top: 1.6rem; color: var(--muted); opacity: .55; }
.eats-brand svg { height: 13px; width: auto; display: inline-block; }

/* ---------- hlavička obrazovek ---------- */
.app-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.2rem;
  font-family: var(--font-head); font-stretch: 84%; font-size: 1.1rem; font-weight: 760;
}
.app-head .linklike { font-size: 1.4rem; }

/* ---------- skener ---------- */
.camera-wrap {
  position: relative; flex: 1; margin: 0 1rem;
  border-radius: var(--radius); overflow: hidden; background: #000;
  display: flex; align-items: center; justify-content: center;
  min-height: 300px;
}
#camera-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera-fallback { position: relative; z-index: 2; color: var(--muted); text-align: center; padding: 1.5rem; }

/* navazování dlouhého dokladu — spodek minulé části nahoře v hledáčku */
.scan-prev {
  position: absolute; top: 0; left: 0; right: 0; height: 110px;
  overflow: hidden; z-index: 2; pointer-events: none;
  border-bottom: 2px dashed var(--accent);
  background: #000;
}
.scan-prev img {
  width: 100%; height: 100%; object-fit: cover; object-position: bottom;
  opacity: .8; display: block;
}
.scan-prev span {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
  background: rgba(0, 0, 0, .65); color: #fff;
  font-size: .72rem; font-weight: 500; white-space: nowrap;
  padding: .2rem .6rem; border-radius: 999px;
}

.scan-frame { position: absolute; inset: 12%; pointer-events: none; z-index: 1; }
.scan-frame i { position: absolute; width: 34px; height: 34px; border: 0 solid #fff; opacity: .95; }
.scan-frame i:nth-child(1) { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 10px; }
.scan-frame i:nth-child(2) { top: 0; right: 0; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 10px; }
.scan-frame i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 10px; }
.scan-frame i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 10px; }

.scan-controls {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 1.1rem 1.1rem calc(1.1rem + var(--safe-bottom));
  gap: .6rem;
}
/* jeden řádek — „Nahrát soubor" se nesmí zalomit */
.upload-btn {
  justify-self: start; font-size: .9rem; min-height: 46px;
  white-space: nowrap; padding: 0 1rem;
}
.scan-controls-spacer { }
.shutter {
  width: 74px; height: 74px; border-radius: 50%;
  border: 5px solid #fff; background: var(--card-2);
  box-shadow: 0 0 0 4px rgba(255,255,255,.12);
  cursor: pointer; justify-self: center;
  -webkit-tap-highlight-color: transparent;
}
.shutter:active { background: var(--accent); }

/* ---------- Aktivita (rozpracované + dnes odeslané) ---------- */
.today-list { flex: 1; overflow-y: auto; padding: 0 1rem calc(1rem + var(--safe-bottom)); }
.list-head {
  font-family: var(--font-head); font-stretch: 84%; font-weight: 760; font-size: 1rem;
  margin: 1.1rem 0 .6rem; color: var(--text);
}
.doc-card {
  background: var(--card); border-radius: var(--radius);
  padding: .95rem .4rem .95rem 1.1rem; margin-bottom: .7rem;
  display: flex; align-items: center; gap: .6rem;
}
.doc-card.doc-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.doc-card.doc-tap:active { background: var(--card-2); }
.doc-main { flex: 1; min-width: 0; }
.doc-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-sub { color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.doc-cta { color: var(--accent); }
.doc-amount { font-weight: 500; white-space: nowrap; }
/* zahození = samostatný křížek s velkou dotykovou zónou u kraje */
.doc-discard-x {
  flex: none; width: 46px; height: 46px;
  background: none; border: none; color: var(--muted);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.doc-discard-x:active { color: #ff6b70; }
.sent-row {
  background: var(--card); border-radius: var(--radius);
  padding: .8rem 1.1rem; margin-bottom: .55rem;
  display: flex; align-items: center; gap: .8rem;
}
.sr-amount { font-weight: 500; white-space: nowrap; }
.doc-badge {
  font-size: .72rem; font-weight: 500; padding: .2rem .55rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .03em;
}
.doc-badge.draft { background: var(--yellow); color: #241c02; }
.doc-badge.ok { background: var(--green); color: #06170c; }
.doc-badge.superseded { background: var(--red); color: #fff; }
.doc-fix { font-size: .85rem; color: var(--accent); background: none; border: 1px solid var(--accent); border-radius: 999px; padding: .3rem .8rem; cursor: pointer; font-family: var(--font); }
.doc-discard { color: var(--muted); font-size: .8rem; }
.day-summary {
  background: var(--card-2); border-radius: var(--radius);
  padding: .9rem 1.1rem; margin-bottom: .9rem; font-size: .95rem;
}
.day-summary strong { font-size: 1.15rem; display: block; margin-bottom: .15rem; }

/* ---------- úspěšné odeslání ---------- */
.sent-check {
  width: 104px; height: 104px; border-radius: 50%;
  background: var(--green); color: #06170c;
  display: flex; align-items: center; justify-content: center;
  animation: sent-pop .4s cubic-bezier(.2, 1.4, .4, 1);
}
.sent-check svg { width: 50px; height: 50px; }
@keyframes sent-pop {
  0% { transform: scale(.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- zpracování ---------- */
.processing { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem; padding: 1.4rem; text-align: center; }
/* nadpis stavu velký, upřesnění času menší tlumené hned pod ním */
.processing h2 { font-size: 1.45rem; margin: 0; }
#processing-sub { margin-top: -0.8rem; font-size: .92rem; }
.retry-icon { font-size: 3rem; color: var(--yellow); }
.processing .btn-block { max-width: 320px; margin-top: 0; }
.add-page { width: 100%; margin: .2rem 0 1rem; font-size: .92rem; }
.spinner {
  width: 52px; height: 52px; border-radius: 50%;
  border: 4px solid var(--card-2); border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- potvrzení ---------- */
#confirm-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.confirm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.2rem;
  font-family: var(--font-head); font-stretch: 84%; font-weight: 760; font-size: 1.05rem;
}
.confirm-scroll { flex: 1; overflow-y: auto; padding: 0 1.2rem 1rem; }
.confirm-scroll label { display: block; margin-bottom: .9rem; font-size: .9rem; color: var(--muted); }
.confirm-scroll input[type="text"], .confirm-scroll input[type="date"],
.confirm-scroll select {
  width: 100%; margin-top: .3rem;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: var(--font); font-size: 1rem; padding: .7rem .8rem;
  -webkit-appearance: none; appearance: none;
}
.confirm-scroll input:focus, .confirm-scroll select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.confirm-scroll input.field-uncertain, .confirm-scroll select.field-uncertain {
  border-color: var(--yellow); background: rgba(234, 179, 8, .08);
}

/* hlavička: titulek na středu (grid 1fr auto 1fr) */
.confirm-head { display: grid; grid-template-columns: 1fr auto 1fr; }
.confirm-head > :first-child { justify-self: start; }
.confirm-head .ch-title { justify-self: center; }

/* stavový proužek: zelená = vše sedí, žlutá = závady k vyřízení */
.status-strip { border-radius: 12px; padding: .85rem 1rem; margin: .3rem 0 1rem; font-weight: 500; }
.status-strip.ok { background: rgba(53, 199, 89, .16); color: var(--green); }
.status-strip.warn { background: rgba(234, 179, 8, .14); color: var(--yellow); }
.status-strip.warn ul { margin: .45rem 0 0 1.1rem; font-weight: 400; }
.status-strip.warn li { margin: .2rem 0; }

/* read-only karty souhrnu */
.ro-card { background: var(--card); border-radius: 12px; padding: .35rem 1rem; margin-bottom: .8rem; }
.ro-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .55rem 0; border-bottom: 1px solid var(--border);
}
.ro-row:last-child { border-bottom: none; }
.ro-row span { color: var(--muted); font-size: .9rem; flex: none; }
.ro-row strong { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.ro-total strong { font-family: var(--font-head); font-stretch: 84%; font-size: 1.25rem; }

/* položka jen ke čtení: název přes šířku, pod ním částka a sazba */
.item-view {
  background: var(--card); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .5rem;
  display: grid; grid-template-columns: 1fr auto; gap: .15rem .8rem;
}
.item-view.uncertain { outline: 1px solid var(--yellow); }
.item-view .iv-name { grid-column: 1 / -1; font-weight: 500; overflow-wrap: anywhere; }
.item-view .iv-amount { color: var(--text); }
.item-view .iv-rate { color: var(--muted); justify-self: end; }

/* nadpisy sekcí souhrnu */
.confirm-scroll .confirm-section {
  font-family: var(--font-head); font-stretch: 84%; font-weight: 760; font-size: 1.05rem;
  color: var(--text); margin: 1.4rem 0 .6rem;
}

/* obrysové tlačítko (bílý border + text) */
.btn-outline { background: none; border: 1px solid rgba(255, 255, 255, .55); color: var(--text); }
.btn-outline .icon { margin-right: .5rem; }
.confirm-footer .btn-block { margin-top: .6rem; }
.confirm-footer .btn-block:first-child { margin-top: 0; }
.add-page .icon { margin-right: .55rem; font-size: 1.1em; }
.add-note .icon { font-size: .95em; }

/* poznámka pro kancelář */
.note-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.note-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: .9rem 1.2rem; font-family: var(--font-head); font-stretch: 84%; font-weight: 760; font-size: 1.05rem; }
.note-head > :first-child { justify-self: start; }
.note-head .ch-title { justify-self: center; }
.note-guide { padding: 0 1.2rem .6rem; font-size: .9rem; }
.note-area {
  flex: 1; margin: 0 1.2rem 1rem; padding: .9rem 1rem; min-height: 0;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); font: inherit; resize: none;
}
.note-area:focus { outline: 2px solid var(--accent); border-color: transparent; }
.note-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: .7rem .9rem; margin-bottom: .7rem;
}
.note-box .nb-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.note-box .nb-edit { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: .15rem; }
.note-box .nb-edit:hover { color: var(--text); }
.note-box p { margin-top: .35rem; overflow-wrap: anywhere; }

.confirm-footer {
  border-top: 1px solid var(--border); background: var(--card);
  padding: .9rem 1.2rem calc(.9rem + var(--safe-bottom));
}

/* swipe-to-confirm (jako Wolt) — přetažením palce doprava se odesílá */
.swipe-confirm {
  position: relative; height: 58px; border-radius: 999px;
  background: var(--card-2); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.sc-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: rgba(53, 199, 89, .22); z-index: 0;
}
.sc-label {
  position: relative; z-index: 1; pointer-events: none;
  font-family: var(--font-head); font-stretch: 84%; font-weight: 760; font-size: 1.02rem;
  padding: 0 2.2rem 0 3.4rem; text-align: center;
}
.sc-chevrons { position: absolute; right: 16px; z-index: 1; pointer-events: none; color: var(--green); font-size: 1.35rem; line-height: 1; }
.sc-chevrons i { font-style: normal; opacity: .25; animation: sc-chev 1.3s infinite; }
.sc-chevrons i:nth-child(2) { animation-delay: .18s; }
.sc-chevrons i:nth-child(3) { animation-delay: .36s; }
@keyframes sc-chev { 0%, 55%, 100% { opacity: .25; } 25% { opacity: 1; } }
.sc-thumb {
  position: absolute; left: 4px; top: 4px; width: 50px; height: 50px;
  border-radius: 50%; border: none; z-index: 2;
  background: var(--green); color: #06170c;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; cursor: grab;
  transition: transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.sc-thumb.dragging { transition: none; cursor: grabbing; }
.sc-thumb .icon { width: .95em; height: .95em; }

/* ---------- nafocené části (odložené čtení) ---------- */
.parts {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: .9rem;
  padding: 1.4rem; text-align: center;
}
.parts img { max-height: 32vh; max-width: 72%; border-radius: 12px; border: 1px solid var(--border); }
.parts h2 { margin: 0; }
.parts .btn-block { max-width: 340px; margin-top: 0; }
.parts .btn .icon { margin-right: .55rem; }
.parts .parts-discard { color: var(--muted); font-size: .9rem; }
.confirm-sums { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .88rem; color: var(--muted); margin-bottom: .6rem; }
.confirm-sums strong { color: var(--text); }
.confirm-mismatch { color: var(--yellow); font-weight: 500; font-size: .88rem; margin-bottom: .6rem; }
.confirm-error { color: var(--red); font-weight: 500; font-size: .9rem; margin-bottom: .6rem; }
.confirm-footer .btn { width: 100%; }

/* ---------- tabbar ---------- */
.tabbar {
  display: flex; border-top: 1px solid var(--border); background: var(--bg);
  padding-bottom: var(--safe-bottom);
}
.tabbar button {
  flex: 1; min-height: 58px; background: none; border: none;
  color: var(--muted); font-family: var(--font);
  font-size: .72rem; font-weight: 500; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: .2rem; padding-top: .5rem;
  -webkit-tap-highlight-color: transparent;
}
.tabbar button.active { color: var(--accent); }

/* ---------- návod ---------- */
.navod .card {
  background: var(--card); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; margin: 1rem 0;
}
.navod ol, .navod ul { padding-left: 1.3rem; }
.navod li { margin: .45rem 0; }
.ios-share { color: var(--accent); }
