/* دروب فلسطين — قماش نيلي، خيوط ملوّنة، ورُقع من كتّان */

:root {
  --indigo-950: #0F1436;
  --indigo-900: #151B47;
  --indigo-800: #1C2459;
  --indigo-700: #25307A;
  --indigo-600: #33429C;
  --cream: #F8EFDB;
  --cream-2: #EFE2C6;
  --cream-3: #DCC9A2;
  --paper: #FFFCF4;
  --ink: #181C42;
  --ink-2: #555A7E;
  --gold: #F6C24B;
  --gold-d: #C48A16;
  --red: #E23B4E;
  --red-d: #A51F37;
  --teal: #2FC1B5;
  --teal-d: #17877F;
  --fuchsia: #EA4C93;
  --green: #3DA557;
  --green-d: #27753B;
  --orange: #F28C2B;

  --f-display: 'Lalezar', 'Almarai', system-ui, sans-serif;
  --f-body: 'Almarai', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --f-hand: 'Aref Ruqaa', 'Almarai', serif;

  --weave:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0 1px, transparent 1px 3px);
  --linen:
    repeating-linear-gradient(0deg, rgba(120, 90, 30, 0.05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120, 90, 30, 0.04) 0 1px, transparent 1px 4px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--cream);
  background-color: var(--indigo-700);
  background-image: var(--weave), radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 60%), linear-gradient(180deg, var(--indigo-700), var(--indigo-800));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 8px; }
main:focus-visible, .sheet:focus-visible { outline: none; }
.sheet :focus-visible, .qcard :focus-visible, .book :focus-visible, .fb :focus-visible, .res-review :focus-visible { outline-color: var(--indigo-600); }

/* حاشية القماش المجدلاوي: خطوط فيروزية وفوشيا على الطرف */
body::before {
  content: '';
  position: fixed; z-index: 0; inset: 0 0 auto 0; height: 12px;
  background: linear-gradient(180deg, var(--fuchsia) 0 4px, var(--indigo-900) 4px 6px, var(--teal) 6px 10px, var(--gold) 10px 12px);
  pointer-events: none;
}
#app { position: relative; z-index: 1; }

/* ---------- أزرار ---------- */
.btn {
  --edge: var(--gold-d);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-display); font-size: 20px; line-height: 1.25;
  padding: 11px 22px 8px; border: 0; border-radius: 14px;
  background: var(--gold); color: var(--ink);
  box-shadow: 0 5px 0 var(--edge);
  transition: transform 0.07s ease, box-shadow 0.07s ease, filter 0.15s ease;
  user-select: none;
}
.btn:hover:not(:disabled) { filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge); }
.btn:disabled { opacity: 0.45; }
.btn .ico { width: 22px; height: 22px; flex: none; margin-top: -3px; }
.btn-big { font-size: 25px; padding: 14px 28px 10px; border-radius: 16px; box-shadow: 0 6px 0 var(--edge); }
.btn-teal { background: var(--teal); --edge: var(--teal-d); color: #062E2B; }
.btn-cream { background: var(--cream); --edge: var(--cream-3); }
.btn-danger { background: var(--red); --edge: var(--red-d); color: #fff; }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 2px color-mix(in srgb, currentColor 35%, transparent); color: inherit; padding-top: 10px; }
.btn-ghost:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 0 0 2px color-mix(in srgb, currentColor 35%, transparent); }
.iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.11); color: var(--cream);
  transition: background 0.15s ease, transform 0.07s ease;
}
.iconbtn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); }
.iconbtn:active:not(:disabled) { transform: scale(0.94); }
.iconbtn .ico { width: 24px; height: 24px; }
.linkbtn { background: none; border: 0; padding: 8px 4px; color: var(--cream); opacity: 0.8; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.linkbtn:hover { opacity: 1; }
.ico { width: 1.2em; height: 1.2em; }

/* ---------- وحدات التطريز ---------- */
.motif { display: block; width: 100%; height: 100%; color: rgba(255, 255, 255, 0.13); }
.motif .ghost { stroke-width: 2; }
.motif .st.off { opacity: 1; }
.motif .st.on { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0.2); transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.3, 1.6, 0.5, 1); }
.motif .st.on.in { opacity: 1; transform: none; }

/* النجوم الثلاث: معيّنات مطرّزة */
.pips, .res-pips, .st-pips { display: inline-flex; gap: 5px; align-items: center; }
.pips i, .res-pips i, .st-pips i { display: block; width: 9px; height: 9px; transform: rotate(45deg); background: rgba(255, 255, 255, 0.22); border-radius: 1.5px; }
.pips i.on, .res-pips i.on, .st-pips i.on { background: var(--gold); }

/* ---------- الخريطة ---------- */
.map { position: relative; aspect-ratio: var(--cols) / var(--rows); height: 100%; max-width: 100%; margin-inline: auto; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.m-fill { stroke: #F1E6CB; }
.m-lattice { stroke: var(--red); }
.m-edge { stroke: var(--gold); }
.m-lake { stroke: var(--teal); }
.m-sea { stroke: var(--teal); opacity: 0.7; }
.map.is-drawing .map-svg { animation: stitch-down 1.5s cubic-bezier(0.5, 0, 0.3, 1) both; }
@keyframes stitch-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -2% 0); } }

.route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.route line { stroke: var(--indigo-900); stroke-width: 3.4; stroke-dasharray: 7 7; stroke-linecap: round; }
.route line.is-walked { stroke: var(--fuchsia); }
.map.is-drawing .route { animation: fade-in 0.5s 1.3s both; }

.sea-name {
  position: absolute; left: -14%; top: 27%; transform: rotate(-76deg); transform-origin: center;
  font-family: var(--f-hand); font-weight: 700; font-size: clamp(17px, 2.7vh, 23px); color: var(--teal); opacity: 0.9; white-space: nowrap; pointer-events: none; letter-spacing: 0;
}

.pin {
  position: absolute; z-index: 2; width: var(--pin, 40px); height: var(--pin, 40px); translate: -50% -50%;
  padding: 0; border: 0; border-radius: 50%; background: none; color: var(--cream);
}
.pin-disc {
  position: absolute; inset: 0; padding: 7px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--indigo-900);
  box-shadow: 0 0 0 2.5px var(--cream), 0 4px 0 2.5px rgba(8, 10, 34, 0.55);
  transition: transform 0.15s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.pin:hover .pin-disc, .pin:focus-visible .pin-disc { transform: scale(1.12); }
.pin:active .pin-disc { transform: scale(0.95); }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin-disc { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--indigo-600); }
.pin.is-done .pin-disc { box-shadow: 0 0 0 2.5px var(--gold), 0 4px 0 2.5px rgba(8, 10, 34, 0.55); }
.pin.is-locked .pin-disc { background: var(--indigo-800); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.36); }
.pin.is-next .pin-disc::after {
  content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 2.5px dashed var(--gold);
  animation: spin 9s linear infinite;
}
.pin.just-open .pin-disc { animation: pop 0.7s cubic-bezier(0.3, 1.7, 0.5, 1); }
.pin-tag {
  position: absolute; top: 50%; translate: 0 -50%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  font-family: var(--f-display); font-size: var(--pin-font, 16px); line-height: 1.15; white-space: nowrap;
  padding: 4px 9px 1px; border-radius: 7px; background: var(--indigo-950);
  pointer-events: none;
}
.pin-tag b { font-weight: 400; }
.pin-tag .pips { padding-bottom: 4px; }
.pin-tag .pips i { width: 7px; height: 7px; }
.pin.side-l .pin-tag { right: calc(100% + 7px); align-items: flex-end; }
.pin.side-r .pin-tag { left: calc(100% + 7px); }
.pin.is-locked .pin-tag { color: rgba(248, 239, 219, 0.78); }
.map.is-drawing .pin { animation: pin-in 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) both; animation-delay: calc(0.75s + var(--n) * 70ms); }
@keyframes pin-in { from { opacity: 0; scale: 0.3; } to { opacity: 1; scale: 1; } }

/* نقاط سؤال الخريطة */
.dot { position: absolute; z-index: 2; width: 46px; height: 46px; translate: -50% -50%; padding: 0; border: 0; border-radius: 50%; background: none; }
.dot i {
  position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px var(--indigo-900), 0 0 0 5px rgba(246, 194, 75, 0.45);
  transition: transform 0.15s cubic-bezier(0.3, 1.5, 0.5, 1);
  animation: breathe 1.8s ease-in-out infinite;
}
.dot:hover i, .dot:focus-visible i { transform: scale(1.25); }
.dot:focus-visible { outline: none; }
.dot:focus-visible i { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--indigo-600); }
.dot:disabled i { animation: none; }
.dot.is-right i { background: var(--green); box-shadow: 0 0 0 3px #fff; transform: scale(1.25); }
.dot.is-wrong i { background: var(--red); box-shadow: 0 0 0 3px #fff; }
.dot.is-dim i { opacity: 0.4; }
.dot.is-gone i { opacity: 0.18; transform: scale(0.6); }
.dot-name {
  position: absolute; top: 8px; display: none; white-space: nowrap;
  font-family: var(--f-display); font-size: 17px; line-height: 1; padding: 6px 9px 3px; border-radius: 7px;
  background: var(--paper); color: var(--ink);
}
.dot.name-r .dot-name { left: 42px; }
.dot.name-l .dot-name { right: 42px; }
.dot.show-name .dot-name { display: block; }
@keyframes breathe { 50% { box-shadow: 0 0 0 3px var(--indigo-900), 0 0 0 11px rgba(246, 194, 75, 0); } }

/* ---------- الرئيسية ---------- */
.home { min-height: 100dvh; padding: 30px 18px 150px; display: flex; flex-direction: column; gap: 18px; }
.home-side { display: contents; }
.brand { order: 1; text-align: center; padding-top: 6px; }
.brand-name {
  font-family: var(--f-display); font-weight: 400; font-size: clamp(58px, 17vw, 82px); line-height: 1.05; color: var(--cream);
  text-shadow: 0 4px 0 var(--indigo-950);
  padding-bottom: 20px;
  background: var(--band-diamonds) center bottom / 26px auto repeat-x;
}
.brand-name span { display: inline-block; }
.brand-tag { margin-top: 12px; font-size: 16px; color: rgba(248, 239, 219, 0.86); max-width: 30em; margin-inline: auto; }
.tally { order: 2; display: grid; gap: 6px; justify-items: center; text-align: center; }
.tally-rank { font-size: 15px; opacity: 0.95; }
.tally-rank b { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.5; color: var(--gold); margin-inline-start: 4px; vertical-align: -2px; }
.tally-steps { display: flex; gap: clamp(4px, 1.4vw, 8px); }
.tally-steps li { width: clamp(18px, 5vw, 22px); height: clamp(18px, 5vw, 22px); }
.tally-steps svg { display: block; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 2.4; stroke-linecap: round; }
.tally-steps li.on svg { stroke: var(--gold); }
.tally-line { font-size: 14.5px; opacity: 0.82; max-width: 32em; }
.home-map { order: 3; height: min(165vw, 700px); padding: 8px 0 6px; --pin: 40px; --pin-font: 16px; }
.home-acts {
  order: 4; position: fixed; z-index: 10; inset: auto 0 0 0;
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--indigo-900) 26%);
}
.home-acts .go { width: 100%; }
.home-acts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.home-acts-row .btn { font-size: 18px; padding-inline: 10px; }
.home-foot { order: 5; display: flex; align-items: center; justify-content: center; gap: 16px; }

@media (min-width: 900px) {
  .home {
    height: 100dvh; min-height: 620px; padding: 34px clamp(28px, 5vw, 80px) 26px; gap: clamp(24px, 5vw, 80px);
    flex-direction: row-reverse; align-items: stretch; justify-content: center; max-width: 1280px; margin-inline: auto;
  }
  .home-map { order: 0; height: auto; flex: none; width: clamp(330px, 36vw, 440px); padding: 0; display: grid; place-items: center; --pin: 42px; --pin-font: 17px; }
  .home-map .map { height: min(100%, 880px); }
  .home-side { display: flex; flex-direction: column; justify-content: center; gap: 26px; flex: 0 1 500px; min-width: 0; }
  .brand { text-align: start; padding: 0; }
  .tally { justify-items: start; text-align: start; }
  .tally-line { font-size: 16px; }
  .brand-name { font-size: clamp(84px, 9.4vw, 132px); line-height: 0.98; padding-bottom: 30px; background-position: right bottom; background-size: 30px auto; text-shadow: 0 6px 0 var(--indigo-950); }
  .brand-name span { display: block; }
  .brand-tag { font-size: 19px; margin-inline: 0; margin-top: 18px; max-width: 24em; }
  .home-acts { position: static; padding: 0; background: none; gap: 16px; }
  .home-acts .go { font-size: 30px; padding: 17px 30px 12px; }
  .home-acts-row .btn { font-size: 21px; padding-block: 13px 9px; }
  .home-foot { justify-content: flex-start; }
}
@media (min-width: 900px) and (max-height: 760px) {
  .brand-name { font-size: clamp(64px, 8vw, 96px); }
  .home-side { gap: 18px; }
}

/* ---------- النوافذ ---------- */
.scrim {
  position: fixed; z-index: 50; inset: 0; display: grid; align-items: end; justify-items: center;
  background: rgba(10, 13, 40, 0.66); animation: fade-in 0.18s ease both;
}
.scrim.is-out { animation: fade-out 0.18s ease both; }
.sheet {
  position: relative; width: min(100%, 520px); max-height: 92dvh; overflow: auto;
  background-color: var(--cream); background-image: var(--linen); color: var(--ink);
  border-radius: 24px 24px 0 0; padding: 22px 22px calc(26px + env(safe-area-inset-bottom));
  animation: sheet-up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.scrim.is-out .sheet { animation: sheet-down 0.18s ease both; }
.sheet-x { position: absolute; z-index: 2; top: 12px; left: 12px; background: rgba(24, 28, 66, 0.08); color: var(--ink); }
.sheet-x:hover:not(:disabled) { background: rgba(24, 28, 66, 0.16); }
.sheet h2 { font-family: var(--f-display); font-weight: 400; font-size: 32px; line-height: 1.2; }
@media (min-width: 620px) {
  .scrim { align-items: center; padding: 24px; }
  .sheet { border-radius: 24px; padding: 28px 30px 30px; box-shadow: 0 8px 0 var(--cream-3), 0 30px 60px rgba(0, 0, 0, 0.4); }
}

.st { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.st-patch {
  width: 132px; height: 132px; padding: 16px; margin-top: 4px; margin-bottom: 10px; border-radius: 22px;
  background-color: var(--indigo-800); background-image: var(--weave);
  box-shadow: 0 0 0 4px var(--cream), 0 0 0 6px var(--indigo-800), 0 6px 0 6px rgba(24, 28, 66, 0.18);
  rotate: -3deg;
}
.st-num { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.st-name { font-size: 46px !important; line-height: 1.1 !important; }
.st-title { font-family: var(--f-hand); font-weight: 700; font-size: 25px; line-height: 1.3; color: var(--red-d); }
.st-title span { display: block; font-family: var(--f-body); font-weight: 700; font-size: 15px; color: var(--ink-2); margin-top: 2px; }
.st-intro { margin-top: 10px; max-width: 26em; font-size: 17px; }
.st-facts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; margin: 12px 0 16px; font-size: 15px; color: var(--ink-2); font-weight: 700; }
.st-facts b { color: var(--ink); font-family: var(--f-display); font-weight: 400; font-size: 19px; }
.st-pips i { background: rgba(24, 28, 66, 0.16); width: 11px; height: 11px; }
.st-pips i.on { background: var(--gold-d); }
.st .btn-big { width: 100%; }
.st.is-locked .st-patch { filter: saturate(0.2); }
.st-clock { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #062E2B; margin: 4px 0 8px; box-shadow: 0 6px 0 var(--teal-d); }
.st-clock .ico { width: 56px; height: 56px; }

.ask { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.ask h2 { padding-inline-end: 44px; }
.ask-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.ask-row .btn { flex: 1 1 140px; }

.how h2 { padding-inline-end: 44px; margin-bottom: 14px; }
.how-list { counter-reset: how; display: grid; gap: 12px; }
.how-list li { counter-increment: how; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; font-size: 16px; }
.how-list p { padding-top: 3px; }
.how-list li::before {
  content: counter(how); font-family: var(--f-display); font-size: 20px; line-height: 34px; text-align: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--indigo-700); color: var(--cream);
}
.how-note { margin: 14px 0 18px; font-size: 15px; color: var(--ink-2); }
.how .btn-big { width: 100%; }

.sets { display: grid; gap: 6px; }
.sets h2 { margin-bottom: 8px; }
.sw { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(24, 28, 66, 0.12); cursor: pointer; }
.sw span { display: grid; }
.sw b { font-size: 18px; }
.sw small { font-size: 14px; color: var(--ink-2); }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw i { flex: none; position: relative; width: 56px; height: 32px; border-radius: 99px; background: rgba(24, 28, 66, 0.22); transition: background 0.18s ease; }
.sw i::after { content: ''; position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.18s cubic-bezier(0.3, 1.4, 0.5, 1); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); }
.sw input:checked + i { background: var(--green); }
.sw input:checked + i::after { transform: translateX(-24px); }
.sw input:focus-visible + i { outline: 3px solid var(--indigo-600); outline-offset: 3px; }
.sets .wipe { margin-top: 18px; color: var(--red-d); }

/* ---------- اللعب ---------- */
.play { min-height: 100dvh; max-width: 780px; margin-inline: auto; padding: 26px 16px 0; display: flex; flex-direction: column; }
.ptop { display: flex; align-items: center; gap: 12px; }
.pmid { flex: 1; min-width: 0; display: flex; justify-content: center; }
.steps { display: flex; gap: clamp(3px, 1.6vw, 9px); align-items: center; }
.step-x { width: clamp(17px, 5.4vw, 24px); height: clamp(17px, 5.4vw, 24px); }
.step-x svg { display: block; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, 0.24); stroke-width: 2.4; stroke-linecap: round; transition: stroke 0.2s ease, transform 0.25s cubic-bezier(0.3, 1.7, 0.5, 1); }
.step-x.is-now svg { stroke: var(--gold); transform: scale(1.3); }
.step-x.is-ok svg { stroke: #6AD182; }
.step-x.is-bad svg { stroke: #FF6B7C; }
.pscore { position: relative; flex: none; min-width: 74px; text-align: center; line-height: 1; }
.pscore b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 30px; color: var(--gold); font-variant-numeric: tabular-nums; }
.pscore small { font-size: 12px; opacity: 0.75; }
.pscore.bump b { animation: bump 0.4s cubic-bezier(0.3, 1.7, 0.5, 1); }
.burst { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; z-index: 30; }
.burst i {
  position: absolute; width: 10px; height: 10px; left: -5px; top: -5px;
  background: linear-gradient(45deg, transparent 42%, var(--c) 42% 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, var(--c) 42% 58%, transparent 58%);
  animation: fly 0.75s cubic-bezier(0.1, 0.7, 0.3, 1) var(--d) both;
}
@keyframes fly { from { opacity: 1; transform: translate(0, 0) scale(0.4) rotate(0); } to { opacity: 0; transform: translate(var(--x), var(--y)) scale(1.5) rotate(90deg); } }

.tbar { height: 9px; margin: 14px 0 16px; border-radius: 99px; background: rgba(8, 10, 34, 0.45); overflow: hidden; }
.tbar i { display: block; height: 100%; border-radius: 99px; background: var(--gold); transform-origin: right center; will-change: transform; }
.tbar.is-low i { background: #FF6B7C; }
.tbar.is-off { visibility: hidden; margin: 6px 0; }

.stage { flex: 1; padding-bottom: 20px; }
.qcard {
  position: relative; padding: 34px 20px 22px; border-radius: 22px;
  background-color: var(--cream); background-image: var(--linen); color: var(--ink);
  box-shadow: 0 7px 0 var(--cream-3), 0 22px 40px rgba(6, 8, 30, 0.35);
}
.qcard::before {
  content: ''; position: absolute; inset: 9px 16px auto 16px; height: 9px;
  background: var(--band-zigzag) right center / 24px 9px repeat-x; opacity: 0.9;
}
.qcard.enter { animation: card-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
.qcard.shake, .lslots.shake { animation: shake 0.42s ease; }
.qmeta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; margin-bottom: 8px; }
.qtype { font-family: var(--f-display); font-size: 18px; line-height: 1; color: var(--red-d); display: inline-flex; align-items: center; gap: 8px; padding-top: 3px; }
.qtype::before { content: ''; width: 9px; height: 9px; background: var(--red); transform: rotate(45deg); border-radius: 1.5px; margin-top: -4px; }
.qstreak { font-family: var(--f-display); font-size: 15px; line-height: 1; padding: 6px 10px 3px; border-radius: 8px; background: rgba(24, 28, 66, 0.1); color: var(--ink); }
.qstreak.is-hot { background: var(--indigo-700); color: var(--gold); animation: pop 0.4s cubic-bezier(0.3, 1.7, 0.5, 1); }
.qstreak b { font-weight: 400; color: #fff; margin-inline-start: 2px; }
.photo { width: fit-content; max-width: 100%; margin: 6px auto 16px; padding: 7px 7px 7px; background: #fff; border-radius: 4px; box-shadow: 0 2px 0 rgba(24, 28, 66, 0.12), 0 10px 22px rgba(24, 28, 66, 0.22); rotate: -1.4deg; }
.photo img { max-height: min(27dvh, 300px); width: auto; border-radius: 2px; background: var(--cream-2); }
.qtext { font-family: var(--f-body); font-weight: 800; font-size: clamp(19px, 5vw, 24px); line-height: 1.55; text-wrap: balance; }
.qtext.is-long { font-size: clamp(17px, 4.4vw, 21px); }
.qnote { margin-top: 6px; font-size: 15px; color: var(--ink-2); font-weight: 700; }
.qbody { margin-top: 18px; }

.opts { display: grid; gap: 11px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 12px; text-align: start;
  min-height: 58px; padding: 10px 16px 8px; border-radius: 14px;
  background: var(--paper); color: var(--ink); border: 2px solid rgba(24, 28, 66, 0.16); border-bottom-width: 5px;
  font-weight: 700; font-size: 17.5px; line-height: 1.45;
  transition: transform 0.07s ease, border-color 0.12s ease, background 0.12s ease, opacity 0.2s ease;
}
.opt:hover:not(:disabled) { border-color: var(--indigo-600); background: #fff; }
.opt:active:not(:disabled) { transform: translateY(3px); border-bottom-width: 2px; margin-bottom: 3px; }
.opt-key { display: none; flex: none; width: 26px; height: 26px; border-radius: 7px; background: rgba(24, 28, 66, 0.08); font-family: var(--f-display); font-size: 16px; line-height: 28px; text-align: center; color: var(--ink-2); }
.opt-t { flex: 1; }
.opt.is-right { background: var(--green); border-color: var(--green-d); color: #fff; animation: pop 0.36s cubic-bezier(0.3, 1.6, 0.5, 1); }
.opt.is-wrong { background: var(--red); border-color: var(--red-d); color: #fff; }
.opt.is-right .opt-key, .opt.is-wrong .opt-key { background: rgba(255, 255, 255, 0.22); color: #fff; }
.opt.is-dim { opacity: 0.45; }
.opt.is-gone { opacity: 0.28; text-decoration: line-through; border-style: dashed; }
.opts-tf, .opts-two { grid-template-columns: 1fr 1fr; }
.opts-two .opt { padding-inline: 12px; }
.opts-tf .opt { flex-direction: column; justify-content: center; text-align: center; gap: 2px; padding: 14px 10px 10px; font-family: var(--f-display); font-weight: 400; font-size: 26px; }
.opt-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; }
.opt-mark .ico { width: 30px; height: 30px; stroke-width: 3.2; }
.opt-true .opt-mark { background: rgba(61, 165, 87, 0.16); color: var(--green-d); }
.opt-false .opt-mark { background: rgba(226, 59, 78, 0.14); color: var(--red-d); }
.opt.is-right .opt-mark, .opt.is-wrong .opt-mark { background: rgba(255, 255, 255, 0.22); color: #fff; }
@media (min-width: 600px) {
  .qcard { padding: 38px 30px 28px; }
  .opts:not(.opts-wide) { grid-template-columns: 1fr 1fr; }
}
@media (hover: hover) and (min-width: 600px) { .opt-key { display: block; } }

/* من أنا */
.clues { display: grid; gap: 8px; margin-bottom: 12px; }
.clue { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: rgba(24, 28, 66, 0.07); font-weight: 700; font-size: 16.5px; }
.clue.is-new { animation: card-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; background: rgba(246, 194, 75, 0.3); }
.clue-n { width: 28px; height: 28px; border-radius: 50%; background: var(--indigo-700); color: var(--cream); font-family: var(--f-display); font-size: 17px; line-height: 30px; text-align: center; }
.who .more { font-size: 17px; padding: 8px 16px 5px; margin-bottom: 16px; color: var(--indigo-700); }

/* الترتيب */
.slots { display: grid; gap: 8px; }
.slot { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; min-height: 54px; }
.slot-n { width: 34px; height: 34px; border-radius: 50%; background: var(--indigo-700); color: var(--cream); font-family: var(--f-display); font-size: 19px; line-height: 37px; text-align: center; }
.slot-empty { height: 50px; border-radius: 12px; border: 2px dashed rgba(24, 28, 66, 0.25); }
.chip {
  display: block; width: 100%; text-align: start; padding: 10px 14px 8px; min-height: 50px; border-radius: 12px;
  background: var(--paper); color: var(--ink); border: 2px solid rgba(24, 28, 66, 0.16); border-bottom-width: 4px;
  font-weight: 700; font-size: 16.5px; line-height: 1.45;
  transition: transform 0.07s ease, border-color 0.12s ease;
}
button.chip:hover { border-color: var(--indigo-600); }
button.chip:active { transform: translateY(2px); }
.slot .chip { animation: pop 0.24s cubic-bezier(0.3, 1.5, 0.5, 1); }
.pool { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 2px dashed rgba(24, 28, 66, 0.18); }
.pool.is-empty { display: none; }
.slot.is-shown .chip { animation: none; border-bottom-width: 2px; }
.slot.is-right .slot-n { background: var(--green); }
.slot.is-right .chip { border-color: var(--green); background: #E8F6E6; }
.slot.is-miss .slot-n { background: var(--red); }
.slot-tag { font-family: var(--f-display); font-size: 16px; color: var(--ink-2); white-space: nowrap; }
@media (min-width: 600px) { .pool { grid-template-columns: 1fr 1fr; } }

/* التوصيل */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mcol { display: grid; gap: 9px; align-content: start; }
.mitem {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 60px; padding: 8px 10px 6px; border-radius: 12px;
  background: var(--paper); color: var(--ink); border: 2px solid rgba(24, 28, 66, 0.16); border-bottom-width: 4px;
  font-weight: 700; font-size: 15.5px; line-height: 1.4;
  transition: transform 0.07s ease, border-color 0.12s ease, background 0.12s ease;
}
button.mitem:hover { border-color: var(--indigo-600); }
.mitem.is-sel { border-color: var(--indigo-700); background: #fff; box-shadow: 0 0 0 3px var(--gold); transform: scale(1.03); }
.match.has-sel .mcol-b .mitem:not(.is-paired) { border-style: dashed; border-color: var(--indigo-600); }
.mitem.is-paired { color: var(--ink); }
.mitem.c-t { background: #C9F1EC; border-color: var(--teal-d); }
.mitem.c-f { background: #FBD3E5; border-color: #C2317A; }
.mitem.c-y { background: #FCE9B5; border-color: var(--gold-d); }
.mitem.c-g { background: #CFEFD6; border-color: var(--green-d); }
.match.is-done .mitem { border-bottom-width: 2px; }
.mitem.is-right { background: #E8F6E6; border-color: var(--green); }
.mitem.is-miss { border-color: var(--red); border-style: dashed; }
.match.is-done .mcol-a .mitem { position: relative; }
.match.is-done .mcol-a .mitem::after { content: ''; position: absolute; inset-inline-end: -13px; top: 50%; width: 14px; height: 3px; margin-top: -1.5px; background: var(--ink-2); border-radius: 2px; z-index: 1; }

/* الخريطة داخل السؤال */
.mapq { display: grid; place-items: center; padding: 16px 0 8px; border-radius: 16px; background-color: var(--indigo-700); background-image: var(--weave); }
.mapq .map { height: min(50dvh, 470px); }

/* السنة */
.year { display: grid; gap: 4px; justify-items: center; }
.year-num { font-family: var(--f-display); font-size: clamp(62px, 18vw, 92px); line-height: 1; color: var(--indigo-700); font-variant-numeric: tabular-nums; }
.year.is-right .year-num { color: var(--green-d); }
.year.is-wrong .year-num { color: var(--red-d); }
.year-row { display: grid; grid-template-columns: 46px 1fr 46px; gap: 12px; align-items: center; width: 100%; margin-top: 8px; }
.year-row .iconbtn { background: var(--indigo-700); color: var(--cream); width: 46px; height: 46px; }
.year-row .iconbtn:hover:not(:disabled) { background: var(--indigo-600); }
.year input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; background: none; margin: 0; }
.year input[type='range']::-webkit-slider-runnable-track { height: 14px; border-radius: 99px; background: linear-gradient(90deg, var(--gold) 0 var(--p), rgba(24, 28, 66, 0.16) var(--p) 100%); }
.year input[type='range']::-moz-range-track { height: 14px; border-radius: 99px; background: rgba(24, 28, 66, 0.16); }
.year input[type='range']::-moz-range-progress { height: 14px; border-radius: 99px; background: var(--gold); }
.year input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -10px; border-radius: 50%; background: var(--indigo-700); border: 5px solid var(--paper); box-shadow: 0 3px 0 rgba(24, 28, 66, 0.3); }
.year input[type='range']::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--indigo-700); border: 5px solid var(--paper); box-shadow: 0 3px 0 rgba(24, 28, 66, 0.3); }
.year-scale { display: flex; justify-content: space-between; width: 100%; padding: 0 58px; font-family: var(--f-display); font-size: 16px; color: var(--ink-2); }
.year-res { margin-top: 8px; font-weight: 800; font-size: 17px; }

/* الحروف */
.letters { display: grid; gap: 18px; justify-items: center; }
.lslots { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; min-height: 58px; }
.lslot { width: clamp(40px, 12vw, 56px); height: clamp(48px, 14vw, 62px); border-radius: 11px; border: 2px dashed rgba(24, 28, 66, 0.3); background: rgba(24, 28, 66, 0.04); font-family: var(--f-display); font-size: clamp(26px, 8vw, 34px); line-height: 1; color: var(--ink); padding: 6px 0 0; }
.lslot.is-full { border-style: solid; border-color: var(--indigo-700); background: var(--indigo-700); color: var(--cream); animation: pop 0.22s cubic-bezier(0.3, 1.6, 0.5, 1); }
.ltiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; max-width: 420px; }
.ltile { width: clamp(46px, 13vw, 60px); height: clamp(52px, 15vw, 64px); border-radius: 12px; background: var(--paper); border: 2px solid rgba(24, 28, 66, 0.18); border-bottom-width: 5px; font-family: var(--f-display); font-size: clamp(27px, 8vw, 35px); line-height: 1; color: var(--ink); padding: 6px 0 0; transition: transform 0.07s ease, opacity 0.15s ease; }
.ltile:hover:not(:disabled) { border-color: var(--indigo-600); }
.ltile:active:not(:disabled) { transform: translateY(3px); }
.ltile.is-used { opacity: 0.18; }
.ltries { min-height: 1.5em; font-size: 15px; font-weight: 700; color: var(--red-d); }
.lword { font-family: var(--f-display); font-size: clamp(44px, 13vw, 64px); line-height: 1.2; padding: 4px 22px 0; border-radius: 14px; }
.lword.is-right { color: var(--green-d); background: rgba(61, 165, 87, 0.14); }
.lword.is-wrong { color: var(--red-d); background: rgba(226, 59, 78, 0.1); }

/* أسفل الشاشة */
.pbot { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--indigo-800) 34%); }
.lifes { display: flex; gap: 8px; }
.life { display: inline-flex; flex-direction: column; align-items: center; gap: 0; min-width: 62px; padding: 7px 8px 4px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.2); background: var(--indigo-900); color: var(--cream); font-family: var(--f-display); font-size: 14px; line-height: 1.3; transition: transform 0.07s ease, border-color 0.12s ease, opacity 0.2s ease; }
.life .ico { width: 22px; height: 22px; color: var(--gold); }
.life:hover:not(:disabled) { border-color: var(--gold); }
.life:active:not(:disabled) { transform: translateY(2px); }
.life:disabled { opacity: 0.38; }
.life.is-spent { opacity: 0.28; text-decoration: line-through; }
.confirm { margin-inline-start: auto; }

/* التعليق على الإجابة */
.fb { position: fixed; z-index: 20; inset: auto 0 0 0; color: var(--ink); animation: sheet-up 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
.fb-in { max-width: 780px; margin-inline: auto; padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; display: grid; gap: 6px; box-shadow: 0 -10px 40px rgba(6, 8, 30, 0.4); }
.fb.is-ok .fb-in { background: #DDF3DF; border-top: 6px solid var(--green); }
.fb.is-bad .fb-in { background: #FCE4DF; border-top: 6px solid var(--red); }
.fb-head { display: flex; align-items: center; gap: 10px; }
.fb-mark { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; }
.fb-mark .ico { width: 24px; height: 24px; stroke-width: 3.4; }
.fb.is-ok .fb-mark { background: var(--green); }
.fb.is-bad .fb-mark { background: var(--red); }
.fb-title { font-family: var(--f-display); font-weight: 400; font-size: 27px; line-height: 1.1; padding-top: 4px; }
.fb.is-ok .fb-title { color: var(--green-d); }
.fb.is-bad .fb-title { color: var(--red-d); }
.fb-pts { margin-inline-start: auto; font-family: var(--f-display); font-size: 27px; line-height: 1; color: var(--green-d); padding-top: 4px; animation: pop 0.4s 0.1s cubic-bezier(0.3, 1.7, 0.5, 1) both; }
.fb-ans { font-size: 16.5px; }
.fb-ans b { font-weight: 800; }
.fb-info { font-size: 16.5px; line-height: 1.7; }
.fb-src { font-size: 12.5px; color: var(--ink-2); }
.fb-next { margin-top: 8px; width: 100%; }
.play.has-fb .stage { padding-bottom: calc(var(--fb-h, 280px) + 20px); }
.play.has-fb .pbot { visibility: hidden; }
@media (min-width: 820px) {
  .fb { inset: auto 0 22px 0; padding-inline: 16px; }
  .fb-in { border-radius: 22px; padding: 20px 26px 22px; grid-template-columns: 1fr auto; column-gap: 24px; align-items: end; }
  .fb-in > * { grid-column: 1; }
  .fb-next { grid-column: 2; grid-row: 1 / span 5; align-self: center; width: auto; min-width: 150px; margin: 0; font-size: 25px; padding: 14px 28px 10px; }
}

/* تحدّي الدقيقة */
.sclock { position: relative; display: flex; align-items: baseline; gap: 6px; font-family: var(--f-display); line-height: 1; }
.sclock-n { font-size: 46px; color: var(--cream); font-variant-numeric: tabular-nums; min-width: 1.4em; text-align: center; }
.sclock small { font-size: 16px; opacity: 0.7; }
.sclock.is-low .sclock-n { color: #FF6B7C; animation: bump 1s ease infinite; }
.penalty { position: absolute; inset-inline-start: -34px; top: 4px; font-size: 26px; color: #FF6B7C; animation: float-up 0.9s ease both; }
.play.is-sprint .tbar i { background: var(--teal); }

/* ---------- النتيجة ---------- */
.result { min-height: 100dvh; max-width: 780px; margin-inline: auto; padding: 34px 16px 40px; display: grid; gap: 26px; align-content: start; }
.res-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.res-patch {
  width: min(52vw, 210px); aspect-ratio: 1; padding: 24px; border-radius: 30px;
  background-color: var(--indigo-900); background-image: var(--weave);
  box-shadow: 0 0 0 5px var(--gold), 0 0 0 9px var(--indigo-900), 0 0 0 11px rgba(246, 194, 75, 0.45), 0 16px 34px rgba(6, 8, 30, 0.5);
  rotate: -3deg; margin: 8px 0 14px;
}
.res-patch .motif { color: rgba(255, 255, 255, 0.1); }
.res-count { font-size: 17px; font-weight: 700; opacity: 0.9; }
.res-count b { font-family: var(--f-display); font-weight: 400; font-size: 24px; color: var(--gold); }
.res-pips { gap: 14px; margin: 8px 0 2px; }
.res-pips i { width: 26px; height: 26px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); }
.res-pips i.on { background: rgba(255, 255, 255, 0.16); }
.res-pips i.on.in { background: var(--gold); box-shadow: 0 0 0 3px var(--indigo-900), 0 0 0 5px var(--gold); animation: pip 0.5s cubic-bezier(0.3, 1.8, 0.5, 1); }
@keyframes pip { from { transform: rotate(45deg) scale(0.3); } to { transform: rotate(45deg) scale(1); } }
.res-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(42px, 12vw, 60px); line-height: 1.15; margin-top: 10px; text-shadow: 0 4px 0 var(--indigo-950); }
.res-line { max-width: 28em; opacity: 0.92; }
.res-big { font-family: var(--f-display); font-size: clamp(96px, 30vw, 150px); line-height: 1; color: var(--gold); text-shadow: 0 6px 0 var(--indigo-950); }
.res-score { margin-top: 6px; font-size: 17px; }
.res-score b { font-family: var(--f-display); font-weight: 400; font-size: 38px; line-height: 1; color: var(--gold); vertical-align: -5px; margin-inline-end: 2px; }
.res-new { font-family: var(--f-display); font-size: 17px; line-height: 1; padding: 8px 14px 5px; border-radius: 9px; background: var(--fuchsia); color: #fff; rotate: -2deg; }
.res-acts { display: grid; gap: 14px; width: min(100%, 380px); margin-top: 18px; }
.res-review { background-color: var(--cream); background-image: var(--linen); color: var(--ink); border-radius: 22px; padding: 22px 20px; box-shadow: 0 7px 0 var(--cream-3); }
.res-review h2 { font-family: var(--f-display); font-weight: 400; font-size: 25px; margin-bottom: 10px; }
.rv { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(24, 28, 66, 0.12); }
.rv:first-child { border-top: 0; }
.rv-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; margin-top: 3px; }
.rv-mark .ico { width: 18px; height: 18px; stroke-width: 3.4; }
.rv.is-ok .rv-mark { background: var(--green); }
.rv.is-bad .rv-mark { background: var(--red); }
.rv-q { font-size: 15.5px; color: var(--ink-2); line-height: 1.55; }
.rv-a { font-weight: 800; font-size: 16.5px; }

/* ---------- الدفتر ---------- */
.book { min-height: 100dvh; max-width: 820px; margin-inline: auto; padding: 30px 16px 50px; }
.book-top { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; margin-bottom: 18px; }
.book-top .iconbtn { grid-row: span 2; }
.book-top h1 { font-family: var(--f-display); font-weight: 400; font-size: 44px; line-height: 1.1; padding-top: 6px; }
.book-top p { opacity: 0.85; font-size: 15.5px; }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(15, 20, 54, 0.55); margin-bottom: 18px; }
.tabs button { flex: 1; border: 0; border-radius: 12px; padding: 10px 6px 6px; background: none; font-family: var(--f-display); font-size: 18px; line-height: 1.3; color: rgba(248, 239, 219, 0.8); transition: background 0.15s ease, color 0.15s ease; }
.tabs button[aria-selected='true'] { background: var(--cream); color: var(--ink); }
.book-body { display: grid; gap: 10px; }
.book-note { font-size: 15.5px; opacity: 0.9; max-width: 44em; }
.book-h { font-family: var(--f-display); font-weight: 400; font-size: 26px; margin-top: 18px; }
.bk { border-radius: 16px; background-color: var(--cream); background-image: var(--linen); color: var(--ink); overflow: hidden; }
.bk summary { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; list-style: none; }
.bk summary::-webkit-details-marker { display: none; }
.bk-motif { width: 46px; height: 46px; padding: 7px; border-radius: 12px; background: var(--indigo-800); }
.bk-name { font-family: var(--f-display); font-size: 23px; line-height: 1.2; padding-top: 4px; }
.bk-name small { display: block; font-family: var(--f-body); font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.bk-count { font-family: var(--f-display); font-size: 19px; color: var(--ink-2); padding: 5px 11px 2px; border-radius: 9px; background: rgba(24, 28, 66, 0.08); }
.bk[open] summary { border-bottom: 2px dashed rgba(24, 28, 66, 0.16); }
.bk-list { padding: 4px 16px; }
.bk-list li { padding: 12px 0; border-bottom: 1px solid rgba(24, 28, 66, 0.1); }
.bk-q { font-size: 15px; color: var(--ink-2); }
.bk-a { font-weight: 800; font-size: 17px; }
.bk-i { font-size: 15.5px; margin-top: 2px; }
.bk-left { padding: 12px 16px 14px; font-size: 14.5px; color: var(--ink-2); font-weight: 700; }
.bk-left.is-full { color: var(--green-d); }
.thobe { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; padding: 18px 14px; border-radius: 20px; background-color: var(--indigo-900); background-image: var(--weave); box-shadow: inset 0 0 0 3px var(--indigo-900), inset 0 0 0 5px rgba(246, 194, 75, 0.5); }
.th { display: grid; justify-items: center; gap: 8px; padding: 10px 4px; }
.th .motif { width: 74px; height: 74px; }
.th figcaption { font-family: var(--f-display); font-size: 17px; line-height: 1.2; text-align: center; }
.th figcaption small { display: block; font-family: var(--f-body); font-size: 12.5px; opacity: 0.7; }
.th.is-empty figcaption { opacity: 0.6; }
.src-list, .cred-list { display: grid; gap: 8px; }
.src-list li, .cred-list li { display: grid; gap: 0; padding: 10px 14px; border-radius: 12px; background: rgba(15, 20, 54, 0.45); }
.src-list a { font-weight: 800; font-size: 17px; text-underline-offset: 4px; }
.src-list span { font-size: 14px; opacity: 0.8; }
.cred-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cred-list li { padding: 8px 12px; text-align: left; }
.cred-list a { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cred-list span { font-size: 12.5px; opacity: 0.75; }

/* ---------- حركات ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-down { to { transform: translateY(30px); opacity: 0; } }
@keyframes card-in { from { transform: translateY(14px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { 0% { transform: scale(0.9); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.22); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float-up { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-26px); } }

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

/* ---------- شاشات واسعة ---------- */
@media (min-width: 900px) {
  .play { max-width: 940px; padding-top: 30px; }
  .stage { flex: none; }
  .pbot { position: static; background: none; padding-top: 6px; }
  .qcard { padding: 42px 36px 32px; }
  .qtext { font-size: 26px; }
  .qtext.is-long { font-size: 22px; }
  .qcard.has-img { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: 34px; align-items: center; }
  .qcard.has-img .qmeta { grid-column: 1 / -1; }
  .qcard.has-img .photo { margin: 0 auto; }
  .qcard.has-img .photo img { max-height: min(46dvh, 420px); }
  .qcard.has-img .opts { grid-template-columns: 1fr; }
  .opt { min-height: 62px; font-size: 19px; }
  .mapq .map { height: min(46dvh, 440px); }
  .t-map .qmain { display: grid; grid-template-columns: 1fr auto; column-gap: 34px; align-items: center; }
  .t-map .qbody { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
  .t-map .mapq { padding: 18px 60px; }
  .fb-in { max-width: 940px; }

  .result { max-width: 1120px; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 44px; padding-top: 46px; align-items: start; }
  .result.is-sprint { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .res-top { position: sticky; top: 30px; }
  .res-review { padding: 28px 30px; }
}
/* حاشيتا الثوب على جانبي الشاشة */
@media (min-width: 1180px) {
  body::after {
    content: ''; position: fixed; z-index: 0; inset: 12px 0 0 0; pointer-events: none;
    background:
      var(--band-diamonds) left 18px top / 34px auto repeat-y,
      var(--band-diamonds) right 18px top / 34px auto repeat-y,
      linear-gradient(90deg, var(--indigo-900) 0 70px, transparent 70px calc(100% - 70px), var(--indigo-900) calc(100% - 70px));
    opacity: 0.9;
  }
}

/* هاتف بالعرض: شريط الأزرار لا يثبت في الأسفل */
@media (max-width: 899px) and (max-height: 520px) {
  .home { padding-bottom: 30px; }
  .home-acts { position: static; padding: 0; background: none; }
}

/* شاشات ضيقة جدًا: زر التثبيت في سطر مستقل */
@media (max-width: 400px) {
  .pbot { flex-wrap: wrap; }
  .confirm { order: -1; width: 100%; margin: 0; }
  .life { min-width: 56px; }
}

/* شاشات كبيرة */
@media (min-width: 1600px) and (min-height: 900px) {
  .home { max-width: 1560px; gap: 110px; }
  .home-map { width: 500px; --pin: 48px; --pin-font: 19px; }
  .home-map .map { height: min(100%, 980px); }
  .home-side { flex-basis: 620px; gap: 32px; }
  .brand-name { font-size: 168px; }
  .brand-tag { font-size: 22px; }
  .tally-line { font-size: 18px; }
  .home-acts .go { font-size: 34px; padding: 20px 30px 14px; }
  .home-acts-row .btn { font-size: 24px; }
  .play { max-width: 1100px; padding-top: 50px; }
  .fb-in { max-width: 1100px; }
  .qtext { font-size: 30px; }
  .opt { font-size: 21px; min-height: 68px; }
  .qcard { padding: 48px 44px 38px; }
}
