:root{--ink:#493b38;--muted:#786761;--paper:#fffdf7;--pink:#ead0d0;--rose:#965561;--line:#ded5c8;--blue:#dae6eb;--yellow:#f5e5b6}*{box-sizing:border-box}body{margin:0;background:#f8f4eb;color:var(--ink);font-family:"Avenir Next",Avenir,"Segoe UI",sans-serif;font-size:15px;line-height:1.6;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23856a50' opacity='.045' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E")}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button{border:0}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #587c90;outline-offset:5px}button:hover:not(:disabled){filter:brightness(.97)}[hidden]{display:none!important}.topbar{max-width:1180px;margin:auto;padding:28px 36px;display:flex;justify-content:space-between;align-items:center;gap:16px}.wordmark{font-family:Georgia,serif;font-style:italic;font-size:21px;text-decoration:none;color:var(--ink)}.wordmark span{color:var(--rose);margin-left:8px}.music{border:1px solid var(--line);background:#fffaf2;border-radius:30px;padding:10px 18px;font-size:12px}.music-status{text-align:right;max-width:1110px;margin:0 auto;font-size:12px;padding:0 20px;min-height:0}.music-status:empty{display:none}main{max-width:1040px;margin:30px auto 0;padding:0 30px}.intro{text-align:center}.eyebrow{font-size:10px;letter-spacing:2.5px;font-weight:600;color:var(--muted)}h1,h2{font-family:Georgia,"Times New Roman",serif;font-weight:400;line-height:1.18}h1{font-size:clamp(34px,4.4vw,52px);margin:16px 0}h1 em,h2 em{color:var(--rose);font-weight:400}p{margin:12px 0}.intro>p{color:var(--muted);font-size:14px}.steps{display:flex;align-items:center;justify-content:center;margin:32px auto 38px;gap:15px}.steps button{display:flex;align-items:center;gap:8px;font-size:12px;background:none;padding:6px 0;white-space:nowrap}.steps button span{border:1px solid #d8c8bc;border-radius:50%;height:29px;width:29px;display:grid;place-items:center;font-size:10px}.steps button[aria-current]{color:var(--rose);font-weight:600}.steps button[aria-current] span{background:var(--rose);color:white;border-color:var(--rose)}.steps button:disabled{color:#8b8279}.steps i{height:1px;width:34px;background:var(--line)}.panel{background:var(--paper);padding:44px 48px;text-align:center;position:relative;box-shadow:0 5px 24px #5a42300b,0 1px 4px #5a423011;border:1px solid #e9e1d6;min-height:510px;border-radius:3px;animation:arrive .5s ease}.panel:before{content:"";position:absolute;top:9px;left:9px;right:9px;bottom:9px;border:1px solid #e8e0d655;pointer-events:none}.panel h2{font-size:clamp(29px,3.3vw,40px);margin:12px auto 16px;max-width:650px}.hand{font-family:"Segoe Print","Bradley Hand","Comic Sans MS",cursive;font-weight:400}.paper-label{position:absolute;left:50%;top:-14px;transform:translateX(-50%) rotate(-2deg);background:var(--blue);padding:7px 26px;font-size:11px;white-space:nowrap;box-shadow:0 2px 3px #54443208}.gift-panel{background:radial-gradient(ellipse at 50% 60%,#fff7ed,transparent 65%),var(--paper);padding-top:42px}.gift-intro h2{font-size:43px;margin:10px 0}.gift-intro>p:last-child{font-size:14px}.gift{position:relative;display:block;width:240px;height:218px;margin:28px auto 0;background:none;isolation:isolate;transition:transform .25s}.gift:hover{transform:rotate(-3deg)}.gift-box{position:absolute;left:26px;top:74px;width:188px;height:135px;background:repeating-linear-gradient(90deg,transparent 0 13px,#fff3 13px 14px),#ebc3c7;box-shadow:8px 12px 0 #5c414007;transform:rotate(-3deg);border-radius:2px}.gift-box:after,.gift-lid:after{content:"";position:absolute;background:#b96b7c;left:80px;width:29px;top:0;bottom:0;border-left:2px solid #ffffff24;border-right:2px solid #ffffff24}.gift-lid{position:absolute;z-index:2;left:15px;top:61px;width:210px;height:33px;background:#f1d0d2;transform:rotate(-3deg);box-shadow:0 5px 0 #85475816;transition:transform .7s,opacity .7s}.gift-lid:after{left:91px}.bow{position:absolute;top:8px;left:66px;width:120px;height:60px;z-index:3;transform:rotate(-3deg);transition:transform .7s,opacity .7s}.bow b{position:absolute;width:61px;height:40px;border:10px solid #b96b7c;border-radius:60% 70% 10% 70%;transform:rotate(20deg);top:9px;left:0;box-shadow:inset 2px 1px #82465733}.bow b+b{left:53px;transform:scaleX(-1) rotate(20deg)}.gift-tag{position:absolute;z-index:4;top:126px;left:139px;padding:7px 12px;background:#fffcf4;font-family:Georgia,serif;font-style:italic;font-size:14px;transform:rotate(12deg);box-shadow:1px 2px 3px #0001}.gift.open .gift-lid,.gift.open .bow{transform:translateY(-55px) rotate(-17deg);opacity:0}.gift.open{height:200px}.hint{font-size:15px;color:var(--muted);transform:rotate(-4deg);margin:12px 0 28px}.doodle{position:absolute;pointer-events:none}.heart{font-size:63px;color:#b3777c;font-family:Georgia,serif}.one{left:18%;top:42%;transform:rotate(-20deg)}.two{right:18%;top:56%;transform:rotate(18deg);font-size:43px}.star{right:24%;top:33%;color:#bfa66c;font-size:37px}.corner-note{position:absolute;left:28px;bottom:28px;font-size:12px;line-height:1.5;transform:rotate(-6deg);color:var(--muted);text-align:left}.primary{display:inline-flex;justify-content:center;align-items:center;gap:24px;padding:13px 24px;border-radius:5px;background:var(--rose);color:#fffaf5;margin:15px auto 5px;font-size:13px;box-shadow:0 3px 0 #683b4318}.primary span{font-size:19px}#gift-reveal h3{font-size:28px;margin:0}#gift-reveal p{font-size:13px;max-width:350px;margin:8px auto}.under-note{text-align:center;color:var(--muted);font-size:11px;letter-spacing:.4px;margin:23px 0 38px}.under-note span{color:var(--rose);font-size:17px;padding-right:8px}footer{text-align:center;border-top:1px solid var(--line);padding:25px 20px;font-family:Georgia,serif;font-style:italic;font-size:13px}footer span{color:var(--rose)}footer small{display:block;font-family:Arial,sans-serif;font-style:normal;letter-spacing:2px;font-size:8px;color:var(--muted);margin-top:9px}.gallery{display:grid;grid-template-columns:repeat(4,1fr);gap:25px 20px;margin:35px 0}.polaroid{background:white;padding:9px 9px 15px;box-shadow:0 3px 10px #493b3820;border:1px solid #eee8de;position:relative;transform:rotate(-3deg);transition:transform .2s}.polaroid:nth-child(even){transform:rotate(3deg)}.polaroid:before{content:"";width:57px;height:19px;position:absolute;top:-10px;left:calc(50% - 28px);background:#e8d7b9aa;transform:rotate(-6deg)}.polaroid:hover{transform:rotate(0) translateY(-4px)}.polaroid img{width:100%;height:190px;object-fit:contain;background:#f4f0e8;display:block}.polaroid .hand{font-size:15px;display:block;margin-top:9px}.quiz-card{border-top:1px dashed var(--line);margin-top:30px;padding-top:20px}.quiz-card h3{font-family:Georgia,serif;font-size:22px;font-weight:400}.quiz-number{color:var(--rose);font-size:10px;letter-spacing:2px}.answers{display:flex;gap:12px;justify-content:center}.answer{flex:1;background:#f8f1e9;border:1px solid #ded3c5;border-radius:5px;padding:15px 12px;font-size:13px}.answer[aria-pressed=true]{background:#f0d9dc;border:2px solid var(--rose);padding:14px 11px}.answer img{height:175px;width:100%;object-fit:contain;display:block;margin-bottom:12px}.reaction{min-height:26px;color:var(--rose);font-size:14px}.lights-panel{padding-top:100px;transition:background .6s}.string-lights{position:absolute;top:10px;left:3%;right:3%;height:50px;border-bottom:2px solid #998c75;border-radius:0 0 50% 50%;display:flex;justify-content:space-around}.string-lights span{height:23px;width:15px;border-radius:40% 40% 50% 50%;background:#e2ddd0;position:relative;top:37px;border:1px solid #b9b09c}.string-lights span:first-child,.string-lights span:last-child{top:20px}.string-lights span:nth-child(2),.string-lights span:nth-last-child(2){top:31px}.lit{background:#fff8df}.lit .string-lights span{background:#ffe29a;box-shadow:0 0 20px 9px #ffd56c66;border-color:#dec08a}.switch{display:block;background:#efe9dd;border:2px solid #d3c9b8;border-radius:10px;padding:16px 24px 8px;margin:30px auto 15px;box-shadow:3px 6px 0 #0000000a}.switch>span{display:block;width:44px;height:64px;background:linear-gradient(#fffdf5,#e2d6c4);border:1px solid #b8a88e;border-radius:4px;box-shadow:inset 0 -8px 0 #c9bda8}.switch[aria-checked=true]>span{box-shadow:inset 0 8px 0 #c9bda8;background:#fff9e9}.switch small{font-size:9px;letter-spacing:2px}.envelope{display:block;position:relative;margin:50px auto 25px;width:290px;height:190px;background:#ead0c7;border:1px solid #d8b7af;box-shadow:3px 7px 12px #493b3811;isolation:isolate}.envelope:after{content:"";position:absolute;inset:0;clip-path:polygon(0 0,50% 55%,100% 0,100% 100%,0 100%);background:#f0d9d0;z-index:-1}.envelope-flap{position:absolute;inset:0;background:#e4c2b8;clip-path:polygon(0 0,100% 0,50% 58%);transform-origin:top;transition:transform .6s}.envelope.open .envelope-flap{transform:rotateX(180deg)}.seal{display:block;position:relative;background:var(--rose);color:white;border-radius:50%;width:42px;height:42px;margin:52px auto 0;font-size:29px;line-height:42px}.envelope-note{display:block;margin-top:20px;font-size:19px}.letter-paper{text-align:left;max-width:580px;margin:35px auto;padding:35px 40px;background:#fffdf7;box-shadow:0 3px 20px #493b3810;background-image:repeating-linear-gradient(transparent 0 31px,#ded5c83b 31px 32px);line-height:2.1}.letter-paper h3{font-family:Georgia,serif;font-size:25px;font-weight:400}.letter-date{font-size:13px;color:var(--rose)}.letter-photo{width:240px;margin:30px auto}.letter-photo img{height:260px}.end-actions{display:flex;flex-direction:column;align-items:center;gap:12px}.text-button{background:none;text-decoration:underline;text-underline-offset:4px;font-size:13px;padding:10px}.close{position:absolute;top:12px;right:12px;border-radius:50%;width:40px;height:40px;background:var(--paper);font-size:28px;box-shadow:0 2px 6px #0002}dialog{border:1px solid var(--line);background:var(--paper);padding:25px;max-width:min(680px,92vw);width:680px;max-height:90dvh;text-align:center;box-shadow:0 20px 80px #0003}dialog::backdrop{background:#302729b8;backdrop-filter:blur(4px)}dialog>img{width:100%;height:55dvh;object-fit:contain}#photo-title{font-size:23px;margin:8px}#photo-caption{font-size:14px}.noscript{position:fixed;inset:auto 0 0;background:white;padding:20px;text-align:center}#confetti{position:fixed;inset:0;pointer-events:none;z-index:10;overflow:hidden}#confetti i{position:absolute;top:-20px;width:8px;height:13px;animation:fall 1.8s ease-in forwards}@keyframes fall{to{transform:translateY(105vh) rotate(600deg)}}@keyframes arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(min-width:800px){.gift-panel:has(#gift-reveal:not([hidden])) .corner-note{bottom:45px}}@media(max-width:700px){.topbar{padding:20px;gap:10px}.wordmark{font-size:16px}.music{font-size:10px;padding:9px 11px;max-width:180px}main{padding:0 18px;margin-top:20px}.intro>p{font-size:12px}.steps{gap:9px;margin:26px 0 30px;justify-content:space-between}.steps i{display:none}.steps button{flex-direction:column;gap:5px;font-size:10px}.panel{padding:35px 22px}.gift-panel{min-height:510px}.gift-intro h2{font-size:36px}.paper-label{font-size:9px;padding:6px 16px}.one{left:6%;font-size:45px;top:40%}.two{right:6%;font-size:35px;top:62%}.star{right:11%;top:30%;font-size:27px}.corner-note{font-size:10px;position:static;display:block;text-align:center;transform:rotate(-3deg);margin-top:30px}.gallery{grid-template-columns:repeat(2,1fr);gap:25px 14px}.polaroid img{height:175px}.polaroid .hand{font-size:13px}.answers{flex-direction:column}.answers.photos{flex-direction:row;gap:6px}.photos .answer{padding:7px 4px;font-size:10px;min-width:0}.photos .answer[aria-pressed=true]{padding:6px 3px}.answer img{height:125px}.lights-panel{padding-top:100px}.envelope{width:250px;height:175px;max-width:100%}.letter-paper{padding:24px 18px}.under-note{font-size:10px}dialog{padding:16px}dialog>img{height:50dvh}}@media(max-width:370px){.wordmark{max-width:100px}.polaroid img{height:140px}.photos .answer img{height:100px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}#confetti{display:none}}

/* Musikkontrollen følger med gjennom hele kortet. */
.topbar{position:sticky;top:0;z-index:5;background:#f8f4ebf5;backdrop-filter:blur(8px)}#stage{scroll-margin-top:100px}.music-status{position:sticky;top:85px;z-index:5;background:#f8f4eb}#letter{scroll-margin-top:100px}@media(max-width:700px){.wordmark{font-size:14px;max-width:135px}.topbar{padding-top:12px;padding-bottom:12px}.music-status{top:65px}#stage,#letter{scroll-margin-top:85px}}

/* Sidene beveger seg som ark i samme utklippsbok. */
#stage{position:relative;isolation:isolate}
.panel{animation:none}
#stage.turning{overflow:clip;overflow-clip-margin:18px}
#stage:after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 25%,#ffe4a6aa,transparent 75%);opacity:0;transition:opacity .45s;z-index:2}
#stage.light-transition:after{opacity:1}
.auto-note{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:3px 10px;font-size:11px;color:var(--muted);margin-top:10px}
.auto-note .text-button{font-size:11px;padding:5px}
.quiz-card.revealed{animation:arrive .6s ease both}
.string-lights span{transition:background .35s,box-shadow .6s;transition-delay:calc(var(--bulb,0) * 80ms)}
.string-lights span:nth-child(2){--bulb:1}.string-lights span:nth-child(3){--bulb:2}.string-lights span:nth-child(4){--bulb:3}.string-lights span:nth-child(5){--bulb:4}.string-lights span:nth-child(6){--bulb:5}.string-lights span:nth-child(7){--bulb:6}
#letter.unfolding{animation:unfold-letter 1s cubic-bezier(.22,.68,.2,1) both;transform-origin:top center}
@keyframes unfold-letter{from{opacity:0;transform:translateY(35px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){#stage:after{display:none}}

/* Selve papirkanten er navigasjonen; ingen synlig instruksjonstekst. */
#stage{margin-top:44px}
.page-flap{position:absolute;right:-1px;bottom:-1px;width:72px;height:72px;padding:0;background:none;z-index:3;cursor:pointer;filter:none!important}
.page-flap span{position:absolute;right:0;bottom:0;width:54px;height:54px;background:linear-gradient(135deg,#e7d6ad 0%,#f1e4c7 48%,#f8f4eb 50%);clip-path:polygon(100% 0,100% 100%,0 100%,0 0);box-shadow:-3px -3px 9px #5543281a;transform-origin:bottom right;transition:width .3s,height .3s,filter .3s;border-radius:4px 0 0 0;pointer-events:none}
.page-flap:hover span,.page-flap:focus-visible span{width:70px;height:70px;filter:drop-shadow(-4px -4px 4px #55432826)}
.page-flap:active span{width:76px;height:76px}
.page-flap-back{left:-1px;right:auto;bottom:auto;top:-1px;transform:rotate(180deg)}
.panel:has(.page-flap){padding-bottom:80px}
@media(max-width:700px){#stage{margin-top:35px}.page-flap{width:62px;height:62px}.page-flap span{width:46px;height:46px}.page-flap:hover span,.page-flap:focus-visible span{width:60px;height:60px}}

/* Luft mellom den åpnede gaven og bursdagshilsenen. */
#gift-reveal{margin-top:32px}

/* En liten premielapp i en papirlomme avslutter quizen. */
#quiz-end:not([hidden]){animation:arrive .6s ease both}
.prize-pocket{position:relative;width:min(360px,100%);margin:48px auto 12px;padding:0 12px 20px;isolation:isolate}
.pocket-seam{position:absolute;bottom:0;left:0;right:0;height:55px;border:1px solid #d8cbb8;border-top:2px solid #cbbca6;border-radius:0 0 6px 6px;background:#f0e6d5;box-shadow:0 5px 8px #493b380c;pointer-events:none;z-index:2}
.pocket-seam:after{content:"";position:absolute;inset:8px;border:1px dashed #c8b99f;border-top:0}
.prize-ticket{position:relative;display:flex;align-items:stretch;width:100%;padding:0 0 27px;background:#f5e3aa;border:1px solid #dbc487;box-shadow:2px 5px 9px #493b381c;transform:rotate(-3deg);transition:transform .3s,box-shadow .3s;border-radius:5px;color:#57452d}
.ticket-stub{display:grid;place-items:center;width:55px;flex-shrink:0;border-right:2px dashed #c6aa6c;font-size:28px;color:#8b6431}
.ticket-copy{display:flex;flex-direction:column;gap:8px;padding:18px 10px;text-align:center;flex:1;min-width:0}
.ticket-label{font-size:8px;letter-spacing:1.7px}.ticket-copy .hand{font-size:20px;line-height:1.35}.ticket-stamp{font-size:8px;letter-spacing:1.2px;color:#725a37}
.prize-ticket:hover,.prize-ticket:focus-visible{transform:translateY(-14px) rotate(-1deg);box-shadow:3px 12px 15px #493b3824}
.prize-ticket:active{transform:translateY(-22px) rotate(1deg)}
@media(max-width:370px){.ticket-stub{width:40px}.ticket-copy .hand{font-size:17px}.ticket-label{letter-spacing:1px}}
@media(prefers-reduced-motion:reduce){.prize-ticket:hover,.prize-ticket:focus-visible,.prize-ticket:active{transform:rotate(-3deg)}}



/* En liten bunke minner som samles før quizen åpnes. */
.memory-stack{position:relative;display:block;width:190px;height:180px;margin:40px auto 0;background:none;padding:0;isolation:isolate;cursor:pointer;filter:none!important}
.stack-card{position:absolute;display:block;left:30px;top:14px;width:130px;height:145px;border:1px solid #dfd5c7;background:#fffdfa;box-shadow:0 4px 10px #493b3820;transform-origin:50% 85%;transition:transform .5s cubic-bezier(.22,.68,.2,1),box-shadow .5s;pointer-events:none}
.stack-back{background:#dce7ed;transform:rotate(-14deg) translate(-9px,3px)}
.stack-middle{background:#efd4d4;transform:rotate(12deg) translate(9px,2px)}
.stack-front{transform:rotate(-3deg);padding:8px 8px 0}.stack-front>.hand{display:block;font-size:17px;margin-top:5px;color:var(--rose)}
.stack-photo{display:block;height:96px;background:#f1e8db;overflow:hidden}.stack-photo img{display:block;width:100%;height:100%;object-fit:contain}
.memory-stack:hover .stack-back,.memory-stack:focus-visible .stack-back{transform:rotate(-22deg) translate(-14px,-5px)}
.memory-stack:hover .stack-middle,.memory-stack:focus-visible .stack-middle{transform:rotate(20deg) translate(15px,-5px)}
.memory-stack:hover .stack-front,.memory-stack:focus-visible .stack-front{transform:rotate(0deg) translateY(-12px);box-shadow:0 12px 18px #493b3825}
@media(prefers-reduced-motion:reduce){.memory-stack:hover .stack-card,.memory-stack:focus-visible .stack-card{transform:none}}

.quiz-card{padding:22px 16px 14px;border-radius:10px;transition:background .3s}
.quiz-hint{font-size:11px;color:var(--muted);margin:0 0 18px}
.quiz-card.quiz-correct{background:#edf4e8;border-color:#afc4a1}
.quiz-card.quiz-wrong{background:#fcf0f0;border-color:#d8aeb3}
.answer.answer-correct[aria-pressed=true]{background:#dfecd6;border-color:#64834f;color:#304727}
.answer.answer-wrong[aria-pressed=true]{background:#f3dadd;border-color:#a15b67;color:#743e49}
.answer-mark{display:block;font-size:11px;font-weight:600;min-height:18px;margin-top:7px}
.quiz-correct .reaction{color:#39582d}.quiz-wrong .reaction{color:#863e4d}
.perfect-score{color:#39582d;background:#e6efdc;padding:18px;border-radius:8px}
@media(max-width:700px){.quiz-card{padding-left:8px;padding-right:8px}.photos .answer-mark{font-size:9px}}

/* Quizmasteren svarer i en egen håndlaget snakkeboble. */
.quiz-bubble{display:flex;align-items:flex-start;gap:14px;max-width:590px;margin:24px auto 8px;text-align:left;animation:arrive .35s ease both}
.bubble-avatar{display:grid;place-items:center;flex:0 0 40px;height:40px;border-radius:50%;background:#ead0d0;color:#8d4e5b;font:28px Georgia,serif;transform:rotate(-8deg);margin-top:12px}
.bubble-message{position:relative;flex:1;min-width:0;background:#fffaf1;border:1px solid #e1d4bf;border-radius:4px 18px 18px 18px;padding:17px 20px;box-shadow:2px 4px 0 #493b3808}
.bubble-message:before{content:"";position:absolute;left:-8px;top:18px;width:14px;height:14px;background:inherit;border-left:1px solid #e1d4bf;border-bottom:1px solid #e1d4bf;transform:rotate(45deg)}
.bubble-speaker{display:block;font-size:9px;letter-spacing:1.8px;color:#786159}
.quiz-bubble .reaction{margin:8px 0 12px;min-height:0;color:var(--ink);font-size:14px;line-height:1.65}
.bubble-verdict{display:block;border-top:1px dashed #dacabb;padding-top:10px;font-size:11px;color:#786159}
.bubble-correct .bubble-message{background:#f1f7ec}.bubble-correct .bubble-verdict{color:#39582d}.bubble-wrong .bubble-message{background:#fff2f1}.bubble-wrong .bubble-verdict{color:#863e4d}
@media(max-width:700px){.quiz-bubble{gap:10px}.bubble-avatar{flex-basis:30px;height:30px;font-size:23px}.bubble-message{padding:14px}.quiz-bubble .reaction{font-size:13px}}

.quiz-card,#quiz-end{scroll-margin-top:115px}
@media(max-width:700px){.quiz-card,#quiz-end{scroll-margin-top:95px}}

.letter-photo-open{display:block;width:100%;padding:0;background:none;cursor:zoom-in}.letter-photo-open img{transition:filter .25s}.letter-photo-open:hover img{filter:brightness(1.04)}#letter-photo-caption{font-size:12px;line-height:1.65;margin:10px 5px 2px;color:var(--ink)}
