/* رتّب — صفحة اللعبة. الصفحة أدوات مكتب من عالم اللعبة: دفاتر البيوت، ورقة النتيجة، التذكرة.
   الألوان من Theme.swift، والخط خط النظام مثل التطبيق. بلا style ولا script داخلي (CSP الموقع). */
:root {
  --ink: #2F3E34;
  --ink-soft: #4F5B53;
  --paper: #FBFAF7;
  --bone: #F5F0E6;
  --bone2: #EDE6D6;
  --amber: #D9A441;
  --rust: #B4532F;
  --sage: #B4C8AF;
  --blue: #4F7290;
  --wood: #F3C079;
  --wood-tab: #EDB673;
  --accent: #8C5E16;

  --font: system-ui, -apple-system, "SF Arabic", "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  --s-display: clamp(2.7rem, 7.2vw, 6.6rem);
  --s-head: clamp(2rem, 4.2vw, 3.5rem);
  --s-sub: 1.375rem;
  --s-body: 1.125rem;
  --s-small: 0.9375rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --margin: clamp(1rem, 4vw, 3rem);
  --wrap: 76rem;

  --zz-tb: polygon(0% 10px, 2.5% 0px, 5% 10px, 7.5% 0px, 10% 10px, 12.5% 0px, 15% 10px, 17.5% 0px, 20% 10px, 22.5% 0px, 25% 10px, 27.5% 0px, 30% 10px, 32.5% 0px, 35% 10px, 37.5% 0px, 40% 10px, 42.5% 0px, 45% 10px, 47.5% 0px, 50% 10px, 52.5% 0px, 55% 10px, 57.5% 0px, 60% 10px, 62.5% 0px, 65% 10px, 67.5% 0px, 70% 10px, 72.5% 0px, 75% 10px, 77.5% 0px, 80% 10px, 82.5% 0px, 85% 10px, 87.5% 0px, 90% 10px, 92.5% 0px, 95% 10px, 97.5% 0px, 100% 10px, 100% calc(100% - 10px), 97.5% calc(100% - 0px), 95% calc(100% - 10px), 92.5% calc(100% - 0px), 90% calc(100% - 10px), 87.5% calc(100% - 0px), 85% calc(100% - 10px), 82.5% calc(100% - 0px), 80% calc(100% - 10px), 77.5% calc(100% - 0px), 75% calc(100% - 10px), 72.5% calc(100% - 0px), 70% calc(100% - 10px), 67.5% calc(100% - 0px), 65% calc(100% - 10px), 62.5% calc(100% - 0px), 60% calc(100% - 10px), 57.5% calc(100% - 0px), 55% calc(100% - 10px), 52.5% calc(100% - 0px), 50% calc(100% - 10px), 47.5% calc(100% - 0px), 45% calc(100% - 10px), 42.5% calc(100% - 0px), 40% calc(100% - 10px), 37.5% calc(100% - 0px), 35% calc(100% - 10px), 32.5% calc(100% - 0px), 30% calc(100% - 10px), 27.5% calc(100% - 0px), 25% calc(100% - 10px), 22.5% calc(100% - 0px), 20% calc(100% - 10px), 17.5% calc(100% - 0px), 15% calc(100% - 10px), 12.5% calc(100% - 0px), 10% calc(100% - 10px), 7.5% calc(100% - 0px), 5% calc(100% - 10px), 2.5% calc(100% - 0px), 0% calc(100% - 10px));
  --zz-b: polygon(0 0, 100% 0, 100% calc(100% - 10px), 97.5% calc(100% - 0px), 95% calc(100% - 10px), 92.5% calc(100% - 0px), 90% calc(100% - 10px), 87.5% calc(100% - 0px), 85% calc(100% - 10px), 82.5% calc(100% - 0px), 80% calc(100% - 10px), 77.5% calc(100% - 0px), 75% calc(100% - 10px), 72.5% calc(100% - 0px), 70% calc(100% - 10px), 67.5% calc(100% - 0px), 65% calc(100% - 10px), 62.5% calc(100% - 0px), 60% calc(100% - 10px), 57.5% calc(100% - 0px), 55% calc(100% - 10px), 52.5% calc(100% - 0px), 50% calc(100% - 10px), 47.5% calc(100% - 0px), 45% calc(100% - 10px), 42.5% calc(100% - 0px), 40% calc(100% - 10px), 37.5% calc(100% - 0px), 35% calc(100% - 10px), 32.5% calc(100% - 0px), 30% calc(100% - 10px), 27.5% calc(100% - 0px), 25% calc(100% - 10px), 22.5% calc(100% - 0px), 20% calc(100% - 10px), 17.5% calc(100% - 0px), 15% calc(100% - 10px), 12.5% calc(100% - 0px), 10% calc(100% - 10px), 7.5% calc(100% - 0px), 5% calc(100% - 10px), 2.5% calc(100% - 0px), 0% calc(100% - 10px));
  --tab: polygon(14px 0, calc(100% - 14px) 0, 100% 100%, 0 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--s-body);
  line-height: 1.75;
  overflow-x: hidden;
}
body:lang(en) { line-height: 1.55; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: rgba(217, 164, 65, 0.45); color: var(--ink); }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--margin); }
.skip { position: absolute; inset-inline-start: 1rem; top: -5rem; z-index: 9; background: var(--paper); color: var(--ink); padding: 0.5rem 1rem; }
.skip:focus { top: 1rem; }
.nb { white-space: nowrap; }

/* الأزرار: لون واحد، زوايا مربعة، ضغطة خفيفة */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0.7rem 1.6rem;
  font: inherit; font-size: var(--s-small); font-weight: 700; line-height: 1.2;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 0;
  text-decoration: none; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 160ms ease;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #24302A; } }
.btn.light { background: var(--amber); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .btn.light:hover { background: #E3B252; } }

/* الافتتاحية: أرضية الحبر وخمسة دفاتر */
.hero { background: var(--ink); color: var(--paper); }
.bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-block: 1rem;
}
.mark { grid-column: 2; display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 800; font-size: var(--s-sub); }
.mark img { width: 40px; height: 40px; border-radius: 9px; }
.bar .lang { grid-column: 3; justify-self: end; font-size: var(--s-small); font-weight: 600; text-decoration: none; padding: 0.4rem 0.9rem; background: rgba(251, 250, 247, 0.1); }
@media (hover: hover) and (pointer: fine) { .bar .lang:hover { background: rgba(251, 250, 247, 0.2); } }
.hero-copy { text-align: center; padding-block: clamp(3.5rem, 10vh, 6.5rem) clamp(2.5rem, 6vh, 4rem); }
.hero h1 { font-size: var(--s-display); font-weight: 900; line-height: 1.12; }
.hero h1:lang(en) { letter-spacing: -0.035em; line-height: 0.98; }
.hero .sub { max-width: 44ch; margin: 1.4rem auto 0; font-size: var(--s-sub); line-height: 1.6; color: var(--paper); }
.hero .sub:lang(en) { line-height: 1.45; }
.hero .soon { margin-top: 1.1rem; font-size: var(--s-small); color: #CFD6CC; }

.folders { width: min(86vw, 70rem); margin-inline: auto; display: block; }
.folders { margin-top: 40px; }
.folder { position: relative; display: block; height: 64px; text-decoration: none; color: var(--ink); }
.f1 { z-index: 1; } .f2 { z-index: 2; } .f3 { z-index: 3; } .f4 { z-index: 4; } .front { z-index: 5; }
.folder .tab {
  position: absolute; bottom: 100%; height: 40px; min-width: 200px;
  display: flex; align-items: center; justify-content: center; padding-inline: 1.6rem;
  font-size: var(--s-small); font-weight: 700; background: inherit; clip-path: var(--tab);
}
.f1 { background: var(--amber); }
.f1 .tab { inset-inline-start: 4%; }
.f2 { background: var(--rust); color: var(--paper); }
.f2 .tab { inset-inline-start: 27%; }
.f3 { background: var(--sage); }
.f3 .tab { inset-inline-start: 50%; }
.f4 { background: var(--blue); color: var(--paper); }
.f4 .tab { inset-inline-start: 73%; inset-inline-end: auto; }
.folder.f1, .folder.f2, .folder.f3, .folder.f4 { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .folders .folder:hover { transform: translateY(-8px); } }

/* الدفتر المفتوح: المكتب نفسه */
.front {
  position: relative; width: min(86vw, 70rem); margin-inline: auto;
  background: var(--wood) url("art/desk.webp") center / cover;
  color: var(--ink); padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem);
}
.front > .tab { position: absolute; bottom: 100%; inset-inline-start: 4%; height: 40px; min-width: 120px; display: flex; align-items: center; justify-content: center; padding-inline: 1.6rem; font-size: var(--s-small); font-weight: 700; background: var(--wood-tab); clip-path: var(--tab); }
.front-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; }
.front h2 { font-size: var(--s-head); font-weight: 900; line-height: 1.15; }
.front h2:lang(en) { letter-spacing: -0.03em; line-height: 1; }
.front > .tab img { width: 28px; height: 28px; border-radius: 7px; }
.taped {
  position: relative; background: var(--paper); padding: 0.9rem 1.2rem; max-width: 30rem;
  font-size: var(--s-small); line-height: 1.6;
}
.taped::before { content: ""; position: absolute; top: -9px; inset-inline-start: 50%; width: 64px; height: 18px; translate: -50% 0; background: rgba(180, 200, 175, 0.75); }
.taped:dir(rtl)::before { translate: 50% 0; }

.room { margin-top: clamp(1.5rem, 4vw, 2.5rem); max-width: 56rem; margin-inline: auto; }
.conts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.75rem, 3vw, 2.5rem); align-items: end; }
.cw { position: relative; }
.cont { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; transition: transform 160ms var(--ease-out); }
.cont img { width: 100%; height: auto; }
.cont:active { transform: scale(0.98); }
.slot { position: absolute; inset: 14% 12%; display: flex; align-items: center; justify-content: center; gap: 4%; pointer-events: none; }
.slot .item { width: 42%; position: static; transform: none; }
.slot .item img { width: 100%; }
.seal { position: absolute; top: -8%; inset-inline-end: 0; width: 30%; opacity: 0; transform: scale(1.5) rotate(-12deg); transition: opacity 260ms var(--ease-out), transform 380ms var(--ease-out); pointer-events: none; }
.cw.is-sealed .seal { opacity: 1; transform: scale(1) rotate(-12deg); }
.cw.is-slip .cont { animation: slip 380ms var(--ease-out); }
@keyframes slip { 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-3px); } }

.pile { position: relative; height: clamp(190px, 26vw, 260px); margin-top: clamp(1rem, 3vw, 2rem); }
.item {
  position: absolute; padding: 0; border: 0; background: none; cursor: pointer;
  width: clamp(58px, 9vw, 104px);
  transition: transform 180ms var(--ease-out), filter 180ms ease;
  transform: rotate(var(--r, 0deg));
}
.item img { width: 100%; }
.item.is-up { transform: translateY(-14px) rotate(var(--r, 0deg)) scale(1.08); filter: drop-shadow(0 14px 12px rgba(47, 62, 52, 0.35)); } /* taste-skill-ignore: الغرض المرفوع في يد اللاعب، لا ساكن */
.item:disabled { cursor: default; }
.p1 { inset-inline-start: 4%; top: 30%; --r: -9deg; }
.p2 { inset-inline-start: 20%; top: 2%; --r: 6deg; }
.p3 { inset-inline-start: 36%; top: 42%; --r: -4deg; }
.p4 { inset-inline-start: 53%; top: 8%; --r: 12deg; }
.p5 { inset-inline-start: 68%; top: 46%; --r: -14deg; }
.p6 { inset-inline-start: 84%; top: 14%; --r: 7deg; }
.room-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1rem; }
.room-foot .taped { flex: 1 1 18rem; }
.room-foot .btn[hidden] { display: none; }

/* إطار iPhone للّقطات (طلب إبراهيم): الأحجام بنسبة عرض الجهاز، والجزيرة فوق شريط الحالة */
.phone { container-type: inline-size; width: 100%; }
.phone .body { position: relative; padding: 3.2cqw; background: #1C1E1D; border: max(2.5px, 1cqw) solid #5E615F; border-radius: 16.6cqw; }
.phone .screen { position: relative; overflow: hidden; aspect-ratio: 600 / 1304; border-radius: 12.6cqw; background: #111; }
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone .screen::after { content: ""; position: absolute; z-index: 2; top: 2.5cqw; left: 50%; width: 28.5cqw; height: 8.5cqw; translate: -50% 0; border-radius: 999px; background: #050505; }

/* أقسام بأرضيات كاملة: كل دفتر يعير قسمه لونه */
.sec { padding-block: clamp(5rem, 12vw, 10rem); }
.sec h2 { font-size: var(--s-head); font-weight: 900; line-height: 1.15; }
.sec h2:lang(en) { letter-spacing: -0.03em; line-height: 1.02; }
.lede { margin-top: 1rem; max-width: 34ch; font-size: var(--s-sub); line-height: 1.6; }
.lede:lang(en) { line-height: 1.45; }
.paper-sheet { background: var(--paper); color: var(--ink); }

/* كيف تُلعب: ورقة النتيجة */
.how { background: var(--amber); }
.how .grid { display: grid; grid-template-columns: 5fr 1fr 6fr; align-items: start; }
.how .copy { grid-column: 1; }
.how .plate { margin-top: 2.5rem; width: min(100%, 280px); }
.slip { grid-column: 3; max-width: 30rem; padding: 2rem 2rem 3rem; clip-path: var(--zz-b); font-variant-numeric: tabular-nums; }
.slip h3 { font-size: var(--s-small); font-weight: 800; margin-top: 1.75rem; }
.slip h3:first-child { margin-top: 0; }
.row { display: flex; align-items: baseline; gap: 0.6rem; margin-top: 0.7rem; }
.row .what { font-weight: 600; }
.row .lead { flex: 1; min-width: 1.5rem; border-bottom: 4px dotted rgba(47, 62, 52, 0.35); translate: 0 -0.3em; }
.row .val { white-space: nowrap; color: var(--ink-soft); font-size: var(--s-small); }
.row-note { font-size: var(--s-small); color: var(--ink-soft); line-height: 1.5; }
.total { display: flex; justify-content: space-between; align-items: center; margin: 2rem -2rem 0; padding-inline: 2rem; min-height: 48px; background: var(--ink); color: var(--paper); font-weight: 800; }

/* البيوت الخمسة: ورقة مطبوعة + معاينة بالمرور */
.houses { background: var(--rust); color: var(--paper); }
.houses .grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.preview { position: sticky; top: 2rem; align-self: start; display: grid; justify-items: center; }
.frame { max-width: 300px; width: 100%; }
.frame .screen img { opacity: 0; transition: opacity 240ms ease; }
.frame img.k1 { opacity: 1; }
.houses:has(.house:hover) .frame img.k1 { opacity: 0; }
.houses:has(.house.k1:hover) .frame img.k1,
.houses:has(.house.k2:hover) .frame img.k2,
.houses:has(.house.k3:hover) .frame img.k3,
.houses:has(.house.k4:hover) .frame img.k4,
.houses:has(.house.k5:hover) .frame img.k5 { opacity: 1; }
.frame-cap { margin-top: 0.8rem; font-size: var(--s-small); text-align: center; color: var(--paper); }
.menu { padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 4rem); clip-path: var(--zz-tb); text-align: center; }
.menu h2 { color: var(--ink); }
.menu > p { margin-top: 0.75rem; font-size: var(--s-small); color: var(--ink-soft); }
.house { margin-top: 3rem; transition: opacity 200ms ease; }
@media (hover: hover) and (pointer: fine) { .menu:has(.house:hover) .house:not(:hover) { opacity: 0.45; } }
.house h3 { font-size: var(--s-sub); font-weight: 800; }
.house .range { font-size: var(--s-small); color: var(--ink-soft); }
.house ul { list-style: none; padding: 0; margin: 1rem auto 0; max-width: 30rem; text-align: start; font-variant-numeric: tabular-nums; }
.house li { display: flex; justify-content: space-between; gap: 1.5rem; padding-block: 0.4rem; line-height: 1.55; }
.house li span:last-child { white-space: nowrap; color: var(--ink-soft); font-size: var(--s-small); padding-top: 0.15rem; }
.house .inline { display: none; }
.menu-end { margin-top: 3rem; font-weight: 700; line-height: 1.6; }

/* ما في اللعبة: قائمة بنقاط مدوّرة */
.inside { background: var(--sage); }
.inside .grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.carte { padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem); clip-path: var(--zz-tb); font-variant-numeric: tabular-nums; }
.carte h2 { text-align: center; }
.carte h3 { margin-top: 2.75rem; font-size: var(--s-sub); font-weight: 800; }
.carte dl { margin-top: 0.4rem; }
.carte .r { margin-top: 1.1rem; }
.carte dt { display: flex; align-items: baseline; gap: 0.6rem; font-weight: 700; }
.carte dt .lead { flex: 1; min-width: 1.5rem; border-bottom: 4px dotted rgba(47, 62, 52, 0.35); translate: 0 -0.3em; }
.carte dt .val { font-weight: 600; white-space: nowrap; }
.carte dd { font-size: var(--s-small); color: var(--ink-soft); max-width: 40ch; line-height: 1.55; margin-top: 0.15rem; }
.plates { display: grid; gap: 1.5rem; justify-items: center; }
.plates .phone { width: min(100%, 290px); }
.plates .phone:nth-child(2) { width: min(86%, 250px); translate: -10% 0; }
.plates .phone:nth-child(2):dir(rtl) { translate: 10% 0; }

/* السعر: التذكرة */
.price { background: var(--blue); color: var(--paper); }
.price .copy { max-width: 40rem; }
.ticket {
  position: relative; margin-top: clamp(2.5rem, 6vw, 4rem);
  display: grid; grid-template-columns: 7fr 3fr; min-height: 22rem;
  background: var(--paper); color: var(--ink);
}
.ticket::before, .ticket::after { content: ""; position: absolute; inset-inline-start: calc(70% - 14px); width: 28px; height: 28px; border-radius: 50%; background: var(--blue); }
.ticket::before { top: -14px; }
.ticket::after { bottom: -14px; }
.t-main { position: relative; padding: clamp(1.5rem, 3.5vw, 2.75rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; overflow: hidden; }
.t-main h3 { font-size: var(--s-head); font-weight: 900; line-height: 1.15; max-width: 14ch; }
.t-main h3:lang(en) { letter-spacing: -0.03em; line-height: 1.02; }
.t-main ul { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 2rem; font-weight: 600; position: relative; z-index: 1; }
.t-main .keyart { position: absolute; inset-inline-end: -2%; top: 34%; width: min(46%, 300px); opacity: 0.95; rotate: -14deg; pointer-events: none; }
.t-main .keyart:dir(rtl) { rotate: 14deg; transform: scaleX(-1); }
.t-stub { border-inline-start: 6px dotted var(--blue); padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 0.5rem; }
.t-stub .amount { font-size: var(--s-display); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.t-stub .amount:lang(en) { letter-spacing: -0.03em; }
.t-stub .per { font-size: var(--s-small); color: var(--ink-soft); }
.t-stub .soonbar { text-decoration: none; margin-top: 1.25rem; min-height: 56px; display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--paper); font-weight: 700; font-size: var(--s-small); padding-inline: 0.75rem; }
.free-row { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.free-row img { width: 120px; }
.free-row p { max-width: 46ch; }

/* أسئلة: بطاقات فهرس بألسنة */
.faq { background: var(--bone); }
.faq .inner { max-width: 52rem; margin-inline: auto; }
.cards { margin-top: clamp(3rem, 6vw, 4.5rem); }
.card { position: relative; margin-top: 28px; }
.card:first-child { margin-top: 0; }
.card summary {
  list-style: none; cursor: pointer; position: relative;
  min-height: 96px; display: flex; align-items: center; padding: 1.4rem 1.6rem 1.2rem;
  font-size: var(--s-sub); font-weight: 700; line-height: 1.4;
}
.card summary::-webkit-details-marker { display: none; }
.card summary::after { content: "+"; margin-inline-start: auto; padding-inline-start: 1rem; font-size: 1.6rem; font-weight: 400; line-height: 1; transition: transform 200ms var(--ease-out); }
.card[open] summary::after { transform: rotate(45deg); }
.card .tab { position: absolute; bottom: 100%; height: 40px; min-width: 200px; display: flex; align-items: center; justify-content: center; padding-inline: 1.4rem; font-size: var(--s-small); font-weight: 700; clip-path: var(--tab); background: inherit; }
.card .ans { padding: 0 1.6rem 1.6rem; max-width: 56ch; }
.card .ans a { color: var(--accent); }
.c1, .c4 { background: var(--sage); }
.c2, .c5 { background: var(--bone2); }
.c3, .c6 { background: #E8B88A; }
.c1 .tab { inset-inline-start: 0; }
.c2 .tab { inset-inline-start: 150px; }
.c3 .tab { inset-inline-start: 300px; }
.c4 .tab { inset-inline-start: 450px; }
.c5 .tab { inset-inline-start: 150px; }
.c6 .tab { inset-inline-start: 300px; }
.cards .card + .card { margin-top: 68px; }

/* الختام: دعوة فوق اسم مقصوص */
.close { position: relative; background: var(--ink); color: var(--paper); overflow: hidden; padding-top: clamp(5rem, 12vw, 9rem); }
.close .grid { display: grid; grid-template-columns: 7fr 2fr 3fr; align-items: start; }
.close h2 { font-size: var(--s-display); font-weight: 900; line-height: 1.15; }
.close h2:lang(en) { letter-spacing: -0.035em; line-height: 1; }
.close .btn { margin-top: 2rem; }
.links { grid-column: 3; list-style: none; padding: 0; display: grid; gap: 0.6rem; font-size: var(--s-small); }
.links a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .links a:hover { text-decoration: underline; } }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; margin-top: clamp(4rem, 10vw, 7rem); font-size: var(--s-small); color: #CFD6CC; }
.legal a { color: inherit; }
.name { margin-top: 1rem; font-size: clamp(9rem, 30vw, 26rem); font-weight: 900; line-height: 1.05; white-space: nowrap; text-align: center; margin-bottom: -0.24em; color: var(--amber); }
.name:lang(en) { letter-spacing: -0.05em; text-align: start; }

/* الجوال: تركيب خاص به */
@media (max-width: 52rem) {
  .how .grid, .houses .grid, .inside .grid, .close .grid { grid-template-columns: 1fr; }
  .slip { grid-column: 1; margin-top: 2.5rem; }
  .how .plate { display: none; }
  .preview { display: none; }
  .house .inline { display: block; width: min(70%, 240px); margin: 1.25rem auto 0; }
  .plates { grid-template-columns: 1fr 1fr; margin-top: 2rem; }
  .plates .phone, .plates .phone:nth-child(2) { width: 100%; translate: none; }
  .links { grid-column: 1; margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
  .ticket { grid-template-columns: 1fr; }
  .ticket::before, .ticket::after { inset-inline-start: auto; top: auto; bottom: auto; }
  .ticket::before { inset-inline-start: -14px; top: calc(100% - 13.5rem - 14px); }
  .ticket::after { inset-inline-end: -14px; top: calc(100% - 13.5rem - 14px); }
  .t-stub { border-inline-start: 0; border-top: 6px dotted var(--blue); min-height: 13.5rem; padding-top: 2.75rem; }
  .t-main { padding-bottom: 2.5rem; }
  .t-main ul { grid-template-columns: 1fr; }
  .t-main .keyart { width: 44%; top: 4%; }
}
@media (max-width: 40rem) {
  .folder { height: 52px; }
  .folders { margin-top: 32px; }
  .folder .tab, .front > .tab { height: 32px; min-width: 120px; padding-inline: 1rem; }
  .f2 .tab { inset-inline-start: 30%; }
  .f3 .tab { inset-inline-start: auto; inset-inline-end: 4%; }
  .f4 .tab { inset-inline-start: 22%; }
  .folders, .front { width: 100%; }
  .card .tab { min-width: 120px; }
  .c2 .tab, .c5 .tab { inset-inline-start: 48px; }
  .c3 .tab, .c6 .tab { inset-inline-start: 96px; }
  .c4 .tab { inset-inline-start: 144px; }
  .card summary { font-size: 1.125rem; padding: 1.2rem 1.1rem 1rem; }
  .card .ans { padding: 0 1.1rem 1.25rem; font-size: 1rem; }
  .slip { padding: 1.5rem 1.25rem 2.5rem; }
  .total { margin-inline: -1.25rem; padding-inline: 1.25rem; }
  .row { flex-wrap: wrap; }
  .row .what { flex: 1 1 auto; }
  .name { font-size: 34vw; }
}

/* الحركة: دخول الأقسام مرّة واحدة — يعمل فقط مع السكربت، ويظهر كل شيء إن لم يعمل */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(24px); animation: reveal-safety 0s 3.5s forwards; }
  [data-reveal] { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
  [data-reveal].d1 { transition-delay: 80ms; }
  [data-reveal].d2 { transition-delay: 160ms; }
  [data-reveal].d3 { transition-delay: 240ms; }
  [data-reveal].d4 { transition-delay: 320ms; }
  .frame img.k1, .houses:has(.house:hover) .frame img { animation: drift 14s ease-in-out infinite alternate; }
  .hero h1 { animation: rise 900ms var(--ease-out) both; }
  .hero .sub { animation: rise 900ms 120ms var(--ease-out) both; }
  .folders .folder, .front > .tab { animation: rise 700ms var(--ease-out) both; }
  .folders .f1 { animation-delay: 220ms; }
  .folders .f2 { animation-delay: 290ms; }
  .folders .f3 { animation-delay: 360ms; }
  .folders .f4 { animation-delay: 430ms; }
}
@keyframes reveal-safety { to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

.t-stub a.soonbar:hover { opacity: 0.9; }
