/* Offroad Q8 — تصميم التطبيق (نهاري صحراوي / ليلي) */
:root {
  --bg: #faf6ee;          /* رملي فاتح */
  --bg2: #f2ead9;
  --card: #ffffff;
  --line: #e7dcc6;
  --txt: #33261a;         /* بني داكن */
  --muted: #8d7b62;
  --accent: #e07a1f;      /* برتقالي صحراوي */
  --accent2: #c05f10;
  --accent-soft: #fdeeda;
  --gold: #b98a1c;
  --green: #2e7d4f;       /* أخضر غابات */
  --green-soft: #e2f2e7;
  --red: #c62f2f;
  --red-soft: #fbe5e5;
  --blue: #1f6fb2;        /* أزرق سماء */
  --blue-soft: #e3eff9;
  --warn-soft: #fbf3d9;
  --topbar: rgba(250,246,238,.92);
  --shadow: 0 2px 10px rgba(80,60,30,.08);
  --radius: 14px;
}
[data-theme="dark"] {
  --bg: #12100c;
  --bg2: #1d1913;
  --card: #241f17;
  --line: #3a3227;
  --txt: #f0e9dd;
  --muted: #a99a83;
  --accent: #f0932f;
  --accent2: #d97a15;
  --accent-soft: #33261482;
  --gold: #e3b341;
  --green: #48b573;
  --green-soft: #16301f;
  --red: #ef6161;
  --red-soft: #331717;
  --blue: #5aa3dd;
  --blue-soft: #14283a;
  --warn-soft: #302811;
  --topbar: rgba(18,16,12,.92);
  --shadow: none;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Tajawal', -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  padding-bottom: 84px;
  transition: background .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ─── الهيدر ─── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--topbar); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 900; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand b { color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.bell { position: relative; font-size: 20px; }
.bell-alert { display: inline-block; }
.badge {
  position: absolute; top: -6px; inset-inline-start: -8px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.pill {
  padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 700;
  background: var(--accent); color: #fff;
}
.pill-admin { background: var(--card); color: var(--accent); border: 1px solid var(--accent); }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--txt); font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-weight: 700;
}

/* ─── الحاوية والبطاقات ─── */
.container { max-width: 640px; margin: 0 auto; padding: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.notif-unread { border-inline-start: 3px solid var(--accent); background: var(--accent-soft); }
.back-bar { margin-bottom: 10px; }
.back-bar a { color: var(--accent); font-weight: 700; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sec-title { margin: 22px 0 12px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.sec-title:first-child { margin-top: 4px; }

/* ─── الأزرار ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 18px; border: 0; border-radius: 12px;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
  transition: opacity .15s;
}
.btn:active { opacity: .8; }
.btn-sm { width: auto; padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-dark { background: var(--bg2); color: var(--txt); border: 1px solid var(--line); }
.btn-green { background: var(--green); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-red { background: transparent; color: var(--red); border: 1px solid var(--red); }

/* ─── النماذج ─── */
label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 6px; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--txt);
  font-family: inherit; font-size: 15px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
input[type=file] { padding: 10px; font-size: 13px; background: var(--bg2); }
input[type=checkbox] { width: auto; accent-color: var(--accent); transform: scale(1.3); margin-inline-end: 6px; }
input[type=radio] { width: auto; accent-color: var(--accent); transform: scale(1.3); margin-inline-end: 6px; }
::placeholder { color: var(--muted); opacity: .7; }
.check-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; margin-top: 10px;
  font-size: 14px; font-weight: 500; color: var(--txt); cursor: pointer;
}

/* ─── التنبيهات ─── */
.flashes { max-width: 640px; margin: 10px auto 0; padding: 0 16px; }
.flash {
  padding: 12px 14px; border-radius: 10px; margin-bottom: 8px;
  font-size: 14px; font-weight: 500; animation: slideIn .3s; word-break: break-word;
}
.flash-ok { background: var(--green-soft); color: var(--green); border: 1px solid var(--green); }
.flash-err { background: var(--red-soft); color: var(--red); border: 1px solid var(--red); }
.flash-warn { background: var(--warn-soft); color: var(--gold); border: 1px solid var(--gold); }
@keyframes slideIn { from { transform: translateY(-8px); opacity: 0; } }

/* ─── القائمة السفلية ─── */
.bottomnav {
  position: fixed; bottom: 0; right: 0; left: 0; z-index: 50;
  display: flex; justify-content: space-around;
  background: var(--topbar); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--muted); flex: 1; padding: 4px 0;
}
.bottomnav a i { font-style: normal; font-size: 20px; }
.bottomnav a.on { color: var(--accent); font-weight: 700; }

/* ─── شارات الحالة ─── */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
}
.tag-gold { background: var(--warn-soft); color: var(--gold); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-blue { background: var(--blue-soft); color: var(--blue); }
.tag-gray { background: var(--bg2); color: var(--muted); }

/* ─── الفعاليات ─── */
.event-card { display: flex; gap: 14px; }
.event-date {
  flex-shrink: 0; width: 60px; text-align: center;
  background: var(--accent-soft); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px;
}
.event-date b { display: block; font-size: 22px; color: var(--accent); }
.event-date span { font-size: 11px; color: var(--muted); }
.event-body { flex: 1; min-width: 0; }
.event-body h3 { font-size: 15px; margin-bottom: 4px; }

/* ─── أقرب المواعيد (الرئيسية) — شبكة مضغوطة ─── */
.nearest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.nearest-card {
  display: flex; flex-direction: column; gap: 5px; padding: 10px; text-decoration: none;
}
.nc-kind { font-size: 10.5px; padding: 2px 7px; }
.nearest-card .tag { font-size: 10.5px; padding: 2px 7px; }
.nc-title {
  font-size: 12.5px; line-height: 1.35; min-height: 2.7em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nc-date { font-size: 11px; }
.nc-reg { align-self: flex-start; }

/* ─── المتجر ─── */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product { text-align: center; }
.product .emoji { font-size: 44px; display: block; margin: 6px 0; }
.product .pimg {
  width: 100%; height: 120px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); margin: 6px 0; background: var(--bg2);
}
.price { color: var(--accent); font-weight: 900; font-size: 16px; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 14px; }
.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.media-grid img, .media-grid video {
  width: 100%; height: 140px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line); background: #000;
}

/* ─── الجداول ─── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 9px 8px; text-align: start; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-size: 12px; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ─── بطاقة العضوية ─── */
.member-card {
  background: linear-gradient(145deg, #2b2016 0%, #1a1611 55%, #4a3413 100%);
  border: 1px solid var(--gold); border-radius: 18px; padding: 22px;
  position: relative; overflow: hidden; color: #f0e9dd;
}
.member-card::after {
  content: '🏴'; position: absolute; left: -18px; bottom: -26px;
  font-size: 120px; opacity: .06;
}
.member-card .logo { width: 60px; margin-bottom: 8px; }
.member-card h2 { font-size: 24px; }
.member-card .muted { color: #a99a83; font-size: 15px; }
.member-no { color: var(--gold); font-size: 34px; font-weight: 900; letter-spacing: 1px; }
.mc-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 17px; }
.mc-row b { font-size: 17px; }
.mc-row span { color: #a99a83; font-size: 14px; }
.qr-box { background: #fff; border-radius: 12px; padding: 10px; width: fit-content; margin: 14px auto 0; }

/* ─── الإحصائيات ─── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 22px; color: var(--accent); }
.stat span { font-size: 11px; color: var(--muted); }

/* ─── الواجهة الرئيسية (الصحراء) ─── */
.hero { text-align: center; padding: 30px 10px 10px; }
.hero img { width: 110px; }
.hero h1 { font-size: 26px; margin: 10px 0 6px; }
.hero p { color: var(--muted); max-width: 440px; margin: 0 auto; }
.desert-hero {
  margin: -16px -16px 14px;
  padding: 24px 20px 0;
  text-align: center;
  background:
    linear-gradient(180deg, #ffd9a0 0%, #ffc178 30%, #f8a95c 55%, #e88f45 75%, #d97b35 100%);
  border-bottom: 4px solid var(--accent2);
  position: relative; overflow: hidden;
}
.desert-hero .sun {
  position: absolute; top: 16px; inset-inline-start: 12%;
  width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle, #fff3cf 0%, #ffdf7e 55%, rgba(255,220,120,0) 72%);
}
.desert-hero .dunes { display: block; width: 118%; margin: 12px -9% 0; height: 44px; }
.desert-hero .logo-big {
  width: 116px; height: 116px; object-fit: cover;
  filter: drop-shadow(0 6px 14px rgba(90,50,0,.35));
  position: relative; z-index: 2;
  background: #fff; border-radius: 50%; padding: 0;
  border: 3px solid #7a4f2a;
}
.desert-hero h1 { font-size: 22px; font-weight: 900; color: #4a2c10; margin: 9px 0 3px; position: relative; z-index: 2; }
.desert-hero h1 b { color: #a33f0f; }
.desert-hero p { color: #6b3f1a; font-weight: 500; font-size: 13px; max-width: 460px; margin: 0 auto; position: relative; z-index: 2; }
.socials { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.socials a {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 9px 16px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow);
}

/* ─── متفرقات ─── */
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.checkin-code {
  font-size: 44px; font-weight: 900; letter-spacing: 12px;
  color: var(--accent); text-align: center; padding: 10px;
  background: var(--bg2); border-radius: 14px; border: 1px dashed var(--accent);
  direction: ltr;
}
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.avatar-lg { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.steps { display: flex; gap: 6px; margin: 14px 0; }
.steps div { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps div.done { background: var(--accent); }
details { margin-top: 8px; }
summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 700; }
.back-bar { margin-bottom: 12px; }
.back-bar a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-weight: 700; font-size: 14px;
  background: var(--card); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 20px; box-shadow: var(--shadow);
}
.knet-frame { background: #f4f6f8; color: #111; border-radius: 14px; padding: 18px; border: 1px solid #dde; }
.knet-frame label { color: #445; }
.knet-frame input, .knet-frame select { background: #fff; color: #111; border-color: #ccd; }
.knet-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #0055a5; padding-bottom: 10px; margin-bottom: 12px; }
.knet-head b { color: #0055a5; font-size: 18px; }
@media (min-width: 700px) { .products { grid-template-columns: repeat(3, 1fr); } }

/* ─── الشريط الإخباري المتحرك ─── */
.ticker {
  background: var(--card); border: 1px solid var(--accent); border-radius: 999px;
  padding: 9px 0; overflow: hidden; white-space: nowrap;
}
.ticker span {
  display: inline-block; padding-right: 100%; font-size: 13px; font-weight: 700;
  color: var(--accent2); animation: tick 16s linear infinite;
}
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .ticker span { animation: none; padding-right: 12px; } }

/* ─── بلاطات التصنيفات بالرئيسية ─── */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  text-align: center; padding: 15px 6px 12px; position: relative; box-shadow: var(--shadow);
}
.tile .em { font-size: 30px; display: block; line-height: 1.2; }
.tile b { font-size: 14px; display: block; margin-top: 4px; }
.tile small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.tile .cnt {
  display: inline-block; margin-top: 7px; background: var(--green-soft); color: var(--green);
  font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 10px;
}
.tile .vbdg {
  position: absolute; top: -9px; inset-inline-start: 8px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 800; border-radius: 999px; padding: 3px 8px;
}

/* ─── تبويبات الصفحات (دورات/فيديوهات — متجر/سوق) ─── */
.tabs {
  display: flex; background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: 13px; padding: 4px; gap: 4px; margin-bottom: 14px;
}
.tabs a {
  flex: 1; text-align: center; font-size: 13.5px; font-weight: 800; padding: 10px 4px;
  border-radius: 10px; color: var(--muted);
}
.tabs a.on { background: var(--card); color: var(--accent2); box-shadow: 0 1px 5px rgba(80,60,30,.16); }

/* ─── خانات الواجهة المنسدلة ─── */
.acc { padding: 0; }
.acc .acc-sum {
  padding: 14px 16px; font-size: 15px; font-weight: 800; color: var(--txt);
  list-style: none; display: flex; align-items: center; gap: 6px;
}
.acc .acc-sum::after { content: '▾'; margin-inline-start: auto; color: var(--accent); }
.acc[open] .acc-sum::after { content: '▴'; }
.acc > *:not(summary) { padding: 0 16px 14px; }

/* ─── الطباعة (ملفات الأرشيف) ─── */
.print-only { display: none; }
@media print {
  html, html[data-theme="dark"] {
    --bg: #fff; --bg2: #f5f5f5; --card: #fff; --line: #bbb;
    --txt: #000; --muted: #444; --topbar: #fff; --shadow: none;
  }
  body { background: #fff !important; padding: 0; }
  .topbar, .bottomnav, .back-bar, .flashes, .no-print, button { display: none !important; }
  .print-only { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
  a { text-decoration: none; color: inherit; }
}

/* ─── شبكة خدمات البر ─── */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.svc-tile { display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px; text-align: center; }
.svc-tile .ic { font-size: 34px; line-height: 1; }
.svc-tile b { font-size: 14px; }
.svc-tile span { font-size: 11.5px; color: var(--muted); }

/* ─── تأثير ضغط خفيف لبطاقات وأزرار قابلة للنقر ─── */
.btn, .tile, .svc-tile, .nearest-card { transition: transform .1s ease; }
.btn:active, .tile:active, .svc-tile:active, .nearest-card:active { transform: scale(.97); }

/* ─── حركات دخول خفيفة (مرة واحدة عند فتح الصفحة) ─── */
@media (prefers-reduced-motion: no-preference) {
  main.container { opacity: 0; animation: pageFadeIn .28s ease-out forwards; }
  .tiles .tile, .nearest-grid .nearest-card, .svc-grid .svc-tile {
    opacity: 0; animation: itemFadeIn .32s ease-out forwards;
  }
  .tiles .tile:nth-child(1), .svc-grid .svc-tile:nth-child(1) { animation-delay: .04s; }
  .tiles .tile:nth-child(2), .svc-grid .svc-tile:nth-child(2) { animation-delay: .08s; }
  .tiles .tile:nth-child(3), .svc-grid .svc-tile:nth-child(3) { animation-delay: .12s; }
  .svc-grid .svc-tile:nth-child(4) { animation-delay: .16s; }
  .svc-grid .svc-tile:nth-child(5) { animation-delay: .20s; }
  .svc-grid .svc-tile:nth-child(6) { animation-delay: .24s; }
  .svc-grid .svc-tile:nth-child(7) { animation-delay: .28s; }
  .svc-grid .svc-tile:nth-child(8) { animation-delay: .32s; }
  .nearest-grid .nearest-card:nth-child(1) { animation-delay: .04s; }
  .nearest-grid .nearest-card:nth-child(2) { animation-delay: .08s; }
  .nearest-grid .nearest-card:nth-child(3) { animation-delay: .12s; }
  .nearest-grid .nearest-card:nth-child(4) { animation-delay: .16s; }

  /* حركات سياقية لمرة واحدة لكل خدمة/بطاقة */
  .compass-kaaba { animation: spinIn .6s ease-out; }
  .shimmer-once { animation: shimmerOnce .8s ease-out; }
  .wave-once { animation: waveOnce .8s ease-out; }
  .pulse-once { animation: pulseOnce .6s ease-out; }
  .em-trip { animation: carWiggle .6s ease-out .25s both; }
  .em-kashta { animation: flameFlicker .7s ease-out .25s both; }
  .em-course { animation: capBounce .6s ease-out .25s both; }
  .bell-alert { animation: bellShake .5s ease-in-out; }
}
@keyframes pageFadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }
@keyframes itemFadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }
@keyframes spinIn { from{transform:rotate(-70deg) scale(.5);opacity:0} to{transform:rotate(0) scale(1);opacity:1} }
@keyframes shimmerOnce { 0%{filter:brightness(1.6)} 100%{filter:brightness(1)} }
@keyframes waveOnce { 0%{transform:translateY(-4px) rotate(-4deg)} 50%{transform:translateY(2px) rotate(3deg)} 100%{transform:none} }
@keyframes pulseOnce { 0%{transform:scale(1)} 30%{transform:scale(1.15)} 100%{transform:scale(1)} }
@keyframes carWiggle { 0%{transform:translateX(-3px)} 50%{transform:translateX(3px)} 100%{transform:translateX(0)} }
@keyframes flameFlicker { 0%,100%{opacity:1} 25%{opacity:.75} 50%{opacity:1} 75%{opacity:.85} }
@keyframes capBounce { 0%{transform:translateY(-4px) scale(.9)} 60%{transform:translateY(1px) scale(1.05)} 100%{transform:translateY(0) scale(1)} }
@keyframes bellShake { 0%,100%{transform:rotate(0)} 20%{transform:rotate(14deg)} 40%{transform:rotate(-12deg)} 60%{transform:rotate(8deg)} 80%{transform:rotate(-6deg)} }

/* ─── القائمة العلوية الموحدة (☰) ─── */
.menu-wrap { position: relative; }
.menu-panel {
  position: absolute; top: 42px; left: 0; right: auto; z-index: 60;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(30,30,30,.22); min-width: 230px; padding: 6px; display: none;
}
[dir=ltr] .menu-panel { left: auto; right: 0; }
.menu-panel.open { display: block; }
.menu-panel a, .menu-panel button {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: start;
  padding: 12px; border: 0; background: none; color: var(--txt);
  font-family: inherit; font-size: 14px; font-weight: 700; border-radius: 8px; cursor: pointer;
}
.menu-panel a:active, .menu-panel button:active { background: var(--bg2); }

/* ─── النوافذ المنبثقة ─── */
.modal {
  display: none; position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.55);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; max-width: 460px; width: 100%; max-height: 82vh; overflow-y: auto;
}
