/* Vône do auta — hlasovanie. Samostatné stránky (bez app shellu),
   design tokeny z /assets/v2.css, mobile-first (hlasuje sa z telefónu cez QR). */

body { min-height: 100vh; }
.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 24px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
/* Úvodný krok a poďakovanie stoja zvisle v strede, pätička je dole. */
.step--center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 0 32px;
}
.page--wide { max-width: 1040px; }

/* ---- Hlavička ---- */
.brand {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 0 18px;
}
.brand img { height: 26px; width: auto; }
.brand__title { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.brand__title strong { font-size: 1.05rem; color: var(--ink); }
.brand__title span { font-size: .78rem; color: var(--muted); }

h1 { font-size: 1.55rem; line-height: 1.2; margin: 0 0 6px; color: var(--ink); letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 12px; color: var(--ink); }
.lead { margin: 0 0 18px; color: var(--muted); font-size: .95rem; }

/* ---- Karty ---- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin-bottom: 14px;
}
.card--accent { border-color: var(--primary-tint-strong); background: linear-gradient(180deg, var(--primary-tint) 0%, #fff 60%); }

/* ---- Formulár ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--text); }
.field input[type="text"], .field input[type="number"] {
  font: inherit; font-size: 1.05rem;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  background: #fff; color: var(--ink);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint-strong); }
.hint { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r);
  padding: 13px 18px;
  font: inherit; font-weight: 600; font-size: 1rem;
  cursor: pointer;
  transition: background var(--t), transform .05s, box-shadow var(--t), opacity var(--t);
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: #fff; width: 100%; box-shadow: 0 2px 10px rgba(139,26,43,.25); }
.btn--primary:not(:disabled):hover { background: var(--primary-hover); }
.btn--primary:not(:disabled):active { transform: translateY(1px); }
.btn--secondary { background: #fff; color: var(--primary); border: 1px solid var(--primary); width: 100%; }
.btn--secondary:not(:disabled):hover { background: var(--primary-tint); }
.btn--ghost { background: transparent; color: var(--muted); padding: 8px 10px; font-size: .85rem; font-weight: 500; }
.btn--ghost:hover { color: var(--primary); background: var(--primary-tint); }
.btn--danger { background: #fff; color: #b91c1c; border: 1px solid #fecaca; font-size: .85rem; padding: 8px 12px; }
.btn--danger:hover { background: #fef2f2; }
.btn--sm { padding: 8px 12px; font-size: .85rem; width: auto; }

.status { margin-top: 10px; font-size: .85rem; color: var(--muted); min-height: 1.3em; }
.status.is-error { color: #dc2626; }
.status.is-ok { color: var(--success); }

/* ---- Hodnotenie jednej vône ---- */
.scent {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px 18px;
  margin-bottom: 12px;
  transition: border-color var(--t);
}
.scent.is-done { border-color: var(--success); }
.scent__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.scent__name { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.scent__num { font-size: .75rem; color: var(--faint); font-weight: 600; letter-spacing: .06em; }

.points { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.points__label { font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.points__val {
  min-width: 44px; height: 44px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r);
  background: var(--primary-tint); color: var(--primary);
  font-weight: 700; font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.points input[type="range"] {
  flex: 1; margin: 0;
  accent-color: var(--primary);
  height: 32px;
  cursor: pointer;
}
.points__zones { display: flex; gap: 3px; margin: -8px 58px 12px 46px; }
.points__zones .zone {
  font-size: .66rem; font-weight: 600; text-align: center; line-height: 1;
  padding: 4px 0; border-radius: 4px;
  color: var(--muted); background: var(--panel-2); border: 1px solid var(--border);
}
.points__zones .zone-yes { background: var(--success-tint); color: var(--success); }
.points__zones .zone-ratherYes { background: #f0fdf4; color: var(--success); }
.points__zones .zone-ratherNo { background: var(--warning-tint); color: var(--warning); }
.points__zones .zone-no { background: #fee2e2; color: #b91c1c; }
.scent[data-cat="yes"] .points__val { background: var(--success-tint); color: var(--success); }
.scent[data-cat="ratherYes"] .points__val { background: #f0fdf4; color: var(--success); }
.scent[data-cat="ratherNo"] .points__val { background: var(--warning-tint); color: var(--warning); }
.scent[data-cat="no"] .points__val { background: #fee2e2; color: #b91c1c; }

.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cat {
  border: 1px solid var(--border-strong);
  background: #fff;
  border-radius: var(--r-sm);
  padding: 10px 4px;
  font: inherit; font-size: .8rem; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  line-height: 1.15;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.cat:hover { border-color: var(--primary); }
.cat.is-active[data-cat="yes"]       { background: var(--success); border-color: var(--success); color: #fff; }
.cat.is-active[data-cat="ratherYes"] { background: var(--success-tint); border-color: var(--success); color: var(--success); }
.cat.is-active[data-cat="ratherNo"]  { background: var(--warning-tint); border-color: var(--warning); color: var(--warning); }
.cat.is-active[data-cat="no"]        { background: #b91c1c; border-color: #b91c1c; color: #fff; }
@media (max-width: 380px) { .cats { grid-template-columns: repeat(2, 1fr); } }

.progress {
  position: sticky; bottom: 0;
  background: rgba(246,247,249,.92);
  backdrop-filter: blur(8px);
  padding: 12px 0 8px;
  margin-top: 8px;
}
.progress__bar { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.progress__fill { height: 100%; background: var(--primary); width: 0; transition: width var(--t); }
.progress__text { font-size: .78rem; color: var(--muted); margin-bottom: 8px; }

/* ---- Ďakujeme ---- */
.done { text-align: center; padding: 28px 18px; }
.done__icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--success-tint); color: var(--success);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.done__icon svg { width: 32px; height: 32px; }
.done p { color: var(--muted); margin: 6px 0 18px; }
.done__actions { display: flex; flex-direction: column; gap: 10px; }

/* ---- Výsledky ---- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 16px; }
.toolbar .field { margin: 0; flex-direction: row; align-items: center; gap: 10px; }
.toolbar .field input[type="number"] { width: 72px; text-align: center; padding: 9px 10px; font-size: 1rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r); overflow: hidden; background: #fff; }
.stepper button { border: 0; background: #fff; width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; color: var(--primary); }
.stepper button:hover { background: var(--primary-tint); }
.stepper output { min-width: 44px; text-align: center; font-weight: 700; font-size: 1.1rem; color: var(--ink); border-left: 1px solid var(--border); border-right: 1px solid var(--border); line-height: 40px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.pill--ok { background: var(--success-tint); border-color: transparent; color: var(--success); }

.winners { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 18px; }
.winner {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 18px 18px 16px;
  box-shadow: 0 10px 30px rgba(139,26,43,.25);
}
.winner__rank { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; font-weight: 600; }
.winner__name { font-size: 1.45rem; font-weight: 700; margin: 4px 0 8px; }
.winner__meta { font-size: .8rem; opacity: .9; display: flex; gap: 12px; flex-wrap: wrap; }
.winner__meta b { font-weight: 700; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); margin-bottom: 18px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 10px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--panel-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.is-selected td { background: var(--success-tint); }
tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--success); }
tr.is-vetoed td { color: var(--faint); }
tr.is-vetoed td .name { text-decoration: line-through; }
.name { font-weight: 700; color: var(--ink); }
.tag { display: inline-block; font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.tag--sel { background: var(--success); color: #fff; }
.tag--veto { background: #fee2e2; color: #b91c1c; }
.bar { position: relative; height: 8px; background: var(--border); border-radius: 99px; min-width: 90px; overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary); border-radius: 99px; }
.cat-dots { display: inline-flex; gap: 3px; align-items: center; }
.cat-dots i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-yes { background: var(--success); }
.dot-ratherYes { background: #86efac; }
.dot-ratherNo { background: #fcd34d; }
.dot-no { background: #dc2626; }

.matrix td.cell { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.matrix td.cell small { display: block; font-weight: 400; font-size: .68rem; color: var(--muted); }
.matrix .cell-yes { background: #dcfce7; }
.matrix .cell-ratherYes { background: #f0fdf4; }
.matrix .cell-ratherNo { background: #fffbeb; }
.matrix .cell-no { background: #fee2e2; }
.voter-row td:first-child { font-weight: 600; color: var(--ink); }
.voter-row time { display: block; font-size: .7rem; color: var(--faint); font-weight: 400; }
.voter__edit {
  border: 0; background: transparent; color: var(--faint);
  margin-left: 6px; padding: 3px; border-radius: 6px;
  cursor: pointer; vertical-align: -2px;
  transition: color var(--t), background var(--t);
}
.voter__edit:hover, .voter__edit:focus-visible { color: var(--primary); background: var(--primary-tint); }
.voter__input {
  font: inherit; font-weight: 600; font-size: .88rem;
  width: 170px; padding: 6px 8px;
  border: 1px solid var(--primary); border-radius: 6px;
  outline: none; box-shadow: 0 0 0 3px var(--primary-tint-strong);
  color: var(--ink);
}
.voter__hint { display: block; font-size: .68rem; font-weight: 400; color: var(--faint); margin-top: 3px; white-space: normal; max-width: 220px; }
.voter__hint.is-error { color: #dc2626; }

.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: .78rem; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.rules { font-size: .85rem; color: var(--text); }
.rules li { margin-bottom: 4px; }

/* ---- QR ---- */
.qr { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 640px) { .qr { grid-template-columns: 220px 1fr; } }
.qr img { width: 100%; max-width: 220px; height: auto; border: 1px solid var(--border); border-radius: var(--r); background: #fff; padding: 8px; }
.qr__url { font-weight: 700; color: var(--ink); font-size: 1.05rem; word-break: break-all; }
.qr-full { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.qr-full img { width: min(70vw, 520px); height: auto; background: #fff; border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.qr-full h1 { margin: 22px 0 6px; font-size: 2rem; }
.qr-full .qr__url { font-size: 1.4rem; margin-top: 6px; }
.qr-full .lead { font-size: 1.05rem; }
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .qr-full img { box-shadow: none; }
}

.foot { margin-top: auto; padding-top: 28px; text-align: center; font-size: .75rem; color: var(--faint); }
