/**
 * لُمعة — بيت الألعاب الأصلية. هادئ، ليس باحة الألعاب المجانية.
 */
:root {
  --ink: #0c0b10;
  --ink-2: #14131a;
  --panel: #16141c;
  --line: rgba(212, 184, 122, 0.12);
  --text: #efe8d8;
  --muted: #9a9386;
  --gold: #d4b87a;
  --accent: #c4a46a;
  --night-layl: #3d4a7a;
  --night-qamar: #c9c4b0;
  --night-ward: #a85a6a;
  --night-raml: #b08a4a;
  --sans: "IBM Plex Sans Arabic", "Tajawal", system-ui, sans-serif;
  --serif: "Noto Naskh Arabic", "Fraunces", serif;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(212, 184, 122, 0.08), transparent 55%),
    var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
}
h1, h2 { font-family: var(--serif); font-weight: 700; line-height: 1.3; margin: 0; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: #ead7a4; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-end: 1rem;
  z-index: 20;
  background: var(--gold);
  color: #1a140c;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 700;
}
.skip-link:focus { inset-block-start: 1rem; }

.wrap { width: min(100% - 2rem, 40rem); margin: 0 auto; padding: 2.4rem 0 4rem; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.4rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
}
.brand img { width: 2.2rem; height: 2.2rem; border-radius: 0.6rem; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.25rem; }
.brand em { display: block; font-style: normal; color: var(--muted); font-size: 0.78rem; }
.top a.quiet { color: var(--muted); font-size: 0.85rem; }

.hero h1 { font-size: clamp(2.4rem, 8vw, 3.6rem); margin: 0 0 0.5rem; }
.hero p { margin: 0 0 1.6rem; color: var(--muted); max-width: 34ch; }

.sig {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  color: inherit;
}
.sig:hover { border-color: rgba(212, 184, 122, 0.35); color: inherit; }
.sig span { display: block; color: var(--gold); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; margin-bottom: 0.35rem; }
.sig h2 { font-size: 1.8rem; margin-bottom: 0.35rem; }
.sig p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.sig strong { display: inline-block; margin-top: 1rem; color: var(--gold); }

.note { margin-top: 2rem; color: var(--muted); font-size: 0.85rem; }
.foot { margin-top: 2.4rem; display: flex; gap: 1.4rem; font-size: 0.85rem; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  cursor: pointer;
}
.btn--primary { background: var(--gold); color: #1a140c; border-color: transparent; font-weight: 700; }
.btn--ghost { color: var(--muted); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.pick { display: flex; flex-direction: column; gap: 0.7rem; }
.pick button, .pick a.mode {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.pick button strong, .pick a.mode strong { font-family: var(--serif); font-size: 1.15rem; }
.pick button span, .pick a.mode span { color: var(--muted); font-size: 0.88rem; }

.seats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.seat {
  flex: 1 1 6.5rem;
  min-width: 6.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.55rem 0.75rem;
  background: var(--ink-2);
  font-size: 0.88rem;
}
.seat.is-on { border-color: var(--gold); background: rgba(212, 184, 122, 0.08); }
.seat small { display: block; color: var(--muted); font-size: 0.72rem; }

.thread {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.1rem;
  margin-bottom: 1rem;
}
.thread__meta { display: flex; justify-content: space-between; gap: 0.6rem; color: var(--muted); font-size: 0.8rem; margin-bottom: 0.7rem; }
.thread__bar { display: flex; height: 0.4rem; overflow: hidden; border-radius: 99px; background: var(--ink); margin-bottom: 0.9rem; }
.thread__bar i { flex: 1; border-inline-end: 1px solid var(--panel); }
.thread__bar i.is-on { background: var(--gold); }
.thread__bar i.is-goal { background: rgba(212, 184, 122, 0.18); }
.thread__cards { display: flex; justify-content: center; min-height: 7.2rem; overflow-x: auto; }
.thread__empty { text-align: center; color: var(--muted); padding: 2rem 0; }

.card {
  position: relative;
  width: 4.6rem;
  height: 7rem;
  flex-shrink: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: inherit;
  font: inherit;
  text-align: start;
}
.card + .card { margin-inline-start: -1.3rem; }
.hand .card + .card { margin-inline-start: 0.4rem; }
.card.is-on { border-color: var(--gold); background: #1d1a14; }
.card.is-dim { opacity: 0.38; }
.card__night { font-size: 0.68rem; color: var(--muted); }
.card__w { font-family: var(--serif); font-size: 1.7rem; line-height: 1; }
.card__mood { font-size: 0.75rem; font-weight: 600; }
.card--layl { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--night-layl) 45%, transparent); }
.card--qamar { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--night-qamar) 35%, transparent); }
.card--ward { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--night-ward) 40%, transparent); }
.card--raml { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--night-raml) 40%, transparent); }

.hand { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.4rem; margin-bottom: 0.8rem; }
.acts { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.event { color: var(--gold); font-size: 0.85rem; text-align: center; margin: 0.6rem 0; }
.over { text-align: center; padding: 1.4rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.over h2 { margin-bottom: 0.4rem; }
.setup { display: flex; flex-direction: column; gap: 0.6rem; }
.setup input {
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
}
.nums { display: flex; gap: 0.4rem; }
.nums button { width: 2.6rem; height: 2.6rem; }
.nums button.is-on { border-color: var(--gold); background: rgba(212, 184, 122, 0.1); }
