/* Oyoun Media burger survey. Mobile first: one question per screen. */
:root {
  --bg: #fbfbfd;
  --band: #f2f2f5;
  --card: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --line: #dcdce1;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, .1);
  --on-accent: #ffffff;
  --warm: #f59e0b;
  --warm-soft: rgba(245, 158, 11, .14);
  --err: #d70015;
  --ok: #1d9e45;
  --tile: #ffffff;
  --font: "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "SF Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --band: #111113;
    --card: #1c1c1e;
    --fg: #f5f5f7;
    --muted: #a1a1a6;
    --line: #38383c;
    --accent: #2997ff;
    --accent-hover: #47a6ff;
    --accent-soft: rgba(41, 151, 255, .18);
    --on-accent: #000000;
    --warm: #fbbf24;
    --warm-soft: rgba(251, 191, 36, .16);
    --err: #ff453a;
    --ok: #30d158;
    --tile: #f4f4f6;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* Buttons */
.btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 17px;
  padding: 13px 26px; border-radius: 14px; min-height: 52px;
  transition: background .15s, transform .1s, opacity .15s;
  touch-action: manipulation;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { background: var(--band); color: var(--muted); cursor: default; transform: none; }
.btn-lg { font-size: 19px; min-height: 58px; }
.btn-block { width: 100%; display: block; }
.btn-ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--line); }
@media (hover: hover) { .btn:not([disabled]):hover { background: var(--accent-hover); } .btn-ghost:not([disabled]):hover { background: var(--accent-soft); } }

/* ---------- Landing ---------- */
.landing { min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; padding: 0 20px; }
.land-top { padding: calc(18px + var(--safe-t)) 0 0; }
.land-logo { height: 30px; width: auto; display: block; }
.land-hero { flex: 1; padding: 36px 0 20px; }
.kicker { color: var(--muted); font-size: 15px; font-weight: 500; margin: 0 0 6px; }
h1 { font-size: clamp(44px, 13vw, 64px); line-height: 1.1; margin: 0 0 14px; font-weight: 700; }
.hl { color: var(--accent); }
.land-sub { font-size: 20px; line-height: 1.6; margin: 0 0 26px; }
.prize {
  display: flex; align-items: center; gap: 14px;
  background: var(--warm-soft); border-radius: 18px; padding: 16px 18px; margin-bottom: 22px;
}
.prize-amt { font-size: 34px; font-weight: 700; color: var(--warm); line-height: 1; direction: ltr; }
.prize-txt { display: grid; font-size: 15px; }
.prize-txt b { font-size: 17px; }
.prize-txt span { color: var(--muted); }
.prize-txt .prize-food { color: var(--fg); font-weight: 600; }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--muted); font-size: 15.5px; }
.perks li { display: flex; gap: 10px; align-items: center; }
.perks span { width: 24px; text-align: center; }
.land-cta { position: sticky; bottom: 0; padding: 14px 0 calc(14px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); }
.fine { font-size: 13.5px; color: var(--muted); text-align: center; margin: 10px 0 0; }
.land-foot { font-size: 12px; color: var(--muted); text-align: center; padding: 6px 0 calc(12px + var(--safe-b)); }

/* ---------- Survey shell ---------- */
.survey { height: 100dvh; display: flex; flex-direction: column; max-width: 620px; margin: 0 auto; }
.sv-top {
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-t)) 14px 10px;
}
.icon-btn { appearance: none; border: 0; background: var(--band); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn[disabled] { visibility: hidden; }
.sv-progress { flex: 1; height: 8px; background: color-mix(in srgb, var(--line) 70%, transparent); border-radius: 99px; overflow: hidden; }
.sv-progress-bar { height: 100%; width: 0; background: linear-gradient(to left, var(--warm), var(--accent)); border-radius: 99px; transition: width .4s ease; }
.sv-count { font-size: 13px; color: var(--muted); min-width: 46px; text-align: left; direction: ltr; }

.sv-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 18px 20px; overscroll-behavior: contain; }
.screen { animation: enter .32s ease both; }
.screen.back { animation-name: enter-back; }
@keyframes enter { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }

.cheer {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--warm-soft); color: var(--fg);
  font-size: 17px; font-weight: 700; line-height: 1.4; padding: 9px 16px; border-radius: 99px;
  margin: 6px 0 16px; animation: pop .45s cubic-bezier(.2,1.4,.4,1) both .1s;
}
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.section-chip { font-size: 13px; color: var(--muted); margin: 0 0 4px; font-weight: 500; }
.q-title { font-size: clamp(22px, 6vw, 27px); line-height: 1.35; margin: 0 0 8px; font-weight: 700; outline: none; }
.q-hint { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 14px; }
.q-kind { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.q-img { display: block; width: 100%; max-width: 148px; aspect-ratio: 1; object-fit: cover; background: #fff; border-radius: 16px; margin: 4px auto 14px; }

.sv-foot { padding: 10px 18px calc(12px + var(--safe-b)); background: var(--bg); border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.sv-foot.auto .btn { display: none; }
.sv-foot.auto { border-top: 0; padding-top: 0; }
.sv-err { color: var(--err); font-size: 14px; margin: 0 0 8px; text-align: center; }

/* Options (single / multi) */
.opts { display: grid; gap: 10px; }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt > span {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 12px 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--card); cursor: pointer; user-select: none;
  transition: border-color .12s, background .12s, transform .12s;
  font-size: 16.5px;
}
.opt .ic { font-size: 22px; width: 28px; text-align: center; flex: none; }
.opt .tx { flex: 1; }
.opt .mk {
  flex: none; width: 22px; height: 22px; border: 2px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; transition: all .12s;
}
.opt input[type=checkbox] + span .mk { border-radius: 7px; }
.opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.opt input:checked + span .mk { border-color: var(--accent); background: var(--accent); }
.opt input:checked + span .mk::after { content: ""; width: 10px; height: 6px; border: solid var(--on-accent); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt.tap > span { transform: scale(.98); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-2 .opt > span { flex-direction: column; text-align: center; justify-content: center; min-height: 96px; gap: 6px; }
.grid-2 .opt .ic { font-size: 30px; width: auto; }
.grid-2 .opt .mk { display: none; }
.other-input { margin-top: 10px; }

/* Ranked list (factors, channels) */
.rank-list { display: grid; gap: 10px; }
.rank-item {
  appearance: none; text-align: right; cursor: pointer; width: 100%;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 12px 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--card);
  font-size: 16.5px; touch-action: manipulation;
}
.rank-item .ic { font-size: 22px; width: 28px; text-align: center; flex: none; }
.rank-item .tx { flex: 1; }
.badge {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
  border: 2px dashed var(--line); color: transparent;
}
.rank-item[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); }
.rank-item[aria-pressed=true] .badge, .logo-tile[aria-pressed=true] .badge { border: 0; background: var(--accent); color: var(--on-accent); animation: pop .3s both; }
.rank-item[disabled], .logo-tile[disabled] { opacity: .4; cursor: default; }

/* Restaurant logo grid: every tile the same size */
.logo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 520px) { .logo-grid { grid-template-columns: repeat(4, 1fr); } }
.logo-tile {
  appearance: none; position: relative; cursor: pointer; padding: 0; background: none; border: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: center;
  touch-action: manipulation; min-width: 0;
}
.logo-box {
  aspect-ratio: 1 / 1; width: 100%;
  border-radius: 18px; background: var(--tile);
  border: 1.5px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.logo-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-box .mono {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-weight: 700; font-size: 26px; color: #fff; letter-spacing: .5px; direction: ltr;
}
.logo-name {
  font-size: 12.5px; line-height: 1.3; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em; word-break: break-word;
}
.logo-tile .badge { position: absolute; top: -6px; left: -6px; width: 30px; height: 30px; background: var(--bg); border-color: var(--line); z-index: 1; opacity: 0; }
.logo-tile[aria-pressed=true] .badge { opacity: 1; box-shadow: 0 0 0 3px var(--bg); }
.logo-tile[aria-pressed=true] .logo-box { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.logo-tile:active .logo-box { transform: scale(.96); }
.logo-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.logo-extra .rank-item { font-size: 15px; min-height: 50px; justify-content: center; }
.picked { margin: 14px 0 0; font-size: 14px; color: var(--muted); min-height: 1.5em; }
.picked b { color: var(--fg); }

/* Packaging */
.pack-list { display: grid; gap: 12px; }
.pack { position: relative; display: block; cursor: pointer; }
.pack input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pack-card {
  display: grid; grid-template-columns: 124px 1fr; gap: 14px; align-items: center;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 12px;
  transition: border-color .12s, background .12s;
}
.pack input:checked + .pack-card { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.pack input:focus-visible + .pack-card { outline: 2px solid var(--accent); outline-offset: 2px; }
.pack-card img { width: 124px; height: 124px; object-fit: cover; background: #fff; border-radius: 12px; }
.pack-name { font-weight: 700; font-size: 17px; margin-bottom: 4px; line-height: 1.35; }
.pack-pts { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 14.5px; line-height: 1.45; }

/* Gate (raffle or not) */
.gate { text-align: center; padding-top: 18px; }
.gate-emoji { font-size: 56px; line-height: 1; margin-bottom: 12px; animation: pop .5s both; }
.gate h2 { font-size: 26px; margin: 0 0 8px; }
.gate p { color: var(--muted); margin: 0 0 22px; }
.gate .prize { text-align: right; }
.note-box { width: 100%; box-sizing: border-box; font: inherit; font-size: 17px; line-height: 1.6; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card, transparent); color: var(--fg); resize: vertical; min-height: 150px; }
.note-box:focus { outline: none; border-color: var(--accent); }
.note-count { margin: 6px 2px 0; font-size: 13px; color: var(--muted); direction: ltr; text-align: left; }
.f-note { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.gate .btn { margin-bottom: 10px; }

/* Contact */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15.5px; }
input[type=text], input[type=tel], input[type=email], select {
  font: inherit; font-size: 17px; color: var(--fg); width: 100%;
  min-height: 52px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--card);
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.has-error input { border-color: var(--err); }
.f-err { color: var(--err); font-size: 13.5px; margin: 6px 0 0; }
.phone-row { display: flex; gap: 8px; direction: ltr; }
.phone-row select { width: 104px; flex: none; }
.phone-row input, input[type=email] { direction: ltr; text-align: left; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; font-weight: 400 !important; }
.consent input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.terms { font-size: 13.5px; color: var(--muted); background: var(--band); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; }
.terms ul { margin: 0; padding-inline-start: 18px; }

.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

/* Done */
.done { min-height: 100dvh; display: grid; place-items: center; padding: 24px; text-align: center; }
.done-in { max-width: 460px; }
.done-icon { font-size: 72px; line-height: 1; margin-bottom: 14px; animation: pop .6s both; }
.done h1 { font-size: 34px; }
.done-txt { font-size: 18px; color: var(--muted); margin: 0 0 24px; }

/* Larger screens: center the survey like a card */
@media (min-width: 720px) {
  .survey { height: auto; min-height: 100dvh; padding-top: 24px; }
  .sv-body { overflow: visible; }
  .sv-foot { position: sticky; bottom: 0; border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.dup-note { margin: 14px 0 0; padding: 14px 16px; border: 1.5px solid var(--err); border-radius: 14px; font-size: 16px; line-height: 1.6; }
.dup-note[hidden] { display: none; }

/* Big photo with small answers (question 21 only) */
.q-img.big { width: calc(100% + 36px); max-width: none; margin: 0 -18px 12px; aspect-ratio: auto; height: calc(min(100vw, 43vh) + 24px); height: calc(min(100vw, 43dvh) + 24px); padding-bottom: 24px; box-sizing: border-box; object-fit: contain; border-radius: 0; }
.q-hint:has(+ .q-img.big) { font-size: clamp(10.5px, 3vw, 14.5px); white-space: nowrap; margin-bottom: 10px; }
.opts.compact { grid-template-columns: 1fr 1fr; gap: 8px; }
.compact .opt > span { min-height: 46px; padding: 6px 10px; font-size: 14px; line-height: 1.35; justify-content: center; text-align: center; border-radius: 12px; }
.compact .opt .mk { display: none; }
@media (max-height: 760px) { .q-img.big { height: 37vh; height: 37dvh; padding-bottom: 16px; } }

/* Loyalty question: six longer options on one screen */
.rank-list.tight { gap: 8px; }
.tight .rank-item { min-height: 48px; padding: 7px 12px; gap: 8px; font-size: 15px; line-height: 1.35; }
.tight .badge { width: 26px; height: 26px; }
