:root {
  --ocean: #0e8fa3; --deep: #0b4f6c; --sand: #fff6e4; --coral: #ff6b4a; --sun: #ffc93c;
  --gum: #5a9367; --ink: #1d2b36; --mute: #5d6b76; --card: #ffffff; --line: #eadfc8; --r: 22px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--sand); color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Avenir Next", system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
body { touch-action: manipulation; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
h1, h2, h3, p { margin: 0; }
#app { min-height: 100%; }
svg.av { display: block; width: 100%; height: auto; }

.btn { min-height: 56px; padding: 0 26px; border-radius: 999px; font-weight: 800; font-size: 19px;
  background: var(--coral); color: #fff; box-shadow: 0 5px 0 #d24a2c; transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #d24a2c; }
.btn:disabled { opacity: .35; }
.btn.ghost { background: #fff; color: var(--deep); box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); }
.btn.tiny { min-height: 44px; font-size: 16px; padding: 0 18px; background: #fff; color: var(--deep); box-shadow: none; border: 2px solid var(--line); }
.btn.danger { color: #b3261e; }
.card { background: var(--card); border-radius: var(--r); padding: 20px; box-shadow: 0 2px 0 var(--line); border: 2px solid var(--line); }
.card h2 { font-size: 20px; margin-bottom: 12px; color: var(--deep); }
.stars { color: #f5a800; letter-spacing: 2px; font-size: 18px; white-space: nowrap; }
.stars i { color: #e4dccb; font-style: normal; }

/* ---------- Hjem ---------- */
.home { max-width: 1100px; margin: 0 auto; padding: 0 16px 32px; }
.hero { position: relative; overflow: hidden; margin: 16px 0; border-radius: 28px; min-height: 190px; padding: 28px;
  display: flex; align-items: center; background: linear-gradient(180deg, #58bdf0 0%, #9fe0f5 55%, #1aa3b8 55%, #0e8fa3 100%); }
.hero .sun { position: absolute; right: 190px; top: 22px; width: 84px; height: 84px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 14px rgba(255, 201, 60, .3); }
.brand { position: relative; z-index: 1; }
.kicker { font-weight: 800; color: var(--deep); font-size: 17px; }
.brand h1 { font-size: clamp(38px, 7vw, 68px); line-height: 1; color: #fff; text-shadow: 0 4px 0 rgba(11, 79, 108, .35); letter-spacing: -1px; }
.brand h1 span { color: var(--coral); text-shadow: 0 4px 0 #fff; }
.hero-av { position: absolute; right: 24px; bottom: -14px; width: 170px; }

.levels h2 { font-size: 18px; margin: 4px 4px 10px; color: var(--deep); }
.lvrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.lv { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: var(--r); background: #fff; border: 3px solid var(--line); min-height: 76px; }
.lv .e { font-size: 34px; }
.lv b { display: block; font-size: 19px; }
.lv small { display: block; color: var(--mute); font-size: 13px; line-height: 1.25; }
.lv.on { border-color: var(--ocean); background: #e3f6f9; box-shadow: 0 4px 0 var(--ocean); }

.cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.aus { width: 100%; height: auto; display: block; }
.aus .land { fill: #f3c98b; stroke: #d9a45c; stroke-width: 2.5; stroke-linejoin: round; }
.aus .uluru path { fill: #c9603c; }
.aus .pin circle { fill: #b9b0a0; stroke: #fff; stroke-width: 2; }
.aus .pin text { font-size: 13px; font-weight: 800; fill: #8b8172; font-family: inherit; }
.aus .pin.on circle { fill: var(--coral); }
.aus .pin.on text { fill: var(--ink); font-size: 16px; }
.aus .pin .pulse { fill: var(--coral); stroke: none; opacity: .35; transform-box: fill-box; transform-origin: center; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(2.8); opacity: 0; } }
.soon { margin-top: 8px; color: var(--mute); font-size: 15px; font-weight: 700; text-align: center; }

.eps { display: grid; gap: 10px; }
.ep { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; text-align: left; padding: 12px 14px;
  border-radius: 18px; background: var(--sand); border: 2px solid var(--line); min-height: 76px; }
.ep .num { width: 56px; height: 56px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 28px; border: 2px solid var(--line); }
.ep b { display: block; font-size: 18px; }
.ep small { display: block; color: var(--mute); font-size: 14px; line-height: 1.3; }
.ep .res { text-align: right; }
.ep .res em { display: block; font-style: normal; font-size: 18px; }
.ep .go { background: var(--coral); color: #fff; font-weight: 800; padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.ep.done { background: #eef7ee; border-color: #cfe5cf; }
.ep.locked { opacity: .5; }
.foot { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ---------- Avspilling ---------- */
.play { height: 100vh; height: 100dvh; display: grid; grid-template-rows: minmax(190px, 40vh) minmax(0, 1fr); }
.stage { position: relative; overflow: hidden; }
.bg, .bg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.top { position: absolute; z-index: 3; left: 12px; right: 12px; top: 12px; display: flex; align-items: center; gap: 12px; }
.exit { min-width: 48px; height: 48px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .92); font-weight: 800; font-size: 18px; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.exit.armed { background: var(--coral); color: #fff; }
.prog { flex: 1; height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .75); overflow: hidden; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.prog i { display: block; height: 100%; width: 0; background: var(--sun); border-radius: 99px; transition: width .4s; }
.chip { background: rgba(255, 255, 255, .92); border-radius: 99px; padding: 8px 14px; font-weight: 800; font-size: 15px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.actor { position: absolute; bottom: -8px; width: min(30vh, 230px); transition: transform .25s, opacity .25s, filter .25s; transform-origin: 50% 100%; transform: scale(.86); filter: saturate(.75) brightness(.95); }
.actor.npc { left: 7%; }
.actor.me { right: 7%; }
.actor.off { opacity: 0; transform: translateY(30%) scale(.86); }
.actor.talk { transform: scale(1); filter: none; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: scale(1) translateY(-6px); } }

.panel { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 18px 26px; background: var(--sand); border-top: 4px solid var(--line); }
.panel > * { max-width: 780px; margin-left: auto; margin-right: auto; }
.row { display: flex; margin-bottom: 14px; }
.row.right { justify-content: flex-end; }
.bubble { position: relative; background: #fff; border: 3px solid var(--c); border-radius: 22px; padding: 14px 18px 12px; max-width: 100%; min-width: 200px; box-shadow: 0 4px 0 rgba(0, 0, 0, .06); }
.bubble .who { font-size: 14px; font-weight: 800; color: var(--c); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.bubble .txt { font-size: clamp(22px, 2.9vw, 28px); font-weight: 700; line-height: 1.3; }
.bubble .txt.veil { color: transparent; text-shadow: 0 0 14px rgba(29, 43, 54, .55); }
.bubble .hint { margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: #fff5e0; font-size: 18px; color: #5b4a22; }
.bubble .tools { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.bubble.small .txt { font-size: 19px; }
.bubble.small { padding: 10px 14px 8px; }
.bubble.mine { background: #fff1ec; }
.bubble.narr { border-style: dashed; background: #f1f8fb; }
.bubble.narr .txt { font-style: italic; }
.bubble.nor { background: #fbfaf6; }
.bubble.nor .txt, .bubble.think .txt { font-size: 21px; font-weight: 600; }
.bubble.think { border-style: dotted; }
.tool { min-width: 48px; min-height: 44px; padding: 0 12px; border-radius: 14px; background: #f2ede1; font-size: 18px; font-weight: 700; }
.tool:active { background: #e6dfcf; }
.tool:disabled { opacity: .4; }
.actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 6px; }
.actions.left { justify-content: flex-start; }
.actions.center { justify-content: center; flex-wrap: wrap; }
.asklabel { font-weight: 800; color: var(--deep); margin-top: 4px; margin-bottom: 10px; font-size: 17px; }
[hidden] { display: none !important; }

.opts { display: grid; gap: 10px; margin-bottom: 12px; }
.opts.grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.opt { display: flex; align-items: stretch; background: #fff; border: 3px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 4px 0 var(--line); }
.opt .spk { width: 58px; font-size: 22px; background: #f7f1e3; border-right: 2px solid var(--line); }
.opt .pick { flex: 1; text-align: left; padding: 14px 18px; min-height: 60px; font-size: clamp(20px, 2.5vw, 24px); font-weight: 700; line-height: 1.3; color: var(--ink); }
.opt .pick small { display: block; font-size: 16px; font-weight: 600; color: var(--mute); margin-top: 4px; }
.opts.grid .pick { text-align: center; }
.opt.good { border-color: var(--gum); background: #e7f5e9; box-shadow: 0 4px 0 var(--gum); }
.opt.wrong { border-color: #d9534f; background: #fdeceb; animation: shake .4s; }
.opt.dead { opacity: .38; box-shadow: none; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.shake { animation: shake .4s; }

.micbox { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #fff; border: 3px dashed var(--coral); border-radius: 22px; padding: 14px 18px; margin-bottom: 12px; }
.micbox.ok { border: 3px solid var(--gum); background: #e7f5e9; }
.mic { --p: 0; --v: 0; position: relative; width: 72px; height: 72px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--coral) calc(var(--p) * 360deg), #f0e6d2 0); }
.mic::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: var(--coral); opacity: calc(var(--v) * .5); transform: scale(calc(1 + var(--v) * .25)); }
.mic span { position: relative; width: 56px; height: 56px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 28px; }
.mic.nomic { background: #f0e6d2; }
.mic.done { background: var(--gum); }
.mic.done span { color: var(--gum); font-weight: 900; }
.mictxt { font-size: 19px; flex: 1; min-width: 180px; }
.btn.said { background: var(--gum); box-shadow: 0 5px 0 #437a50; }
.btn.tiny.said { background: #fff; box-shadow: none; }

.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.item { aspect-ratio: 1.25; border-radius: 18px; background: #fff; border: 3px solid var(--line); box-shadow: 0 4px 0 var(--line); font-size: clamp(40px, 7vw, 64px); display: grid; place-items: center; }
.item.got { border-color: var(--gum); background: #e7f5e9; box-shadow: none; opacity: .55; }
.toast { margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: #fdeceb; font-size: 20px; font-weight: 700; text-align: center; }

.postcard { position: relative; background: #fffdf6; border: 3px solid #d9c9a3; border-radius: 16px; padding: 18px 96px 14px 20px; margin-bottom: 14px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .06); background-image: repeating-linear-gradient(#fffdf6, #fffdf6 35px, #efe6cf 36px); }
.postcard p { font-size: 21px; line-height: 36px; font-weight: 600; }
.pc-stamp { position: absolute; right: 16px; top: 16px; width: 62px; height: 74px; border: 3px dashed #c9503c; border-radius: 6px; display: grid; place-items: center; font-size: 34px; background: #fff; }
.slot { display: inline-block; border-bottom: 3px dashed var(--coral); color: var(--coral); padding: 0 6px; }
.slot.set { border-bottom-style: solid; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-opt { padding: 12px 20px; min-height: 56px; border-radius: 999px; background: #fff; border: 3px solid var(--ocean); font-size: 21px; font-weight: 800; color: var(--deep); box-shadow: 0 4px 0 var(--ocean); }
.chip-opt small { display: block; font-size: 14px; font-weight: 600; color: var(--mute); }

/* ---------- Ferdig-skjerm ---------- */
.done-screen { position: relative; min-height: 100vh; padding: 24px 16px 40px; background: linear-gradient(180deg, #58bdf0, #d4f1fb 60%, var(--sand)); overflow: hidden; }
.card.big { max-width: 860px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.stampbig { width: 110px; height: 110px; margin: 0 auto 8px; border-radius: 50%; border: 5px double var(--coral); display: grid; place-items: center; font-size: 54px; transform: rotate(-10deg); animation: stampin .5s cubic-bezier(.2, 1.6, .4, 1); background: #fff; }
@keyframes stampin { from { transform: scale(2.6) rotate(10deg); opacity: 0; } }
.done-screen h1 { font-size: 38px; color: var(--deep); }
.done-screen .sub { color: var(--mute); font-weight: 700; margin-top: 2px; }
.bigstars .stars { font-size: 46px; }
.lvup { margin: 10px auto 0; background: #e3f6f9; border: 2px solid var(--ocean); border-radius: 16px; padding: 10px 16px; font-size: 17px; display: inline-block; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; margin: 18px 0; }
.box { background: var(--sand); border-radius: 18px; padding: 14px 16px; border: 2px solid var(--line); }
.box + .box { margin-top: 14px; }
.box h3 { font-size: 17px; color: var(--deep); margin-bottom: 6px; }
.box p { font-size: 16px; line-height: 1.4; }
.box.animal { display: flex; gap: 14px; align-items: center; }
.ae { font-size: 46px; }
.phr { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.phr li { display: flex; gap: 10px; align-items: center; }
.phr b { display: block; font-size: 18px; }
.phr small { display: block; color: var(--mute); font-size: 15px; }
.phr.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.confetti i { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: fall 2.6s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* ---------- Passet og voksen-siden ---------- */
.page { max-width: 900px; margin: 0 auto; padding: 16px 16px 40px; display: grid; gap: 16px; }
.pagehead { display: flex; align-items: center; gap: 16px; }
.pagehead h1 { font-size: 30px; color: var(--deep); }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stamp { text-align: center; }
.stamp span { width: 76px; height: 76px; margin: 0 auto 6px; border-radius: 50%; border: 4px dashed #d8cfbd; display: grid; place-items: center; font-size: 34px; color: #c9c0ae; font-weight: 800; }
.stamp.got span { border: 4px double var(--coral); transform: rotate(-8deg); background: #fff8f5; }
.stamp small { font-size: 13px; color: var(--mute); font-weight: 700; }
.animals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.animals .box + .box { margin-top: 0; }
.missions { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.missions label, .toggle { display: flex; gap: 14px; align-items: flex-start; font-size: 17px; line-height: 1.4; padding: 6px 0; }
input[type=checkbox] { width: 28px; height: 28px; flex: none; accent-color: var(--ocean); margin: 0; }
.toggle b { display: block; }
.toggle small { display: block; color: var(--mute); font-size: 15px; }
.note, .empty { color: var(--mute); font-size: 15px; margin-top: 8px; }
.tbl { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 16px; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 2px solid var(--line); }
.tbl th { color: var(--mute); font-size: 14px; }

@media (max-width: 760px) {
  .cols, .two { grid-template-columns: 1fr; }
  .lvrow { grid-template-columns: 1fr; }
  .hero { min-height: 150px; padding: 20px; }
  .hero-av { width: 120px; right: 8px; }
  .hero .sun { right: 120px; width: 60px; height: 60px; }
  .stamps { grid-template-columns: repeat(3, 1fr); }
  .ep { grid-template-columns: 48px 1fr; }
  .ep .res { grid-column: 2; text-align: left; }
  .postcard { padding-right: 20px; }
  .pc-stamp { display: none; }
  .panel { padding: 14px 14px 22px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
