/* Rozvržení: světlé karty na neutrálním podkladu, spodní lišta pro hlavní části, kamera v tmavém rozhraní.
   Barvy ploch jsou záměrně bez odstínu: barevné okolí by zkreslovalo vnímání odstínu zubů. */
:root {
  --bg: #f3f4f5;
  --surface: #ffffff;
  --viewing: #b4b4b4;
  --ink: #12151a;
  --muted: #646a72;
  --line: #e2e4e8;
  --fill: #eceef0;
  --accent: #0a6b62;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ef;
  --danger: #b3261e;
  --ok: #14702f;
  --cam: #0e1012;
  --cam-ink: #f4f5f6;
  --cam-fill: #23272b;
  --gutter: 16px;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(16 20 24 / 0.06), 0 4px 14px rgb(16 20 24 / 0.05);
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --tabs: 62px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior-y: none;
}
#app { min-height: 100dvh; max-width: 760px; margin: 0 auto; }
canvas, img { display: block; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
svg { width: 22px; height: 22px; flex: none; }

.page { padding: calc(var(--top) + 8px) var(--gutter) calc(var(--bottom) + 104px); }
.page.with-tabs { padding-bottom: calc(var(--bottom) + var(--tabs) + 24px); }
.bar { display: flex; align-items: center; gap: 4px; min-height: 52px; margin: 0 -8px 8px; }
.bar h1 { font-size: 20px; font-weight: 680; letter-spacing: -0.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: none; border: 0; border-radius: 50%; cursor: pointer; }
.icon-btn:active { background: var(--fill); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-weight: 620; cursor: pointer; text-align: center; }
.btn:active { background: var(--fill); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:active { filter: brightness(0.92); }
.btn.danger { color: var(--danger); }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.5; }
.btn input[type=file], .action input[type=file] { display: none; }
.stack { display: grid; gap: 10px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px var(--gutter) calc(var(--bottom) + 12px); background: rgb(243 244 245 / 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); z-index: 5; }
.cta > * { max-width: 728px; margin: 0 auto; }

.muted { color: var(--muted); font-size: 14px; }
.section-title { font-size: 13px; font-weight: 680; color: var(--muted); margin: 24px 0 10px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select { min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 400; width: 100%; }
.card { display: grid; gap: 14px; padding: 16px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.card .field input, .card .field select { background: var(--bg); border-color: transparent; }
.note { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* Spodní lišta */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(var(--bottom) + 6px) max(8px, env(safe-area-inset-left, 0px)); background: rgb(255 255 255 / 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.tab { display: grid; justify-items: center; gap: 2px; min-height: 50px; padding: 5px 2px; border: 0; background: none; border-radius: 12px; font-size: 11.5px; font-weight: 620; color: var(--muted); cursor: pointer; }
.tab.on { color: var(--accent); }
.tab.on svg { background: var(--accent-soft); border-radius: 10px; box-shadow: 0 0 0 5px var(--accent-soft); }

/* Domů */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 6px; }
.home-head h1 { font-size: 30px; line-height: 1.1; font-weight: 720; letter-spacing: -0.025em; }
.btn.add { min-height: 46px; padding: 0 16px 0 12px; border-radius: 23px; flex: none; }
.empty { padding: 28px 0 12px; }
.empty h2 { font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
.steps { list-style: none; counter-reset: s; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 15px; }
.steps li::before { content: counter(s); grid-row: 1; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.steps li b { font-weight: 650; }
.case { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; background: var(--surface); border: 0; border-radius: 16px; box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.case:active { background: var(--fill); }
.case img, .avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; }
.case img { object-fit: cover; background: var(--viewing); }
.avatar { display: grid; place-items: center; background: var(--fill); color: var(--muted); font-weight: 700; font-size: 17px; }
.case .who { flex: 1; min-width: 0; display: grid; }
.case .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.case .tag { flex: none; padding: 4px 10px; border-radius: 10px; background: var(--fill); font-weight: 680; font-size: 14px; font-variant-numeric: tabular-nums; }

/* Hledání a filtry */
.filters { display: grid; gap: 10px; margin-top: 12px; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; min-height: 50px; padding: 0 14px 0 46px; border: 0; border-radius: 25px; background: var(--surface); box-shadow: var(--shadow); font-size: 16px; -webkit-appearance: none; appearance: none; }
.pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; min-height: 40px; padding: 0 15px; border-radius: 20px; border: 0; background: var(--fill); font-size: 14.5px; font-weight: 620; cursor: pointer; }
.pill.on { background: var(--ink); color: #fff; }
.month-head { margin: 10px 0 -2px; }
.no-results { padding: 20px 0; display: grid; gap: 12px; justify-items: start; }

/* Karta pacienta */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.action { display: grid; gap: 2px; align-content: start; padding: 14px; min-height: 108px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.action svg { width: 26px; height: 26px; margin-bottom: 8px; }
.action b { font-weight: 680; }
.action span { font-size: 13px; color: var(--muted); line-height: 1.3; }
.action.primary { background: var(--accent); color: var(--accent-ink); }
.action.primary span { color: rgb(255 255 255 / 0.82); }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shot { padding: 0; border: 0; background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.shot img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--viewing); }
.shot-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 8px 10px; }
.shot-cap b { font-weight: 680; font-variant-numeric: tabular-nums; }
.shot-cap span { font-size: 12.5px; color: var(--muted); }

/* Ukázky focení */
.examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .examples { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.example { background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.example-pic { position: relative; }
.example-pic img { width: 100%; height: auto; aspect-ratio: 435 / 578; object-fit: cover; background: var(--viewing); }
.verdict { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 6px; border-radius: 14px; color: #fff; font-size: 12.5px; font-weight: 680; }
.verdict svg { width: 15px; height: 15px; }
.verdict.ok { background: var(--ok); }
.verdict.bad { background: var(--danger); }
.example-text { padding: 10px 12px 12px; }
.example-text b { font-weight: 680; font-size: 15px; }
.example-text p { font-size: 13px; line-height: 1.35; margin-top: 2px; }
.checklist { margin-top: 14px; gap: 8px; }
.tips { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }

/* Označení zubů */
.mark { height: 100dvh; display: flex; flex-direction: column; padding-top: var(--top); }
.mark .bar { padding: 0 8px; margin: 0; flex: none; }
.stage { flex: 1; min-height: 0; background: var(--viewing); display: grid; place-items: center; overflow: hidden; }
.stage canvas { touch-action: none; }
.tools { flex: none; padding: 10px var(--gutter) calc(var(--bottom) + 12px); display: grid; gap: 10px; background: var(--bg); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; background: var(--fill); border-radius: var(--radius); }
.seg button { min-height: 42px; border: 0; border-radius: 11px; background: transparent; font-weight: 620; font-size: 15px; cursor: pointer; }
.seg button.on { background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.tool-row { display: flex; align-items: center; gap: 10px; }
.tool-row input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.tool-row .btn { min-height: 44px; padding: 0 12px; font-size: 14px; }
.hint { font-size: 14px; color: var(--muted); min-height: 20px; }

/* Výsledek */
.hero { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; }
.hero .label { font-size: 13px; font-weight: 620; color: var(--muted); }
.hero .main { display: flex; align-items: center; gap: 16px; margin: 6px 0 4px; }
.hero .code { font-size: 56px; line-height: 1; font-weight: 740; letter-spacing: -0.03em; }
.hero .swatch { width: 44px; height: 64px; border-radius: 10px 10px 18px 18px; border: 1px solid rgb(0 0 0 / 0.12); flex: none; }
.hero .alts { font-size: 15px; }
.hero .quality { margin-top: 10px; font-size: 14px; color: var(--muted); }
.hero .quality b { color: var(--ink); font-weight: 620; }
.hero .field { margin-top: 14px; }
.hero .field select { background: var(--bg); border-color: transparent; }
.hero .goal { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; }
.hero .goal b { font-weight: 680; }
.card-title { font-size: 18px; font-weight: 680; margin-bottom: 6px; }

.viewing { background: var(--viewing); margin: 16px calc(var(--gutter) * -1) 0; padding: 12px var(--gutter) 16px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { padding: 0; border: 0; background: var(--surface); border-radius: 12px; overflow: hidden; cursor: pointer; text-align: left; }
.tile canvas { width: 100%; height: auto; background: #999; }
.tile .cap { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 10px; }
.tile .cap b { font-weight: 680; }
.tile .cap span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile.now { outline: 3px solid var(--ink); outline-offset: -3px; }
.tile.now .cap span { color: var(--ink); font-weight: 680; }
.tile.goal-tile { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile.goal-tile .cap span { color: var(--accent); font-weight: 680; }
.progress { font-size: 14px; color: var(--ink); margin: 0 0 10px; min-height: 20px; }

/* Porovnání */
.compare { position: relative; background: var(--viewing); user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: ew-resize; border-radius: 16px; overflow: hidden; }
.compare canvas { width: 100%; height: auto; }
.compare .after { position: absolute; inset: 0; }
.compare .handle, .live-handle { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; transform: translateX(-1px); box-shadow: 0 0 4px rgb(0 0 0 / 0.6); pointer-events: none; }
.compare .handle::after, .live-handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #12151a; font-size: 16px; }
.compare .side { position: absolute; top: 10px; padding: 3px 10px; font-size: 13px; font-weight: 620; background: rgb(0 0 0 / 0.55); color: #fff; border-radius: 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); font-weight: 620; font-size: 15px; cursor: pointer; }
.chip i { width: 18px; height: 24px; border-radius: 4px 4px 8px 8px; border: 1px solid rgb(0 0 0 / 0.15); }
.chip.on { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

/* Živá kamera: tmavé rozhraní jako ve fotoaparátu, obraz přes celou šířku */
.mark.live { background: var(--cam); color: var(--cam-ink); padding-top: 0; }
.live-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #000; touch-action: none; }
.live-video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.live-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.live-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: calc(var(--top) + 10px) 12px 28px; background: linear-gradient(rgb(0 0 0 / 0.6), rgb(0 0 0 / 0)); }
.live-title { flex: 1; min-width: 0; display: grid; text-align: center; text-shadow: 0 1px 3px rgb(0 0 0 / 0.7); }
.live-patient { font-size: 13px; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-status { font-weight: 680; font-size: 16px; min-height: 22px; }
.round { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgb(20 22 25 / 0.55); color: #fff; cursor: pointer; }
.round.on { background: #fff; color: #12151a; }
.round[hidden] { display: none; }
.live-hud { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 10px; background: rgb(0 0 0 / 0.5); color: #fff; font-size: 11.5px; font-variant-numeric: tabular-nums; pointer-events: none; }
.live-tools { background: var(--cam); gap: 10px; padding-top: 12px; }
.live-now { font-size: 14px; font-weight: 620; text-align: center; min-height: 20px; font-variant-numeric: tabular-nums; }
.live .chips { padding: 0; }
.live .chip { background: var(--cam-fill); border-color: transparent; color: var(--cam-ink); }
.live .chip.on { background: #fff; color: #12151a; box-shadow: none; }
.live .seg { background: var(--cam-fill); }
.live .seg button { color: var(--cam-ink); }
.live .seg button.on { background: #fff; color: #12151a; }
.cam-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.cam-row input[type=range] { flex: 1; min-width: 0; accent-color: #fff; }
.zoom-label { opacity: 0.75; }
.zoom-val { width: 34px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 620; }
.chip-btn { flex: none; min-height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: var(--cam-fill); color: var(--cam-ink); font-size: 13px; font-weight: 620; cursor: pointer; }
.shutter-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding-top: 2px; }
.side-slot { display: flex; align-items: center; }
.side-slot .round { background: var(--cam-fill); }
.side-slot .round.on { background: #fff; }
.hint-slot { justify-content: flex-end; font-size: 12.5px; opacity: 0.75; text-align: right; }
.shutter { width: 72px; height: 72px; padding: 0; border: 4px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; }
.shutter i { width: 56px; height: 56px; border-radius: 50%; background: #fff; transition: transform 0.12s; }
.shutter:active i { transform: scale(0.88); }

/* Vzorník */
.shade-row { display: grid; grid-template-columns: 26px 54px repeat(3, minmax(0, 1fr)) 44px; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.shade-row i { width: 24px; height: 32px; border-radius: 5px 5px 10px 10px; border: 1px solid rgb(0 0 0 / 0.15); }
.shade-row b { font-weight: 680; }
.shade-row input[type=number] { width: 100%; min-height: 40px; padding: 0 4px; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 16px; }
.shade-row input[type=checkbox] { width: 24px; height: 24px; margin: auto; accent-color: var(--accent); }
.shade-head { font-size: 12px; color: var(--muted); border-bottom: 0; padding-bottom: 0; text-align: center; }
.off { opacity: 0.45; }

/* Dialog a hláška */
dialog { border: 0; border-radius: 20px; padding: 20px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / 0.3); }
dialog::backdrop { background: rgb(0 0 0 / 0.45); }
dialog h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
dialog p { margin-bottom: 14px; font-size: 15px; color: var(--muted); }

/* Ukázkové video pro nepřihlášené */
dialog.demo { padding: 0; width: min(400px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; border-radius: 24px; }
.demo-media { position: relative; background: #0b0f12; display: flex; justify-content: center; }
.demo-video { display: block; height: min(58dvh, 620px); aspect-ratio: 9 / 16; max-width: 100%; object-fit: contain; background: #0b0f12; }
.demo-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgb(0 0 0 / 0.55); color: #fff; cursor: pointer; }
.demo-close svg { width: 18px; height: 18px; }
.demo-sound { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); min-height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: #fff; color: var(--ink); font-weight: 700; font-size: 15px; box-shadow: 0 6px 20px rgb(0 0 0 / 0.35); cursor: pointer; white-space: nowrap; }
.demo-body { padding: 16px 18px 14px; }
dialog.demo h3 { font-size: 18px; }
.demo-hide { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.demo-hide input { width: 18px; height: 18px; accent-color: var(--accent); }
#toast { position: fixed; left: 50%; bottom: calc(var(--bottom) + 96px); transform: translate(-50%, 12px); max-width: calc(100vw - 32px); width: max-content; padding: 10px 16px; background: #1b1e22; color: #fff; border-radius: 20px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s; z-index: 50; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { #toast, .shutter i { transition: none; } }

/* ---- Profesionální vrstva: tmavé achromatické plátno kolem fotek, keramické vzorky, naváděcí rámeček ---- */
:root { --canvas: #121417; --canvas-ink: #eef0f2; --canvas-muted: #9aa1a9; }
.home-head h1 { font-weight: 740; }
.home-head .muted { letter-spacing: 0.01em; }
.section-title { text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }
.case { padding: 12px; }
.case .tag { background: var(--canvas); color: #fff; border-radius: 9px; letter-spacing: 0.01em; }
.hero .code, .tl-code, .tile .cap b, .shot-cap b { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* Vzorek jako keramický zub s leskem */
.chip i, .hero .swatch, .shade-row i { position: relative; overflow: hidden; border: 0; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.14), inset 0 -6px 8px rgb(0 0 0 / 0.1), 0 1px 2px rgb(0 0 0 / 0.15); background-image: linear-gradient(105deg, rgb(255 255 255 / 0.55) 0%, rgb(255 255 255 / 0) 42%); }
.chip i { width: 19px; height: 26px; border-radius: 6px 6px 10px 10px; }
.chip { min-height: 46px; padding: 0 16px 0 9px; }

/* Fotky na tmavém plátně: žádná barva okolí neovlivní vnímání odstínu */
.viewing { background: var(--canvas); color: var(--canvas-ink); border-radius: 22px 22px 0 0; margin-top: 18px; padding-top: 16px; }
.viewing .note { color: var(--canvas-muted) !important; }
.viewing .progress { color: var(--canvas-ink); }
.tile { background: #1c1f23; color: var(--canvas-ink); border-radius: 14px; }
.tile .cap span { color: var(--canvas-muted); }
.tile.now { outline-color: #fff; }
.tile.now .cap span { color: #fff; }
.tile.goal-tile { outline-color: #37c9b6; }
.tile.goal-tile .cap span { color: #37c9b6; }
.stage, .compare { background: var(--canvas); }
.compare { border-radius: 20px; box-shadow: 0 10px 30px rgb(16 20 24 / 0.18); }
.compare .handle, .live-handle { width: 2px; background: rgb(255 255 255 / 0.9); }
.compare .handle::after, .live-handle::after { width: 44px; height: 44px; background: rgb(255 255 255 / 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 2px 10px rgb(0 0 0 / 0.35); }
.compare .side { top: 12px; padding: 4px 12px; background: rgb(18 20 23 / 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 14px; font-variant-numeric: tabular-nums; }
.shot img, .example-pic img { background: var(--canvas); }

/* Naváděcí rámeček v kameře */
.reticle { position: absolute; left: 50%; top: 46%; width: min(64%, 300px); aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border: 2px solid rgb(255 255 255 / 0.5); border-radius: 50%; pointer-events: none; transition: border-color 0.25s, opacity 0.25s; }
.reticle::after { content: ""; position: absolute; left: 22%; right: 22%; top: 66%; height: 15%; border: 2px dashed rgb(255 255 255 / 0.55); border-radius: 50%; transition: border-color 0.25s; }
.reticle.lock { border-color: rgb(55 201 182 / 0.9); }
.reticle.lock::after { border-color: rgb(55 201 182 / 0.95); border-style: solid; }
.reticle.off { opacity: 0; }
.peek-hint { position: absolute; right: 10px; bottom: 10px; max-width: 46%; padding: 3px 9px; border-radius: 10px; background: rgb(0 0 0 / 0.5); color: #fff; font-size: 11.5px; text-align: right; pointer-events: none; }
.live-now { font-size: 15px; }
.shutter { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.15); }

/* Vývoj odstínu v kartě pacienta */
.timeline { margin-top: 12px; gap: 10px; }
.timeline ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.timeline ol::-webkit-scrollbar { display: none; }
.timeline li { flex: none; display: grid; justify-items: center; gap: 2px; padding: 8px 12px; border-radius: 12px; background: var(--bg); position: relative; }
.timeline li + li { margin-left: 16px; }
.timeline li + li::before { content: "→"; position: absolute; left: -18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.timeline li:last-child { background: var(--canvas); color: #fff; }
.tl-code { font-weight: 720; font-size: 17px; }
.tl-date { font-size: 11.5px; opacity: 0.7; }
@media (prefers-reduced-motion: reduce) { .reticle, .reticle::after { transition: none; } }
/* ---- Čistý vzhled: bílé plochy bez stínů, víc místa, méně prvků ---- */
:root { --bg: #f5f5f7; --line: #e6e6ea; --fill: #ececf0; --shadow: none; --radius: 14px; }
.page { padding-left: 20px; padding-right: 20px; }
.home-head { padding: 22px 0 10px; }
.home-head h1 { font-size: 32px; letter-spacing: -0.03em; }
.home-head .muted { display: none; }
.section-title { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 650; color: var(--ink); margin: 28px 0 12px; }
.month-head { font-size: 13px; color: var(--muted); font-weight: 600; margin: 14px 0 0; }
.card, .hero, .case, .action, .shot, .example, .steps li { box-shadow: none; }
.case { padding: 12px 14px; border-radius: 16px; }
.case .tag { background: none; color: var(--ink); padding: 0; font-size: 15px; }
.stack { gap: 8px; }
.search input { box-shadow: none; background: var(--fill); border-radius: 14px; }
.pill { background: none; color: var(--muted); padding: 0 12px; min-height: 36px; }
.pill.on { background: var(--ink); color: #fff; }
.more-filters summary { list-style: none; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent); padding: 6px 0; width: max-content; }
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters[open] summary { margin-bottom: 8px; }
.btn { border-color: transparent; background: var(--fill); }
.btn.primary { background: var(--accent); }
.cta .btn:not(.primary), .card .btn:not(.primary) { background: var(--fill); }
.cta { background: rgb(245 245 247 / 0.92); border-top: 0; }
.tabbar { border-top: 0; background: rgb(255 255 255 / 0.9); }
.tab.on svg { background: none; box-shadow: none; }
.field { font-weight: 500; }
.card { gap: 12px; padding: 18px; border-radius: 20px; }
.action { min-height: 100px; border-radius: 20px; padding: 16px; }
.chip { border-color: transparent; background: var(--fill); }
.chip.on { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.hero { border-radius: 20px; padding: 20px; }
.hero .goal { background: var(--fill); }
.viewing { border-radius: 0; margin-top: 20px; }
.compare { box-shadow: none; }
.timeline li { background: var(--fill); }
.note { margin-top: 18px; }
dialog .btn:not(.primary) { background: var(--fill); }

/* Kamera: jen obraz, vzorky a spoušť */
.live-hud, .reticle, .peek-hint { display: none; }
.live-top { padding-bottom: 36px; }
.live-tools { gap: 14px; padding-top: 14px; }
.live .chip { min-height: 42px; }
.cam-row { padding: 0 4px; }
.shutter-row { padding: 4px 0 2px; }
.shutter { box-shadow: none; }
/* Návod */
.manual .lead { font-size: 16px; color: var(--muted); margin-bottom: 12px; }
.manual-sec { margin-top: 30px; scroll-margin-top: 12px; display: grid; gap: 14px; }
.manual-sec h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.manual-sec h3 { font-size: 15px; font-weight: 650; margin-top: 6px; }
.fig { margin: 0; padding: 14px; background: var(--surface); border-radius: 20px; }
.fig svg { width: 100%; height: auto; display: block; font-family: inherit; }
.manual-steps { margin: 0; }
.manual-steps li { align-items: start; }
.manual-steps li::before { margin-top: 2px; }
.manual-steps p { font-size: 14px; color: var(--muted); margin-top: 2px; }
.manual .tips { gap: 10px; padding-left: 18px; }
.manual .tips b { font-weight: 650; }
.pill.jump { background: var(--fill); color: var(--ink); }
.qa { background: var(--surface); border-radius: 16px; padding: 0 16px; }
.qa summary { list-style: none; cursor: pointer; padding: 14px 24px 14px 0; font-weight: 620; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--muted); }
.qa[open] summary::after { content: "–"; }
.qa p { padding-bottom: 14px; font-size: 14.5px; color: var(--muted); }
.empty .steps li { align-items: start; padding: 14px 16px; }
.empty .steps li::before { margin-top: 2px; }
.empty .steps p { font-size: 14.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }

/* ---------- Účet kliniky ---------- */
.account h2 { margin: 0 0 6px; font-size: 18px; }
.account .field { margin-top: 10px; }
.account .stack { margin-top: 12px; }
.account .tool-row { margin-top: 12px; }
.account .tool-row .btn { flex: 1; }
.account-msg:empty { display: none; }
.account-msg { margin: 10px 0 0; color: var(--ink); }
.btn.ghost, .account .btn.ghost, dialog .btn.ghost { background: transparent !important; border-color: transparent; box-shadow: none; color: var(--muted); }
.sync-line { margin: 4px 0 0; }
.sync-line.bad { color: var(--danger); }
/* Úchyt porovnání dole, aby nezakrýval obličej a úsměv. */
.compare .handle::after, .live-handle::after { top: auto; bottom: 14px; transform: translate(-50%, 0); }
/* ---------- Právní informace a souhlas ---------- */
.legal-doc { margin-bottom: 14px; }
.legal-doc h2 { font-size: 18px; margin: 0 0 6px; }
.legal-doc h3 { font-size: 15px; margin: 14px 0 4px; }
.legal-doc p { margin: 0 0 8px; line-height: 1.5; font-size: 14px; }
.consent-text { line-height: 1.5; font-size: 15px; background: var(--bg); padding: 12px; border-radius: 12px; }
.consent-line { margin: 10px 0 0; font-size: 13px; }
.muted.small { font-size: 12px; text-align: center; margin: 6px 0 0; }
@media print { .tabbar, .bar button, .pills, .stack { display: none !important; } .legal-doc { break-inside: auto; box-shadow: none; } }