/* ===========================================================
   Aanvullingen: rangbalk (sterren), moeilijke stand, rekenen
   =========================================================== */

/* ---- Rangbalk ---- */

.rankbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  border: 2px solid #fde68a;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

.rank-icon { font-size: 36px; line-height: 1; }

.rank-body { flex: 1 1 auto; min-width: 0; }

.rank-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  font-size: 17px;
  margin-bottom: 6px;
}
.rank-top .rank-stars { color: var(--orange-dark); white-space: nowrap; }

.rankbar .progress { height: 12px; }
.rankbar .progress .bar { background: linear-gradient(90deg, #fbbf24, #f59e0b); }

.rank-next {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

/* ---- Sterren die je net verdiend hebt ---- */

.star-gain {
  margin-left: auto;
  font-weight: 900;
  font-size: 18px;
  color: var(--orange-dark);
  white-space: nowrap;
}

/* ---- Moeilijke stand ---- */

.toggle.hard[aria-pressed="true"] {
  background: #fee2e2;
  border-color: var(--red);
  color: #9f1239;
}

/* ---- Rekenen met tijd ---- */

.two-clocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.two-clocks .cheat-item { cursor: default; }
.two-clocks .cheat-item .lbl {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.calc-steps { margin-top: 4px; }
.calc-steps .ex-row:first-child { border-top: none; }

/* ===========================================================
   Leerpad: camino de pasos y ayuda visual en el reloj
   =========================================================== */

.tab.tab-pad { background: linear-gradient(135deg, #fff7ed, #fde68a); color: #7c2d12; }
.tab.tab-pad.active { background: linear-gradient(135deg, var(--orange), #f59e0b); color: #2a1403; }

/* Ayuda en el reloj */
.clock .zone { opacity: .8; }
.clock .z-over     { fill: #bbf7d0; }
.clock .z-voorhalf { fill: #fed7aa; }
.clock .z-overhalf { fill: #ddd6fe; }
.clock .z-voor     { fill: #bfdbfe; }
.clock .shade { fill: rgba(249,115,22,.24); }
.clock .arc { fill: none; stroke: var(--red); stroke-width: 6; stroke-linecap: round; opacity: .55; }
.clock.focus-h .min-g { opacity: .16; }
.clock.focus-m .hour-g { opacity: .16; }

.pad-zones { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 10px 0 2px; font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.pad-zones span { display: inline-flex; align-items: center; gap: 6px; }
.pad-zones i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }
.pad-zones .zg { background: #86efac; } .pad-zones .zo { background: #fdba74; }
.pad-zones .zp { background: #c4b5fd; } .pad-zones .zb { background: #93c5fd; }

b.blauw, .blauw { color: var(--blue); }
b.rood, .rood { color: var(--red); }
b.groen { color: #15803d; }
b.oranje { color: #c2410c; }
b.paars { color: #6d28d9; }

/* Cabecera del camino */
.pad-head-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.pad-head-top h2 { margin: 0 0 2px; }
.pad-head-top p { margin: 0; }
.pad-big { font-size: 46px; line-height: 1; }
.pad-head-meta { display: flex; justify-content: space-between; margin-top: 8px; font-weight: 900; font-size: 15px; color: var(--ink-soft); }
.pad-head .progress .bar { background: linear-gradient(90deg, #fbbf24, #f97316); }

/* El camino */
.pad-map { position: relative; display: grid; gap: 14px; padding: 6px 0 20px; }
.pad-map::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 0;
  border-left: 5px dotted #fdba74; transform: translateX(-50%);
}
.pad-hfd {
  position: relative; justify-self: center; margin-top: 8px;
  padding: 6px 16px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm);
  font-weight: 900; font-size: 15px; color: var(--ink-soft);
}
.pad-node {
  position: relative; justify-self: center;
  width: min(100%, 320px);
  transform: translateX(calc(var(--x, 0) * 20px));
  display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; text-align: left;
  border: 3px solid var(--line); border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm);
  font: inherit; color: var(--ink); cursor: pointer;
  transition: transform .15s ease;
}
@media (max-width: 400px) { .pad-node { transform: translateX(calc(var(--x, 0) * 8px)); } }
.pad-node:active { transform: translateX(calc(var(--x, 0) * 20px)) scale(.97); }
.pad-bol {
  flex: none; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px;
  background: var(--orange-soft); border: 3px solid #fdba74;
}
.pad-txt { display: grid; line-height: 1.15; min-width: 0; }
.pad-txt small { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pad-txt b { font-size: 18px; font-weight: 900; }
.pad-txt em { font-style: normal; font-weight: 900; font-size: 14px; color: var(--orange-ink); }
.pad-node.done { border-color: #86efac; }
.pad-node.done .pad-bol { background: var(--green-soft); border-color: #4ade80; }
.pad-node.now { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(249,115,22,.18), var(--shadow-sm); }
.pad-node.now .pad-bol { background: linear-gradient(135deg, var(--orange), #fbbf24); border-color: var(--orange-dark); animation: pad-pulso 1.6s ease-in-out infinite; }
.pad-node.locked { opacity: .55; cursor: default; filter: grayscale(.6); }
.pad-node.locked .pad-bol { background: #f3f4f6; border-color: var(--line); font-size: 24px; }
@keyframes pad-pulso { 50% { transform: scale(1.08); } }

.pad-st { color: #f59e0b; font-size: 18px; letter-spacing: 1px; }
.pad-st i { font-style: normal; color: #e5e7eb; }
.pad-res-st .pad-st { font-size: 46px; letter-spacing: 6px; }
.pad-res-knoppen { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }

/* Uitleg */
.pad-terug { margin-bottom: 12px; }
.pad-les h2 { font-size: 22px; }
.pad-vb { margin: 14px 0 4px; }
.pad-dig { margin-top: 10px; }

/* Vraag */
.pad-qh { gap: 10px; }
.pad-qtitel { flex: 1 1 auto; min-width: 0; text-align: center; }
.pad-qtitel b { display: block; font-size: 17px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pad-dots { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.pad-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.pad-dots i.ok { background: var(--green); }
.pad-dots i.nee { background: var(--red); }
.pad-dots i.nu { background: #fff; border: 3px solid var(--orange); }
.pad-hulp {
  margin-top: 12px; min-height: 48px; padding: 0 20px; border-radius: 999px;
  border: 2px solid #fcd34d; background: #fffbeb; color: #92400e;
  font: inherit; font-weight: 900; font-size: 17px; cursor: pointer;
}
.pad-hulp:disabled { opacity: .6; cursor: default; }
.pad-hulptekst ol { text-align: left; margin: 12px 0 0; padding: 12px 14px 12px 34px; border-radius: var(--r-md); background: #fffbeb; font-weight: 700; line-height: 1.5; }
.pad-hulptekst li + li { margin-top: 6px; }
.pad-tip { text-align: center; font-weight: 800; margin-bottom: 10px; min-height: 0; }
.pad-schermpje {
  padding: 28px 14px; border-radius: var(--r-md);
  background: #111827; color: #a7f3d0;
}
.pad-schermpje .digital { color: #a7f3d0; }
.pad-schermpje .daypart .nl { color: #fde68a; }
.pad-som { font-size: clamp(22px, 4.4vw, 32px); }
.pad-schermpje + .clock-host { margin-top: 14px; max-width: 240px; margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  .pad-node.now .pad-bol { animation: none; }
}
