/* ===== טוקנים ===== */
:root {
  --font: Heebo, "Segoe UI", Arial, sans-serif;
  --display: "Frank Ruhl Libre", "David", Georgia, serif;
  /* עיצוב יוקרתי: כחול לילה וזהב */
  --gold: #d9b562;
  --gold-2: #b38a3a;
  --gold-grad: linear-gradient(180deg, #f8e3a3 0%, #ddb65f 50%, #b5863a 100%);
  --on-gold: #1b1405;
  --bg: #060a18;
  --panel: #0e1530;
  --panel-2: #141c3c;
  --field: #0a1027;
  --line: #243057;
  --line-gold: rgba(217, 181, 98, .4);
  --ink: #f5f1e6;
  --mut: #a3aac4;
  --accent: #e5c77c;
  --ok: #3fcf8e;
  --bad: #ff6b6b;
  /* צבעי התשובות: גוונים עמוקים (אודם, אמרלד, ענבר, ספיר) */
  --o1: #e2566c;
  --o2: #2fb88c;
  --o3: #e9b44c;
  --o4: #5a8bec;
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 55%);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 18px 40px rgba(0, 0, 0, .4);
  --r: 18px;
  color-scheme: dark;
}
/* מצב בהיר (לפי בחירה בלוח הבקרה): שנהב וזהב */
:root[data-theme="light"] {
  --gold: #c29a45; --gold-2: #9c7428; --bg: #f5efe2; --panel: #fffcf5; --panel-2: #f4ecdc; --field: #fffdf8;
  --line: #e3d5b6; --line-gold: rgba(156, 116, 40, .4); --ink: #131a33; --mut: #5d6176; --accent: #8c6a1f;
  --ok: #17885a; --bad: #c0392b; --sheen: none; --shadow: 0 1px 2px rgba(60, 45, 10, .06), 0 12px 30px rgba(60, 45, 10, .08);
  color-scheme: light;
}
/* מסכי כניסה, מנחה ומשתתף תמיד כהים */
body.host, body.play, body.auth {
  --gold: #d9b562; --gold-2: #b38a3a; --bg: #060a18; --panel: #0e1530; --panel-2: #141c3c; --field: #0a1027;
  --line: #243057; --line-gold: rgba(217, 181, 98, .4); --ink: #f5f1e6; --mut: #a3aac4; --accent: #e5c77c;
  --ok: #3fcf8e; --bad: #ff6b6b; --sheen: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 55%);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 18px 40px rgba(0, 0, 0, .4); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.55; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.mut { color: var(--mut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== כפתורים ושדות ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .6rem 1.1rem; border-radius: 11px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--gold-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, #7a58f5, #c04cf0); border-color: var(--gold-2); color: var(--on-gold); font-weight: 800; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: .35rem .75rem; font-size: .9rem; border-radius: 9px; }
.btn.block { width: 100%; padding: .85rem 1rem; font-size: 1.05rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg, .ic { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .35rem; }
.field > small { display: block; color: var(--mut); margin-top: .3rem; }
.in, .field input, .field select, .field textarea, select.in, textarea.in {
  width: 100%; padding: .7rem .85rem; border-radius: 11px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink);
}
textarea.in, .field textarea { resize: vertical; min-height: 5.5rem; }
.in:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold-2); outline: 2px solid color-mix(in srgb, var(--gold) 45%, transparent); outline-offset: 0; }
.err { color: #ff9aa8; min-height: 1.4em; font-size: .95rem; margin: .25rem 0 .5rem; }
body.dash .err { color: var(--bad); }

.badge { display: inline-block; padding: .1rem .6rem; border-radius: 99px; font-size: .8rem; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); color: var(--mut); }
.badge.gold { background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.badge.ok { color: var(--ok); }
.badge.bad { color: var(--bad); }

.toasts { position: fixed; inset-inline: 0; bottom: 1.2rem; display: grid; justify-items: center; gap: .5rem; z-index: 100; pointer-events: none; padding: 0 1rem; }
.toast { background: #1a1d4a; color: #f2f3ff; padding: .7rem 1.1rem; border-radius: 11px; border: 1px solid #3a4090; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); max-width: 28rem; }
.toast.bad { border-color: var(--bad); }
.toast.ok { border-color: var(--ok); }

/* ===== כניסה ===== */
body.auth { min-height: 100vh; background: radial-gradient(900px 520px at 85% 10%, #5b2ea6aa 0%, transparent 60%), radial-gradient(800px 500px at 10% 100%, #0f8f8a66 0%, transparent 60%), #080a1f; }
.auth-wrap {
  min-height: 100vh; max-width: 1240px; margin: 0 auto; padding: 2rem 1.5rem;
  display: grid; grid-template-columns: minmax(0, 28rem) minmax(0, 1fr); grid-template-areas: "card hero"; gap: 4rem; align-items: center;
}
.auth-hero { grid-area: hero; }
.auth-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.12; color: var(--ink); max-width: 16ch; text-wrap: balance; background: linear-gradient(100deg, #ffffff 20%, #8ff0dd 60%, #b9a8ff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-hero .lead { margin-top: 1.1rem; color: var(--mut); font-size: 1.15rem; max-width: 34rem; }
.auth-card { grid-area: card; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 2rem 1.75rem 1.5rem; }
.brand-mark { display: grid; justify-items: center; gap: .35rem; text-align: center; margin-bottom: 1.5rem; color: #8ff0dd; }
.brand-mark svg { width: 3.2rem; height: 3.2rem; }
.brand-mark strong { font-family: var(--display); font-weight: 400; font-size: 1.9rem; color: var(--ink); line-height: 1; }
.brand-mark small { color: var(--mut); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #0b0d28; border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 1.4rem; }
.tab { border: 0; background: transparent; padding: .6rem; border-radius: 9px; font-weight: 700; cursor: pointer; color: var(--mut); }
.tab[aria-selected="true"] { background: var(--gold); color: var(--on-gold); }
.pw { position: relative; }
.pw input { padding-inline-end: 2.9rem; }
.pw button { position: absolute; inset-inline-end: .35rem; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: .45rem; cursor: pointer; color: var(--mut); border-radius: 8px; }
.pw button svg { width: 1.3rem; height: 1.3rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.check { display: flex; align-items: center; gap: .55rem; color: var(--mut); margin: .2rem 0 1.2rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--gold); }
.auth-links { display: grid; gap: .45rem; justify-items: center; margin-top: 1.2rem; font-size: .95rem; }
.note { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; color: var(--mut); font-size: .92rem; margin-top: .8rem; }

/* במה עם פודיום (כניסה וסיום משחק) */
.stage {
  direction: ltr; position: relative; margin-top: 2.2rem; max-width: 30rem; aspect-ratio: 4 / 2.5; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 22%, #f0d58f55 0 1.5px, transparent 2px),
    radial-gradient(circle at 78% 30%, #f0d58f55 0 1.5px, transparent 2px),
    radial-gradient(circle at 62% 14%, #f0d58f44 0 1px, transparent 1.5px),
    radial-gradient(circle at 34% 40%, #f0d58f44 0 1px, transparent 1.5px),
    radial-gradient(circle at 90% 62%, #f0d58f44 0 1px, transparent 1.5px),
    radial-gradient(circle at 8% 70%, #f0d58f44 0 1px, transparent 1.5px),
    linear-gradient(180deg, #121a3c, #070b1a);
  display: flex; align-items: flex-end; justify-content: center; gap: 4%; padding: 0 8%;
}
.stage::before { content: ""; position: absolute; inset: 0; background: conic-gradient(from 160deg at 50% -12%, transparent 0deg, #f0d58f1f 10deg, #f0d58f3d 20deg, #f0d58f1f 30deg, transparent 40deg, transparent 360deg); pointer-events: none; }
.pod { position: relative; flex: 1; display: grid; justify-items: center; align-content: end; text-align: center; }
.pod .nm { font-weight: 700; font-size: .95rem; color: var(--ink); }
.pod .sc { font-size: .72rem; color: var(--mut); margin-bottom: .35rem; direction: rtl; }
.pod .blk { width: 100%; border-radius: 8px 8px 0 0; display: grid; place-items: center; font-family: var(--display); font-size: 1.8rem; color: #080a1f; }
.pod.p1 .blk { height: 5.4rem; background: linear-gradient(180deg, #f8e3a3, #d9b562 55%, #a97c30); }
.pod.p2 .blk { height: 3.6rem; background: linear-gradient(180deg, #f4f6fa, #b9c1d0 55%, #7d879b); }
.pod.p3 .blk { height: 2.6rem; background: linear-gradient(180deg, #f1c29a, #c98552 55%, #8a5228); }
.pod .crown { width: 1.8rem; height: 1.8rem; fill: #ffd04a; margin-bottom: .1rem; }

/* ===== דשבורד ===== */
body.dash { background: var(--bg); }
.shell { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--panel); border-inline-end: 1px solid var(--line); padding: 1.1rem .9rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.1rem; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); padding: .2rem .4rem; }
.brand .logo { color: var(--accent); display: grid; }
.brand .logo svg { width: 2.2rem; height: 2.2rem; }
.brand strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.45rem; line-height: 1.1; }
.brand small { color: var(--mut); font-size: .78rem; }
.nav { display: grid; gap: .2rem; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border-radius: 11px; text-decoration: none; color: var(--ink); font-weight: 600; }
.nav a:hover { background: var(--panel-2); }
.nav a[aria-current="page"] { background: color-mix(in srgb, var(--gold) 24%, transparent); color: var(--ink); box-shadow: inset 3px 0 0 var(--gold-2); }
[dir="rtl"] .nav a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--gold-2); }
.nav .sep { height: 1px; background: var(--line); margin: .5rem .4rem; }
.side-foot { margin-top: auto; color: var(--mut); font-size: .85rem; padding: .4rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: .8rem; padding: .85rem 1.5rem; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 20; }
/* הכותרת הנראית היא זו שבראש הדף; הכותרת בסרגל נשארת לקוראי מסך */
.top h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top .who { color: var(--mut); font-weight: 600; margin-inline-start: auto; }
.top .menu-btn { display: none; }
.side-scrim { display: none; }
.view { padding: 1.6rem 1.5rem 4rem; max-width: 74rem; width: 100%; margin: 0 auto; outline: none; }
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.page-h h2 { font-size: 1.55rem; font-weight: 800; }
.page-h p { color: var(--mut); margin-top: .15rem; }
.acts { display: flex; gap: .55rem; flex-wrap: wrap; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; }
.card + .card { margin-top: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: 1rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--mut); }
.empty h3 { color: var(--ink); font-size: 1.15rem; margin-bottom: .35rem; }
.empty .btn { margin-top: 1rem; }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1.3rem; border-radius: var(--r); background: linear-gradient(100deg, #1c1850, #7a2fa8); color: #f2f3ff; border: 1px solid #6a55d8; margin-bottom: 1.2rem; }
.banner strong { font-size: 1.2rem; font-family: var(--display); font-weight: 400; color: #8ff0dd; }
.banner p { color: #e4e0ff; margin-top: .1rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.2rem; }
.stat b { display: block; font-size: 2rem; font-family: var(--display); font-weight: 400; line-height: 1.1; }
.stat span { color: var(--mut); font-size: .92rem; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.quick a, .quick button { text-align: start; display: grid; gap: .25rem; padding: 1.1rem 1.2rem; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--ink); cursor: pointer; }
.quick a:hover, .quick button:hover { border-color: var(--gold-2); }
.quick .ic { color: var(--accent); width: 1.6rem; height: 1.6rem; }
.quick b { font-size: 1.05rem; }
.quick span { color: var(--mut); font-size: .92rem; }

.qcard { display: flex; flex-direction: column; gap: .6rem; }
.qcard h3 { font-size: 1.12rem; font-weight: 800; line-height: 1.3; }
.qcard p { color: var(--mut); font-size: .93rem; flex: 1; }
.qcard .meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.qcard .row { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .3rem; }
.chips { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: .8rem; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: .3rem .9rem; cursor: pointer; font-weight: 600; font-size: .92rem; }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold-2); color: var(--on-gold); }
.filters { margin-bottom: 1.2rem; }
.filters .lbl { display: inline-block; color: var(--mut); font-weight: 700; margin-inline-end: .4rem; }
.note-bar { background: color-mix(in srgb, var(--gold) 16%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); border-radius: 11px; padding: .7rem 1rem; margin-bottom: 1.1rem; font-size: .93rem; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: .7rem .8rem; text-align: start; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--mut); font-size: .86rem; font-weight: 700; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }

.list { display: grid; }
.list .li { display: flex; align-items: center; gap: .8rem; padding: .75rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list .li:last-child { border-bottom: 0; }
.list .li .grow { flex: 1; min-width: 10rem; }
.list .li b { font-weight: 700; }

/* עורך */
.ed-meta { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 1rem; }
.ed-meta .wide { grid-column: 1 / -1; }
.qedit { margin-top: 1rem; padding: 1rem 1.1rem; }
.qedit-h { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.qedit-h b { font-size: 1.05rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--panel); padding: .3rem .8rem; cursor: pointer; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }
.qedit-h .sp { margin-inline-start: auto; display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.icon-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: .35rem; cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { border-color: var(--gold-2); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn svg { width: 1.1rem; height: 1.1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.opt-row { display: flex; align-items: center; gap: .6rem; margin-top: .55rem; }
.opt-row .dot { width: .9rem; height: .9rem; border-radius: 50%; flex: none; }
.opt-row input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--ok); flex: none; }
.opt-row .in { flex: 1; }
.opt-row:nth-child(1) .dot, .opt-row.o0 .dot { background: var(--o1); }
.opt-row.o1 .dot { background: var(--o2); }
.opt-row.o2 .dot { background: var(--o3); }
.opt-row.o3 .dot { background: var(--o4); }
.hint { color: var(--mut); font-size: .88rem; margin-top: .5rem; }
.savebar { position: sticky; bottom: 0; background: var(--panel); border-top: 1px solid var(--line); padding: .7rem 1.5rem; margin: 1.5rem -1.5rem -4rem; display: flex; gap: .6rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }

/* מודאל */
.scrim { position: fixed; inset: 0; background: rgba(6, 7, 25, .6); display: grid; place-items: center; padding: 1rem; z-index: 60; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; width: min(100%, 34rem); max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.modal.wide { width: min(100%, 46rem); }
.modal h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: .3rem; }
.modal .sub { color: var(--mut); margin-bottom: 1rem; }
.modal .foot { display: flex; gap: .6rem; justify-content: flex-start; margin-top: 1.1rem; flex-wrap: wrap; }
.pv { display: grid; gap: .8rem; margin-top: .6rem; }
.pv .q { padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); }
.pv ol { margin: .4rem 0 0; padding-inline-start: 1.4rem; color: var(--mut); }
.pv li.right { color: var(--ok); font-weight: 700; }

/* דוחות */
.bars { display: grid; gap: .45rem; margin-top: .6rem; }
.bar { display: grid; grid-template-columns: minmax(6rem, 14rem) 1fr 3.2rem; gap: .7rem; align-items: center; font-size: .92rem; }
.bar .track { height: .8rem; background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--gold); }
.bar.right .fill { background: var(--ok); }
.bar .lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .n { color: var(--mut); text-align: end; }

/* ===== מסך מנחה ===== */
body.host { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(1100px 560px at 50% -12%, rgba(217, 181, 98, .14), transparent 60%), radial-gradient(1200px 700px at 50% 120%, rgba(90, 139, 236, .08), transparent 60%), linear-gradient(180deg, #0a1129, #050814); }
.h-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.6rem; color: var(--mut); font-weight: 700; font-size: 1.05rem; }
.h-top .t { color: var(--ink); font-size: 1.15rem; }
.h-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 1rem 2rem 1.5rem; max-width: 1300px; width: 100%; margin: 0 auto; gap: 1.4rem; }
.h-ctl { display: flex; gap: .7rem; justify-content: center; padding: 1rem; border-top: 1px solid var(--line); background: rgba(4, 7, 18, .85); flex-wrap: wrap; }
.h-ctl .btn { padding: .8rem 1.6rem; font-size: 1.1rem; }
.conn { background: var(--bad); color: #fff; text-align: center; padding: .35rem; font-weight: 700; }

.join-box { text-align: center; display: grid; gap: .9rem; justify-items: center; }
.join-box h1 { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 4vw, 3rem); }
.join-how { display: flex; gap: 1.2rem 2.6rem; flex-wrap: wrap; justify-content: center; color: var(--mut); font-size: 1.2rem; }
.join-how b { color: var(--ink); direction: ltr; unicode-bidi: isolate; }
.pin { font-family: var(--display); font-size: clamp(3.4rem, 11vw, 8rem); color: var(--gold); letter-spacing: .12em; direction: ltr; line-height: 1; padding: .2em .4em; background: var(--sheen), var(--panel); border: 1px solid var(--line-gold); border-radius: 22px; box-shadow: 0 0 50px rgba(217, 181, 98, .15), inset 0 1px 0 rgba(255, 255, 255, .06); text-shadow: 0 0 30px rgba(217, 181, 98, .35); }
.people { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; max-width: 60rem; min-height: 3rem; }
.person { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: .3rem .4rem .3rem 1rem; font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; }
.person button { border: 0; background: transparent; color: var(--mut); cursor: pointer; border-radius: 50%; width: 1.5rem; height: 1.5rem; line-height: 1; }
.person button:hover { color: var(--bad); }
.person.ph { border-color: var(--o2); }

.h-q { font-size: clamp(1.8rem, 3.8vw, 3.2rem); font-weight: 800; line-height: 1.25; text-align: center; }
.h-meter { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; color: var(--mut); font-weight: 700; font-size: 1.15rem; }
.h-meter .track { height: 14px; background: var(--panel-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.h-meter .fill { height: 100%; background: var(--gold-grad); transition: width .25s linear; }
.h-meter .tm { font-family: var(--display); font-size: 1.7rem; color: var(--gold); min-width: 2.2ch; text-align: center; }
.h-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.h-opt { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; border-radius: 18px; background: var(--sheen), var(--panel); border: 1px solid color-mix(in srgb, var(--oc) 55%, var(--line)); box-shadow: inset -6px 0 0 var(--oc), var(--shadow); font-size: clamp(1.2rem, 2.6vw, 2rem); font-weight: 700; overflow: hidden; }
.h-opt .no { background: var(--oc); color: #080a1f; border-radius: 10px; min-width: 2.2em; text-align: center; font-family: var(--display); padding: .05em .3em; }
.h-opt .cnt { margin-inline-start: auto; font-family: var(--display); font-size: 1.5em; color: var(--oc); }
.h-opt .share { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--oc); opacity: .16; }
.h-opt.right { background: linear-gradient(180deg, #11402e, #0b2c20); border-color: var(--ok); box-shadow: inset -6px 0 0 var(--ok), 0 0 30px rgba(63, 207, 142, .2); }
.h-opt.dim { opacity: .4; }
.h-opt.right .no { background: var(--ok); }
.oc0 { --oc: var(--o1); } .oc1 { --oc: var(--o2); } .oc2 { --oc: var(--o3); } .oc3 { --oc: var(--o4); }
.h-board { background: var(--sheen), var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 1rem 1.4rem; }
.h-board h3 { font-size: 1.15rem; color: var(--mut); margin-bottom: .5rem; }
.h-row { display: grid; grid-template-columns: 2.2rem 1fr auto auto; gap: .8rem; align-items: center; padding: .35rem 0; font-size: 1.3rem; font-weight: 700; }
.h-row .rk { color: var(--gold); font-family: var(--display); }
.h-row .gain { color: var(--ok); font-size: .95rem; }
.h-row .sc { direction: ltr; }
.end-title { text-align: center; font-family: var(--display); font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 400; }
body.host .stage { max-width: 40rem; margin-inline: auto; width: 100%; }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
body.host .pod .blk, body.host .pod .nm, body.host .pod .sc { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
body.host .pod.p3 .blk { animation-delay: .1s; } body.host .pod.p2 .blk { animation-delay: .5s; } body.host .pod.p1 .blk { animation-delay: .9s; }
body.host .pod.p3 .nm, body.host .pod.p3 .sc { animation-delay: .1s; } body.host .pod.p2 .nm, body.host .pod.p2 .sc { animation-delay: .5s; } body.host .pod.p1 .nm, body.host .pod.p1 .sc { animation-delay: .9s; }
body.host .pod .nm { font-size: 1.2rem; }

/* ===== מסך משתתף ===== */
body.play { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(700px 420px at 50% -8%, rgba(217, 181, 98, .14), transparent 65%), linear-gradient(180deg, #0a1129, #050814); }
.p-bar { display: flex; justify-content: space-between; padding: .8rem 1rem; color: var(--mut); font-weight: 700; }
.p-wrap { flex: 1; display: flex; flex-direction: column; padding: .5rem 1rem 1.5rem; gap: 1rem; max-width: 34rem; width: 100%; margin: 0 auto; }
.p-center { margin: auto 0; text-align: center; display: grid; gap: .8rem; justify-items: center; }
.p-center h1 { font-family: var(--display); font-weight: 400; font-size: 2.1rem; }
.p-center .big { font-family: var(--display); font-size: 3.2rem; color: var(--gold); line-height: 1.1; }
.p-q { font-size: 1.5rem; font-weight: 800; line-height: 1.3; text-align: center; }
.p-timer { height: 10px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.p-timer i { display: block; height: 100%; background: var(--gold-grad); transition: width .25s linear; }
.p-opts { display: grid; gap: .75rem; }
.p-opt { display: flex; align-items: center; gap: .9rem; min-height: 4.6rem; padding: .8rem 1.1rem; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--oc) 60%, var(--line)); box-shadow: inset -6px 0 0 var(--oc); background: var(--sheen), var(--panel); color: var(--ink); font-size: 1.25rem; font-weight: 700; text-align: start; cursor: pointer; width: 100%; }
.p-opt .no { background: var(--oc); color: #080a1f; border-radius: 10px; min-width: 2.1em; text-align: center; font-family: var(--display); }
.p-opt:active { transform: scale(.985); }
.p-opt:disabled { cursor: default; opacity: .5; }
.p-opt.mine { opacity: 1; background: color-mix(in srgb, var(--oc) 22%, var(--panel)); border-color: var(--oc); }
.p-opt.right { opacity: 1; background: linear-gradient(180deg, #11402e, #0b2c20); border-color: var(--ok); box-shadow: inset -6px 0 0 var(--ok); }
.p-opt.wrong { opacity: 1; border-color: var(--bad); }
.p-res { text-align: center; padding: 1rem; border-radius: 16px; border: 2px solid var(--line); background: var(--panel); display: grid; gap: .2rem; }
.p-res.ok { border-color: var(--ok); }
.p-res.bad { border-color: var(--bad); }
.p-res b { font-family: var(--display); font-weight: 400; font-size: 2rem; }
.p-res.ok b { color: var(--ok); }
.p-res.bad b { color: var(--bad); }
.p-foot { display: flex; justify-content: space-between; color: var(--mut); font-weight: 700; padding-top: .3rem; }
.p-wait { text-align: center; color: var(--mut); font-weight: 700; padding: .4rem; }
.p-join { display: grid; gap: .8rem; width: 100%; }
.p-join input { text-align: center; font-size: 1.4rem; padding: .9rem; }
.p-join .pinin { font-family: var(--display); letter-spacing: .25em; direction: ltr; }

/* ===== רספונסיב ===== */
@media (max-width: 62rem) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "card" "hero"; gap: 2.2rem; padding: 1.2rem; }
  .auth-hero h1 { max-width: none; }
  .stage { margin-inline: auto; }
}
@media (max-width: 52rem) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 17rem; z-index: 50; transform: translateX(105%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  [dir="ltr"] .side { transform: translateX(-105%); }
  .side.open { transform: none; }
  .side.open + .side-scrim { display: block; position: fixed; inset: 0; background: rgba(6, 7, 25, .5); z-index: 40; }
  .top .menu-btn { display: inline-grid; }
  .top .who { display: none; }
  .top #theme { margin-inline-start: auto; }
  .top { padding: .7rem 1rem; }
  .view { padding: 1.1rem 1rem 4rem; }
  .ed-meta { grid-template-columns: 1fr; }
  .savebar { margin-inline: -1rem; padding-inline: 1rem; }
  .h-opts { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 7rem 1fr 2.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===== עיצוב יוקרתי: כחול לילה וזהב, ריבועים מודגשים ונקיים ===== */
body { letter-spacing: .005em; background: radial-gradient(1100px 560px at 85% -10%, rgba(217, 181, 98, .07), transparent 60%), radial-gradient(900px 520px at 0% 110%, rgba(90, 139, 236, .06), transparent 60%), var(--bg); background-attachment: fixed; }
h1, h2, h3, .page-h h2 { font-family: var(--display); }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--gold); }

/* כפתורים ושדות */
.btn { border-radius: 12px; border: 1px solid var(--line); background: var(--sheen), var(--panel); box-shadow: none; padding: .6rem 1.15rem; font-weight: 700; transition: border-color .15s, box-shadow .15s, transform .1s, filter .15s; }
.btn:hover { border-color: var(--line-gold); box-shadow: 0 0 0 3px rgba(217, 181, 98, .08); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--gold-grad); color: var(--on-gold); border: 1px solid rgba(248, 227, 163, .6); font-weight: 800; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 22px rgba(217, 181, 98, .22); }
.btn.primary:hover { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 28px rgba(217, 181, 98, .32); }
.btn.primary:active { transform: translateY(1px); }
.btn.danger { color: var(--bad); }
.in, .field input, .field select, .field textarea, select.in, textarea.in { background: var(--field); border: 1px solid var(--line); border-radius: 12px; }
.in:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); outline: 3px solid rgba(217, 181, 98, .18); }
input, select, textarea { border-radius: 12px; }
.err { color: var(--bad); }
.ok-msg { color: var(--ok); font-weight: 600; min-height: 0; margin: .2rem 0 .6rem; }
.ok-msg:empty { display: none; }
.toast { background: #0e1530; color: #f5f1e6; border: 1px solid rgba(217, 181, 98, .45); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.toast.ok { border-color: var(--ok); }
.toast.bad { border-color: var(--bad); }

/* ===== כניסה ===== */
body.auth { position: relative; background: radial-gradient(900px 620px at 18% 18%, rgba(217, 181, 98, .10), transparent 60%), radial-gradient(1000px 700px at 100% 100%, rgba(90, 139, 236, .09), transparent 60%), linear-gradient(160deg, #0b1230 0%, #060a18 55%, #03050d 100%); }
body.auth::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: linear-gradient(118deg, transparent 32%, rgba(255, 255, 255, .035) 42%, transparent 50%), linear-gradient(118deg, transparent 58%, rgba(217, 181, 98, .05) 64%, transparent 71%); }
.auth-wrap { position: relative; z-index: 1; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); grid-template-areas: "hero card"; gap: 3.5rem; }
.auth-hero { position: relative; }
.auth-hero h1 { color: var(--ink); -webkit-text-fill-color: currentColor; background: none; font-weight: 800; font-size: clamp(2.5rem, 5.2vw, 4.3rem); max-width: 14ch; line-height: 1.1; text-shadow: 0 4px 24px rgba(0, 0, 0, .45); }
.auth-hero h1 .gold-text { -webkit-text-fill-color: transparent; text-shadow: none; }
.swoosh { width: min(22rem, 70%); height: 3px; margin-top: .9rem; border-radius: 99px; background: linear-gradient(90deg, transparent, #f8e3a3 30%, #d9b562 60%, transparent); box-shadow: 0 0 14px rgba(217, 181, 98, .5); }
.auth-hero .lead { color: var(--mut); margin-top: 1.2rem; }
.auth-card { position: relative; background: linear-gradient(180deg, rgba(22, 30, 64, .92), rgba(9, 14, 32, .95)); border: 1px solid rgba(217, 181, 98, .5); border-radius: 26px; padding: 2.1rem 1.9rem 1.6rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 80px rgba(0, 0, 0, .55), 0 0 50px rgba(217, 181, 98, .10); }
.brand-mark { color: var(--gold); margin-bottom: 1.6rem; }
.brand-mark svg { width: 3.8rem; height: 3.8rem; filter: drop-shadow(0 0 14px rgba(217, 181, 98, .45)); }
.brand-mark strong { font-weight: 800; font-size: 2.3rem; color: var(--ink); }
.brand-mark small { display: flex; align-items: center; gap: .8rem; width: 100%; justify-content: center; color: var(--mut); }
.brand-mark small::before, .brand-mark small::after { content: ""; flex: 1; max-width: 5rem; height: 1px; background: linear-gradient(90deg, transparent, rgba(217, 181, 98, .7)); }
.brand-mark small::after { background: linear-gradient(270deg, transparent, rgba(217, 181, 98, .7)); }
.tabs { background: rgba(4, 7, 18, .6); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.tab { border-radius: 11px; color: var(--mut); }
.tab[aria-selected="true"] { background: var(--gold-grad); color: var(--on-gold); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 16px rgba(217, 181, 98, .2); }
.auth-links a, .auth a { color: var(--accent); }
.auth-card h2.sub { font-size: 1.3rem; font-weight: 800; margin-bottom: .6rem; text-align: center; }
#f-forgot .note { margin: 0 0 1rem; }

/* המחשה בדף הכניסה: שאלה ותשובות */
.tiles { position: relative; margin-top: 2.4rem; max-width: 32rem; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; padding: 1rem; border-radius: 22px; background: linear-gradient(180deg, rgba(20, 28, 60, .7), rgba(8, 12, 28, .7)); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.tile-q { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem .9rem .7rem .7rem; border-radius: 16px; background: var(--sheen), var(--panel); border: 1px solid var(--line); font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.tile-q .timer { flex: none; width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem; font-weight: 800; color: #fff; background: #070b1a; border: 3px solid var(--gold); box-shadow: 0 0 18px rgba(217, 181, 98, .4); }
.tile { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 1rem; border-radius: 14px; font-weight: 700; font-size: 1.15rem; color: var(--ink); background: linear-gradient(180deg, #1b2450, #111833); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); transform: none; }
.tile b { font-size: .95rem; }
.tile.t1 b { color: var(--o1); } .tile.t2 b { color: var(--o2); } .tile.t3 b { color: var(--o3); } .tile.t4 b { color: var(--o4); }
.tile.t1 { background: var(--gold-grad); color: var(--on-gold); border-color: #f8e3a3; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 26px rgba(217, 181, 98, .45); }
.tile.t1 b { color: var(--on-gold); }
.pop { position: absolute; inset-inline-start: -1rem; bottom: -1.1rem; background: #0b1128; color: #f8e3a3; font-weight: 800; border: 1px solid var(--gold); border-radius: 99px; padding: .4rem 1rem; box-shadow: 0 0 20px rgba(217, 181, 98, .35); transform: none; }

/* ===== לוח בקרה ===== */
body.dash { background: radial-gradient(1100px 560px at 90% -10%, rgba(217, 181, 98, .07), transparent 60%), radial-gradient(900px 520px at 0% 110%, rgba(90, 139, 236, .06), transparent 60%), var(--bg); background-attachment: fixed; }
.shell { display: block; min-height: 100vh; }
.topbar { position: sticky; top: .7rem; z-index: 30; margin: .7rem auto 0; max-width: 76rem; width: calc(100% - 1.4rem); display: flex; align-items: center; gap: .9rem; padding: .55rem .9rem; background: color-mix(in srgb, var(--panel) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.topbar .brand { padding: 0; flex: none; }
.topbar .brand .logo { color: var(--gold); }
.topbar .brand strong { font-weight: 800; }
/* התפריט נשבר לשורה נוספת כשאין מקום, כדי שאף כפתור לא יוסתר */
.topbar .nav { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; min-width: 0; padding: .15rem; }
.topbar .nav::-webkit-scrollbar { display: none; }
.topbar .nav .sep { display: none; }
.topbar .nav a { padding: .45rem .8rem; border-radius: 99px; white-space: nowrap; box-shadow: none; font-weight: 700; color: var(--mut); border: 1px solid transparent; }
.topbar .nav a .ic { width: 1.15rem; height: 1.15rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topbar .nav a:hover { background: var(--panel-2); color: var(--ink); }
.topbar .nav a[aria-current="page"], [dir="rtl"] .topbar .nav a[aria-current="page"] { background: var(--gold-grad); color: var(--on-gold); border-color: rgba(248, 227, 163, .6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 14px rgba(217, 181, 98, .2); }
.topbar .who { color: var(--mut); font-weight: 700; }
.topbar .btn.sm { padding: .4rem .8rem; }
.view { padding-top: 1.8rem; }
.page-h h2 { font-size: 1.95rem; font-weight: 800; }

.card, .stat, .quick a, .quick button, .tier { background: var(--sheen), var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card { padding: 1.25rem 1.35rem; }
.card h3 { font-weight: 800; }
.quick a, .quick button { transition: border-color .15s, transform .15s; }
.quick a:hover, .quick button:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.quick .ic { width: 2.7rem; height: 2.7rem; padding: .6rem; border-radius: 50%; background: rgba(217, 181, 98, .1); border: 1px solid var(--line-gold); color: var(--accent); }
.stat b { font-weight: 800; font-size: 2.3rem; color: var(--accent); }
.banner { background: linear-gradient(110deg, #111a3f 0%, #19163a 55%, #2b2212 100%); border: 1px solid rgba(217, 181, 98, .5); border-radius: 20px; padding: 1.3rem 1.5rem; color: #f5f1e6; box-shadow: 0 18px 40px rgba(0, 0, 0, .35), 0 0 30px rgba(217, 181, 98, .08); }
.banner strong { color: #f0d58f; font-weight: 700; }
.banner p { color: #d6d2c4; }
.qcard { border-top: 1px solid var(--line); }
.chip { border: 1px solid var(--line); background: var(--panel); box-shadow: none; font-weight: 700; }
.chip:hover { border-color: var(--line-gold); }
.chip[aria-pressed="true"] { background: var(--gold-grad); border-color: rgba(248, 227, 163, .6); color: var(--on-gold); box-shadow: none; }
.seg button[aria-pressed="true"] { background: var(--gold-grad); color: var(--on-gold); }
.badge.gold { background: rgba(217, 181, 98, .14); color: var(--accent); border-color: var(--line-gold); }
.badge.lv-בינוני { color: var(--accent); }
.icon-btn { background: var(--panel); }
.icon-btn:hover { border-color: var(--line-gold); }
.scrim { background: rgba(3, 5, 13, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal { border-radius: 22px; border: 1px solid var(--line-gold); background: var(--sheen), var(--panel); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.savebar { background: color-mix(in srgb, var(--panel) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.tier .t-max { color: var(--accent); }
.tier.rec { border-color: var(--gold); box-shadow: var(--shadow), 0 0 26px rgba(217, 181, 98, .14); }
.rec-tag { background: var(--gold-grad); color: var(--on-gold); }
/* זהב רק בחבילה המומלצת, כדי שהעמוד לא יהיה עמוס */
.tier:not(.rec) .btn.primary { background: var(--sheen), var(--panel-2); color: var(--ink); border: 1px solid var(--line-gold); box-shadow: none; }
.tier:not(.rec) .btn.primary:hover { border-color: var(--gold); }
.bar .fill { background: var(--gold-grad); }

@media (max-width: 62rem) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "card" "hero"; gap: 2rem; }
}
@media (max-width: 52rem) {
  .topbar { flex-wrap: wrap; top: .4rem; width: calc(100% - .8rem); gap: .5rem; padding: .5rem .7rem; border-radius: 18px; }
  .topbar .brand small, .topbar .who { display: none; }
  .topbar .brand { margin-inline-end: auto; }
  .topbar .nav { order: 3; flex: 1 1 100%; }
  .view { padding-top: 1.1rem; }
}
.grid > .card, .grid > .card + .card { margin-top: 0; }

/* ===== מסך מנחה: שלב 1 (טיימר, סרגל כלים, עוגה, סיום דרמטי) ===== */
.h-top { position: relative; }
.h-timer { font-family: var(--display); font-size: 2.2rem; font-weight: 800; color: #fff; background: #070b1a; border: 4px solid var(--gold); border-radius: 50%; width: 4.4rem; height: 4.4rem; display: grid; place-items: center; box-shadow: 0 0 24px rgba(217, 181, 98, .45); }
.h-timer.red { background: var(--bad); border-color: #ffb3b3; color: #fff; box-shadow: 0 0 26px rgba(255, 107, 107, .55); animation: pulse .5s ease-in-out infinite alternate; }
.h-meter .fill.red { background: var(--bad); }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.12); } }
.h-flash { position: fixed; inset: 0; pointer-events: none; background: #ff2d3a; opacity: 0; z-index: 5; }
body.urgent .h-flash { animation: flash 1s ease-out infinite; }
@keyframes flash { 0% { opacity: .22; } 60%, 100% { opacity: 0; } }

.lobby { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem); gap: 2rem; align-items: start; }
.lobby .welcome { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; color: var(--gold); animation: rise .8s both; }
.lobby-side { background: var(--sheen), var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 1rem 1.2rem; max-height: 70vh; overflow: auto; }
.lobby-side h2 { font-size: 1.3rem; margin-bottom: .7rem; }
.lobby-side h2 b { color: var(--gold); font-family: var(--display); font-size: 1.6em; }
.lobby-side .people { justify-content: flex-start; }
.lobby-side .person { animation: rise .4s both; }

.h-q.big { font-size: clamp(2.2rem, 5vw, 4rem); }
.h-soon { text-align: center; color: var(--mut); font-size: 1.4rem; }
.h-soon b { color: var(--gold); font-family: var(--display); font-size: 2rem; }
.h-facts { display: flex; gap: 1rem 2.5rem; justify-content: center; flex-wrap: wrap; font-size: 1.35rem; }
.h-facts b { color: var(--gold); }

.h-pie-wrap { display: flex; gap: 2.5rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.h-pie { width: min(38vh, 20rem); aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--panel); box-shadow: 0 10px 40px #0006; animation: spin-in .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes spin-in { from { transform: rotate(-120deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.h-legend { list-style: none; display: grid; gap: .6rem; font-size: 1.3rem; padding: 0; }
.h-legend li { display: flex; align-items: center; gap: .6rem; }
.h-legend .sw { width: 1.2rem; height: 1.2rem; border-radius: 4px; }
.h-legend b { font-family: var(--display); font-size: 1.5rem; }

.h-tools { position: fixed; left: 1rem; bottom: 5.4rem; display: flex; flex-direction: column; gap: .35rem; z-index: 6; }
.h-tools button { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-width: 9.5rem; padding: .35rem .6rem; border-radius: 10px; border: 1px solid var(--line); background: rgba(6, 10, 24, .85); color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; opacity: .55; transition: opacity .2s; }
.h-tools:hover button, .h-tools button:focus-visible { opacity: 1; }
.h-tools kbd, .h-keys kbd { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 .4rem; font-size: .8rem; font-family: inherit; }
.h-ov { position: fixed; inset: 0; background: #0009; display: grid; place-items: center; z-index: 20; padding: 1rem; }
.h-ov-box { background: var(--bg, #060a18); border: 1px solid var(--line-gold); border-radius: 20px; padding: 1.4rem; width: min(70rem, 96vw); max-height: 90vh; overflow: auto; display: grid; gap: 1rem; }
.h-keys td { padding: .3rem .8rem; font-size: 1.15rem; }

.end-title.boom { animation: boom .9s cubic-bezier(.2, .9, .3, 1.4) both; font-size: clamp(2.6rem, 7vw, 5.5rem); }
@keyframes boom { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

.race-prog { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; font-size: 1.15rem; color: var(--mut); }
.race-prog .track { height: 12px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.race-prog .fill { height: 100%; width: 0; background: var(--gold-grad); transition: width .5s; }
.race { position: relative; }
.race-row { position: absolute; inset-inline: 0; top: 0; height: 3rem; display: grid; grid-template-columns: 2.4rem minmax(6rem, 14rem) 1fr 6rem; gap: .8rem; align-items: center; font-size: 1.3rem; font-weight: 700; transition: transform .6s cubic-bezier(.3, .8, .3, 1); }
.race-row .rk { font-family: var(--display); color: var(--mut); }
.race-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-row .bar { height: 1.6rem; background: var(--panel-2); border-radius: 8px; overflow: hidden; }
.race-row .fill { height: 100%; width: 0; background: var(--oc); transition: width .6s; }
.race-row .sc { font-family: var(--display); direction: ltr; text-align: end; }
.race-row.lead .rk, .race-row.lead .nm { color: var(--gold); }

.pyr { display: flex; direction: ltr; align-items: flex-end; justify-content: center; gap: 1rem; height: 62vh; }
.pyr-col { flex: 1; max-width: 13rem; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; direction: rtl; }
.pyr-info { text-align: center; display: grid; gap: .15rem; margin-bottom: .5rem; font-size: 1rem; color: var(--mut); opacity: 0; transform: translateY(20px); transition: .6s; }
.pyr-info .nm { color: var(--ink); font-size: 1.4rem; }
.pyr-info .crown { width: 3rem; height: 3rem; justify-self: center; fill: #e7c56f; stroke: #f8e3a3; stroke-width: .8; stroke-linejoin: round; filter: drop-shadow(0 0 12px rgba(217, 181, 98, .6)); }
.pyr-blk { border-radius: 14px 14px 0 0; display: grid; place-items: start center; padding-top: .6rem; font-family: var(--display); font-size: 3rem; color: #080a1f; height: 0; transition: height 1s cubic-bezier(.2, .8, .2, 1); background: linear-gradient(180deg, #34437a, #1a2246); color: #f5f1e6; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); overflow: hidden; }
.pyr-col.show .pyr-info { opacity: 1; transform: none; }
.pyr-col.p1.show .pyr-blk { height: 58%; background: linear-gradient(180deg, #f8e3a3, #d9b562 50%, #a97c30); color: #1b1405; box-shadow: 0 0 40px rgba(217, 181, 98, .45), inset 0 1px 0 rgba(255, 255, 255, .6); }
.pyr-col.p2.show .pyr-blk { height: 46%; background: linear-gradient(180deg, #f4f6fa, #b9c1d0 50%, #7d879b); color: #12172a; }
.pyr-col.p3.show .pyr-blk { height: 36%; background: linear-gradient(180deg, #f1c29a, #c98552 50%, #8a5228); color: #1f1207; }
.pyr-col.p4.show .pyr-blk { height: 26%; }
.pyr-col.p5.show .pyr-blk { height: 18%; }
.pyr-col.p1.show .pyr-info .nm { color: var(--gold); font-size: 1.8rem; }

.h-final { width: 100%; border-collapse: collapse; font-size: 1.15rem; }
.h-final th, .h-final td { padding: .5rem .7rem; text-align: start; border-bottom: 1px solid var(--line); }
.h-final tr.top td { color: var(--gold); }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti i { position: absolute; top: -2rem; width: .7rem; height: 1.1rem; border-radius: 2px; animation: fall linear both; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 900px) {
  .lobby { grid-template-columns: 1fr; }
  .h-tools { display: none; }
  .race-row { grid-template-columns: 2rem 7rem 1fr 4.5rem; font-size: 1rem; }
  .pyr { gap: .4rem; }
  .pyr-info .nm { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.urgent .h-flash, .h-timer.red, .confetti { animation: none; display: none; }
  .race-row, .pyr-blk, .pyr-info { transition: none; }
}

/* ===== מסך משתתף ===== */
.p-preview { text-align: center; color: var(--mut); font-size: 1.2rem; }
.p-bonus { font-size: .95rem; color: var(--gold); }

/* ===== שלב 2: מאגר שאלות ===== */
.bank-f { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: .5rem; }
.bank-f .in { width: auto; flex: 1; min-width: 10rem; }
.bank-list { display: grid; gap: .5rem; max-height: 55vh; overflow: auto; padding-inline-end: .3rem; }
.bank-q { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.bank-q.on { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
.bank-q .grow { flex: 1; min-width: 0; display: grid; gap: .25rem; }
.bank-q .right { color: var(--ok); font-weight: 700; }
.bank-q .add { flex: none; font-size: 1.1rem; }
.bank-q .meta { display: flex; gap: .35rem; flex-wrap: wrap; }
.badge.lv-קל { color: var(--ok); } .badge.lv-בינוני { color: #c98a00; } .badge.lv-קשה { color: var(--bad); }

/* ===== שלב 3: מדיה ===== */
.qmedia { margin-top: .9rem; padding-top: .8rem; border-top: 1px dashed var(--line); display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.qmedia.on { align-items: flex-start; }
.qm-prev img, .qm-prev video { max-width: 16rem; max-height: 10rem; border-radius: 10px; display: block; background: #000; }
.qm-prev audio { width: 16rem; }
.qm-set { display: grid; gap: .5rem; }
.qm-set label { display: grid; gap: .2rem; }
.qm-set .in { width: auto; }
.h-intro-t { text-align: center; font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.h-media-slot { display: flex; justify-content: center; align-items: center; }
.h-media-el.k-image, .h-media-el.k-video { max-width: 100%; max-height: 38vh; border-radius: 16px; box-shadow: 0 10px 40px #0007; background: #000; }
.h-media-slot.big .h-media-el.k-image, .h-media-slot.big .h-media-el.k-video { max-height: 64vh; }
.h-media-slot.audio::before { content: "♪"; font-family: var(--display); color: var(--gold); font-size: 4rem; margin-inline-end: 1rem; }
.h-media-el.k-audio { width: min(30rem, 90%); }
.ghost-ai { margin-top: .6rem; }
.ai-f .field { margin-bottom: .4rem; }

/* ===== אירועים, קופונים וניהול ===== */
.pass-on { border-color: var(--ok) !important; background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
.coupon-row { display: flex; gap: .7rem; align-items: flex-end; flex-wrap: wrap; margin-top: 1rem; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .9rem; margin-top: 1rem; }
.tier { position: relative; display: grid; gap: .25rem; justify-items: center; text-align: center; padding: 1.3rem 1rem 1rem; border: 2px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: 0 4px 0 var(--line); }
.tier.rec { border-color: var(--accent); }
.tier.covered { opacity: .6; }
.tier .t-max { font-size: 1.7rem; font-weight: 800; color: var(--accent); }
.tier .t-price { font-size: 1.6rem; font-weight: 800; margin-top: .3rem; }
.tier .t-sub { font-size: .82rem; min-height: 2.2em; }
.tier .btn { margin-top: .4rem; width: 100%; justify-content: center; }
.rec-tag { position: absolute; top: -.8rem; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800; padding: .1rem .7rem; border-radius: 99px; }
.cp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .3rem .8rem; align-items: end; margin: .6rem 0; }
.cp-form .err, .cp-form .btn { grid-column: 1 / -1; justify-self: start; }
tr.off td { opacity: .5; }

tr.warn td { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.tier .btn.sm { margin-top: .2rem; font-size: .8rem; }

/* מסך מנחה במסך רחב: מקום לסרגל הכלים בצד, כדי שלא יסתיר את התשובות */
@media (min-width: 901px) {
  body.host .h-stage { padding-inline: 11.5rem; }
}

/* ===== שכבה בוגרת: גופן מכובד, פינות מעודנות, פחות "כפתורי כדור" ===== */
:root { --r: 14px; }
body { font-weight: 400; }
h1, h2, h3, .page-h h2, .brand strong, .brand-mark strong, .stat b, .pin, .h-timer, .end-title, .tile-q { font-family: var(--display); }
.page-h h2 { font-size: 2.25rem; font-weight: 700; letter-spacing: -.005em; line-height: 1.15; }
.page-h h2::after { content: ""; display: block; width: 3.2rem; height: 2px; margin-top: .55rem; background: linear-gradient(90deg, var(--gold), transparent); }
[dir="rtl"] .page-h h2::after { background: linear-gradient(270deg, var(--gold), transparent); }
.card h3, .modal h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.stat b { font-weight: 700; font-size: 2.5rem; }
.brand strong { font-weight: 700; font-size: 1.55rem; }
.brand-mark strong { font-weight: 700; font-size: 2.6rem; }
.auth-hero h1 { font-weight: 900; letter-spacing: -.01em; }

.btn { border-radius: 10px; }
.btn.sm { border-radius: 8px; }
.in, .field input, .field select, .field textarea, select.in, textarea.in, input, select, textarea { border-radius: 10px; }
.tabs { border-radius: 12px; } .tab { border-radius: 9px; }
.badge { border-radius: 6px; font-weight: 600; letter-spacing: .01em; }
.chip { border-radius: 8px; }
.modal { border-radius: 18px; }
.topbar { border-radius: 16px; }

/* תפריט עליון: קו זהב מתחת לעמוד הנוכחי, במקום כפתור עגול */
.topbar .nav a { border-radius: 8px; color: var(--mut); position: relative; }
.topbar .nav a .ic { color: var(--gold); opacity: .75; }
.topbar .nav a[aria-current="page"], [dir="rtl"] .topbar .nav a[aria-current="page"] { background: rgba(217, 181, 98, .08); color: var(--ink); border-color: transparent; box-shadow: none; }
.topbar .nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: .8rem; bottom: .1rem; height: 2px; border-radius: 2px; background: var(--gold-grad); }
.topbar .nav a[aria-current="page"] .ic { opacity: 1; }

/* כרטיסי חידון */
.qcard { gap: .5rem; padding: 1.3rem 1.35rem 1.2rem; }
.qcard .eyebrow { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .04em; }
.qcard h3 { font-size: 1.4rem; line-height: 1.25; }
.qcard p { line-height: 1.5; }
.qmeta { display: flex; align-items: center; gap: .6rem; color: var(--mut); font-size: .88rem; font-weight: 600; padding-top: .55rem; border-top: 1px solid var(--line); }
.qmeta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--mut); opacity: .6; }
.lv { display: inline-flex; align-items: flex-end; gap: 2px; margin-inline-end: .4rem; vertical-align: -1px; }
.lv i { display: block; width: 4px; border-radius: 1px; background: var(--line); }
.lv i:nth-child(1) { height: 6px; } .lv i:nth-child(2) { height: 9px; } .lv i:nth-child(3) { height: 12px; }
.lv i.on { background: var(--gold); }

/* ספריית חידונים: נושאים בצד כמו קטלוג, ורמות כסרגל בחירה */
.lib { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.lib-side { position: sticky; top: 6.5rem; background: var(--sheen), var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem .6rem; box-shadow: var(--shadow); max-height: calc(100vh - 8rem); overflow-y: auto; }
.lib-h { font-family: var(--display); font-weight: 700; font-size: 1.15rem; padding: 0 .7rem .6rem; margin-bottom: .4rem; border-bottom: 1px solid var(--line); }
.lib-topics { display: grid; gap: 1px; }
.lib-topic { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; padding: .55rem .7rem; border: 0; border-radius: 8px; background: transparent; color: var(--mut); font-weight: 600; text-align: start; cursor: pointer; position: relative; }
.lib-topic b { font-weight: 600; font-size: .8rem; color: var(--mut); opacity: .75; font-variant-numeric: tabular-nums; }
.lib-topic:hover { background: var(--panel-2); color: var(--ink); }
.lib-topic[aria-pressed="true"] { background: rgba(217, 181, 98, .1); color: var(--ink); }
.lib-topic[aria-pressed="true"]::before { content: ""; position: absolute; inset-inline-start: 0; top: .45rem; bottom: .45rem; width: 3px; border-radius: 3px; background: var(--gold-grad); }
.lib-topic[aria-pressed="true"] b { color: var(--accent); opacity: 1; }
.lib-bar { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .9rem; }
.lib-search { flex: 1; min-width: 12rem; }
.lib-levels { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.lib-levels button { border: 0; background: transparent; color: var(--mut); font-weight: 700; padding: .5rem .9rem; border-radius: 9px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; }
.lib-levels button:hover { color: var(--ink); }
.lib-levels button[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-gold); }
.lib-count { color: var(--mut); font-size: .92rem; margin-bottom: .8rem; }
.lib-grid { grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); }
.lib-note { color: var(--mut); font-size: .85rem; margin-top: 1.4rem; padding-inline-start: .8rem; border-inline-start: 2px solid var(--line-gold); }
@media (max-width: 52rem) {
  .lib { grid-template-columns: 1fr; gap: 1rem; }
  .lib-side { position: static; max-height: none; padding: .5rem; }
  .lib-h { display: none; }
  .lib-topics { display: flex; gap: .3rem; overflow-x: auto; padding-bottom: .2rem; }
  .lib-topic { width: auto; white-space: nowrap; }
  .lib-levels { width: 100%; overflow-x: auto; }
}

/* מסך המנחה והטלפון: שאלה בגופן המכובד */
.h-q, .p-q { font-family: var(--display); font-weight: 700; }
.h-opt, .p-opt { border-radius: 14px; }
.h-opt .no, .p-opt .no { border-radius: 8px; font-weight: 700; }
.p-center h1 { font-family: var(--display); font-weight: 700; }
.join-box h1, .lobby .welcome { font-family: var(--display); font-weight: 700; }
.qcard .row { align-items: center; }
.qcard .row .icon-btn { width: 2.15rem; height: 2.15rem; margin-inline-start: auto; color: var(--mut); }
.qcard .row .icon-btn:hover { color: var(--accent); }

/* ===== הסבר לתשובה (מסך גדול, טלפון, עיון ועורך) ===== */
.h-explain { display: flex; gap: 1rem; align-items: flex-start; max-width: 62rem; margin: 0 auto; width: 100%; padding: 1rem 1.3rem; border-radius: 14px; background: linear-gradient(180deg, rgba(217, 181, 98, .10), rgba(217, 181, 98, .04)); border: 1px solid var(--line-gold); animation: rise .5s both; }
.h-explain .lbl { flex: none; font-family: var(--display); font-weight: 700; color: var(--gold); font-size: 1.25rem; padding-inline-end: 1rem; border-inline-end: 1px solid var(--line-gold); }
.h-explain p { font-size: clamp(1.05rem, 1.9vw, 1.45rem); line-height: 1.55; color: var(--ink); }
.p-explain { padding: .9rem 1rem; border-radius: 14px; background: rgba(217, 181, 98, .08); border: 1px solid var(--line-gold); line-height: 1.55; }
.p-explain b { display: block; font-family: var(--display); color: var(--gold); margin-bottom: .2rem; }
.pv-ex { margin-top: .45rem; padding-inline-start: .7rem; border-inline-start: 2px solid var(--line-gold); color: var(--mut); font-size: .92rem; line-height: 1.5; }
.qexplain { margin: .8rem 0 .2rem; }
.qexplain > span small { display: inline; font-weight: 400; color: var(--mut); margin-inline-start: .3rem; }
.qexplain textarea { min-height: 3.2rem; }

/* ===== אנשי קשר: הוספה ידנית ===== */
.ct-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 0 .8rem; align-items: end; max-width: 46rem; }
.ct-add .field { margin-bottom: 0; }
.ct-add .err { grid-column: 1 / -1; }
.ct-paste { margin-top: .4rem; }
.ct-paste summary { cursor: pointer; font-weight: 700; color: var(--accent); margin-bottom: .6rem; }
@media (max-width: 40rem) { .ct-add { grid-template-columns: 1fr; gap: .6rem; } }

/* ===== הכנסות ===== */
.rev-bar { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: flex-end; margin: .6rem 0 1rem; }
.rev-dates { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.rev-dates label { display: grid; gap: .2rem; font-size: .85rem; color: var(--mut); font-weight: 600; }
.rev-dates .in { width: auto; padding: .45rem .6rem; }
.rev-stats { margin-bottom: .8rem; }
.rev-stats .stat b { font-size: 1.9rem; }
.rev-sec { margin-top: .6rem; }
.rev-sec summary { cursor: pointer; font-weight: 700; padding: .4rem 0; }
