/* Fritidshack – the shared look of the school games ("Skolspel"): the game box (4 i rad's night sky with twinkling
   stars), the top strip (KM + the round's dots), screens, menu cards, feedback, the number pad (+ dragging digits),
   the hologram look of a task, the result, fullscreen and the effects (js/skol-ui.js). Each game adds its own CSS only
   for what is special to it. Colours come from css/style.css. */

/* Nothing comes after the box on a school game's page (the help is the "?" in the box), so the page needs no room
   under it: with the section's usual 3rem the page could still be scrolled 48 px (owner, 2026-10-14: never) */
.section.game-main.skol-main {
  padding-bottom: 0;
}

.skol-stage {
  --safe-top: 0px;
  --safe-right: 0px;
  --safe-bottom: 0px;
  --safe-left: 0px;
  /* The box fills the window under the row above it (owner, 2026-10-13: "one game = one screen", like the other
     games' boxes in css/game-stage.css): the screen showing sits in the middle of it and is zoomed to the biggest size
     that fits (js/skol-ui.js fit, --skol-zoom). If it can't fit even at the smallest size (a phone held upright, for
     now) the box grows instead. --stage-top = where the box starts on the page (js/game-ui.js measures it). */
  --stage-top: 7.5rem;
  --room: calc(var(--window-height) - var(--stage-top) - 0.75rem);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: max(24rem, var(--room));
  margin-bottom: 0.75rem;
  padding: 0.6rem 1rem 0.75rem;
  overflow: hidden;              /* sparks and pop-up texts stay inside */
  isolation: isolate;            /* the stars (z-index -1) stay behind the content but inside the box */
  background-color: #07051a;
  background-image: linear-gradient(#07051a, #1b0f4a 60%, #2a1368);   /* 4 i rad's sky */
  border: 2px solid var(--cyan);
  box-shadow: 0 0 18px rgba(94, 240, 255, 0.35);
}

/* Fullscreen (js/game-ui.js setupFullscreen): the box fills the screen, the content in the middle */
.skol-stage.is-fullscreen {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  position: fixed;
  inset: 0;
  z-index: 1000;
  justify-content: flex-start;
  min-height: 0;
  margin: 0;
  padding: calc(1rem + var(--safe-top)) calc(1rem + var(--safe-right)) calc(4rem + var(--safe-bottom)) calc(1rem + var(--safe-left));
  overflow: auto;
  border: none;
  box-shadow: none;
}

/* A low screen in fullscreen (a phone held sideways, ~390 px): less room under the content – the corner buttons sit
   beside the centred task + pad there, not under them */
@media (max-height: 500px) {
  .skol-stage.is-fullscreen {
    padding-bottom: calc(1rem + var(--safe-bottom));
  }
}

/* The top strip stays at the top (in the flow, so nothing can run into it); the screen is centred in the room left
   under it (owner: the dots ran into the task's name on a phone) */
.skol-stage > .skol-screen {
  margin-block: auto;
}

/* The menu's cards may reach the bottom corners: room for the sound button there (1.8rem: Subtraktion inom 100's
   six cards were 7 px too tall for a 1280 x 575 Chromebook with 2.4rem, and the page scrolled) */
.skol-stage > #menu {
  padding-bottom: 1.8rem;
}

/* The HTML follows the box (CLAUDE.md "Fullscreen = the HTML grows"; owner 2026-10-13 "one game = one screen"): the
   top strip and the screen are zoomed by --skol-zoom, which js/skol-ui.js fit() works out – as big as the box allows
   (more in fullscreen and on big screens, a little less in a low window) but never so big that it doesn't fit. The
   corner buttons (fullscreen, sound, back, help) are not inside them: they keep their size. */
.skol-stage > .skol-top,
.skol-stage > .skol-screen {
  zoom: var(--skol-zoom, 1);
}

/* A landscape box (computers, Chromebooks, a tablet held sideways; owner, Oct 2026: the bottom of the play screen was
   cut off): the number pad sits to the RIGHT of the task instead of under it – the pad ends level with the task,
   "Svara" on the feedback's line. Since 2026-10-13 in the normal box too, with tighter gaps. */
@media (orientation: landscape) {
  .skol-stage .skol-play:not([hidden]) {
    display: grid;
    /* The task's column is at least 20rem wide, so a task a little wider or narrower than the one before (one more
       column, a longer fact) doesn't move the pad and "Svara" (owner, 2026-10-14: nothing may jump while you play) */
    grid-template-columns: minmax(20rem, max-content) auto;
    column-gap: 3rem;
    align-items: start;
    justify-content: center;
  }

  .skol-stage .skol-play > .skol-label { grid-column: 1 / -1; margin: 0 0 0.4rem; }
  .skol-stage .skol-play > .skol-holo { grid-column: 1; grid-row: 2; margin: 0.25rem auto 0.5rem; }
  /* The feedback line wraps inside the task's column and never widens it: before, a long hint ("Skriv svaret. Börja
     längst till höger!") made the column wider than the task, so everything slid sideways on the first key press and
     again at "Inte rätt – titta på det som är ringat!" (contain: inline-size = its text doesn't count for the width) */
  .skol-stage .skol-play > .skol-feedback { grid-column: 1; grid-row: 3; min-width: 0; margin-bottom: 0.25rem; contain: inline-size; }
  .skol-stage .skol-play > .skol-pad { grid-column: 2; grid-row: 2; align-self: end; margin-bottom: 0.75rem; }
  .skol-stage .skol-play > .skol-actions { grid-column: 2; grid-row: 3; }
}

/* The twinkling stars (made by js/skol-ui.js, places like 4 i rad's): behind everything, never catch clicks */
.skol-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;              /* a star at the very edge must not make the box "wider" (js/skol-ui.js fit measures
                                    the box's scroll width: one px over and it shrank the whole screen to 0.8) */
  pointer-events: none;
}

.skol-star {
  position: absolute;
  background: #fff;
  opacity: 0.35;
  animation: skol-twinkle var(--twinkle, 4.8s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes skol-twinkle {
  50% { opacity: 0.85; }
  0%, 100% { opacity: 0.1; }
}

/* A corner button the game doesn't use yet (the sound button while the school games have no sounds) */
.skol-stage .icon-button[hidden] {
  display: none;
}

/* ---------- Top strip: KM (the coin), the round's dots, room for the fullscreen button ---------- */

.skol-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.6rem;
  padding: 0 3.2rem;             /* the help button sits top left, the fullscreen button top right */
}

.skol-coins {
  display: flex;                 /* the coin and the number centred on each other */
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-weight: 800;
  font-style: italic;
}

.skol-coins[hidden] {
  display: none;
}

/* The number wears the coin's red outline (owner, 2026-10-18: "samma outlinefärg som symbolen") – but as MILD as the
   coin's looks under its glow (owner, same day: the full #ab2732 was too strong beside it): a little thinner in colour, see-through (owner: "lite tjockare" = 2 px) */
.skol-coins strong {
  --coin-edge: rgba(171, 39, 50, 0.55);   /* kunskapsmynt's outline #ab2732, softened */
  font-size: 1.5rem;
  line-height: 1;
  color: var(--yellow);
  text-shadow:
    2px 0 var(--coin-edge), -2px 0 var(--coin-edge), 0 2px var(--coin-edge), 0 -2px var(--coin-edge),
    1.4px 1.4px var(--coin-edge), -1.4px 1.4px var(--coin-edge), 1.4px -1.4px var(--coin-edge), -1.4px -1.4px var(--coin-edge),
    0 0 10px rgba(255, 233, 77, 0.55);
}

/* A coin landing (fx.coins): the strip's coin and number give a little bounce */
.skol-coins .km-coin.skol-coin-in,
.skol-coins strong.skol-coin-in {
  animation: skol-coin-in 0.22s ease-out;
}

@keyframes skol-coin-in {
  40% { transform: scale(1.25); filter: drop-shadow(0 0 10px rgba(255, 233, 77, 0.95)); }
}

/* The KM ticking up during a round (owner, 2026-11-08): "+6" beside the balance grows with each right answer */
.skol-coins-gain {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--yellow);
  text-shadow: 0 0 8px rgba(255, 233, 77, 0.6);
}

.skol-coins-gain[hidden] {
  display: none;
}

.skol-coins-gain.skol-coin-in {
  animation: skol-coin-in 0.22s ease-out;
}

/* A guest collects no KM yet: the coin and what it would have got are DIMMED, so it shows what a saved name gives */
.skol-coins.is-guest,
.skol-earned.is-guest .skol-would {
  opacity: 0.55;
  filter: saturate(0.5);
}

.skol-earned.is-guest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4em 0.8em;
}

/* (the button itself stays bright: it is the way to make the coins real) */
.skol-earned.is-guest .skol-save-name {
  font-size: 1rem;
}

.skol-flying-coin {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255, 233, 77, 0.8));
}

/* The KM coin's own look (.km-coin) is in style.css: Min sida's shop shows it too. */

.skol-coins .km-coin {
  width: 1.9em;
  height: 1.9em;
  filter: drop-shadow(0 0 6px rgba(255, 233, 77, 0.55));
}

.skol-dots {
  display: flex;
  gap: 0.45rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.skol-dot {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--text-muted);
  transform: skewX(-12deg);
  transition: background-color 0.2s, border-color 0.2s;
}

.skol-dot.is-now { border-color: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
/* The right dots glow more as the combo grows (--charge 0-1 on the list, js/skol-game.js) */
.skol-dot.is-right { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 calc(8px + 14px * var(--charge, 0)) var(--cyan); animation: skol-dot-pop 0.35s ease-out; }
.skol-dot.is-wrong { background: var(--magenta); border-color: var(--magenta); animation: skol-dot-pop 0.35s ease-out; }
/* Wrong first, fixed on the second try (docs/skolspel/PEDAGOGIK.md PED-2): half magenta, half cyan – it still counts
   as wrong, but the child sees that the fix worked */
.skol-dot.is-wrong.is-fixed { background: linear-gradient(135deg, var(--magenta) 50%, var(--cyan) 50%); border-color: var(--cyan); }
/* Right and wrong differ in SHAPE too, not only in colour (PEDAGOGIK.md S8, PED-11): a wrong dot has a dark stroke
   across it, like a crossed-out square */
.skol-dot.is-wrong:not(.is-fixed) {
  background: linear-gradient(to top right, var(--magenta) calc(50% - 2px), rgba(10, 6, 30, 0.85) calc(50% - 2px),
    rgba(10, 6, 30, 0.85) calc(50% + 2px), var(--magenta) calc(50% + 2px));
}

@keyframes skol-dot-pop {
  50% { transform: skewX(-12deg) scale(1.6); }
}

/* The level's rounds before the task dots (owner: two passed rounds per level): passed = cyan, this round = yellow */
.skol-pips {
  display: flex;
  gap: 0.3rem;
  margin: 0 0 0 auto;            /* the pips + the dots are centred together */
  padding: 0 0.6rem 0 0;
  list-style: none;
  border-right: 2px solid rgba(94, 240, 255, 0.3);
}

.skol-pips[hidden] {
  display: none;
}

.skol-pips:not([hidden]) + .skol-dots {
  margin-left: 0.6rem;
}

.skol-pip {
  width: 1.8rem;                 /* longer than a task dot: a round is bigger than a task */
  height: 1.1rem;
  border: 2px solid var(--text-muted);
  transform: skewX(-12deg);
}

.skol-pip.is-done { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.skol-pip.is-now { border-color: var(--yellow); animation: skol-pip 1.4s ease-in-out infinite; }

@keyframes skol-pip {
  50% { box-shadow: 0 0 10px var(--yellow); }
}

/* ---------- Screens ---------- */

.skol-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.skol-screen[hidden] {
  display: none;
}

.skol-title {
  margin: 0.25rem 0 0.6rem;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  text-transform: uppercase;
  color: var(--yellow);
  text-shadow: 0 0 14px rgba(255, 233, 77, 0.6);
}

.skol-text {
  max-width: 34rem;
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.skol-hint {
  max-width: 34rem;
  margin: 0.5rem 0;
  color: var(--text-muted);
}

.skol-hint strong {
  color: var(--yellow);
}

.skol-label {
  margin: 0.25rem 0 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ---------- Menu: one big button per skill ----------
   Compact (owner, 2026-10-13: the whole menu on one screen – Tabellerna's seven tables are two rows of cards) */

.skol-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;       /* a last row with fewer cards sits in the middle */
  gap: 0.75rem;
  width: 100%;
}

.skol-skills > .skol-skill-card {
  flex: 1 1 13rem;
  max-width: 15.5rem;
}

/* Skills that come in PAIRS (Subtraktion inom 100: each kind of sheet first uppställd, then "ställ upp själv"): three
   columns, a pair on top of each other, so the twins are seen together. The page puts the class on #skills. */
.skol-skills.is-pairs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 19rem));   /* wide enough for a twin's name on two lines: a 1280 x 575 Chromebook */
  grid-template-rows: auto auto;
  grid-auto-flow: column;
  justify-content: center;
}

.skol-skills.is-pairs > .skol-skill-card {
  max-width: none;
}

/* A game with just one skill (each Ställ upp! game): one card in the middle, not stretched over the whole box */
.skol-skills.is-single {
  max-width: 26rem;
}

.skol-skills.is-single > .skol-skill-card {
  max-width: none;
}

.skol-skill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.6rem 0.9rem;
  font: inherit;
  line-height: 1.3;
  text-align: left;
  color: var(--text);
  background: var(--bg-raised);
  border: 2px solid var(--cyan);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.skol-skill:hover,
.skol-skill:focus-visible {
  border-color: var(--yellow);
  box-shadow: 0 0 14px rgba(255, 233, 77, 0.5);
  transform: translateY(-2px);
}

.skol-skill-name {
  font-size: 1.3rem;
  line-height: 1.2;
  font-style: italic;
  font-weight: 900;
  color: var(--cyan);
}

.skol-skill-stars {
  font-size: 1.15rem;
  letter-spacing: 0.15em;
  color: var(--yellow);
}

.skol-skill-level {
  color: var(--text-muted);
}

/* A menu card: the big button (your own level) + a row of small level buttons (go back and practise) */
.skol-skill-card {
  position: relative;            /* (the repetition badge sits on its corner) */
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.skol-level-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.skol-level-pick {
  width: 2rem;
  height: 2rem;
  font: inherit;
  font-weight: 800;
  color: var(--cyan);
  background: var(--bg-raised);
  border: 2px solid rgba(94, 240, 255, 0.5);
  cursor: pointer;
}

.skol-level-pick:hover:not(:disabled),
.skol-level-pick:focus-visible {
  border-color: var(--yellow);
}

.skol-level-pick.is-current {
  color: var(--bg);
  background: var(--cyan);
}

.skol-level-pick:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Tabellerna's stopwatch choice (PED-4): small, in the menu's top right corner – it takes no height from the cards */
#menu {
  position: relative;
}

.skol-timer-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0 0.7rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 2px solid rgba(94, 240, 255, 0.35);
  cursor: pointer;
}

.skol-timer-toggle svg {
  width: 1.3rem;
  height: 1.3rem;
}

.skol-timer-toggle.is-on {
  color: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 0 10px rgba(255, 233, 77, 0.45);
}

.skol-timer-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .skol-timer-toggle { position: static; margin: 0 auto 0.5rem; }
}

/* Repetition (docs/skolspel/PEDAGOGIK.md PED-8): "↻ 3" = the tasks missed before, a short round of them. A yellow
   badge ON the card's top right corner that breathes (/pedagoger round 1: it sat lost under the level row) */
.skol-review {
  position: absolute;
  top: -0.7rem;
  right: -0.5rem;
  z-index: 1;
  min-width: 44px;
  height: 44px;
  padding: 0 0.6rem;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--bg);
  background: var(--yellow);
  border: 2px solid #fff6b0;
  border-radius: 22px;
  box-shadow: 0 0 14px rgba(255, 233, 77, 0.7);
  cursor: pointer;
  animation: skol-review 1.8s ease-in-out infinite;
}

/* (the card's text keeps clear of the badge) */
.skol-skill-card.has-review > .skol-skill {
  padding-right: 3.4rem;
}

@keyframes skol-review {
  50% { transform: scale(1.1); box-shadow: 0 0 22px rgba(255, 233, 77, 0.95); }
}

.skol-review:hover,
.skol-review:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------- Feedback, number pad, buttons ---------- */

/* Room for two lines ALWAYS, so the pad below doesn't jump when a hint comes or goes (owner: Samsung S23) */
.skol-feedback {
  min-height: 2.6em;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.skol-feedback.is-right { color: var(--cyan); text-shadow: 0 0 10px rgba(94, 240, 255, 0.6); }
.skol-feedback.is-wrong { color: var(--magenta); }
.skol-feedback.is-hint { color: var(--text-muted); }
.skol-feedback.is-help { color: var(--yellow); }

/* The number pad (js/skol-ui.js createNumberPad): 1 2 3 / 4 5 6 / 7 8 9 / 0 ⌫, like a phone – the same in every
   school game (owner, 2026-10-13: no choice of layout any more) */
.skol-pad {
  display: grid;
  grid-template-columns: repeat(3, 3.6rem);
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.skol-pad[hidden],
.skol-choices[hidden] {
  display: none;
}

.skol-pad .skol-key-zero { grid-column: 2; }

.skol-key {
  height: 3rem;
  font: inherit;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  background: var(--bg-raised);
  border: 2px solid rgba(94, 240, 255, 0.5);
  cursor: grab;
  touch-action: none;            /* a finger can drag a digit without scrolling the page */
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.06s;
}

.skol-key:hover,
.skol-key:focus-visible {
  border-color: var(--cyan);
}

.skol-key:active {
  background: rgba(94, 240, 255, 0.25);
  transform: scale(0.94);
}

.skol-key-back {
  color: var(--magenta);
  cursor: pointer;
}

/* A digit being dragged follows the finger/mouse; the square under it lights up */
.skol-drag {
  position: fixed;
  z-index: 2000;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin: -1.5rem 0 0 -1.5rem;   /* centred on the pointer */
  font-size: 2rem;
  font-weight: 900;
  color: var(--yellow);
  text-shadow: 0 0 12px rgba(255, 233, 77, 0.9);
  pointer-events: none;
}

.skol-drop-target {
  background: rgba(255, 233, 77, 0.25) !important;
  box-shadow: 0 0 16px rgba(255, 233, 77, 0.9) !important;
}

/* "Läs upp: på/av" (js/skol-speak.js) next to "Svara" – hidden for now (owner, 2026-10-13; skol-speak.js
   READ_ALOUD): a small text button */
.skol-speak {
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 2px solid rgba(94, 240, 255, 0.3);
  cursor: pointer;
}

.skol-speak.is-on {
  color: var(--cyan);
  border-color: var(--cyan);
}

.skol-speak[hidden] {
  display: none;
}

.skol-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.skol-actions .button[hidden] {
  display: none;
}

/* The answer button keeps one width whatever it says – "Svara", "Vidare" or "Nästa steg" – so it never slides
   sideways under the pad when its text changes (as wide as "Nästa steg") */
.skol-actions #answer {
  min-width: 9.5rem;
}

/* The answer button waits (dim) until there is an answer to send, then it glows */
.skol-actions .button:disabled {
  opacity: 0.35;
  filter: grayscale(0.6);
  cursor: default;
}

.skol-ready {
  animation: skol-ready 1.2s ease-in-out infinite;
}

@keyframes skol-ready {
  50% { box-shadow: 0 0 18px rgba(255, 233, 77, 0.8); }
}

/* ---------- "Tillbaka till menyn" (js/skol-ui.js setupBackButton; like 4 i rad's #to-menu) ---------- */
.skol-to-menu {
  position: absolute;
  z-index: 2;
  left: calc(0.6rem + var(--safe-left));
  bottom: calc(0.6rem + var(--safe-bottom));
  display: flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.3rem 0.55rem;
  font: inherit;
  text-align: left;
  color: var(--text);
  background: rgba(14, 10, 36, 0.8);
  border: 2px solid rgba(94, 240, 255, 0.5);
  opacity: 0.6;
  cursor: pointer;
}

.skol-to-menu[hidden] {
  display: none;
}

.skol-to-menu-icon svg {
  display: block;
  width: 1.4rem;
  height: 1.4rem;
}

/* The words only fold out after the first tap */
.skol-to-menu-text {
  display: flex;
  flex-direction: column;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.3s ease-out, opacity 0.25s, margin 0.3s ease-out;
}

.skol-to-menu-text strong {
  font-style: italic;
  font-weight: 900;
}

.skol-to-menu-text small {
  font-size: 0.8rem;
  font-weight: 700;
}

.skol-to-menu:hover,
.skol-to-menu:focus-visible,
.skol-to-menu.is-open {
  opacity: 1;
  box-shadow: 0 0 10px var(--cyan);
}

.skol-to-menu.is-open {
  color: #0e0a24;
  background: var(--yellow);
  border-color: var(--yellow);
}

.skol-to-menu.is-open .skol-to-menu-text {
  max-width: 22em;
  margin-left: 0.5rem;
  opacity: 1;
}

/* ---------- The hologram look of a task (like 4 i rad's board and the robots' face screens) ----------
   .skol-holo goes AROUND the task: it glows, flickers a little, has scanlines + a rolling light band. NO glitch by itself
   any more (owner, 2026-11-04: "behåll crteffekten men ta bort den periodiska glitchen" – it moved the task while the
   child was thinking; docs/skolspel/PEDAGOGIK.md PED-1). It is switched on when a task comes (skol-holo-on), switched
   off when it is done – like an old TV
   (skol-holo-off-crt) or shimmering away (skol-holo-off-shimmer) after a right answer, cut off (skol-holo-cut) after a
   wrong one – and glitches hard on a wrong answer (skol-holo-glitch). js/skol-ui.js fx.holoIn/holoOut/holoGlitch. */
.skol-holo {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0.5rem auto 1rem;
  padding: 0.4rem 0.6rem;
  isolation: isolate;            /* the scanlines (z-index -1) stay inside, BEHIND the digits */
  background: radial-gradient(ellipse at center, rgba(94, 240, 255, 0.1), rgba(94, 240, 255, 0.02) 70%, transparent);
  animation: skol-holo-flicker 6s steps(1) infinite;
}

/* Scanlines over the task. Owner, Oct 2026: with the old wide glow they made the digits blurry, so they were moved
   behind (z-index: -1); now the glow is tighter they are back in FRONT as a test – put z-index: -1 back if blurry.
   They never catch clicks. */
.skol-holo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(4, 6, 20, 0.32) 0 2px, transparent 2px 5px);
}

/* A soft band of light rolling down, like on the robots' faces */
.skol-holo::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(94, 240, 255, 0.1) 50%, transparent 100%) no-repeat;
  background-size: 100% 30%;
  animation: skol-holo-roll 3.5s linear infinite;
}

@keyframes skol-holo-roll {
  from { background-position: 0 -40%; }
  to { background-position: 0 140%; }
}

/* Mostly steady: two soft CRT dips every 6 s, nothing that moves the task (the sideways glitch at 91-93 % is gone,
   owner 2026-11-04 – a task that jumps while the child reads it steals attention; the wrong answer's glitch stays) */
@keyframes skol-holo-flicker {
  0%, 100% { opacity: 1; }
  31% { opacity: 0.82; }
  32% { opacity: 1; }
  63% { opacity: 0.88; }
  64% { opacity: 1; }
}

/* Switched on: a bright line that opens up (an old TV warming up) */
.skol-holo-on {
  animation: skol-holo-on 0.35s ease-out;
}

@keyframes skol-holo-on {
  0% { opacity: 0; transform: scale(0.6, 0.02); filter: brightness(3); }
  45% { opacity: 1; transform: scale(1, 0.02); filter: brightness(3); }
  100% { transform: none; filter: none; }
}

/* Switched off like an old TV: squeezed to a line, then to a dot that fades */
.skol-holo-off-crt {
  animation: skol-holo-off-crt var(--holo-off, 0.42s) ease-in forwards;
}

@keyframes skol-holo-off-crt {
  0% { transform: none; filter: brightness(1); }
  45% { transform: scale(1, 0.02); filter: brightness(3); }
  75% { opacity: 1; transform: scale(0.04, 0.02); filter: brightness(4); }
  100% { opacity: 0; transform: scale(0, 0); filter: brightness(4); }
}

/* Shimmers away: bright, blurry, wiped away from below */
.skol-holo-off-shimmer {
  animation: skol-holo-off-shimmer var(--holo-off, 0.5s) ease-in forwards;
}

@keyframes skol-holo-off-shimmer {
  0% { clip-path: inset(0 0 0 0); filter: brightness(1) blur(0); }
  40% { filter: brightness(2.2) blur(1px) drop-shadow(0 0 10px var(--cyan)); }
  100% { clip-path: inset(0 0 100% 0); opacity: 0.2; transform: translateY(-0.6rem); filter: brightness(3) blur(4px); }
}

/* After a wrong answer's glitch, what went wrong gets a hand-drawn ring in RED, like a teacher's red pen (owner, Oct
   2026: red, not magenta; never the right answer). Every school game: the game puts .is-ringed on it (js/skol-game.js
   ringMistakes). */
.skol-stage {
  --red-pen: #ff3b3b;
}

.skol-stage .is-ringed {
  position: relative;
}

.skol-stage .is-ringed::before {
  content: "";
  position: absolute;
  inset: -0.18em -0.06em;
  border: 0.12em solid var(--red-pen);
  border-radius: 50% 45% 55% 48%;
  transform: rotate(-8deg);
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(255, 59, 59, 0.9));
  animation: skol-ring 0.35s ease-out;
}

@keyframes skol-ring {
  from { opacity: 0; transform: rotate(-8deg) scale(1.4); }
}

/* While fixing (PED-2): the first, wrong answer stays in the emptied square, struck through and faint – the child sees
   what they wrote (/pedagoger round 1, Pipen: an empty ringed square looked like a bug) */
.tb-box[data-old]:empty::before,
.pg-box[data-old]:empty::before {
  content: attr(data-old);
  color: var(--magenta);
  text-decoration: line-through 0.08em;
  opacity: 0.55;
}

/* (an uppställning's answer square: its ::before is the red ring and its ::after the "write here" arrow, so the old
   digit is a span of its own, stallupp.js) */
.su-old {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--magenta);
  text-decoration: line-through 0.08em;
  opacity: 0.55;
  pointer-events: none;
}

/* "Läs upp" on: a card read aloud by a first tap is marked (the second tap answers) */
.skol-choice.is-heard {
  border-color: var(--yellow);
  box-shadow: 0 0 14px rgba(255, 233, 77, 0.6);
}

/* While the child may change the ringed part (PED-2): the rings breathe – "here, change this" without a word */
.skol-play.is-fixing .is-ringed::before,
#play.is-fixing .is-ringed::before {
  animation: skol-ring 0.35s ease-out, skol-ring-breathe 1.2s ease-in-out 0.35s infinite;
}

@keyframes skol-ring-breathe {
  50% { transform: rotate(-8deg) scale(1.12); filter: drop-shadow(0 0 9px rgba(255, 59, 59, 1)); }
}

/* A wrong answer: hard glitching (colour split, slices jumping) – the shake and magenta stay */
.skol-holo-glitch {
  animation: skol-holo-glitch 0.5s steps(1);
}

@keyframes skol-holo-glitch {
  0% { transform: translateX(-6px) skewX(8deg); filter: drop-shadow(5px 0 rgba(255, 63, 180, 0.9)) drop-shadow(-5px 0 rgba(94, 240, 255, 0.9)); clip-path: inset(10% 0 40% 0); }
  15% { transform: translateX(5px); filter: drop-shadow(-6px 0 rgba(255, 63, 180, 0.9)); clip-path: inset(0 0 0 0); opacity: 0.6; }
  30% { transform: translateX(-3px) skewX(-6deg); filter: drop-shadow(4px 0 rgba(94, 240, 255, 0.9)); clip-path: inset(45% 0 5% 0); opacity: 1; }
  45% { transform: translateX(4px); clip-path: inset(0 0 0 0); filter: drop-shadow(-3px 0 rgba(255, 63, 180, 0.9)); }
  60% { transform: none; opacity: 0.75; filter: none; }
  75% { transform: translateX(-2px); opacity: 1; filter: drop-shadow(2px 0 rgba(255, 63, 180, 0.9)); }
  100% { transform: none; filter: none; }
}

/* After a wrong answer: the picture cuts out with a stutter */
.skol-holo-cut {
  animation: skol-holo-cut var(--holo-off, 0.3s) steps(1) forwards;
}

@keyframes skol-holo-cut {
  0% { opacity: 0.2; }
  20% { opacity: 1; transform: translateX(3px); }
  40% { opacity: 0.1; }
  60% { opacity: 0.7; transform: scale(1, 0.5); }
  80%, 100% { opacity: 0; }
}

/* Växling: a small "−1" pops up by the struck digit (fx.tag) and glowing orbs fly to the note square (fx.flow) */
.skol-tag {
  position: absolute;
  z-index: 4;
  font-size: 1.3rem;
  font-weight: 900;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: skol-tag 1s ease-out forwards;
}

.skol-tag-minus { color: var(--magenta); text-shadow: 0 0 8px rgba(255, 63, 180, 0.9); }
.skol-tag-plus { color: var(--cyan); text-shadow: 0 0 8px rgba(94, 240, 255, 0.9); }

@keyframes skol-tag {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  70% { opacity: 1; transform: translate(-50%, -90%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -140%) scale(1); }
}

.skol-orb {
  position: absolute;
  z-index: 4;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #ffffff 15%, rgba(94, 240, 255, 1) 35%, rgba(94, 240, 255, 0) 72%);
  box-shadow: 0 0 14px 4px rgba(94, 240, 255, 0.55);   /* a brighter glow around each orb */
  pointer-events: none;
}

.skol-flow-in {
  animation: skol-flow-in 0.45s ease-out;
}

@keyframes skol-flow-in {
  30% { box-shadow: 0 0 18px rgba(94, 240, 255, 1), inset 0 0 12px rgba(94, 240, 255, 0.6); }
}

/* ---------- Result ---------- */

/* The level meter: a hologram bar that fills from where it was (half = "Nästan där!", full = the level is done) */
.skol-meter {
  width: min(22rem, 100%);
  margin: 0.25rem auto 0.75rem;
}

.skol-meter[hidden] {
  display: none;
}

.skol-meter-bar {
  position: relative;
  height: 1.3rem;
  overflow: hidden;
  background: rgba(94, 240, 255, 0.06);
  border: 2px solid rgba(94, 240, 255, 0.6);
  box-shadow: 0 0 12px rgba(94, 240, 255, 0.35), inset 0 0 10px rgba(94, 240, 255, 0.15);
  transform: skewX(-12deg);
}

/* The half-way mark */
.skol-meter-bar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 1;
  width: 2px;
  background: rgba(94, 240, 255, 0.5);
}

/* Scanlines over the bar */
.skol-meter-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(to bottom, rgba(4, 6, 20, 0.35) 0 2px, transparent 2px 4px);
}

.skol-meter-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(94, 240, 255, 0.55), var(--cyan));
  box-shadow: 0 0 14px var(--cyan);
  transition: width 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s;
}

.skol-meter.is-full .skol-meter-fill {
  background: linear-gradient(90deg, var(--cyan), var(--yellow));
  box-shadow: 0 0 18px var(--yellow);
}

.skol-meter-text {
  margin: 0.4rem 0 0;
  font-weight: 900;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(94, 240, 255, 0.6);
}

.skol-meter.is-full .skol-meter-text {
  color: var(--yellow);
  text-shadow: 0 0 12px rgba(255, 233, 77, 0.8);
}

.skol-score {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  font-weight: 900;
  font-style: italic;
}

.skol-earned {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 900;
  font-style: italic;
  color: var(--yellow);
  text-shadow: 0 0 14px rgba(255, 233, 77, 0.6);
  animation: skol-pop-in 0.5s ease-out;
}

.skol-earned[hidden] {
  display: none;
}

/* The result's title pops in; all right = bigger and pulsing */
#result:not([hidden]) .skol-title {
  animation: skol-pop-in 0.5s ease-out;
}

.skol-title.skol-big-win {
  font-size: clamp(2.2rem, 8vw, 4rem);
  animation: skol-pop-in 0.5s ease-out, skol-glow 1.4s ease-in-out 0.5s infinite;
}

@keyframes skol-glow {
  50% { text-shadow: 0 0 28px rgba(255, 233, 77, 1), 3px 3px 0 var(--magenta); }
}

/* A new level: the text grows, turns yellow and glows */
.skol-level-up {
  font-size: 1.4rem;
  font-weight: 900;
  font-style: italic;
  color: var(--yellow);
  text-shadow: 0 0 14px rgba(255, 233, 77, 0.8);
  animation: skol-pop-in 0.6s ease-out;
}

.skol-result-dots {
  margin: 0.25rem auto 1rem;
}

.skol-result-dots .skol-dot {
  width: 1.6rem;
  height: 1.6rem;
}

/* "?" in the top left corner (like the other corner buttons, it keeps its size): how to play, in a small panel over
   the game (js/skol-ui.js; owner, 2026-10-13: help inside the game – nobody reads a text under the box) */
.skol-help-button {
  top: calc(0.6rem + var(--safe-top));
  left: calc(0.6rem + var(--safe-left));
  font: inherit;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--cyan);
}

.skol-help-button[aria-expanded="true"] {
  opacity: 1;
  box-shadow: 0 0 10px var(--cyan);
}

.skol-help {
  position: absolute;
  z-index: 5;
  top: calc(3.6rem + var(--safe-top));
  left: calc(0.6rem + var(--safe-left));
  max-width: min(28rem, calc(100% - 1.2rem));
  padding: 0.8rem 1rem;
  text-align: left;
  color: var(--text);
  background: rgba(14, 10, 36, 0.95);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 14px rgba(94, 240, 255, 0.45);
}

.skol-help[hidden] {
  display: none;
}

.skol-help p {
  margin: 0;
}

.skol-help kbd {
  padding: 0 0.35em;
  font: inherit;
  font-weight: 700;
  color: var(--cyan);
  border: 1px solid rgba(94, 240, 255, 0.4);
}

/* ---------- Effects (js/skol-ui.js) ---------- */

.skol-fx {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* A big text that pops up in the middle and fades away */
.skol-pop {
  position: absolute;
  top: 38%;
  left: 50%;
  z-index: 4;
  margin: 0;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  scale: var(--pop-scale, 1);          /* the combo makes "N i rad!" bigger (js/skol-ui.js pop) */
  animation: skol-pop 1.1s ease-out forwards;
}

/* The charge (js/skol-ui.js): a layer over the box that flashes with the combo – never catches clicks */
.skol-flash-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
}

.skol-flash-layer.is-on {
  animation: skol-box-flash 0.55s ease-out;
}

@keyframes skol-box-flash {
  0% { opacity: 1; box-shadow: inset 0 0 calc(30px + 90px * var(--charge, 0.5)) rgba(94, 240, 255, calc(0.25 + 0.55 * var(--charge, 0.5))); }
  100% { opacity: 0; box-shadow: inset 0 0 20px rgba(94, 240, 255, 0); }
}

/* A level done: the stars twinkle fast for a moment (is-party, js/skol-ui.js celebrate) and the meter's bar pulses */
.skol-sky.is-party > .skol-star {
  animation-duration: 0.45s;
}

.skol-meter.is-celebrating .skol-meter-bar {
  animation: skol-meter-party 0.9s ease-out;
}

@keyframes skol-meter-party {
  0% { box-shadow: 0 0 0 0 rgba(255, 233, 77, 0.9), 0 0 40px var(--yellow); }
  100% { box-shadow: 0 0 0 18px rgba(255, 233, 77, 0), 0 0 0 var(--yellow); }
}

.skol-pop-right { color: var(--cyan); text-shadow: 0 0 18px rgba(94, 240, 255, 0.8); }
.skol-pop-streak { color: var(--yellow); text-shadow: 0 0 20px rgba(255, 233, 77, 0.9), 3px 3px 0 var(--magenta); }
.skol-pop-wrong { color: var(--magenta); text-shadow: 0 0 14px rgba(255, 63, 180, 0.7); font-size: clamp(1.8rem, 6vw, 3rem); }
.skol-pop-level { color: var(--yellow); text-shadow: 0 0 24px rgba(255, 233, 77, 1), 3px 3px 0 var(--cyan); animation-duration: 1.8s; }

@keyframes skol-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) skewX(-8deg); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) skewX(-8deg); }
  35% { transform: translate(-50%, -50%) scale(1) skewX(-8deg); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1) skewX(-8deg); }
}

@keyframes skol-pop-in {
  0% { opacity: 0; transform: scale(0.5); }
  60% { opacity: 1; transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* A wrong answer: a short "no" shake */
.skol-shake {
  animation: skol-shake 0.45s ease-out;
}

@keyframes skol-shake {
  15% { transform: translateX(-9px); }
  35% { transform: translateX(8px); }
  55% { transform: translateX(-5px); }
  75% { transform: translateX(3px); }
}

.skol-flash-right {
  animation: skol-flash-right 0.6s ease-out;
}

@keyframes skol-flash-right {
  30% { filter: drop-shadow(0 0 14px var(--cyan)) brightness(1.4); }
}

.skol-flash-wrong {
  animation: skol-flash-wrong 0.6s ease-out;
}

@keyframes skol-flash-wrong {
  30% { filter: drop-shadow(0 0 12px var(--magenta)); }
}

/* What the game places itself in the box (pop-up texts, "−1"/"+10", the orbs, a dragged digit) follows the same
   --skol-zoom as the screens (js/skol-ui.js fit). Zoom would also move them, so their own sizes are multiplied. */
.skol-stage .skol-pop {
  font-size: calc(clamp(2.2rem, 8vw, 4.5rem) * var(--skol-zoom, 1));
}

.skol-stage .skol-pop-wrong {
  font-size: calc(clamp(1.8rem, 6vw, 3rem) * var(--skol-zoom, 1));
}

.skol-stage .skol-tag {
  font-size: calc(1.3rem * var(--skol-zoom, 1));
}

.skol-stage .skol-orb {
  width: calc(1.2rem * var(--skol-zoom, 1));
  height: calc(1.2rem * var(--skol-zoom, 1));
}

.skol-stage .skol-drag {
  width: calc(3rem * var(--skol-zoom, 1));
  height: calc(3rem * var(--skol-zoom, 1));
  margin: calc(-1.5rem * var(--skol-zoom, 1)) 0 0 calc(-1.5rem * var(--skol-zoom, 1));
  font-size: calc(2rem * var(--skol-zoom, 1));
}

/* Less movement for those who asked their computer for it */
@media (prefers-reduced-motion: reduce) {
  .skol-pop, .skol-shake, .skol-dot, .skol-ready, .skol-earned, .skol-title, .skol-level-up, .skol-holo-on, .skol-holo-off-crt,
  .skol-holo-off-shimmer, .skol-holo-glitch, .skol-holo-cut { animation-duration: 0.01s !important; }
  .skol-holo, .skol-holo::before, .skol-star, .skol-pip, .skol-stage .is-ringed::before, .skol-flash-layer.is-on,
  .skol-meter.is-celebrating .skol-meter-bar, .skol-review, #play.is-fixing .is-ringed::before { animation: none; }
  .skol-meter-fill { transition: none; }
  .skol-orb { display: none; }
  .skol-coins .skol-coin-in { animation: none; }
}

/* ---------- Phones held upright (owner, 2026-10-14: no scrolling there either) ----------
   The task on top, the pad under it, everything a little tighter so a task fits the room under the page's head
   (390 x 664 = about 500 px for the box): the box keeps a short bottom padding (the Svara button in the middle is
   clear of the corner buttons), the feedback and keys are smaller, and a menu with many cards (Tabellerna's seven,
   Subtraktion inom 100's six) scrolls INSIDE the box – the page itself never scrolls. */
@media (max-width: 480px) {
  .skol-stage {
    padding: 0.75rem 0.5rem 1rem;
  }

  /* The menu's cards in one column (the twins of Subtraktion inom 100 under each other), scrolling in the box when
     there are more than fit; the result keeps clear of the corner buttons */
  .skol-stage > #menu {
    max-height: calc(var(--room) - 5.5rem);
    padding: 0 0.25rem 0.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .skol-stage > #result {
    padding-bottom: 2.4rem;
  }

  .skol-skills.is-pairs {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
  }

  .skol-skills > .skol-skill-card {
    flex-basis: 100%;
    max-width: none;
  }

  .skol-label {
    margin-bottom: 0.4rem;
  }

  .skol-feedback {
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
  }

  .skol-pad {
    grid-template-columns: repeat(3, 3.4rem);
    gap: 0.3rem;
    margin-bottom: 0.4rem;
  }

  .skol-holo {
    padding: 0.3rem 0.5rem;
  }

  .skol-key {
    height: 2.6rem;
  }

  /* The task sits a little closer to the line above and the feedback under it */
  .skol-stage .skol-play > .skol-holo,
  .skol-stage .skol-play > .su-with-blocks {
    margin: 0.25rem auto 0.5rem;
  }

  /* Phones: smaller dots and pips, so a round of ten fits between the "?" and the fullscreen button (a little smaller
     still since 2026-11-04: on a 390 px phone Tabellerna's ten ran into the fullscreen button – /pedagoger round 1) */
  .skol-dots {
    gap: 0.22rem;
  }

  .skol-dot {
    width: 0.7rem;
    height: 0.7rem;
  }

  .skol-pip {
    width: 1rem;
    height: 0.7rem;
  }
}

/* ---------- The analogue clock (js/skol-clock.js; Klockan, Fånga tiden) ----------
   Hologram look: a cyan dial, a short thick YELLOW hour hand and a long CYAN minute hand (owner, 2026-10-14), the hour's
   tårtbit (what has passed: cyan; what is left: yellow), the hour hand's arc between two numbers, helper rings, and the
   sky behind the dial for the 24-hour day. --clock is its size (square). The big clock follows the window's width AND
   height (--big-clock, 2026-10-17, found by tests/no-scroll-browser.mjs): a 1280 x 720 Chromebook shows only ~575 px
   of the page, and with 19rem a task with something under the clock (the digital boxes, the sun/moon switch,
   "Stopp!") didn't fit even at the smallest zoom, so the page scrolled. The small clocks are sized from it
   (.skol-choices.is-clocks). */
.skol-stage {
  --big-clock: clamp(13rem, min(42vw, 42vh), 19rem);
  --clock: var(--big-clock);
}

.skol-clock {
  position: relative;
  z-index: 1;                    /* in FRONT of the hologram's scanlines (owner, 2026-10-15: the numbers must stay readable) */
  display: block;
  width: var(--clock);
  height: var(--clock);
  margin: 0 auto;                /* centred in whatever holds it (the small clocks' buttons on a phone) */
  overflow: visible;
  touch-action: none;            /* a finger can drag a hand without scrolling the page */
  user-select: none;
  -webkit-user-select: none;
}

.skol-clock-face {
  fill: rgba(10, 8, 40, 0.55);
  stroke: var(--cyan);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px rgba(94, 240, 255, 0.6));
}

.skol-clock.has-sky .skol-clock-face {
  fill: rgba(10, 8, 40, 0.25);   /* the sky shows through */
}

.skol-clock-sky { display: none; }
.skol-clock.has-sky .skol-clock-sky { display: block; }
.skol-clock-sun { fill: #ffe94d; filter: drop-shadow(0 0 8px rgba(255, 233, 77, 0.9)); }
.skol-clock-moon { fill: #f4f1dc; filter: drop-shadow(0 0 6px rgba(244, 241, 220, 0.8)); }
.skol-clock-stars circle { fill: #fff; opacity: 0.85; }

.skol-clock-tick { stroke: rgba(94, 240, 255, 0.55); stroke-width: 1.2; }
.skol-clock-tick-big { stroke: var(--cyan); stroke-width: 2.4; }

.skol-clock-numeral {
  font-size: 17px;
  font-weight: 900;
  fill: #f2feff;
  text-shadow: 0 0 6px rgba(94, 240, 255, 0.7);
}

.skol-clock-minute-number {
  font-size: 8px;
  font-weight: 800;
  fill: var(--cyan);
}

.skol-clock-24 {
  font-size: 7.5px;
  font-weight: 700;
  fill: rgba(255, 233, 77, 0.8);
}

/* The tårtbit: passed = cyan; left (the "i" times) = yellow */
.skol-clock-sector { fill: rgba(94, 240, 255, 0.22); stroke: none; }
.skol-clock-sector.is-left { fill: rgba(255, 233, 77, 0.24); }
.skol-clock-sector.is-pulse { animation: skol-sector-pulse 1s ease-out; }

@keyframes skol-sector-pulse {
  30% { fill-opacity: 2.5; filter: drop-shadow(0 0 10px var(--cyan)); }
}

/* The hour hand's way from one number to the next (the faint whole way, the bright part it has come) */
.skol-clock-hourarc-back { fill: none; stroke: rgba(255, 233, 77, 0.25); stroke-width: 5; stroke-linecap: butt; }
.skol-clock-hourarc { fill: none; stroke: var(--yellow); stroke-width: 5; stroke-linecap: butt; filter: drop-shadow(0 0 4px rgba(255, 233, 77, 0.9)); }

.skol-clock-hand-hour {
  stroke: var(--yellow);
  stroke-width: 7;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(255, 233, 77, 0.9));
}

.skol-clock-hand-minute {
  stroke: var(--cyan);
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(94, 240, 255, 0.9));
}

.skol-clock.hands-hour .skol-clock-minute,
.skol-clock.hands-none .skol-clock-hands { display: none; }

.skol-clock-cap { fill: #f2feff; }

/* The wide invisible lines over the hands that catch the finger */
.skol-clock-hit {
  stroke: transparent;
  stroke-width: 22;
  stroke-linecap: round;
  cursor: grab;
}

.skol-clock.is-dragging .skol-clock-hit { cursor: grabbing; }

/* Faint dashed hands at another time (Fånga tiden: where you should have stopped) */
.skol-clock-ghost-hour { stroke: rgba(255, 233, 77, 0.5); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 5 4; }
.skol-clock-ghost-minute { stroke: rgba(94, 240, 255, 0.5); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 5 4; }
/* The child's own wrong choice beside the real hands (Klockan's fix): magenta = "your answer was wrong", strong
   enough to see against the dark dial (MEGA, round 2: the faint olive was hard to see) */
.skol-clock-ghost.is-picked .skol-clock-ghost-hour { stroke: var(--magenta); stroke-width: 8; stroke-dasharray: 7 5; filter: drop-shadow(0 0 4px rgba(255, 63, 180, 0.8)); }
.skol-clock-ghost.is-picked .skol-clock-ghost-minute { stroke: var(--magenta); stroke-width: 5; stroke-dasharray: 7 5; }

/* The red pen on the clock (js/skol-game.js ringMistakes -> clock.ring) */
.skol-clock-ring {
  fill: none;
  stroke: var(--red-pen);
  stroke-width: 3;
  filter: drop-shadow(0 0 4px rgba(255, 59, 59, 0.9));
  animation: skol-clock-ring 0.35s ease-out;
}

@keyframes skol-clock-ring {
  from { opacity: 0; transform: scale(1.3); }
}

/* The demo's glowing fingertip dragging the minute hand (the first task on a level shows itself) */
.skol-clock-finger {
  display: none;
  fill: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 0 8px #fff);
  pointer-events: none;
}

/* ---------- Big buttons to pick from (js/skol-ui.js createChoices): words, or small clocks ---------- */
.skol-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.6rem;
  width: min(34rem, 100%);
  margin: 0 auto 1rem;
}

.skol-choices.is-many {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skol-choice {
  min-height: 3.6rem;
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-size: 1.45rem;
  font-weight: 900;
  font-style: italic;
  color: #f2feff;
  background: var(--bg-raised);
  border: 2px solid rgba(94, 240, 255, 0.6);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.skol-choice:hover:not(:disabled),
.skol-choice:focus-visible {
  border-color: var(--yellow);
  box-shadow: 0 0 14px rgba(255, 233, 77, 0.5);
  transform: translateY(-2px);
}

.skol-choice:disabled { cursor: default; }
.skol-choice.is-picked { border-color: var(--yellow); box-shadow: 0 0 14px rgba(255, 233, 77, 0.6); }
.skol-choice.is-right { border-color: var(--cyan); box-shadow: 0 0 14px rgba(94, 240, 255, 0.7); }

/* Small clocks as choices (inside the hologram): the buttons are just a frame around the clock. In ONE ROW, as big as
   the task allows (owner, 2026-10-17: on an iPad held sideways they were tiny and wrapped 2 + 1): three are 0.71 of the
   big clock, so the hologram is about as tall as a reading task's and the round's zoom doesn't shrink for them
   (js/skol-ui.js fit); four are 0.6 of it, so the row still fits a 1024 px iPad. An iPad held upright: three in a row,
   four two by two; a phone: two by two (three = two + one, the last one centred). */
.skol-choices.is-clocks,
.skol-choices.is-clocks.is-many {
  --clock: calc(var(--big-clock) * 0.71);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: auto;
  margin-bottom: 0;
}

.skol-choices.is-clocks.is-many {
  --clock: calc(var(--big-clock) * 0.6);
}

.skol-choices.is-clocks .skol-choice {
  display: grid;
  place-items: center;
  padding: 0.3rem;
  background: none;
}

@media (orientation: portrait) and (min-width: 481px) {
  .skol-choices.is-clocks,
  .skol-choices.is-clocks.is-many {
    --clock: calc(var(--big-clock) * 0.6);
  }

  /* room for two buttons (the clock + its padding and border) and the gap between them */
  .skol-choices.is-clocks.is-many {
    max-width: calc(2 * (var(--clock) + 0.6rem + 4px) + 0.6rem);
  }
}

@media (max-width: 480px) {
  .skol-choices.is-clocks,
  .skol-choices.is-clocks.is-many {
    --clock: 8.5rem;
  }
}

/* Fullscreen on a landscape screen: the cards go to the right of the clock, like the number pad */
@media (orientation: landscape) {
  .skol-stage.is-fullscreen .skol-play > .skol-choices { grid-column: 2; grid-row: 2; align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .skol-clock-ring, .skol-clock-sector.is-pulse { animation: none; }
}
