/* Hlasování z mobilu */

body.vote { min-height: 100dvh; display: flex; flex-direction: column; }

.vbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; padding-top: max(14px, env(safe-area-inset-top));
  background: var(--navy); color: var(--white);
}
.vbar .brand-name { font-size: 22px; }
.vbar-code { font-family: var(--font-cond); font-weight: 600; font-size: 18px; color: var(--steel); font-variant-numeric: tabular-nums; }

.vmain {
  flex: 1; width: 100%; max-width: 560px; margin: 0 auto;
  padding: 28px 20px calc(32px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}

/* Připojení kódem */
.join { margin-top: 8vh; display: grid; gap: 20px; }
.join h1 { font-size: 30px; font-weight: 700; line-height: 1.15; }
.join p { color: var(--muted); }
.code-input {
  width: 100%; height: 76px; text-align: center;
  font-family: var(--font-cond); font-weight: 700; font-size: 46px; letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--r-md);
}
.code-input::placeholder { color: #C9CFD9; }
.code-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px var(--signal-soft); }

/* Otázka */
.progress { color: var(--muted); font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.q { font-size: clamp(24px, 6.4vw, 30px); font-weight: 700; line-height: 1.2; margin-bottom: 24px; overflow-wrap: anywhere; }
.form { display: grid; gap: 12px; }
.form .btn-lg { margin-top: 12px; }
.hint { color: var(--muted); font-size: 15px; }

/* Možnosti */
.opt {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 60px; padding: 14px 16px;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--r-md);
  font-weight: 600; font-size: 18px; line-height: 1.25; cursor: pointer;
  transition: border-color .12s, background-color .12s, color .12s;
}
.opt:hover { border-color: var(--steel); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .tick {
  flex: none; width: 26px; height: 26px; border: 2px solid var(--steel); border-radius: 50%;
  display: grid; place-items: center; transition: inherit;
}
.opt.multi .tick { border-radius: 6px; }
.opt .tick svg { width: 16px; height: 16px; opacity: 0; color: var(--navy); }
.opt:has(input:checked) { background: var(--navy); border-color: var(--navy); color: var(--white); }
.opt:has(input:checked) .tick { background: var(--signal); border-color: var(--signal); }
.opt:has(input:checked) .tick svg { opacity: 1; }
.opt:has(input:focus-visible) { outline: 3px solid var(--signal); outline-offset: 2px; }

/* Škála */
.scale-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 8px; }
.scale-btn {
  position: relative; height: 60px; display: grid; place-items: center; cursor: pointer;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--r-md);
  font-family: var(--font-cond); font-weight: 700; font-size: 28px; font-variant-numeric: tabular-nums;
  transition: border-color .12s, background-color .12s, color .12s;
}
.scale-btn input { position: absolute; opacity: 0; pointer-events: none; }
.scale-btn:hover { border-color: var(--steel); }
.scale-btn:has(input:checked) { background: var(--signal); border-color: var(--signal); color: var(--navy); }
.scale-btn:has(input:focus-visible) { outline: 3px solid var(--navy); outline-offset: 2px; }
.scale-ends { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 15px; font-weight: 500; }
.scale-ends span:last-child { text-align: right; }

/* Text */
.vote .input { min-height: 54px; font-size: 18px; }
.vote .textarea { font-size: 18px; min-height: 120px; }
.counter { justify-self: end; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; margin-top: -6px; }

/* Potvrzení a stavy */
.done {
  display: grid; gap: 14px; padding: 22px; border-radius: var(--r-md);
  background: var(--white); border: 2px solid var(--navy);
  animation: pop .35s var(--ease);
}
.done-head { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; }
.done-head .badge { width: 34px; height: 34px; border-radius: 50%; background: var(--signal); display: grid; place-items: center; flex: none; }
.done-head .badge svg { width: 20px; height: 20px; }
.done ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.done li { padding-left: 14px; border-left: 3px solid var(--signal); font-weight: 500; overflow-wrap: anywhere; }
.done .muted { font-size: 15px; }

.state { margin-top: 10vh; display: grid; gap: 12px; text-align: center; justify-items: center; }
.state h2 { font-size: 24px; font-weight: 700; }
.state p { color: var(--muted); max-width: 34ch; }
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--signal); animation: pulse 1.6s ease-in-out infinite; }

.locked { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--r-md); background: rgba(194, 58, 47, .08); color: var(--red); font-weight: 600; }
.locked svg { width: 20px; height: 20px; flex: none; }

.conn {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--navy); color: var(--white); text-align: center; font-weight: 500; z-index: 50;
}

@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(.8); opacity: .5; } 50% { transform: scale(1.15); opacity: 1; } }
