/* Äventyrslandet only (spel-aventyrslandet.html).
   Split out of css/style.css so pages do not download rules they cannot use; tests/css-scope.test.js checks the scope. */

/* ---- Äventyrslandet: the platform game (spel-aventyrslandet.html, internal id "platform") ---- */
.pf-stage .adv-btns { grid-template-areas: ". water" "roll jump"; grid-template-columns: auto auto; }
.pf-stage .adv-btn.glow { box-shadow: 0 0 0 5px rgba(143, 216, 255, .8), 0 5px 0 rgba(0,0,0,.25); }
.pf-stage canvas { touch-action: none; }
.pf-stage .adv-stick-zone { width: 50%; }
.pf-stage .adv-hud { max-width: 46%; }
.pf-gone { opacity: .25; filter: grayscale(1); }
.pf-q { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 6; background: rgba(255,255,255,.96); border-radius: 18px; padding: 4px 18px 8px; text-align: center; box-shadow: 0 5px 0 rgba(0,0,0,.18); color: var(--ink); max-width: min(560px, calc(100% - 24px)); }
.pf-q[hidden] { display: none; }
.pf-qt { display: block; font-size: 2.1rem; line-height: 1.1; font-weight: 900; letter-spacing: .02em; }
.pf-kraft { display: inline-flex; gap: 5px; margin: 2px 0; }
.pf-kraft i { width: 14px; height: 14px; border-radius: 50%; background: #e2dcf2; }
.pf-kraft i.on { background: #ff9fbc; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ffc93c; }
.pf-count, .pf-how { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.pf-count { color: #5b3fc4; }
.pf-opts { display: flex; gap: 8px; justify-content: center; margin-top: 6px; flex-wrap: wrap; }
.pf-opt { min-width: 64px; min-height: 44px; border-radius: 14px; border: 2px solid #9a7cf2; background: #fff; font: inherit; font-weight: 900; font-size: 1.2rem; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; }
.pf-opt kbd { font-size: .7rem; background: #2b2d52; color: #fff; border-radius: 6px; padding: 1px 5px; }
.pf-opt[hidden] { display: none; }
.pf-stage .adv-sign { top: auto; bottom: 14px; }
.pf-map, .pf-shop { z-index: 8; place-items: center; }
.pf-map-card { width: min(720px, calc(100% - 24px)); max-width: none; max-height: calc(100% - 24px); overflow-y: auto; box-sizing: border-box; text-align: center; }
.pf-world { position: relative; height: 240px; margin: 8px 0 12px; border-radius: 22px; background: radial-gradient(circle at 20% 80%, #c8f0b8, transparent 45%), radial-gradient(circle at 62% 75%, #d9ccff, transparent 40%), radial-gradient(circle at 45% 30%, #ffffff, transparent 40%), linear-gradient(#cdeeff, #e9f9df); }
.pf-path { position: absolute; inset: 0; width: 100%; height: 100%; }
.pf-path path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.pf-node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 96px; min-height: 44px; padding: 6px 8px; border-radius: 16px; border: 3px solid #fff; background: #fff7e0; font: inherit; color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.15); }
.pf-node b { font-size: .9rem; }
.pf-node small { font-size: .7rem; font-weight: 700; color: var(--ink-soft); }
.pf-node-i { width: 28px; height: 28px; border-radius: 50%; background: #ff9fbc; color: #fff; font-weight: 900; display: grid; place-items: center; }
.pf-node.boss .pf-node-i { background: #9a7cf2; }
.pf-node[disabled] { cursor: default; background: #f1eef8; opacity: .8; }
.pf-node[disabled] .pf-node-i { background: #c9c2dc; }
/* Äventyrslandet: world tabs, resume card, bonus nodes, world maps, slow time and flipped gravity. */
.pf-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 8px; }
.pf-tab { min-height: 44px; padding: 6px 12px; border-radius: 14px; border: 3px solid #fff; background: #fff7e0; font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.pf-tab small { font-weight: 700; color: var(--ink-soft); }
.pf-tab.on { background: #ffe08a; }
.pf-tab[disabled] { cursor: default; background: #f1eef8; opacity: .75; }
.pf-resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin: 4px 0 8px; padding: 8px 10px; border-radius: 16px; background: #e5fbef; border: 2px dashed #7fd3a4; }
.pf-node.bonus .pf-node-i { background: #ffc93c; }
.pf-node.bonus { background: #fff4fb; }
.pf-secret, .pf-gem { font-size: .7rem; }
.pf-path path.pf-secret-path { stroke: #ffd166; stroke-dasharray: 1 3; }
.pf-world.pf-w-korallkusten { background: radial-gradient(circle at 20% 80%, #ffe6a6, transparent 45%), radial-gradient(circle at 62% 75%, #ffc2d4, transparent 40%), radial-gradient(circle at 50% 18%, #5d7cb8, transparent 30%), linear-gradient(#bdeaff, #86d4ee); }
.pf-world.pf-w-klockberget { background: radial-gradient(circle at 20% 80%, #ffffff, transparent 45%), radial-gradient(circle at 62% 75%, #f0dcc0, transparent 40%), radial-gradient(circle at 44% 14%, #2e3a78, transparent 30%), linear-gradient(#dcecff, #c6d6ef); }
.pf-stage.pf-slow canvas { filter: sepia(.35) saturate(1.2) hue-rotate(-12deg); }
.pf-slowt { background: #ffe08a; }
@media (prefers-reduced-motion: reduce) {
  .pf-stage.pf-slow canvas { filter: none; }
}
.pf-seeds { font-size: .85rem; letter-spacing: 2px; }
.pf-map-row { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pf-badge-chip { font-weight: 700; }
.pf-shop-card { width: min(520px, calc(100% - 24px)); max-width: none; max-height: calc(100% - 24px); overflow-y: auto; box-sizing: border-box; }
.pf-shop-card h2, .pf-shop-card > p { text-align: center; }
.pf-badge { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; }
.pf-badge small { font-size: .8rem; color: var(--ink-soft); }
.pf-badge .pf-need { color: #5b3fc4; font-weight: 700; }
.pf-badge.on { background: #f3fff9; border-radius: 12px; }
.pf-badge-i { font-size: 1.8rem; width: 44px; text-align: center; }
.pf-unlock { font-weight: 800; margin: 6px 0; }
.pf-turn { position: absolute; left: 50%; bottom: 130px; transform: translateX(-50%); z-index: 2; background: rgba(255,255,255,.9); border-radius: 12px; padding: 4px 12px; font-weight: 800; font-size: .85rem; pointer-events: none; }
.pf-turn[hidden], body:not(.game-play) .pf-turn { display: none !important; }
.pf-portrait .pf-q { top: 112px; }
@media (max-width: 760px), (max-height: 500px) {
  .pf-qt { font-size: 1.6rem; }
  .pf-q { padding: 2px 12px 6px; top: 6px; }
  .pf-opt { min-width: 52px; font-size: 1.05rem; }
  .pf-world { height: 200px; }
  .pf-node { min-width: 80px; padding: 4px 6px; }
}
