/* Läxjakten milestone 2: daily mission + streak, Läxi, world map (Äventyret), onboarding, Föräldraläge */

/* ---------- Läxi ---------- */
.lx-face { display: inline-block; flex: none; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 40%, #46e6d6, #0f7f88); box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 3px 8px rgba(0, 0, 0, .3); }
.lx-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lx-art { display: block; height: auto; user-select: none; pointer-events: none; }
.lx-says { display: flex; align-items: center; gap: 11px; min-width: 0; }
.lx-bubble { position: relative; margin: 0; padding: 8px 13px 9px; border-radius: 15px; background: #fff8e8; color: #1d2150; font-weight: 800; font-size: 14px; line-height: 1.3; box-shadow: 0 3px 0 rgba(0, 0, 0, .2); text-wrap: pretty; }
.lx-says .lx-bubble::before { content: ''; position: absolute; left: -7px; top: 50%; margin-top: -7px; border-style: solid; border-width: 7px 8px 7px 0; border-color: transparent #fff8e8 transparent transparent; }

/* ---------- top bar: streak flame ---------- */
.streak-chip { gap: 5px; padding: 5px 13px 5px 6px; cursor: pointer; line-height: 1; }
.streak-chip .flame { width: 27px; height: 27px; flex: none; filter: grayscale(1) brightness(.62); transition: filter .3s; }
.streak-chip.on .flame { filter: none; }
.streak-chip b { font-weight: 400; min-width: .6em; text-align: center; }
.streak-chip.done { border-color: rgba(255, 154, 60, .65); box-shadow: 0 0 16px rgba(255, 120, 40, .35); }
.streak-chip:hover { border-color: var(--line2); }
@media (max-width: 760px) { .streak-chip { padding: 4px 10px 4px 4px; } .streak-chip .flame { width: 23px; height: 23px; } .logo .logo-txt { font-size: 20px; } }
@media (max-width: 400px) { .topbar { gap: 6px; } .logo { gap: 7px; } }
@media (max-width: 374px) { .logo .logo-txt { display: none; } }

/* ---------- hub: mission above the games (phones: above the figure) ---------- */
.hub { grid-template-areas: "stage top" "stage col"; grid-template-rows: auto 1fr; row-gap: 16px; }
.hub > .stage-wrap { grid-area: stage; }
.hub-top { grid-area: top; display: grid; gap: 14px; min-width: 0; align-content: start; }
.hub > .play-col { grid-area: col; }
@media (max-width: 1080px) { .hub { grid-template-areas: "top" "stage" "col"; grid-template-rows: auto; } }

.mission { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 16px; row-gap: 8px; align-items: center; padding: 14px 14px 14px 16px; overflow: hidden; border-color: rgba(255, 207, 63, .5);
  background: radial-gradient(120% 160% at 0% 0%, rgba(47, 224, 208, .2), transparent 55%), linear-gradient(180deg, rgba(48, 60, 150, .96), rgba(27, 34, 96, .97)); box-shadow: 0 0 0 4px rgba(255, 207, 63, .1), var(--shadow); }
.mission.done { border-color: rgba(79, 224, 124, .55); box-shadow: 0 0 0 4px rgba(79, 224, 124, .1), var(--shadow); background: radial-gradient(120% 160% at 0% 0%, rgba(79, 224, 124, .2), transparent 55%), linear-gradient(180deg, rgba(48, 60, 150, .96), rgba(27, 34, 96, .97)); }
.ms-ring { position: relative; width: 94px; height: 94px; flex: none; }
.ms-svg { width: 100%; height: 100%; display: block; }
.ms-arc { transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.ms-ring-c { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; line-height: 1; }
.ms-ring-c b { font-family: var(--font-display); font-weight: 400; font-size: 34px; }
.ms-ring-c small { font-size: 11px; font-weight: 900; color: var(--ink2); margin-top: 2px; }
.ms-ring-c small + small { margin-top: 0; }
.ms-ring-c.done svg { width: 42px; height: 42px; color: var(--green); stroke-width: 3.2; }
.ms-body { display: grid; gap: 6px; min-width: 0; }
.ms-k { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; font-weight: 900; letter-spacing: 1.3px; text-transform: uppercase; color: var(--gold); }
.mission.done .ms-k { color: #8cf5ae; }
.ms-flame { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; border-radius: 999px; background: rgba(0, 0, 0, .32); color: var(--ink2); letter-spacing: 0; text-transform: none; }
.ms-flame .flame { width: 19px; height: 19px; filter: grayscale(1) brightness(.65); }
.ms-flame.on .flame { filter: none; }
.ms-flame b { font-family: var(--font-display); font-weight: 400; font-size: 16px; color: #fff; }
.ms-flame small { font-size: 11px; font-weight: 800; }
.ms-title { font-family: var(--font-display); font-weight: 400; font-size: 25px; line-height: 1.08; color: var(--ink2); overflow-wrap: anywhere; }
.ms-title b { color: #fff; font-weight: 400; }
.mission.done .ms-title { color: #fff; }
.ms-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; align-items: center; font-size: 13px; font-weight: 800; color: var(--ink2); }
.ms-test { display: inline-flex; gap: 5px; align-items: center; color: #ffd98a; }
.ms-test svg.i { width: 16px; height: 16px; }
.ms-say { margin-top: 3px; }
.ms-say .lx-bubble { font-size: 13.5px; padding: 6px 11px 7px; }
.ms-side { position: relative; display: grid; justify-items: center; align-content: end; align-self: stretch; min-width: 118px; }
.ms-laxi { height: 112px; width: auto; margin: -6px 0 -10px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .35)); animation: lxBob 3.2s ease-in-out infinite; }
.mission.done .ms-laxi { height: 104px; }
.ms-play { position: relative; z-index: 1; min-width: 118px; }
.ms-play.btn.gold { font-size: 22px; padding: 11px 20px 13px; }
.ms-freeze { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(120, 200, 255, .12); border: 1.5px solid rgba(140, 210, 255, .35); color: #cfeaff; font-size: 13px; font-weight: 700; }
.ms-freeze svg.i { color: #9fdcff; width: 20px; height: 20px; }
.ms-freeze b { color: #fff; }
@keyframes lxBob { 50% { transform: translateY(-4px) rotate(-1deg); } }
@media (max-width: 560px) {
  .mission { grid-template-columns: auto minmax(0, 1fr); padding: 12px 12px 12px 12px; column-gap: 12px; }
  .ms-ring { width: 78px; height: 78px; align-self: start; margin-top: 2px; }
  .ms-ring-c b { font-size: 28px; }
  .ms-title { font-size: 21px; padding-right: 64px; }
  .ms-k { padding-right: 64px; }
  .ms-side { grid-column: 1 / -1; position: static; min-width: 0; display: block; }
  .ms-laxi { position: absolute; top: 4px; right: 6px; height: 84px; margin: 0; }
  .mission.done .ms-laxi { height: 80px; }
  .ms-play { width: 100%; }
  .ms-say .lx-bubble { font-size: 13px; }
}
/* the game picker opened by the mission */
.ms-weak { display: grid; gap: 6px; padding: 8px 4px; }
.ms-weak-row { display: flex; flex-wrap: wrap; gap: 6px; }
/* the result card: progress of today's mission */
.ms-result { display: inline-flex; align-items: center; gap: 10px; margin: 12px auto 0; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(0, 0, 0, .28); border: 1.5px solid rgba(255, 207, 63, .35); font-weight: 800; color: var(--ink2); }
.ms-result b { color: #fff; }
.ms-result-bar { display: block; width: 90px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.ms-result-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--gold)); }
/* the boss line on the result card */
.cr-laxi { display: flex; align-items: flex-end; gap: 8px; margin: 2px 0 4px; max-width: 460px; }
.cr-laxi-art { height: 92px; width: auto; flex: none; animation: lxBob 2.4s ease-in-out infinite; }
.cr-laxi .lx-bubble { margin-bottom: 26px; text-align: left; font-size: 14.5px; }
.cr-laxi .lx-bubble::before { content: ''; position: absolute; left: -7px; bottom: 12px; border-style: solid; border-width: 7px 8px 7px 0; border-color: transparent #fff8e8 transparent transparent; }

/* ---------- mission celebration (reuses the level-up ceremony) ---------- */
.mc-box { gap: 6px; }
.mc-stage { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 0; margin-top: 4px; }
.mc-laxi { height: min(30vh, 250px); width: auto; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45)); animation: mcJump .9s cubic-bezier(.3, 1.5, .4, 1) backwards; }
@keyframes mcJump { from { transform: translateY(60px) scale(.6); opacity: 0; } }
.mc-flame { position: relative; width: 120px; height: 140px; margin-left: -18px; display: grid; place-items: center; transform: scale(.72); transition: transform .55s cubic-bezier(.2, 1.7, .3, 1); }
.mc-flame.grow { transform: scale(1.05); }
.mc-flame-svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 26px rgba(255, 140, 40, .75)); transform-origin: 50% 90%; animation: mcFlicker 1.6s ease-in-out infinite; }
@keyframes mcFlicker { 50% { transform: scaleY(1.05) scaleX(.97); } }
.mc-flame b { position: relative; margin-top: 44px; font-family: var(--font-display); font-weight: 400; font-size: 52px; color: #fff; text-shadow: 0 3px 0 rgba(130, 40, 0, .7), 0 0 12px rgba(255, 120, 0, .6); }
.mc-title { font-size: clamp(42px, 9vw, 78px); }
.mc-sub { font-family: var(--font); font-weight: 800; font-size: 19px; }
@media (max-width: 560px) { .mc-flame { width: 96px; height: 112px; } .mc-flame b { font-size: 42px; margin-top: 36px; } .mc-laxi { height: min(26vh, 200px); } }

/* ---------- onboarding: Läxi explains the idea ---------- */
.ob-overlay { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); overflow-y: auto;
  background: radial-gradient(70% 60% at 50% 45%, rgba(20, 26, 80, .35), rgba(8, 11, 36, .9)), url(../assets/img/bg-varldskarta.jpg) center / cover no-repeat, var(--bg0); animation: fade .35s; }
.ob-overlay.out { opacity: 0; transition: opacity .25s; }
.ob-stage { position: relative; width: min(920px, 100%); display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); align-items: center; gap: 10px 26px; }
.ob-art { display: grid; place-items: end center; height: min(62vh, 440px); }
.ob-laxi { height: min(62vh, 440px); width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .5)); animation: obIn .55s cubic-bezier(.2, 1.4, .3, 1) backwards; }
@keyframes obIn { from { transform: translateY(24px) scale(.86); opacity: 0; } }
.ob-talk { display: grid; gap: 16px; min-width: 0; }
.ob-bubble { position: relative; display: grid; gap: 8px; padding: 22px 26px 24px; border-radius: 26px; background: #fff8e8; color: #1d2150; box-shadow: 0 6px 0 rgba(0, 0, 0, .22), 0 20px 40px rgba(0, 0, 0, .35); }
.ob-bubble::before { content: ''; position: absolute; left: -16px; top: 46%; border-style: solid; border-width: 14px 17px 14px 0; border-color: transparent #fff8e8 transparent transparent; }
.ob-bubble.in > * { animation: obText .4s cubic-bezier(.2, .9, .3, 1) both; }
.ob-bubble.in > :nth-child(3) { animation-delay: .06s; }
@keyframes obText { from { opacity: 0; transform: translateY(6px); } }
.ob-kicker { font-size: 12px; font-weight: 900; letter-spacing: 1.6px; text-transform: uppercase; color: #12958b; }
.ob-title { font-size: clamp(32px, 4.4vw, 46px); color: #1d2150; text-shadow: none; }
.ob-text { font-size: 19px; font-weight: 800; line-height: 1.4; color: #333a6e; }
.ob-name-row { display: grid; gap: 6px; margin-top: 6px; font-weight: 900; color: #1d2150; }
.ob-name { padding: 12px 14px; border-radius: 14px; border: 2.5px solid #d6cdb4; background: #fff; color: #1d2150; font-weight: 900; font-size: 20px; }
.ob-name:focus { outline: none; border-color: var(--gold2); }
.ob-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ob-dots { display: flex; gap: 8px; }
.ob-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .25); transition: background .2s, transform .2s; }
.ob-dots i.on { background: var(--gold); transform: scale(1.15); }
.ob-btns { display: flex; gap: 10px; align-items: center; margin-left: auto; }
@media (max-width: 760px) {
  .ob-overlay { align-items: end; }
  .ob-stage { grid-template-columns: 1fr; gap: 0; }
  .ob-art { order: 2; height: auto; margin-top: 10px; }
  .ob-laxi { height: min(33vh, 280px); }
  .ob-talk { order: 1; }
  .ob-foot { order: 3; }
  .ob-bubble { padding: 18px 18px 20px; border-radius: 22px; }
  .ob-bubble::before { left: 50%; top: auto; bottom: -16px; margin-left: -14px; border-width: 17px 14px 0 14px; border-color: #fff8e8 transparent transparent transparent; }
  .ob-text { font-size: 17px; }
  .ob-talk { display: contents; }
  .ob-foot { margin-top: 6px; }
  .ob-btns .btn.big { font-size: 21px; padding: 12px 22px 14px; min-height: 54px; }
}
.pf-msep { height: 1px; background: var(--line); margin: 4px 6px; }

/* ---------- Resan: the world map "Äventyret" ---------- */
.journey.wm { display: block; }
.wm-frame { position: relative; overflow: hidden; height: clamp(440px, calc(100dvh - var(--top-h) - 44px), 900px); border-radius: 26px; border: 2px solid var(--line); box-shadow: var(--shadow); background: #2b8fd6; isolation: isolate; }
.wm-scroll { position: absolute; inset: 0; overflow: hidden; }
.wm-frame.pan .wm-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.wm-frame.pan .wm-scroll::-webkit-scrollbar { display: none; }
.wm-world { position: absolute; left: 0; top: 0; }
.wm-img { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
/* the button is a big, forgiving tap target; the anchor (label top) is 150px down its middle */
.wm-island { position: absolute; width: 230px; height: 260px; margin: -150px 0 0 -115px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; z-index: 2; -webkit-tap-highlight-color: transparent; }
.wm-glow { position: absolute; left: 20px; top: 55px; width: 190px; height: 190px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255, 236, 140, .55) 0%, rgba(255, 207, 63, .22) 38%, transparent 68%); animation: wmGlow 2.4s ease-in-out infinite; }
.wm-island.done .wm-glow { background: radial-gradient(circle, rgba(140, 245, 174, .4), transparent 66%); }
@keyframes wmGlow { 50% { transform: scale(1.15); opacity: .65; } }
.wm-label { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); display: grid; grid-template-columns: auto auto; column-gap: 9px; row-gap: 6px; align-items: center; padding: 9px 13px 10px 9px; width: max-content; max-width: 230px;
  border-radius: 18px; background: rgba(12, 16, 48, .88); border: 2px solid color-mix(in srgb, var(--sc) 75%, white 0%); box-shadow: 0 8px 22px rgba(0, 0, 0, .45), 0 0 0 4px color-mix(in srgb, var(--sc) 22%, transparent); transition: transform .18s; text-align: left; }
.wm-island:hover .wm-label, .wm-island:focus-visible .wm-label { transform: translateX(-50%) translateY(-3px) scale(1.04); }
.wm-island:focus-visible { outline: none; }
.wm-island:focus-visible .wm-label { outline: 3px solid var(--gold); outline-offset: 2px; }
.wm-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--sc); color: #14183a; box-shadow: 0 3px 0 rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .4); }
.wm-ic svg.i { width: 22px; height: 22px; stroke-width: 2.4; }
.wm-txt { display: grid; line-height: 1.05; }
.wm-txt b { font-family: var(--font-display); font-weight: 400; font-size: 21px; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.wm-txt small { font-size: 12px; font-weight: 900; color: var(--sc); margin-top: 2px; }
.wm-badges { grid-column: 1 / -1; display: flex; gap: 6px; }
.wm-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 900; }
.wm-badge svg.i { width: 15px; height: 15px; color: var(--gold); }
.wm-badge.star { color: var(--gold); }
.wm-next { grid-column: 1 / -1; justify-self: start; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 900; color: #3a2100; background: linear-gradient(180deg, #ffe066, var(--gold2)); box-shadow: 0 0 14px rgba(255, 207, 63, .7); }
.wm-next.done { color: #062611; background: linear-gradient(180deg, #8ff0ac, #44c96f); box-shadow: none; animation: none; }
.wm-me { position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 12px)); pointer-events: none; display: grid; justify-items: center; animation: wmBob 2.2s ease-in-out infinite; }
.wm-pin { display: block; padding: 3px; border-radius: 50%; background: conic-gradient(var(--teal), var(--gold), var(--pink), var(--violet), var(--teal)); box-shadow: 0 6px 14px rgba(0, 0, 0, .45); }
.wm-pin .pf-portrait { box-shadow: 0 0 0 2px #fff; }
.wm-pin-tip { width: 0; height: 0; margin-top: -2px; border-style: solid; border-width: 10px 8px 0; border-color: var(--gold) transparent transparent; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .4)); }
@keyframes wmBob { 50% { transform: translate(-50%, calc(-100% - 18px)); } }
.wm-head { position: absolute; z-index: 4; top: 12px; left: 12px; padding: 10px 16px 12px; border-radius: 18px; background: rgba(10, 14, 44, .66); border: 1.5px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none; }
.wm-head h1 { font-size: clamp(28px, 3.2vw, 40px); }
.wm-head .tiny { color: var(--gold); }
.wm-head .muted { font-size: 14px; margin-top: 2px; }
/* desktop: Läxi stands in the sea at the bottom right and points back at the islands */
.wm-laxi { position: absolute; z-index: 4; right: 10px; bottom: 84px; display: flex; flex-direction: row-reverse; align-items: flex-end; pointer-events: none; max-width: calc(100% - 16px); }
.wm-laxi-art { height: 170px; width: auto; flex: none; transform: scaleX(-1); filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .45)); }
.wm-bubble { position: relative; pointer-events: auto; margin: 0 -6px 96px 0; padding: 10px 14px 11px; max-width: 290px; border-radius: 18px; background: #fff8e8; color: #1d2150; font-weight: 800; font-size: 15px; line-height: 1.32; box-shadow: 0 4px 0 rgba(0, 0, 0, .2), 0 12px 26px rgba(0, 0, 0, .3); display: grid; gap: 8px; justify-items: start; animation: obIn .5s .2s cubic-bezier(.2, 1.4, .3, 1) backwards; }
.wm-bubble::before { content: ''; position: absolute; right: -9px; bottom: 18px; border-style: solid; border-width: 8px 0 8px 10px; border-color: transparent transparent transparent #fff8e8; }
.wm-laxi.first .wm-bubble { max-width: 330px; font-size: 16px; }
.wm-chips { position: absolute; z-index: 4; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); }
.wm-chips .j-tab { background: rgba(10, 14, 44, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 9px 12px; }
.wm-chips .j-tab[aria-selected="true"] { background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 34%, rgba(10, 14, 44, .8)), rgba(10, 14, 44, .82)); }
@media (max-width: 760px) {
  .wm-frame { height: clamp(420px, calc(100dvh - var(--top-h) - var(--nav-h) - 40px - env(safe-area-inset-bottom, 0px)), 900px); border-radius: 22px; margin: 0 -2px; }
  .wm-head { top: 10px; left: 10px; padding: 7px 12px 8px; border-radius: 14px; }
  .wm-head h1 { font-size: 26px; }
  .wm-head .muted { display: none; }
  /* phones: Läxi peeks in at the top right (the islands' labels sit lower) */
  .wm-laxi { top: 70px; bottom: auto; right: 2px; align-items: flex-start; }
  .wm-laxi-art { height: 100px; }
  .wm-bubble { max-width: 230px; font-size: 13.5px; margin: 26px -4px 0 0; padding: 8px 11px 9px; gap: 6px; }
  .wm-bubble::before { bottom: auto; top: 16px; }
  .wm-laxi.first .wm-bubble { max-width: 240px; font-size: 13.5px; }
  .wm-chips { bottom: 10px; width: calc(100% - 20px); }
  .wm-chips .j-tab { padding: 7px 4px; }
  .wm-chips .j-tab-ic { width: 32px; height: 32px; border-radius: 10px; }
  .wm-chips .j-tab-ic svg.i { width: 20px; height: 20px; }
  .wm-label { max-width: 190px; padding: 7px 11px 8px 7px; column-gap: 7px; }
  .wm-txt b { font-size: 18px; }
  .wm-ic { width: 32px; height: 32px; border-radius: 10px; }
}

/* ---------- one journey: back to the map, Läxi, the next level glows ---------- */
.j-nav { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.j-back { align-self: stretch; }
.j-story { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: end; padding: 14px 20px 0 12px; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 100%, rgba(47, 224, 208, .22), transparent 60%), linear-gradient(180deg, rgba(43, 54, 140, .92), rgba(26, 33, 92, .94)); }
.j-story-art { height: 168px; width: auto; align-self: end; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .4)); animation: obIn .5s cubic-bezier(.2, 1.4, .3, 1) backwards; }
.j-story-talk { position: relative; align-self: center; display: grid; gap: 6px; justify-items: start; margin-bottom: 14px; padding: 14px 18px 16px; border-radius: 20px; background: #fff8e8; color: #1d2150; box-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.j-story-talk::before { content: ''; position: absolute; left: -11px; bottom: 30px; border-style: solid; border-width: 10px 12px 10px 0; border-color: transparent #fff8e8 transparent transparent; }
.j-story-talk p { font-weight: 800; font-size: 16px; line-height: 1.35; }
.j-story-talk p:first-of-type { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.15; }
.j-story-talk .btn { margin-top: 4px; }
.j-story-k { font-size: 12px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; color: #12958b; }
.j-say .lx-bubble { font-size: 15px; }
/* the next level glows: a static ring plus an inner glow that only fades (compositor-only, cheap on old iPads) */
.j-level.next { box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc) 60%, transparent), 0 0 26px color-mix(in srgb, var(--lc) 45%, transparent), var(--shadow); }
.j-level.next::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--lc) 85%, white 0%), inset 0 0 36px color-mix(in srgb, var(--lc) 55%, transparent); animation: jNext 2.2s ease-in-out infinite; will-change: opacity; }
@keyframes jNext { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.j-level.next .j-num { animation: pulse 1.6s ease-in-out infinite; }
@media (max-width: 760px) {
  .j-nav { grid-template-columns: 1fr; gap: 8px; }
  .j-back { justify-self: start; }
  .j-story { grid-template-columns: 1fr; padding: 12px 12px 0; }
  .j-story-talk { order: -1; margin: 0; padding: 12px 14px 14px; }
  .j-story-talk::before { left: auto; right: 54px; bottom: -11px; border-width: 12px 10px 0 10px; border-color: #fff8e8 transparent transparent transparent; }
  .j-story-talk p { font-size: 15px; }
  .j-story-talk p:first-of-type { font-size: 19px; }
  .j-story-art { position: relative; z-index: 1; height: 104px; justify-self: end; margin: -56px 8px 0 0; }
}

/* ---------- Föräldraläge: the gate ---------- */
.pg-modal { width: min(400px, 100%); }
.pg { display: grid; gap: 10px; justify-items: center; text-align: center; }
.pg.shake { animation: shake .4s; }
.pg-head { display: flex; align-items: center; gap: 10px; }
.pg-head h2 { margin: 0; }
.pg-lock { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(47, 224, 208, .14); color: var(--teal); }
.pg-sub { font-size: 14px; }
.pg-q { font-family: var(--font-display); font-size: 36px; line-height: 1.1; }
.pg-sum { color: var(--gold); }
.pg-display { min-width: 190px; height: 58px; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 18px; border-radius: 14px; background: rgba(0, 0, 0, .32); border: 2px solid var(--line2); font-family: var(--font-display); font-size: 34px; letter-spacing: 2px; }
.pg-display .ph { color: var(--ink3); font-family: var(--font); font-size: 17px; font-weight: 800; letter-spacing: 0; }
.pg-display.pin i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink2); transition: background .12s, transform .12s; }
.pg-display.pin i.on { background: var(--teal); border-color: var(--teal); transform: scale(1.1); }
.pg-msg { min-height: 20px; font-size: 14px; color: #ffb0b2; font-weight: 800; }
.pg-keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 10px; }
.pg-key { height: 58px; border-radius: 14px; border: 1.5px solid var(--line2); background: rgba(255, 255, 255, .07); color: #fff; font-family: var(--font); font-size: 25px; font-weight: 900; transition: background .1s, transform .08s; }
.pg-key:hover { background: rgba(255, 255, 255, .12); }
.pg-key:active { transform: scale(.95); }
.pg-key.ok { background: linear-gradient(180deg, #ffe066, var(--gold2)); border-color: transparent; color: #3a2100; font-family: var(--font-display); font-weight: 400; }
.pg-key.del svg.i { width: 26px; height: 26px; }
.pg .actions { justify-content: center; margin-top: 2px; }
.pg-forgot { font-size: 14px; }

/* ---------- Föräldraläge: the parent view ---------- */
.pv-overlay { position: fixed; inset: 0; z-index: 56; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(900px 500px at 85% -10%, rgba(47, 224, 208, .08), transparent 60%), linear-gradient(180deg, #121942, #0b1030 50%); animation: fade .25s; font-weight: 600; }
.pv-shell { width: min(1040px, 100%); margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 22px 48px; display: grid; gap: 14px; }
.pv-top { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; border-bottom: 1px solid var(--line); }
.pv-top img { border-radius: 10px; }
.pv-brand { display: grid; line-height: 1.1; }
.pv-brand b { font-family: var(--font-display); font-weight: 400; font-size: 26px; }
.pv-brand span { font-size: 11.5px; color: var(--ink3); font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.pv-close { margin-left: auto; }
.pv-overlay .btn { font-family: var(--font); font-weight: 900; font-size: 15px; text-shadow: none; box-shadow: 0 2px 0 var(--b3); }
.pv-overlay .btn.small { min-height: 38px; padding: 8px 14px; border-radius: 11px; }
.pv-overlay .btn:active { transform: translateY(1px); box-shadow: none; }
.pv-btn-main { --b1: #22c7b8; --b2: #12998c; --b3: #0b5f57; }
.pv-kids { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.pv-kid { flex: none; display: inline-flex; align-items: center; gap: 9px; padding: 4px 14px 4px 4px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--ink2); font-weight: 900; font-size: 15px; white-space: nowrap; }
.pv-kid:hover { border-color: var(--line2); }
.pv-kid[aria-selected="true"] { border-color: var(--teal); background: rgba(47, 224, 208, .12); color: #fff; }
.pv-kid-s { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--ink3); }
.pv-kid-s .flame { width: 16px; height: 16px; filter: grayscale(1) brightness(.6); }
.pv-kid-s.on { color: #ffcf8a; } .pv-kid-s.on .flame { filter: none; }
.pv-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.pv-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 0; border-radius: 10px; background: none; color: var(--ink2); font-weight: 900; font-size: 15px; white-space: nowrap; }
.pv-tab:hover { color: #fff; }
.pv-tab[aria-selected="true"] { background: rgba(255, 255, 255, .09); color: #fff; box-shadow: inset 0 -2px 0 var(--teal); }
.pv-tab svg.i { width: 18px; height: 18px; color: var(--teal); }
.pv-body { display: grid; gap: 14px; }
.pv-h { font-family: var(--font); font-weight: 900; font-size: 24px; letter-spacing: 0; text-shadow: none; line-height: 1.2; }
.pv-h-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pv-h-row > div { display: grid; gap: 4px; max-width: 64ch; }
.pv-card { display: grid; gap: 10px; align-content: start; min-width: 0; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .1); }
.pv-card h3 { font-family: var(--font); font-weight: 900; font-size: 17px; text-shadow: none; }
.pv-card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 12px; flex-wrap: wrap; }
.pv-card-h > div { display: grid; gap: 2px; }
.pv-note { font-size: 13.5px; color: var(--ink2); font-weight: 600; line-height: 1.42; }
.pv-note svg.i { width: 15px; height: 15px; vertical-align: -2px; }
.pv-empty { justify-items: start; }
.pv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pv-stat { display: grid; gap: 2px; align-content: start; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .1); }
.pv-stat-l { font-size: 12.5px; font-weight: 800; color: var(--ink2); }
.pv-stat-v { font-size: 28px; font-weight: 900; line-height: 1.15; }
.pv-stat-s { font-size: 12px; color: var(--ink3); font-weight: 700; }
.pv-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pv-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 12.5px; font-weight: 900; color: var(--ink2); white-space: nowrap; }
.pv-pill svg.i { width: 14px; height: 14px; }
.pv-pill.good { background: rgba(79, 224, 124, .16); color: #8cf5ae; }
.pv-pill.focus { background: rgba(255, 207, 63, .14); color: #ffd98a; }
.pv-meter { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.pv-meter i { display: block; height: 100%; border-radius: inherit; background: #1aa89a; }
.pv-mission p b { color: #fff; }
/* week chart */
.pv-chart-card { gap: 6px; }
.pv-chart { position: relative; min-width: 0; width: 100%; min-height: 200px; }
.pv-svg { display: block; width: 100%; height: auto; overflow: visible; }
.pv-svg .g { stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.pv-svg .g.base { stroke: rgba(255, 255, 255, .3); }
.pv-svg text { font-family: var(--font); }
.pv-svg .ax { fill: var(--ink3); font-size: 11px; font-weight: 700; }
.pv-svg .day { fill: var(--ink2); font-size: 12.5px; font-weight: 800; }
.pv-svg .day.now { fill: #fff; font-weight: 900; }
.pv-svg .val { fill: #fff; font-size: 12px; font-weight: 900; }
.pv-svg .goal { stroke: rgba(255, 207, 63, .7); stroke-width: 1.5; stroke-dasharray: 5 5; }
.pv-svg .goal-t { fill: #ffd98a; font-size: 11.5px; font-weight: 800; }
.pv-svg .ok circle { fill: #2fa35a; }
.pv-svg .ok path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv-svg .hit { cursor: pointer; }
.pv-svg .bar { transition: opacity .15s; }
.pv-chart:hover .pv-svg .bar { opacity: .8; }
.pv-tip { position: absolute; z-index: 2; pointer-events: none; display: grid; gap: 2px; padding: 8px 11px; border-radius: 10px; background: #f4f6ff; color: #141a44; font-size: 12.5px; font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); white-space: nowrap; }
.pv-tip b { font-weight: 900; }
.pv-tip b::first-letter { text-transform: uppercase; }
.pv-tip .okt { color: #1d7a3c; font-weight: 900; }
.pv-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink2); font-weight: 800; }
.pv-ok-dot { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: #2fa35a; color: #fff; }
.pv-ok-dot svg.i { width: 11px; height: 11px; stroke-width: 3.4; }
/* readiness ("Redo inför provet") */
.pv-ready { display: grid; gap: 7px; }
.pv-ready-top { display: flex; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; }
.pv-ready-pct { font-size: 30px; font-weight: 900; line-height: 1; }
.pv-ready-ph { font-weight: 900; font-size: 15px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--ink2); }
.pv-ready.lvl1 .pv-ready-ph { background: rgba(255, 154, 60, .14); color: #ffc48a; }
.pv-ready.lvl2 .pv-ready-ph { background: rgba(255, 207, 63, .14); color: #ffd98a; }
.pv-ready.lvl3 .pv-ready-ph { background: rgba(79, 224, 124, .14); color: #a6f2bd; }
.pv-ready.lvl4 .pv-ready-ph { background: rgba(79, 224, 124, .22); color: #8cf5ae; }
.pv-ready-of { font-size: 13px; color: var(--ink3); font-weight: 800; }
.pv-stack { display: flex; gap: 2px; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.pv-stack i { display: block; min-width: 4px; }
.pv-stack .k, .pv-stack-l .k { background: #3fbf6f; }
.pv-stack .l, .pv-stack-l .l { background: #e0a23c; }
.pv-stack .n, .pv-stack-l .n { background: rgba(255, 255, 255, .16); }
.pv-stack-l { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink2); font-weight: 700; }
.pv-stack-l i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
/* lists */
.pv-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 14px; align-items: start; }
.pv-list { border-top: 3px solid var(--sc); }
.pv-list.focus { box-shadow: inset 0 0 0 1px rgba(255, 207, 63, .3); }
.pv-list-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.pv-list-t { display: grid; gap: 4px; min-width: 0; }
.pv-list-t h3 { font-size: 19px; overflow-wrap: anywhere; }
.pv-list-badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pv-date-wrap { position: relative; display: flex; align-items: center; gap: 4px; }
.pv-date { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 12px; border: 1.5px dashed rgba(255, 255, 255, .3); background: none; color: var(--ink2); font-weight: 900; font-size: 14px; white-space: nowrap; }
.pv-date:hover { border-color: var(--teal); color: #fff; }
.pv-date svg.i { width: 17px; height: 17px; }
.pv-date.set { border-style: solid; border-color: rgba(255, 207, 63, .55); background: rgba(255, 207, 63, .1); color: #ffe3a8; }
.pv-date small { font-weight: 800; color: var(--ink3); }
.pv-date.set small { color: #ffd98a; }
.pv-date-in { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.pv-date-in.show { position: static; width: auto; height: auto; opacity: 1; pointer-events: auto; padding: 7px; border-radius: 10px; border: 1.5px solid var(--line2); background: rgba(0, 0, 0, .3); color: var(--ink); color-scheme: dark; }
.pv-x { width: 32px; height: 32px; flex: none; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--ink3); display: grid; place-items: center; }
.pv-x:hover { color: #fff; border-color: var(--line2); }
.pv-x svg.i { width: 15px; height: 15px; }
.pv-sub-h { font-size: 11.5px; font-weight: 900; letter-spacing: .9px; text-transform: uppercase; color: var(--ink3); margin-top: 4px; }
.pv-hard { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pv-hard li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(0, 0, 0, .2); font-size: 14px; }
.pv-hard li b { font-weight: 900; overflow-wrap: anywhere; }
.pv-hard li span { color: var(--ink2); overflow-wrap: anywhere; }
.pv-hard em { font-style: normal; font-size: 12px; font-weight: 900; color: #ffb0b2; white-space: nowrap; }
.pv-list-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.pv-overlay .btn.pv-danger { color: #ffb0b2; }
/* settings */
.pv-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pv-choice { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-choice button { padding: 8px 13px; border-radius: 10px; border: 1.5px solid var(--line2); background: rgba(255, 255, 255, .04); color: var(--ink2); font-weight: 900; font-size: 14px; }
.pv-choice button:hover { color: #fff; }
.pv-choice button[aria-checked="true"] { border-color: var(--teal); background: rgba(47, 224, 208, .14); color: #fff; }
.pv-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pv-input { flex: 1; min-width: 150px; padding: 9px 12px; border-radius: 10px; border: 1.5px solid var(--line2); background: rgba(0, 0, 0, .3); font-weight: 800; font-size: 16px; }
.pv-input:focus { outline: none; border-color: var(--teal); }
.pv-danger-card { border-color: rgba(255, 90, 95, .28); }
.pv-danger-card .btn { justify-self: start; }
/* about */
.pv-lead { font-size: 16px; color: var(--ink2); font-weight: 600; line-height: 1.5; max-width: 70ch; }
.pv-abouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pv-about { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 14px; }
.pv-about-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(47, 224, 208, .12); color: var(--teal); }
.pv-about-ic svg.i { width: 24px; height: 24px; }
.pv-about p { font-size: 14.5px; color: var(--ink2); line-height: 1.45; margin-top: 4px; }
.pv-foot { margin-top: 4px; }
@media (max-width: 760px) {
  .pv-shell { padding: max(10px, env(safe-area-inset-top)) 12px 32px; gap: 12px; }
  .pv-brand b { font-size: 22px; }
  .pv-close span { display: none; }
  .pv-close { width: 44px; padding: 0; }
  .pv-tab { flex-direction: column; gap: 3px; padding: 8px 4px; font-size: 12.5px; }
  .pv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pv-stat { padding: 10px 12px; }
  .pv-stat-v { font-size: 23px; }
  .pv-two, .pv-set, .pv-abouts { grid-template-columns: minmax(0, 1fr); }
  .pv-card { padding: 14px; }
  .pv-h { font-size: 21px; }
  .pv-hard li { grid-template-columns: minmax(0, 1fr) auto; }
  .pv-hard li span { grid-column: 1; grid-row: 2; font-size: 13px; }
  .pv-hard li em { grid-row: 1 / span 2; grid-column: 2; }
}

/* the game picker: two columns on phones (the mission opens it) */
@media (max-width: 480px) { .gpick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .gpick-card { min-height: 86px; } .gpick-card b { font-size: 17px; } }

/* continuously animated story bits get their own layer, so a bob or a glow never repaints the page
   (measured: the world map went from ~5 to ~60 fps in software rendering) */
.wm-glow, .wm-me, .ms-laxi, .cr-laxi-art, .mc-flame-svg, .j-level.next .j-num { will-change: transform, opacity; }
.wm-laxi, .wm-head { will-change: transform; } /* drawn once above the glowing islands */
.test-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px 2px 6px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .3px; color: #ffe3a8; background: rgba(255, 207, 63, .14); border: 1px solid rgba(255, 207, 63, .4); vertical-align: 1px; }
.test-chip svg.i { width: 13px; height: 13px; }
/* a running game covers everything: the page underneath is not painted (its animations would still cost frames) */
body.in-game > main, body.in-game > .topbar, body.in-game > .bottomnav,
body.in-parent > main, body.in-parent > .topbar, body.in-parent > .bottomnav { visibility: hidden; }

/* ---------- calm pass ("less is more", UI agent): hub, game picker, map, journey, result, shop, intros ---------- */
/* hub: the mission card is Läxi, "Dagens uppdrag", the list name, one ring and Spela */
.mission .ms-title { color: #fff; font-size: 28px; }
.mission .ms-k { min-height: 22px; }
.ms-test { padding: 2px 10px 3px 7px; border-radius: 999px; background: rgba(255, 217, 138, .14); border: 1px solid rgba(255, 217, 138, .38); font-size: 13px; letter-spacing: .2px; text-transform: none; }
.ms-test svg.i { width: 13px; height: 13px; }
.ms-freeze { font-weight: 800; }
@media (max-width: 760px) { .mission .ms-title { font-size: 23px; } }
/* game cards: picture and name; a small lock where a game needs the recorded voice */
.mode.off .mode-lock { padding: 7px; border-radius: 50%; }
.mode.off .mode-lock svg.i { width: 16px; height: 16px; }
/* direction toggle shows the list's first word ("apple → äpple") */
.dir-seg button { max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; }

/* game picker: list name as title, words behind "Visa orden" */
.gpick-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.gpick-head h2 { min-width: 0; overflow-wrap: anywhere; }
.gpick-show { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px 6px 9px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--ink2); font-weight: 900; font-size: 14px; cursor: pointer; }
.gpick-show svg.i { width: 17px; height: 17px; }
.gpick-show:hover, .gpick-show[aria-expanded="true"] { color: #fff; border-color: var(--line2); }
.gpick-words[hidden] { display: none; }
.gpick-words .ms-weak { padding: 6px 4px; }

/* world map: island badges are name + stars; "Nästa" only on the island you are on */
.wm-label { grid-template-columns: auto auto; }
.wm-label .wm-ic { grid-row: span 2; }
.wm-label > .wm-badge.star { justify-self: start; padding: 1px 8px 2px; font-size: 13px; }
.wm-next.done svg.i { width: 16px; height: 16px; }

/* journey: Läxi's intro is two short lines on the first visit; no blurb, no stats */
.journey .section-head { margin-bottom: 8px; }
.j-level.locked .j-meta svg.i { width: 18px; height: 18px; opacity: .8; }

/* game intro: picture, title, one line, start */
.gk-intro-line { margin: -2px 0 2px; font-size: 19px; font-weight: 800; line-height: 1.3; color: var(--ink2); text-align: center; text-wrap: balance; }
.gk-intro-calm .gk-intro-art { aspect-ratio: 16 / 9; }
@media (max-width: 480px) { .gk-intro-line { font-size: 17px; } }

/* result: stars, praise, gold, "Spela igen" + "Klar"; the rest under "Visa detaljer" */
.result .res-score { margin-top: 4px; font-weight: 800; }
.res-gold { display: inline-flex; align-items: center; gap: 8px; margin: 14px auto 2px; padding: 7px 20px 7px 10px; border-radius: 999px; background: rgba(255, 207, 63, .12); border: 2px solid rgba(255, 207, 63, .45); font-family: var(--font-display); font-size: 34px; line-height: 1; color: var(--gold); }
.res-gold b { font-weight: 400; }
.res-more { margin: 14px auto 0; max-width: 520px; }
.res-more > summary { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; cursor: pointer; list-style: none; color: var(--ink3); font-weight: 800; font-size: 14px; }
.res-more > summary::-webkit-details-marker { display: none; }
.res-more > summary::after { content: '▾'; font-size: 12px; transition: transform .2s; }
.res-more[open] > summary::after { transform: rotate(180deg); }
.res-more > summary:hover { color: var(--ink2); }
.res-more-body { display: grid; gap: 12px; margin-top: 8px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .2); text-align: left; }
.res-xp { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; font-weight: 800; font-size: 14px; color: var(--ink2); }
.res-xp b { color: #fff; }
.res-xp .xpbar { margin-top: 0; height: 12px; }
.res-more .legend { justify-content: center; }
.res-more .missed { margin-top: 0; }
.res-more-body > .btn { justify-self: center; }
.res-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.res-btns .btn { min-width: 140px; justify-content: center; }

/* shop: chest name + (i); the odds open in a small dialog */
.chest-name { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.chest-name h3 { margin: 0; }
.chest-info.stage-btn { width: 38px; height: 38px; flex: none; }
.chest-info svg.i { width: 20px; height: 20px; }
.odds-modal { display: grid; gap: 10px; }
.odds-modal .odds { font-size: 16px; margin: 4px 0; }
.odds-modal .muted { font-size: 14px; }
.j-level.locked .j-head { cursor: not-allowed; }

/* ---------- föräldrarapport: "Följ på din telefon", Svåra just nu, the report on a parent's phone ---------- */
.pv-week-h { align-items: center; }
/* the chart's goal label gets a halo in the card colour, readable where it has to sit on a bar */
.pv-svg .goal-t, .pv-svg .val { paint-order: stroke; stroke: #181e47; stroke-width: 4px; stroke-linejoin: round; }
.pv-follow { flex: none; }
.pv-follow svg.i { width: 18px; height: 18px; }
/* Svåra just nu: the hardest items across every list and journey */
.pv-hn { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 6px; }
.pv-hn li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 1px; align-items: center; padding: 8px 10px 8px 12px; border-radius: 11px; background: rgba(0, 0, 0, .2); }
.pv-hn-t { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.pv-hn-t b { font-weight: 900; color: #fff; }
.pv-hn-t span { color: var(--ink2); font-weight: 700; }
.pv-hn small { grid-column: 1; font-size: 12px; font-weight: 700; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-hn em { grid-column: 2; grid-row: 1 / span 2; font-style: normal; font-size: 12.5px; font-weight: 900; color: #ffb0b2; white-space: nowrap; padding: 2px 9px; border-radius: 999px; background: rgba(255, 90, 95, .12); }
/* Om Läxjakten: "Skriv till oss" */
.pv-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pv-overlay .btn.pv-write svg.i { width: 17px; height: 17px; }
/* the QR code modal (on the child's device) */
.rp-share-modal { width: min(440px, 100%); }
.rp-share { position: relative; display: grid; gap: 12px; justify-items: center; text-align: center; }
.rp-share h2 { margin: 2px 40px 0; font-size: 27px; }
.rp-share-x { position: absolute; top: -8px; right: -8px; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .22); color: var(--ink2); display: grid; place-items: center; }
.rp-share-x:hover { color: #fff; border-color: var(--line2); }
.rp-qr { width: min(340px, 100%); aspect-ratio: 1; display: grid; place-items: center; border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 0 0 4px rgba(255, 255, 255, .12), 0 10px 26px rgba(0, 0, 0, .35); }
.rp-qr-svg { display: block; width: 100%; height: 100%; }
.rp-qr-wait { color: #4a5280; font-weight: 800; font-size: 15px; }
.rp-share-note { max-width: 36ch; font-size: 14.5px; font-weight: 700; line-height: 1.42; color: var(--ink2); text-wrap: pretty; }
.rp-share-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rp-share-btns:empty { display: none; }
.rp-share .btn { font-family: var(--font); font-weight: 900; font-size: 15px; text-shadow: none; }
.rp-share .btn svg.i { width: 18px; height: 18px; }
/* the report on a parent's phone (mobile first; the kids' screens rest underneath) */
body.in-report > main, body.in-report > .topbar, body.in-report > .bottomnav { visibility: hidden; }
.rp-shell { width: min(780px, 100%); }
.rp-top .pv-brand .rp-upd { font-size: 13.5px; font-weight: 700; color: var(--ink2); letter-spacing: 0; text-transform: none; }
.rp-msg { display: block; padding: 10px 14px; border-radius: 12px; background: rgba(120, 200, 255, .1); border: 1px solid rgba(140, 210, 255, .3); color: #d6eeff; font-size: 14px; font-weight: 700; line-height: 1.4; }
.rp-msg svg.i { width: 16px; height: 16px; vertical-align: -3px; color: #9fdcff; }
.rp-devs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.rp-dev { flex: none; display: grid; gap: 1px; text-align: left; padding: 7px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--ink2); }
.rp-dev b { font-weight: 900; font-size: 14px; } .rp-dev small { font-size: 12px; font-weight: 700; color: var(--ink3); }
.rp-dev[aria-selected="true"] { border-color: var(--teal); background: rgba(47, 224, 208, .1); color: #fff; }
.rp-kid { padding-left: 5px; }
.rp-initial { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(47, 224, 208, .16); color: var(--teal); font-weight: 900; font-size: 15px; }
.rp-kid[aria-selected="true"] .rp-initial { background: var(--teal); color: #0b1030; }
.rp-sec { font-family: var(--font); font-weight: 900; font-size: 19px; text-shadow: none; margin-top: 6px; }
.rp-lists { grid-template-columns: minmax(0, 1fr); }
.rp-list .pv-date { cursor: default; }
.rp-list .pv-date:hover { color: inherit; border-color: rgba(255, 255, 255, .3); }
.rp-list .pv-date.set:hover { border-color: rgba(255, 207, 63, .55); color: #ffe3a8; }
.rp-foot { display: grid; gap: 12px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.rp-foot-btns { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.rp-leave { color: var(--ink2); font-size: 14.5px; }
@media (max-width: 760px) {
  .rp-share h2 { font-size: 23px; }
  .pv-week-h .pv-h { flex: 1 1 auto; }
  .rp-top { padding-bottom: 10px; }
}
