/* Wight Flight page – the game box itself is in css/game-stage.css.
   The look follows the game: a child's notebook. Menus are sheets of lined paper, buttons and
   cards are coloured paper cutouts with a pencil outline, text is handwritten (Patrick Hand). */

/* Patrick Hand is saved on our own server (licence in public/fonts/PatrickHand-OFL.txt) */
@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/patrickhand-latin.woff2") format("woff2");
}

/* Lilita One: a chunky, rounded font for what must stand out – score, chain, gold, big titles
   (saved on our own server too, licence in public/fonts/LilitaOne-OFL.txt) */
@font-face {
  font-family: "Lilita One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/lilitaone-latin.woff2") format("woff2");
}

.stage {
  /* Notebook colours (the canvas paper in code/draw.js uses the same) */
  --paper: #fbf8ef;
  --paper-line: #c9dcf0;
  --paper-margin: #f0a3ab;
  --ink: #2c3150;           /* pencil/ink text and outlines */
  --ink-soft: #66698a;
  --crayon-pink: #ff4fa3;
  --crayon-yellow: #ffd93b;
  --crayon-cyan: #6fd8ee;
  --crayon-green: #8fd66a;
  --crayon-red: #ef5b62;
  --crayon-blue: #4a86ff;
  --cutout-shadow: 3px 4px 0 rgba(44, 49, 80, 0.22);
  --hand: "Patrick Hand", "Comic Sans MS", system-ui, sans-serif;     /* text: handwriting */
  --bold: "Lilita One", "Arial Black", system-ui, sans-serif;         /* numbers and titles that must stand out */
  /* The numbers and meters during play use --u: 1px at the 960 x 540 the game is made for, following the box like
     the picture does (--ui, js/game-ui.js stageScale: less in a box shrunk to fit a low window, more on a wide page).
     In fullscreen the stage sets --u from the screen, see "Fullscreen" at the end of this file. */
  --u: calc(1px * var(--ui, 1));
  /* Shown at the sides/top if the screen isn't 16:9 (the playfield itself is always 16:9) */
  background: #3b3550;
  font-family: var(--hand);
}

/* While playing, the Fyre is your mouse pointer, so the normal arrow is hidden */
.stage.is-playing canvas {
  cursor: none;
}

/* The corner buttons as small paper squares */
.stage .icon-button {
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 6px 3px 7px 4px;
  box-shadow: var(--cutout-shadow);
}

.stage .icon-button:hover,
.stage .icon-button:focus-visible {
  box-shadow: 3px 4px 0 rgba(44, 49, 80, 0.3);
}

/* ===================== During play ===================== */

/* ----- Health, magic, score and gold: paper strips at the top ----- */

.sf-hud {
  position: absolute;
  top: calc(11.2 * var(--u) + var(--safe-top));
  left: calc(4rem + var(--safe-left));       /* room for the pause button */
  right: calc(4rem + var(--safe-right));     /* room for the fullscreen button */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(12 * var(--u));
  pointer-events: none;
}

.sf-health,
.sf-gold,
.sf-hud strong,
.sf-boss {
  padding: calc(2 * var(--u)) calc(10 * var(--u));
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px 3px 9px 4px / 4px 9px 3px 8px;   /* a bit uneven, like cut by hand */
  box-shadow: var(--cutout-shadow);
}

.sf-health {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  font-size: calc(17 * var(--u));
  transform: rotate(-0.6deg);
}

.sf-hud strong {
  min-width: calc(60 * var(--u));
  font-size: calc(28 * var(--u));
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
  color: var(--crayon-pink);
  transform: rotate(1deg);
}

.sf-gold {
  font-size: calc(17 * var(--u));
  transform: rotate(-1deg);
}

.sf-gold b {
  color: #c98a00;
  font-weight: 400;
}

/* A meter drawn on paper: pencil outline, coloured in with crayon */
.sf-bar {
  position: relative;
  width: clamp(5rem, 16vw, 11rem);
  height: 0.75rem;
  background: rgba(44, 49, 80, 0.08);
  border: 2px solid var(--ink);
  border-radius: 3px 6px 4px 5px;
  overflow: hidden;
}

.sf-fill {
  width: 100%;
  height: 100%;
  background: var(--crayon-red);
  transition: width 0.15s;
}

.sf-health.is-low .sf-fill {
  animation: sf-blink 0.5s steps(2) infinite;
}

@keyframes sf-blink {
  50% { background: var(--crayon-yellow); }
}

/* The magic bar is blue, and lights up when there is enough for a spell */
.sf-health .sf-magic-bar .sf-fill {
  background: #8fb2ff;
}

.sf-health.can-cast .sf-magic-bar .sf-fill {
  background: var(--crayon-blue);
}

/* ----- The chain counter, bottom left (like the original) ----- */

.sf-chain {
  position: absolute;
  left: calc(12.8 * var(--u) + var(--safe-left));
  bottom: calc(9.6 * var(--u) + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  color: var(--crayon-pink);
  -webkit-text-stroke: 1px #fff;
  text-shadow: 2px 3px 0 rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.sf-chain span {
  font-size: calc(17 * var(--u));
}

.sf-chain strong {
  font-size: calc(44 * var(--u));
  font-weight: 400;
}

.sf-chain b {
  font-size: calc(20 * var(--u));
  font-weight: 400;
  color: #c98a00;
}

/* The magic button (touch screens and mouse), above the sound button */
.magic-button {
  right: calc(0.6rem + var(--safe-right));
  bottom: calc(3.8rem + var(--safe-bottom));
}

.stage .magic-button.is-ready {
  opacity: 0.95;
  color: var(--ink);
  background: var(--crayon-yellow);
}

/* ----- Boss health at the bottom ----- */

.sf-boss {
  position: absolute;
  left: 50%;
  bottom: calc(12.8 * var(--u) + var(--safe-bottom));
  transform: translateX(-50%) rotate(-0.5deg);
  display: flex;
  align-items: center;
  gap: calc(9.6 * var(--u));
  font-size: calc(17 * var(--u));
  pointer-events: none;
}

.sf-boss .sf-bar {
  width: clamp(8rem, 34vw, 22rem);
}

/* One bar per boss phase, stacked: yellow, then pink, and the last one is always cyan.
   The page sets the colours (data-color) and hides the lower bar in the last phase. */
.sf-boss .sf-fill {
  position: absolute;
  inset: 0 auto 0 0;
}

.sf-boss .sf-fill[data-color="yellow"] { background: var(--crayon-yellow); }
.sf-boss .sf-fill[data-color="magenta"] { background: var(--crayon-pink); }
.sf-boss .sf-fill[data-color="cyan"] { background: var(--crayon-cyan); }

/* ----- Big texts: "Bana 1 – Himlen", "Bana 1 klar!" ----- */

.sf-banner {
  position: absolute;
  top: 36%;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: clamp(2rem, 7vw, 4rem);
  color: var(--crayon-pink);
  -webkit-text-stroke: 2px #fff;
  paint-order: stroke fill;
  text-shadow: 3px 4px 0 rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
}

.sf-banner.show {
  animation: sf-banner 2.2s ease-out;
}

@keyframes sf-banner {
  0% { opacity: 0; transform: scale(1.4) rotate(-4deg); }
  12% { opacity: 1; transform: scale(1) rotate(-2deg); }
  80% { opacity: 1; transform: scale(1) rotate(-2deg); }
  100% { opacity: 0; transform: scale(0.95) rotate(-2deg); }
}

/* "Redo …" then "Kör!" before a stage starts (skyfyre.js startCountdown) */
.sf-ready {
  position: absolute;
  top: 54%;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-family: var(--bold);
  font-size: calc(5.5rem * var(--ui, 1));
  color: var(--crayon-yellow);
  -webkit-text-stroke: 0.06em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.05em 0.07em 0 rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.sf-ready[hidden] {
  display: none;
}

.sf-ready.is-shown {
  animation: sf-ready 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes sf-ready {
  from { opacity: 0; transform: scale(1.8) rotate(-6deg); }
  to { opacity: 1; transform: scale(1) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sf-ready.is-shown {
    animation: none;
  }
}

/* ===================== Menus between rounds ===================== */

/* Covers the game; the corner buttons (fullscreen, sound) stay on top, at the right */
.sf-menu {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(0.5rem + var(--safe-top)) calc(3.7rem + var(--safe-right))
    calc(0.5rem + var(--safe-bottom)) calc(0.7rem + var(--safe-left));
  background: rgba(40, 34, 60, 0.45);
  container-type: size;                    /* the sheets below adapt to the menu's size */
}

/* Same as the other games: stay above Chrome's "exit full screen" message (class set by js/game-ui.js) */
.stage.toast-room .sf-menu {
  padding-bottom: calc(6rem + var(--safe-bottom));
}

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

/* A sheet of lined notebook paper: ruled lines, red margin line and punch holes */
.sf-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;                        /* small screens: scroll */
  padding: 0.7rem 1.1rem 0.8rem 2.9rem;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 1rem 18%, #cfc8b8 0 0.38rem, transparent 0.42rem),
    radial-gradient(circle at 1rem 50%, #cfc8b8 0 0.38rem, transparent 0.42rem),
    radial-gradient(circle at 1rem 82%, #cfc8b8 0 0.38rem, transparent 0.42rem),
    linear-gradient(90deg, transparent 2.1rem, var(--paper-margin) 2.1rem, var(--paper-margin) calc(2.1rem + 2px), transparent calc(2.1rem + 2px)),
    repeating-linear-gradient(transparent 0 calc(1.6rem - 1px), var(--paper-line) calc(1.6rem - 1px) 1.6rem);
  background-attachment: local;            /* the lines scroll with the text */
  border-radius: 2px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transform: rotate(-0.4deg);
  scrollbar-width: thin;
}

.sf-sheet[hidden] {
  display: none;
}

.sf-sheet-small {
  max-width: 40rem;
  align-items: center;
  text-align: center;
}

.sf-sheet p {
  margin: 0;
}

/* Handwritten headings in pink crayon */
.sf-heading {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1.05;
  color: var(--crayon-pink);
  text-shadow: 2px 2px 0 rgba(44, 49, 80, 0.15);
}

.sf-logo {
  font-size: 2.6rem;
  text-align: center;
  transform: rotate(-1.5deg);
}

.sf-sheet h3 {
  margin: 0 0 0.2rem;
  font-size: 1.3rem;
  font-weight: 400;
  color: #3a62c9;
}

.sf-small {
  font-size: 1rem;
  color: var(--ink-soft);
}

.sf-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem 0.8rem;
}

/* ----- Buttons: coloured paper cutouts with a pencil outline ----- */

.sf-button {
  padding: 0.25rem 1.1rem 0.3rem;
  font-family: var(--hand);
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--ink);
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 12px 4px 10px 5px / 5px 10px 4px 12px;
  box-shadow: var(--cutout-shadow);
  transform: rotate(-1deg);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.sf-button:nth-child(even) {
  transform: rotate(1deg);
}

.sf-button:hover:not(:disabled),
.sf-button:focus-visible {
  transform: translate(-1px, -2px) rotate(0deg);
  box-shadow: 4px 6px 0 rgba(44, 49, 80, 0.25);
}

.sf-button:active:not(:disabled) {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(44, 49, 80, 0.25);
}

.sf-button:focus-visible {
  outline: 3px dashed var(--crayon-blue);
  outline-offset: 3px;
}

.sf-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.sf-play-button {
  background: var(--crayon-yellow);
  font-size: 1.7rem;
}

@keyframes sf-wiggle {
  0%, 70%, 100% { transform: rotate(-1deg); }
  76% { transform: rotate(4deg) scale(1.06); }
  84% { transform: rotate(-4deg) scale(1.06); }
  92% { transform: rotate(2deg); }
}

/* ----- Stickers: gold, EXP ----- */

.sf-sticker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.8rem 0.15rem 0.5rem;
  font-size: 1.35rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--cutout-shadow);
}

.sf-sticker b {
  font-weight: 400;
}

/* A gold coin drawn in front */
.sf-sticker-gold::before,
.sf-coin {
  content: "";
  display: inline-block;
  flex: none;
  width: 1rem;
  height: 1rem;
  background: radial-gradient(circle at 35% 35%, #fff6b0, #ffc928 55%, #d99a00);
  border: 2px solid #9a6a00;
  border-radius: 50%;
}

.sf-sticker-gold {
  background: #fff4c2;
  transform: rotate(-2deg);
}

.sf-sticker-exp {
  background: #d9f4fb;
  transform: rotate(2deg);
}

.sf-sticker-exp::before {
  content: "★";
  color: #3a62c9;
}

.sf-sticker.is-bumped {
  animation: sf-bump 0.35s ease-out;
}

@keyframes sf-bump {
  40% { transform: scale(1.18) rotate(-3deg); }
}

/* A meter coloured in with yellow crayon (EXP) */
.sf-meter {
  position: relative;
  height: 1rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 4px 8px 5px 7px;
  overflow: hidden;
}

.sf-meter-fill {
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(-55deg, var(--crayon-yellow) 0 6px, #ffe57a 6px 9px);
  transition: width 0.8s ease-out;
}

/* ----- The gems and the hidden stage ----- */

.sf-gem {
  display: inline-grid;
}

.sf-gem svg {
  width: 100%;
  height: auto;
}

/* The result after finding a gem: the row of eight, the new one pops into its hole and shines */
.sf-result-gems {
  display: flex;
  justify-content: center;
}

.sf-gem-row {
  display: flex;
  gap: 0.15rem;
}

.sf-gem-row .sf-gem {
  width: 2.4rem;
}

.sf-gem.is-new {
  animation: sf-gem-found 0.9s 0.5s both cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes sf-gem-found {
  0% { transform: scale(0) rotate(-40deg); filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
  60% { transform: scale(1.5) rotate(8deg); filter: drop-shadow(0 0 8px #fff); }
  100% { transform: scale(1.15) rotate(0deg); filter: drop-shadow(0 0 5px rgba(255, 217, 59, 0.9)); }
}

@media (prefers-reduced-motion: reduce) {
  .sf-gem.is-new {
    animation: none;
    filter: drop-shadow(0 0 5px rgba(255, 217, 59, 0.9));
  }
}

/* This round's new medals (js/medals.js showRoundMedals): written in the notebook's handwriting, not the site's
   bold neon letters (the shared style is in css/style.css .medal-row) */
.sf-sheet .medal-row {
  gap: 0 0.8rem;
  margin: 0;
}

.sf-sheet .medal-row-item {
  gap: 0.25rem;
  font-family: var(--hand);
  font-size: 1.05rem;
  font-weight: 400;
  font-style: normal;
  color: var(--ink);
}

/* A small sticker on the paper (a white edge and the cut-outs' shadow) instead of the neon glow: a first clear of
   Bana 1 can give many medals at once, and the sheet must still fit the box */
.sf-sheet .medal-row-item .medal-picture {
  width: 1.25rem;
  height: 1.5rem;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(1.5px 2px 0 rgba(44, 49, 80, 0.25));
}

/* Two-column lists of numbers (Avancerad info) */
.sf-facts {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  gap: 0 1rem;
  margin: 0;
  font-size: 1rem;
}

.sf-facts dt {
  color: var(--ink-soft);
  text-align: right;
}

.sf-facts dd {
  margin: 0;
  text-align: left;
}

.sf-columns .sf-facts {
  justify-content: start;
}

.sf-columns .sf-facts dt {
  text-align: left;
}

/* ----- Practice notes (Övning): a yellow paper note + pencil circle and arrow ----- */

.sf-tutorial {
  position: absolute;
  inset: 0;
  z-index: 1;
  container-type: size;                    /* the note adapts to the game box's size */
  pointer-events: none;                    /* only the note itself can be clicked */
}

.sf-tutorial[hidden] {
  display: none;
}

.sf-tutorial-marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Pencil lines in pink crayon, with a white edge so they show on every background */
.sf-mark {
  fill: none;
  stroke: var(--crayon-pink);
  stroke-width: calc(4px * var(--mark, 1));   /* --mark: bigger in fullscreen (end of this file) */
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff);
}

/* The line draws itself, like a pencil (tutorial-ui.js sets --length) */
.sf-draw {
  stroke-dasharray: var(--length);
  stroke-dashoffset: var(--length);
  animation-name: sf-draw-line;
  animation-duration: 0.45s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

@keyframes sf-draw-line {
  to { stroke-dashoffset: 0; }
}

.sf-mark-circle.sf-draw {
  animation-name: sf-draw-line, sf-pulse;
  animation-duration: 0.45s, 1.1s;
  animation-delay: 0s, 0.6s;
  animation-iteration-count: 1, infinite;
  animation-timing-function: ease-out, ease-in-out;
}

@keyframes sf-pop {
  0% { opacity: 0; transform: scale(0.6) rotate(-3deg); }
  70% { opacity: 1; transform: scale(1.08) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(-1deg); }
}

@keyframes sf-pulse {
  50% { stroke-width: calc(6px * var(--mark, 1)); }
}

/* The note: a yellow sticky note with a piece of tape */
.sf-note {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: min(21rem, 70%);
  padding: 0.9rem 1rem 0.8rem;
  font-size: 1.3rem;
  line-height: 1.25;
  text-align: center;
  color: var(--ink);
  background: #fff3a6;
  border: 1px solid rgba(160, 130, 40, 0.35);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
  transform: rotate(-1.2deg);
  pointer-events: auto;
  animation: sf-pop 0.35s ease-out both;
}

.sf-note::before {
  content: "";
  position: absolute;
  top: -0.6rem;
  left: 50%;
  width: 4rem;
  height: 1.1rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(180, 160, 90, 0.3);
  transform: translateX(-50%) rotate(3deg);
}

.sf-note p {
  margin: 0;
}

@container (max-height: 380px) {
  .sf-note {
    font-size: 1.1rem;
    padding: 0.6rem 0.8rem;
  }
}

/* The Fyre's own picture, cut out of paper */
.sf-cutout {
  background: #fff;
  border: 3px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(44, 49, 80, 0.25), var(--cutout-shadow);
}

@keyframes sf-float {
  0% { opacity: 0; transform: translateY(0.6rem) scale(0.8); }
  15% { opacity: 1; transform: translateY(0) scale(1.1); }
  100% { opacity: 0; transform: translateY(-1.8rem) scale(1); }
}

.sf-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}

@container (max-width: 560px) {
  .sf-columns {
    grid-template-columns: 1fr;
  }
}

@keyframes sf-bought {
  0% { transform: scale(1); }
  30% { transform: scale(1.1) rotate(-2deg); }
  60% { transform: scale(0.97) rotate(1deg); }
  100% { transform: scale(1); }
}

/* Hidden unless the switch is on */
.sf-menu:not(.show-advanced) .advanced-only {
  display: none;
}

/* Phones held upright (the game is wide: js/turn-phone.js shows them to turn the phone) */
@media (orientation: portrait) and (max-width: 700px) {
  .sf-hud {
    font-size: 0.75rem;
  }
}

/* Small game box (phones): smaller handwriting so a sheet fits better */
@container (max-height: 380px) {
  .sf-sheet {
    font-size: 1rem;
    gap: 0.3rem;
    padding-top: 0.4rem;
    padding-bottom: 0.5rem;
  }

  .sf-heading {
    font-size: 1.6rem;
  }

  .sf-logo {
    font-size: 1.9rem;
  }

  .sf-button {
    font-size: 1.2rem;
  }

  .sf-play-button {
    font-size: 1.35rem;
  }

}

/* ----- Fullscreen: meters and numbers grow with the picture ----- */

/* 1 unit = 1 px of the 960 x 540 playfield, however big the screen is. The playfield is letterboxed
   inside the stage, so the smaller of the two fits. The small buttons stay as they are on purpose. */
.stage.is-fullscreen {
  --u: min(0.10417vw, 0.18519vh);
  --u: min(0.10417vw, 0.18519dvh);          /* (dvh = what is visible: on an iPad vh is taller) */
}

.stage.is-fullscreen .sf-hud .sf-bar {
  width: calc(150 * var(--u));
  height: calc(12 * var(--u));
}

.stage.is-fullscreen .sf-boss .sf-bar {
  width: calc(330 * var(--u));
  height: calc(12 * var(--u));
}

/* The notebook menus grow like the picture (the rule for every game: in fullscreen the HTML grows, the corner
   buttons don't – they are outside the menu): a sheet is laid out as in the normal 960 x 540 box and drawn --ui times
   bigger (2 on a 1920 x 1080 screen). One that would then have to scroll shrinks a little: --menu-fit, set by
   skyfyre.js keepSheetsInBox (a long list, like the shop's, scrolls at full size instead). */
.stage.is-fullscreen .sf-menu > .sf-sheet {
  zoom: calc(var(--ui, 1) * var(--menu-fit, 1));
}

/* A very wide screen: the sheets don't get wider than this (in their own, zoomed size) */
.stage.is-fullscreen .sf-sheet {
  max-width: 64rem;
}

.stage.is-fullscreen .sf-sheet-small {
  max-width: 42rem;
}

/* Övning's notes and pencil marks grow too. The page places the note by its size in px, so the note itself isn't
   zoomed: its sizes are multiplied, and only what is inside it zooms. */
.stage.is-fullscreen {
  --mark: var(--ui, 1);
}

.stage.is-fullscreen .sf-note {
  width: min(calc(21rem * var(--ui, 1)), 70%);
  gap: calc(0.5rem * var(--ui, 1));
  padding: calc(0.9rem * var(--ui, 1)) calc(1rem * var(--ui, 1)) calc(0.8rem * var(--ui, 1));
}

.stage.is-fullscreen .sf-note > * {
  zoom: var(--ui, 1);
}

.stage.is-fullscreen .sf-note::before {
  top: calc(-0.6rem * var(--ui, 1));
  width: calc(4rem * var(--ui, 1));
  height: calc(1.1rem * var(--ui, 1));
}

/* ----- What must stand out uses the chunky font (Lilita One) instead of the handwriting ----- */

.sf-hud strong,
.sf-gold b,
.sf-chain,
.sf-banner,
.sf-heading,
.sf-sticker b,
.sf-note .sf-button {
  font-family: var(--bold);
  font-weight: 400;
  letter-spacing: 0.02em;
}
