/* Hoger of lager — bovenop klastools.css */
.hl-stage { flex-direction: column; gap: 1.6vh; justify-content: flex-start; }

/* reeks */
.hl-streak { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; min-height: 1.3em; font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 4vh, 40px); line-height: 1.1; text-align: center; }
.hl-streak b { color: var(--gold); }
.hl-streak small { font-size: .55em; color: var(--muted); background: rgba(0,0,0,.25); border-radius: 99px; padding: 4px 12px; }

/* tafel met twee kaarten */
.hl-table { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 3vw, 40px); }
.hl-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hl-tag { font-weight: 800; color: var(--muted); font-size: clamp(13px, 2vh, 19px); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.hl-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: clamp(18px, 3.4vh, 34px); line-height: 1; }
.hl-mid b { font-family: var(--font-display); font-size: 1.9em; color: var(--gold); }
.hl-mid span:first-child { color: #69db7c; }
.hl-mid span:last-child { color: #ff8787; }

.hl-card { --cw: min(37vw, 31vh, 360px); width: var(--cw); aspect-ratio: 3 / 4; display: block; border: 0; padding: 0; background: none; perspective: 1400px; }
.hl-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,1.3,.5,1); }
/* het omdraaien zit op .hl-inner, het binnenkomen op .hl-card: zo zitten de transforms elkaar niet in de weg */
.hl-card.open .hl-inner { transform: rotateY(180deg); }
.hl-card.instant .hl-inner { transition: none; }
.hl-card.enter { animation: hl-enter .45s cubic-bezier(.3,1.4,.5,1); }
.hl-face {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; container-type: inline-size;
  border-radius: calc(var(--cw) * .08); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.hl-face.front { background: #fff; color: #1a1640; border: 5px solid var(--gold); }
#cardNext .hl-face.front { transform: rotateY(180deg); }
.hl-face.back {
  background: repeating-linear-gradient(45deg, #5b4bd6 0 12px, #4a3cc0 12px 24px); border: 5px solid #fff;
  font-family: var(--font-display); font-weight: 800; font-size: calc(var(--cw) * .5); color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.25);
}
#cardNext:not(.open):hover .back { filter: brightness(1.15); }
#cardNext:focus-visible { outline: none; }
#cardNext:focus-visible .hl-face { outline: 4px solid var(--gold); outline-offset: 4px; }

.hl-val { font-family: var(--font-display); font-weight: 800; line-height: 1.05; text-align: center; white-space: nowrap; font-size: min(44cqw, calc(172cqw / var(--len))); padding: 0 3cqw; }
.hl-val .l { display: block; }
.frac { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; vertical-align: middle; }
.frac > span:first-child { border-bottom: .07em solid currentColor; padding: 0 .14em .05em; }
.frac > span:last-child { padding-top: .05em; }
.hl-val .frac { font-size: .95em; }

/* stippen in vijfjes, zoals op een rekenrek */
.hl-dots { display: grid; grid-template-columns: repeat(5, 13cqw); gap: 3cqw; }
.hl-dots i { aspect-ratio: 1; border-radius: 50%; background: #e8364f; box-shadow: inset 0 -.25em 0 rgba(0,0,0,.18); font-size: 4cqw; }
.hl-dots i.b { background: #4dabf7; }
.hl-dots b { grid-column: 1 / -1; height: 2cqw; }

/* uitslag */
.hl-verdict { min-height: clamp(120px, 21vh, 210px); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; width: 100%; }
.hl-big { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 8vh, 88px); line-height: 1.05; padding: .06em .5em; border-radius: 22px; background: #2fb36b; color: #fff; box-shadow: inset 0 -6px 0 rgba(0,0,0,.18); animation: popin .4s cubic-bezier(.3,1.5,.5,1); }
.hl-why { font-weight: 800; font-size: clamp(18px, 3.2vh, 32px); line-height: 1.25; text-wrap: balance; }
.hl-why .frac { font-size: .85em; margin: .1em 0; }
.hl-res { min-height: 1.3em; font-weight: 800; font-size: clamp(17px, 2.8vh, 26px); display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.hl-res .good { color: var(--gold); }
.hl-res .bad { color: #ff8787; }
.hl-j { border: 0; border-radius: 14px; padding: 8px 18px; font-family: var(--font-display); font-weight: 800; font-size: 1em; }
.hl-j.ok { background: #2fb36b; color: #fff; }
.hl-j.no { background: #e8364f; color: #fff; }

/* knoppen voor de keuze van de klas */
.hl-pick { border: 0; border-radius: 18px; padding: 6px 18px; min-width: 84px; background: rgba(255,255,255,.1); display: flex; flex-direction: column; align-items: center; font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1.1; }
.hl-pick i { font-style: normal; font-size: 30px; line-height: 1; }
.hl-pick.up i { color: #69db7c; }
.hl-pick.down i { color: #ff8787; }
.hl-pick:hover:not(:disabled) { background: rgba(255,255,255,.2); }
.hl-pick[aria-pressed="true"] { background: #fff; color: var(--bg); }
.hl-pick:disabled:not([aria-pressed="true"]) { opacity: .35; cursor: default; }
.go { min-width: 220px; }
.status .keys { white-space: nowrap; }

/* lade met kaartsoorten */
.hl-h3 { margin: 8px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--muted); }
.hl-kgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hl-kgrid button { border: 0; border-radius: 12px; padding: 9px 10px; background: rgba(255,255,255,.08); text-align: left; font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1.1; }
.hl-kgrid button small { display: block; font-family: var(--font-body); font-weight: 700; font-size: 12px; opacity: .7; }
.hl-kgrid button:hover { background: rgba(255,255,255,.16); }
.hl-kgrid button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.drawer .ghost { align-self: flex-start; margin-top: 6px; }

@keyframes hl-enter { 0% { transform: translateX(40%) scale(.85); opacity: .2; } 100% { transform: none; opacity: 1; } }

@media (max-width: 560px) {
  .logo { font-size: 20px; }
  #kindName { display: none; }
  .hl-mid { font-size: 15px; }
  .hl-mid span { display: none; }
  .hl-face { border-width: 4px; }
  .hl-pick { min-width: 0; padding: 6px 12px; font-size: 14px; }
  .go { min-width: 0; }
  .status .keys { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hl-inner { transition: none; }
  .hl-card.enter, .hl-big { animation: none; }
}
