/* =============================================================
   لك ولا للذيب؟ — نفس روح بقية ألعاب تكية (عتمة + خط Estedad + نفس
   المكوّنات: شريط الحساب، نوافذ الدخول/التفعيل، اللوبي) بلون هوية
   مختلف (أخضر فلوس + ذهبي)، حتى يبان إنه من نفس العائلة.
   ============================================================= */

:root {
  --bg-void: #0b1510;
  --bg-panel: #122219;
  --bg-panel-raised: #1a2e22;
  --line: #264331;
  --ink: #eef7f0;
  --ink-muted: #95b3a0;
  --ink-faint: #64806e;

  --accent: #4ade80;
  --accent-soft: #86efac;
  --gold: #f5c542;
  --gold-soft: #fcd978;
  --crimson: #c8483d;
  --crimson-soft: #de6b5f;
  --success: #4ade80;

  --font-display: "Estedad", "Arial Black", sans-serif;
  --font-body: "Estedad", "Tahoma", "Segoe UI", sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg-void); color: var(--ink); min-height: 100%; }
body {
  direction: rtl;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #06240f; }
button, input, select, textarea { font-family: inherit; }
button, a, [data-action] { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; margin: 0; text-wrap: balance; }

/* -------------------------------------------------------------
   الحاوية العامة (نفس أبعاد بقية ألعاب تكية)
   ------------------------------------------------------------- */
.app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(18px + var(--safe-top)) 18px calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 22px;
}
@media (min-width: 720px) {
  .app { max-width: 780px; padding-top: 48px; padding-bottom: 48px; gap: 26px; }
}

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.center { text-align: center; }
.grow { flex: 1; }

.wordmark, .brand {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 11vw, 3.4rem);
  color: var(--accent-soft);
  filter: drop-shadow(0 3px 0 rgba(3,20,10,0.45));
  margin-bottom: 4px;
}

.subtitle { text-align: center; color: var(--ink-muted); font-size: 0.95rem; margin-top: -10px; }
.subtitle.lg { font-size: 1.15rem; color: var(--ink); }

.tag-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.tag-chip {
  font-size: 0.82rem; font-weight: 700; color: var(--ink-muted);
  background: var(--bg-panel-raised); border: 1px solid var(--line);
  padding: 5px 13px; border-radius: 100px;
}

label.field-label, .field-label { font-size: 0.85rem; color: var(--ink-muted); }

input[type="text"], input[type="tel"], input[type="email"], input[type="password"] {
  width: 100%;
  background: var(--bg-void);
  border: 1.5px solid var(--line);
  color: var(--ink);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1.05rem;
  min-height: 52px;
}
input[type="text"]:focus, input[type="tel"]:focus, input[type="email"]:focus, input[type="password"]:focus {
  border-color: var(--accent);
}

.card {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.btn {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  border: none;
  border-radius: 100px;
  padding: 15px 26px;
  min-height: 52px;
  cursor: pointer;
  width: 100%;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:not(:disabled):active { transform: scale(0.98) translateY(1px); }
@media (hover: hover) {
  .btn:not(:disabled):hover { transform: translateY(-3px); }
  .btn.primary:not(:disabled):hover { box-shadow: 0 16px 28px -12px rgba(74,222,128,0.75); }
  .btn.secondary:not(:disabled):hover { transform: translateY(-3px); box-shadow: 0 12px 22px -14px rgba(0,0,0,0.5); }
}
.btn.primary { background: linear-gradient(180deg, var(--accent-soft), var(--accent)); color: #06240f; box-shadow: 0 10px 22px -10px rgba(74,222,128,0.6); }
.btn.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.secondary:not(:disabled):hover { border-color: var(--accent); color: var(--accent-soft); }
.btn.danger { background: linear-gradient(180deg, var(--crimson-soft), var(--crimson)); color: #2a0c09; }
.btn.ghost { background: var(--bg-panel-raised); color: var(--ink-muted); border: 1px solid var(--line); }
.btn.auto { width: auto; }
.btn.sm { padding: 10px 18px; min-height: 40px; font-size: 0.88rem; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700;
  color: var(--ink-faint); background: var(--bg-panel-raised);
  border: 1px solid var(--line); padding: 5px 13px; border-radius: 100px;
}
.pill.host { color: var(--accent-soft); border-color: rgba(74,222,128,0.45); }
.pill.correct { color: var(--success); border-color: rgba(111,174,157,0.5); }

.error-box {
  background: rgba(200,72,61,0.12);
  border: 1px solid rgba(200,72,61,0.4);
  color: var(--crimson-soft);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
}
.hint { color: var(--ink-faint); font-size: 0.82rem; line-height: 1.6; margin: 0; }

.back-x-btn {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
  color: var(--ink-muted);
  background: linear-gradient(180deg, var(--bg-panel-raised), var(--bg-panel));
  border: 1px solid var(--line);
  box-shadow: 0 5px 12px -5px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.07);
}
.back-x-btn:hover { color: var(--accent-soft); border-color: var(--accent); }

.icon-btn {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-panel); color: var(--ink-faint);
  font-size: 0.95rem; line-height: 1; cursor: pointer;
}
.icon-btn:hover { color: var(--crimson-soft); border-color: var(--crimson-soft); }

/* -------------------------------------------------------------
   شريط الحساب (فوق يمين) + نوافذ الدخول/التفعيل — مطابق لبقية تكية
   ------------------------------------------------------------- */
.account-bar { position: fixed; top: calc(14px + var(--safe-top)); right: 14px; z-index: 60; }
.account-cluster { position: relative; display: flex; align-items: center; gap: 8px; }

.account-btn {
  display: flex; align-items: center; gap: 8px; background: var(--bg-panel);
  border: 1px solid var(--line); color: var(--ink); border-radius: 100px; padding: 9px 16px;
  font-size: 0.88rem; font-weight: 700;
}
.account-btn.login { color: var(--accent-soft); border-color: rgba(74,222,128,0.4); }
.account-btn:hover { border-color: var(--accent); color: var(--accent-soft); }
.account-btn .avatar-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: 0 0 auto; }

.status-pill {
  display: flex; align-items: center; background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 100px; padding: 9px 16px; font-size: 0.88rem; font-weight: 700;
}
.status-pill.active { color: var(--success); border-color: rgba(111,174,157,0.45); }
.status-pill.free { color: var(--ink-faint); }

.account-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 61;
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: 16px; padding: 8px;
  min-width: 180px;
}
.account-menu .who-email { color: var(--ink-faint); font-size: 0.76rem; padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; word-break: break-all; }
.account-menu-item { width: 100%; text-align: right; background: none; border: none; color: var(--crimson-soft); font-weight: 700; font-size: 0.92rem; padding: 10px; border-radius: 10px; }
.account-menu-item:hover { background: var(--bg-panel-raised); }

.status-menu { min-width: 220px; padding: 14px; }
.status-detail-title { font-weight: 800; color: var(--accent-soft); font-size: 0.95rem; }
.status-detail-title.muted { color: var(--ink-faint); font-weight: 600; font-size: 0.88rem; }

.link-btn { background: none; border: none; color: var(--ink-faint); text-decoration: underline; font-size: 0.85rem; padding: 6px; }

@keyframes theeb-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-overlay {
  position: fixed; inset: 0; background: rgba(3, 10, 6, 0.74); backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center; padding: 18px; z-index: 50;
  animation: theeb-fade-up 0.2s ease both;
}
.modal-card {
  width: 100%; max-width: 480px; max-height: 82dvh; overflow-y: auto;
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: 22px; padding: 20px;
}
@media (min-width: 640px) { .modal-overlay { align-items: center; } }

.auth-switch-note { text-align: center; color: var(--ink-faint); font-size: 0.85rem; }
.auth-switch-note button { background: none; border: none; color: var(--accent-soft); font-weight: 700; text-decoration: underline; padding: 0; }

.global-toast {
  position: fixed; bottom: calc(20px + var(--safe-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--bg-panel-raised); border: 1px solid var(--line); color: var(--ink);
  padding: 10px 18px; border-radius: 100px; font-size: 0.88rem; z-index: 70;
  animation: theeb-fade-up 0.2s ease both;
}


/* =============================================================
   الغرفة — اللوبي + اللعب
   ============================================================= */
.app.wide {
  max-width: 980px;
  padding-top: calc(14px + var(--safe-top));
  padding-bottom: calc(18px + var(--safe-bottom));
  gap: 14px;
}
.room-bar { position: fixed; top: calc(14px + var(--safe-top)); right: 14px; z-index: 60; }
.back-x-btn.danger-x:hover { color: var(--crimson-soft); border-color: var(--crimson-soft); }

.home-btn {
  position: fixed; top: calc(14px + var(--safe-top)); left: 14px; z-index: 60;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-panel); border: 1px solid var(--line); color: var(--ink-muted);
  text-decoration: none;
}
.home-btn svg { width: 20px; height: 20px; }
.home-btn:hover { color: var(--accent-soft); border-color: var(--accent); }

.wolf-mark { display: block; width: 132px; height: 132px; margin: 0 auto -6px; object-fit: contain; }
.wolf-inline { width: 1.4em; height: 1.4em; vertical-align: middle; object-fit: contain; }
.brand.small { font-size: 1.5rem; margin: 0; }

.room-code-chip {
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: 0.08em;
  color: var(--accent-soft); background: var(--bg-void); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px 14px; align-self: flex-start;
}

.avatar { border-radius: 50%; background: var(--bg-panel-raised); object-fit: cover; flex: 0 0 auto; }
.avatar.sz-md { width: 46px; height: 46px; }
.avatar.sz-lg { width: 84px; height: 84px; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.avatar-option {
  position: relative; background: var(--bg-void); border: 2px solid var(--line);
  border-radius: 16px; padding: 8px; display: flex; align-items: center; justify-content: center; aspect-ratio: 1;
}
.avatar-option img { width: 100%; height: 100%; border-radius: 12px; }
.avatar-option.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74,222,128,0.25); }
.avatar-option.taken { opacity: 0.3; pointer-events: none; }
.avatar-edit-btn { background: none; border: none; padding: 0; border-radius: 50%; position: relative; flex: 0 0 auto; }
.avatar-edit-btn .avatar { box-shadow: 0 0 0 2px var(--accent); }
.avatar-edit-btn::after {
  content: "✎"; position: absolute; inset: auto -2px -2px auto; width: 18px; height: 18px;
  border-radius: 50%; background: var(--accent); color: #06240f; font-size: 0.62rem;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-panel-raised);
}

.lobby .card { max-width: 640px; margin: 0 auto; }
.player-list { display: flex; flex-direction: column; gap: 8px; }
.player-row {
  display: flex; align-items: center; gap: 10px; background: var(--bg-panel-raised);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; min-height: 64px;
}
.player-row .name { font-weight: 700; }
.player-row .meta { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.player-row .score { font-family: var(--font-display); color: var(--gold); font-weight: 800; font-size: 1rem; }
.player-row.is-manager { border-color: var(--gold); background: linear-gradient(180deg, rgba(245,197,66,0.1), rgba(245,197,66,0.03)); }
.player-row.is-out { opacity: 0.55; }
.pill.manager { color: var(--gold-soft); border-color: rgba(245,197,66,0.5); }

.btn.gold { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #2c2004; box-shadow: 0 10px 22px -12px rgba(245,197,66,0.7); }
.btn.success { background: linear-gradient(180deg, #6ee79a, #34c46a); color: #05230f; }
.btn.danger { color: #fff; }
.modal-card .row .btn, .stage .row .btn { flex: 1; }

/* ---------- رأس اللعب + شريط اللاعبين ---------- */
.game { gap: 12px; }
.game-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 50px; }
.players-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.p-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--bg-panel); border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 6px 8px;
  min-width: 0; transition: border-color 0.2s ease, transform 0.2s ease;
}
.p-card.me { background: var(--bg-panel-raised); }
.p-card.lead { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,197,66,0.18); transform: translateY(-2px); }
.p-card.withdrawn { opacity: 0.55; }
.p-card.out { opacity: 0.35; filter: grayscale(0.8); }
.p-name { font-weight: 800; font-size: 0.85rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-bal { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; color: var(--accent-soft); line-height: 1.2; }
.p-held { font-size: 0.72rem; font-weight: 700; color: var(--gold); }
.p-tag {
  font-size: 0.68rem; font-weight: 800; padding: 1px 9px; border-radius: 100px; margin-top: 2px;
  background: var(--bg-void); border: 1px solid var(--line); color: var(--ink-muted);
}
.p-tag.lead { color: #2c2004; background: var(--gold); border-color: var(--gold); }
.p-tag.out { color: var(--crimson-soft); border-color: rgba(200,72,61,0.5); }
.riyal { font-size: 0.6em; font-weight: 700; color: var(--ink-muted); }

.stage { padding: 20px; gap: 14px; }
@media (max-width: 640px) { .stage { padding: 16px 14px; } .game-head { padding: 0 48px; } }

/* ---------- التصنيف + الصعوبة ---------- */
.cat-diff { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.cat-chip {
  font-family: var(--font-display); font-weight: 900; font-size: 1rem; color: #fff;
  background: var(--cat); border-radius: 100px; padding: 5px 16px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.22);
}
.diff-chip { font-weight: 800; font-size: 0.85rem; padding: 5px 14px; border-radius: 100px; border: 1.5px solid; }
.diff-chip.easy { color: #86efac; border-color: rgba(134,239,172,0.55); background: rgba(134,239,172,0.08); }
.diff-chip.medium { color: #fcd978; border-color: rgba(252,217,120,0.55); background: rgba(252,217,120,0.08); }
.diff-chip.hard { color: #f28b82; border-color: rgba(242,139,130,0.55); background: rgba(242,139,130,0.08); }
.cat-diff.big .cat-chip { font-size: 1.5rem; padding: 8px 26px; }
.cat-diff.big .diff-chip { font-size: 1.05rem; padding: 7px 18px; }

/* ---------- الروليت ---------- */
.spin-stage { gap: 16px; }
.wheel-wrap { position: relative; width: min(78vw, 340px); aspect-ratio: 1; margin: 0 auto; }
.wheel { width: 100%; height: 100%; display: block; filter: drop-shadow(0 14px 30px rgba(0,0,0,0.5)); }
.wheel-label { fill: #fff; font-family: var(--font-display); font-weight: 900; font-size: 17px; }
.wheel-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-top: 30px solid var(--gold); filter: drop-shadow(0 3px 3px rgba(0,0,0,0.5));
}
.spin-result {
  font-family: var(--font-display); font-weight: 900; font-size: 2rem; color: #fff;
  background: var(--cat); border-radius: 100px; padding: 6px 34px; box-shadow: inset 0 -4px 0 rgba(0,0,0,0.22);
}
.spin-stage .btn { max-width: 360px; align-self: center; }
.spin-stage { align-items: center; }
#spin-below { width: 100%; align-items: center; }

/* ---------- المزايدة ---------- */
.high-bid { display: flex; flex-direction: column; align-items: center; gap: 0; }
.high-amount { font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; line-height: 1.15; color: var(--gold); }
.high-amount.muted { font-size: 1.1rem; color: var(--ink-muted); }
.high-who { font-weight: 800; font-size: 1.05rem; }
.bid-log { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.bid-log span {
  font-size: 0.78rem; color: var(--ink-muted); background: var(--bg-void); border: 1px solid var(--line);
  border-radius: 100px; padding: 2px 10px;
}
.bid-log span:first-child { color: var(--ink); border-color: rgba(245,197,66,0.5); }
.bid-log b { color: var(--gold); }

.bid-box { display: flex; flex-direction: column; gap: 12px; max-width: 460px; width: 100%; margin: 0 auto; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 12px; }
.step-btn {
  width: 64px; height: 56px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--bg-panel-raised); color: var(--ink); font-family: var(--font-display); font-weight: 900; font-size: 1.05rem;
}
.step-btn:not(:disabled):hover { border-color: var(--accent); color: var(--accent-soft); }
.step-val {
  min-width: 130px; text-align: center; font-family: var(--font-display); font-weight: 900; font-size: 2.2rem;
  color: var(--accent-soft); background: var(--bg-void); border: 1.5px solid var(--line); border-radius: 16px; padding: 2px 12px;
}
.quick-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.chip-btn {
  background: var(--bg-void); border: 1px solid var(--line); color: var(--ink-muted);
  border-radius: 100px; padding: 5px 14px; font-weight: 800; font-size: 0.85rem;
}
.chip-btn:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- السؤال ---------- */
.secret-card {
  display: flex; flex-direction: column; gap: 10px; background: var(--bg-void);
  border: 1.5px dashed rgba(245,197,66,0.55); border-radius: 16px; padding: 14px;
}
.secret-label { font-size: 0.75rem; font-weight: 800; color: var(--gold); }
.q-text { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; line-height: 1.6; text-align: center; }
.q-text.big { font-size: 1.5rem; padding: 6px 0; }
.answer-line { text-align: center; color: var(--ink-muted); }
.answer-line b { color: var(--accent-soft); }
.winner-line { text-align: center; font-size: 1.1rem; font-weight: 700; }
.winner-line b { color: var(--gold); font-family: var(--font-display); font-size: 1.3rem; }
.winner-line b.plus { color: var(--accent-soft); }
.winner-line b.minus { color: var(--crimson-soft); }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 54px;
  background: var(--bg-panel-raised); border: 1.5px solid var(--line); color: var(--ink);
  border-radius: 14px; padding: 8px 10px; font-weight: 800; font-size: 0.95rem;
}
button.opt:hover { border-color: var(--accent); }
.opt.picked { border-color: var(--gold); background: rgba(245,197,66,0.14); color: var(--gold-soft); }
.opt.correct { border-color: var(--accent); background: rgba(74,222,128,0.14); color: var(--accent-soft); }
.opts.mini .opt { min-height: 38px; font-size: 0.82rem; padding: 4px 8px; }

.timer-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.timer-num { font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; line-height: 1; }
.timer-num.low { color: var(--crimson-soft); }
.timer-bar { direction: ltr; width: 100%; max-width: 520px; height: 10px; border-radius: 100px; background: var(--bg-void); border: 1px solid var(--line); overflow: hidden; }
.timer-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); }

.judge-row .btn { font-size: 1.15rem; }
.verdict { font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; line-height: 1.2; color: var(--ink-muted); }
.verdict.win { color: var(--accent-soft); }
.verdict.lose { color: var(--crimson-soft); }
.out-banner {
  background: rgba(200,72,61,0.12); border: 1px solid rgba(200,72,61,0.4); color: var(--crimson-soft);
  border-radius: 12px; padding: 8px 14px; font-weight: 800;
}

/* ---------- النتيجة النهائية ---------- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; width: 100%; margin: 6px 0 4px; }
.podium-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 0; max-width: 140px; }
.podium-medal { font-size: 1.5rem; line-height: 1; }
.podium-slot .name { font-weight: 800; font-size: 0.9rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-score { font-family: var(--font-display); color: var(--gold); font-weight: 800; font-size: 1.1rem; }
.podium-pedestal {
  width: 100%; border-radius: 10px 10px 0 0; background: var(--bg-panel-raised);
  border: 1px solid var(--line); border-bottom: none;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 6px;
  font-family: var(--font-display); font-weight: 900; color: var(--ink-faint);
}
.podium-slot.place-1 .podium-pedestal { height: 74px; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #2c2004; }
.podium-slot.place-2 .podium-pedestal { height: 50px; }
.podium-slot.place-3 .podium-pedestal { height: 34px; }

@media (max-width: 480px) {
  .players-strip { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
  .p-card .avatar.sz-md { width: 38px; height: 38px; }
  .high-amount { font-size: 2.2rem; }
  .cat-diff.big .cat-chip { font-size: 1.25rem; }
  .step-btn { width: 56px; }
  .step-val { min-width: 110px; font-size: 1.9rem; }
  .q-text.big { font-size: 1.25rem; }
}

.final-card { max-width: 640px; margin: 0 auto; }
.opt.picked.correct { box-shadow: 0 0 0 3px rgba(245,197,66,0.55); }

/* رمز الريال السعودي */
.sar { width: 0.82em; height: 0.9em; fill: currentColor; vertical-align: -0.1em; display: inline-block; flex: 0 0 auto; }
.riyal { font-size: inherit; }
.high-amount .sar { width: 0.6em; height: 0.66em; color: var(--ink-muted); margin-inline-start: 4px; }

/* منسحب — بالأحمر عشان المدير يشوفه */
.p-tag.withdrawn { color: #fff; background: var(--crimson); border-color: var(--crimson); }
.p-card.withdrawn { opacity: 0.8; border-color: rgba(200,72,61,0.55); }

/* التصنيف + الصعوبة بعناوين (المزايدة) */
.cd-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cat-diff.big { gap: 18px; align-items: flex-end; }

/* علامة X موحّدة (shared/icons.js) — بالنص تمامًا داخل أي زر */
.x-ico { display: block; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; flex: 0 0 auto; }
.x-ico.inline { display: inline-block; width: 0.8em; height: 0.8em; vertical-align: -0.08em; }
.icon-btn, .back-x-btn, .kick-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }

.report-note { width: 100%; min-height: 90px; resize: vertical; background: var(--bg-void); border: 1.5px solid var(--line); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-family: inherit; font-size: 0.95rem; }
.report-note:focus { border-color: var(--accent); outline: none; }

/* =============================================================
   نسخة الفقرات (تجريبية)
   ============================================================= */
.lab-pill { align-self: center; font-size: 0.75rem; font-weight: 800; color: var(--gold); border: 1px dashed var(--gold); border-radius: 100px; padding: 2px 12px; }
.avatar.sz-sm { width: 30px; height: 30px; }
.avatar.sz-xs { width: 20px; height: 20px; }

.seg-list { display: flex; flex-direction: column; gap: 6px; background: var(--bg-void); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.seg-li { display: grid; grid-template-columns: 28px auto 1fr; align-items: baseline; gap: 8px; font-size: 0.88rem; }
.seg-li .muted { font-size: 0.76rem; color: var(--ink-faint); }
.seg-no { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-panel-raised); border: 1px solid var(--line); font-weight: 900; font-size: 0.8rem; color: var(--accent-soft); }

.seg-dots { display: flex; gap: 6px; direction: rtl; }
.seg-dot { width: 26px; height: 6px; border-radius: 100px; background: var(--line); }
.seg-dot.done { background: var(--accent); }
.seg-dot.now { background: var(--gold); }
.pot-chip { font-weight: 900; color: #2c2004; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); border-radius: 100px; padding: 4px 16px; }
.pot-big { font-family: var(--font-display); font-weight: 900; font-size: 3rem; color: var(--gold); line-height: 1.1; }

.seg-intro { padding: 18px 0; }
.seg-intro-no { font-weight: 800; color: var(--ink-muted); letter-spacing: 0.04em; }
.seg-intro-title { font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; color: var(--accent-soft); margin: 0; }
.turn-me { color: var(--gold); }

.p-tag.ok { color: #05230f; background: var(--accent); border-color: var(--accent); }
.p-bal small { font-size: 0.6em; color: var(--ink-muted); font-weight: 700; }
.q-value { text-align: center; font-weight: 700; color: var(--ink-muted); }
.q-value b { font-family: var(--font-display); color: var(--gold); font-size: 1.25em; }
.q-value.big { font-size: 1.2rem; }
.q-value.big b { font-size: 1.6em; }
.mystery { font-family: var(--font-display); color: var(--gold); }
.opt.wrong { border-color: var(--crimson); background: rgba(200,72,61,0.14); color: var(--crimson-soft); }
.opt { position: relative; flex-direction: column; gap: 4px; }
.opt-who { display: flex; gap: 2px; justify-content: center; flex-wrap: wrap; }
.rank-list { width: 100%; max-width: 480px; margin: 0 auto; }
.rank-no { width: 24px; font-family: var(--font-display); font-weight: 900; color: var(--ink-muted); text-align: center; }

/* ---------- بطاقات الحظ ---------- */
.luck-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; perspective: 900px; }
@media (max-width: 560px) {
  .luck-grid { grid-template-columns: repeat(6, 1fr); gap: 5px; }
  .luck-back { font-size: 1.05rem; border-radius: 9px; }
  .luck-front { border-radius: 9px; }
  .luck-val { font-size: 0.82rem; }
  .luck-val.big { font-size: 0.95rem; }
  .luck-val.zero { font-size: 0.55rem; }
  .luck-front small { display: none; }
  .luck-back .avatar.sz-sm { width: 22px; height: 22px; }
}
.luck-card { position: relative; aspect-ratio: 3 / 4; border: none; background: none; padding: 0; cursor: default; }
.luck-card.pickable { cursor: pointer; }
.luck-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(.3,1.4,.5,1); }
.luck-card.flipped .luck-inner { transform: rotateY(180deg); }
.luck-back, .luck-front {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-weight: 900;
}
.luck-back {
  background: repeating-linear-gradient(135deg, #1f5c3a, #1f5c3a 8px, #257045 8px, #257045 16px);
  border: 2px solid rgba(74,222,128,0.35); color: rgba(255,255,255,0.7); font-family: var(--font-display); font-size: 1.6rem;
}
.luck-card.pickable .luck-back { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(245,197,66,0.25); }
@media (hover: hover) { .luck-card.pickable:hover .luck-inner { transform: translateY(-4px); } }
.luck-card.taken .luck-back { background: var(--bg-panel-raised); border-color: var(--line); }
.luck-front { transform: rotateY(180deg); background: var(--bg-panel-raised); border: 2px solid var(--own, var(--line)); }
.luck-front small { font-size: 0.62rem; color: var(--ink-muted); font-weight: 700; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.luck-val { font-family: var(--font-display); font-size: 1.25rem; color: var(--accent-soft); }
.luck-val.big { color: var(--gold); font-size: 1.45rem; }
.luck-val.zero { font-size: 0.8rem; color: var(--crimson-soft); }
.luck-card.unpicked .luck-front { opacity: 0.45; }

/* ---------- تعديلات جولة ٢ ---------- */
/* بطاقات الحظ أصغر (فيها رقم بس) */
.luck-grid { grid-template-columns: repeat(8, 1fr); width: 100%; max-width: 560px; align-self: center; gap: 7px; }
.luck-card { aspect-ratio: 4 / 5; }
.luck-back { font-size: 1.1rem; border-radius: 10px; }
.luck-front { border-radius: 10px; gap: 2px; }
.luck-val { font-size: 0.95rem; }
.luck-val.big { font-size: 1.05rem; }
.luck-val.zero { font-size: 1rem; }
.luck-card.mine .luck-back { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #2c2004; border-color: var(--gold); }
.luck-card.mine .luck-front { border-color: var(--gold); }
.luck-who { display: flex; gap: 1px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 560px) {
  .luck-grid { grid-template-columns: repeat(6, 1fr); gap: 5px; }
  .luck-val { font-size: 0.8rem; }
  .luck-who .avatar.sz-xs { width: 14px; height: 14px; }
}

/* الشريط ينسحب بنعومة */
.timer-fill { transition: width 0.22s linear; }
.timer-box.bar-only .timer-bar { max-width: 320px; height: 6px; }

/* ربح/خسارة المزايدة */
.profit { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; direction: ltr; display: inline-block; }
.profit.up { color: var(--accent); }
.profit.down { color: var(--crimson-soft); }

.get-ready { text-align: center; font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; color: var(--gold); padding: 26px 0; }

/* ---------- تعديلات جولة ٣ ---------- */
/* كل مبلغ معه شعار الريال */
.amt { display: inline-flex; align-items: baseline; gap: 0.12em; white-space: nowrap; }
.amt .sar { width: 0.72em; height: 0.8em; }
.luck-val .amt .sar { width: 0.62em; height: 0.7em; opacity: 0.85; }
.step-val .amt .sar, .p-bal .amt .sar { width: 0.62em; height: 0.7em; opacity: 0.8; }
/* ظهر البطاقة: شعار الذيب بألوان */
.luck-back { background: #161d27; border-color: rgba(255,255,255,0.08); padding: 10%; position: relative; }
.luck-wolf { width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.luck-back.wolf-grey { background: #1c2622; } .luck-back.wolf-sand { background: #2a2418; }
.luck-back.wolf-red { background: #2a1a1a; } .luck-back.wolf-blue { background: #172233; }
.luck-back.wolf-purple { background: #231b30; } .luck-back.wolf-teal { background: #13292a; }
.luck-back.wolf-pink { background: #2b1826; } .luck-back.wolf-orange { background: #2b1f16; }
.luck-card.mine .luck-back { background: #2c2410; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(245,197,66,0.3); }
.luck-check { position: absolute; top: 3px; inset-inline-end: 4px; font-size: 0.8rem; color: #2c2004; background: var(--gold); border-radius: 100px; width: 1.25em; height: 1.25em; display: grid; place-items: center; }
/* البرق (التجميع) */
.p-name-row { display: flex; align-items: center; gap: 3px; max-width: 100%; min-width: 0; }
.bolt { color: #facc15; font-size: 0.95rem; line-height: 1; filter: drop-shadow(0 0 6px rgba(250,204,21,0.7)); animation: bolt-shake 2.6s ease-in-out infinite; display: inline-block; transform-origin: 50% 60%; }
@keyframes bolt-shake {
  0%, 18%, 100% { transform: rotate(0) translateX(0); }
  3% { transform: rotate(-14deg) translateX(-1px); } 6% { transform: rotate(12deg) translateX(1px); }
  9% { transform: rotate(-10deg); } 12% { transform: rotate(8deg); } 15% { transform: rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) { .bolt { animation: none; } }
.p-tag.bolt-tag { color: #facc15; border-color: rgba(250,204,21,0.55); background: rgba(250,204,21,0.1); }
.bolt-text { color: #facc15; }
.streak { font-size: 0.8rem; line-height: 1; }
/* الفصّال */
.tb-banner { align-self: center; font-weight: 900; font-size: 1rem; padding: 4px 14px; border-radius: 100px; background: rgba(245,197,66,0.12); border: 1px solid rgba(245,197,66,0.45); color: var(--gold); }
/* البطاقة المختارة تبرز (مو باهتة)، والباقي بإطار هادي */
.luck-card:disabled { opacity: 1; }
.luck-card.pickable .luck-back { border-color: rgba(255,255,255,0.14); box-shadow: none; }
@media (hover: hover) { .luck-card.pickable:hover .luck-back { border-color: var(--gold); } }
.luck-card.mine .luck-back { border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(245,197,66,0.35), 0 0 14px rgba(245,197,66,0.35); }
.luck-card.mine .luck-inner { transform: translateY(-3px); }
.luck-card.mine.flipped .luck-inner { transform: rotateY(180deg); }
.luck-check { font-size: 0.85rem; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
