/* ISQ web answer page – Coral palette, light + dark. */
:root {
  /* #D42A44 keeps 4.5:1 for white button text and small accent text. */
  --accent: #D42A44;
  --on-accent: #fff;
  --accent-soft: #FFF0F2;
  --bg: #F6F6F8;
  --surface: #fff;
  --ink: #141319;
  --muted: #5F5D6B;
  --line: #EAE9EF;
  --chip: #F1F0F5;
  --star: #FFB020;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #FF5C71;
    --on-accent: #0E0E12;
    --accent-soft: #3A1C22;
    --bg: #0E0E12;
    --surface: #18171D;
    --ink: #F3F2F7;
    --muted: #A3A1AE;
    --line: #2A2931;
    --chip: #23222A;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 520px; margin: 0 auto; padding: 16px 16px 24px; }
button { font: inherit; color: inherit; }
/* Keyboard focus is always visible (the photo outline is used for "leading"). */
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.tile:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.loading { display: grid; place-items: center; min-height: 60vh; }
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.card { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

.header { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--chip); flex: none; }
.who { flex: 1; min-width: 0; }
.name { font-weight: 600; font-size: 15px; }
.sub { font-size: 12.5px; color: var(--muted); }
.status { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.status.accent { color: var(--accent); }
.status.muted { color: var(--muted); }

.question { font-size: 20px; line-height: 1.3; margin: 14px 0 12px; font-weight: 700; }
.decision {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  font-weight: 700; padding: 8px 12px; border-radius: 12px; margin-bottom: 12px;
}

.two { display: flex; gap: 10px; align-items: flex-start; }
.option { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tile {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--chip);
  outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .2s;
}
.tile.tall { aspect-ratio: 4 / 5; }
.tile.highlight { outline-color: var(--accent); }
.tile .cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge, .flag {
  position: absolute; top: 8px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px;
}
.badge { inset-inline-start: 8px; }
.flag { inset-inline-end: 8px; }
.percent {
  position: absolute; inset-inline: 0; bottom: 0; padding: 22px 10px 10px; text-align: start;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; font-weight: 800; font-size: 20px;
  direction: ltr;
}
.percent.big { font-size: 26px; }
.score {
  position: absolute; top: 10px; inset-inline-end: 10px; background: rgba(15,14,20,.78); color: #fff;
  padding: 8px 12px; border-radius: 14px; font-size: 12px; direction: ltr;
}
.score b { font-size: 26px; }

.btn {
  width: 100%; min-height: 46px; border-radius: 14px; font-weight: 600; font-size: 15px; cursor: pointer;
}
.btn.outline { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); }
.btn.filled, .btn.filled:disabled { background: var(--accent); border: 0; color: var(--on-accent); cursor: default; }
.btn:disabled:not(.filled) { opacity: .5; cursor: default; }

.stars { display: flex; justify-content: center; gap: 4px; margin-top: 10px; }
.star {
  background: none; border: 0; font-size: 40px; line-height: 1; padding: 4px; cursor: pointer; color: var(--muted);
}
.star.on { color: var(--star); }
.star:disabled { cursor: default; }

.hint { font-size: 12.5px; color: var(--muted); text-align: center; margin: 10px 0 0; min-height: 1em; }
.name-field { display: block; margin: 14px 0 0; padding: 12px; background: var(--accent-soft); border-radius: 16px; }
.name-field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.name-row { display: flex; gap: 8px; margin-top: 8px; }
.name-row input {
  flex: 1; min-width: 0; padding: 12px 14px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px;
}
.name-row input:focus { outline: none; border-color: var(--accent); }
.name-row input.error { border-color: #D1323A; }
.btn.send { width: auto; padding: 0 16px; cursor: pointer; white-space: nowrap; }
.btn.picked { cursor: pointer; }
.as-name { font-size: 13px; color: var(--muted); text-align: center; margin: 12px 0 0; }
.as-name b { color: var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; }
.message { text-align: center; font-weight: 600; color: var(--accent); margin: 12px 0 0; }
.votes { font-size: 13px; color: var(--muted); font-weight: 600; margin: 12px 0 0; }

.viewer {
  position: fixed; inset: 0; background: #000; z-index: 10; display: grid; place-items: center;
  touch-action: pinch-zoom;
}
.viewer .contain { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.viewer-close {
  position: absolute; top: 12px; inset-inline-end: 12px; z-index: 1; width: 40px; height: 40px;
  border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 18px; cursor: pointer;
}

.logo { font-size: 30px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.logo b, .logo.small b { color: var(--accent); }
.logo.small { font-size: 16px; margin: 0; }
footer { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 12.5px; margin-top: 20px; }
.code { font-size: 12px; color: var(--muted); direction: ltr; }
.card.install { margin-top: 12px; text-align: center; padding: 20px 16px; }
.install-title { font-size: 18px; font-weight: 700; }
.install-sub { color: var(--muted); font-size: 14px; margin: 6px 0 14px; line-height: 1.45; }
.stores { display: flex; gap: 8px; }
.btn.store { display: grid; place-items: center; text-decoration: none; cursor: pointer; }

/* ---------- ת-06: optional name, notice, report ---------- */
.name-input {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px;
}
.name-input:focus { outline: none; border-color: var(--accent); }
.consent { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin: 10px 0; }
.consent a { color: var(--accent); font-weight: 600; }
.name-field .btn.send { width: 100%; min-height: 46px; }

footer { flex-direction: column; gap: 8px; }
.brandline { display: flex; gap: 8px; align-items: center; }
footer .legal { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
footer .legal a, footer .legal .link { color: var(--muted); font-size: 12.5px; font-weight: 500; text-decoration: underline; }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.report-sheet {
  width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--surface); color: var(--ink);
  border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.report-head h2 { font-size: 18px; margin: 0; }
.viewer-close.dark { position: static; background: var(--accent-soft); color: var(--ink); flex: none; }
.report-intro { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 6px 0 10px; }
.reasons { display: grid; gap: 2px; margin-bottom: 10px; }
.reason { display: flex; gap: 10px; align-items: center; padding: 9px 4px; font-size: 15px; cursor: pointer; }
.reason input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.report-sheet textarea, .report-sheet input[type=email] {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; resize: vertical;
}
.report-sheet .send-report { margin-top: 12px; cursor: pointer; }
.report-done { font-weight: 600; text-align: center; margin: 16px 0; }
