/* =========================================================
   المؤتمر الكشفي العام العشرون - الهوية البصرية
   الأخضر الكشفي + ذهبي الشعار. نظام الزوايا: عناصر التحكم 12px، البطاقات 18px، الوسوم دائرية.
   ========================================================= */
:root {
  --font-display: "Alexandria", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;

  --bg: #f2f5f0;
  --surface: #ffffff;
  --surface-2: #e9eee6;
  --surface-3: #dfe6db;
  --ink: #0f1b14;
  --ink-2: #2a3a30;
  --muted: #56665c;
  --line: #d6ded3;
  --brand: #0d5a37;
  --brand-hover: #0a4b2d;
  --brand-ink: #ffffff;
  --brand-deep: #0a3524;
  --brand-soft: #dcebe0;
  --gold: #e7bd12;
  --gold-ink: #221b00;
  --gold-soft: #f8edc2;
  --gold-text: #7a5d00;
  --yes: #13803c;
  --yes-soft: #d9efe0;
  --no: #b42318;
  --no-soft: #f8dcd8;
  --abs: #6b766f;
  --abs-soft: #e3e8e4;
  --focus: 0 0 0 3px rgb(13 90 55 / 0.28);
  --shadow: 0 1px 2px rgb(10 45 28 / 0.06), 0 10px 30px rgb(10 45 28 / 0.07);
  --shadow-lg: 0 2px 6px rgb(10 45 28 / 0.08), 0 24px 60px rgb(10 45 28 / 0.16);
  --r-ctl: 12px;
  --r-card: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --topbar-h: 68px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #08110c;
  --surface: #0f1b14;
  --surface-2: #15241b;
  --surface-3: #1c2e23;
  --ink: #e7efe9;
  --ink-2: #c5d3c9;
  --muted: #92a699;
  --line: #223429;
  --brand: #2a9a62;
  --brand-hover: #31ad6e;
  --brand-ink: #03140a;
  --brand-deep: #0b2a1b;
  --brand-soft: #143021;
  --gold: #efc93b;
  --gold-ink: #1d1700;
  --gold-soft: #2c2610;
  --gold-text: #efc93b;
  --yes: #3fbf6d;
  --yes-soft: #12301d;
  --no: #f26b61;
  --no-soft: #3a1714;
  --abs: #96a29b;
  --abs-soft: #1f2a24;
  --focus: 0 0 0 3px rgb(63 191 109 / 0.35);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.25);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.35), 0 24px 60px rgb(0 0 0 / 0.45);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08110c;
    --surface: #0f1b14;
    --surface-2: #15241b;
    --surface-3: #1c2e23;
    --ink: #e7efe9;
    --ink-2: #c5d3c9;
    --muted: #92a699;
    --line: #223429;
    --brand: #2a9a62;
    --brand-hover: #31ad6e;
    --brand-ink: #03140a;
    --brand-deep: #0b2a1b;
    --brand-soft: #143021;
    --gold: #efc93b;
    --gold-ink: #1d1700;
    --gold-soft: #2c2610;
    --gold-text: #efc93b;
    --yes: #3fbf6d;
    --yes-soft: #12301d;
    --no: #f26b61;
    --no-soft: #3a1714;
    --abs: #96a29b;
    --abs-soft: #1f2a24;
    --focus: 0 0 0 3px rgb(63 191 109 / 0.35);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.25);
    --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.35), 0 24px 60px rgb(0 0 0 / 0.45);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.3; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 640px) { .wrap { padding-inline: 16px; } }
[hidden] { display: none !important; }

/* ---------- Demo bar ---------- */
.demo-bar {
  background: var(--gold-soft);
  color: var(--ink);
  font-size: 13.5px;
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}
.demo-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.demo-bar b { font-weight: 600; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.demo-bar button {
  border: 0; background: var(--ink); color: var(--bg); border-radius: 999px;
  padding: 4px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { height: var(--topbar-h); display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.brand-text span { font-size: 12.5px; color: var(--muted); }
.nav { display: flex; gap: 2px; margin-inline-start: auto; }
.nav a {
  padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--ink-2);
  transition: background 0.2s, color 0.2s; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: var(--r-ctl);
  border: 1px solid var(--line); background: var(--surface); font-size: 20px; color: var(--ink-2);
  transition: background 0.2s, transform 0.15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(0.96); }
@media (max-width: 1080px) { .nav { display: none; } .top-actions { margin-inline-start: auto; } }
@media (max-width: 640px) { .top-actions .btn { display: none; } .brand-text span { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: var(--r-ctl);
  border: 1px solid transparent; font-weight: 600; font-size: 15.5px; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.15s var(--ease), box-shadow 0.2s;
  background: var(--surface-2); color: var(--ink);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn i { font-size: 19px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { filter: brightness(1.04); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-on-dark { background: rgb(255 255 255 / 0.1); color: #fff; border-color: rgb(255 255 255 / 0.22); }
.btn-on-dark:hover { background: rgb(255 255 255 / 0.16); }
.btn-danger { background: var(--no); color: #fff; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-sm i { font-size: 16px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 16.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  padding: 3px 11px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.chip i { font-size: 15px; }
.chip-open { background: var(--gold-soft); color: var(--gold-text); }
.chip-ok { background: var(--yes-soft); color: var(--yes); }
.chip-bad { background: var(--no-soft); color: var(--no); }
.chip-brand { background: var(--brand-soft); color: var(--brand); }
.chip-outline { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; position: relative; flex-shrink: 0; }
@media (prefers-reduced-motion: no-preference) {
  .live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: ping 1.6s var(--ease) infinite; }
}
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- Layout primitives ---------- */
main { min-height: 60vh; }
.page { padding-block: 32px 72px; }
.page-head { display: grid; gap: 10px; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); }
.page-head p { color: var(--muted); max-width: 62ch; font-size: 17px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; }
.crumb:hover { color: var(--brand); }
.section { margin-top: 56px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 28px); }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); font-size: 15px; white-space: nowrap; }
.link-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; }
.card-tight { padding: 16px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .grid-2, .split { grid-template-columns: 1fr; } }
.divider { height: 1px; background: var(--line); margin-block: 6px; }

/* ---------- Hero ---------- */
.hero {
  margin-top: 24px; border-radius: 28px; overflow: hidden; position: relative; isolation: isolate;
  background:
    radial-gradient(900px 420px at 15% 110%, rgb(231 189 18 / 0.16), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgb(42 154 98 / 0.35), transparent 60%),
    #0a3524;
  color: #f3f7f4;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 24px;
  padding: 56px 56px 48px; min-height: 460px;
}
.hero-emblem-bg { position: absolute; inset-inline-end: -140px; bottom: -200px; width: 560px; opacity: 0.045; z-index: -1; filter: grayscale(1) brightness(3); pointer-events: none; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.hero-org { display: inline-flex; align-items: center; gap: 10px; color: #cfe3d6; font-size: 15px; font-weight: 500; }
.hero h1 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; color: #fff; line-height: 1.2; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: #dbe9df; font-size: 16.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta i { color: var(--gold); font-size: 20px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.hero-side img.emblem { width: min(250px, 100%); filter: drop-shadow(0 18px 40px rgb(0 0 0 / 0.35)); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 330px; }
.countdown div { background: rgb(255 255 255 / 0.07); border: 1px solid rgb(255 255 255 / 0.12); border-radius: 14px; padding: 10px 4px; text-align: center; }
.countdown b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 700; color: #fff; line-height: 1.2; }
.countdown small { font-size: 12.5px; color: #b9cfc0; }
.tentative { font-size: 12.5px; color: #b9cfc0; display: inline-flex; gap: 6px; align-items: center; }
@media (prefers-reduced-motion: no-preference) {
  .anim .hero-copy > * { animation: rise 0.8s var(--ease) both; }
  .anim .hero-copy > *:nth-child(2) { animation-delay: 0.06s; }
  .anim .hero-copy > *:nth-child(3) { animation-delay: 0.12s; }
  .anim .hero-copy > *:nth-child(4) { animation-delay: 0.18s; }
  .anim .hero-side { animation: fade 1s var(--ease) 0.15s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 36px 24px 28px; min-height: 0; border-radius: 22px; }
  .hero-side { flex-direction: row; justify-content: space-between; order: -1; }
  .hero-side img.emblem { width: 92px; }
  .countdown { max-width: 260px; }
  .countdown b { font-size: 20px; }
}
@media (max-width: 480px) {
  .hero-side { flex-direction: column; align-items: flex-start; }
  .countdown { max-width: none; }
}

/* ---------- Live strip / key dates ---------- */
.strip { margin-top: 20px; display: grid; gap: 14px; }
.live-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px;
}
.live-card .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--brand-soft); color: var(--brand); }
.live-card.is-vote { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: linear-gradient(0deg, var(--gold-soft), var(--gold-soft)) padding-box; }
.live-card.is-vote .ico { background: var(--gold); color: var(--gold-ink); }
.live-card h3 { font-size: 17px; }
.live-card p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 640px) { .live-card { grid-template-columns: auto minmax(0, 1fr); } .live-card .btn { grid-column: 1 / -1; } }

.dates { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.dates > div { padding: 18px 20px; display: grid; gap: 2px; }
.dates > div + div { border-inline-start: 1px solid var(--line); }
.dates b { font-family: var(--font-display); font-size: 17px; }
.dates span { font-size: 14px; color: var(--muted); }
.dates .is-next b { color: var(--brand); }
@media (max-width: 760px) { .dates { grid-template-columns: 1fr 1fr; } .dates > div:nth-child(3) { border-inline-start: 0; } .dates > div:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); gap: 16px; }
.tile {
  position: relative; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface);
  padding: 22px; display: flex; flex-direction: column; gap: 10px; overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.2s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.tile h3 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
.tile p { color: var(--muted); font-size: 15px; }
.tile .tile-ico { font-size: 26px; color: var(--brand); }
.tile .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); font-size: 14.5px; }
.tile-program { grid-column: span 3; grid-row: span 2; }
.tile-vote { grid-column: span 3; background: var(--brand-deep); color: #eef5f0; border-color: transparent; }
.tile-vote p { color: #bcd2c3; }
.tile-vote .tile-ico, .tile-vote .go { color: var(--gold); }
.tile-stay { grid-column: span 3; background: var(--gold-soft); border-color: transparent; }
.tile-stay .tile-ico, .tile-stay .go { color: var(--gold-text); }
.tile-transport, .tile-decisions, .tile-news { grid-column: span 2; }
.mini-timeline { display: grid; gap: 4px; margin-top: 6px; }
.mini-timeline div { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.mini-timeline div:last-child { border-bottom: 0; }
.mini-timeline b { font-family: var(--font-display); font-weight: 600; color: var(--brand); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-program, .tile-vote, .tile-stay { grid-column: span 2; grid-row: auto; }
  .tile-transport, .tile-decisions { grid-column: span 1; }
  .tile-news { grid-column: span 2; }
}

/* ---------- Badge promo ---------- */
.promo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.promo-img { min-height: 340px; background-size: cover; background-position: 70% center; }
.promo-copy { padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.promo-copy h2 { font-size: clamp(24px, 2.8vw, 32px); }
.promo-copy ul { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 12px; }
.promo-copy li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }
.promo-copy li i { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 19px; }
.promo-copy li b { display: block; font-weight: 600; }
.promo-copy li span { color: var(--muted); font-size: 14.5px; }
@media (max-width: 860px) { .promo { grid-template-columns: 1fr; } .promo-img { min-height: 220px; } .promo-copy { padding: 26px 22px; } }

/* ---------- News ---------- */
.news-list { display: grid; gap: 12px; }
.news-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.news-item .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; font-size: 21px; }
.news-item.is-urgent { border-color: color-mix(in srgb, var(--no) 40%, var(--line)); }
.news-item.is-urgent .ico { background: var(--no-soft); color: var(--no); }
.news-item.is-pinned .ico { background: var(--gold-soft); color: var(--gold-text); }
.news-item h3 { font-size: 17px; margin-bottom: 4px; }
.news-item p { color: var(--ink-2); font-size: 15px; }
.news-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.filter.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Segmented ---------- */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; max-width: 100%; overflow-x: auto; }
.seg a, .seg button { border: 0; background: transparent; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--muted); white-space: nowrap; display: block; text-align: center; line-height: 1.35; }
.seg a i, .seg button i { vertical-align: -3px; margin-inline-end: 4px; font-size: 18px; }
.seg small { display: block; font-weight: 500; font-size: 12.5px; }
.seg .active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.08); }

/* ---------- Program ---------- */
.timeline { display: grid; gap: 10px; margin-top: 22px; }
.slot { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color 0.2s, transform 0.3s var(--ease); }
a.slot:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); transform: translateX(-3px); }
.slot-time { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--ink); }
.slot-time small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--muted); }
.slot h3 { font-size: 17px; font-weight: 600; }
.slot-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 14px; margin-top: 2px; }
.slot-meta span { display: inline-flex; align-items: center; gap: 5px; }
.slot.is-break { background: transparent; border-style: dashed; }
.slot.is-break h3 { font-weight: 500; color: var(--muted); }
.slot.is-now { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.slot.is-done { opacity: 0.62; }
.slot .caret { color: var(--muted); font-size: 20px; }
@media (max-width: 640px) { .slot { grid-template-columns: 76px minmax(0, 1fr); padding: 14px 16px; } .slot .end-col { grid-column: 2; justify-self: start; } .slot .caret { display: none; } }

.agenda { counter-reset: ag; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.agenda li { counter-increment: ag; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.agenda li::before { content: counter(ag); width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-family: var(--font-display); font-size: 15px; color: var(--brand); }
.agenda li span { padding-top: 4px; }
.facts { display: grid; gap: 14px; }
.fact { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; }
.fact i { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 20px; }
.fact small { display: block; color: var(--muted); font-size: 13px; }
.fact b { font-weight: 600; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.doc-row i.ph-file-pdf { font-size: 26px; color: var(--no); }
.doc-row div { flex: 1; min-width: 0; }
.doc-row small { color: var(--muted); display: block; font-size: 13px; }

/* ---------- Ballot rows ---------- */
.ballot-group { display: grid; gap: 10px; }
.ballot-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color 0.2s; }
a.ballot-row:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.ballot-row .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 21px; color: var(--ink-2); }
.ballot-row.is-open { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.ballot-row.is-open .ico { background: var(--gold); color: var(--gold-ink); }
.ballot-row h3 { font-size: 16px; font-weight: 600; }
.ballot-row small { color: var(--muted); font-size: 13.5px; }
.ballot-row .end-col { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .ballot-row { grid-template-columns: 40px minmax(0, 1fr); } .ballot-row .end-col { grid-column: 2; justify-content: flex-start; } }

/* ---------- Ballot page ---------- */
.ballot-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.ballot-top { padding: 24px 24px 20px; display: grid; gap: 12px; }
.ballot-top h1 { font-size: clamp(22px, 3vw, 30px); }
.ballot-status { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: var(--surface-2); }
.ballot-status div { padding: 14px 18px; display: grid; }
.ballot-status div + div { border-inline-start: 1px solid var(--line); }
.ballot-status small { color: var(--muted); font-size: 13px; }
.ballot-status b { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare > div { border-radius: 16px; padding: 18px; border: 1px solid var(--line); }
.compare h4 { font-size: 14px; color: var(--muted); font-family: var(--font-body); font-weight: 600; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.compare .proposed { background: var(--brand-soft); border-color: transparent; }
.compare .proposed h4 { color: var(--brand); }
.compare p { font-size: 16.5px; line-height: 1.9; }
@media (max-width: 700px) { .compare { grid-template-columns: 1fr; } }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice {
  position: relative; display: grid; justify-items: center; gap: 8px; padding: 22px 12px; border-radius: 18px;
  border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: 18px; font-family: var(--font-display);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.choice i { font-size: 34px; }
.choice:active { transform: scale(0.98); }
.choice[data-v="yes"] i { color: var(--yes); }
.choice[data-v="no"] i { color: var(--no); }
.choice[data-v="abs"] i { color: var(--abs); }
.choice.selected[data-v="yes"] { border-color: var(--yes); background: var(--yes-soft); }
.choice.selected[data-v="no"] { border-color: var(--no); background: var(--no-soft); }
.choice.selected[data-v="abs"] { border-color: var(--abs); background: var(--abs-soft); }
.choice .tick { position: absolute; top: 10px; inset-inline-end: 10px; font-size: 20px; opacity: 0; transition: opacity 0.2s; }
.choice.selected .tick { opacity: 1; }
@media (max-width: 520px) { .choices { grid-template-columns: 1fr; } .choice { grid-template-columns: auto 1fr; justify-items: start; align-items: center; padding: 16px 18px; } .choice i { font-size: 28px; } }

.receipt { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 28px 20px; }
.receipt .big-ico { width: 72px; height: 72px; border-radius: 50%; background: var(--yes-soft); color: var(--yes); display: grid; place-items: center; font-size: 40px; }
.receipt code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 18px; letter-spacing: 0.06em; background: var(--surface-2); padding: 6px 14px; border-radius: 10px; direction: ltr; }
@media (prefers-reduced-motion: no-preference) { .anim .receipt .big-ico { animation: pop 0.5s var(--ease) both; } }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Results ---------- */
.results { display: grid; gap: 14px; }
.res-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 110px; gap: 14px; align-items: center; }
.res-row .lbl { font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.res-row .bar { height: 12px; border-radius: 999px; overflow: hidden; }
.res-row .bar span { display: block; height: 100%; border-radius: 999px; transition: width 0.8s var(--ease); }
.res-row .val { text-align: end; font-variant-numeric: tabular-nums; font-weight: 600; }
.res-row .val small { color: var(--muted); font-weight: 500; }
.bar-yes { background: var(--yes); } .bar-no { background: var(--no); } .bar-abs { background: var(--abs); }
.verdict { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; font-weight: 600; }
.verdict i { font-size: 26px; }
.verdict.ok { background: var(--yes-soft); color: var(--yes); }
.verdict.bad { background: var(--no-soft); color: var(--no); }
.verdict small { display: block; font-weight: 500; color: var(--ink-2); font-size: 13.5px; }

/* ---------- Gate / login ---------- */
.scanner {
  position: relative; aspect-ratio: 1; width: min(320px, 100%); margin-inline: auto; border-radius: 24px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #1d3a2b, #07140d 75%);
  display: grid; place-items: center; color: #9fc3ad;
}
.scanner .frame { position: absolute; inset: 18%; }
.scanner .frame::before, .scanner .frame::after, .scanner .frame span::before, .scanner .frame span::after {
  content: ""; position: absolute; width: 34px; height: 34px; border: 4px solid var(--gold);
}
.scanner .frame::before { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.scanner .frame::after { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.scanner .frame span::before { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.scanner .frame span::after { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.scanner .beam { position: absolute; inset-inline: 20%; height: 2px; background: var(--gold); box-shadow: 0 0 18px 4px rgb(231 189 18 / 0.45); top: 20%; opacity: 0; }
.scanner.is-scanning .beam { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .scanner.is-scanning .beam { animation: beam 1.3s ease-in-out infinite alternate; } }
@keyframes beam { from { top: 20%; } to { top: 80%; } }
.scanner .qr-ghost { font-size: 84px; opacity: 0.35; }
.scanner.is-done { background: radial-gradient(circle at 50% 40%, #1f6a43, #0a2a19 75%); }
.scanner.is-done .qr-ghost { opacity: 1; color: #fff; }
.member-card { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 16px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.notice { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: 15px; align-items: start; }
.notice i { font-size: 24px; }
.notice.ok { background: var(--yes-soft); } .notice.ok i { color: var(--yes); }
.notice.warn { background: var(--gold-soft); } .notice.warn i { color: var(--gold-text); }
.notice.bad { background: var(--no-soft); } .notice.bad i { color: var(--no); }
.notice b { display: block; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; align-content: start; }
.field label, .field .label { font-weight: 600; font-size: 15px; color: var(--ink); }
.field label .req { color: var(--no); }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid color-mix(in srgb, var(--line) 70%, var(--muted));
  background: var(--surface); color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 0.85; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.field.has-error .input, .field.has-error .select { border-color: var(--no); }
.help { font-size: 13.5px; color: var(--muted); }
.error { font-size: 13.5px; color: var(--no); font-weight: 500; }
.input-group { display: flex; direction: ltr; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--line) 70%, var(--muted)); border-inline-end: 0; border-radius: var(--r-ctl) 0 0 var(--r-ctl); background: var(--surface-2); font-weight: 600; color: var(--muted); }
.input-group .input { border-radius: 0 var(--r-ctl) var(--r-ctl) 0; text-align: left; }
.options { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--r-ctl); border: 1px solid color-mix(in srgb, var(--line) 70%, var(--muted)); background: var(--surface); font-weight: 500; transition: all 0.2s; }
.opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.opt input:focus-visible + span { box-shadow: var(--focus); }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--brand); }
.form-section { display: grid; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section > h3 { font-size: 17px; display: flex; gap: 8px; align-items: center; }
.form-section > h3 i { color: var(--brand); }

/* ---------- Badge ---------- */
.badge-wrap { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 820px) { .badge-wrap { grid-template-columns: 1fr; } }
.badge {
  width: 100%; max-width: 380px; margin-inline: auto; border-radius: 26px; overflow: hidden; background: #fff; color: #0f1b14;
  box-shadow: var(--shadow-lg); border: 1px solid #dfe6db; position: relative;
}
.badge-head { background: #0a3524; color: #fff; padding: 22px 22px 54px; display: flex; gap: 12px; align-items: center; position: relative; }
.badge-head img { width: 52px; height: 52px; object-fit: contain; }
.badge-head b { font-family: var(--font-display); font-size: 17px; display: block; line-height: 1.35; }
.badge-head small { color: #b9cfc0; font-size: 13px; }
.badge-body { padding: 0 22px 22px; margin-top: -36px; position: relative; display: grid; gap: 14px; justify-items: center; text-align: center; }
.badge-qr { background: #fff; padding: 12px; border-radius: 18px; box-shadow: 0 6px 20px rgb(10 45 28 / 0.15); }
.badge-qr svg, .badge-qr img { width: 172px; height: 172px; display: block; }
.badge-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.badge-role { display: inline-flex; padding: 4px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; background: #e9eee6; color: #2a3a30; }
.badge-role.vote { background: #e7bd12; color: #221b00; }
.badge-meta { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-top: 1px solid #dfe6db; padding-top: 12px; text-align: start; gap: 8px; }
.badge-meta small { color: #56665c; font-size: 12.5px; display: block; }
.badge-meta b { font-weight: 600; font-size: 14.5px; }
.badge-code { direction: ltr; font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.08em; font-weight: 700; }
.badge-stripe { height: 10px; background: repeating-linear-gradient(90deg, #0d5a37 0 24px, #e7bd12 24px 48px); }

/* ---------- Logistics ---------- */
.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.info-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 4px; }
.info-grid i { font-size: 24px; color: var(--brand); }
.info-grid small { color: var(--muted); font-size: 13px; }
.info-grid b { font-weight: 600; font-size: 15.5px; }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.wing { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.wing:last-child { border-bottom: 0; }
.wing .tag { font-family: var(--font-display); font-weight: 700; background: var(--surface-2); padding: 8px 12px; border-radius: 12px; min-width: 110px; text-align: center; }
.wing small { color: var(--muted); display: block; font-size: 14px; }
.times { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.times > div { border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; background: var(--surface); }
.times b { display: block; font-family: var(--font-display); font-size: 22px; color: var(--brand); }
.times small { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .times { grid-template-columns: repeat(3, 1fr); } }
.route { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.route:last-child { border-bottom: 0; }
.route i { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; color: var(--ink-2); }
.route small { color: var(--muted); display: block; font-size: 14px; }
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.contact { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.contact i.lead { font-size: 24px; color: var(--brand); }
.contact .phone { direction: ltr; text-align: right; color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.lookup { display: flex; gap: 10px; }
.lookup .input { flex: 1; }
.room-result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 16px; border-radius: 16px; background: var(--brand-soft); }
.room-result .room-no { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--brand); background: var(--surface); border-radius: 14px; padding: 6px 16px; }

/* ---------- Decisions ---------- */
.decision-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color 0.2s; }
.decision-row:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.decision-no { text-align: center; border-inline-end: 1px solid var(--line); padding-inline-end: 14px; }
.decision-no small { display: block; color: var(--muted); font-size: 12.5px; }
.decision-no b { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.decision-row h3 { font-size: 16.5px; font-weight: 600; }
.decision-row .sub { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13.5px; margin-top: 4px; }
@media (max-width: 640px) { .decision-row { grid-template-columns: 56px minmax(0, 1fr); } .decision-row .end-col { grid-column: 2; } }
.reg-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.reg-progress > div { padding: 14px; border-radius: 14px; background: var(--surface-2); }
.reg-progress b { font-family: var(--font-display); font-size: 26px; display: block; line-height: 1.2; }
.reg-progress small { color: var(--muted); font-size: 13.5px; }
.empty { text-align: center; padding: 40px 20px; display: grid; justify-items: center; gap: 10px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r-card); }
.empty i { font-size: 40px; color: var(--ink-2); opacity: 0.6; }
.empty b { color: var(--ink); font-size: 17px; }

/* Official document */
.doc-sheet { background: #fff; color: #111; max-width: 820px; margin-inline: auto; border-radius: 6px; box-shadow: var(--shadow-lg); padding: 56px 64px; font-size: 17px; line-height: 2; }
.doc-sheet .doc-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; border-bottom: 2px solid #0d5a37; padding-bottom: 16px; margin-bottom: 26px; }
.doc-sheet .doc-head img { width: 84px; }
.doc-sheet .doc-head .r { font-family: var(--font-display); font-weight: 700; line-height: 1.6; font-size: 15px; }
.doc-sheet .doc-head .l { text-align: left; font-size: 14px; color: #444; line-height: 1.7; }
.doc-sheet h1 { text-align: center; font-size: 24px; margin-bottom: 4px; }
.doc-sheet h2 { text-align: center; font-size: 18px; font-weight: 600; color: #333; margin-bottom: 22px; }
.doc-sheet .art { margin-bottom: 10px; }
.doc-sheet .art b { color: #0d5a37; }
.doc-sheet .vote-box { margin: 24px 0; border: 1px solid #ccd5c9; border-radius: 10px; padding: 12px 18px; font-size: 15px; background: #f5f8f3; }
.doc-sheet .signs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 48px; text-align: center; font-weight: 600; }
.doc-sheet .signs span { display: block; margin-top: 46px; border-top: 1px dotted #888; padding-top: 6px; font-weight: 400; color: #666; font-size: 14px; }
@media (max-width: 700px) { .doc-sheet { padding: 28px 20px; font-size: 15.5px; } .doc-sheet .doc-head { grid-template-columns: 1fr; text-align: center; } .doc-sheet .doc-head .l { text-align: center; } .doc-sheet .doc-head img { margin-inline: auto; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 24px; padding-block: 36px 40px; background: var(--surface); }
.footer .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 28px; }
.footer h4 { font-size: 15px; margin-bottom: 10px; }
.footer a, .footer p { color: var(--muted); font-size: 14.5px; display: block; padding-block: 3px; }
.footer a:hover { color: var(--brand); }
.footer .hosts { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.footer .hosts img { height: 54px; width: auto; }
@media (max-width: 760px) { .footer .wrap { grid-template-columns: 1fr 1fr; } .footer .wrap > :first-child { grid-column: 1 / -1; } }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 820px) {
  body.has-tabbar { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar button { border: 0; background: none; display: grid; justify-items: center; gap: 2px; padding: 9px 0 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
  .tabbar i { font-size: 23px; }
  .tabbar .active { color: var(--brand); }
  .tabbar .vote-tab i { color: var(--gold-text); }
}

/* ---------- Sheet / modal / drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgb(4 14 9 / 0.55); z-index: 50; display: grid; place-items: center; padding: 16px; }
@media (prefers-reduced-motion: no-preference) { .overlay { animation: fadeIn 0.2s ease both; } .modal, .drawer, .sheet { animation: rise 0.35s var(--ease) both; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); border-radius: 22px; width: min(460px, 100%); padding: 26px; display: grid; gap: 16px; box-shadow: var(--shadow-lg); }
.modal h3 { font-size: 21px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.overlay.drawer-overlay { place-items: stretch; justify-items: start; padding: 0; }
.drawer { background: var(--surface); width: min(420px, 100%); height: 100dvh; overflow-y: auto; overflow-x: hidden; padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 18px; box-shadow: var(--shadow-lg); }
.drawer .seg button { white-space: normal; padding: 8px 6px; }
.drawer h3 { font-size: 20px; }
.drawer .group-title { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.tour-list { display: grid; gap: 6px; counter-reset: tour; }
.tour-list a { counter-increment: tour; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-weight: 500; font-size: 15px; }
.tour-list a::before { content: counter(tour); width: 30px; height: 30px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.tour-list a:hover { background: var(--surface-2); }
.tour-list a small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.tour-list a i { color: var(--muted); }
.sheet-overlay { place-items: end center; padding: 0; }
.sheet-overlay .sheet { width: min(560px, 100%); }
.sheet { background: var(--surface); border-radius: 22px 22px 0 0; padding: 14px 18px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 10px; }
.sheet a { display: flex; align-items: center; gap: 14px; padding: 14px 10px; border-radius: 12px; font-weight: 600; }
.sheet a i { font-size: 22px; color: var(--brand); }
.sheet a:hover { background: var(--surface-2); }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(50%); z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); border-radius: 14px; padding: 12px 16px; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: center; box-shadow: var(--shadow-lg); font-size: 14.5px; pointer-events: auto; }
.toast i { font-size: 22px; color: var(--gold); }
.toast b { display: block; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise 0.35s var(--ease) both; } }
@media (max-width: 820px) { body.has-tabbar .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* ---------- Admin ---------- */
.admin { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; padding-block: 28px 64px; align-items: start; }
.side { position: sticky; top: calc(var(--topbar-h) + 20px); display: grid; gap: 4px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-weight: 500; color: var(--ink-2); }
.side a i { font-size: 20px; }
.side a:hover { background: var(--surface-2); }
.side a.active { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.side .side-title { font-size: 13px; color: var(--muted); padding: 4px 12px 8px; font-weight: 600; }
.side .sep { height: 1px; background: var(--line); margin: 10px 0; }
@media (max-width: 960px) {
  .admin { grid-template-columns: 1fr; gap: 18px; }
  .side { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .side a { white-space: nowrap; border: 1px solid var(--line); }
  .side .side-title, .side .sep { display: none; }
}
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; display: grid; gap: 6px; }
.kpi small { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.kpi b { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1.15; }
.kpi b span { font-size: 17px; color: var(--muted); font-weight: 500; }
.kpi .foot { font-size: 13.5px; color: var(--muted); }
.kpi.is-brand { background: var(--brand-deep); color: #eef5f0; border-color: transparent; }
.kpi.is-brand small, .kpi.is-brand .foot, .kpi.is-brand b span { color: #b9cfc0; }
@media (max-width: 1100px) { .kpis { grid-template-columns: 1fr 1fr; } }
.meter { display: flex; gap: 3px; height: 8px; margin-top: 4px; }
.meter i { flex: 1; border-radius: 3px; background: currentColor; opacity: 0.18; }
.meter i.on { opacity: 1; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: start; padding: 12px 16px; white-space: nowrap; }
th { font-weight: 600; color: var(--muted); font-size: 13.5px; background: var(--surface-2); }
tbody tr + tr td { border-top: 1px solid var(--line); }
.log { display: grid; gap: 0; }
.log div { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.log div:last-child { border-bottom: 0; }
.log time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.ctl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.ctl-row.is-open { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.ctl-row h4 { font-size: 15.5px; font-weight: 600; font-family: var(--font-body); }
.ctl-row .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ctl-row .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ctl-live { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
@media (max-width: 640px) { .ctl-row { grid-template-columns: 1fr; } .ctl-row .acts { justify-content: flex-start; } }

/* ---------- Hall screen ---------- */
body.is-screen { background: #05110b; color: #eef5f0; }
.screen { min-height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: clamp(20px, 3vw, 44px) clamp(20px, 4vw, 64px); gap: 24px;
  background: radial-gradient(1200px 600px at 100% 0%, rgb(42 154 98 / 0.22), transparent 60%), radial-gradient(900px 500px at 0% 100%, rgb(231 189 18 / 0.08), transparent 60%), #05110b; }
.screen-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.screen-head .brand img { width: 64px; height: 64px; }
.screen-head .brand-text strong { font-size: clamp(18px, 1.6vw, 26px); color: #fff; }
.screen-head .brand-text span { font-size: clamp(14px, 1.1vw, 18px); color: #9fbfab; display: block; }
.screen-quorum { text-align: end; }
.screen-quorum b { font-family: var(--font-display); font-size: clamp(26px, 2.4vw, 40px); color: #fff; }
.screen-quorum small { display: block; color: #9fbfab; font-size: clamp(13px, 1vw, 17px); }
.screen-body { display: grid; align-content: center; gap: clamp(18px, 2.4vw, 36px); }
.screen-kind { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(16px, 1.4vw, 22px); color: var(--gold); font-weight: 600; }
.screen-title { font-size: clamp(30px, 4vw, 68px); font-weight: 800; line-height: 1.25; color: #fff; max-width: 24ch; }
.screen-sub { font-size: clamp(16px, 1.5vw, 24px); color: #b9cfc0; max-width: 60ch; }
.screen-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px); }
.screen-stat { background: rgb(255 255 255 / 0.05); border: 1px solid rgb(255 255 255 / 0.1); border-radius: 24px; padding: clamp(16px, 2vw, 30px); }
.screen-stat small { font-size: clamp(14px, 1.2vw, 20px); color: #9fbfab; display: block; }
.screen-stat b { font-family: var(--font-display); font-size: clamp(44px, 6vw, 104px); font-weight: 700; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.screen-stat.is-gold b { color: var(--gold); }
.screen-results { display: grid; gap: clamp(14px, 1.6vw, 24px); }
.screen-res { display: grid; grid-template-columns: clamp(120px, 12vw, 220px) minmax(0, 1fr) clamp(130px, 13vw, 240px); gap: 20px; align-items: center; font-size: clamp(18px, 1.8vw, 30px); font-weight: 600; }
.screen-res .bar { height: clamp(18px, 2.2vw, 36px); border-radius: 999px; background: rgb(255 255 255 / 0.06); overflow: hidden; }
.screen-res .bar span { display: block; height: 100%; border-radius: 999px; transition: width 1.2s var(--ease); }
.screen-res .v { text-align: end; font-variant-numeric: tabular-nums; }
.screen-res .v small { color: #9fbfab; font-weight: 500; }
.screen-verdict { display: inline-flex; align-items: center; gap: 14px; padding: 12px 26px; border-radius: 999px; font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 40px); font-weight: 800; }
.screen-verdict.ok { background: #13803c; color: #fff; }
.screen-verdict.bad { background: #b42318; color: #fff; }
.screen-foot { display: flex; justify-content: space-between; gap: 20px; color: #9fbfab; font-size: clamp(13px, 1vw, 17px); flex-wrap: wrap; }
.screen-note { display: inline-flex; gap: 8px; align-items: center; }
.ring { --p: 0; width: clamp(160px, 17vw, 300px); aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgb(255 255 255 / 0.08) 0); display: grid; place-items: center; }
.ring > div { width: 82%; aspect-ratio: 1; border-radius: 50%; background: #05110b; display: grid; place-items: center; text-align: center; }
.ring b { font-family: var(--font-display); font-size: clamp(34px, 4vw, 72px); color: #fff; line-height: 1; }
.ring small { color: #9fbfab; font-size: clamp(13px, 1.1vw, 18px); }
.screen-live { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(20px, 3vw, 56px); align-items: center; }
@media (max-width: 760px) { .screen-live { grid-template-columns: 1fr; } .screen-stats { grid-template-columns: 1fr 1fr; } .screen-res { grid-template-columns: 90px minmax(0, 1fr) 110px; gap: 10px; } }

/* ---------- Embed mode (inside presentation frames) ---------- */
body.is-embed .demo-bar, body.is-embed .tour-fab { display: none !important; }
body.is-embed { overflow-x: hidden; }
body.is-embed .toasts, body.is-screen .toasts { display: none; }

/* ---------- Print ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #111; padding: 0 !important; }
  .demo-bar, .topbar, .tabbar, .footer, .no-print, .toasts, .overlay { display: none !important; }
  .page { padding: 0; }
  .doc-sheet { box-shadow: none; padding: 0; max-width: none; }
  .badge { box-shadow: none; }
  .badge-wrap { grid-template-columns: 1fr; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

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

/* =========================================================
   إضافات الموقع الفعلي: لوحة اللجنة، البوابة، طباعة البطاقات
   ========================================================= */
.modal { max-height: 92dvh; overflow-y: auto; }
.modal.wide { width: min(760px, 100%); }
.table-wrap tr[data-act] { transition: background 0.15s; }
.table-wrap tr[data-act]:hover td { background: var(--surface-2); }
fieldset[disabled] { opacity: 0.6; }
input[type="file"].input { height: auto; padding-block: 10px; }

/* بوابة القاعة */
body.is-gate { background: #05110b; color: #eef5f0; }
.gate { min-height: 100dvh; display: grid; align-content: start; gap: 14px; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
.gate-head { display: flex; align-items: center; gap: 12px; }
.gate-head > div { flex: 1; display: grid; line-height: 1.4; }
.gate-head b { font-family: var(--font-display); font-size: 18px; }
.gate-head small { color: #9fbfab; font-variant-numeric: tabular-nums; }
.gate-head .icon-btn { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.15); color: #fff; }
.gate .seg { background: rgb(255 255 255 / 0.08); }
.gate .seg button { color: #b9cfc0; }
.gate .seg .active { background: #e7bd12; color: #221b00; box-shadow: none; }
.gate-cam { position: relative; aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #1d3a2b, #07140d 75%); display: grid; place-items: center; }
.gate-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gate-frame { position: absolute; inset: 16%; border: 3px solid rgb(231 189 18 / 0.9); border-radius: 18px; pointer-events: none; }
.gate-cam .btn { position: relative; z-index: 1; }
.gate-result { min-height: 92px; }
.gate-result .notice { font-size: 16.5px; color: #0f1b14; }
.gate-result .notice b { font-size: 19px; }
.gate-result .muted { color: #9fbfab; text-align: center; padding-top: 24px; }
.gate-manual .input { background: rgb(255 255 255 / 0.06); color: #fff; border-color: rgb(255 255 255 / 0.22); }
.gate-manual .input::placeholder { color: #9fbfab; }

/* بطاقات الطباعة */
.badge-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pbadge { background: #fff; color: #0f1b14; border: 1px dashed #b9c4b5; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; break-inside: avoid; page-break-inside: avoid; }
.pbadge-head { background: #0a3524; color: #fff; display: flex; gap: 10px; align-items: center; padding: 12px 14px; }
.pbadge-head img { width: 40px; height: 40px; object-fit: contain; }
.pbadge-head b { font-family: var(--font-display); font-size: 14px; display: block; line-height: 1.4; }
.pbadge-head small { font-size: 11px; color: #b9cfc0; }
.pbadge-body { padding: 14px; display: grid; justify-items: center; gap: 8px; text-align: center; }
.pbadge-qr svg, .pbadge-qr > div { width: 150px; height: 150px; display: block; }
.pbadge-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.35; }
.pbadge-role { padding: 3px 12px; border-radius: 999px; background: #e9eee6; font-weight: 600; font-size: 13px; }
.pbadge-role.vote { background: #e7bd12; color: #221b00; }
.pbadge-meta { display: flex; gap: 14px; font-size: 13px; color: #56665c; }
.pbadge-stripe { height: 8px; background: repeating-linear-gradient(90deg, #0d5a37 0 20px, #e7bd12 20px 40px); }
.pbadge-pin { border-top: 2px dashed #8a958d; padding: 10px 14px; display: grid; gap: 2px; font-size: 13px; background: #fafbf9; }
.pbadge-pin span { color: #56665c; font-size: 11.5px; display: flex; gap: 6px; align-items: center; }
.pbadge-pin b { font-size: 15px; }

@media print {
  .side { display: none !important; }
  .admin { display: block !important; padding: 0 !important; }
  .wrap { max-width: none !important; padding: 0 !important; }
  .badge-sheet { grid-template-columns: repeat(2, 1fr); gap: 6mm; }
  .pbadge { border-color: #999; }
}

/* ---------- الطوارئ ---------- */
.icon-btn.sos { width: auto; padding: 0 12px; gap: 6px; display: inline-flex; align-items: center; background: var(--no-soft); color: var(--no); border-color: color-mix(in srgb, var(--no) 30%, transparent); font-weight: 700; font-size: 14px; }
.icon-btn.sos i { font-size: 18px; }
.icon-btn.sos:hover { background: color-mix(in srgb, var(--no) 18%, var(--surface)); }
@media (max-width: 480px) { .icon-btn.sos { width: 42px; padding: 0; justify-content: center; } .icon-btn.sos span { display: none; } }
.sheet h3 { font-size: 20px; display: flex; gap: 8px; align-items: center; padding: 2px 10px 6px; }
.sos-sheet h3 { color: var(--no); }
.sos-sheet > p { padding: 0 10px; }
.sos-call { margin: 4px 0 2px; }
.sos-row { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 10px; border-radius: 12px; font-weight: 600; }
.sos-row b { font-family: var(--font-display); }
.sheet a.sheet-sos, .sheet a.sheet-sos i { color: var(--no); }
.footer a.footer-sos { color: var(--no); font-weight: 600; }
.badge-sos { font-size: 13px; color: #b42318; font-weight: 600; display: flex; gap: 6px; align-items: center; justify-content: center; }

/* ---------- الصفحة الرئيسية: الخريطة والملاحظات والطوارئ ---------- */
.help-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 860px) { .help-grid { grid-template-columns: 1fr; } }
.map-teaser { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); transition: border-color 0.2s, box-shadow 0.3s var(--ease); }
.map-teaser:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: var(--shadow); }
.map-teaser-img { aspect-ratio: 3 / 2; overflow: hidden; background: #e6ede3; }
.map-teaser-img img { width: 100%; height: 100%; object-fit: cover; }
.map-teaser-cap { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; }
.map-teaser-cap h3 { font-size: 19px; display: flex; gap: 8px; align-items: center; }
.map-teaser-cap p { color: var(--muted); font-size: 14.5px; }
.help-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: grid; gap: 10px; justify-items: start; }
.help-card h3 { font-size: 18px; display: flex; gap: 8px; align-items: center; }
.help-card h3 i { color: var(--brand); }
.help-card.sos { background: var(--no-soft); border-color: transparent; }
.help-card.sos h3, .help-card.sos h3 i { color: var(--no); }
.sos-big { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--no); line-height: 1.2; }

/* ---------- خريطة المنتجع ---------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 22px; }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; } }
.map-shell { position: relative; border: 1px solid var(--line); border-radius: var(--r-card); background: #e6ede3; overflow: hidden; }
.map-scroll { overflow: auto; max-height: 74vh; overscroll-behavior: contain; }
.map-canvas { position: relative; min-width: 100%; }
.map-canvas img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.map-pin {
  position: absolute; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 50%; padding: 0;
  border: 3px solid #fff; background: var(--c); color: #fff; font: 700 14px/1 var(--font-display);
  display: grid; place-items: center; box-shadow: 0 3px 10px rgb(0 0 0 / 0.28); transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.map-pin:hover { transform: translate(-50%, -50%) scale(1.12); }
.map-pin.active { transform: translate(-50%, -50%) scale(1.3); z-index: 2; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 35%, transparent), 0 3px 10px rgb(0 0 0 / 0.3); }
.map-ctrl { position: absolute; top: 10px; inset-inline-end: 10px; display: grid; gap: 6px; z-index: 3; }
.map-ctrl button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 18px; display: grid; place-items: center; box-shadow: var(--shadow); }
.map-info { margin-top: 12px; }
.map-card { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 16px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.map-card b { font-family: var(--font-display); font-size: 17px; }
.map-card small { color: var(--muted); display: block; margin-bottom: 4px; }
.map-num { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font: 700 13.5px/1 var(--font-display); flex-shrink: 0; }
.map-sessions { display: grid; gap: 4px; margin-top: 10px; }
.map-sessions a { color: var(--brand); font-weight: 600; font-size: 14.5px; }
.map-legend { display: grid; gap: 16px; }
.map-legend h4 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-family: var(--font-body); font-weight: 700; }
.map-legend .dot, .chip-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; flex-shrink: 0; }
.legend-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; text-align: start; border: 0; background: transparent; padding: 8px; border-radius: 12px; color: var(--ink); }
.legend-item:hover, .legend-item.active { background: var(--surface-2); }
.legend-item b { display: block; font-weight: 600; font-size: 15px; }
.legend-item small { color: var(--muted); font-size: 13px; display: block; }
.filter.off { opacity: 0.45; text-decoration: line-through; }
.filter .chip-dot { margin-inline-end: 4px; }
.map-editor .map-canvas { cursor: crosshair; }
.map-editor .map-pin { cursor: grab; touch-action: none; }
.map-editor .map-pin:active { cursor: grabbing; }

/* ---------- لوحة اللجنة: الإعدادات والملاحظات ---------- */
.kv-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px) auto; gap: 8px; align-items: center; }
.fb-item p { line-height: 1.8; }
@media (max-width: 560px) { .kv-row { grid-template-columns: 1fr auto; } .kv-row input[data-p] { grid-column: 1; } }
@media (max-width: 640px) { .map-pin { width: 26px; height: 26px; font-size: 12px; border-width: 2px; } }
