/* =========================================================
   היכל התהילה של החידון
   A hall at night: warm gold light from above, velvet, marble, framed portraits.
   States are switched with [data-state] on .qhof and [data-qh-when] on the parts.
   ========================================================= */
.qhof { --gold-1: #fff3b0; --gold-2: #ffd700; --gold-3: #c98f00; --velvet: #3a0d2e; position: relative; isolation: isolate; overflow: clip; padding-bottom: clamp(50px, 7vw, 100px);
  background: radial-gradient(70% 40% at 50% 0, rgba(255, 215, 0, 0.2), transparent 70%), linear-gradient(180deg, #1a0a2e, #2a0f33 30%, #160824 70%, #0e0518); }
.qhof [data-qh-when] { display: none; }
.qhof[data-state="full"] [data-qh-when="full"], .qhof[data-state="loading"] [data-qh-when="loading"], .qhof[data-state="empty"] [data-qh-when="empty"], .qhof[data-state="error"] [data-qh-when="error"] { display: block; }
.qhof[data-state="full"] dl[data-qh-when="full"] { display: grid; }
.qhof [hidden] { display: none !important; }
.qh-rays { position: absolute; inset: -10% -10% auto; height: 1100px; z-index: -1; pointer-events: none; transform-origin: 50% 0; animation: qh-rays 14s ease-in-out infinite alternate;
  background: conic-gradient(from 180deg at 50% 0, transparent 0 146deg, rgba(255, 223, 110, 0.16) 158deg, transparent 168deg, rgba(255, 223, 110, 0.12) 180deg, transparent 192deg, rgba(255, 223, 110, 0.16) 202deg, transparent 214deg 360deg); }
@keyframes qh-rays { to { transform: rotate(5deg) scale(1.06); } }
.qh-dust { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.qh-dust i { position: absolute; bottom: -10px; width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle, #fff6c2, #ffd700 45%, transparent 70%); box-shadow: 0 0 10px #ffd700; transform: scale(var(--s)); opacity: 0; animation: qh-rise var(--d) linear var(--delay) infinite; }
@keyframes qh-rise { 10% { opacity: 0.85; } 100% { transform: translate(30px, -110vh) scale(var(--s)); opacity: 0; } }

/* ---------- hero ---------- */
.qh-hero { text-align: center; padding: calc(var(--header-h, 80px) + clamp(30px, 5vw, 60px)) 0 clamp(20px, 3vw, 36px); }
.qh-arch { display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 6px; border-radius: 50% 50% 18px 18px; font-size: 2.6rem; background: radial-gradient(circle at 50% 30%, rgba(255, 215, 0, 0.35), rgba(255, 215, 0, 0.05)); box-shadow: inset 0 0 0 2px rgba(255, 215, 0, 0.6), 0 0 60px -10px rgba(255, 215, 0, 0.7); animation: qh-float 5s ease-in-out infinite; }
.qh-arch i { font-style: normal; }
@keyframes qh-float { 50% { transform: translateY(-6px); } }
.qh-eyebrow { margin: 0; font-family: var(--font-hand); font-weight: 700; font-size: 1.15rem; color: var(--gold-2); }
.qh-h1 { margin: 0; font-family: var(--font-hand); font-weight: 800; font-size: clamp(3rem, 9vw, 6.4rem); line-height: 1.05; background: linear-gradient(180deg, #fff, var(--gold-1) 35%, var(--gold-2) 65%, var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.7)); }
.qh-lead { margin: 8px auto 0; max-width: 34em; font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.6; color: #fff; }
.qh-stats { grid-template-columns: repeat(3, auto); justify-content: center; gap: 10px clamp(22px, 4vw, 60px); margin: clamp(20px, 3vw, 34px) 0 0; }
.qh-stats div { display: grid; gap: 0; }
.qh-stats dt { order: 2; font-size: 0.9rem; color: var(--text-soft, #d9cbf5); }
.qh-stats dd { margin: 0; font-family: var(--font-hand); font-weight: 800; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.1; color: var(--gold-2); font-variant-numeric: tabular-nums; text-shadow: 0 0 26px rgba(255, 215, 0, 0.5); }
.qh-stats dd.name { font-size: clamp(1.5rem, 3vw, 2.2rem); color: #fff; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-inline: auto; padding-top: 0.2em; }
.qh-hero .btn-row { margin-top: clamp(18px, 2.4vw, 28px); }

/* ---------- the medallion: the portrait of a champion ---------- */
.qh-medal { position: relative; flex: none; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff, var(--gold-1) 22%, var(--gold-2) 58%, var(--gold-3)); box-shadow: inset 0 0 0 4px rgba(120, 70, 0, 0.35), inset 0 0 0 7px rgba(255, 255, 255, 0.35), 0 14px 26px -12px #000; }
.qh-medal b { font-family: var(--font-hand); font-weight: 800; font-size: 2.6rem; line-height: 1; color: #4a2a00; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
.qh-medal i { position: absolute; inset-inline-end: -8px; bottom: -6px; font-style: normal; font-size: 1.7rem; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6)); }
.qh-medal.big { width: clamp(130px, 16vw, 190px); height: clamp(130px, 16vw, 190px); box-shadow: inset 0 0 0 6px rgba(120, 70, 0, 0.35), inset 0 0 0 11px rgba(255, 255, 255, 0.35), 0 0 0 6px #2a0f33, 0 0 0 9px var(--gold-2), 0 0 80px -6px rgba(255, 215, 0, 0.8), 0 30px 50px -24px #000; }
.qh-medal.big b { font-size: clamp(4rem, 8vw, 6rem); }
.qh-medal.big i { font-size: clamp(2.4rem, 4vw, 3.2rem); inset-inline-end: -4px; bottom: -4px; }
.qh-medal.vacant { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 2px rgba(255, 215, 0, 0.4); border-style: dashed; font-family: var(--font-hand); font-size: 2.2rem; color: rgba(255, 215, 0, 0.7); }
.qh-name { margin: 0; font-family: var(--font-hand); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; color: #fff; }
.qh-title { margin: 0; font-weight: 700; color: var(--gold-2); }
.qh-date { margin: 0; font-size: 0.85rem; color: rgba(255, 240, 200, 0.7); }
.qh-line { margin: 0; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.qh-me { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; font-size: 0.78rem; font-weight: 800; padding: 3px 12px; border-radius: 999px; background: #ff7ac6; color: #3a0a24; box-shadow: 0 0 20px rgba(255, 122, 198, 0.8); }
.is-me { outline: 3px solid #ff7ac6; outline-offset: 4px; }

/* ---------- the throne ---------- */
.qh-body { display: grid; gap: clamp(36px, 5vw, 70px); }
.qh-stage { display: grid !important; gap: 22px; }
.qhof:not([data-state="full"]) .qh-stage { display: none !important; }
.qh-throne-card { position: relative; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 54px); max-width: 920px; margin: 26px auto 0; padding: clamp(26px, 4vw, 50px) clamp(22px, 5vw, 64px); border-radius: 40px 40px 26px 26px;
  background: radial-gradient(90% 120% at 20% 0, rgba(255, 215, 0, 0.26), transparent 60%), linear-gradient(165deg, #5a1444, var(--velvet) 55%, #210a24);
  box-shadow: inset 0 0 0 2px var(--gold-2), inset 0 0 0 9px rgba(33, 10, 36, 0.6), inset 0 0 0 11px rgba(255, 215, 0, 0.4), 0 50px 90px -40px #000, 0 0 120px -30px rgba(255, 215, 0, 0.6); animation: qh-in 1s var(--ease-spring) both; }
.qh-throne-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(110deg, transparent 38%, rgba(255, 244, 200, 0.22) 50%, transparent 62%); background-size: 250% 100%; animation: qh-sheen 6s ease-in-out infinite; }
@keyframes qh-sheen { 0%, 60% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
@keyframes qh-in { from { opacity: 0; transform: translateY(50px) scale(0.94); } }
.qh-crown { position: absolute; top: -34px; inset-inline-start: clamp(60px, 10vw, 130px); font-size: clamp(3rem, 6vw, 4.4rem); filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 24px rgba(255, 215, 0, 0.7)); animation: qh-float 4s ease-in-out infinite; z-index: 2; }
.qh-kicker { font-family: var(--font-hand); font-weight: 700; font-size: 1.15rem; color: var(--gold-2); }
.qh-throne-card .qh-name { font-size: clamp(2.4rem, 6vw, 4.4rem); text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7); }
.qh-throne-card .qh-title { font-size: clamp(1.1rem, 2vw, 1.4rem); }
.qh-nums { display: flex; flex-wrap: wrap; align-items: center; gap: 14px clamp(20px, 3vw, 40px); margin: 16px 0 10px; }
.qh-points b { display: block; font-family: var(--font-hand); font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; color: var(--gold-2); font-variant-numeric: tabular-nums; text-shadow: 0 0 30px rgba(255, 215, 0, 0.6); }
.qh-points small { color: rgba(255, 240, 200, 0.8); }
@property --v { syntax: '<number>'; inherits: true; initial-value: 0; }
.qh-gauge { position: relative; display: grid; place-content: center; text-align: center; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(var(--gold-2) calc(var(--v) * 1%), rgba(255, 255, 255, 0.14) 0); transition: --v 1.6s var(--ease-out); }
.qh-gauge::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: #2a0f33; }
.qh-gauge b, .qh-gauge small { position: relative; line-height: 1.1; }
.qh-gauge b { font-weight: 900; font-size: 1.35rem; color: #fff; }
.qh-gauge small { font-size: 0.72rem; color: rgba(255, 240, 200, 0.8); }

/* ---------- alcoves: second and third ---------- */
.qh-alcoves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 920px; width: 100%; margin: 0 auto; }
.qh-alcove { position: relative; display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 26px; background: linear-gradient(165deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 0 0 1px var(--ring, rgba(215, 219, 228, 0.7)), 0 30px 50px -34px #000; animation: qh-in 0.9s var(--ease-spring) calc(var(--i) * 0.15s) both; }
.qh-alcove.n3 { --ring: rgba(217, 140, 74, 0.8); }
.qh-alcove.n2 .qh-medal { background: radial-gradient(circle at 34% 28%, #fff, #eef1f6 25%, #c9cfdb 60%, #8d95a6); }
.qh-alcove.n3 .qh-medal { background: radial-gradient(circle at 34% 28%, #fff, #ffd9b0 25%, #d98c4a 60%, #9a5a26); }
.qh-alcove .qh-name { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.qh-place { position: absolute; top: -14px; inset-inline-end: 22px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-family: var(--font-hand); font-weight: 800; font-size: 1.3rem; color: #210a24; background: #d7dbe4; box-shadow: 0 8px 16px -8px #000; }
.qh-alcove.n3 .qh-place { background: #d98c4a; }
.qh-alcove.vacant { opacity: 0.7; box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.3); border: 0; }
.qh-alcove.vacant .qh-name { font-size: 1.3rem; }

/* ---------- gallery ---------- */
.qh-ghead { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; margin-bottom: 22px; }
.qh-ghead h2, .qh-how h2, .qh-state h2 { margin: 0; font-family: var(--font-hand); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.8rem); color: #fff; }
.qh-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qh-tools input { width: min(300px, 100%); min-height: 46px; padding: 10px 20px; border-radius: 999px; font: inherit; color: #fff; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 215, 0, 0.4); outline: none; }
.qh-tools input::placeholder { color: rgba(255, 240, 200, 0.7); }
.qh-tools input:focus-visible { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.22); }
.qh-sort { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 215, 0, 0.25); }
.qh-sort button { border: 0; background: none; color: #fff; font: inherit; font-weight: 700; min-height: 40px; padding: 6px 16px; border-radius: 999px; cursor: pointer; }
.qh-sort button[aria-pressed="true"] { background: var(--gold-2); color: #2a1400; }
/* centred rows: a short last row sits in the middle instead of leaving a hole */
.qh-wall { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 20px; }
.qh-wall > li { flex: 0 1 250px; min-width: 0; }
.qh-portrait { position: relative; display: grid; justify-items: center; gap: 3px; text-align: center; padding: 30px 16px 20px; border-radius: 120px 120px 22px 22px / 80px 80px 22px 22px; background: linear-gradient(175deg, #4a1238, #230a26); box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.55), inset 0 0 0 6px rgba(33, 10, 36, 0.6), inset 0 0 0 7px rgba(255, 215, 0, 0.25), 0 26px 40px -28px #000; animation: qh-in 0.7s var(--ease-spring) calc(var(--i) * 50ms) both; transition: transform 0.45s var(--ease-spring), box-shadow 0.3s; }
.qh-portrait:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 2px var(--gold-2), inset 0 0 0 6px rgba(33, 10, 36, 0.6), inset 0 0 0 7px rgba(255, 215, 0, 0.4), 0 34px 50px -28px #000, 0 0 50px -14px rgba(255, 215, 0, 0.7); }
.qh-portrait .qh-name { margin-top: 10px; font-size: 1.35rem; }
.qh-portrait .qh-title { font-size: 0.9rem; }
.qh-rank { position: absolute; top: 16px; inset-inline-end: 50%; translate: 50% -28px; min-width: 44px; padding: 2px 10px; border-radius: 999px; font-weight: 800; font-size: 0.85rem; color: #2a1400; background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); box-shadow: 0 6px 14px -6px #000; }
[dir="rtl"] .qh-rank { translate: -50% -28px; }
.qh-bar { width: 78%; height: 6px; margin: 6px 0 2px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.qh-bar::after { content: ''; display: block; height: 100%; width: var(--v); border-radius: inherit; background: linear-gradient(90deg, var(--gold-3), var(--gold-2), var(--gold-1)); }
.qh-none { text-align: center; font-size: 1.1rem; color: #fff; padding: 20px 0; }

/* ---------- states ---------- */
.qh-state { text-align: center; }
.qh-state > p { max-width: 34em; margin: 10px auto 0; font-size: 1.1rem; line-height: 1.7; color: #fff; }
.qh-state .btn-row { margin-top: 22px; }
.skel { min-height: 240px; animation: qh-pulse 1.5s ease-in-out infinite !important; background: linear-gradient(110deg, rgba(255, 255, 255, 0.05) 30%, rgba(255, 215, 0, 0.16) 50%, rgba(255, 255, 255, 0.05) 70%) 0 0 / 250% 100%, #2a0f33 !important; }
.qh-throne-card.skel { min-height: 300px; }
.qh-throne-card.skel::after { display: none; }
.qhof[data-state="loading"] .qh-wall { margin-top: 24px; }
@keyframes qh-pulse { from { background-position: 130% 0, 0 0; } to { background-position: -130% 0, 0 0; } }
.qh-vacant { position: relative; display: grid; justify-items: center; width: 240px; margin: 40px auto 24px; }
.qh-spot { position: absolute; top: -120px; left: 50%; width: 360px; height: 420px; translate: -50% 0; z-index: -1; clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); background: linear-gradient(180deg, rgba(255, 236, 170, 0.5), rgba(255, 215, 0, 0.05) 80%, transparent); filter: blur(10px); animation: qh-spot 5s ease-in-out infinite alternate; }
@keyframes qh-spot { to { opacity: 0.6; transform: rotate(3deg); } }
.qh-vacant .qh-crown { position: static; animation: qh-float 3.6s ease-in-out infinite; font-size: 3.6rem; margin-bottom: -8px; }
.qh-seat { width: 150px; height: 120px; border-radius: 70px 70px 14px 14px; background: linear-gradient(165deg, #6a1a50, #3a0d2e); box-shadow: inset 0 0 0 3px var(--gold-2), inset 0 0 0 10px rgba(33, 10, 36, 0.5), 0 0 60px -10px rgba(255, 215, 0, 0.7); }
.qh-plinth { width: 210px; height: 56px; display: grid; place-items: center; font-family: var(--font-hand); font-weight: 800; font-size: 2rem; color: #4a2a00; border-radius: 6px 6px 14px 14px; background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 45%, var(--gold-3)); box-shadow: 0 26px 40px -20px #000; }
.qh-candle { font-size: 4rem; filter: grayscale(0.4); animation: qh-float 4s ease-in-out infinite; }

/* ---------- how to get in ---------- */
.qh-how { text-align: center; }
.qh-rules { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.qh-rules li { display: grid; justify-items: center; gap: 4px; padding: 22px 14px; border-radius: 24px; background: linear-gradient(165deg, rgba(255, 215, 0, 0.12), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.3); }
.qh-rules span { font-size: 2.2rem; }
.qh-rules strong { font-family: var(--font-hand); font-size: 1.3rem; color: var(--gold-2); }
.qh-rules small { font-size: 0.95rem; line-height: 1.5; color: #fff; }
.qh-how .btn-row { margin-top: 26px; }

/* join button inside the certificate dialog */
.hof-join { text-align: center; padding: 6px 16px 18px; }

.hof-join-msg { margin: 8px 0 0; font-size: 0.85rem; color: var(--text-soft); }
.hof-join-msg a { color: var(--gold); font-weight: 700; }


@media (max-width: 800px) {
  .qh-stats { grid-template-columns: repeat(2, auto); } .qh-stats .wide { grid-column: 1 / -1; }
  .qh-throne-card { grid-template-columns: 1fr; justify-items: center; text-align: center; border-radius: 32px 32px 22px 22px; }
  .qh-nums { justify-content: center; } .qh-crown { inset-inline-start: 50%; translate: 50% 0; } [dir="rtl"] .qh-crown { translate: 50% 0; }
  .qh-alcoves { grid-template-columns: 1fr; }
  .qh-ghead { justify-content: center; text-align: center; } .qh-tools { justify-content: center; width: 100%; } .qh-tools input { width: 100%; }
  .qh-wall { gap: 24px 10px; } .qh-wall > li { flex: 0 1 calc(50% - 5px); }
  .qh-portrait { padding: 26px 8px 16px; } .qh-portrait .qh-medal { width: 68px; height: 68px; } .qh-portrait .qh-medal b { font-size: 2rem; } .qh-portrait .qh-name { font-size: 1.1rem; }
  .qh-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .qh-rays, .qh-arch, .qh-crown, .qh-throne-card, .qh-throne-card::after, .qh-alcove, .qh-portrait, .qh-spot, .qh-candle, .skel { animation: none !important; }
  .qh-gauge { transition: none; }
}
