:root {
  --bg: #0b0d1a; --ink: #f6ecd8; --ink-soft: rgba(246,236,216,.75);
  --gold: #e8b64c; --gold-hi: #fff4c8; --gold-lo: #9c6a1c; --gold-deep: #5a380c;
  --glass: rgba(18,14,22,.6); --red: #a11d1a;
  --card: #f7efdf; --card-ink: #3a2414; --card-soft: #7a5a40;
  --display: 'Fraunces', Georgia, serif; --body: 'DM Sans', system-ui, sans-serif;
  --ease: cubic-bezier(.65,0,.25,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--ink); font-family: var(--body); overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; }
button, input { font: inherit; }
.btn { border: 1px solid rgba(255,230,180,.35); background: #a11d1a; color: #fff6e4; padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 16px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: transform .15s; }
.btn:active { transform: scale(.96); }
.btn.ghost { background: var(--glass); box-shadow: none; font-weight: 500; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn.soft { background: #efe2c8; color: var(--card-ink); border-color: #dccaa4; box-shadow: none; }

/* ---------- stuen ---------- */
#room { position: fixed; inset: 0; overflow: hidden; background: #24140a; touch-action: none; }
#cam { position: absolute; left: 0; top: 0; width: 2400px; height: 1200px; transform-origin: 0 0; }
#cam.anim { transition: transform 1.6s var(--ease); }
#cam svg { display: block; width: 2400px; height: 1200px; }
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 50% 45%, transparent 50%, rgba(0,0,0,.55) 100%); }
.hot { cursor: pointer; }
#roomSvg .hidden { display: none; }
.is-new { animation: appear 1.4s ease both; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* animationer i stuen (kun billige transform/opacity) */
.tw { animation: tw 2.6s ease-in-out infinite; }
@keyframes tw { 50% { opacity: .45; } }
.flame { animation: flame .9s ease-in-out infinite alternate; transform-box: view-box; }
@keyframes flame { 0% { transform: scale(1, 1); } 50% { transform: scale(.92, 1.12); } 100% { transform: scale(1.06, .9); } }
.cflame { animation: cflame .6s ease-in-out infinite alternate; transform-box: view-box; }
@keyframes cflame { to { transform: scale(.85, 1.15); } }
.flick, .firelight { animation: flick 2.2s ease-in-out infinite; }
@keyframes flick { 30% { opacity: .82; } 60% { opacity: 1; } 80% { opacity: .88; } }
.steam { animation: steam 4s ease-in-out infinite; transform-box: view-box; }
.steam.s2 { animation-delay: -1.3s; } .steam.s3 { animation-delay: -2.6s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(20px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-50px); } }
.karlastar { animation: tw 3s ease-in-out infinite; }
.winsnow { animation: winsnow 7s linear infinite; }
@keyframes winsnow { from { transform: translateY(-60px); } to { transform: translateY(60px); } }
.fish { animation: swim 9s ease-in-out infinite; transform-box: view-box; }
.fish.f2 { animation-duration: 12s; animation-direction: reverse; }
@keyframes swim { 0%,100% { transform: translate(0,0); } 25% { transform: translate(60px,-8px); } 50% { transform: translate(90px,10px) scaleX(-1); } 75% { transform: translate(20px,4px) scaleX(-1); } }
.bubbles { animation: bub 3s linear infinite; }
@keyframes bub { from { transform: translateY(20px); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(-110px); opacity: 0; } }
.breath { animation: breath 3.4s ease-in-out infinite; transform-box: view-box; transform-origin: 1460px 960px; }
@keyframes breath { 50% { transform: scaleY(1.025); } }
.zzz { animation: zzz 3.4s ease-in-out infinite; }
@keyframes zzz { 0% { opacity: 0; transform: translateY(10px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-30px); } }
.todayMini { animation: tw 1.6s ease-in-out infinite; }
.treestar { animation: tw 3s ease-in-out infinite; }
.tvflick { animation: flick 1.4s steps(3) infinite; }
.lan { animation: flick 2.6s ease-in-out infinite; }
#karla.awake .eyeC { opacity: 0; } #karla.awake .eyeO { opacity: 1; }
#karla.awake .zzz { display: none; }
#karla.awake .khead { animation: nod 1.2s ease-in-out 2; transform-box: view-box; transform-origin: 1380px 930px; }
@keyframes nod { 50% { transform: rotate(-8deg) translateY(-10px); } }
#karla.awake .tail { animation: wag .18s ease-in-out 14 alternate; transform-box: view-box; transform-origin: 1600px 925px; }
@keyframes wag { from { transform: rotate(-14deg); } to { transform: rotate(16deg); } }
#karla.awake .hearts { animation: hearts 2.6s ease-out forwards; }
@keyframes hearts { 0% { opacity: 0; transform: translateY(20px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-80px); } }
#blue.hop { animation: hop .6s ease 2; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes hop { 50% { translate: 0 -24px; } }
.pulse-ring { fill: none; stroke: #ffd36b; stroke-width: 5; animation: ring 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(1.5); } }

/* ---------- hoveddør ---------- */
#front { position: fixed; inset: 0; z-index: 5; background: repeating-linear-gradient(90deg, #8b2a22 0 31px, #5e1a14 31px 34px); perspective: 1000px; transition: opacity 1s ease .6s; overflow: hidden; }
#front.enter .front-wrap { transform: scale(3.6) translateY(4%); transition: transform 1.8s var(--ease) .5s; }
#front.enter { opacity: 0; pointer-events: none; }
#front.gone { display: none; }
.front-wrap { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 1 / 2; translate: -50% 0; transform-origin: 50% 66%; }
.front-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.doorway { position: absolute; left: 31%; top: 43%; width: 38%; height: 45.75%; perspective: 900px; }
.door-light { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 60%, #fff1c8, #ffb357 55%, #b8541c); opacity: 0; transition: opacity .6s; }
.door-leaf { position: absolute; inset: 0; transform-origin: 0 50%; transition: transform 1.3s cubic-bezier(.5,0,.2,1); box-shadow: 0 0 0 rgba(0,0,0,0); }
.door-leaf svg { width: 100%; height: 100%; display: block; }
#front.open .door-light { opacity: 1; }
#front.open .door-leaf { transform: rotateY(-108deg); box-shadow: 20px 0 40px rgba(0,0,0,.5); }
#snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- intro ---------- */
#intro { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: max(9vh, 60px) 20px max(7vh, 40px); perspective: 900px; background: linear-gradient(180deg, rgba(8,10,24,.75), rgba(8,10,24,0) 45%, rgba(8,10,24,0) 70%, rgba(8,10,24,.6)); transition: opacity 1s; }
#intro.leave { opacity: 0; pointer-events: none; }
.logo { text-align: center; transform-style: preserve-3d; animation: swing 7s ease-in-out 2.6s infinite; }
#intro.leave .logo { animation: none; transition: transform 1.2s var(--ease), opacity .9s; transform: translateZ(400px); opacity: 0; }
@keyframes swing { 0%,100% { transform: rotateY(-7deg) rotateX(3deg); } 50% { transform: rotateY(7deg) rotateX(-2deg); } }
.logo-top { font-family: var(--display); font-style: italic; font-size: clamp(24px, 6.5vw, 42px); opacity: 0; animation: fadeUp 1.2s .2s forwards; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.logo-main { font-family: var(--display); font-weight: 600; font-size: clamp(52px, 15vw, 140px); line-height: 1.02; perspective: 700px; white-space: nowrap;
  filter: drop-shadow(0 1.5px 0 var(--gold-lo)) drop-shadow(0 1.5px 0 var(--gold-lo)) drop-shadow(0 1.5px 0 var(--gold-deep)) drop-shadow(0 1.5px 0 var(--gold-deep)) drop-shadow(0 12px 20px rgba(0,0,0,.6)); }
.logo-main span { display: inline-block; background: linear-gradient(180deg, var(--gold-hi) 10%, var(--gold) 55%, var(--gold-lo) 95%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; transform-origin: 50% 90%; opacity: 0; animation: flip 1.2s cubic-bezier(.2,.9,.25,1.2) forwards; animation-delay: calc(.5s + var(--i) * 70ms); }
@keyframes flip { from { opacity: 0; transform: rotateX(-100deg) translateY(30px); } to { opacity: 1; transform: none; } }
.logo-sub { margin-top: 10px; font-size: clamp(13px, 3.6vw, 16px); letter-spacing: .06em; color: var(--ink-soft); opacity: 0; animation: fadeUp 1s 1.8s forwards; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#intro .btn { opacity: 0; animation: fadeUp 1s 2.2s forwards; font-size: 17px; padding: 16px 30px; }

/* ---------- top + kort ---------- */
.top { position: fixed; z-index: 8; top: max(12px, env(safe-area-inset-top)); left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.brand { font-family: var(--display); font-style: italic; font-size: 18px; color: var(--gold-hi); text-shadow: 0 2px 10px rgba(0,0,0,.7); opacity: 0; transition: opacity 1s; }
.brand.on { opacity: 1; }
.icon-btn { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,240,210,.25); background: var(--glass); color: var(--ink); font-size: 19px; cursor: pointer; }
.card { position: fixed; z-index: 8; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); width: min(440px, calc(100% - 24px)); translate: -50% 0; background: var(--card); color: var(--card-ink); border-radius: 24px; padding: 18px 20px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.45); transform: translateY(130%); transition: transform .6s cubic-bezier(.2,.9,.3,1.1); }
.card.on { transform: none; }
.card-day { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.card h2 { font-family: var(--display); font-weight: 500; font-size: 25px; line-height: 1.15; margin-top: 4px; }
.card p { color: var(--card-soft); line-height: 1.5; margin-top: 6px; font-size: 15px; }
.card-btns { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.card-btns .btn { flex: 1; padding: 13px 16px; font-size: 15px; white-space: nowrap; }
.toast { position: fixed; z-index: 30; left: 50%; top: max(70px, calc(env(safe-area-inset-top) + 60px)); transform: translate(-50%, -10px) scale(.92); opacity: 0; pointer-events: none; max-width: calc(100% - 32px); text-align: center; font-family: var(--display); font-size: 21px; line-height: 1.25; color: var(--card-ink); background: var(--card); padding: 13px 20px; border-radius: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.4); transition: .35s cubic-bezier(.2,.9,.3,1.3); }
.toast small { display: block; font-family: var(--body); font-size: 14px; color: var(--card-soft); margin-top: 4px; }
.toast.on { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- kalenderen ---------- */
#calendar { position: fixed; inset: 0; z-index: 12; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: max(74px, calc(env(safe-area-inset-top) + 62px)) 14px max(70px, calc(env(safe-area-inset-bottom) + 60px)); background: radial-gradient(ellipse at 50% 40%, rgba(60,30,14,.75), rgba(8,6,10,.95)); opacity: 0; pointer-events: none; transition: opacity .6s; }
#calendar.on { opacity: 1; pointer-events: auto; }
.cal-back { position: absolute; z-index: 5; top: max(14px, env(safe-area-inset-top)); left: 14px; }
.board-wrap { position: relative; height: 100%; max-height: 760px; aspect-ratio: 3 / 4.2; max-width: 100%; perspective: 1400px; }
.board { position: absolute; inset: 0; border-radius: 6px; background-size: cover; box-shadow: 0 0 0 10px #7d1d18, 0 0 0 13px #d9b05c, 0 30px 60px rgba(0,0,0,.6); transform: rotateX(8deg) scale(.92); transition: transform 1.2s var(--ease); }
#calendar.on .board { transform: none; }
.board.zoom { transition: transform 1s var(--ease); }
.door { position: absolute; perspective: 700px; }
.door .inside { position: absolute; inset: 0; border-radius: 2px; background: radial-gradient(circle at 50% 45%, #fff3d0, #e2954a); box-shadow: inset 0 0 12px rgba(90,30,0,.6); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #5a2410; font-family: var(--display); font-size: clamp(9px, 1.8vh, 13px); }
.door .play { width: 46%; max-width: 44px; aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(120,40,0,.35); }
.door .play::after { content: ''; border-left: 11px solid #b5302a; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.flap { position: absolute; inset: 0; transform-origin: 0 50%; transform-style: preserve-3d; transition: transform 1.1s cubic-bezier(.4,0,.2,1); cursor: pointer; }
.door.right .flap { transform-origin: 100% 50%; }
.flap .front, .flap .back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 2px; }
.flap .front { background-repeat: no-repeat; outline: 2px dashed rgba(255,255,255,.55); outline-offset: -5px; display: grid; place-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.35); }
.flap .front b { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 4.6vh, 38px); color: #fff8ea; text-shadow: 0 2px 0 rgba(60,10,10,.6), 0 0 14px rgba(0,0,0,.45); }
.flap .back { transform: rotateY(180deg); background: #e6d6b4; background-image: repeating-linear-gradient(0deg, rgba(150,120,70,.12) 0 2px, transparent 2px 5px); }
.door.open .flap { transform: rotateY(-112deg); }
.door.right.open .flap { transform: rotateY(112deg); }
.door.today .front { outline: 3px solid #ffd36b; animation: todayGlow 1.8s ease-in-out infinite; }
.door.today .front b { color: #ffd36b; }
@keyframes todayGlow { 50% { box-shadow: 0 0 22px 6px rgba(255,200,90,.65); } }
.door.shake .flap { animation: rattle .5s; }
@keyframes rattle { 20% { transform: rotateY(-8deg); } 40% { transform: rotateY(3deg); } 60% { transform: rotateY(-6deg); } 80% { transform: rotateY(2deg); } }
.cal-hint { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); translate: -50% 0; font-weight: 500; font-size: 15px; padding: 10px 18px; border-radius: 999px; background: var(--glass); white-space: nowrap; }

/* ---------- modaler ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(5,6,12,.65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity .35s; }
.modal.on { opacity: 1; pointer-events: auto; }
.sheet { position: relative; width: min(400px, 100%); background: var(--card); color: var(--card-ink); border-radius: 26px; padding: 30px 24px 24px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.5); transform: scale(.94) translateY(12px); transition: transform .45s cubic-bezier(.2,.9,.3,1.2); }
.modal.on .sheet { transform: none; }
.sheet h3 { font-family: var(--display); font-weight: 500; font-size: 28px; line-height: 1.15; }
.sheet p { color: var(--card-soft); line-height: 1.55; margin-top: 8px; font-size: 17px; }
.sheet .big { font-size: 46px; margin-bottom: 6px; }
.sheet input { width: 100%; margin-top: 18px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid #d9c6a2; background: #fffaf0; color: var(--card-ink); font-size: 18px; text-align: center; outline: none; -webkit-user-select: text; user-select: text; }
.sheet input:focus { border-color: var(--red); }
.sheet .btn { margin-top: 14px; width: 100%; }
.sheet .err { color: var(--red); font-size: 14px; min-height: 20px; margin-top: 8px; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.x { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(0,0,0,.08); color: inherit; font-size: 22px; cursor: pointer; z-index: 3; }
.x.light { background: rgba(255,255,255,.2); color: #fff; top: max(14px, env(safe-area-inset-top)); }
.vcard { position: relative; width: min(420px, 100%); max-height: 88svh; aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.vcard video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard .x { background: rgba(0,0,0,.45); color: #fff; }
.vcard .vday { position: absolute; top: 14px; left: 14px; z-index: 2; font-family: var(--display); font-size: 18px; color: #fff; background: rgba(0,0,0,.45); padding: 7px 14px; border-radius: 999px; }
.vempty { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; padding: 30px; text-align: center; background: var(--card); color: var(--card-ink); }
.vempty h3 { font-family: var(--display); font-weight: 500; font-size: 28px; }
.vempty p { color: var(--card-soft); line-height: 1.55; }
.vempty .big { font-size: 56px; }
.photo { max-width: min(560px, 100%); max-height: 80svh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.55); background: var(--card); }
.meter { height: 18px; border-radius: 999px; background: #eadbbd; overflow: hidden; margin-top: 18px; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c0392b, #7a1020); border-radius: inherit; transition: width 1.6s cubic-bezier(.2,.8,.2,1); }
.meter-val { font-family: var(--display); font-size: 44px; color: var(--red); margin-top: 10px; }
.card-btns .btn.nav { flex: 0 0 50px; padding: 13px 0; font-size: 22px; line-height: 1; }

/* =====================================================
   NYT LOOK: papir-noter, bånd-knapper og håndskrift
   ===================================================== */
:root { --hand: 'Caveat', 'Bradley Hand', cursive; --lift: 58px; }
.paper-bg, .paper, .sheet, .toast, .vempty {
  background-color: #f6ecd6;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(160,110,50,.18), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .32 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* bånd-knap (som et julebånd med kløftede ender) */
.btn.ribbon { position: relative; border: none; border-radius: 0; background: linear-gradient(180deg, #c0302a, #9a1b17); color: #fff6e4; font-family: var(--display); font-style: italic; font-weight: 600; font-size: 18px; letter-spacing: .01em; padding: 12px 34px; box-shadow: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%, 14px 50%); filter: drop-shadow(0 3px 0 #6a0f0d); text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.btn.ribbon::before { content: ''; position: absolute; inset: 4px 18px; border-top: 1.5px dashed rgba(255,230,190,.55); border-bottom: 1.5px dashed rgba(255,230,190,.55); pointer-events: none; }
#intro .btn.ribbon { font-size: 21px; padding: 15px 44px; filter: drop-shadow(0 3px 0 #6a0f0d) drop-shadow(0 10px 22px rgba(0,0,0,.45)); }

/* håndskrevne links */
.hand-link { border: none; background: none; cursor: pointer; font-family: var(--hand); font-weight: 700; font-size: 24px; line-height: 1; color: #6a3a1c; padding: 8px 4px; text-decoration: underline wavy rgba(161,29,26,.45); text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.hand-link:active { transform: scale(.95); }
.hand-link.light { color: #f6ecd8; text-decoration-color: rgba(246,236,216,.4); text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.hand-link.nav { font-size: 21px; text-decoration: none; color: #8a5a34; padding: 8px 2px; }

/* kortet bliver en papirseddel med tape */
.card { background: none; box-shadow: none; padding: 0; border-radius: 0; bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--lift)); width: min(430px, calc(100% - 28px)); filter: drop-shadow(0 14px 24px rgba(0,0,0,.45)); transform: translateY(140%) rotate(2deg); }
.card.on { transform: rotate(-.8deg); }
.paper { position: relative; padding: 26px 22px 16px; color: var(--card-ink);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 51% repeat-x, conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 14px 51% repeat-x;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 51% repeat-x, conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 14px 51% repeat-x; }
.tape { position: absolute; top: -2px; left: 50%; width: 92px; height: 24px; translate: -50% 0; rotate: -3deg; background: rgba(214,186,120,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.card-day { font-family: var(--hand); font-size: 22px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--red); }
.card h2 { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 26px; margin-top: 0; }
.card p { font-family: var(--hand); font-size: 22px; line-height: 1.2; color: #5a3a22; margin-top: 6px; }
.card-btns { display: flex; align-items: center; justify-content: center; gap: 4px 12px; margin-top: 14px; flex-wrap: wrap; }
.card-btns .btn.ribbon { flex: 0 1 auto; font-size: 17px; padding: 11px 30px; }
.card-btns .hand-link.nav:first-child { margin-right: auto; }
.card-btns .hand-link.nav:last-child { margin-left: auto; }

/* lyd-mærket øverst */
.sound-tag { pointer-events: auto; border: none; background: none; cursor: pointer; font-family: var(--hand); font-weight: 700; font-size: 22px; color: #f6ecd8; text-shadow: 0 2px 8px rgba(0,0,0,.7); padding: 6px 4px; }
.brand { font-size: 19px; }

/* toast bliver et lille julemærke/seddel */
.toast { border-radius: 4px; font-family: var(--hand); font-size: 28px; font-weight: 700; padding: 12px 22px 10px; rotate: -1.5deg; box-shadow: 0 10px 26px rgba(0,0,0,.4); }
.toast small { font-family: var(--hand); font-size: 20px; font-weight: 500; margin-top: 2px; }

/* låsen og infokort som papir */
.sheet { border-radius: 6px; }
.sheet p { font-family: var(--hand); font-size: 24px; color: #5a3a22; }
.sheet .err { font-family: var(--hand); font-size: 20px; }
.sheet input { font-family: var(--hand); font-size: 26px; background: transparent; border: none; border-bottom: 2px dashed #b9a07a; border-radius: 0; padding: 8px; }
.sheet .btn.ribbon { width: auto; margin-top: 18px; }

/* kalender-skærmen */
.cal-back { top: max(12px, env(safe-area-inset-top)); left: 10px; }
.cal-hint { background: none; font-family: var(--hand); font-size: 24px; font-weight: 700; color: #f6ecd8; text-shadow: 0 2px 10px rgba(0,0,0,.8); bottom: calc(max(10px, env(safe-area-inset-bottom)) + var(--lift)); }
#calendar { padding-bottom: calc(max(70px, env(safe-area-inset-bottom) + 60px) + var(--lift) - 20px); }
#intro { padding-bottom: calc(max(7vh, 40px) + var(--lift)); }

/* glimt i stuen der viser, hvad man kan trykke på */
.glint { pointer-events: none; opacity: 0; animation: glint 4.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes glint { 0%, 70%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 80% { opacity: 1; transform: scale(1.1) rotate(25deg); } 90% { opacity: .6; transform: scale(.8) rotate(45deg); } }
.hot:active { filter: brightness(1.12); }
.card { transform: translateY(calc(100% + 140px)) rotate(2deg); opacity: 0; pointer-events: none; transition: transform .6s cubic-bezier(.2,.9,.3,1.1), opacity .3s; }
.card.on { transform: rotate(-.8deg); opacity: 1; pointer-events: auto; }
.card-btns { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2px 10px; }
.card-btns .btn.ribbon { grid-column: 1 / -1; justify-self: center; order: -1; }
.card-btns .hand-link { grid-column: 1 / -1; justify-self: center; }
.card-btns .hand-link.nav { grid-column: auto; margin: 0; }
.card-btns .hand-link.nav:first-of-type { justify-self: start; }
.card-btns .hand-link.nav:last-of-type { justify-self: end; }
/* glattere kamera: sæt små animationer på pause, mens kameraet bevæger sig */
#cam.anim { will-change: transform; transition-timing-function: cubic-bezier(.45,0,.2,1); }
#room.moving * { animation-play-state: paused !important; }
/* håndskrevne pile i kanten, der viser at der er mere i stuen */
.edge-hint { position: fixed; z-index: 7; top: 42%; font-size: 26px; opacity: 0; pointer-events: none; transition: opacity .6s; text-decoration: none; padding: 14px 10px; }
.edge-hint.on { opacity: 1; pointer-events: auto; animation: nudge 2.4s ease-in-out infinite; }
.edge-hint.left { left: 6px; } .edge-hint.right { right: 6px; }
.edge-hint.left.on { --dx: -6px; } .edge-hint.right.on { --dx: 6px; }
@keyframes nudge { 50% { translate: var(--dx) 0; } }
/* fast navigation på sedlen: ribbon øverst, handling, så ← forrige · stuen · næste → */
.card-btns { grid-template-columns: 1fr auto 1fr; }
.card-btns .btn.ribbon, .card-btns .hand-link:not(.nav) { grid-column: 1 / -1; justify-self: center; }
.card-btns .nav-prev { grid-column: 1; justify-self: start; }
.card-btns .nav-home { grid-column: 2; justify-self: center; color: var(--red); }
.card-btns .nav-next { grid-column: 3; justify-self: end; }
.card-btns .hand-link.nav { border-top: 1.5px dashed rgba(122,74,40,.3); padding-top: 10px; margin-top: 6px; width: 100%; text-align: inherit; }
.card-btns .nav-prev { text-align: left; } .card-btns .nav-next { text-align: right; } .card-btns .nav-home { text-align: center; }
/* "nyt i dag"-stempel */
.card.is-new .card-day { display: inline-block; background: var(--red); color: #fff6e4; padding: 3px 12px 1px; rotate: -2deg; border-radius: 3px; font-size: 20px; margin-bottom: 4px; }
.card-btns { grid-template-columns: 1fr 1fr 1fr; column-gap: 0; }
/* sammenfoldet seddel på telefonen – så stuen kan ses */
.more { display: none; position: absolute; top: 18px; right: 16px; border: none; background: none; font-family: var(--hand); font-weight: 700; font-size: 20px; color: var(--red); cursor: pointer; padding: 4px; }
@media (max-width: 699px) {
  .more { display: block; }
  .card.compact .paper { padding: 22px 18px 8px; }
  .card.compact .card-day { font-size: 18px; padding-right: 96px; }
  .card.is-new.compact .card-day { font-size: 17px; }
  .card.compact h2 { font-size: 21px; }
  .card.compact p, .card.compact .card-btns .hand-link:not(.nav) { display: none; }
  .card.compact .card-btns { margin-top: 8px; }
  .card.compact .card-btns .btn.ribbon { font-size: 16px; padding: 9px 28px; }
  .card.compact .card-btns .hand-link.nav { padding-top: 6px; margin-top: 2px; font-size: 19px; }
  .card { --lift: 50px; }
}
/* kalenderen zoomer ind på dagens låge */
#calendar { overflow: hidden; }
.board.zoomed { transition: transform 1.3s cubic-bezier(.45,0,.2,1); }
#calendar.on .board { transition: transform 1.3s cubic-bezier(.45,0,.2,1); }
/* tydelig "læs mere"-fane oven på sedlen */
.more { display: none; position: absolute; z-index: 2; top: -34px; left: 50%; right: auto; translate: -50% 0; background: #f6ecd6; color: var(--red); border: none; border-radius: 14px 14px 0 0; padding: 7px 22px 9px; font-family: var(--hand); font-weight: 700; font-size: 21px; line-height: 1; white-space: nowrap; box-shadow: 0 -4px 10px rgba(0,0,0,.18); animation: tabNudge 2.8s ease-in-out 1.2s 3; }
@keyframes tabNudge { 50% { translate: -50% -5px; } }
@media (max-width: 699px) {
  .more { display: block; }
  .card .tape { display: none; }
  .card.compact .card-day { padding-right: 0; }
  .card { --lift: 46px; }
}

/* ===== talebobler fra tingene ===== */
.bubble { position: fixed; z-index: 7; left: 0; top: 0; width: min(290px, calc(100vw - 20px)); padding: 14px 18px 12px; border-radius: 20px; color: var(--card-ink); pointer-events: none; opacity: 0; transform: scale(.7); transform-origin: var(--tail, 50%) 100%; transition: opacity .25s, transform .45s cubic-bezier(.2,1.4,.4,1); filter: drop-shadow(0 10px 18px rgba(0,0,0,.4));
  background-color: #f6ecd6; background-image: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.6), transparent 60%), radial-gradient(ellipse at 100% 100%, rgba(160,110,50,.16), transparent 55%); }
.bubble.on { opacity: 1; transform: none; pointer-events: auto; }
.bubble::after { content: ''; position: absolute; left: var(--tail, 50%); bottom: -13px; translate: -50% 0; border: 14px solid transparent; border-bottom: 0; border-top-color: #f3e7cf; }
.bubble.below { transform-origin: var(--tail, 50%) 0; }
.bubble.below::after { bottom: auto; top: -13px; border: 14px solid transparent; border-top: 0; border-bottom-color: #fbf3e2; }
.bubble h3 { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 20px; line-height: 1.15; }
.bubble p { font-family: var(--hand); font-size: 21px; line-height: 1.15; color: #5a3a22; margin-top: 4px; }
.bubble .hand-link { font-size: 21px; padding: 6px 0 0; color: var(--red); }

/* sedlen nederst er nu kun dato + bånd + navigation */
.card .paper { padding: 22px 18px 8px; }
.card h2 { font-size: 22px; }
.card p { font-size: 20px; }
.card-btns { margin-top: 10px; }

/* ===== velkomstbrevet (fylder hele skærmen) ===== */
.letter-modal { align-items: flex-start; overflow-y: auto; padding: max(24px, env(safe-area-inset-top)) 14px 40px; background: rgba(10,8,14,.78); }
.letter { position: relative; width: min(560px, 100%); margin: auto; padding: 46px 30px 34px; color: var(--card-ink); rotate: -.6deg; box-shadow: 0 30px 70px rgba(0,0,0,.55); transform: translateY(30px) scale(.97); transition: transform .7s cubic-bezier(.2,.9,.3,1.1);
  background-color: #f6ecd6;
  background-image: repeating-linear-gradient(180deg, transparent 0 37px, rgba(120,80,40,.14) 37px 38px), radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.6), transparent 60%), radial-gradient(ellipse at 100% 100%, rgba(160,110,50,.2), transparent 55%);
  background-position: 0 30px, 0 0, 0 0; }
.modal.on .letter { transform: none; }
.letter-stamp { position: absolute; top: 16px; right: 18px; width: 54px; height: 64px; display: grid; place-items: center; font-size: 26px; color: #fff6e4; background: #a11d1a; rotate: 6deg; outline: 3px dashed #f6ecd6; outline-offset: -7px; }
.letter h2 { font-family: var(--display); font-style: italic; font-weight: 600; font-size: clamp(30px, 8vw, 40px); color: var(--red); margin-bottom: 14px; }
.letter p { font-family: var(--hand); font-size: clamp(24px, 6.4vw, 28px); line-height: 1.36; color: #3a2414; margin-bottom: 12px; }
.letter .letter-end { margin-top: 18px; margin-bottom: 0; }
.letter .letter-from { font-size: clamp(28px, 7.4vw, 34px); color: var(--red); font-weight: 700; }
.letter .btn.ribbon { display: block; margin: 26px auto 0; font-size: 20px; padding: 14px 40px; }
/* ===== dagens hilsen som et lille julekort ===== */
.postcard { position: relative; width: min(360px, 100%); padding: 34px 26px 26px; text-align: center; color: var(--card-ink); rotate: 1.2deg; box-shadow: 0 30px 70px rgba(0,0,0,.55); transform: scale(.85) rotate(-6deg); transition: transform .6s cubic-bezier(.2,1.3,.4,1);
  background-color: #f6ecd6; background-image: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.6), transparent 60%), radial-gradient(ellipse at 100% 100%, rgba(160,110,50,.2), transparent 55%);
  outline: 2px solid rgba(161,29,26,.35); outline-offset: -10px; }
.modal.on .postcard { transform: none; }
.pc-stamp { position: absolute; top: -18px; right: 18px; width: 52px; height: 60px; display: grid; place-items: center; font-size: 26px; background: #fff8ea; rotate: 7deg; outline: 3px dashed #c9a46a; outline-offset: -6px; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.pc-day { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 30px; color: var(--red); }
.postcard p { font-family: var(--hand); font-size: 27px; line-height: 1.25; color: #3a2414; margin-top: 10px; }
.postcard .btn.ribbon { margin-top: 20px; }
/* videoer optaget på langs */
.vcard.landscape { aspect-ratio: 16 / 9; width: min(960px, 100%); max-height: 80svh; }
.vcard.landscape video { object-fit: contain; }
.door .new-thing { font-size: clamp(18px, 3.4vh, 30px); line-height: 1; }
