/* ============================================================
   نُص كافيه — بطولة «مين قتل الملك؟»  v4
   الهوية: خلفيات داكنة، تركوازي الشعار، شريط تمييز خلف الكلمات
   ============================================================ */
:root {
  --bg: #0E1314;
  --surface: #161D1E;
  --surface-2: #1D2627;
  --line: #2A3536;
  --teal: #40A79E;
  --teal-bar: #2B7C76;
  --teal-soft: rgba(64, 167, 158, .14);
  --text: #EEF2F1;
  --muted: #95A4A2;
  --error: #E4705A;
  --gold: #E8B85C;

  --sq-light: #D9E6E2;
  --sq-dark: #2E7E77;

  --display: 'El Messiri', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
  --body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  --r: 12px;
  --ease: cubic-bezier(.2, .75, .15, 1);
  --ease-io: cubic-bezier(.75, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.75 var(--body); overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.3; margin: 0; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 40px, 1120px); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 6px;
  font: 700 17px var(--body); text-decoration: none; cursor: pointer;
  transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn-brass { background: var(--teal); color: #07201E; box-shadow: 0 10px 30px -10px rgba(64, 167, 158, .7); }
.btn-brass:hover { background: #4DB8AE; transform: translateY(-2px); }
.btn-brass:active { transform: translateY(1px); }
.btn-brass:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--teal); color: var(--teal); }
.btn-link { background: none; border: 0; padding: 4px 0; color: var(--teal); font: 500 15px var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; isolation: isolate;
  padding: 24px 0 80px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
/* رقعة باهتة في الخلفية تتلاشى نحو الأطراف */
.hero::before {
  content: ''; position: absolute; inset: -10% -10% 0; z-index: -1;
  background: repeating-conic-gradient(rgba(64, 167, 158, .07) 0 25%, transparent 0 50%) 0 0 / 88px 88px;
  -webkit-mask: radial-gradient(55% 60% at 22% 50%, #000 0, transparent 70%);
          mask: radial-gradient(55% 60% at 22% 50%, #000 0, transparent 70%);
}
.hero::after {
  content: ''; position: absolute; z-index: -1; width: 620px; height: 620px; left: -120px; top: 12%;
  background: radial-gradient(closest-side, rgba(64, 167, 158, .22), transparent);
  filter: blur(10px);
}
.hero-grid { display: grid; grid-template-columns: 1fr minmax(0, 470px); gap: 56px; align-items: center; }
.brand { display: inline-block; margin-bottom: 22px; }
.brand img { width: 100px; height: auto; display: block; }
.kicker { margin: 0 0 6px; font: 500 clamp(18px, 2.2vw, 22px) var(--body); color: var(--teal); }
.hero-title { margin: 0; font: 700 clamp(44px, 7.4vw, 84px)/1.2 var(--display); }
/* شريط التمييز المائل خلف الكلمات — من بوستات نُص */
.mark { position: relative; z-index: 0; display: inline-block; padding-inline: .1em; }
.mark::before {
  content: ''; position: absolute; z-index: -1; inset: 40% -.14em 2% -.14em;
  background: var(--teal-bar); transform: skewX(-12deg) rotate(-1.6deg);
}
.tt { display: inline-block; }
.lede { font-size: clamp(18px, 2.2vw, 20px); color: var(--muted); max-width: 30em; margin: 14px 0 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* عدّاد تنازلي */
.countdown { display: flex; gap: 10px; margin: 0 0 26px; direction: rtl; }
.countdown > div {
  display: grid; justify-items: center; min-width: 72px; padding: 10px 8px 8px;
  background: rgba(22, 29, 30, .8); border: 1px solid var(--line); border-radius: 10px;
  backdrop-filter: blur(6px);
}
.cd-num { font: 700 32px/1.1 var(--body); font-variant-numeric: tabular-nums; display: block; }
.cd-num.tick { animation: roll .45s var(--ease); }
.cd-lab { font-size: 13px; color: var(--muted); }
.countdown.is-live { display: block; }
@keyframes roll { from { transform: translateY(-45%); opacity: 0; } }

.seats { margin-top: 20px; max-width: 400px; }
.seats p { margin: 0 0 8px; color: var(--teal); font-weight: 500; font-size: 15px; }
.seats-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.seats-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-bar), var(--teal)); border-radius: inherit; transform-origin: right; animation: grow 1.4s .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

/* تسلسل الدخول — لحظة الحركة الوحيدة المنسّقة في الصفحة */
.js .intro { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }
.js .hero-title .tt { animation: wipe 1.1s var(--ease-io) .25s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes wipe { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }

/* ============================================================
   Game
   ============================================================ */
.game {
  display: grid; gap: 10px; width: 100%; margin-inline: auto;
  /* الرقعة كاملة داخل الشاشة حتى على الشاشات القصيرة */
  max-width: max(280px, calc(100vh - 170px));
  max-width: max(280px, calc(100svh - 170px));
}
.js .game { animation: rise 1s var(--ease) .35s both; }
.player {
  display: flex; align-items: center; gap: 12px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .3s, box-shadow .3s;
}
.player.is-turn { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #0A0E0F; color: var(--muted); }
.avatar.is-you { background: var(--sq-light); color: var(--bg); }
.avatar svg { width: 30px; height: 30px; }
.pname { display: grid; line-height: 1.35; }
.pname b { font-size: 15px; }
.pname small { font-size: 13px; color: var(--muted); }
.pclock {
  margin-inline-start: auto; min-width: 96px; padding: 7px 14px; border-radius: 7px;
  background: #0A0E0F; color: #52605F; text-align: center;
  font: 700 26px/1 var(--body); font-variant-numeric: tabular-nums;
  transition: color .25s, box-shadow .25s;
}
.player.is-turn .pclock { color: #F4FBFA; box-shadow: inset 0 -3px 0 var(--teal); }
.pclock.is-low { color: var(--error) !important; box-shadow: inset 0 -3px 0 var(--error) !important; }
.pclock.is-flag { background: #7A2A1E; color: #fff !important; }

.board-wrap {
  position: relative; padding: 10px; border-radius: 14px;
  background: linear-gradient(160deg, #273133, #161d1e 60%);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.board {
  position: relative; display: grid; grid-template-columns: repeat(8, 1fr);
  aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
/* السحب يلتقط اللمس على قطعك فقط؛ باقي الرقعة يسمح بتمرير الصفحة على الجوال */
.sq.is-own { touch-action: none; cursor: grab; }
.sq { position: relative; }
.sq.lt { background: var(--sq-light); }
.sq.dk { background: var(--sq-dark); }
.sq::after { content: ''; position: absolute; inset: 0; pointer-events: none; transition: background .25s; }
.sq.is-last::after { background: rgba(232, 184, 92, .38); }
.sq.is-sel::after { background: rgba(232, 184, 92, .62); }
.sq.is-check::after { background: radial-gradient(closest-side, rgba(228, 80, 60, .95), rgba(228, 80, 60, .35) 70%, transparent); }
.sq.is-target::before {
  content: ''; position: absolute; z-index: 1; inset: 36%; border-radius: 50%;
  background: rgba(14, 19, 20, .3);
  animation: dot .22s var(--ease) both;
}
.sq.is-target.is-cap::before { inset: 4%; background: none; border: 5px solid rgba(14, 19, 20, .3); }
.sq.is-hover { box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .7); }
@keyframes dot { from { transform: scale(0); } }
.coord { position: absolute; font: 700 11px/1 var(--body); pointer-events: none; opacity: .85; }
.coord-f { left: 4px; bottom: 3px; }
.coord-r { right: 4px; top: 4px; }
.sq.lt .coord { color: var(--sq-dark); }
.sq.dk .coord { color: var(--sq-light); }

.pieces { position: absolute; inset: 0; pointer-events: none; }
.pc {
  position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%;
  transition: transform .34s var(--ease), opacity .3s;
  will-change: transform;
}
.pc svg { width: 100%; height: 100%; display: block; padding: 6%; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .35)); transition: transform .2s var(--ease), filter .2s; }
.pc.is-drag { z-index: 5; transition: none; }
.pc.is-drag svg { transform: scale(1.18); filter: drop-shadow(0 14px 10px rgba(0, 0, 0, .45)); }
.pc.is-lift svg { transform: translateY(-6%); }
.pc.is-gone { opacity: 0; }
.pc.is-gone svg { transform: scale(.5) rotate(-12deg); }
.pc.is-enter svg { animation: drop .6s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes drop { from { opacity: 0; transform: translateY(-60%) scale(.8); } }
.pc-w { fill: #F6F3EA; stroke: #0E1314; }
.pc-b { fill: #152020; stroke: #050808; }
.pc path, .pc rect, .pc circle { stroke-width: 1.4; stroke-linejoin: round; }
.pc .dt { fill: none; stroke-width: 1.4; }
.pc-w .dt { stroke: #0E1314; }
.pc-b .dt { stroke: #6FBFB7; }

.game-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 32px; }
.game-status { margin: 0; font-size: 15px; color: var(--muted); }
.game-status.is-alert { color: var(--gold); font-weight: 500; }

.game-over {
  position: absolute; inset: 10px; z-index: 10; display: grid; place-items: center; padding: 20px;
  border-radius: 6px; background: rgba(8, 12, 12, .78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .45s, visibility 0s .45s;
}
.game-over.is-on { opacity: 1; visibility: visible; transition: opacity .45s; }
.go-card { text-align: center; max-width: 320px; transform: translateY(14px) scale(.96); transition: transform .6s var(--ease); }
.game-over.is-on .go-card { transform: none; }
.go-title { font: 700 clamp(26px, 5vw, 34px)/1.3 var(--display); margin: 0 0 6px; }
.go-text { margin: 0 0 18px; color: #C9D6D4; }
.go-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.go-actions .btn { min-height: 46px; padding: 0 20px; font-size: 16px; }

/* ============================================================
   Sections
   ============================================================ */
.block { padding: 88px 0 0; }
.block > h2 { margin-bottom: 30px; font-size: clamp(32px, 5vw, 46px); line-height: 1.3; }
.js .wipe .tt { clip-path: inset(0 0 0 100%); transition: clip-path 1s var(--ease-io); }
.js .wipe.is-in .tt { clip-path: inset(0 0 0 0); }

/* الموعد */
.when-grid { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.datecard {
  position: relative; overflow: hidden; display: grid; justify-items: start;
  padding: 26px 26px 22px; border-radius: 16px;
  background: linear-gradient(155deg, var(--teal-bar), #1B524E 70%);
  box-shadow: 0 30px 60px -30px rgba(43, 124, 118, .8);
}
.datecard::after {
  content: ''; position: absolute; inset: auto -40px -40px auto; width: 180px; height: 180px; opacity: .14;
  background: repeating-conic-gradient(#fff 0 25%, transparent 0 50%) 0 0 / 45px 45px;
  transform: rotate(12deg);
}
.dc-week { font: 700 22px var(--display); }
.dc-day { font: 700 112px/.95 var(--display); letter-spacing: -.02em; margin: 6px 0 2px; }
.dc-month { font: 500 20px var(--body); }
.dc-text { font: 700 28px/1.4 var(--display); }
.dc-place { margin: 18px 0 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .2); font-weight: 700; width: 100%; }
.dc-place small { display: block; font-weight: 400; font-size: 14px; color: rgba(238, 242, 241, .8); }
.dc-actions { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.chip {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px;
  background: rgba(7, 32, 30, .45); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background .2s;
}
.chip:hover { background: rgba(7, 32, 30, .75); }

.timeline { list-style: none; margin: 0; padding: 4px 0 0; position: relative; }
.timeline::before {
  content: ''; position: absolute; right: 7px; top: 14px; bottom: 26px; width: 2px;
  background: linear-gradient(var(--teal), var(--line));
  transform-origin: top;
}
.timeline li { position: relative; display: grid; grid-template-columns: 128px 1fr; gap: 18px; padding: 0 34px 26px 0; }
.timeline li::before {
  content: ''; position: absolute; right: 0; top: 9px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--teal);
}
.timeline li:last-child::before { background: var(--gold); border-color: var(--gold); }
.tl-time { font: 700 20px/1.6 var(--body); font-variant-numeric: tabular-nums; color: var(--teal); text-align: right; white-space: nowrap; }
.timeline h3 { font: 700 19px/1.6 var(--body); }
.timeline p { margin: 0; color: var(--muted); font-size: 15px; }
.js .timeline::before { transform: scaleY(0); transition: transform 1.2s var(--ease); }
.js .timeline li { opacity: 0; transform: translateX(-14px); transition: opacity .6s, transform .6s var(--ease); transition-delay: calc(var(--i) * 140ms + 200ms); }
.js .timeline.is-in::before { transform: none; }
.js .timeline.is-in li { opacity: 1; transform: none; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 48px 0 0;
  border-top: 1px solid var(--teal);
}
.facts > div { padding: 18px 0 18px 22px; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin: 0; font: 700 40px/1.3 var(--body); font-variant-numeric: tabular-nums; text-align: right; }
.facts dd small { font-size: 16px; font-weight: 500; color: var(--muted); }
.facts p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 22em; }

/* الجوائز */
.pool { font-size: clamp(18px, 2.4vw, 22px); max-width: 34em; margin: -8px 0 36px; color: #C9D6D4; }
.pool strong { color: var(--gold); white-space: nowrap; }
.podium {
  --g: clamp(8px, 2vw, 18px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end;
  gap: var(--g); max-width: 760px; margin-inline: auto;
}
.step { display: grid; gap: 14px; text-align: center; }
.step-1 { order: 2; } .step-2 { order: 1; } .step-3 { order: 3; }
.step-top { display: grid; justify-items: center; gap: 2px; }
.crown { width: 44px; color: var(--gold); margin-bottom: 4px; filter: drop-shadow(0 4px 12px rgba(232, 184, 92, .45)); }
.step-amt { font: 700 clamp(30px, 5.5vw, 52px)/1.05 var(--body); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px; }
.step-amt small { font-size: clamp(13px, 1.6vw, 17px); font-weight: 500; color: var(--muted); }
.step-1 .step-amt { color: var(--gold); font-size: clamp(38px, 7vw, 68px); }
.step-place { font-size: 15px; color: var(--muted); }
.step-bar {
  display: grid; place-items: start center; padding-top: 14px;
  border-radius: 10px 10px 0 0; background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  font: 700 clamp(40px, 6vw, 64px)/1 var(--display); color: rgba(238, 242, 241, .18);
  transform-origin: bottom;
}
.step-1 .step-bar { height: 220px; background: linear-gradient(var(--teal), var(--teal-bar)); color: rgba(7, 32, 30, .45); }
.step-2 .step-bar { height: 150px; }
.step-3 .step-bar { height: 104px; }
.step:not(.step-1):not(.step-2):not(.step-3) { order: 4; }
.podium::after { content: ''; grid-column: 1 / -1; order: 5; height: 2px; margin-top: calc(-1 * var(--g)); background: var(--line); }
.js .podium .step-bar { transform: scaleY(0); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 160ms); }
.js .podium .step-top { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .8s var(--ease); transition-delay: calc(var(--i) * 160ms + 450ms); }
.js .podium.is-in .step-bar, .js .podium.is-in .step-top { transform: none; opacity: 1; }
.tiebreak { margin: 22px auto 0; max-width: 760px; text-align: center; font-size: 14px; color: var(--muted); }

/* خطوات التسجيل */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 12px; max-width: 820px; }
.steps > li {
  counter-increment: s; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px 76px 22px 22px;
}
.steps > li::before {
  content: counter(s); position: absolute; right: 22px; top: 20px;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 2px solid var(--teal); color: var(--teal); border-radius: 50%;
  font: 700 18px var(--body);
}
.steps h3 { font: 700 19px/1.4 var(--body); margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }
.steps strong { color: var(--text); }
.pay { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.pay li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; background: var(--bg); border-radius: 8px; padding: 12px 14px; }
.pay-label { color: var(--muted); font-size: 15px; }
.pay-value { font-weight: 700; font-size: 22px; letter-spacing: .04em; direction: ltr; color: var(--text); }
.copy { margin-inline-start: auto; border: 1px solid var(--teal); background: transparent; border-radius: 6px; padding: 4px 16px; font: 500 14px var(--body); color: var(--teal); cursor: pointer; }
.copy:hover { background: var(--teal-soft); }

/* ---------- form ---------- */
.register > h2 { margin-bottom: 22px; }
.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(20px, 4vw, 40px); display: grid; gap: 26px; max-width: 720px;
}
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label:not(.drop):not(.check), .field legend { display: block; font-weight: 700; margin-bottom: 8px; padding: 0; }
.opt { font-weight: 400; color: var(--muted); font-size: 15px; }
.hint { margin: -4px 0 10px; font-size: 15px; color: var(--muted); }
input[type=text], input[type=tel], input[type=password], input[type=search] {
  width: 100%; min-height: 52px; padding: 10px 16px;
  font: 400 17px var(--body); color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
input[dir=ltr] { text-align: right; }
input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
input::placeholder { color: #5D6B6A; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg);
  font-weight: 500; transition: background .15s, border-color .15s, color .15s;
}
.choice:hover span { border-color: var(--teal); }
.choice input:checked + span { background: var(--teal); border-color: var(--teal); color: #07201E; font-weight: 700; }
.choice input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }

.drop {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 116px; padding: 16px; border: 1.5px dashed var(--teal); border-radius: var(--r);
  background: var(--bg); cursor: pointer; text-align: center;
}
.drop:hover { background: var(--teal-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop:focus-within { outline: 3px solid var(--teal); outline-offset: 2px; }
.drop-empty { font-weight: 700; color: var(--teal); }
.drop-empty::before { content: '＋'; display: block; font-size: 28px; line-height: 1; margin-bottom: 6px; }
.drop-file { display: flex; align-items: center; gap: 14px; width: 100%; text-align: start; }
.drop-file img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; }
.drop-file [data-filename] { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.drop-change { color: var(--teal); font-weight: 700; text-decoration: underline; }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 4px 0 0; accent-color: var(--teal); flex: none; }

.has-error input[type=text], .has-error input[type=tel], .has-error input[type=password] { border-color: var(--error); }
.has-error .choice span, .has-error .drop { border-color: var(--error); }
.field-error { color: var(--error); font-size: 15px; font-weight: 500; margin: 8px 0 0; }
.form-alert {
  background: rgba(228, 112, 90, .1); color: var(--error); border-inline-start: 4px solid var(--error);
  padding: 12px 16px; border-radius: 6px; margin: 0 0 18px; font-weight: 500; max-width: 720px;
}
.btn-submit { width: 100%; min-height: 58px; font-size: 19px; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(24px, 4vw, 40px); max-width: 720px; }
.panel h2 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 12px; line-height: 1.3; }
.panel p { margin: 0 0 10px; }
.panel .btn { margin-top: 14px; }
.panel-ok { border-top: 4px solid var(--teal); }
.code { font-weight: 700; font-size: 1.2em; color: var(--teal); letter-spacing: .04em; }

.rules { margin: 0; padding: 0 22px 0 0; max-width: 46em; color: #D5DEDC; }
.rules li { margin-bottom: 8px; }
.rules li::marker { color: var(--teal); }

/* ---------- footer ---------- */
.footer { margin-top: 88px; border-top: 1px solid var(--line); padding: 30px 0 110px; font-size: 15px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 18px; }
.address { display: grid; gap: 2px; padding-inline-start: 16px; border-inline-start: 1px solid var(--teal); position: relative; }
.address::before { content: ''; position: absolute; right: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.address strong { font: 700 22px/1.4 var(--display); }
.address span { color: var(--muted); }
.footer-links { display: flex; gap: 22px; }
.footer a { color: var(--text); }

/* شريط التسجيل العائم */
.dock {
  position: fixed; z-index: 50; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(100% - 24px, 520px); display: flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 8px; padding-inline-start: 18px; border-radius: 14px;
  background: rgba(22, 29, 30, .88); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7);
  transform: translate(-50%, 140%); transition: transform .55s var(--ease);
}
.dock.is-on { transform: translate(-50%, 0); }
.dock-info { display: grid; line-height: 1.4; flex: 1; min-width: 0; }
.dock-info b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-info small { font-size: 13px; color: var(--muted); }
.dock .btn { min-height: 46px; padding: 0 20px; font-size: 16px; flex: none; }

/* صور العناوين بخط ثمانية — مقاس ×2 */

@media (max-width: 1100px) {
  .hero-grid { gap: 36px; grid-template-columns: 1fr minmax(0, 430px); }
}
@media (max-width: 960px) {
  .when-grid { grid-template-columns: 250px 1fr; gap: 32px; }
  .dc-day { font-size: 92px; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .game { max-width: min(480px, max(300px, calc(100svh - 150px))); }
}
@media (min-width: 601px) and (max-width: 860px) {
  .hero-copy { text-align: center; display: grid; justify-items: center; }
  .lede { margin-inline: auto; }
  .countdown, .hero-actions { justify-content: center; }
  .seats { width: 100%; }
}
@media (max-width: 720px) {
  .when-grid { grid-template-columns: 1fr; gap: 34px; }
  .datecard { grid-template-columns: auto 1fr; column-gap: 20px; align-items: end; }
  .dc-week, .dc-month { grid-column: 2; }
  .dc-day { grid-column: 1; grid-row: 1 / span 2; font-size: 96px; }
  .dc-text, .dc-place, .dc-actions { grid-column: 1 / -1; }
}
/* جوال بالعرض: الرقعة بجانب النص وبحجم الشاشة */
@media (orientation: landscape) and (max-height: 520px) {
  .hero { padding: 16px 0 40px; }
  .hero-grid { grid-template-columns: 1fr auto; gap: 28px; align-items: start; }
  .hero-copy { text-align: start; display: block; }
  .brand { margin-bottom: 10px; }
  .brand img { width: 64px; }
  .lede { font-size: 16px; margin: 8px 0 14px; }
  .countdown { justify-content: flex-start; margin-bottom: 16px; }
  .countdown > div { min-width: 58px; padding: 6px; }
  .cd-num { font-size: 22px; }
  .hero-actions { justify-content: flex-start; }
  .hero-actions .btn { min-height: 44px; padding: 0 18px; }
  .hero-title { font-size: 40px; }
  .game { width: calc(100svh - 176px); max-width: none; min-width: 230px; gap: 6px; }
  .game-bar { min-height: 0; }
  .game-status, .btn-link { font-size: 13px; }
  .player { padding: 4px 6px; }
  .avatar { width: 32px; height: 32px; }
  .pclock { font-size: 20px; min-width: 76px; padding: 5px 10px; }
  .board-wrap { padding: 5px; }
  .game-over { inset: 5px; }
  .dock { width: min(100% - 24px, 440px); }
}
@media (max-width: 360px) {
  .wrap { width: calc(100% - 28px); }
  .dock-info small { display: none; }
  .countdown > div { padding: 8px 2px 6px; }
  .cd-lab { font-size: 12px; }
  .pname small { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-bottom: 56px; }
  .brand img { width: 80px; }
  .block { padding-top: 64px; }
  .countdown { gap: 6px; }
  .countdown > div { min-width: 0; flex: 1; }
  .cd-num { font-size: 26px; }
  .hero-actions .btn { flex: 1; padding: 0 16px; }
  .board-wrap { padding: 6px; }
  .game-over { inset: 6px; }
  .pclock { font-size: 22px; min-width: 84px; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .tl-time { font-size: 17px; }
  .facts > div { padding-left: 12px; }
  .facts dd { font-size: 32px; }
  .step-1 .step-bar { height: 170px; } .step-2 .step-bar { height: 118px; } .step-3 .step-bar { height: 84px; }
  .steps > li { padding: 70px 20px 20px; }
  .steps > li::before { right: 20px; top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}


/* رقم الواتساب مع المقدمة */
.codes { margin-bottom: 10px; }
.codes .choice span { font-variant-numeric: tabular-nums; }
.phone-row {
  display: flex; align-items: stretch; min-height: 52px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.phone-row:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.phone-prefix { display: grid; place-items: center; min-width: 70px; padding: 0 12px; background: var(--surface-2); border-inline-end: 1px solid var(--line); font: 700 17px var(--body); color: var(--muted); font-variant-numeric: tabular-nums; transition: color .2s; }
.phone-prefix.is-set { color: var(--teal); }
.phone-row input { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; min-height: 50px; background: transparent !important; text-align: left !important; }
.phone-row input:focus { outline: none; }
.phone-row .phone-other { width: 76px; flex: none; border-inline-end: 1px solid var(--line) !important; padding: 10px 8px; }
.phone-row #phone { flex: 1; min-width: 0; letter-spacing: .03em; }
.phone-row.is-locked { opacity: .55; }
.has-error .phone-row { border-color: var(--error); }

/* ============================================================
   Admin
   ============================================================ */
.admin { font-size: 16px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-panel { width: min(100%, 380px); display: grid; gap: 20px; justify-items: stretch; }
.login-logo { justify-self: center; }
.login-panel h1 { font-size: 28px; text-align: center; }

.admin-bar { border-bottom: 1px solid var(--line); padding: 12px 0; background: var(--surface); }
.admin-bar-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; }
.admin-bar h1 { font-size: 24px; display: flex; align-items: center; gap: 12px; }
.admin-bar h1 img, .login-logo { height: auto; }
.admin-bar nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.admin-bar a { color: var(--text); }
.admin-main { padding: 28px 0 60px; }
.admin .form-alert { max-width: none; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; margin: 0 0 24px;
}
.stats > div { background: var(--surface); padding: 14px 16px; }
.stats dt { font-size: 14px; color: var(--muted); }
.stats dd { margin: 0; font: 700 28px/1.3 var(--body); font-variant-numeric: tabular-nums; }
.stats dd small { font-size: 14px; font-weight: 400; color: var(--muted); }
.stats .dd-small { font-size: 15px; font-weight: 500; line-height: 1.6; }
.stats .is-pending dd { color: #E8B85C; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { padding: 6px 16px; border-radius: 6px; text-decoration: none; font-weight: 500; background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.tab.is-on { background: var(--teal); color: #07201E; border-color: var(--teal); }
.filters input[type=search] { width: min(100%, 300px); min-height: 42px; background: var(--surface); }

.empty { background: var(--surface); border-radius: var(--r); padding: 40px 24px; text-align: center; color: var(--muted); }

.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.regs { width: 100%; border-collapse: collapse; }
.regs th { text-align: start; font-size: 14px; color: var(--muted); font-weight: 500; padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.regs td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.regs td small { display: block; font-size: 13px; color: var(--muted); }
.regs td bdi { white-space: nowrap; font-weight: 700; }
.regs tr.st-rejected td { opacity: .5; }
.regs tr:target { background: var(--teal-soft); }
.thumb { border: 0; padding: 0; background: none; cursor: zoom-in; display: block; }
.thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.badge { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.b-pending { background: rgba(232, 184, 92, .15); color: #E8B85C; }
.b-confirmed { background: var(--teal-soft); color: var(--teal); }
.b-rejected { background: rgba(228, 112, 90, .12); color: var(--error); }
.actions { white-space: nowrap; }
.actions form { display: inline; }
.btn-sm { display: inline-block; margin: 2px; padding: 6px 12px; border-radius: 6px; border: 1px solid transparent; font: 500 14px var(--body); cursor: pointer; text-decoration: none; }
.btn-ok { background: var(--teal); color: #07201E; }
.btn-plain { background: transparent; border-color: var(--line); color: var(--text); }
.btn-wa { background: #25D366; color: #0B3B1E; }
.btn-danger { background: none; color: var(--error); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(5, 8, 8, .9); }
.lightbox img { display: block; max-width: 94vw; max-height: 88vh; border-radius: 8px; }
.lightbox-close { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 26px; cursor: pointer; }

@media (max-width: 760px) {
  .table-scroll { background: none; border: 0; }
  .regs thead { display: none; }
  .regs, .regs tbody, .regs tr, .regs td { display: block; }
  .regs tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; padding: 8px 4px; }
  .regs td { border: 0; padding: 6px 12px; display: flex; gap: 12px; align-items: center; }
  .regs td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 14px; min-width: 70px; }
  .regs td small { display: inline; margin-inline-start: 8px; }
  .actions { white-space: normal; padding-top: 10px !important; flex-wrap: wrap; }
}

/* نافذة إرسال التأكيد */
.phone-link { font-variant-numeric: tabular-nums; white-space: nowrap; }
.actions .sent { display: block; margin: 2px; font-size: 12px; color: var(--teal); white-space: nowrap; }
.notify { width: min(100% - 24px, 440px); padding: 0; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: var(--r); background: var(--surface); color: var(--text); }
.notify::backdrop { background: rgba(5, 8, 8, .8); }
.notify[open] { animation: rise .35s var(--ease); }
.notify-in { padding: 22px; display: grid; gap: 4px; }
.notify-kicker { margin: 0; color: var(--teal); font-size: 14px; font-weight: 500; }
.notify h2 { font-size: 22px; line-height: 1.45; }
.notify-phone { margin: 0 0 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.notify-opts { display: grid; gap: 10px; }
.notify-opt { display: grid; gap: 2px; padding: 14px 16px; border-radius: 10px; text-decoration: none; color: var(--text); border: 1px solid var(--line); background: var(--bg); transition: border-color .2s, background .2s; }
.notify-opt b { font-size: 17px; }
.notify-opt small { font-size: 13px; color: var(--muted); }
.notify-opt.is-wa { border-color: #25D366; }
.notify-opt.is-wa b { color: #25D366; }
.notify-opt:hover { background: var(--surface-2); }
.notify-opt.is-sms:hover { border-color: var(--teal); }
.notify-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
