/* Mostić 1.5: daily missions, Word rush, word of the day, and the new exercises
   (fill the gap, type it, listen and build). Uses the colours defined in styles.css. */

/* ---------- today's missions ---------- */
.lmissions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-card);
  background: var(--sunrise-soft);
  border: 1px solid #f6dcc6;
  text-align: left;
  width: 100%;
  animation: rise 0.35s both;
}
.lmissions.is-done { background: linear-gradient(160deg, #eef6ea 0%, #e2efdc 100%); border-color: var(--mint-deep); }
.lmissions__head { display: flex; align-items: center; gap: 12px; }
.lmissions__icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sunrise);
  color: var(--deep-moss);
  box-shadow: inset 0 -3px 0 rgba(154, 74, 54, 0.12);
}
.lmissions.is-done .lmissions__icon { background: radial-gradient(120% 95% at 28% 18%, #eaf3e6, var(--sage)); color: var(--fern); }
.lmissions__icon svg { width: 22px; height: 22px; }
.lmissions__titles { min-width: 0; }
.lmissions__titles h3 { margin: 0; font-family: var(--serif); font-size: var(--fs-title); line-height: 1.15; }
.lmissions__titles p { margin: 2px 0 0; font-size: var(--fs-small); font-weight: 800; color: var(--muted); }
.lmissions__count { margin-left: auto; font-weight: 800; font-size: var(--fs-body); color: var(--clay-ink); }
.lmissions.is-done .lmissions__count { color: var(--fern); }
.lmissions__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lmission {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 9px;
  border-radius: var(--r-card);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(233, 226, 210, 0.9);
  text-align: left;
  color: var(--moss);
  transition: transform 0.15s ease, background 0.2s;
}
button.lmission:active { transform: scale(0.985); }
.lmission__icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wheat-soft);
  color: var(--ochre);
}
.lmission__icon svg { width: 18px; height: 18px; }
.lmission.is-done .lmission__icon { background: var(--fern); color: var(--white); animation: pop 0.45s both; }
.lmission__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.lmission__text strong { font-weight: 800; font-size: var(--fs-body); line-height: 1.2; }
.lmission.is-done .lmission__text strong { color: var(--muted); }
.lmission__bar { height: 7px; border-radius: 999px; background: #f1e8d6; overflow: hidden; }
.lmission__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--golden), var(--apricot)); transition: width 0.5s cubic-bezier(0.2, 0.8, 0.3, 1); }
.lmission.is-done .lmission__bar i { background: linear-gradient(90deg, var(--sage), var(--fern-bright)); }
.lmission__num { flex: none; font-weight: 800; font-size: var(--fs-small); color: var(--muted); min-width: 2.6em; text-align: right; }
.lmission.is-done .lmission__num { color: var(--fern); }

.lmissions-done {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-card);
  background: var(--sunrise);
  color: var(--deep-moss);
  text-align: left;
  box-shadow: 0 14px 26px -18px rgba(154, 74, 54, 0.9);
  animation: pop 0.55s 0.2s both;
}
.lmissions-done__icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.7); }
.lmissions-done__icon svg { width: 22px; height: 22px; }
.lmissions-done > span:last-child { display: flex; flex-direction: column; }
.lmissions-done strong { font-weight: 800; }
.lmissions-done > span:last-child span { font-weight: 800; font-size: var(--fs-small); }

/* ---------- the two game cards on the path ---------- */
.lgames { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.lgame {
  position: relative;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2px;
  padding: 14px;
  border-radius: var(--r-card);
  border: 1.5px solid var(--edge);
  background: var(--white);
  text-align: left;
  color: var(--moss);
  overflow: hidden;
}
.lgame--rush {
  background: radial-gradient(120% 120% at 100% 0%, #ffe99e 0%, #f3c07f 45%, #fcbb9b 100%);
  border-color: #f0c79a;
  box-shadow: 0 14px 24px -18px rgba(154, 74, 54, 0.9);
  transition: transform 0.15s ease;
}
.lgame--rush:active { transform: scale(0.98); }
.lgame--rush.is-locked { background: #f4efe4; border-color: var(--line); box-shadow: none; }
.lgame__icon {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  color: var(--clay-ink);
}
.lgame--rush.is-locked .lgame__icon { color: #b2ad9f; }
.lgame__icon svg { width: 22px; height: 22px; }
.lgame__title { font-family: var(--serif); font-size: var(--fs-title); line-height: 1.1; }
.lgame__sub { font-size: var(--fs-small); font-weight: 800; color: var(--muted); }
.lgame--rush { justify-content: flex-start; }
.lgame--rush .lgame__kicker { color: var(--clay-ink); }
.lgame--rush .lgame__sub { color: #6b4d2a; margin-bottom: 44px; }
.lgame--rush.is-locked .lgame__kicker, .lgame--rush.is-locked .lgame__sub { color: var(--muted); }
.lgame__badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  color: var(--clay-ink);
}
.lgame--rush.is-locked .lgame__badge { color: #b2ad9f; }
.lgame__badge svg { width: 20px; height: 20px; }
.lgame--word { justify-content: flex-start; background: linear-gradient(160deg, #f4f9f1 0%, var(--mint) 100%); border-color: var(--mint-deep); }
/* The word of the day as a slim full-width line under the two game cards. */
.lgame--wide { min-height: 0; margin-top: -6px; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; border-radius: var(--r-card); }
.lgame__line { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lgame__pair { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lgame--wide .lgame__word { margin-top: 0; font-size: var(--fs-title); }
.lgame--word.lgame--wide .lgame__sub { margin: 0; }
.lgame--wide .lgame__say { position: static; flex: none; }
/* Serbian names: a cool, clear blue next to Word rush's warm gold. */
.lgame--names { justify-content: flex-start; background: radial-gradient(120% 120% at 100% 0%, #e3f1f7 0%, #cfe4ef 50%, #bcd8e6 100%); border-color: #b6d3e2; box-shadow: 0 14px 24px -18px rgba(40, 90, 120, 0.8); transition: transform 0.15s ease; }
.lgame--names:active { transform: scale(0.98); }
.lgame--names .lgame__kicker { color: #2f6a86; }
.lgame--names .lgame__sub { color: #3d6275; margin-bottom: 44px; }
.lgame--names .lgame__badge { color: #2f6a86; }
.lgame__kicker { font-weight: 800; font-size: var(--fs-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fern); }
.lgame__word { margin-top: 6px; font-family: var(--serif); font-size: var(--fs-title); line-height: 1.1; overflow-wrap: anywhere; padding-right: 2px; }
.lgame--word .lgame__sub { margin-bottom: 44px; }
.lgame__say { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; }
.lgame__say svg { width: 20px; height: 20px; }

/* ---------- Word rush ---------- */
.lrush-intro { align-items: center; text-align: center; }
.lrush-intro__icon {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, #ffe99e, #f3c07f 60%, #fcbb9b);
  color: var(--clay-ink);
  box-shadow: 0 16px 28px -16px rgba(154, 74, 54, 0.9);
  animation: pop 0.5s both;
}
.lrush-intro__icon svg { width: 46px; height: 46px; }
.lrush-intro__text { margin: 0; max-width: 30ch; font-size: var(--fs-body); color: var(--moss); }
.lrush-intro__keys { display: grid; grid-template-columns: auto auto auto auto; align-items: center; gap: 8px 10px; font-weight: 800; color: var(--muted); }
.lrush-key { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--white); }
.lrush-key svg { width: 20px; height: 20px; }
.lrush-key--no { background: var(--rust); }
.lrush-key--yes { background: var(--fern); }
.lrush-intro__best { margin: 0; font-weight: 800; color: var(--clay-ink); }

.lprog--rush { background: #f6ead6; }
.lprog--rush i { transition: none; background: linear-gradient(90deg, var(--golden), var(--apricot)); }
.lprog--rush.is-low i { background: linear-gradient(90deg, var(--apricot), var(--blush)); }
.lrush__score {
  min-width: 52px;
  height: 40px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--sunrise);
  color: var(--deep-moss);
  font-weight: 800;
  font-size: var(--fs-title);
  font-variant-numeric: tabular-nums;
}
.lrush__score.is-bump { animation: pop 0.3s both; }
.lrush { justify-content: center; align-items: stretch; gap: 14px; }
.lrush__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 18px;
  border-radius: var(--r-card);
  background: var(--white);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.lrush__card.is-in { animation: rise 0.22s both; }
.lrush__card.is-right { border-color: var(--fern-bright); background: var(--mint); }
.lrush__card.is-wrong { border-color: #d99a84; background: #fbf1ec; animation: shake 0.3s; }
.lrush__word { margin: 0; font-family: var(--serif); font-weight: 800; font-size: var(--fs-display); line-height: 1.1; overflow-wrap: anywhere; }
.lrush__eq { margin: 0; font-weight: 800; font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lrush__means { margin: 0; font-size: var(--fs-h1); font-weight: 800; color: var(--fern); }
.lrush__note { margin: 0; min-height: 1.5em; text-align: center; font-weight: 800; color: var(--clay-ink); }
.lrush__note.is-wrong { color: var(--rust); font-family: var(--serif); font-size: var(--fs-title); }
.lrush__answers { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 14px 18px calc(var(--safe-bottom) + 18px); }
.lrush__btn {
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: var(--r-card);
  color: var(--white);
  border-bottom: 6px solid rgba(0, 0, 0, 0.18);
  transition: transform 0.08s;
}
.lrush__btn svg { width: 40px; height: 40px; stroke-width: 2.6; }
.lrush__btn:active { transform: translateY(3px); border-bottom-width: 3px; }
.lrush__btn--no { background: var(--rust); }
.lrush__btn--yes { background: var(--fern); }
.lrush-final {
  margin: 0;
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, #ffe99e, #f3c07f 60%, #fcbb9b);
  font-family: var(--serif);
  font-weight: 800;
  font-size: 3.4rem;
  color: var(--deep-moss);
  box-shadow: 0 18px 30px -18px rgba(154, 74, 54, 0.9);
  animation: pop 0.55s both;
}

/* ---------- fill the gap ---------- */
.lgap { display: flex; flex-direction: column; gap: 8px; padding: 18px 16px; border-radius: var(--r-card); background: var(--white); border: 1.5px solid var(--edge); }
.lgap__line { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; font-family: var(--serif); font-weight: 800; font-size: var(--fs-h1); line-height: 1.25; }
.lgap__blank {
  display: inline-block;
  min-width: 3.2em;
  padding: 0 6px;
  border-bottom: 3px dashed var(--sage);
  color: var(--fern);
  text-align: center;
  transition: color 0.2s, border-color 0.2s;
}
.lgap__blank.is-filled { border-bottom-style: solid; }
.lgap__blank.is-right { border-color: var(--fern); color: var(--fern); }
.lgap__blank.is-wrong { border-color: var(--rust); color: var(--rust); }
.lgap__en { margin: 0; color: var(--muted); font-weight: 800; }
.lopts--grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.lopt--word { text-align: center; justify-content: center; }

/* ---------- type it ---------- */
.lwrite { display: flex; flex-direction: column; gap: 10px; }
.lwrite__input {
  width: 100%;
  min-height: 62px;
  padding: 10px 16px;
  border-radius: var(--r-card);
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  background: var(--white);
  color: var(--moss);
  font-family: var(--serif);
  font-size: var(--fs-h1);
  font-weight: 600;
  user-select: text;
  -webkit-user-select: text;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.lwrite__input:focus { border-color: var(--fern-bright); }
.lwrite__input::placeholder { color: #b9b3a3; font-weight: 600; }
.lwrite__input.is-right { border-color: var(--fern); background: var(--mint); }
.lwrite__input.is-wrong { border-color: #d99a84; background: #fbf1ec; }
.lwrite__keys { display: flex; gap: 8px; }
.lwrite__key {
  flex: 1;
  height: 48px;
  border-radius: var(--r-btn);
  background: var(--white);
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  font-family: var(--serif);
  font-size: var(--fs-title);
  font-weight: 800;
  color: var(--moss);
}
.lwrite__key:active { transform: translateY(2px); border-bottom-width: 2px; }
.lwrite__key:disabled { opacity: 0.5; }

@media (prefers-reduced-motion: reduce) {
  .lmissions, .lmissions-done, .lrush__card.is-in, .lrush__score.is-bump, .lrush-final, .lrush-intro__icon, .lmission.is-done .lmission__icon { animation: none; }
}

/* ---------- the bridge (the streak) ---------- */
.lbridge {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 12px;
  border-radius: var(--r-card);
  background: linear-gradient(180deg, #fff6dc 0%, #eef6ea 100%);
  border: 1px solid var(--mint-deep);
  animation: rise 0.35s both;
}
.lbridge__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lbridge__kicker { margin: 0; font-weight: 800; font-size: var(--fs-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fern); }
.lbridge__town { margin: 2px 0 0; font-family: var(--serif); font-size: var(--fs-title); line-height: 1.1; }
.lbridge__side { display: flex; align-items: center; gap: 8px; flex: none; }
.lshield-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--white); border: 1.5px solid var(--edge); color: var(--ink); font: inherit; cursor: pointer; }
.lshield-chip strong { font-size: var(--fs-body); font-weight: 800; }
.lshield-chip__icon, .lshield-chip__icon svg { display: block; width: 24px; height: 24px; }
.lshield-chip.is-empty .lshield-chip__icon { filter: grayscale(1); opacity: 0.55; }
.lshield-pop { text-align: center; align-items: center; }
.lshield-pop__icon, .lshield-pop__icon svg { display: block; width: 64px; height: 64px; margin: 0 auto; }
.lshield-pop__n { margin: 0; font-family: var(--serif); font-size: var(--fs-h2); font-weight: 700; }
.lshield-pop .btn { width: 100%; }
.lbridge__days { display: flex; flex-direction: column; align-items: center; min-width: 56px; padding: 6px 10px; border-radius: var(--r-card); background: var(--white); border: 1.5px solid var(--edge); line-height: 1.1; }
.lbridge__days strong { font-family: var(--serif); font-size: var(--fs-h1); }
.lbridge__days span { font-size: var(--fs-label); font-weight: 800; color: var(--muted); }
.lbridge__scene { margin: 2px 0 0; border-radius: var(--r-card); overflow: hidden; }
.lbridge__art { display: block; width: 100%; height: auto; }
.lbridge__water { fill: #bcd9e4; }
.lbridge__wave { fill: none; stroke: #ffffff; stroke-width: 2; stroke-linecap: round; opacity: 0.8; }
.lbridge__bank { fill: #c9b48f; }
.lbridge__rope { fill: none; stroke: #8a6a45; stroke-width: 2; stroke-linecap: round; }
.lbridge__post { stroke: #6f5233; stroke-width: 4; stroke-linecap: round; }
.lbridge__plank { stroke-width: 1.5; }
.lbridge__plank.is-laid { fill: #b8834f; stroke: #8a5f35; }
.lbridge__plank.is-empty { fill: rgba(255, 255, 255, 0.55); stroke: #c9b48f; stroke-dasharray: 3 3; }
.lbridge__plank.is-crack { fill: #f1c4b6; stroke: var(--rust); stroke-dasharray: 2 2; }
.lbridge__plank.is-fallen { fill: #b8834f; stroke: #8a5f35; opacity: 0.75; }
.lbridge--today .lbridge__plank.is-laid:last-of-type { animation: plank-drop 0.5s ease-out both; }
.lbridge__line { margin: 0; font-weight: 800; color: var(--moss); }
.lbridge__towns { margin: 0; font-size: var(--fs-small); font-weight: 800; color: var(--muted); }
.lbridge--cracked { background: linear-gradient(180deg, #ffefe7 0%, #fff6dc 100%); border-color: #ebc7b8; }
.lbridge--cracked .lbridge__line { color: var(--rust); }
.lbridge--fallen { background: linear-gradient(180deg, #f4f1ea 0%, #eaf2f4 100%); border-color: var(--line); }
@keyframes plank-drop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

.lbridge-news {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-card);
  background: var(--mint);
  border: 1px solid var(--mint-deep);
  text-align: left;
  animation: rise 0.35s both;
}
.lbridge-news > span:last-child { display: flex; flex-direction: column; }
.lbridge-news strong { font-size: var(--fs-body); }
.lbridge-news > span:last-child span { font-weight: 800; font-size: var(--fs-small); color: var(--muted); }
.lbridge-news__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--white); color: var(--fern); }
.lbridge-news__icon svg { width: 22px; height: 22px; }
.lbridge-news--town { background: var(--sunrise-soft); border-color: #f6dcc6; }
.lbridge-news--town .lbridge-news__icon { color: var(--clay-ink); }
.lbridge-news--repairing { background: var(--clay-soft); border-color: #ebc7b8; }
.lbridge-news--repairing .lbridge-news__icon { color: var(--rust); }

.lcta__go { position: relative; }
.lcta__left { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); font-size: var(--fs-small); }
.ldone__tip { margin: 0; padding: 12px 14px; border-radius: var(--r-card); background: var(--wheat-soft); font-weight: 800; color: var(--moss); }
.ldone--retry .ldone__stars span { color: var(--line); }

/* ---------- the bridge card opens the map ---------- */
.lbridge--tap { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 0.15s; }
.lbridge--tap:active { transform: scale(0.985); }
.lbridge__map { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); font-weight: 800; font-size: var(--fs-small); color: var(--moss); }
.lbridge__map svg { width: 18px; height: 18px; flex: none; }
.lbridge__map strong { margin-left: auto; color: var(--clay-ink); }

/* ---------- the map of Serbia ---------- */
.ljourney__title { min-width: 0; }
.ljourney__title .lkicker { margin: 0; }
.ljourney__title h2 { margin: 0; font-family: var(--serif); font-weight: 800; font-size: var(--fs-title); line-height: 1.1; }
.ljourney__bar { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 0 16px 10px; }
.ljourney__stats { display: flex; flex-wrap: wrap; gap: 6px; }
.ljourney__views { flex-wrap: nowrap; }
.ljourney__views .seg__opt { flex: 1; }
.ljourney__map { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: radial-gradient(circle at 50% 40%, #f4f8ee, #eef3e6 60%, #e7eedd); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ljourney__mapwrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ljourney__map { display: flex; touch-action: pan-x pan-y; }
.ljourney__map .jm { display: block; flex: none; margin: auto; width: 100%; height: auto; }
.ljourney__map .jm-name { font-size: calc(13px * var(--lab, 1)); stroke-width: calc(4px * var(--lab, 1)); }
.ljourney__map .jm-town--start .jm-name { font-size: calc(14px * var(--lab, 1)); }
.ljourney__map .jm-hit { r: calc(20px * var(--lab, 1)); }
.ljourney__map.is-far .jm-town--future:not(.jm-town--big) .jm-name { display: none; }
.ljourney__zoom { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; align-items: center; }
.ljourney__zoom[hidden] { display: none; }
.ljourney__zbtn { width: 40px; height: 40px; background: var(--white); box-shadow: 0 2px 6px rgba(40, 50, 80, 0.18); }
.ljourney__zbtn:disabled { opacity: 0.4; }
.ljourney__zbtn svg { width: 20px; height: 20px; }
.ljourney__zall { background: var(--white); box-shadow: 0 2px 6px rgba(40, 50, 80, 0.18); }
.ljourney__info { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px 18px calc(var(--safe-bottom) + 14px); background: var(--white); min-height: 64px; }
.ljourney__text { display: flex; flex-direction: column; gap: 2px; }
.ljourney__text strong { font-family: var(--serif); font-size: var(--fs-title); }
.ljourney__text span { color: var(--muted); font-weight: 800; font-size: var(--fs-small); line-height: 1.3; }
.ljourney__pick { width: 100%; }
button.lbridge-news { width: 100%; font: inherit; text-align: left; cursor: pointer; color: inherit; }

.jm-land { fill: #fbf3df; stroke: #d9c49b; stroke-width: 3; stroke-linejoin: round; }
.jm-land-shadow { fill: rgba(70, 93, 75, 0.12); }
.jm-terrain { image-rendering: pixelated; image-rendering: crisp-edges; }
.jm-edge { fill: none; stroke: #b49c6e; stroke-width: 3; stroke-linejoin: round; pointer-events: none; }
.jm-river { fill: none; stroke: #8fc1d4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.95; }
/* Roads: built ones look like roads (verge, surface, a dashed centre line); the one being built is
   dashed orange; the ones you could build next are dotted brown; the rest faint dots. */
.jr { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* Trails: faint dots across the country, warmer dots where you can build next. */
.jr--future { stroke: rgba(255, 251, 238, 0.75); stroke-width: 2.4; stroke-dasharray: 0.1 8; }
.jr--open { stroke: #fff4dc; stroke-width: 4; stroke-dasharray: 0.1 7.5; }
/* Built roads: a packed-earth path with a darker edge. */
.jr--edge { stroke: #7a5a39; stroke-width: 8.5; opacity: 0.9; }
.jr--built { stroke: #e6c993; stroke-width: 5.2; }
/* The road being built: a light path with a soft orange glow. */
.jr--cur-edge { stroke: #f0a35a; stroke-width: 10; opacity: 0.45; }
.jr--cur { stroke: #fff4dc; stroke-width: 4.4; stroke-dasharray: 7 5; }
.jb { cursor: pointer; }
.jb rect { shape-rendering: crispEdges; }
.jb-hit { fill: transparent; }
.jb-water { fill: none; stroke: #8fc1d4; stroke-width: 3.4; stroke-linecap: round; }
.jb-board { fill: rgba(255, 248, 234, 0.35); stroke: #fff8ea; stroke-width: 0.9; stroke-dasharray: 1.6 1.2; }
.jb-board.is-laid { fill: #a8805a; stroke: #583a2a; stroke-width: 0.8; stroke-dasharray: none; }
.jb-rail, .jb-post { fill: #34201a; }
.jb--open .jb-board { fill: rgba(122, 90, 57, 0.28); stroke: none; }
.jb--open .jb-rail, .jb--open .jb-post { fill: #7a5a39; opacity: 0.55; }
.jb--current .jb-board:not(.is-laid) { stroke: #e08a3a; fill: rgba(255, 244, 220, 0.8); }
.jm-town { cursor: pointer; }
.jm-hit { fill: transparent; }
.jm-emblem { fill: #c6363c; stroke: #fff; stroke-width: 2.6; }
.jm-emblem-ring { fill: none; stroke: #d9a441; stroke-width: 1.8; }
.jm-cross { fill: #fff; }
.jm-ocilo { fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; }
.jm-town--open .jm-dot { stroke: #d9822b; stroke-width: 2.4; stroke-dasharray: 2.6 2; }
.jm-town--start .jm-name { font-size: 14px; }
.jm-dot { fill: #fff; stroke: #8d7f63; stroke-width: 2; }
.jm-town--future .jm-dot { fill: rgba(255, 255, 255, 0.85); stroke: #8d7f63; stroke-width: 1.6; }
.jm-icon { image-rendering: pixelated; }
.jm-base { fill: color-mix(in srgb, var(--moss) 25%, transparent); }
.jm-town--reached .jm-dot { fill: #6f9a66; stroke: #fff; stroke-width: 2.4; }
.jm-check { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.jm-town--next .jm-dot { fill: #fff; stroke: #d9822b; stroke-width: 3; }
.jm-ring { fill: none; stroke: #f3b46e; stroke-width: 2.5; opacity: 0.7; transform-box: fill-box; transform-origin: center; animation: jmPulse 1.8s ease-out infinite; }
.jm-town--big .jm-dot { stroke-width: 3; }
.jm-name { font: 800 13px var(--sans); fill: #3c4f40; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.jm-town--future .jm-name { fill: #8a8f84; font-weight: 800; }
.jm-pin path { fill: #c8553d; stroke: #fff; stroke-width: 2; }
.jm-pin circle { fill: #fff; }
@keyframes jmPulse { from { transform: scale(0.75); opacity: 0.9; } to { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .jm-ring { animation: none; } }

/* ---------- Serbian names ---------- */
.lnames__total { margin: -4px 0 0; color: var(--muted); font-weight: 800; }
.lnames__total strong { color: var(--moss); }
.lnames__group { display: flex; flex-direction: column; gap: 8px; }
.lnames__head { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 2px 0; font-family: var(--serif); font-size: var(--fs-title); }
.lnames__head span:last-child { font-family: var(--sans); font-size: var(--fs-label); font-weight: 800; color: var(--muted); letter-spacing: 0.04em; }
.lnames__list { display: flex; flex-direction: column; gap: 8px; }
.lname { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r-card); border: 1.5px solid var(--edge); background: var(--white); text-align: left; color: var(--moss); font: inherit; }
.lname:active { transform: scale(0.99); }
.lname__text { display: flex; flex-direction: column; min-width: 0; }
.lname__text strong { font-family: var(--serif); font-size: var(--fs-title); line-height: 1.15; }
.lname__text span { font-size: var(--fs-small); font-weight: 800; letter-spacing: 0.04em; color: var(--muted); }
.lname__score { flex: none; min-width: 52px; padding: 5px 10px; border-radius: 999px; text-align: center; font-weight: 800; font-size: var(--fs-small); background: #f2eee5; color: var(--muted); }
.lname__score.is-great { background: #e2efdc; color: #3f7a3a; }
.lname__score.is-ok { background: #fff1d6; color: #9a6a1c; }
.lname__score.is-low { background: #fbe7e1; color: #a5503b; }
.lname-card { align-items: center; text-align: center; gap: 10px; }
.lname__guide { margin: -4px 0 0; font-weight: 800; letter-spacing: 0.08em; color: #2f6a86; font-size: var(--fs-body); }
.lname__tip { margin: 0; padding: 10px 12px; border-radius: var(--r-btn); background: #eef6fa; color: #33586a; font-weight: 800; font-size: var(--fs-small); line-height: 1.35; }
.lname__try { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 6px; }
.lname__heard { margin: 0; font-weight: 800; color: var(--moss); min-height: 1.3em; }
.lname__note { margin: 0; color: var(--muted); font-weight: 800; min-height: 1.3em; }
.lscore { position: relative; width: 96px; height: 96px; flex: none; }
.lscore__ring svg { width: 96px; height: 96px; transform: rotate(-90deg); }
.lscore__track { fill: none; stroke: #eee8db; stroke-width: 10; }
.lscore__arc { fill: none; stroke: #b9b3a5; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 0.7s cubic-bezier(0.2, 0.8, 0.3, 1), stroke 0.3s; }
.lscore.is-great .lscore__arc { stroke: #6f9a66; }
.lscore.is-ok .lscore__arc { stroke: #e0a54a; }
.lscore.is-low .lscore__arc { stroke: #d9826b; }
.lscore__pct { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: var(--fs-h1); color: var(--moss); }
.lscore.is-empty .lscore__pct::after { content: '%'; color: #cfc8b8; }

/* Word rush: seconds left under the top bar, blinking for the last five. */
.lrush__clock { flex: none; margin: -2px 0 0; text-align: center; font-weight: 800; font-size: var(--fs-body); letter-spacing: 0.06em; color: var(--muted); font-variant-numeric: tabular-nums; }
.lrush__clock.is-low { color: #c8553d; font-size: var(--fs-body); animation: clockBlink 1s steps(1, end) infinite; }
@keyframes clockBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .lrush__clock.is-low { animation: none; } }

/* ---------- the puzzle of Serbia ---------- */
.ljourney__map.is-puzzle { display: grid; place-items: center; overflow: hidden; padding: 10px 12px; }
.jpz { display: block; width: 100%; height: 100%; }
.jp-land { fill: #efe6d0; }
.jp-edge { fill: none; stroke: #cdb48a; stroke-width: 2.6; stroke-linejoin: round; pointer-events: none; }
.jp { stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; cursor: pointer; transition: fill 0.4s; }
.jp--start, .jp--reached { fill: url(#jp-terrain); }
.jp--start { stroke: #c6363c; stroke-width: 2.6; }
.jp--future { fill: #efe6d0; stroke: #d3c29c; stroke-width: 1.1; stroke-dasharray: 3 3; }
.jp--open { fill: #f7ead0; stroke: #d39250; stroke-width: 1.4; stroke-dasharray: 3 2.5; }
.jp--next { fill: #fde0bd; stroke: #e08a3a; stroke-width: 2.2; animation: jpNext 1.6s ease-in-out infinite; }
.jp-river { fill: none; stroke: rgba(120, 175, 198, 0.55); stroke-linecap: round; pointer-events: none; }
.jp-name { font: 800 19px var(--sans); fill: var(--moss); paint-order: stroke; stroke: rgba(255, 255, 255, 0.9); stroke-width: 4.5px; stroke-linejoin: round; pointer-events: none; }
.jp-name--start { fill: #fff; stroke: #8e1f24; }
.jp-name--next { fill: #a8561e; }
@keyframes jpNext { 50% { fill: #fbd1a2; } }
@media (prefers-reduced-motion: reduce) { .jp--next { animation: none; } }
.ljourney__fact { margin: 6px 0 0; font-size: var(--fs-small); line-height: 1.42; color: var(--moss); font-weight: 600; }

/* Čika Vuk and Vučko (mascot.js): sprite strips played with steps() */
.mascot {
  display: inline-block;
  flex: none;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: calc(var(--n, 16) * 100%) 100%;
  animation-duration: var(--dur);
  animation-fill-mode: forwards;
}
.mascot.is-crisp { image-rendering: pixelated; }
/* The strip moves in percent of its own box, one keyframes rule per frame count (mascot.js sets
   animation-name). No var() inside @keyframes: iPhone's WebKit can resolve those with another
   mascot's size, and the strip then slides between frames ("Maca spinning", Nov 8, 2026).
   With background-size n×100%, x% puts frame k at x = k / (n − 1) × 100%. */
.mascot.is-loop { animation-iteration-count: infinite; }
.mascot.is-once { animation-iteration-count: 1; }
@keyframes mascot-loop-16 { from { background-position: 0 0; } to { background-position: 106.6667% 0; } }
@keyframes mascot-loop-24 { from { background-position: 0 0; } to { background-position: 104.3478% 0; } }
@keyframes mascot-once { from { background-position: 0 0; } to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) {
  .mascot.is-loop, .mascot.is-once { animation: none !important; }
  .mascot.is-once { background-position: 100% 0; }
}

/* the pair, side by side, standing on the same line */
.lvuk-pair { display: flex; align-items: flex-end; justify-content: center; gap: 2px; }

/* Learn home: Čika Vuk says hello and opens "About Čika Vuk" */
.lvuk {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--edge);
  border-radius: var(--r-card);
  background: var(--paper);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.lvuk:active { transform: scale(0.99); }
.lvuk__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lvuk__text strong { font-size: var(--fs-body); color: var(--fern); }
.lvuk__text span { font-size: var(--fs-small); line-height: 1.35; }
.lvuk__more { font-weight: 800; color: var(--fern); }

/* lesson footer: a small Vuk reacts to each answer */
.lfoot__msg--vuk { position: relative; padding-right: 66px; min-height: 56px; }
.lfoot__vuk { position: absolute; right: 0; bottom: -4px; }

/* result screens */
.ldone__mascot { margin-top: -12px; }

/* About Čika Vuk */
.lvuk-about { display: flex; flex-direction: column; gap: 16px; }
.lvuk-about__hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 14px 18px; border-radius: var(--r-card); background: var(--mint, #e7f1e4); text-align: center; }
.lvuk-about__hero h3 { margin: 0; font-family: var(--serif); font-size: var(--fs-title); line-height: 1.1; color: var(--fern); }
.lvuk-about__hero p { margin: 0; line-height: 1.45; }
.lvuk-about section { display: flex; flex-direction: column; gap: 6px; }
.lvuk-about h4 { margin: 0; font-size: var(--fs-title); color: var(--fern); }
.lvuk-about p { margin: 0; line-height: 1.5; }
.lvuk-about__rule { padding: 14px 16px; border-radius: var(--r-card); background: var(--paper); border: 1.5px solid var(--edge); }
.lvuk-about__rule strong { display: block; font-family: var(--serif); font-size: var(--fs-title); line-height: 1.15; color: var(--fern); }
.lvuk-about__fact { padding: 14px 16px; border-radius: var(--r-card); background: var(--cream); }
.lvuk-about__time { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lvuk-about__time li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; line-height: 1.45; }
.lvuk-about__time b { color: var(--fern); }

/* ---------- Azbuka: the alphabet ---------- */
.lgame--abc { margin-top: 0; background: linear-gradient(160deg, #fff6dc 0%, #ffefe7 100%); border-color: #f0dcc0; cursor: pointer; transition: transform 0.15s ease; }
.lgame--abc:active { transform: scale(0.99); }
.lgame--abc .lgame__kicker { color: var(--clay-ink); }
.lgame--abc .lgame__word { letter-spacing: 0.04em; }
.lgame--abc .lgame__badge { position: static; flex: none; }

.labc { display: flex; flex-direction: column; gap: 14px; }
.labc__stage { height: 268px; }
.labc__stage > * { height: 100%; box-sizing: border-box; }
.labc__hello { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r-card); background: var(--mint); overflow: hidden; }
.labc__vuk { flex: none; }
.labc__bubble { display: flex; flex-direction: column; gap: 4px; min-width: 0; line-height: 1.4; }
.labc__bubble strong { font-family: var(--serif); font-size: var(--fs-title); line-height: 1.1; color: var(--fern); }
.labc__bubble span { font-size: var(--fs-small); }

.labc__card { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 14px; border-radius: var(--r-card); background: var(--paper); border: 1.5px solid var(--edge); box-shadow: var(--shadow); animation: labc-in 0.2s ease; }
@keyframes labc-in { from { opacity: 0; transform: translateY(4px); } }
.labc__big { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.labc__glyph { border: 0; background: var(--wheat-soft); border-radius: var(--r-card); padding: 6px 22px; color: var(--deep-moss); font-family: var(--serif); font-weight: 800; font-size: 3.4rem; line-height: 1.15; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease; }
.labc__glyph:active, .labc__glyph.is-playing { transform: scale(0.96); background: var(--wheat); }
.labc__duo { display: flex; gap: 22px; align-items: baseline; }
.labc__duo span + span { color: var(--fern-bright); }
.labc__name { display: block; font-size: var(--fs-small); line-height: 1.3; color: var(--muted); min-height: 2.6em; }
.labc__name b { color: var(--fern); }
.labc__trap.is-empty { visibility: hidden; }
.labc__trap { min-height: 38px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border-radius: var(--r-btn); background: var(--clay-soft); color: var(--clay-ink); font-weight: 800; font-size: var(--fs-small); }
.labc__bang { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--clay); color: var(--white); font-size: var(--fs-small); }
.labc__example { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.labc__words { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.labc__words strong { font-family: var(--serif); font-size: var(--fs-h1); color: var(--moss); }
.labc__wordcyr { font-family: var(--serif); font-size: var(--fs-title); color: var(--fern-bright); }
.labc__en { color: var(--muted); font-weight: 800; }

.labc__bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.labc__tabs { display: flex; flex: 1 1 auto; padding: 4px; gap: 4px; border-radius: 999px; background: var(--mint); }
.labc__tab { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 8px; border: 0; border-radius: 999px; background: transparent; color: var(--fern); font: inherit; font-weight: 800; font-size: var(--fs-small); line-height: 1.1; cursor: pointer; }
.labc__tab small { font-weight: 800; font-size: var(--fs-label); opacity: 0.7; }
.labc__tab.is-on { background: var(--white); color: var(--deep-moss); box-shadow: 0 4px 10px -6px color-mix(in srgb, var(--moss) 50%, transparent); }
.labc__all { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; }
.labc__all svg { width: 18px; height: 18px; }

.labc__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.labc__tile { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border: 1.5px solid var(--line); border-radius: var(--r-card); background: var(--white); color: var(--deep-moss); font-family: var(--serif); font-weight: 800; font-size: var(--fs-h1); line-height: 1; cursor: pointer; transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease; }
.labc__tile:active { transform: scale(0.94); }
.labc__tile.is-both .labc__t1 { font-size: var(--fs-h1); }
.labc__tile.is-both .labc__t2 { font-size: var(--fs-body); color: var(--fern-bright); margin-top: 2px; }
.labc__tile.is-fresh::after, .labc__tile.is-trap::before { content: ''; position: absolute; top: 6px; width: 7px; height: 7px; border-radius: 50%; }
.labc__tile.is-fresh::after { right: 6px; background: var(--sage); }
.labc__tile.is-trap::before { left: 6px; background: var(--clay); }
.labc__tile.is-on { background: var(--wheat); border-color: var(--wheat-deep); }
.labc__tile.is-playing { transform: scale(0.94); }
.labc__keytrap { display: inline-flex; align-items: center; gap: 6px; }
.labc__keytrap.is-hidden { visibility: hidden; }
.labc__key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; font-size: var(--fs-small); font-weight: 800; color: var(--muted); }
.labc__dot { width: 9px; height: 9px; border-radius: 50%; }
.labc__dot.is-fresh { background: var(--sage); }
.labc__dot.is-trap { background: var(--clay); margin-left: 6px; }
@media (min-width: 520px) { .labc__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .labc__card { animation: none; } }

/* ---------- Čika Vuk above the lesson ---------- */
.lperch { flex: none; position: relative; display: flex; align-items: center; gap: 10px; margin: 0 16px; padding: 6px 12px 6px 6px; height: 118px; box-sizing: border-box; border: 0; border-bottom: 2px solid var(--mint-deep); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lperch__pair { display: flex; align-items: flex-end; gap: 0; flex: none; }
.lperch:active .lperch__pair { transform: scale(0.97); }
.lperch__say { position: relative; align-self: center; max-height: 64px; overflow: hidden; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: var(--paper); border: 1.5px solid var(--line); font-weight: 800; font-size: var(--fs-small); line-height: 1.3; color: var(--moss); animation: lperch-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
.lperch__say.is-right { background: var(--mint); border-color: var(--sage); color: var(--fern); }
.lperch__say.is-wrong { background: #fbf1ec; border-color: #ebc7b8; color: var(--rust); }
.lperch__say.is-teach { background: var(--wheat-soft); border-color: var(--wheat-deep); color: var(--ochre); }
.lperch__tip { position: absolute; top: 10px; left: 70px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--sunrise); color: var(--deep-moss); font-weight: 800; font-size: var(--fs-label); box-shadow: 0 4px 10px -4px rgba(154, 74, 54, 0.8); animation: lperch-bob 2.4s ease-in-out infinite; }
@keyframes lperch-pop { from { opacity: 0; transform: scale(0.85) translateY(4px); } }
@keyframes lperch-bob { 50% { transform: translateY(-3px); } }
.ltip--vuk { padding: 10px 14px; border-radius: var(--r-card); background: var(--wheat-soft); border: 1.5px dashed var(--wheat-deep); }
.ltip--vuk b { color: var(--ochre); }

/* ---------- his tip and teaching card: a small card in the middle of the screen ---------- */
.ltipcard { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; align-items: center; justify-content: center; }
.ltipcard[open] { display: flex; }
.ltipcard::backdrop { background: color-mix(in srgb, var(--moss) 40%, transparent); opacity: 1; transition: opacity 0.2s ease; }
.ltipcard.is-leaving::backdrop { opacity: 0; }
.ltipcard__panel { width: min(calc(100% - 40px), 360px); max-height: calc(100% - 80px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 18px 18px; border-radius: var(--r-card); background: var(--white); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--moss) 70%, transparent); animation: ltip-in 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; will-change: transform, opacity; }
.ltipcard.is-leaving .ltipcard__panel { animation: ltip-out 0.18s ease-in both; }
.ltipcard__stage { display: flex; justify-content: center; align-items: center; margin: 0 -18px 2px; padding: 14px 0 12px; border-radius: 26px 26px 0 0; background: var(--sunrise-soft); }
.ltipcard__title { margin: 0; font-family: var(--serif); font-size: var(--fs-title); line-height: 1.1; color: var(--fern); }
.ltipcard__sounds { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ltipcard__sound { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-card); background: var(--paper); border: 1.5px solid var(--edge); }
.ltipcard__letter { flex: none; width: 52px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 0; border-radius: var(--r-btn); background: var(--wheat); color: var(--deep-moss); font-family: var(--serif); font-weight: 800; font-size: var(--fs-h1); line-height: 1; cursor: pointer; }
.ltipcard__letter small { font-size: var(--fs-small); color: var(--ochre); }
.ltipcard__letter.is-playing { background: var(--wheat-deep); }
.ltipcard__how { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.ltipcard__how b { color: var(--moss); }
.ltipcard__how span { color: var(--muted); font-size: var(--fs-small); }
.ltipcard__tip { margin: 0; padding: 10px 12px; border-radius: var(--r-btn); background: var(--wheat-soft); line-height: 1.45; }
.ltipcard__nudge { margin: 0; color: var(--moss); line-height: 1.45; }
@keyframes ltip-in { from { opacity: 0; transform: translateY(12px) scale(0.94); } }
@keyframes ltip-out { to { opacity: 0; transform: translateY(8px) scale(0.96); } }
@media (prefers-reduced-motion: reduce) {
  .lperch__say, .lperch__tip, .ltipcard__panel { animation: none !important; }
}

/* ---------- Vuk and Vučko stand close together ----------
   Their frames have empty space on the sides (Vuk ~13% on his right, Vučko ~12% on his left),
   so the pair overlaps those margins instead of leaving a gap. */
.lvuk-pair, .lperch__pair { gap: 0; }
.lvuk-pair > .mascot--vuk, .lperch__pair > .mascot--vuk { margin-right: calc(var(--fw) * -0.12); }
.lvuk-pair > .mascot--pup, .lperch__pair > .mascot--pup { margin-left: calc(var(--fw) * -0.06); position: relative; }

/* ---------- lessons always fit one screen ----------
   data-fit is set per lesson from the phone's height (learn.js lessonFit). */
[data-fit='snug'] .lperch { height: 102px; }
[data-fit='snug'] .lperch__tip { left: 60px; }
[data-fit='snug'] .lfoot--lesson { min-height: calc(160px + var(--safe-bottom)); padding-top: 12px; padding-bottom: calc(var(--safe-bottom) + 12px); }
[data-fit='snug'] .lbtn-voice--big { width: 72px; height: 72px; }
[data-fit='snug'] .lbtn-voice--big svg { width: 34px; height: 34px; }
[data-fit='snug'] .lcard { gap: 12px; margin-top: 6px; }
[data-fit='snug'] .lopts { gap: 8px; }
[data-fit='snug'] .lopt { min-height: 50px; padding: 9px 14px; }
[data-fit='snug'] .lword { font-size: var(--fs-display); }

[data-fit='tight'] .lperch { height: 84px; padding-top: 4px; padding-bottom: 4px; }
[data-fit='tight'] .lperch__tip { top: 4px; left: 48px; width: 20px; height: 20px; }
[data-fit='tight'] .lperch__say { font-size: var(--fs-small); padding: 6px 10px; max-height: 52px; }
[data-fit='tight'] .lfoot--lesson { min-height: calc(142px + var(--safe-bottom)); gap: 8px; padding-top: 10px; padding-bottom: calc(var(--safe-bottom) + 10px); }
[data-fit='tight'] .lfoot__head { font-size: var(--fs-body); }
[data-fit='tight'] .lfoot__head span { width: 26px; height: 26px; }
[data-fit='tight'] .lfoot__note, [data-fit='tight'] .lfoot__answer { font-size: var(--fs-small); }
[data-fit='tight'] .lbtn-voice--big { width: 62px; height: 62px; }
[data-fit='tight'] .lbtn-voice--big svg { width: 30px; height: 30px; }
[data-fit='tight'] .lprompt--listen { padding: 4px 0; }
[data-fit='tight'] .lcard { gap: 10px; margin-top: 4px; }
[data-fit='tight'] .lopts { gap: 7px; }
[data-fit='tight'] .lopt { min-height: 46px; padding: 8px 14px; font-size: var(--fs-body); }
[data-fit='tight'] .lopt[lang^='sr'] { font-size: var(--fs-title); }
[data-fit='tight'] .lword { font-size: var(--fs-h1); }
[data-fit='tight'] .lword--en { font-size: var(--fs-h1); }
[data-fit='tight'] .lmatch, [data-fit='tight'] .lmatch__col { gap: 8px; }
[data-fit='tight'] .lmatch__tile { min-height: 48px; }
[data-fit='tight'] .ltile { min-height: 42px; font-size: var(--fs-body); }
[data-fit='tight'] .lrun__body { padding-bottom: 10px; }

/* One exercise that still doesn't fit is drawn tighter (learn.js fitStep). */
.lrun__body.is-squeeze .lcard { gap: 8px; margin-top: 2px; }
.lrun__body.is-squeeze .lopts, .lrun__body.is-squeeze .lmatch, .lrun__body.is-squeeze .lmatch__col { gap: 6px; }
.lrun__body.is-squeeze .lopt { min-height: 42px; padding: 6px 12px; }
.lrun__body.is-squeeze .lmatch__tile { min-height: 42px; padding: 6px 8px; }
.lrun__body.is-squeeze .lbtn-voice--big { width: 54px; height: 54px; }
.lrun__body.is-squeeze .lbtn-voice--big svg { width: 26px; height: 26px; }
.lrun__body.is-squeeze .lword { font-size: var(--fs-h1); }
.lrun__body.is-squeeze .ltile { min-height: 38px; padding: 4px 12px; }
.lrun__body.is-squeeze2 .lkicker { font-size: var(--fs-label); }
.lrun__body.is-squeeze2 .lopt { min-height: 38px; font-size: var(--fs-body); }
.lrun__body.is-squeeze2 .lopt[lang^='sr'] { font-size: var(--fs-body); }
.lrun__body.is-squeeze2 .lword { font-size: var(--fs-title); }
.lrun__body.is-squeeze2 .lmatch__tile { min-height: 38px; font-size: var(--fs-small); }
.lrun__body.is-squeeze2 .lbuild__answer { min-height: 52px; }

/* Design review 2026-10-16 */
/* The small Latin letter and Cyrillic word in "Both" are what's being learned: full contrast. */
.labc__tile.is-both .labc__t2, .labc__wordcyr { color: var(--fern); }
/* A picked letter's card never hides under the sticky header. */
.labc__stage, .labc__tile { scroll-margin-top: calc(var(--safe-top) + 76px); }
/* The card keeps its fixed height but its content sits together, without a dead gap. */
.labc__card { justify-content: center; gap: 14px; }
.labc__tab { min-height: 48px; }
/* On narrow phones "Play all 30" takes its own full row instead of sitting alone at the left. */
@media (max-width: 380px) { .labc__all { flex: 1 1 100%; justify-content: center; } }
/* Match the pairs: the first squeeze keeps tiles at a comfortable 46px. */
.lrun__body.is-squeeze .lmatch__tile { min-height: 46px; }
/* The letter card stays put at the top while the letters scroll under it (short phones). */
.labc__stage { position: sticky; top: 0; z-index: 2; background: var(--paper); box-shadow: 0 10px 12px -10px var(--paper); }
.labc { overflow-x: clip; }
.labc__trap.is-info { background: var(--mint); color: var(--fern); }
.labc__trap.is-info .labc__bang { background: var(--sage); font-style: normal; font-family: var(--serif); }

/* ---------- the pixel bridge (PixelLab scene + painted deck boards) ---------- */
.lbridge__scene { aspect-ratio: 3 / 1; background: #e9efe0; border-radius: var(--r-card); overflow: hidden; }
.lbridge__art { width: 100%; height: 100%; }
.lbridge__art image { image-rendering: pixelated; image-rendering: crisp-edges; }
.lbridge__plank.is-empty { fill: rgba(255, 250, 240, 0.35); stroke: rgba(255, 250, 240, 0.95); stroke-width: 1; stroke-dasharray: 2 2; }
.lbridge__plank.is-laid, .lbridge__plank.is-crack, .lbridge__plank.is-fallen { stroke: none; fill: none; }
.lbridge__plank.is-fallen { opacity: 0.85; }
.lbridge--today .lbridge__plank.is-laid:last-of-type { transform-box: fill-box; transform-origin: center; }

/* Coffee cups (šoljice) for speaking practice */
.lspeak__cups--out { font: inherit; font-size: var(--fs-small); font-weight: 800; display: block; margin: 12px auto 0; padding: 8px 12px; border-radius: var(--r-btn); background: #f7efe3; color: #7a581a; max-width: 30ch; line-height: 1.3; }
/* The coffee-cup row: ten little Serbian cups, full for today's cups left, faded for used ones. */
.lcuprow { --cw: 20px; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: #7a581a; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lcuprow__cups { display: inline-flex; align-items: flex-end; gap: var(--cg, 2px); }
.lcup { display: block; flex: none; width: var(--cw); height: calc(var(--cw) * 20 / 26); background: url(/cups/empty.png) center / contain no-repeat; }
.lcup.is-full { background-image: url(/cups/full.png); }
.lcuprow__more { font-weight: 800; font-size: var(--fs-label); }
.lcuprow__info { display: inline-flex; align-items: center; gap: 1px; height: 22px; padding: 0 7px 0 5px; border-radius: 999px; background: #f7efe3; border: 1px solid #ecdcc4; font-weight: 800; font-size: var(--fs-label); line-height: 1; }
.lcuprow__info svg { width: 13px; height: 13px; }
.lcuprow:active .lcuprow__info { transform: scale(0.94); }
/* Under Čika Vuk on the Learn page: a little shelf attached to his card. */
.lvuk-wrap { display: flex; flex-direction: column; }
.lvuk-wrap > .lvuk { border-radius: 20px 20px 0 0; }
.lcuprow--card { --cw: 24px; justify-content: center; gap: 10px; padding: 9px 12px; min-height: 44px; border: 1.5px solid var(--edge); border-top: 1px dashed var(--line); border-radius: 0 0 20px 20px; background: #fffaf2; }
.lcuprow--card .lcup { image-rendering: pixelated; }
@media (max-width: 380px) { .lcuprow--card { --cw: 21px; gap: 8px; } }
/* In a lesson: under Vuk's speech bubble. */
.lperch__col { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-width: 0; align-self: stretch; }
.lperch__col .lperch__say { align-self: flex-start; }
.lcuprow--perch { --cw: 17px; --cg: 1px; gap: 5px; }
[data-fit='roomy'] .lcuprow--perch { --cw: 19px; --cg: 2px; }
.lcuprow--perch .lcuprow__info { height: 20px; font-size: var(--fs-label); }
/* The explanation card */
.cups-pop__title { margin: 0; font-family: var(--serif); font-size: var(--fs-title); line-height: 1.15; }
.lcuprow--big { --cw: 26px; cursor: default; }
.lcuprow--big .lcup { image-rendering: pixelated; }
.lcuprow--big .lcuprow__info { display: none; }
.cups-pop__left { margin: -4px 0 0; font-weight: 800; color: #7a581a; }
.cups-pop__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.cups-pop__list li { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: var(--r-btn); background: var(--paper); border: 1.5px solid var(--edge); font-size: var(--fs-small); line-height: 1.35; }
.cups-pop__list li strong { color: var(--fern); }
.cups-pop__list li:last-child { background: #fff6dc; border-color: #f3d79c; }
.cups-pop__list li:last-child strong { color: #7a581a; }
/* The close button stays in the card's corner (.icon-btn's hit-area rule made it relative). */
.badge-pop__close.icon-btn { position: absolute; top: 10px; right: 10px; }
.cups-pop__panel { max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 32px); overflow-y: auto; gap: 10px; padding-top: 22px; }
.cups-pop__list { gap: 6px; }
.cups-pop__list li { padding: 7px 11px; font-size: var(--fs-small); line-height: 1.3; }
@media (max-height: 700px) { .cups-pop__title { font-size: var(--fs-title); } .cups-pop__list li { padding: 6px 10px; font-size: var(--fs-small); } }
.lperch__col .lperch__say { flex: none; }
[data-fit='tight'] .lperch__col { gap: 3px; }
/* The little cup row in the perch is easy to hit without stealing Vuk's tip tap. */
.lcuprow--perch { position: relative; }
.lcuprow--perch::after { content: ''; position: absolute; inset: -10px -4px; }

/* ---------- Vučko's trophy cabinet and the postcards wall ---------- */
.lcollect { margin-top: 2px; }
.lcollect__card { min-height: 132px; justify-content: flex-end; }
.lcollect__card--cabinet { background: radial-gradient(130% 120% at 100% 0%, #f6e3c4 0%, #e9c79b 55%, #d9a978 100%); border-color: #d9b48a; }
.lcollect__card--wall { background: radial-gradient(130% 120% at 100% 0%, #fbeede 0%, #ecd2ae 55%, #ddb487 100%); border-color: #dcbb93; }
.lcollect__card .lgame__kicker { color: #6b4424; }
.lcollect__card .lgame__sub { color: #6b4d2a; }
.lcollect__icon { position: absolute; top: 10px; left: 10px; width: 48px; height: 48px; image-rendering: pixelated; }

/* Vučko sniffing in a lesson: a "!" over the pup, a little wiggle, a warm bubble */
.lperch__pair { position: relative; }
.lperch.is-sniffing .lperch__pair::after { content: '!'; position: absolute; right: -4px; top: 18px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--sun, #f2a65a); color: #fff; font-weight: 800; font-size: var(--fs-small); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); animation: lsniff-bob 0.9s ease-in-out infinite; }
.lperch.is-sniffing .lperch__pair > :last-child { animation: lsniff-wiggle 0.6s ease-in-out infinite; transform-origin: 50% 100%; }
.lperch__say.is-sniff { background: #fff1dc; border-color: #f0c48f; color: #8a4f17; }
@keyframes lsniff-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes lsniff-wiggle { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }

/* The cabinet: a walnut vitrina with glass shelves, four trophies to a shelf */
.lcab__intro { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-card); background: var(--paper); border: 1.5px solid var(--edge); }
.lcab__intro p { margin: 0; font-size: var(--fs-small); color: var(--moss); }
.lcab { position: relative; margin: 6px auto 0; width: 100%; max-width: 380px; padding: 14px 12px 0; border-radius: 16px 16px 6px 6px; background: linear-gradient(180deg, #6e4427, #5a361e); border: 4px solid #43281a; box-shadow: inset 0 0 0 3px #8a5a34, 0 14px 22px -16px rgba(60, 30, 10, 0.9); }
.lcab__crown { position: absolute; left: 18%; right: 18%; top: -14px; height: 14px; border-radius: 10px 10px 0 0; background: #5a361e; border: 4px solid #43281a; border-bottom: 0; }
.lcab__shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 8px 4px 0; margin-bottom: 10px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)); border-radius: 4px 4px 0 0; border-bottom: 8px solid #a06a3d; box-shadow: 0 4px 0 #43281a; }
.lcab__base { height: 14px; margin: 0 -12px; border-top: 3px solid #43281a; background: #4b2d1a; border-radius: 0 0 3px 3px; }
.lcab__slot { height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 0 0 4px; border: 0; background: none; color: #fbeede; font: inherit; cursor: pointer; }
.lcab__slot.is-hidden { cursor: default; }
.lcab__q { width: 40px; height: 44px; margin-bottom: 18px; display: grid; place-items: center; border: 2px dashed rgba(251, 238, 222, 0.35); border-radius: 8px; color: rgba(251, 238, 222, 0.45); font-weight: 800; }
.lcab__img { width: 48px; height: 48px; image-rendering: pixelated; object-fit: contain; }
.lcab__img--covered { filter: brightness(0) opacity(0.38); }
.lcab__slot.is-found .lcab__img { animation: lsniff-bob 1.6s ease-in-out infinite; }
.lcab__label { max-width: 100%; font-size: var(--fs-label); font-weight: 800; line-height: 1.1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcab__slot.is-found .lcab__label { color: #ffd59a; }
.lcab__slot:active .lcab__img { transform: scale(0.94); }

/* The cards for a find, a trophy and a postcard */
.lpop__panel { gap: 10px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.lpop__panel .lword { margin: 0; }
.lpop__panel .lmeaning { margin: 0; }
.lfind__pair { display: flex; align-items: flex-end; justify-content: center; gap: 12px; min-height: 96px; }
.lfind__trophy { width: 96px; height: 96px; }
.lfind__trophy.is-new { animation: pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.lfind__note { margin: 0; font-size: var(--fs-small); color: var(--muted); }
.ltrophy__name { font-family: var(--serif); font-size: var(--fs-title); color: var(--moss); }
.ltrophy__note { margin: -6px 0 0; font-size: var(--fs-small); color: var(--muted); }
.ltrophy__say { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; }
.ltrophy__heard { flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; justify-content: center; }
.ltrophy__heard p { margin: 0; }
.lmic.lmic--small { width: 60px; height: 60px; flex: none; margin: 0; }
.ltrophy__type { width: 100%; display: flex; gap: 8px; }
.ltrophy__input { flex: 1; min-width: 0; }

/* The wall: cork in a wooden frame, postcards pinned a little crooked */
.lwall { margin-top: 4px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; padding: 22px 14px 18px; border-radius: var(--r-btn); border: 8px solid #7a5232; background: #c39463 url('/collections/cork.png') repeat; background-size: 128px 128px; image-rendering: pixelated; box-shadow: inset 0 0 0 2px #5b3a22, 0 14px 22px -16px rgba(60, 30, 10, 0.8); }
.lpost { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px 6px 5px; border: 0; border-radius: 3px; background: var(--paper); box-shadow: 0 6px 10px -6px rgba(40, 20, 5, 0.7); transform: rotate(var(--tilt, 0deg)); font: inherit; color: var(--moss); cursor: pointer; }
.lpost:active { transform: rotate(var(--tilt, 0deg)) scale(0.97); }
.lpost__img { width: 100%; height: auto; aspect-ratio: 3 / 2; image-rendering: pixelated; display: block; }
.lpost__name { font-size: var(--fs-label); font-weight: 800; text-align: center; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpost__pin { position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a73, #c0392b 60%, #7e1f15); box-shadow: 0 2px 2px rgba(0, 0, 0, 0.35); z-index: 1; }
.lpost.is-empty { background: rgba(255, 250, 240, 0.32); box-shadow: none; border: 2px dashed rgba(255, 250, 240, 0.75); cursor: default; }
.lpost.is-empty .lpost__pin { background: #9b7a57; }
.lpost__blank { aspect-ratio: 3 / 2; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-title); color: rgba(255, 250, 240, 0.85); }
.lpost.is-empty .lpost__name { color: var(--paper); text-shadow: 0 1px 1px rgba(60, 30, 10, 0.6); }

/* A postcard that turns over */
.lflip { width: 100%; max-width: 300px; aspect-ratio: 3 / 2; padding: 0; border: 0; background: none; perspective: 900px; cursor: pointer; font: inherit; color: inherit; }
.lflip__inner { position: relative; display: block; width: 100%; height: 100%; transition: transform 0.55s cubic-bezier(0.3, 1.3, 0.5, 1); transform-style: preserve-3d; }
.lflip.is-back .lflip__inner { transform: rotateY(180deg); }
.lflip__front, .lflip__back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 6px; overflow: hidden; box-shadow: 0 10px 18px -10px rgba(40, 20, 5, 0.75); }
.lflip__front { background: var(--paper); padding: 6px; }
.lflip__front img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; border-radius: 2px; }
.lflip__name { position: absolute; left: 12px; bottom: 12px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 250, 240, 0.92); font-family: var(--serif); font-size: var(--fs-body); color: var(--moss); }
.lflip__back { transform: rotateY(180deg); display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; text-align: left; background: repeating-linear-gradient(180deg, var(--paper) 0 21px, #efe3cc 21px 22px); }
.lflip__hello { font-family: var(--serif); font-size: var(--fs-title); color: var(--clay-ink, #9a4a36); }
.lflip__fact { font-size: var(--fs-label); line-height: 1.35; color: var(--moss); }
.lflip__from { margin-top: auto; align-self: flex-end; font-size: var(--fs-label); font-style: normal; color: var(--muted); }
.lpostpop__hint { margin: 0; font-size: var(--fs-small); color: var(--muted); }
.lpostpop__say { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--moss); }
.lpostpop__say .lvoice { flex-direction: row; }
.lbridge-news__post { width: 60px; height: 40px; flex: none; border: 3px solid var(--paper); border-radius: 2px; image-rendering: pixelated; box-shadow: 0 3px 6px -3px rgba(40, 20, 5, 0.7); transform: rotate(-3deg); }

@media (prefers-reduced-motion: reduce) {
  .lperch.is-sniffing .lperch__pair::after, .lperch.is-sniffing .lperch__pair > :last-child, .lcab__slot.is-found .lcab__img, .lfind__trophy.is-new { animation: none !important; }
  .lflip__inner { transition: none; }
}
.ltrophy__type .btn { flex: none; width: auto; padding-inline: 22px; }
.ltrophy__input { min-height: 48px; }
/* The two collection cards: picture on its own row at the top, text below, nothing overlapping */
.lcollect__card { justify-content: flex-start; gap: 2px; padding: 12px 14px 14px; min-height: 0; }
.lcollect__icon { position: static; display: block; width: 44px; height: 44px; margin: 0 0 6px -2px; flex: none; }
.lcollect__card .lgame__kicker { line-height: 1.2; }
.lcollect__card .lgame__word { line-height: 1.1; }
.lcollect__card .lgame__sub { line-height: 1.25; }

/* ---------- A postcard arrives: envelope up, seal pops, flap opens, card rises ---------- */
.lmail { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: calc(24px + var(--safe-area-inset-top, env(safe-area-inset-top))) 16px calc(24px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); background: radial-gradient(120% 80% at 50% 40%, rgba(255, 244, 222, 0.97), rgba(239, 214, 170, 0.97)); animation: lmail-in 0.3s ease both; overflow: hidden; }
.lmail.is-leaving { animation: lmail-out 0.26s ease both; }
@keyframes lmail-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lmail-out { to { opacity: 0; } }
.lmail__stage { position: relative; width: min(280px, 76vw); aspect-ratio: 3 / 2; margin-top: min(120px, 22vw); perspective: 900px; }

.lmail__env { position: absolute; inset: 0; animation: lmail-fly 0.75s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
@keyframes lmail-fly { from { transform: translateY(120vh) rotate(-14deg) scale(0.8); } 70% { transform: translateY(-4%) rotate(2deg) scale(1.02); } to { transform: none; } }
@keyframes lmail-env-away { to { transform: translateY(70%) scale(0.92); opacity: 0; } }
.lmail__back, .lmail__front, .lmail__flap { position: absolute; inset: 0; border-radius: 6px; }
.lmail__back { background: #e9d3a8; box-shadow: 0 18px 30px -16px rgba(80, 45, 15, 0.8); }
.lmail__front { z-index: 3; background: linear-gradient(180deg, #f6e6c4, #efd9ad); clip-path: polygon(0 32%, 50% 66%, 100% 32%, 100% 100%, 0 100%); }
.lmail__flap { z-index: 4; height: 62%; background: linear-gradient(180deg, #f2ddb4, #e4c793); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; animation: lmail-flap 0.45s ease 0.95s forwards; }
@keyframes lmail-flap { to { transform: rotateX(180deg); z-index: 1; } }
.lmail__seal { position: absolute; left: 50%; bottom: 2px; width: 34px; height: 34px; margin-left: -17px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e0584a, #a8261c 70%); color: #ffd6c8; font-family: var(--serif); font-weight: 800; font-size: var(--fs-body); box-shadow: 0 2px 0 #7d1a12; animation: lmail-seal 0.35s ease 0.7s forwards; }
@keyframes lmail-seal { 40% { transform: scale(1.25); } to { transform: scale(0) rotate(40deg); opacity: 0; } }
.lmail__stamp { position: absolute; z-index: 5; right: 10px; top: 10px; width: 30px; height: 36px; background: repeating-linear-gradient(45deg, var(--paper) 0 3px, #f3e2bf 3px 6px); border: 2px dotted #c9a46c; animation: lmail-env-away 0.01s linear 0.95s forwards; }

/* The card: hidden in the envelope, rises out, then comes forward big */
.lmail__card { position: absolute; z-index: 2; left: 6%; right: 6%; top: 8%; bottom: 8%; padding: 5px; background: var(--paper); border-radius: 3px; box-shadow: 0 8px 16px -8px rgba(40, 20, 5, 0.8); opacity: 0; animation: lmail-rise 0.6s cubic-bezier(0.3, 1.2, 0.5, 1) 1.25s forwards, lmail-forward 0.55s cubic-bezier(0.3, 1.4, 0.5, 1) 1.9s forwards; }
.lmail__card img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.lmail__name { position: absolute; left: 10px; bottom: 10px; padding: 1px 8px; border-radius: 6px; background: rgba(255, 250, 240, 0.92); font-family: var(--serif); color: var(--moss); }
@keyframes lmail-rise { from { opacity: 1; } to { opacity: 1; transform: translateY(-62%); } }
@keyframes lmail-forward { from { opacity: 1; transform: translateY(-62%); z-index: 6; } to { opacity: 1; transform: translateY(-58%) scale(1.22) rotate(-2deg); z-index: 6; } }
.lmail__env { z-index: 1; }

/* Sparkles burst from behind the card as it comes forward */
.lmail__sparks { position: absolute; left: 50%; top: 45%; width: 0; height: 0; z-index: 0; }
.lmail__sparks i { position: absolute; width: 10px; height: 10px; margin: -5px; background: #ffc85a; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: lmail-spark 0.9s ease-out 1.95s forwards; }
.lmail__sparks i:nth-child(3n) { background: #f08a5d; }
.lmail__sparks i:nth-child(3n + 1) { background: #9ccf8a; }
@keyframes lmail-spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(0.6); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-150px * var(--d))) scale(1.3); } }

.lmail__finale { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; opacity: 0; transform: translateY(14px); animation: lmail-finale 0.45s ease 2.3s forwards; }
@keyframes lmail-finale { to { opacity: 1; transform: none; } }
.lmail__finale .lkicker { margin: 0; }
.lmail__hello { margin: 0; font-family: var(--serif); font-size: var(--fs-h1); color: var(--clay-ink, #9a4a36); }
.lmail__pair { display: flex; align-items: flex-end; gap: 0; height: 74px; }
.lmail__btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Tapped to hurry, or reduced motion: straight to the open card */
.lmail.is-done .lmail__stage, .lmail.is-done .lmail__stage *, .lmail.is-done .lmail__finale { animation-delay: 0s !important; animation-duration: 0.01s !important; }
@media (prefers-reduced-motion: reduce) {
  .lmail, .lmail__stage, .lmail__stage *, .lmail__finale { animation-delay: 0s !important; animation-duration: 0.01s !important; }
}

/* "Say it like a local" in a lesson */
.lslang { gap: 10px; }
.lslang__kicker { display: inline-flex; align-items: center; gap: 8px; color: #8a4f17; }
.lslang__trophy { width: 24px; height: 24px; image-rendering: pixelated; }
.lslang__line { margin: 0; font-family: var(--serif); font-size: var(--fs-h1); line-height: 1.25; color: var(--moss); }
.lslang__line mark { padding: 0 3px; margin: 0 -1px; border-radius: 6px; background: #ffe3b5; color: #8a4f17; box-shadow: inset 0 -2px 0 #f0c48f; }
.lslang__ask { margin: 0; font-size: var(--fs-body); color: var(--muted); }
.lslang__ask strong { color: #8a4f17; }
.lslang__say { margin-top: 2px; }
.lslang__input { width: 100%; }
/* Vučko's wink: a test sentence where his slang word would win a trophy */
.lperch.is-winking .lperch__pair::after { content: '😉'; position: absolute; right: -6px; top: 14px; font-size: var(--fs-body); animation: lsniff-bob 1.2s ease-in-out infinite; }

/* 1.9.34: the Home tile's learning status, next to Čika Vuk and Vučko on the Learn path */
.lvuk-wrap.has-status { position: relative; }
.lvuk-wrap.has-status > .lvuk { padding-right: 134px; min-height: 146px; }
.lvuk__status { position: absolute; top: 0; bottom: 45px; right: 14px; display: flex; align-items: center; pointer-events: none; }
.lvuk__status .hero__status { margin: 0; cursor: default; background: var(--white); border: 1.5px solid var(--edge); box-shadow: 0 6px 14px -12px color-mix(in srgb, var(--moss) 50%, transparent); }
.lvuk__status .hero__status:active { transform: none; }
@media (max-width: 380px) {
  /* simpler on small phones: the icon and the streak, without the second line */
  .lvuk-wrap.has-status > .lvuk { padding-right: 106px; min-height: 120px; }
  .lvuk__status { right: 10px; }
  .lvuk__status .hero__status { width: 88px; min-height: 0; padding: 10px 6px; }
  .lvuk__status .hero__status-line { display: none; }
  .lvuk-wrap.has-status .lvuk__text strong { white-space: normal; font-size: var(--fs-body); }
}

/* 1.9.34: in a lesson, the streak as a small pill at the end of the progress bar */
.lrun__top .hero__status--pill {
  flex: none; width: auto; min-height: 0; margin: 0 0 0 4px; padding: 3px 10px 3px 3px;
  flex-direction: row; gap: 5px; border-radius: 999px; cursor: default;
  background: var(--paper); border: 1.5px solid var(--edge); box-shadow: none;
}
.lrun__top .hero__status--pill .hero__status-icon { width: 26px; height: 26px; margin: 0; }
.lrun__top .hero__status--pill .hero__status-icon svg { width: 16px; height: 16px; }
.lrun__top .hero__status--pill .hero__status-title { font-size: var(--fs-body); }
.lvuk-wrap.has-status > .lvuk { gap: 8px; padding-left: 10px; }
/* Wider phones keep Vuk's greeting on one line; small phones let it wrap (it used to be cut off). */
@media (min-width: 381px) { .lvuk-wrap.has-status .lvuk__text strong { white-space: nowrap; } }
.lvuk-wrap.has-status .lvuk__more { font-size: var(--fs-small); }

/* ---------- Rečnik: the dictionary ---------- */
.lgame--dict { text-align: left; }
.lgame--dict .lgame__badge { position: static; flex: none; }
.ldict__search { display: flex; align-items: center; gap: 10px; margin: 0 16px 10px; padding: 0 14px; min-height: 52px; border-radius: var(--r-card); border: 1.5px solid var(--edge); background: var(--white); }
.ldict__search:focus-within { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(163, 197, 159, 0.35); }
.ldict__icon { flex: none; display: inline-flex; color: var(--muted); }
.ldict__icon svg { width: 20px; height: 20px; }
.ldict__input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: var(--fs-body); color: var(--moss); padding: 12px 0; outline: none; }
.ldict__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ldict__list { display: flex; flex-direction: column; gap: 10px; }
.ldict__row .lname__text span { font-weight: 800; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldict__learned { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e2efdc; color: #3f7a3a; }
.ldict__learned svg { width: 18px; height: 18px; }
.ldict__ask { align-self: flex-start; }
.ldict__ask.is-busy { opacity: 0.6; }
.ldict__word { border: 0; background: none; padding: 6px 14px; min-height: 48px; border-radius: var(--r-btn); font-family: var(--serif); font-weight: 800; font-size: var(--fs-display); line-height: 1.12; color: inherit; cursor: pointer; overflow-wrap: anywhere; }
.ldict__meaning { margin: 4px 0 0; font-weight: 800; font-size: var(--fs-body); text-align: center; color: var(--moss); }
.ldict__grammar { margin: 2px 0 0; font-size: var(--fs-small); color: var(--muted); text-align: center; }
.ldict__ex { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; padding: 10px 10px 10px 14px; border-radius: var(--r-card); background: var(--white); border: 1.5px solid var(--edge); text-align: left; width: 100%; box-sizing: border-box; }
.ldict__extext { flex: 1; min-width: 0; }
.ldict__ex p { margin: 0; }
.ldict__ex p + p { margin-top: 2px; color: var(--muted); font-size: var(--fs-small); }
.ldict__exsay { flex: none; width: 44px; height: 44px; }
.ldict__exsay svg { width: 20px; height: 20px; }
.ldict__stars { display: flex; justify-content: center; gap: 4px; margin: 2px 0 0; color: #d8cdb6; }
.ldict__stars span { display: inline-flex; }
.ldict__stars span svg { width: 22px; height: 22px; }
.ldict__stars .is-on { color: var(--wheat-deep); }
.ldict__word:active { background: var(--paper); }

/* ---------- listening practice and the reading script (path cards) ---------- */
.lgames--pair { margin-top: -6px; }
.lgames--pair .lgame { min-height: 112px; justify-content: flex-start; transition: transform 0.15s ease; }
.lgames--pair .lgame:active { transform: scale(0.98); }
.lgames--pair .lgame__sub { margin-bottom: 40px; }
.lgame--listen { background: radial-gradient(120% 120% at 100% 0%, #f1f6ec 0%, #dce9d6 55%, #c9ddc3 100%); border-color: #c6dbbf; box-shadow: 0 14px 24px -18px color-mix(in srgb, var(--moss) 70%, transparent); }
.lgame--listen .lgame__kicker, .lgame--listen .lgame__badge { color: var(--fern); }
.lgame--listen .lgame__sub { color: #4f6150; }
.lgame--listen.is-locked { background: #f4efe4; border-color: var(--line); }
.lgame--listen.is-locked .lgame__kicker, .lgame--listen.is-locked .lgame__sub, .lgame--listen.is-locked .lgame__badge { color: var(--muted); }
.lgame--script { background: var(--wheat-soft); border-color: var(--wheat); }
.lgame--script .lgame__kicker { color: var(--ochre); }
.lgame--script.is-on { background: linear-gradient(160deg, #fff6dc 0%, #ffe99e 100%); border-color: var(--wheat-deep); }
.lgame__abc { font-family: var(--serif); font-size: var(--fs-title); font-weight: 800; color: var(--ochre); line-height: 1; }

/* ---------- a conversation with Čika Vuk ----------
   The chat box has one fixed height: new lines push older ones up and out of sight, so the
   exercise never grows. The three reply slots stay in place when the talk ends. */
.ldlg { flex: 1 1 auto; min-height: 0; margin-bottom: 0; }
.ldlg__title { margin: -4px 0 0; font-family: var(--serif); font-size: var(--fs-title); font-weight: 800; color: var(--moss); }
/* The chat takes whatever height the phone leaves, so the exercise always fits; when the talk
   ends, the reply slots go and the chat fills their place (the card itself never changes size). */
.ldlg__chat {
  flex: 1 1 auto;
  min-height: 4.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 1.6rem);
  mask-image: linear-gradient(to bottom, transparent 0, #000 1.6rem);
}
.ldlg__b {
  flex: none;
  max-width: 86%;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--r-card);
  border: 1.5px solid var(--edge);
  background: var(--white);
  text-align: left;
  color: var(--moss);
  animation: ldlg-in 0.25s ease both;
}
.ldlg__b--vuk { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--clay-soft); border-color: #f6d3c2; }
.ldlg__b--me { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--mint); border-color: var(--mint-deep); }
.ldlg__b.is-playing { box-shadow: 0 0 0 3px rgba(107, 138, 100, 0.35); }
.ldlg__sr { font-family: var(--serif); font-size: var(--fs-title); font-weight: 600; line-height: 1.2; }
.ldlg__en { font-size: var(--fs-label); font-weight: 800; color: var(--muted); }
.ldlg__opts { flex: none; gap: 8px; }
/* Every reply set is the same height (two lines at most), so nothing moves from turn to turn. */
.ldlg .ldlg__opt { height: 62px; min-height: 0; padding: 3px 14px; overflow: hidden; }
.ldlg .ldlg__opt[lang^='sr'] { font-size: var(--fs-body); line-height: 1.12; }
.ldlg.is-done .ldlg__opts { display: none; }
@keyframes ldlg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ldlg__b { animation: none; } }
[data-fit='tight'] .ldlg__opt, .lrun__body.is-squeeze .ldlg__opt { height: 62px; min-height: 0; padding-top: 3px; padding-bottom: 3px; }
[data-fit='tight'] .ldlg__opt[lang^='sr'], .lrun__body.is-squeeze .ldlg__opt[lang^='sr'] { font-size: var(--fs-body); line-height: 1.1; }

/* Read by screen readers only. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lrun__body.is-squeeze2 .ldlg__opt[lang^='sr'] { font-size: var(--fs-small); line-height: 1.08; }
/* Vuk's pet, under the cups on the Vuk card (opens the pet picker). */
.lvuk-wrap .lcuprow--card:has(+ .lpetrow) { border-radius: 0; }
.lpetrow {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 14px; margin: 0;
  border: 1.5px solid var(--edge); border-top: 1px dashed var(--line); border-radius: 0 0 20px 20px; background: #fffaf2;
  font: inherit; font-weight: 800; font-size: var(--fs-small); color: var(--moss); text-align: left; cursor: pointer;
}
.lpetrow img { width: 30px; height: 30px; object-fit: contain; image-rendering: pixelated; }
.lpetrow span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lpetrow__go { font-size: var(--fs-title); color: var(--muted); }
/* With the pet row under the cups, the streak box keeps clear of both rows. */
.lvuk-wrap.has-status:has(> .lpetrow) .lvuk__status { bottom: 90px; }

/* Nov 9, 2026: the Vuk card (greeting, cups, pet) is one clearly framed card in every theme, not
   blended into the page: a white face, a firm outline drawn from the theme's own colour, a soft
   shadow, and solid lines between its three parts. */
.lvuk-wrap {
  --edge: color-mix(in srgb, var(--fern) 30%, #ffffff);
  border: 1.5px solid var(--edge);
  border-radius: var(--r-card);
  background: var(--white, #fff);
  box-shadow: 0 3px 10px rgba(28, 42, 74, 0.08), 0 1px 2px rgba(28, 42, 74, 0.06);
  overflow: hidden;
}
.lvuk-wrap > .lvuk { border: 0; border-radius: 0; background: var(--white, #fff); }
.lvuk-wrap > .lcuprow--card,
.lvuk-wrap > .lpetrow { border: 0; border-top: 1px solid color-mix(in srgb, var(--fern) 18%, #ffffff); border-radius: 0; }
.lvuk-wrap > .lcuprow--card { background: color-mix(in srgb, #fff6e6 80%, var(--paper)); }
.lvuk-wrap > .lpetrow { background: color-mix(in srgb, #fffaf2 85%, var(--paper)); }

/* Every card on the Learn page gets the same firm frame as the Vuk card (Nov 9, 2026): each keeps
   its own colour, with a clearly visible outline and a soft shadow, in every theme. */
#learnView :is(.lbridge, .lmissions, .lgame, .lbadges, .lsec, [data-map] .btn--quiet) {
  border-width: 1.5px;
  border-style: solid;
  border-color: color-mix(in srgb, var(--moss) 26%, transparent);
  box-shadow: 0 3px 10px rgba(28, 42, 74, 0.07), 0 1px 2px rgba(28, 42, 74, 0.06);
}
#learnView .lvuk-wrap { border-color: color-mix(in srgb, var(--moss) 26%, transparent); }
/* The time-of-day greeting with the learner's name (moved here from the top bar): may wrap onto
   two lines at any width, so a name is never cut off. */
.lvuk-wrap.has-status .lvuk__text strong { white-space: normal !important; line-height: 1.2; overflow-wrap: anywhere; }

/* Vuk card status box: two tidy lines instead of four */
@media (min-width: 381px) { .lvuk__status .hero__status { width: 118px; padding: 10px 8px; gap: 2px; text-align: center; } }
.lvuk__status .hero__status-title { font-size: var(--fs-small); line-height: 1.2; text-wrap: balance; }
.lvuk__status .hero__status-line { font-size: var(--fs-label); line-height: 1.25; text-wrap: balance; }

/* Admin: report a problem with the exercise on screen (the flag at the top of a lesson). */
.lrun__report { flex: none; color: var(--rust, #b4552d); }
.lreport { align-items: stretch; text-align: left; }
.lreport__title { margin: 0; font-family: var(--serif); font-size: 1.35rem; text-align: center; }
.lreport__where { margin: 0; font-weight: 600; font-size: var(--fs-small, .875rem); }
.lreport__shown { margin: 0; font-size: var(--fs-small, .875rem); opacity: .75; max-height: 6.5em; overflow-y: auto; overflow-wrap: anywhere; }
.lreport__note { width: 100%; min-height: 96px; resize: none; font: inherit; }
.reports { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reports__item { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, rgba(0,0,0,.04)); justify-items: start; }
.reports__note { white-space: pre-wrap; overflow-wrap: anywhere; }
.reports__shown, .reports__meta { font-size: var(--fs-small, .875rem); opacity: .7; overflow-wrap: anywhere; }

/* ---------- read and respond (from section 10 on) ----------
   The message reads like a note from someone: who wrote it, then the Serbian. Its meaning shows in
   the answer bar afterwards, so answering never moves anything in the card. */
.lresp__msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--r-card);
  border-bottom-left-radius: 6px;
  border: 1.5px solid #f6d3c2;
  background: var(--clay-soft);
  color: var(--moss);
}
.lresp__who { font-size: var(--fs-label); font-weight: 800; letter-spacing: 0.02em; color: var(--muted); }
.lresp__sr { margin: 0; font-family: var(--serif); font-size: var(--fs-title); font-weight: 600; line-height: 1.25; }
.lresp__q { margin: 2px 0 0; font-weight: 800; color: var(--moss); }
.lresp .lresp__opt[lang^='sr'] { font-size: var(--fs-body); line-height: 1.2; }
.lresp .lresp__opt { min-height: 50px; }
[data-fit='tight'] .lresp__sr, .lrun__body.is-squeeze .lresp__sr { font-size: var(--fs-body); }
[data-fit='tight'] .lresp .lresp__opt, .lrun__body.is-squeeze .lresp .lresp__opt { min-height: 42px; padding-top: 6px; padding-bottom: 6px; }

/* Admin: rewrite a conversation with Čika Vuk (learn.js openDialogEdit). */
.ldedit__lines { display: flex; flex-direction: column; gap: 10px; }
.ldedit__line { margin: 0; padding: 8px 10px 10px; border: 1px solid var(--line, #e3e3e3); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ldedit__line--me { background: rgba(232, 240, 233, 0.5); }
.ldedit__line legend { padding: 0 4px; font-weight: 800; font-size: var(--fs-small, .875rem); }
.ldedit__field { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-small, .875rem); font-weight: 700; }
.ldedit__field .input { width: 100%; font: inherit; font-weight: 600; font-size: 1rem; }
.ldedit__hint { color: var(--rust, #a0522d); font-weight: 600; }
.ldedit__hint:empty { display: none; }
.ldedit__more { display: flex; flex-wrap: wrap; gap: 8px; }
.ldedit__err { margin: 0; color: var(--rust, #a0522d); font-weight: 700; font-size: var(--fs-small, .875rem); white-space: pre-line; }
.ldedit__err:empty { display: none; }
.lcheck__dlg .btn { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; }
.lcheck__dlg .btn svg { width: 18px; height: 18px; }
.ldedit__voice { display: flex; flex-wrap: wrap; gap: 6px; }
.ldedit__redo { flex-basis: 100%; }
