/* ==========================================================================
   2026 Global Gambling Market Survey — mobile app stylesheet
   Mobile only: no desktop breakpoints, no wide-screen layout.
   Fluid full-height app shell with safe-area support, all logical
   properties so Arabic (RTL) mirrors automatically.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e4e9f2;
  --line-2: #cbd5e1;

  --brand: #1e3a8a;
  --brand-2: #4338ca;
  --brand-soft: #eef2ff;
  --brand-soft-2: #dfe5ff;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --danger: #dc2626;

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --pill: 999px;

  --sh-1: 0 1px 2px rgba(15, 23, 42, .05);
  --sh-2: 0 14px 34px -20px rgba(15, 23, 42, .38), 0 2px 6px rgba(15, 23, 42, .05);
  --sh-3: 0 -18px 44px -26px rgba(15, 23, 42, .5);

  --bar-h: 56px;
  --shell: 480px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans",
    "Noto Sans Arabic", "Noto Sans Thai", "Noto Sans Bengali", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* Several components set display, which would beat the UA [hidden] rule. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
body.is-locked { overflow: hidden; }

h1, h2, h3 { margin: 0; line-height: 1.28; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
svg { display: block; }

:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 8px; }

/* Phase changes move focus to the new heading so screen readers announce it.
   That is a focus target rather than a keyboard interaction, so suppress the
   ring there and keep it everywhere else. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   App shell — fluid, full height, phone first
   ========================================================================== */
.app {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

/* ---------- app bar ---------- */
.appbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px;
  min-height: calc(var(--bar-h) + env(safe-area-inset-top));
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-block-end: 1px solid var(--line);
}

.appbar-brand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.appbar-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; box-shadow: var(--sh-1); }
.appbar-title {
  font-size: .92rem; font-weight: 700; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- language button (deliberately prominent) ---------- */
.lang-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border: 1.5px solid var(--brand-soft-2);
  border-radius: var(--pill);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .84rem; font-weight: 700;
  cursor: pointer;
  max-width: 46vw;
  transition: background .15s ease;
}
.lang-btn:active { background: var(--brand-soft-2); }
.lang-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-btn .ico { width: 17px; height: 17px; }
.lang-btn .ico-sm { width: 14px; height: 14px; opacity: .7; }

/* ---------- body ---------- */
.appbody { flex: 1 1 auto; padding: 16px 16px 8px; display: flex; flex-direction: column; }
.panel { display: flex; flex-direction: column; flex: 1 1 auto; }
.panel > * + * { margin-block-start: 12px; }

/* ---------- footer ---------- */
.appfoot {
  padding: 14px 16px calc(env(safe-area-inset-bottom) + 16px);
  border-block-start: 1px solid var(--line);
  background: var(--surface);
}
.legal-row { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-block-end: 10px; }
.legal-link {
  background: none; border: 0; padding: 3px 0; margin-inline-end: 12px;
  color: var(--brand); font-size: .82rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--brand-soft-2);
  cursor: pointer;
}
.foot-note { font-size: .74rem; color: var(--muted); margin-block-end: 6px; line-height: 1.5; }
.foot-note.dim { color: var(--line-2); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--pill);
  padding: 13px 20px; font-size: .96rem; font-weight: 700;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(30, 58, 138, .85);
}
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 8px; }
.btn-lg { padding: 16px 22px; font-size: 1rem; width: 100%; }
.btn-tiny { padding: 6px 10px; font-size: .72rem; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--pill); color: var(--muted); }

.ico, .ico-flip {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
html[dir="rtl"] .ico-flip { transform: scaleX(-1); }

.spinner {
  display: none; width: 16px; height: 16px; flex: none;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.is-busy .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sticky action bar pinned just above the bottom of the screen */
.cta-bar {
  position: sticky;
  inset-block-end: 0;
  z-index: 20;
  margin-block-start: auto;
  padding-block: 12px calc(env(safe-area-inset-bottom) + 4px);
  background: linear-gradient(180deg, rgba(244, 246, 251, 0) 0%, rgba(244, 246, 251, .93) 46%, var(--bg) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cta-bar .btn { width: 100%; }
.cta-bar .cta-row { display: flex; gap: 10px; }
.cta-bar .cta-row .btn { width: auto; flex: 1; }
.cta-bar .cta-row .btn-ghost { flex: 0 0 auto; }
/* icon-only control: no label to translate, still a 52px touch target */
.btn-icon { flex: 0 0 auto; width: 52px; padding-inline: 0; }

/* ==========================================================================
   Landing
   ========================================================================== */
.hero { text-align: center; padding-block: 10px 4px; }
.hero-icon {
  width: 76px; height: 76px; margin: 0 auto 16px; display: block;
  border-radius: 20px; box-shadow: 0 16px 34px -18px rgba(30, 58, 138, .75);
}
.hero h1 { font-size: 1.5rem; letter-spacing: -0.03em; text-wrap: balance; margin-block-end: 10px; }
.hero-sub { font-size: .94rem; color: var(--ink-2); max-width: 34ch; margin-inline: auto; text-wrap: pretty; }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid var(--brand-soft-2);
  border-radius: var(--pill);
  padding: 5px 12px; margin-block-end: 14px;
  font-size: .72rem; font-weight: 700; letter-spacing: .01em;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(5, 150, 105, .16); }

.highlight {
  display: flex; align-items: center; gap: 11px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; border-radius: var(--r-md);
  padding: 14px 16px; margin-block: 16px 8px;
  text-align: start;
  box-shadow: 0 14px 30px -18px rgba(30, 58, 138, .9);
}
.highlight .ico { width: 22px; height: 22px; flex: none; }
.highlight strong { display: block; font-size: .95rem; font-weight: 700; line-height: 1.35; }
.highlight em { font-style: normal; font-size: .76rem; opacity: .82; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-block-start: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--pill); padding: 6px 12px;
  font-size: .78rem; font-weight: 600; color: var(--ink-2);
}
.chip .ico { width: 14px; height: 14px; color: var(--brand-2); }

/* ---------- prize list ---------- */
.block-title { font-size: .95rem; font-weight: 700; margin-block-end: 8px; }
.prize-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-1);
}
.prize-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.prize-row + .prize-row { border-block-start: 1px solid var(--line); }
.prize-name { flex: 1; font-size: .9rem; font-weight: 600; min-width: 0; }

.tier-tag {
  flex: none; display: inline-block; padding: 3px 9px; border-radius: var(--pill);
  font-size: .68rem; font-weight: 700; white-space: nowrap;
  background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-soft-2);
}
.tier-tag[data-tier="grand"] { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.tier-tag[data-tier="first"] { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.tier-tag[data-tier="second"] { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.tier-tag[data-tier="lucky"] { background: var(--ok-soft); color: #065f46; border-color: #a7f3d0; }
.tier-tag[data-tier="participation"] { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }

.fineprint { font-size: .74rem; color: var(--muted); line-height: 1.5; }

/* ==========================================================================
   Survey
   ========================================================================== */
.progress-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-block-end: 8px;
}
.q-counter { font-size: .84rem; font-weight: 700; color: var(--brand); }
.q-percent { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.progress-track {
  height: 7px; border-radius: var(--pill);
  background: var(--line); overflow: hidden; margin-block-end: 18px;
}
.progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 70%, #6366f1 100%);
  border-radius: inherit;
  transition: width .34s cubic-bezier(.3, .8, .3, 1);
}

.q-title { font-size: 1.08rem; font-weight: 700; line-height: 1.35; text-wrap: pretty; }
.q-hint { font-size: .78rem; color: var(--muted); margin-block: 5px 0; }
.q-hint.is-warn { color: var(--warn); }
.q-note {
  font-size: .78rem; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  border-inline-start: 3px solid var(--brand-soft-2);
  border-radius: var(--r-sm); padding: 10px 12px; margin-block-start: 10px;
}

.options { display: grid; gap: 8px; margin-block-start: 14px; }
.option {
  position: relative; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r-md); padding: 14px 15px;
  cursor: pointer; min-height: 54px;
  transition: border-color .15s ease, background .15s ease;
}
.option:active { transform: scale(.994); }
.option input { position: absolute; opacity: 0; width: 0; height: 0; }

.option-mark {
  flex: none; width: 22px; height: 22px;
  border: 1.8px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center;
  transition: border-color .15s ease, background .15s ease;
}
.option-mark svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.5); transition: opacity .15s ease, transform .15s ease; }
.options[data-type="single"] .option-mark { border-radius: 50%; }
.options[data-type="single"] .option-mark::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff;
  opacity: 0; transform: scale(.4); transition: opacity .15s ease, transform .15s ease;
}
.options[data-type="single"] .option input:checked ~ .option-mark { border-color: var(--brand); background: var(--brand); }
.options[data-type="single"] .option input:checked ~ .option-mark::after { opacity: 1; transform: none; }
.options[data-type="multi"] .option-mark { border-radius: 6px; }
.options[data-type="multi"] .option input:checked ~ .option-mark { border-color: var(--brand); background: var(--brand); }
.options[data-type="multi"] .option input:checked ~ .option-mark svg { opacity: 1; transform: none; }

.option-text { font-size: .92rem; font-weight: 600; }
.option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.option:has(input:focus-visible) { outline: 3px solid var(--brand-2); outline-offset: 2px; }

/* ---------- country combobox ---------- */
.combo { position: relative; margin-block-start: 14px; }
.combo-icon {
  position: absolute; inset-inline-start: 14px; top: 28px; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.combo-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.combo-input {
  width: 100%; padding: 15px 16px 15px 42px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font-size: 1rem; font-family: inherit;
}
html[dir="rtl"] .combo-input { padding: 15px 42px 15px 16px; }
.combo-input::placeholder { color: var(--muted); }
.combo-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(67, 56, 202, .12); }

.combo-list {
  margin-block-start: 8px; max-height: 46vh; overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-1); padding: 5px;
}
.combo-option {
  padding: 12px 13px; border-radius: var(--r-sm);
  font-size: .92rem; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.combo-option.is-active { background: var(--brand-soft); color: var(--brand); }
.combo-option[aria-selected="true"] { font-weight: 700; color: var(--brand); }
.combo-option[aria-selected="true"]::after { content: "✓"; margin-inline-start: auto; }
.combo-empty { padding: 14px; font-size: .88rem; color: var(--muted); text-align: center; }

.combo-selected {
  display: inline-flex; align-items: center; gap: 7px;
  margin-block-start: 10px; padding: 6px 13px;
  background: var(--brand-soft); border: 1px solid var(--brand-soft-2);
  border-radius: var(--pill); font-size: .84rem; font-weight: 700; color: var(--brand);
}

/* ---------- review ---------- */
.panel-title { font-size: 1.16rem; text-wrap: balance; }
.panel-lead { font-size: .88rem; color: var(--ink-2); }

.review-list { display: grid; gap: 7px; margin-block-start: 14px; }
.review-item {
  display: flex; align-items: flex-start; gap: 10px;
  width: 100%; text-align: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 11px 13px; cursor: pointer;
}
.review-item:active { border-color: var(--brand); background: var(--brand-soft); }
.review-key { flex: none; font-size: .74rem; color: var(--muted); max-width: 40%; }
.review-val { flex: 1; font-size: .86rem; font-weight: 600; min-width: 0; }
.review-edit { flex: none; color: var(--muted); }
.review-edit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.consent {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--surface-2); border: 1.5px solid var(--line);
  border-radius: var(--r-md); padding: 13px 14px; margin-block-start: 14px; cursor: pointer;
}
.consent input { position: absolute; opacity: 0; width: 0; height: 0; }
.consent-box {
  flex: none; width: 22px; height: 22px; margin-block-start: 1px;
  border: 1.8px solid var(--line-2); border-radius: 6px; background: var(--surface);
  display: grid; place-items: center;
}
.consent-box svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.5); transition: opacity .15s ease, transform .15s ease; }
.consent input:checked ~ .consent-box { border-color: var(--brand); background: var(--brand); }
.consent input:checked ~ .consent-box svg { opacity: 1; transform: none; }
.consent:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.consent-text { font-size: .84rem; color: var(--ink-2); line-height: 1.5; }

.form-error {
  margin-block-start: 12px; padding: 10px 13px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  border-radius: var(--r-sm); font-size: .82rem; font-weight: 600;
}

/* ==========================================================================
   Completion and draw result
   ========================================================================== */
.done { text-align: center; }
.done-mark { width: 62px; height: 62px; margin: 4px auto 14px; color: var(--ok); }
.done-mark svg { width: 100%; height: 100%; }

.entry-card {
  background: linear-gradient(180deg, var(--surface-2), var(--brand-soft));
  border: 1px dashed var(--brand-soft-2);
  border-radius: var(--r-lg); padding: 18px 16px; margin-block-start: 16px;
}
.entry-label { font-size: .78rem; color: var(--muted); margin-block-end: 5px; }
.entry-value {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 1.06rem; font-weight: 700; color: var(--brand); margin-block-end: 12px;
}
.entry-value .ico { width: 19px; height: 19px; }
.entry-id {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  font-size: .76rem; color: var(--muted);
}
.entry-id code {
  font-size: .88rem; font-weight: 700; color: var(--ink); letter-spacing: .04em;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 5px 10px;
}

.draw-result {
  margin-block-start: 16px; padding: 18px 16px; text-align: start;
  background: linear-gradient(180deg, var(--ok-soft), #fff);
  border: 1px solid #a7f3d0; border-radius: var(--r-lg);
  animation: pop .4s cubic-bezier(.2, .9, .3, 1.15) both;
}
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.draw-result-title { font-size: 1rem; font-weight: 700; color: var(--ok); margin-block-end: 2px; }
.draw-result-lead { font-size: .8rem; color: var(--muted); margin-block-end: 10px; }
.draw-tier {
  display: inline-block; padding: 4px 12px; border-radius: var(--pill);
  background: var(--surface); border: 1px solid var(--brand-soft-2);
  color: var(--brand); font-size: .76rem; font-weight: 700; margin-block-end: 8px;
}
.draw-prize { font-size: 1.12rem; font-weight: 700; margin-block-end: 14px; text-wrap: balance; }

.payout-list {
  display: grid; gap: 1px; margin: 0 0 12px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-sm); overflow: hidden;
}
.payout-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  background: var(--surface); padding: 10px 12px; margin: 0;
}
.payout-row dt { font-size: .78rem; color: var(--muted); margin: 0; }
.payout-row dd { margin: 0; font-size: .88rem; font-weight: 700; text-align: end; font-variant-numeric: tabular-nums; }
.payout-row.is-strong { background: var(--brand-soft); }
.payout-row.is-strong dt { color: var(--brand); font-weight: 700; }
.payout-row.is-strong dd { color: var(--brand); }

/* ==========================================================================
   Bottom sheet (language picker + legal texts)
   ========================================================================== */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); animation: fade .18s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet-panel {
  position: relative; width: 100%; max-width: var(--shell);
  max-height: 84vh; display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding-block-end: env(safe-area-inset-bottom);
  box-shadow: var(--sh-3);
  animation: sheet-in .26s cubic-bezier(.2, .85, .3, 1) both;
}
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }

.sheet-grip { display: block; width: 38px; height: 4px; border-radius: var(--pill); background: var(--line-2); margin: 9px auto 4px; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 18px 12px; border-block-end: 1px solid var(--line);
}
.sheet-head h2 { font-size: 1rem; }
.sheet-close {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  display: grid; place-items: center; color: var(--muted);
}
.sheet-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sheet-body { padding: 12px 18px 20px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-body p { font-size: .86rem; color: var(--ink-2); margin-block-end: 11px; }

.lang-list { display: grid; gap: 2px; }
.lang-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: start;
  background: none; border: 0; cursor: pointer;
  padding: 13px 12px; border-radius: var(--r-sm);
  font-size: .94rem; font-weight: 600; color: var(--ink);
}
.lang-item:active { background: var(--surface-2); }
.lang-item[aria-selected="true"] { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.lang-item[aria-selected="true"]::after { content: "✓"; margin-inline-start: auto; color: var(--brand); }
.lang-code {
  flex: none; font-size: .66rem; font-weight: 700; color: var(--muted);
  background: var(--surface-2); border-radius: 4px; padding: 1px 5px;
  text-transform: uppercase; letter-spacing: .04em; direction: ltr;
}
.lang-item[aria-selected="true"] .lang-code { background: var(--surface); color: var(--brand); }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
  position: fixed; inset-block-end: calc(env(safe-area-inset-bottom) + 22px);
  inset-inline: 0; z-index: 80;
  margin-inline: auto; width: max-content; max-width: calc(100% - 40px);
  background: #0b1220; color: #fff; padding: 10px 18px;
  border-radius: var(--pill); font-size: .84rem; font-weight: 600;
  animation: pop .28s cubic-bezier(.2, .9, .3, 1.1) both;
}

/* ==========================================================================
   RTL refinements
   ========================================================================== */
html[dir="rtl"] body { line-height: 1.78; }
html[dir="rtl"] .hero h1 { letter-spacing: 0; }
html[dir="rtl"] .entry-id code { direction: ltr; unicode-bidi: isolate; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ==========================================================================
   Prize claim — optional WhatsApp / Telegram contact details
   ========================================================================== */
.field-group { display: grid; gap: 12px; margin-block-start: 16px; }
.field { display: grid; gap: 6px; }
.field-label { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.field-input {
  width: 100%; padding: 14px 15px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font-size: 1rem; font-family: inherit;
  /* a phone number is always written left-to-right, even in Arabic */
  direction: ltr; text-align: start;
}
.field-input::placeholder { color: var(--line-2); }
.field-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(67, 56, 202, .12); }
.field-hint { font-size: .76rem; color: var(--muted); margin: 0; }

#claimTelegram { direction: ltr; }

/* Direct contact page: scoped to the final panel, including narrow and RTL phones. */
.contact-support { text-align: center; min-inline-size: 0; }
#claimBtn { white-space: normal; min-inline-size: 0; }
#claimBtn > span:first-child { min-inline-size: 0; overflow-wrap: anywhere; }
#claimBtn .svg-holder { flex: 0 0 auto; }
.contact-brand { display: block; inline-size: min(200px, 100%); block-size: auto; margin: 0 auto 22px; }
.contact-support .panel-title,
.contact-support .panel-lead { overflow-wrap: anywhere; }
.contact-support .contact-entry { margin-block: 20px; }
.contact-entry-id code { direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; max-inline-size: 100%; }
.contact-id-hint { margin-block-start: 10px; }
.contact-telegram { white-space: normal; min-block-size: 54px; padding-inline: 18px; }
.contact-telegram > span:first-child { min-inline-size: 0; overflow-wrap: anywhere; }
.contact-telegram .svg-holder { flex: 0 0 auto; }
.contact-handle { margin-block-start: 8px; font-weight: 700; color: var(--brand); }
.contact-qr-block { margin: 22px auto 0; max-inline-size: 100%; }
.contact-qr { display: block; inline-size: min(180px, 100%); block-size: auto; margin: 0 auto 10px; background: #fff; }
.contact-qr-block figcaption { max-inline-size: 260px; margin-inline: auto; }
