:root {
  --red: #d7141a;
  --red-dark: #a10d12;
  --red-soft: #fdecec;
  --ink: #1f1f1f;
  --muted: #6b6b6b;
  --line: #ececec;
  --err: #a10d12;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
button { font: inherit; }
[hidden] { display: none !important; }

/* ---------- Mobil oy sayfası ---------- */
body.vote {
  min-height: 100dvh;
  background: linear-gradient(165deg, #e3191f 0%, #c3111a 50%, #8f0b10 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
}
.card {
  width: 100%;
  max-width: 540px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(60, 0, 0, .35);
  padding: 24px 18px 20px;
  border-top: 6px solid var(--red);
}
.question {
  font-size: clamp(19px, 5.2vw, 24px);
  line-height: 1.32;
  margin: 0 0 6px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.hint { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.options { display: grid; gap: 10px; }
.opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 12px 12px;
  text-align: left;
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: transform .08s, border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.opt:active { transform: scale(.985); }
.opt .letter {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 17px;
  background: var(--red);
}
.opt .text { overflow-wrap: anywhere; padding-top: 6px; }
.opt .text b { display: block; font-weight: 700; }
.opt .text small { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); line-height: 1.4; }
.opt:disabled { cursor: default; opacity: .5; }
.opt.selected { opacity: 1; border-color: var(--red); background: var(--red-soft); }
.opt.busy .letter { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* Dar telefonlar (dikey): kenar boşluklarını azaltıp yazıya yer aç */
@media (max-width: 420px) {
  body.vote { padding-left: 8px; padding-right: 8px; }
  .card { padding: 20px 12px 16px; border-radius: 18px; }
  .opt { padding: 11px 10px; gap: 10px; }
  .opt .letter { width: 32px; height: 32px; font-size: 16px; border-radius: 9px; }
  .opt .text { padding-top: 4px; }
  .opt .text small { font-size: 13.5px; }
}
@media (max-width: 340px) {
  .question { font-size: 18px; }
  .opt { font-size: 15px; }
}

.error { margin: 14px 0 0; color: var(--err); font-weight: 600; text-align: center; }
.state { text-align: center; padding: 18px 6px; }
.state h1 { font-size: 24px; margin: 10px 0 8px; }
.muted { color: var(--muted); margin: 0; line-height: 1.5; }
.chosen { margin: 18px 0 0; padding: 12px; background: var(--red-soft); border-radius: 12px; font-weight: 600; overflow-wrap: anywhere; text-align: left; }
.icon { font-size: 48px; }
.spinner {
  width: 38px; height: 38px; margin: 0 auto 12px;
  border: 4px solid var(--line); border-top-color: var(--red);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.check svg { width: 84px; height: 84px; }
.check circle { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .5s ease-out forwards; }
.check path { fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
