/* ===================================================================
   SurpriseBae – surprise player
   =================================================================== */
.page-player { --t1: #ff4d8d; --t2: #9b4dff; --tbg: linear-gradient(160deg, #ff9ac6 0%, #b18cff 100%); --tink: #2a1238; --tcard: rgba(255,255,255,.88);
  background: var(--tbg) fixed; min-height: 100vh; min-height: 100dvh; color: var(--tink); }
.theme-rose     { --t1: #ff4d8d; --t2: #b14bff; --tbg: linear-gradient(160deg, #ff8fb8 0%, #c77dff 100%); }
.theme-lavender { --t1: #8b5cf6; --t2: #ec4899; --tbg: linear-gradient(160deg, #e9d5ff 0%, #c4b5fd 50%, #f9a8d4 100%); }
.theme-peach    { --t1: #ff6a88; --t2: #ff9a8b; --tbg: linear-gradient(160deg, #ffecd2 0%, #fcb69f 100%); }
.theme-sunset   { --t1: #ff5e62; --t2: #ff9966; --tbg: linear-gradient(160deg, #ff7e5f 0%, #feb47b 60%, #ffd1a1 100%); }
.theme-midnight { --t1: #f472b6; --t2: #818cf8; --tbg: radial-gradient(circle at 20% 10%, #3b2a7a 0, transparent 50%), linear-gradient(170deg, #120c2e 0%, #2b1055 55%, #4b2a8a 100%); --tink: #fff; --tcard: rgba(30,18,64,.72); }
.theme-ocean    { --t1: #4f8bff; --t2: #a18cd1; --tbg: linear-gradient(160deg, #a1c4fd 0%, #c2e9fb 50%, #e0c3fc 100%); }
.theme-sunshine { --t1: #ff7a00; --t2: #ff4e50; --tbg: linear-gradient(160deg, #fff6b7 0%, #f9d423 60%, #ffb347 100%); }
.theme-gold     { --t1: #b8860b; --t2: #8e2de2; --tbg: linear-gradient(160deg, #fdf0c4 0%, #f6d365 45%, #c79cff 100%); }

.theme-midnight .scene-card { border-color: rgba(255,255,255,.12); }
.theme-midnight .scene-note, .theme-midnight .counter { color: rgba(255,255,255,.7); }
.theme-midnight .flip-front, .theme-midnight .quiz-opt, .theme-midnight .challenge-item, .theme-midnight .treaty-clause, .theme-midnight .bingo-cell, .theme-midnight .promise { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.15); }

.owner-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: #2a1238; color: #fff; font-size: .82rem; text-align: center; padding: 6px; }
.owner-bar a { color: #ff9ac6; }
.is-preview .player { padding-top: 10px; }

.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.fx-float { position: absolute; bottom: -50px; opacity: .8; animation: fxUp linear forwards; }
@keyframes fxUp { to { transform: translateY(-120vh) rotate(30deg); opacity: 0; } }
.fx-confetti, .fx-burst-emoji { position: absolute; width: 10px; height: 14px; border-radius: 2px; animation: fxBurst ease-out forwards; }
.fx-burst-emoji { width: auto; height: auto; font-size: 22px; }
@keyframes fxBurst { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 90vh)) rotate(var(--rot)); opacity: 0; } }

.player { position: relative; z-index: 10; max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 16px 16px 120px; }
.player-progress { display: flex; gap: 5px; margin: 6px 0 16px; }
.player-progress span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.4); transition: background .3s; }
.player-progress span.done { background: rgba(255,255,255,.95); }
.player-progress span.current { background: #fff; box-shadow: 0 0 10px #fff; }
.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.scene-enter { animation: sceneIn .55s cubic-bezier(.2,.9,.3,1.2); }
@keyframes sceneIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }

.scene-card { background: var(--tcard); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.6); border-radius: 28px; padding: 26px 20px; text-align: center; box-shadow: 0 30px 60px -30px rgba(60,10,90,.45); }
.scene-title { font-weight: 800; font-size: clamp(1.35rem, 5vw, 1.8rem); letter-spacing: -.02em; margin-bottom: 14px; background: linear-gradient(135deg, var(--t1), var(--t2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.theme-midnight .scene-title { background: linear-gradient(135deg, #ffb3d9, #c4b5fd); -webkit-background-clip: text; background-clip: text; }
.scene-text { font-size: 1.08rem; line-height: 1.6; white-space: pre-line; margin: 12px 0; }
.scene-text.big { font-size: clamp(1.15rem, 4.6vw, 1.4rem); font-weight: 500; }
.scene-note { font-size: .85rem; opacity: .7; margin: 6px 0; }
.typing::after { content: '|'; animation: blink 1s infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.counter { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .6; margin-bottom: 8px; }
.big-emoji { font-size: 3.4rem; }

.sb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 99px; padding: 12px 24px; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s; margin: 6px 4px; font-family: inherit; }
.sb-btn:active { transform: scale(.96); }
.sb-btn-primary { background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; box-shadow: 0 12px 26px -12px var(--t1); }
.sb-btn-primary:hover { color: #fff; transform: translateY(-2px); }
.sb-btn-primary:disabled { opacity: .45; transform: none; cursor: not-allowed; }
.sb-btn-ghost { background: rgba(255,255,255,.75); color: var(--t1); border: 1px solid rgba(0,0,0,.06); }
.sb-btn-link { background: none; color: inherit; opacity: .6; font-weight: 500; font-size: .85rem; text-decoration: underline; }

.player-nav { position: fixed; left: 0; right: 0; bottom: 78px; z-index: 30; display: flex; justify-content: space-between; max-width: 560px; margin: 0 auto; padding: 0 16px; pointer-events: none; }
.nav-btn { pointer-events: auto; border: 0; border-radius: 99px; padding: 11px 18px; background: rgba(255,255,255,.92); color: var(--t1); font-weight: 700; box-shadow: 0 10px 24px -12px rgba(0,0,0,.4); font-family: inherit; }
.nav-next { background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; padding: 11px 22px; }

/* Intro */
.scene-intro { text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.theme-peach .scene-intro, .theme-sunshine .scene-intro, .theme-gold .scene-intro, .theme-ocean .scene-intro, .theme-lavender .scene-intro { color: var(--tink); }
.intro-for { font-family: 'Caveat', cursive; font-size: 2.4rem; font-weight: 700; text-shadow: 0 2px 12px rgba(0,0,0,.12); }
.intro-text { font-size: 1.25rem; font-weight: 600; min-height: 3em; max-width: 440px; text-shadow: 0 1px 8px rgba(0,0,0,.1); }
.tap-hint { font-weight: 700; padding: 8px 18px; border-radius: 99px; background: rgba(255,255,255,.85); color: var(--t1); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.intro-obj { cursor: pointer; position: relative; outline: none; }
.intro-envelope { width: 240px; height: 160px; animation: wiggle 2.4s infinite; }
.intro-envelope.open { animation: none; }
.env-back { position: absolute; inset: 0; background: #ffd1e3; border-radius: 12px; }
.env-front { position: absolute; inset: 0; background: linear-gradient(135deg, #fff 0%, #ffe8f1 100%); clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%); border-radius: 12px; z-index: 3; box-shadow: 0 20px 40px -20px rgba(0,0,0,.4); }
.env-flap { position: absolute; top: 0; left: 0; right: 0; height: 100px; background: #ffb3cf; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .6s; z-index: 4; border-radius: 12px 12px 0 0; }
.env-letter { position: absolute; left: 14px; right: 14px; top: 14px; height: 130px; background: #fff; border-radius: 8px; z-index: 2; display: grid; place-items: center; font-size: 2.4rem; transition: transform .7s .3s; }
.intro-envelope.open .env-flap { transform: rotateX(180deg); z-index: 1; }
.intro-envelope.open .env-letter { transform: translateY(-80px); }
.intro-giftbox { width: 170px; height: 170px; animation: wiggle 2s infinite; }
.intro-giftbox.open { animation: none; }
.gift-body { position: absolute; bottom: 0; left: 10px; right: 10px; height: 120px; border-radius: 10px; background: linear-gradient(90deg, var(--t1) 0 42%, #fff 42% 58%, var(--t1) 58%); box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); }
.gift-lid { position: absolute; top: 20px; left: 0; right: 0; height: 40px; border-radius: 8px; background: linear-gradient(90deg, var(--t2) 0 42%, #fff 42% 58%, var(--t2) 58%); z-index: 2; transition: transform .7s; }
.gift-bow { position: absolute; top: -40px; left: 50%; transform: translateX(-50%); font-size: 3rem; }
.gift-pop { position: absolute; left: 50%; top: 50px; transform: translate(-50%, 0) scale(0); font-size: 4rem; transition: transform .6s .3s cubic-bezier(.3,1.6,.5,1); z-index: 1; }
.intro-giftbox.open .gift-lid { transform: translate(110px, -40px) rotate(40deg); opacity: 0; transition: transform .7s, opacity .5s .35s; }
.intro-giftbox.open .gift-pop { transform: translate(-50%, -80px) scale(1); }
.intro-heart .big-heart { font-size: 8rem; animation: beat 1.3s infinite; filter: drop-shadow(0 10px 20px rgba(0,0,0,.2)); transition: transform .5s; }
.intro-heart.open .big-heart { transform: scale(1.3); animation: none; }
@keyframes wiggle { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes beat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }

/* Reasons */
.reason-bubble { min-height: 110px; display: grid; place-items: center; padding: 20px; margin: 6px 0 10px; border-radius: 22px; font-size: 1.18rem; font-weight: 600; background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,240,247,.95)); color: #2a1238; box-shadow: inset 0 0 0 2px rgba(255,77,141,.15); }
.reason-bubble.pop { animation: popIn .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes popIn { from { transform: scale(.7) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
.all-list { text-align: left; margin-top: 10px; font-size: .92rem; }
.all-list summary { cursor: pointer; font-weight: 600; opacity: .7; text-align: center; }
.reason-list { padding-left: 1.2rem; margin-top: 10px; }
.reason-list li { margin-bottom: 6px; }

/* Flip cards */
.flip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.flip-grid.many { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 480px) { .flip-grid.many { grid-template-columns: repeat(3, 1fr); } }
.flip-card { perspective: 900px; border: 0; background: none; padding: 0; min-height: 140px; font-family: inherit; }
.flip-inner { position: relative; width: 100%; height: 100%; min-height: 140px; transition: transform .6s; transform-style: preserve-3d; }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; }
.flip-front { background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; font-weight: 700; font-size: 1.05rem; box-shadow: 0 12px 24px -14px var(--t1); }
.flip-front small { font-weight: 500; opacity: .75; font-size: .72rem; margin-top: 4px; }
.flip-back { background: #fff; color: #2a1238; transform: rotateY(180deg); font-size: .92rem; font-weight: 500; line-height: 1.4; box-shadow: inset 0 0 0 2px rgba(255,77,141,.2); }

/* Hug */
.hug-heart { position: relative; width: 170px; height: 170px; border-radius: 50%; border: 0; margin: 10px auto; display: grid; place-items: center; font-size: 4.6rem; background: radial-gradient(circle, #fff 0 55%, transparent 56%); cursor: pointer; transition: transform .1s; touch-action: none; user-select: none; -webkit-user-select: none; }
.hug-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--t1) var(--p, 0deg), rgba(255,255,255,.5) 0); -webkit-mask: radial-gradient(circle, transparent 0 60%, #000 61%); mask: radial-gradient(circle, transparent 0 60%, #000 61%); }
.hug-heart span { position: relative; z-index: 2; animation: beat 1.4s infinite; }
.hug-heart.holding span { animation: shake .2s infinite; }
.hug-heart.done { background: radial-gradient(circle, #fff 0 55%, transparent 56%); }
.hug-heart.done .hug-ring { background: conic-gradient(var(--t1) 360deg, transparent 0); }
@keyframes shake { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* Scratch */
.scratch-wrap { user-select: none; -webkit-user-select: none; position: relative; min-height: 170px; border-radius: 20px; overflow: hidden; margin: 8px 0; background: #fff; }
.scratch-hidden { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; font-size: 1.15rem; font-weight: 700; color: #2a1238; background: linear-gradient(135deg, #fff, #fff0f7); }
.scratch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .6s; }
.scratch-canvas.gone { opacity: 0; pointer-events: none; }

/* Flowers */
.bouquet { display: flex; justify-content: center; align-items: flex-end; height: 150px; margin: 10px 0; }
.bouquet span { font-size: 3rem; margin: 0 -8px; transform-origin: bottom center; transform: rotate(var(--r)) scale(0); animation: bloom .7s forwards cubic-bezier(.3,1.6,.5,1); }
.bouquet.candle span { font-size: 2.6rem; margin: 0 4px; }
.bouquet.candle span:nth-child(1), .bouquet.candle span:nth-child(5) { animation: bloom .7s forwards, flicker 1.2s 1s infinite; }
@keyframes bloom { to { transform: rotate(var(--r)) scale(1); } }
@keyframes flicker { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.4) drop-shadow(0 0 10px #ffd166); } }

/* Letter */
.letter-env { width: 100%; max-width: 300px; aspect-ratio: 3/2; margin: 10px auto; border: 0; border-radius: 16px; background: linear-gradient(160deg, #fff, #ffe3ef); box-shadow: 0 20px 40px -20px rgba(0,0,0,.4); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #6b5878; font-family: inherit; transition: transform .5s, opacity .5s; }
.letter-env .seal { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--t1), var(--t2)); display: grid; place-items: center; font-size: 1.8rem; box-shadow: 0 6px 14px -6px var(--t1); animation: beat 1.6s infinite; }
.letter-env.opening { transform: scale(1.1) rotate(-4deg); opacity: 0; }
.letter-paper { text-align: left; background: #fffdf7; color: #3b2a1a; border-radius: 14px; padding: 22px 20px; font-family: 'Caveat', cursive; font-size: 1.45rem; line-height: 1.35; box-shadow: 0 16px 30px -18px rgba(0,0,0,.4); background-image: repeating-linear-gradient(transparent 0 33px, rgba(155,77,255,.12) 33px 34px); }
.letter-paper.unfold { animation: unfold .7s ease; transform-origin: top; }
@keyframes unfold { from { transform: scaleY(.1); opacity: 0; } to { transform: none; opacity: 1; } }
.letter-greeting { font-weight: 700; margin-bottom: 8px; }
.letter-sign { text-align: right; font-weight: 700; margin-top: 10px; }

/* Treaty */
.treaty { position: relative; overflow: hidden; }
.treaty-list { text-align: left; margin: 10px 0; }
.treaty-clause, .challenge-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.7); margin-bottom: 8px; cursor: pointer; font-size: .95rem; border: 1px solid rgba(0,0,0,.05); }
.treaty-clause input, .challenge-item input { margin-top: 4px; accent-color: var(--t1); width: 18px; height: 18px; flex-shrink: 0; }
.treaty-stamp { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg) scale(3); opacity: 0; border: 5px solid #e11d48; color: #e11d48; font-weight: 900; font-size: 2rem; padding: 6px 18px; border-radius: 12px; pointer-events: none; transition: all .4s cubic-bezier(.3,1.6,.5,1); }
.treaty-stamp.show { opacity: .85; transform: translate(-50%, -50%) rotate(-18deg) scale(1); }
.treaty-sig { display: flex; justify-content: space-around; font-family: 'Caveat', cursive; font-size: 1.4rem; margin-top: 10px; }

/* Countdown */
.count-box { display: flex; justify-content: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.count-unit { min-width: 70px; padding: 12px 8px; border-radius: 16px; background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; }
.count-unit strong { display: block; font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.count-unit span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.count-big { font-size: 6rem; font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--t1), var(--t2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.count-big.tick { animation: popIn .5s; }
.count-big.done { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: inherit; animation: popIn .5s; }

/* Quiz */
.quiz-q { font-size: 1.2rem; font-weight: 700; margin: 6px 0 14px; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt { border: 1.5px solid rgba(0,0,0,.08); background: #fff; color: #2a1238; border-radius: 16px; padding: 12px; font-weight: 600; font-family: inherit; transition: all .15s; }
.quiz-opt:hover:not(:disabled) { border-color: var(--t1); }
.quiz-opt.picked { background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; border-color: transparent; }
.quiz-opt:disabled:not(.picked) { opacity: .5; }
.quiz-reply { margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(255,240,247,.95); color: #2a1238; font-weight: 600; animation: popIn .4s; }

/* Yes / No */
.yn-q { font-size: 1.45rem; font-weight: 800; margin: 10px 0; }
.yn-zone { position: relative; height: 200px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.yn-yes { transition: transform .25s; z-index: 2; }
.yn-no { border: 0; border-radius: 99px; padding: 10px 20px; background: #fff; color: #6b5878; font-weight: 600; transition: left .2s, top .2s; font-family: inherit; z-index: 3; }
.yn-result { font-size: 1.35rem; font-weight: 800; padding: 20px; animation: popIn .5s; }

/* Gallery */
.polaroid-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 6px; }
.polaroid { border: 0; background: #fff; padding: 10px 10px 14px; border-radius: 6px; box-shadow: 0 14px 26px -14px rgba(0,0,0,.45); transform: rotate(var(--r)); transition: transform .3s; opacity: 0; animation: dropIn .6s forwards; font-family: inherit; }
.polaroid.zoom { transform: rotate(0) scale(1.08); z-index: 2; }
.polaroid-img { aspect-ratio: 1; display: grid; place-items: center; font-size: 3rem; border-radius: 3px; background: linear-gradient(135deg, #ffe3ef, #e9dcff); }
.polaroid-cap { font-family: 'Caveat', cursive; font-size: 1.15rem; color: #3b2a1a; margin-top: 8px; line-height: 1.15; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-30px) rotate(0); } to { opacity: 1; transform: rotate(var(--r)); } }

/* Promises / challenge */
.promise-list { text-align: left; margin: 8px 0; }
.promise { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.75); margin-bottom: 8px; animation: popIn .45s; font-weight: 500; }
.pinky { font-size: 1.4rem; }
.challenge-list { text-align: left; }
.challenge-item .check { display: none; }
.challenge-item:has(input:checked) { background: rgba(220,252,231,.9); text-decoration: line-through; opacity: .85; color: #14532d; }
.challenge-done { margin-top: 10px; font-weight: 800; font-size: 1.15rem; animation: popIn .5s; }

/* Music scene */
.vinyl { width: 170px; height: 170px; border-radius: 50%; margin: 10px auto; background: repeating-radial-gradient(circle, #1a1a1a 0 2px, #2b2b2b 2px 4px); display: grid; place-items: center; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.vinyl.spin { animation: spin 3s linear infinite; }
.vinyl-label { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; display: grid; place-items: center; font-size: 1.4rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.song-name { font-weight: 700; }

/* Meter */
.meter-track { height: 26px; border-radius: 99px; background: rgba(255,255,255,.6); overflow: visible; margin: 18px 0 8px; position: relative; box-shadow: inset 0 2px 6px rgba(0,0,0,.1); }
.meter-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--t2), var(--t1)); transition: width .1s; }
.meter-fill.overflow { width: 115% !important; animation: overflow 1s infinite alternate; }
@keyframes overflow { to { width: 125%; filter: brightness(1.2); } }
.meter-range { width: 100%; accent-color: var(--t1); }
.meter-label { font-size: 1.3rem; font-weight: 800; margin-top: 8px; }

/* Bingo */
.bingo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.bingo-cell { aspect-ratio: 1; border: 1.5px solid rgba(0,0,0,.08); border-radius: 14px; background: #fff; color: #2a1238; font-size: .76rem; font-weight: 600; padding: 6px; line-height: 1.2; font-family: inherit; transition: all .15s; }
.bingo-cell.marked { background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; transform: scale(.96); }
.bingo-banner { font-size: 1.3rem; font-weight: 900; animation: popIn .5s; }

/* Cake */
.cake { position: relative; width: 220px; margin: 30px auto 10px; }
.candles { display: flex; justify-content: center; gap: 16px; position: relative; z-index: 3; margin-bottom: -4px; }
.candle { width: 12px; height: 46px; border: 0; padding: 0; border-radius: 4px; background: repeating-linear-gradient(45deg, #fff 0 6px, #ff9ac6 6px 12px); position: relative; cursor: pointer; }
.flame { position: absolute; left: 50%; top: -24px; width: 14px; height: 22px; transform: translateX(-50%); background: radial-gradient(circle at 50% 70%, #fff6a5, #ffb703 60%, #fb8500); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; animation: flame .4s infinite alternate; box-shadow: 0 0 18px #ffb703; }
.candle.out .flame { animation: smoke .8s forwards; }
@keyframes flame { to { transform: translateX(-50%) scale(1.1, .95) rotate(3deg); } }
@keyframes smoke { to { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(.3); } }
.cake-top { height: 18px; border-radius: 40px 40px 0 0; background: #fff; }
.cake-mid { height: 50px; background: linear-gradient(var(--t1), var(--t1)); position: relative; }
.cake-mid::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: radial-gradient(circle at 10px 0, #fff 10px, transparent 11px) 0 0/20px 14px repeat-x; }
.cake-bot { height: 50px; background: var(--t2); border-radius: 0 0 8px 8px; }
.cake-plate { height: 10px; margin: 0 -20px; border-radius: 99px; background: rgba(255,255,255,.9); }

/* Final */
.final .final-heart { font-size: 4rem; animation: beat 1.3s infinite; }
.final-text { font-weight: 600; }
.final-ending { font-style: italic; opacity: .8; }
.final-ps { font-size: .95rem; opacity: .8; }
.final-sign { font-family: 'Caveat', cursive; font-size: 1.8rem; font-weight: 700; margin-top: 6px; }
.final-actions { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.made-with { font-size: .75rem; opacity: .5; margin-top: 14px; }
.report-link { border: 0; background: none; color: inherit; opacity: .4; font-size: .72rem; text-decoration: underline; margin-top: 4px; }

/* Music pill */
.music-pill { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 8px; width: min(420px, calc(100% - 24px)); padding: 8px 10px; border-radius: 99px; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); box-shadow: 0 16px 34px -16px rgba(40,0,60,.5); color: #2a1238; }
.mp-art { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--t1), var(--t2)); display: grid; place-items: center; color: #fff; overflow: hidden; flex-shrink: 0; }
.mp-art img { width: 100%; height: 100%; object-fit: cover; }
.music-pill.is-playing .mp-art { animation: spin 4s linear infinite; }
.mp-info { flex: 1; min-width: 0; }
.mp-title { font-weight: 700; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-artist { font-size: .72rem; opacity: .6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #f6eefc; color: var(--t1); font-size: 1.1rem; flex-shrink: 0; }
#mpPlay { background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; }
.embed-host { position: fixed; z-index: 49; left: 50%; bottom: 76px; transform: translateX(-50%); width: min(420px, calc(100% - 24px)); border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 16px 34px -16px rgba(0,0,0,.6); }
.embed-host.offscreen { left: -9999px; transform: none; }
.embed-host iframe { display: block; width: 100%; border: 0; }

/* Lock screen */
.lock-screen { background: var(--tbg); min-height: 100vh; }

/* In the wizard the preview iframe is small: tighten spacing */
@media (max-height: 640px) { .player { padding-top: 8px; } .scene-card { padding: 18px 14px; } .hug-heart { width: 140px; height: 140px; } }

/* ---- v1.1: photos, voice, mood, picker, timeline, replies ---- */
.polaroid-img.has-photo { background: #000; overflow: hidden; padding: 0; }
.polaroid-img.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.voice-avatar { width: 96px; height: 96px; margin: 6px auto 4px; border-radius: 50%; display: grid; place-items: center; font-size: 2.6rem; background: linear-gradient(135deg, var(--t1), var(--t2)); box-shadow: 0 0 0 10px rgba(255,255,255,.35); animation: beat 1.8s infinite; }
.voice-waves { display: flex; align-items: center; justify-content: center; gap: 3px; height: 54px; margin: 10px 0; }
.voice-waves span { width: 4px; height: 10px; border-radius: 4px; background: linear-gradient(var(--t1), var(--t2)); opacity: .5; }
.voice-waves.on span { animation: wave .8s ease-in-out infinite alternate; opacity: 1; }
@keyframes wave { to { height: 46px; } }
.mood-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 10px 0; }
.mood-btn, .picker-item { border: 1.5px solid rgba(0,0,0,.07); background: #fff; color: #2a1238; border-radius: 18px; padding: 14px 10px; font-weight: 700; font-family: inherit; font-size: 1rem; transition: all .15s; }
.mood-btn.picked, .picker-item.picked { background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; border-color: transparent; transform: scale(1.03); }
.picker-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0 6px; }
.picker-item { font-size: .9rem; font-weight: 600; text-align: left; }
.picker-done h3 { font-weight: 800; font-size: 1.3rem; }
.timeline { position: relative; text-align: left; padding-left: 28px; margin: 10px 0; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 3px; border-radius: 3px; background: linear-gradient(var(--t1), var(--t2)); }
.tl-item { position: relative; margin-bottom: 16px; opacity: 0; animation: dropIn .6s forwards; --r: 0deg; }
.tl-dot { position: absolute; left: -28px; top: 6px; width: 25px; height: 25px; border-radius: 50%; background: #fff; border: 3px solid var(--t1); display: grid; place-items: center; font-size: .8rem; }
.tl-card { background: #fff; color: #2a1238; border-radius: 16px; padding: 10px 12px; box-shadow: 0 10px 22px -16px rgba(0,0,0,.4); }
.tl-card .polaroid-img { aspect-ratio: 4/3; border-radius: 10px; margin-bottom: 8px; }
.tl-date { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--t1); }
.tl-cap { font-family: 'Caveat', cursive; font-size: 1.3rem; line-height: 1.15; }
.reply-box { margin: 16px 0 6px; padding: 14px; border-radius: 20px; background: rgba(255,255,255,.7); text-align: left; }
.theme-midnight .reply-box { background: rgba(255,255,255,.08); }
.reply-label { font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.reply-input { width: 100%; border: 1.5px solid rgba(0,0,0,.08); border-radius: 14px; padding: 10px 12px; font-family: inherit; resize: vertical; background: #fff; color: #2a1238; }
.reply-input:focus { outline: none; border-color: var(--t1); }
.reply-box .sb-btn { width: 100%; margin: 8px 0 0; }
.reply-sent { font-weight: 700; text-align: center; padding: 8px; }
.lock-card .count-box .count-unit { min-width: 64px; }
.quiz-opt.correct { background: #16a34a; color: #fff; border-color: #16a34a; opacity: 1 !important; }
.quiz-opt.wrong { background: #e11d48; color: #fff; border-color: #e11d48; opacity: 1 !important; }
.quiz-opt.shake { animation: shake .12s 4; }
.quiz-reply.ok { background: #dcfce7; color: #14532d; }
.quiz-reply.bad { background: #ffe4e6; color: #881337; }

/* ---- v1.2: cozy theme (simple, warm, not decorative) ---- */
.theme-cozy { --t1: #e2725b; --t2: #d0806a; --tbg: #fbf3ee; --tink: #3b2a24; --tcard: #ffffff; }
.theme-cozy .scene-card { backdrop-filter: none; -webkit-backdrop-filter: none; border: 1px solid #f0e2da; box-shadow: 0 8px 24px -18px rgba(80,40,20,.35); border-radius: 22px; }
.theme-cozy .scene-title { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #3b2a24; font-size: 1.3rem; }
.theme-cozy .scene-intro, .theme-cozy .intro-text { color: #3b2a24; text-shadow: none; }
.theme-cozy .intro-for { font-family: 'Outfit', sans-serif; font-size: 1.6rem; font-weight: 700; text-shadow: none; }
.theme-cozy .player-progress span { background: #f0dcd2; }
.theme-cozy .player-progress span.done, .theme-cozy .player-progress span.current { background: #e2725b; box-shadow: none; }
.theme-cozy .sb-btn-primary { background: #e2725b; box-shadow: none; }
.theme-cozy .nav-next { background: #e2725b; }
.theme-cozy .tap-hint { color: #e2725b; background: #fff; }
.theme-cozy .flip-front, .theme-cozy .count-unit, .theme-cozy .mood-btn.picked, .theme-cozy .picker-item.picked, .theme-cozy .bingo-cell.marked { background: #e2725b; }
.theme-cozy .letter-paper, .theme-cozy .polaroid-cap, .theme-cozy .final-sign { font-family: 'Outfit', sans-serif; font-size: 1.05rem; }
.theme-cozy .letter-paper { background-image: none; line-height: 1.6; }

/* ---- chat ---- */
.chat-card { padding: 0; overflow: hidden; text-align: left; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #075e54; color: #fff; }
.theme-cozy .chat-head { background: #3b2a24; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: rgba(255,255,255,.25); }
.chat-name { font-weight: 700; line-height: 1.1; }
.chat-status { font-size: .75rem; opacity: .85; }
.chat-thread { background: #efeae2; padding: 14px 12px; min-height: 260px; max-height: 56vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; }
.theme-cozy .chat-thread { background: #f6ede7; }
.bubble { max-width: 82%; padding: 8px 10px 6px; border-radius: 12px; font-size: .98rem; line-height: 1.35; color: #111; position: relative; animation: bubbleIn .25s ease-out; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.bubble.them { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 4px; }
.bubble-text { white-space: pre-line; }
.bubble-time { display: block; text-align: right; font-size: .66rem; color: #667781; margin-top: 2px; }
.typing-dots { display: flex; gap: 4px; padding: 12px 14px; }
.typing-dots span { width: 7px; height: 7px; border-radius: 50%; background: #9aa5ab; animation: dot 1s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .15s; } .typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.chat-footer { padding: 10px 12px; background: #fff; min-height: 10px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chat-chip { border: 1.5px solid #25d366; background: #fff; color: #075e54; border-radius: 99px; padding: 8px 14px; font-weight: 700; font-family: inherit; font-size: .9rem; }
.theme-cozy .chat-chip { border-color: #e2725b; color: #b4533f; }
.chat-chip:active { transform: scale(.96); }
.chat-actions { display: flex; flex-wrap: wrap; justify-content: center; }

/* ---- reveal ---- */
.reveal-box { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 10px auto; font-family: inherit; }
.reveal-gift { font-size: 5.5rem; animation: wiggle 1.2s infinite; filter: drop-shadow(0 10px 18px rgba(0,0,0,.18)); }
.reveal-tap { font-weight: 700; color: var(--t1); }
.reveal-secret { font-size: 1.3rem; font-weight: 800; padding: 18px 14px; border-radius: 18px; background: #fff7ed; border: 2px dashed var(--t1); margin: 8px 0 12px; animation: popIn .5s; color: #3b2a24; }

/* ---- coupons ---- */
.coupon-list { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.coupon { position: relative; background: #fffaf3; border: 2px dashed var(--t1); border-radius: 14px; padding: 12px 14px; color: #3b2a24; }
.coupon::before, .coupon::after { content: ''; position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--tcard); transform: translateY(-50%); }
.coupon::before { left: -9px; } .coupon::after { right: -9px; }
.coupon-no { font-size: .7rem; font-weight: 800; letter-spacing: .1em; color: var(--t1); }
.coupon-text { font-weight: 800; font-size: 1.05rem; }
.coupon-by { font-size: .72rem; opacity: .6; }
.coupon-btn { margin-top: 8px; border: 0; border-radius: 99px; padding: 6px 16px; font-weight: 700; background: var(--t1); color: #fff; font-family: inherit; }
.coupon-btn:disabled { background: #22c55e; }
.coupon.used { opacity: .7; }
