@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&family=IM+Fell+English+SC&family=Quicksand:wght@500;600;700&family=UnifrakturCook:wght@700&display=swap');

:root {
  --ink: #2b1b16;
  --ink-soft: #72574b;
  --espresso: #20130f;
  --brown: #5b3428;
  --brown-deep: #3c211b;
  --walnut: #7b4936;
  --parchment: #ead5ad;
  --paper: #f7ead0;
  --paper-deep: #dfc08f;
  --red: #8d2428;
  --red-deep: #5d151c;
  --gold: #c39a59;
  --gold-light: #ead09a;
  --line: rgba(91, 52, 40, 0.22);
  --shadow: 0 28px 80px rgba(27, 13, 9, 0.36);
  --display: 'IM Fell English SC', 'Cormorant Garamond', Georgia, serif;
  --headline: 'Cormorant Garamond', Georgia, serif;
  --body: 'DM Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--espresso);
  font-family: var(--body);
}
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 14% 18%, rgba(174, 111, 62, .28), transparent 25%),
    radial-gradient(circle at 82% 72%, rgba(97, 42, 27, .35), transparent 30%),
    linear-gradient(135deg, #6c4228 0%, #3c2118 48%, #21120e 100%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: .22;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 1px, transparent 1px 5px);
  pointer-events: none;
}
.grain { position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: .05; mix-blend-mode: screen; 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='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E"); }
.sparkle-field { position: fixed; inset: 0; pointer-events: none; z-index: -1; color: var(--gold-light); opacity: .3; }
.sparkle-field span { position: absolute; font: 18px var(--headline); animation: twinkle 5s ease-in-out infinite; }
.sparkle-field span:nth-child(1) { top: 11%; left: 7%; } .sparkle-field span:nth-child(2) { top: 24%; left: 91%; animation-delay: 1s; }
.sparkle-field span:nth-child(3) { top: 68%; left: 5%; animation-delay: 2.1s; } .sparkle-field span:nth-child(4) { top: 78%; left: 89%; animation-delay: .6s; }
.sparkle-field span:nth-child(5) { top: 42%; left: 95%; animation-delay: 3s; } .sparkle-field span:nth-child(6) { top: 55%; left: 12%; animation-delay: 1.5s; }
.sparkle-field span:nth-child(7) { top: 8%; left: 52%; animation-delay: 2.7s; } .sparkle-field span:nth-child(8) { top: 90%; left: 39%; animation-delay: 3.6s; }
@keyframes twinkle { 0%,100% { opacity: .18; transform: scale(.8) rotate(0deg); } 50% { opacity: .85; transform: scale(1.2) rotate(15deg); } }

.site-shell { width: min(100%, 1520px); margin: 0 auto; overflow: visible; }
.login-stage, .treasury-stage { position: relative; min-height: 100vh; padding: clamp(26px, 5vw, 72px) clamp(20px, 7vw, 112px); }
.login-stage { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(32px, 8vw, 130px); isolation: isolate; }
.login-stage::before { content: ''; position: absolute; inset: 18px; z-index: -1; background-color: #dec08b; background-image: radial-gradient(circle at 20% 16%, rgba(255,244,208,.45), transparent 23%), radial-gradient(circle at 75% 80%, rgba(125,70,37,.12), transparent 27%), repeating-linear-gradient(0deg, rgba(91,52,40,.06) 0 1px, transparent 1px 5px), repeating-linear-gradient(90deg, rgba(255,255,255,.11) 0 1px, transparent 1px 7px), linear-gradient(115deg, #e9d2a5 0%, #d7b277 52%, #ebd2a2 100%); box-shadow: 0 25px 35px rgba(28,13,9,.32), inset 0 0 0 1px rgba(91,52,40,.18); clip-path: polygon(0.5% 1%, 4% 0%, 8% 1.2%, 13% .2%, 18% 1.1%, 24% .4%, 30% 1.2%, 37% .2%, 44% 1%, 51% .3%, 58% 1.1%, 65% .1%, 72% 1%, 79% .3%, 86% 1.2%, 93% .2%, 99.5% 1%, 99% 8%, 100% 15%, 99% 22%, 100% 29%, 99.2% 37%, 100% 45%, 99% 53%, 100% 61%, 99.2% 69%, 100% 77%, 99% 84%, 100% 92%, 99% 99%, 93% 98.8%, 86% 100%, 79% 98.9%, 72% 99.8%, 65% 98.8%, 58% 100%, 51% 98.9%, 44% 99.8%, 37% 98.9%, 30% 100%, 24% 98.8%, 18% 99.8%, 12% 98.9%, 6% 100%, .5% 99%, 1% 92%, 0% 85%, 1% 77%, 0% 69%, 1% 61%, 0% 53%, 1% 45%, 0% 37%, 1% 29%, 0% 21%, 1% 13%); pointer-events: none; }
.login-stage::after { content: '✦'; position: absolute; right: 6%; bottom: 7%; color: var(--red); font: 54px var(--headline); opacity: .34; }
.login-copy { max-width: 690px; padding-top: 20px; z-index: 1; }
.eyebrow { margin: 0 0 18px; color: var(--gold); font: 11px var(--display); letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--headline); font-weight: 500; letter-spacing: -.04em; }
h1 { margin-bottom: 23px; color: #f1d9aa; font-size: clamp(62px, 8vw, 122px); line-height: .79; }
h1 span, h2 span { color: #bb5b4d; font-style: italic; }
.lede { max-width: 500px; margin: 0 0 28px; color: rgba(247,234,208,.74); font: 19px/1.42 var(--headline); }
.rule { display: flex; align-items: center; gap: 18px; max-width: 280px; margin: 0 0 22px; color: var(--gold); font-size: 20px; }
.rule::before, .rule::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold)); }
.rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.invitation { margin: 0; color: rgba(247,234,208,.7); font: 16px/1.5 var(--headline); }
.invitation strong { color: #f1d9aa; font-weight: 600; } .invitation em { color: rgba(247,234,208,.45); font-size: 14px; }

.key-card { position: relative; width: min(100%, 390px); justify-self: end; padding: 34px 34px 30px; color: var(--ink); background: linear-gradient(145deg, #f0dcb5, #d5ae72); box-shadow: 18px 22px 0 rgba(20,9,6,.25), var(--shadow); transform: rotate(2deg); z-index: 2; }
.key-card::before { content: ''; position: absolute; inset: 12px; border: 1px solid rgba(91,52,40,.35); pointer-events: none; }
.key-card::after { content: '❦'; position: absolute; right: 20px; bottom: 10px; color: rgba(91,52,40,.35); font-size: 24px; }
.key-card__topline { display: flex; justify-content: space-between; color: var(--brown); font: 10px var(--display); letter-spacing: .12em; }
.seal { display: grid; place-items: center; color: #efcda4; background: radial-gradient(circle at 35% 25%, #b34345, var(--red-deep)); border-radius: 50%; box-shadow: 3px 6px 0 rgba(65,20,17,.2); }
.seal--small { width: 58px; height: 58px; margin: 22px auto 28px; font-size: 24px; transform-origin: center; animation: registerHeartbeat 2.4s ease-in-out infinite; }
@keyframes registerHeartbeat { 0%, 34%, 100% { transform: scale(1); box-shadow: 0 0 0 5px rgba(229,183,95,.08), 3px 6px 0 rgba(0,0,0,.3), 0 0 22px rgba(196,69,90,.2); } 10% { transform: scale(1.08); box-shadow: 0 0 0 7px rgba(229,183,95,.13), 3px 6px 0 rgba(0,0,0,.3), 0 0 30px rgba(196,69,90,.42); } 18% { transform: scale(1); } 24% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(229,183,95,.1), 3px 6px 0 rgba(0,0,0,.3), 0 0 26px rgba(196,69,90,.32); } }
.key-card label { display: block; margin: 0 0 7px 2px; color: var(--brown-deep); font: 13px var(--display); letter-spacing: .05em; }
.key-card input { width: 100%; margin: 0 0 18px; padding: 13px 13px 11px; border: 0; border-bottom: 1px solid rgba(91,52,40,.42); outline: none; color: var(--ink); background: rgba(255,242,216,.46); font: 16px var(--headline); }
.key-card input:focus { border-color: var(--red); box-shadow: 0 2px 0 var(--red); }
.key-card input::placeholder { color: rgba(91,52,40,.48); }
.password-wrap { position: relative; } .password-wrap input { padding-right: 44px; }
.peek { position: absolute; right: 9px; top: 4px; border: 0; color: var(--brown); background: none; opacity: .65; }
.wax-button { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-top: 5px; padding: 14px 15px 13px 18px; border: 1px solid var(--red-deep); color: #f7ead0; background: linear-gradient(115deg, var(--red-deep), var(--red)); font: 13px var(--display); letter-spacing: .1em; text-transform: uppercase; box-shadow: 4px 5px 0 rgba(93,21,28,.23); transition: transform .2s, box-shadow .2s; }
.wax-button:hover { transform: translateY(-2px); box-shadow: 4px 7px 0 rgba(93,21,28,.23); }
.wax-button b { font: 22px var(--headline); line-height: 0; }
.form-hint { min-height: 20px; margin: 15px 0 0; color: rgba(91,52,40,.68); font: 12px/1.4 var(--body); }
.form-hint.error { color: var(--red-deep); animation: shake .35s ease; } @keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.login-footer { position: absolute; left: 8%; right: 8%; bottom: 42px; display: flex; justify-content: space-between; color: rgba(234,208,154,.5); font: 10px var(--display); letter-spacing: .12em; text-transform: uppercase; }
.login-stage .eyebrow { color: var(--red); }
.login-stage h1 { color: var(--brown-deep); }
.login-stage h1 span { color: var(--red); }
.login-stage .lede { color: rgba(91,52,40,.78); }
.login-stage .rule { color: var(--brown); }
.login-stage .rule::before { background: linear-gradient(90deg, transparent, var(--brown)); }
.login-stage .rule::after { background: linear-gradient(90deg, var(--brown), transparent); }
.login-stage .invitation { color: rgba(91,52,40,.78); }
.login-stage .invitation strong { color: var(--red-deep); }
.login-stage .invitation em { color: rgba(91,52,40,.58); }
.login-stage .login-footer { color: rgba(91,52,40,.65); }
.constellation { position: relative; display: inline-block; width: 105px; height: 30px; color: var(--gold); }
.constellation-star { position: absolute; z-index: 2; font: 11px var(--headline); text-shadow: 0 0 8px rgba(229,183,95,.7); animation: constellationPulse 3.2s ease-in-out infinite; }
.constellation-star--one { left: 3px; top: 12px; } .constellation-star--two { left: 29px; top: 3px; animation-delay: .6s; } .constellation-star--three { left: 54px; top: 17px; animation-delay: 1.2s; } .constellation-star--four { left: 88px; top: 6px; animation-delay: 1.8s; }
.constellation-line { position: absolute; z-index: 1; height: 1px; background: rgba(229,183,95,.55); transform-origin: left center; }
.constellation-line--one { left: 11px; top: 16px; width: 27px; transform: rotate(-18deg); } .constellation-line--two { left: 38px; top: 9px; width: 29px; transform: rotate(19deg); } .constellation-line--three { left: 62px; top: 19px; width: 32px; transform: rotate(-22deg); }
@keyframes constellationPulse { 0%,100% { opacity: .55; transform: scale(.86); } 50% { opacity: 1; transform: scale(1.18); } }

.treasury-stage { padding-top: clamp(52px, 7vw, 95px); background: radial-gradient(circle at 50% 20%, rgba(153,78,47,.15), transparent 36%); }
.treasury-stage:not(.archive-unlocked) { min-height: 100svh; height: 100svh; overflow: hidden; }
.treasury-stage:not(.archive-unlocked) .archive-layout, .treasury-stage:not(.archive-unlocked) .treasury-footer { display: none; }
.treasury-stage.archive-unlocked { min-height: 100vh; }
.treasury-stage.archive-unlocked .treasury-header, .treasury-stage.archive-unlocked .box-scene { display: none; }
.treasury-stage.archive-unlocked .archive-layout { animation: archivePageIn .65s cubic-bezier(.2,.85,.25,1) both; }
@keyframes archivePageIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.treasury-header { display: flex; align-items: flex-end; justify-content: space-between; max-width: 1140px; margin: 0 auto; }
h2 { margin: 0; color: #f1d9aa; font-size: clamp(45px, 6vw, 84px); line-height: .88; }
.header-note { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; color: rgba(247,234,208,.62); }
.header-note__icon { display: grid; place-items: center; width: 37px; height: 37px; color: var(--gold-light); border: 1px solid rgba(234,208,154,.5); font: 21px var(--headline); transform: rotate(-8deg); }
.header-note p { margin: 0; font: 14px/1.15 var(--headline); } .header-note em { color: rgba(247,234,208,.4); font-size: 12px; }
.box-scene { position: relative; max-width: 950px; min-height: 430px; margin: 54px auto 34px; display: grid; place-items: center; perspective: 1200px; }
.box-glow { position: absolute; top: 30px; width: 410px; height: 310px; border-radius: 50%; background: rgba(203,157,74,.22); filter: blur(38px); opacity: 0; transition: opacity 1s; }
.box-scene.is-open .box-glow { opacity: 1; }
.box-particles { position: absolute; inset: 4% 12% 7%; z-index: 1; pointer-events: none; transition: opacity .8s ease, transform 1s ease; }
.box-particle { position: absolute; left: var(--x); top: var(--y); width: var(--size); height: var(--size); border-radius: 50%; background: var(--color); box-shadow: 0 0 6px var(--color), 0 0 16px var(--color); opacity: 0; animation: chestParticle var(--duration) ease-in-out var(--delay) infinite; }
.box-scene.is-opening .box-particles { opacity: 0; transform: scale(.72); }
@keyframes chestParticle { 0%,100% { opacity: 0; transform: translate3d(0, 12px, 0) scale(.45); } 18%,72% { opacity: .9; } 50% { transform: translate3d(var(--drift), -18px, 0) scale(1); } 84% { opacity: 0; } }
.treasure-box { position: relative; width: min(76vw, 540px); height: 315px; transform-style: preserve-3d; }
.box-lid { position: absolute; inset: 0 0 auto; z-index: 4; width: 100%; height: 178px; border: 0; color: var(--gold-light); background: linear-gradient(140deg, #9c563b 0%, #713727 48%, #47231e 100%); box-shadow: inset 0 0 0 8px rgba(45,20,14,.22), inset 0 0 0 11px rgba(191,135,68,.28), 0 17px 0 #2a1511, 0 25px 28px rgba(16,7,5,.5); transform-origin: 50% 100%; transform: rotateX(0deg) translateZ(12px); backface-visibility: hidden; will-change: transform, box-shadow; transition: transform 1.25s cubic-bezier(.22,.88,.28,1), box-shadow 1.25s cubic-bezier(.22,.88,.28,1); }
.box-lid::before { content: ''; position: absolute; inset: 18px; border: 1px solid rgba(234,208,154,.38); border-radius: 2px; }
.box-lid:hover { filter: brightness(1.1); }
.box-scene.is-open .box-lid { transform: rotateX(78deg) translateZ(34px) translateY(-7px); box-shadow: inset 0 0 0 8px rgba(45,20,14,.22), inset 0 0 0 11px rgba(191,135,68,.28), 0 5px 0 #2a1511, 0 11px 21px rgba(16,7,5,.3); }
.lid-ribbon { position: absolute; display: block; background: linear-gradient(90deg, #4f151a, #a22d32, #4f151a); box-shadow: inset 0 0 0 1px rgba(244,195,127,.15); }
.lid-ribbon--vertical { width: 44px; top: 0; bottom: 0; left: calc(50% - 22px); } .lid-ribbon--horizontal { left: 0; right: 0; height: 32px; top: calc(50% - 16px); }
.lid-plaque { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; display: grid; place-items: center; width: 94px; height: 54px; border: 2px solid var(--gold); color: var(--gold-light); background: #653225; box-shadow: 0 4px 0 rgba(42,21,17,.35); font: 19px var(--display); letter-spacing: .14em; }
.lid-hinge { position: absolute; bottom: -11px; width: 21px; height: 17px; background: var(--gold); border-radius: 2px; } .lid-hinge--one { left: 22%; } .lid-hinge--two { right: 22%; }
.box-base { position: absolute; inset: 85px 0 0; overflow: hidden; background: linear-gradient(145deg, #7e402d, #4a241e 66%); box-shadow: inset 0 0 0 8px rgba(45,20,14,.26), inset 0 0 0 11px rgba(191,135,68,.22), 0 26px 27px rgba(16,7,5,.48); }
.box-base::after { content: ''; position: absolute; inset: 0; opacity: .22; background: repeating-linear-gradient(80deg, transparent 0 23px, #bb7650 24px 26px, transparent 27px 57px); }
.box-inner-glow { position: absolute; inset: 15px 16px auto; height: 115px; z-index: 1; background: radial-gradient(ellipse, rgba(243,190,83,.68), rgba(88,44,22,.6) 62%, transparent 70%); opacity: 0; transition: opacity .8s .5s; }
.box-scene.is-open .box-inner-glow { opacity: 1; }
.box-compartment { position: absolute; top: 24px; left: 50%; z-index: 2; width: 66%; transform: translateX(-50%); text-align: center; }
.box-label { margin: 0 0 5px; color: var(--gold-light); font: 11px var(--display); letter-spacing: .17em; }
.box-count { margin: 0; color: rgba(247,234,208,.7); font: 15px var(--headline); } .box-count span { color: #f0c877; font-size: 29px; font-weight: 600; } .box-count b { margin: 0 5px; color: var(--gold); font-weight: 400; }
.box-folders { display: flex; justify-content: center; gap: 4px; margin: 18px auto 0; transform: rotate(-3deg); }
.box-folders i { display: block; width: 70px; height: 74px; background: var(--red); border: 2px solid rgba(230,174,91,.6); box-shadow: 4px 4px 0 rgba(45,20,14,.3); } .box-folders i:nth-child(2) { transform: translateY(7px) rotate(5deg); background: #a5503b; } .box-folders i:nth-child(3) { transform: translateY(-4px) rotate(-4deg); background: #722a2e; } .box-folders i:nth-child(4) { transform: translateY(5px) rotate(8deg); background: #934032; }
.box-front-lock { position: absolute; bottom: 16px; left: calc(50% - 15px); z-index: 3; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(234,208,154,.65); color: var(--gold-light); background: var(--brown-deep); font-size: 13px; }
.box-instruction { margin: -3px 0 0; color: rgba(234,208,154,.75); font: 13px var(--display); letter-spacing: .08em; text-align: center; transition: opacity .4s; } .box-instruction span { margin: 0 8px; color: var(--gold); } .box-scene.is-open .box-instruction { opacity: 0; }

.archive-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: start; gap: 22px; max-width: 1385px; margin: 0 auto; }
.archive-panel { position: relative; max-width: none; margin: 0; padding: clamp(25px, 4vw, 44px); background: rgba(235, 210, 165, .95); box-shadow: var(--shadow); }
.archive-panel::before { content: ''; position: absolute; inset: 13px; border: 1px solid rgba(91,52,40,.24); pointer-events: none; }
.archive-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; position: relative; z-index: 1; padding: 0 10px 26px; border-bottom: 1px solid var(--line); }
.archive-heading .eyebrow { margin-bottom: 4px; color: var(--red); } h3 { margin: 0; color: var(--brown-deep); font: 39px var(--headline); letter-spacing: -.03em; }
.archive-meta { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font: 12px var(--display); } .archive-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(141,36,40,.12); }
.letter-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px 14px; padding: 32px 8px 10px; }
.letter-card { position: relative; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; transition: transform .24s ease; }
.favorite-mark { position: absolute; top: -7px; right: 2px; z-index: 4; color: #e5b75f; font: 17px var(--headline); opacity: 0; transform: scale(.6) rotate(-12deg); transition: opacity .2s ease, transform .2s ease; text-shadow: 0 0 8px rgba(229,183,95,.65); }
.letter-card.is-favorite .favorite-mark { opacity: 1; transform: scale(1) rotate(12deg); }
.letter-card:hover, .letter-card:focus-visible { transform: translateY(-7px) rotate(-1deg); outline: none; }
.letter-card:nth-child(3n) { transform: rotate(1deg); } .letter-card:nth-child(3n):hover, .letter-card:nth-child(3n):focus-visible { transform: translateY(-7px) rotate(0deg); }
.envelope { position: relative; aspect-ratio: 1.35 / 1; overflow: hidden; border: 1px solid rgba(247,234,208,.25); background: linear-gradient(145deg, #98473a, #631e24); box-shadow: 5px 7px 0 rgba(91,52,40,.17), 0 11px 19px rgba(91,52,40,.11); }
.envelope::before { content: ''; position: absolute; inset: 0; background: linear-gradient(140deg, transparent 48%, rgba(35,13,14,.21) 49%, transparent 51%), linear-gradient(40deg, transparent 48%, rgba(35,13,14,.21) 49%, transparent 51%); }
.envelope::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 51%; background: #a85443; clip-path: polygon(0 0, 100% 0, 50% 100%); opacity: .94; }
.envelope-seal { position: absolute; top: 50%; left: 50%; z-index: 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; transform: translate(-50%, -42%); color: #e4be80; background: var(--red-deep); border: 1px solid rgba(235,193,119,.62); box-shadow: 1px 2px 0 rgba(32,12,11,.35); font: 13px var(--headline); }
.letter-number { display: flex; align-items: center; justify-content: space-between; margin: 8px 2px 0; color: var(--brown-deep); font: 600 12px var(--cute, 'Quicksand', sans-serif); letter-spacing: .03em; } .letter-number small { color: var(--ink-soft); font: 600 10px var(--cute, 'Quicksand', sans-serif); letter-spacing: 0; opacity: .7; }
.letter-card.is-read .envelope { filter: saturate(.7); } .letter-card.is-read .envelope-seal { background: var(--gold); color: var(--red-deep); }
.jar-sidecar { position: sticky; top: 24px; align-self: start; z-index: 3; min-height: 390px; padding: 21px 18px 20px; overflow: hidden; color: var(--paper); background: linear-gradient(155deg, #6f3a2b, #3e211c 76%); border: 1px solid rgba(234,208,154,.38); box-shadow: 10px 13px 0 rgba(45,20,14,.2), 0 18px 30px rgba(45,20,14,.22); }
.jar-sidecar::before { content: ''; position: absolute; inset: 9px; border: 1px solid rgba(234,208,154,.24); pointer-events: none; }
.jar-header { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.jar-header .eyebrow { margin-bottom: 5px; color: var(--gold-light); font-size: 9px; letter-spacing: .12em; }
.jar-header h3 { color: var(--paper); font-size: 25px; line-height: .92; }
.jar-count { display: block; min-width: 46px; padding-top: 3px; color: rgba(247,234,208,.65); font: 11px var(--display); text-align: right; }
.jar-count strong { color: var(--gold-light); font: 30px var(--headline); }
.jar-illustration { position: relative; z-index: 1; width: 172px; height: 236px; margin: 23px auto 11px; }
.jar-lid { position: absolute; top: 4px; left: 50%; z-index: 3; width: 88px; height: 19px; transform: translateX(-50%); border: 1px solid rgba(235,193,119,.55); border-radius: 5px 5px 3px 3px; background: linear-gradient(#b98855, #6c3928); box-shadow: 0 3px 0 rgba(29,12,9,.25); }
.jar-neck { position: absolute; top: 17px; left: 50%; z-index: 2; width: 72px; height: 42px; transform: translateX(-50%); border: 1px solid rgba(235,219,180,.44); border-bottom: 0; border-radius: 13px 13px 0 0; background: linear-gradient(90deg, rgba(249,233,194,.08), rgba(249,233,194,.24), rgba(249,233,194,.06)); }
.jar-body { position: absolute; left: 50%; bottom: 0; z-index: 1; width: 150px; height: 190px; transform: translateX(-50%); overflow: hidden; border: 1px solid rgba(235,219,180,.55); border-radius: 25px 25px 34px 34px; background: linear-gradient(90deg, rgba(255,239,195,.06), rgba(241,221,169,.24) 47%, rgba(255,247,215,.08)); box-shadow: inset 12px 0 20px rgba(255,240,190,.08), inset -16px 0 25px rgba(35,13,10,.2), 0 14px 20px rgba(18,7,5,.25); }
.jar-body::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 7px; height: 15px; border: 1px solid rgba(235,219,180,.2); border-radius: 50%; background: rgba(44,18,13,.1); }
.jar-highlight { position: absolute; top: 18px; left: 18px; z-index: 3; width: 11px; height: 120px; border-radius: 50%; background: rgba(255,247,215,.18); transform: rotate(4deg); }
.jar-letters { position: absolute; inset: 31px 14px 14px; z-index: 2; display: flex; align-content: flex-end; align-items: flex-end; justify-content: center; flex-wrap: wrap; gap: 4px 3px; overflow: hidden; }
.jar-letter { display: grid; place-items: center; width: 27px; height: 12px; border: 1px solid rgba(91,52,40,.35); color: var(--red-deep); background: #e5c58f; box-shadow: 1px 2px 0 rgba(38,15,11,.18); font: 7px var(--body); transform: translateY(-160px) rotate(-18deg); }
.jar-letter:nth-child(3n) { background: #c47a55; } .jar-letter:nth-child(4n) { background: #f1d4a0; } .jar-letter.is-settled { animation: jarDrop .75s cubic-bezier(.18,.9,.3,1.3) forwards; }
@keyframes jarDrop { 0% { transform: translateY(-160px) rotate(-18deg); } 68% { transform: translateY(4px) rotate(7deg); } 100% { transform: translateY(0) rotate(0deg); } }
.jar-sidecar.has-new-letter { animation: jarThrum .55s ease; }
@keyframes jarThrum { 0%,100% { transform: translateX(0); } 35% { transform: translateX(3px) rotate(.5deg); } 70% { transform: translateX(-2px) rotate(-.4deg); } }
.jar-note { position: relative; z-index: 1; margin: 0; color: rgba(247,234,208,.68); font: 14px/1.2 var(--headline); text-align: center; }
.jar-note strong { color: var(--gold-light); font-size: 21px; }
.treasury-footer { display: flex; justify-content: space-between; max-width: 1140px; margin: 27px auto 0; padding: 0 4px; color: rgba(234,208,154,.52); font: 11px var(--display); letter-spacing: .08em; }

.letter-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.letter-modal.is-visible { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(19,8,7,.78); backdrop-filter: blur(4px); }
.letter-paper { position: relative; width: min(100%, 590px); min-height: 500px; padding: 39px 54px 47px; overflow: hidden; color: #321d18; background-color: #d5ad73; background-image: radial-gradient(ellipse at 50% 50%, rgba(255,239,185,.42), transparent 62%), radial-gradient(ellipse at 0% 0%, rgba(89,42,20,.24), transparent 28%), radial-gradient(ellipse at 100% 100%, rgba(89,42,20,.2), transparent 25%), radial-gradient(circle at 14% 18%, rgba(255,246,210,.48) 0 2px, transparent 3px), radial-gradient(circle at 82% 76%, rgba(91,45,22,.16) 0 1px, transparent 2px), repeating-linear-gradient(0deg, rgba(100,54,29,.045) 0 1px, transparent 1px 6px), repeating-linear-gradient(113deg, rgba(255,245,207,.06) 0 1px, transparent 1px 9px), repeating-linear-gradient(to bottom, transparent 0 31px, rgba(112,46,39,.15) 32px 33px), linear-gradient(135deg, #f0d09a, #b9854f); filter: drop-shadow(0 24px 25px rgba(0,0,0,.42)); transform-origin: center top; transform: translateY(22px) rotate(-5deg) scaleX(.14) scaleY(.42); clip-path: polygon(1% 2%, 7% 1%, 13% 2%, 20% 1%, 28% 2%, 35% 1%, 43% 2%, 50% 1%, 58% 2%, 66% 1%, 74% 2%, 82% 1%, 91% 2%, 99% 1%, 98% 10%, 99% 19%, 98% 28%, 99% 37%, 98% 46%, 99% 55%, 98% 64%, 99% 73%, 98% 82%, 99% 91%, 98% 99%, 90% 98%, 82% 99%, 74% 98%, 66% 99%, 58% 98%, 50% 99%, 42% 98%, 34% 99%, 26% 98%, 18% 99%, 10% 98%, 1% 99%, 2% 90%, 1% 81%, 2% 72%, 1% 63%, 2% 54%, 1% 45%, 2% 36%, 1% 27%, 2% 18%); transition: transform .8s cubic-bezier(.2,.85,.25,1.2), filter .8s ease; }
.letter-modal.is-visible .letter-paper { transform: translateY(0) rotate(-1deg) scaleX(1) scaleY(1); filter: drop-shadow(0 24px 25px rgba(0,0,0,.42)); }
.letter-paper::before { content: 'ᚱ ᛟ ᚦ'; position: absolute; inset: 17px 18px auto; height: 25px; border-top: 1px solid rgba(104,51,29,.34); border-bottom: 1px solid rgba(104,51,29,.22); color: rgba(104,51,29,.45); font: 13px var(--display); letter-spacing: .55em; text-align: center; pointer-events: none; }
.letter-paper::after { display: none; }
.paper-ribbon { position: absolute; top: 0; bottom: 0; left: calc(50% - 17px); z-index: 4; width: 34px; background: linear-gradient(90deg, #5d151c, #a22d32 48%, #5d151c); box-shadow: inset 0 0 0 1px rgba(245,210,151,.18), 0 0 15px rgba(72,20,20,.18); opacity: 1; transform: scaleX(1); transition: opacity .28s ease .32s, transform .45s ease .32s; pointer-events: none; }
.letter-modal.is-visible .paper-ribbon { opacity: 0; transform: translateY(-30px) scaleX(.25); }
.paper-roll { position: absolute; left: 50%; z-index: 5; width: 72px; height: 23px; border: 1px solid rgba(91,52,40,.35); border-radius: 50%; background: linear-gradient(#f8e5bb, #c99b61); box-shadow: 0 3px 7px rgba(63,29,20,.22); transform: translateX(-50%); transition: opacity .25s ease .3s, transform .45s ease .3s; pointer-events: none; }
.paper-roll--top { top: -10px; } .paper-roll--bottom { bottom: -10px; }
.letter-modal.is-visible .paper-roll { opacity: 0; }
.modal-close { position: absolute; top: 18px; right: 22px; z-index: 2; border: 0; color: var(--brown); background: none; font: 31px/1 var(--headline); }
.paper-top { display: flex; justify-content: space-between; gap: 15px; color: var(--brown); font: 10px var(--display); letter-spacing: .1em; text-transform: uppercase; }
.paper-ornament { margin: 27px 0 4px; color: var(--red); font: 38px var(--headline); text-align: center; }
.paper-kicker { margin: 0 0 8px; color: var(--red); font: 12px var(--display); letter-spacing: .14em; text-align: center; text-transform: uppercase; } .paper-kicker span { font-family: var(--headline); font-size: 17px; }
.letter-paper h3 { position: relative; z-index: 1; margin: 0 auto 22px; color: var(--brown-deep); font-size: 41px; text-align: center; }
.letter-paper h3:empty { display: none; }
.paper-message { position: relative; z-index: 1; max-width: 430px; margin: 0 auto; color: #4e3028; font: 25px/1.28 var(--headline); text-align: center; }
.paper-signoff { position: relative; z-index: 1; margin: 33px 76px 0 0; color: var(--brown); font: 600 18px/1.15 var(--headline); text-align: right; }
.paper-stamp { position: absolute; right: 32px; bottom: 28px; z-index: 2; display: grid; place-items: center; width: 70px; height: 66px; border: 0; border-radius: 47% 53% 52% 48% / 45% 48% 52% 55%; color: #f3c9a5; background: radial-gradient(circle at 32% 24%, #d65362 0 8%, #9d2437 37%, #651323 78%, #450c1b 100%); box-shadow: inset 4px 4px 0 rgba(255,219,174,.16), inset -5px -6px 0 rgba(45,4,14,.28), 3px 5px 0 rgba(61,24,12,.24), 0 8px 14px rgba(50,15,10,.22); transform: rotate(13deg); font: 700 18px var(--display); letter-spacing: .08em; text-shadow: 1px 2px 0 rgba(55,7,16,.45); opacity: .9; }
.paper-stamp::before { content: ''; position: absolute; inset: 7px; border: 1px dashed rgba(255,213,167,.54); border-radius: 46% 54% 49% 51% / 51% 46% 54% 49%; box-shadow: inset 0 0 0 2px rgba(85,10,26,.18); }
.paper-actions { position: relative; z-index: 3; display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.paper-action { padding: 9px 13px; border: 1px solid rgba(104,51,29,.42); color: #74404c; background: rgba(255,231,177,.28); box-shadow: 2px 3px 0 rgba(104,51,29,.13); font: 11px var(--display); letter-spacing: .04em; transition: transform .2s ease, background .2s ease, color .2s ease; }
.paper-action:hover, .paper-action:focus-visible { color: #f3c9a5; background: #8d2428; transform: translateY(-2px); outline: none; }
.paper-action.is-active { color: #f3c9a5; background: #8d2428; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 60; max-width: calc(100% - 40px); padding: 12px 18px; color: #f7ead0; background: var(--red-deep); box-shadow: 0 8px 22px rgba(0,0,0,.25); font: 13px var(--display); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .3s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 850px) {
  .login-stage { grid-template-columns: 1fr; align-content: center; gap: 46px; padding-top: 96px; padding-bottom: 100px; }
  .login-copy { max-width: 600px; } .key-card { justify-self: start; width: min(100%, 420px); }
  .login-footer { bottom: 26px; } .treasury-header { align-items: flex-start; gap: 28px; flex-direction: column; }
  .header-note { align-self: flex-end; } .archive-layout { grid-template-columns: 1fr; } .jar-sidecar { position: relative; top: auto; min-height: 0; display: grid; grid-template-columns: 1fr 180px; align-items: center; gap: 10px; } .jar-illustration { grid-column: 2; grid-row: 1 / span 2; margin: 5px auto; } .jar-note { grid-column: 1; grid-row: 2; } .letter-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 570px) {
  .login-stage, .treasury-stage { padding-left: 20px; padding-right: 20px; }
  .login-stage::before { inset: 12px; }
  h1 { font-size: clamp(59px, 18vw, 86px); } .lede { font-size: 17px; } .login-footer { gap: 10px; font-size: 8px; }
  .key-card { padding: 29px 25px; } .box-scene { min-height: 330px; margin-top: 35px; } .treasure-box { height: 235px; width: 95vw; }
  .box-lid { height: 133px; } .box-base { inset: 65px 0 0; } .lid-plaque { width: 72px; height: 43px; font-size: 15px; } .lid-ribbon--vertical { width: 34px; left: calc(50% - 17px); } .lid-ribbon--horizontal { height: 25px; top: calc(50% - 12px); }
  .box-compartment { top: 17px; } .box-label { font-size: 8px; } .box-count { font-size: 12px; } .box-count span { font-size: 22px; } .box-folders { margin-top: 9px; } .box-folders i { width: 48px; height: 50px; }
  .archive-panel { padding: 21px 15px 25px; } .archive-panel::before { inset: 8px; } .archive-heading { padding: 0 5px 20px; align-items: flex-start; flex-direction: column; } h3 { font-size: 33px; } .archive-meta { align-self: flex-end; }
  .jar-sidecar { grid-template-columns: 1fr 122px; padding: 18px 15px; } .jar-header h3 { font-size: 23px; } .jar-illustration { width: 122px; height: 174px; } .jar-body { width: 108px; height: 140px; border-radius: 19px 19px 26px 26px; } .jar-neck { width: 53px; height: 30px; } .jar-lid { width: 66px; height: 15px; } .jar-letters { inset: 22px 9px 10px; } .jar-letter { width: 20px; height: 9px; font-size: 6px; } .jar-highlight { left: 13px; height: 90px; }
  .letter-grid { grid-template-columns: repeat(3, 1fr); gap: 18px 9px; padding: 23px 5px 5px; } .letter-number { margin-top: 5px; font-size: 10px; } .letter-number small { font-size: 8px; }
  .treasury-footer { gap: 15px; flex-direction: column; font-size: 9px; } .letter-paper { min-height: 460px; padding: 34px 28px 39px; } .paper-top { font-size: 8px; } .paper-message { font-size: 23px; } .paper-signoff { margin-right: 70px; font-size: 16px; } .paper-stamp { right: 22px; bottom: 24px; width: 62px; height: 59px; } .letter-paper h3 { font-size: 35px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Birthday night theme */
:root { --ink: #f7e8dc; --ink-soft: #c8aab0; --espresso: #090709; --brown: #d7bac0; --brown-deep: #160d12; --walnut: #3a1825; --parchment: #220f18; --paper: #fff1ea; --paper-deep: #d9aeb7; --red: #a4213d; --red-deep: #5f1028; --gold: #e5b75f; --gold-light: #f7d889; --line: rgba(240, 203, 210, .2); --shadow: 0 28px 80px rgba(0, 0, 0, .48); --display: 'DM Sans', Arial, sans-serif; --headline: 'Cormorant Garamond', Georgia, serif; }
:root { --cute: 'Quicksand', 'DM Sans', sans-serif; }
body { color: var(--ink); background: #090709; }
body::before { background: radial-gradient(circle at 18% 8%, rgba(164, 33, 61, .28), transparent 28%), radial-gradient(circle at 84% 76%, rgba(112, 16, 43, .3), transparent 32%), linear-gradient(140deg, #090709 0%, #180b13 48%, #050506 100%); }
body::after { opacity: .28; background-image: radial-gradient(circle at 22% 18%, rgba(255,255,255,.08) 0 1px, transparent 1px 5px), repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 8px); }
.sparkle-field { color: #e5b75f; opacity: .5; }
.login-stage { background: radial-gradient(ellipse at 18% 22%, rgba(229,183,95,.08), transparent 25%), radial-gradient(ellipse at 76% 70%, rgba(164,33,61,.18), transparent 34%); }
.login-stage::before { inset: 12px; background: radial-gradient(circle at 14% 9%, rgba(196,69,90,.3), transparent 19%), radial-gradient(circle at 82% 88%, rgba(229,183,95,.14), transparent 22%), linear-gradient(145deg, rgba(47, 13, 29, .98), rgba(10, 8, 11, .98) 72%); box-shadow: 0 25px 35px rgba(0,0,0,.45), inset 0 0 0 1px rgba(216, 172, 183, .24), inset 0 0 0 8px rgba(229,183,95,.035), inset 0 0 80px rgba(164,33,61,.1); clip-path: polygon(1% 1%, 8% 0%, 16% 1%, 25% 0%, 34% 1%, 43% 0%, 52% 1%, 61% 0%, 70% 1%, 79% 0%, 88% 1%, 99% 0%, 100% 14%, 99% 28%, 100% 42%, 99% 56%, 100% 70%, 99% 84%, 100% 99%, 90% 98%, 80% 100%, 70% 98%, 60% 100%, 50% 98%, 40% 100%, 30% 98%, 20% 100%, 10% 98%, 0 100%, 1% 84%, 0 70%, 1% 56%, 0 42%, 1% 28%, 0 14%); }
.login-copy { position: relative; }
.login-copy::before { content: ''; position: absolute; left: -32px; top: 6%; bottom: 2%; width: 1px; background: linear-gradient(180deg, transparent, rgba(229,183,95,.58) 18%, rgba(229,183,95,.16) 82%, transparent); opacity: .72; }
.login-copy::after { content: '❦'; position: absolute; right: 3%; bottom: -8%; color: rgba(229,183,95,.2); font: 86px var(--headline); transform: rotate(-12deg); pointer-events: none; }
.landing-birthday-art { position: absolute; inset: 12px; z-index: 0; overflow: hidden; pointer-events: none; }
.landing-birthday-art::before { content: ''; position: absolute; left: 5%; right: 5%; top: 17%; height: 1px; background: linear-gradient(90deg, transparent, rgba(229,183,95,.3), transparent); box-shadow: 0 14px 0 rgba(196,69,90,.13); }
.landing-confetti { position: absolute; color: #e5b75f; font: 24px var(--headline); opacity: .78; animation: landingTwinkle 3.8s ease-in-out infinite; }
.landing-confetti--one { left: 7%; top: 15%; } .landing-confetti--two { left: 43%; top: 8%; color: #c4455a; animation-delay: .7s; } .landing-confetti--three { right: 37%; top: 22%; color: #f7d889; animation-delay: 1.2s; } .landing-confetti--four { right: 8%; top: 31%; color: #c4455a; animation-delay: 1.9s; }
@keyframes landingTwinkle { 0%,100% { opacity: .45; transform: scale(.85) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(12deg); } }
.login-stage::after { color: var(--gold); }
.login-stage .eyebrow, .login-stage .rule, .login-stage .rule::before, .login-stage .rule::after { color: var(--gold); }
.login-stage .rule::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.login-stage .rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.login-stage h1 { color: #fff0eb; text-shadow: 0 0 30px rgba(164,33,61,.18); }
.login-stage h1 span { color: #c4455a; }
.login-stage h1 .title-heart { display: inline-block; color: #c4455a; font-size: .27em; font-style: normal; letter-spacing: 0; vertical-align: .18em; filter: drop-shadow(0 0 8px rgba(196,69,90,.5)); }
.login-stage .lede, .login-stage .invitation { color: rgba(255, 239, 235, .78); }
.login-stage .invitation strong { color: #f2cbd1; }
.login-stage .invitation em { color: rgba(255, 239, 235, .56); }
.login-stage .login-footer { color: rgba(247, 216, 137, .66); }
.key-card { color: #fff0eb; background: radial-gradient(circle at 50% 0%, rgba(229,183,95,.13), transparent 28%), linear-gradient(145deg, #6f1730, #1b0912 82%); border: 1px solid rgba(229,183,95,.42); box-shadow: 18px 22px 0 rgba(0,0,0,.38), 0 24px 60px rgba(0,0,0,.34), 0 0 0 8px rgba(229,183,95,.035); transform: rotate(1deg); }
.key-card::before { inset: 11px; border-color: rgba(229,183,95,.38); box-shadow: inset 0 0 0 1px rgba(164,33,61,.28); }
.key-card::after { right: 19px; bottom: 9px; color: rgba(229,183,95,.34); text-shadow: 0 0 18px rgba(229,183,95,.18); }
.key-card__topline, .key-card label { color: #f7d889; }
.seal { background: radial-gradient(circle at 35% 25%, #cf5265, #5f1028); box-shadow: 0 0 0 5px rgba(229,183,95,.08), 3px 6px 0 rgba(0,0,0,.3), 0 0 22px rgba(196,69,90,.2); }
.key-card input { color: #fff0eb; background: rgba(8, 4, 8, .44); border-color: rgba(247,216,137,.48); }
.key-card input::placeholder { color: rgba(255,239,235,.58); }
.wax-button { border-color: #4e0b20; background: linear-gradient(115deg, #5f1028, #a4213d); box-shadow: 4px 5px 0 rgba(53, 6, 20, .35); }
.form-hint { color: rgba(247,216,137,.76); }
.treasury-stage { background: radial-gradient(circle at 50% 20%, rgba(164,33,61,.2), transparent 36%); }
.treasury-header h2 { color: #fff0eb; }
.treasury-header h2 span { color: #c4455a; }
.box-glow { background: rgba(196, 69, 90, .28); }
.box-lid { color: var(--gold-light); background: linear-gradient(140deg, #a4213d, #5f1028 52%, #260b16); box-shadow: inset 0 0 0 8px rgba(25,4,12,.28), inset 0 0 0 11px rgba(229,183,95,.26), 0 17px 0 #13070d, 0 25px 28px rgba(0,0,0,.6); }
.box-lid::before { border-color: rgba(247, 216, 137, .4); }
.lid-plaque { border-color: var(--gold); color: var(--gold-light); background: #5f1028; }
.box-base { background: linear-gradient(145deg, #721c35, #260d18 66%); box-shadow: inset 0 0 0 8px rgba(30,3,14,.35), inset 0 0 0 11px rgba(229,183,95,.2), 0 26px 27px rgba(0,0,0,.58); }
.box-base::after { background: repeating-linear-gradient(80deg, transparent 0 23px, #9b3850 24px 26px, transparent 27px 57px); }
.box-folders i { background: #8d1834; border-color: rgba(229,183,95,.56); }
.box-folders i:nth-child(2) { background: #b03d54; } .box-folders i:nth-child(3) { background: #641228; } .box-folders i:nth-child(4) { background: #92243f; }
.archive-panel { background: rgba(28, 12, 20, .96); }
.archive-panel::before { border-color: rgba(229,183,95,.24); }
.archive-heading { border-color: rgba(229,183,95,.25); }
.archive-heading .eyebrow, .archive-meta { color: #e5b75f; }
.archive-heading h3 { color: #fff0eb; }
.archive-dot { background: #c4455a; }
.envelope { background: linear-gradient(145deg, #a4213d, #5f1028); box-shadow: 5px 7px 0 rgba(0,0,0,.26), 0 11px 19px rgba(0,0,0,.24); }
.envelope::after { background: #b9475c; }
.letter-number { color: #f1d1d2; }
.letter-number small { color: #cdaeb7; }
.jar-sidecar { color: #fff0eb; background: linear-gradient(155deg, #3c1221, #150a11 76%); border-color: rgba(229,183,95,.35); }
.jar-header .eyebrow, .jar-count strong, .jar-note strong { color: #f7d889; }
.jar-header h3 { color: #fff0eb; }
.jar-body { border-color: rgba(247, 232, 220, .48); background: linear-gradient(90deg, rgba(255,239,230,.05), rgba(247,216,210,.18) 47%, rgba(255,247,240,.06)); }
.jar-letter { color: #5f1028; background: #f1c8c4; }
.jar-letter:nth-child(3n) { background: #b95b6e; } .jar-letter:nth-child(4n) { background: #f7dfcf; }
.treasury-footer { color: rgba(229,183,95,.64); }
.treasure-box { filter: drop-shadow(0 28px 22px rgba(0,0,0,.42)); transform-style: preserve-3d; }
.box-lid { border-radius: 5px 5px 2px 2px; transform-style: preserve-3d; }
.box-lid::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -14px; z-index: -1; height: 14px; border-top: 1px solid rgba(229,183,95,.42); background: linear-gradient(180deg, #74152e, #300b18); clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%); box-shadow: 0 8px 9px rgba(0,0,0,.3); }
.box-base { overflow: visible; border-radius: 0 0 5px 5px; transform-style: preserve-3d; }
.box-base::before { content: ''; position: absolute; left: 8px; right: 8px; bottom: -13px; z-index: -1; height: 13px; border-bottom: 1px solid rgba(229,183,95,.34); background: linear-gradient(180deg, #3d0e1d, #170710); clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%); box-shadow: 0 8px 10px rgba(0,0,0,.34); }
.box-base::after { background: linear-gradient(105deg, rgba(255,255,255,.08), transparent 22% 76%, rgba(0,0,0,.22)), repeating-linear-gradient(80deg, transparent 0 23px, #9b3850 24px 26px, transparent 27px 57px); }
.lid-hinge { border: 1px solid rgba(255,239,173,.45); box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 4px 5px rgba(0,0,0,.35); }
.lid-plaque { box-shadow: inset 0 2px 0 rgba(255,239,173,.24), inset 0 -4px 0 rgba(28,4,13,.24), 0 5px 0 #3d0d1b, 0 8px 9px rgba(0,0,0,.3); }
.box-front-lock { box-shadow: inset 0 2px 0 rgba(255,239,173,.3), inset 0 -3px 0 rgba(20,3,11,.28), 0 4px 6px rgba(0,0,0,.4); }
.birthday-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 22px; overflow: hidden; background: rgba(4, 3, 5, .82); backdrop-filter: blur(9px); opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.birthday-modal.is-visible { opacity: 1; pointer-events: auto; }
.birthday-card { position: relative; z-index: 3; width: min(100%, 720px); padding: clamp(34px, 7vw, 70px) clamp(25px, 7vw, 70px) 40px; overflow: hidden; text-align: center; color: #fff0eb; background: radial-gradient(circle at 50% 0%, rgba(196,69,90,.27), transparent 42%), linear-gradient(145deg, #28101c, #0c080d 82%); border: 1px solid rgba(229,183,95,.62); box-shadow: 0 35px 100px rgba(0,0,0,.65), inset 0 0 0 9px rgba(164,33,61,.12); transform: translateY(20px) scale(.92); transition: transform .55s cubic-bezier(.2,.85,.25,1.2); }
.birthday-modal.is-visible .birthday-card { transform: translateY(0) scale(1); }
.birthday-card::before { content: ''; position: absolute; inset: 15px; border: 1px solid rgba(229,183,95,.24); pointer-events: none; }
.birthday-close { position: absolute; top: 16px; right: 22px; z-index: 2; border: 0; color: #f7d889; background: transparent; font: 31px/1 var(--headline); }
.birthday-kicker { position: relative; z-index: 1; margin-bottom: 20px; color: #e5b75f; font: 11px var(--display); letter-spacing: .14em; text-transform: uppercase; }
.birthday-cake { position: relative; z-index: 1; display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 17px; color: #f7d889; border: 1px solid rgba(229,183,95,.7); border-radius: 50%; background: #6d1530; box-shadow: 0 0 0 8px rgba(164,33,61,.12), 0 0 35px rgba(196,69,90,.35); font-size: 29px; }
.birthday-label { position: relative; z-index: 1; margin-bottom: 12px; color: #c4455a; font: 12px var(--display); letter-spacing: .18em; }
.birthday-card h2 { position: relative; z-index: 1; margin: 0 auto 17px; max-width: 620px; color: #fff6f1; font: 600 clamp(31px, 5vw, 55px)/.95 var(--headline); letter-spacing: -.035em; }
.birthday-subtitle { position: relative; z-index: 1; max-width: 510px; margin: 0 auto 27px; color: rgba(255, 239, 235, .76); font: 16px/1.45 var(--body); }
.birthday-continue { position: relative; z-index: 1; padding: 14px 21px; border: 1px solid #e5b75f; color: #fff0eb; background: linear-gradient(115deg, #5f1028, #a4213d); box-shadow: 4px 5px 0 rgba(0,0,0,.3); font: 12px var(--display); letter-spacing: .08em; text-transform: uppercase; }
.birthday-continue span { margin-left: 16px; color: #f7d889; font-size: 20px; vertical-align: -2px; }
.birthday-confetti, .birthday-balloons { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.confetti-piece { position: absolute; top: -16px; left: var(--x); width: 8px; height: 17px; background: var(--color); opacity: 0; animation: confettiFall 2.9s ease-in var(--delay) infinite; }
.confetti-piece:nth-child(3n) { width: 13px; height: 7px; border-radius: 50%; } .confetti-piece:nth-child(4n) { border-radius: 50%; transform: rotate(45deg); }
@keyframes confettiFall { 0% { opacity: 0; transform: translate3d(0, -20px, 0) rotate(0); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate3d(calc(var(--drift, 0px)), 105vh, 0) rotate(var(--spin)); } }
.birthday-balloon { position: absolute; left: var(--x); bottom: -90px; width: 47px; height: 61px; border-radius: 50% 50% 46% 46%; background: var(--color); box-shadow: inset -8px -8px 0 rgba(40,0,15,.15), inset 7px 7px 0 rgba(255,255,255,.15); opacity: 0; animation: balloonRise 5.8s ease-in var(--delay) infinite; }
.birthday-balloon::after { content: ''; position: absolute; left: 50%; top: 59px; width: 1px; height: 150px; background: rgba(247,216,137,.55); transform-origin: top; transform: rotate(4deg); }
.birthday-balloon::before { content: ''; position: absolute; left: 19px; bottom: -6px; width: 10px; height: 9px; background: var(--color); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.birthday-balloon span { position: absolute; inset: 0; border-radius: inherit; animation: balloonPop 5.8s ease-in var(--delay) infinite; }
@keyframes balloonRise { 0% { opacity: 0; transform: translate3d(0, 0, 0) scale(.7); } 10% { opacity: 1; } 78% { opacity: 1; transform: translate3d(var(--drift), -92vh, 0) scale(1); } 88%, 100% { opacity: 0; transform: translate3d(var(--drift), -92vh, 0) scale(1.25); } }
@keyframes balloonPop { 0%, 82% { box-shadow: none; } 84% { box-shadow: 0 -20px 0 -18px #f7d889, 18px -9px 0 -18px #f7d889, -17px -6px 0 -18px #f7d889, 11px 18px 0 -18px #f7d889, -15px 17px 0 -18px #f7d889; } 94%,100% { box-shadow: 0 -40px 0 -20px transparent, 35px -18px 0 -20px transparent, -34px -12px 0 -20px transparent, 22px 36px 0 -20px transparent, -30px 34px 0 -20px transparent; } }
body.birthday-open { overflow: hidden; }
.completion-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; overflow: hidden; background: rgba(4, 3, 5, .86); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.completion-modal.is-visible { opacity: 1; pointer-events: auto; }
.completion-backdrop { position: absolute; inset: 0; }
.completion-hearts { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.completion-heart { position: absolute; left: var(--x); bottom: -42px; color: var(--gold-light); font: var(--size)/1 var(--headline); opacity: 0; text-shadow: 0 0 10px rgba(247,216,137,.7), 0 0 24px rgba(196,69,90,.55); animation: heartFloat var(--duration) ease-in var(--delay) infinite; }
.completion-heart:nth-child(3n) { color: #c4455a; }
.completion-heart:nth-child(4n) { color: #f7e8dc; }
@keyframes heartFloat { 0% { opacity: 0; transform: translate3d(0, 30px, 0) rotate(var(--tilt)) scale(.55); } 12% { opacity: .9; } 76% { opacity: .72; } 100% { opacity: 0; transform: translate3d(var(--drift), -108vh, 0) rotate(calc(var(--tilt) + 180deg)) scale(1.16); } }
.completion-cake-card { position: relative; z-index: 1; width: min(100%, 650px); padding: 34px 42px 38px; overflow: visible; color: #fff0eb; text-align: center; background: radial-gradient(circle at 50% 8%, rgba(244,201,93,.19), transparent 24%), linear-gradient(145deg, #32101f, #0d080d 82%); border: 1px solid rgba(229,183,95,.7); border-radius: 24px; box-shadow: 0 35px 100px rgba(0,0,0,.7), inset 0 0 0 9px rgba(164,33,61,.14); transform: translateY(24px) scale(.9); transition: transform .6s cubic-bezier(.2,.85,.25,1.2); }
.completion-modal.is-visible .completion-cake-card { transform: translateY(0) scale(1); }
.completion-cake-card::before { content: ''; position: absolute; inset: 14px; border: 1px solid rgba(229,183,95,.25); border-radius: 16px; pointer-events: none; }
.completion-close { position: absolute; top: 13px; right: 20px; z-index: 3; border: 0; color: #f7d889; background: transparent; font: 31px/1 var(--headline); }
.completion-cake { position: relative; z-index: 1; width: min(100%, 430px); height: 218px; margin: 10px auto 8px; overflow: visible; }
.cake-tier { position: absolute; left: 50%; transform: translateX(-50%); border: 2px solid rgba(229,183,95,.7); box-shadow: inset 0 -13px 0 rgba(95,16,40,.24), 0 10px 0 rgba(0,0,0,.2), 0 14px 25px rgba(0,0,0,.22); }
.cake-tier--top { bottom: 102px; width: 250px; height: 72px; border-radius: 17px 17px 10px 10px; background: linear-gradient(145deg, #d6536b, #8c1738 78%); }
.cake-tier--bottom { bottom: 17px; width: 380px; height: 105px; border-radius: 21px 21px 15px 15px; background: linear-gradient(145deg, #b52e50, #5f1028 78%); }
.cake-icing { position: absolute; left: 50%; bottom: 155px; z-index: 2; width: 270px; height: 30px; transform: translateX(-50%); border-radius: 50%; background: #f3a7aa; box-shadow: 0 5px 0 #a4213d, 0 11px 0 rgba(74,8,26,.35); }
.cake-icing::after { content: '♥  ✦  ♥  ✦  ♥'; position: absolute; left: 0; right: 0; top: 5px; color: #fff0eb; font-size: 12px; letter-spacing: 17px; }
.cake-front-message { position: absolute; inset: 0; display: grid; place-content: center; color: #ffe8d4; font: 700 17px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.cake-candle { position: absolute; bottom: 176px; left: 50%; z-index: 6; width: 22px; height: 73px; transform: translateX(-50%); border: 1px solid rgba(247,216,137,.8); border-radius: 7px 7px 3px 3px; background: repeating-linear-gradient(135deg, #f7d889 0 7px, #a4213d 7px 13px); box-shadow: 4px 5px 0 rgba(0,0,0,.2), 0 0 17px rgba(247,216,137,.3); }
.cake-candle::after { content: ''; position: absolute; left: 50%; top: -15px; width: 2px; height: 17px; background: #28101c; }
.cake-flame { position: absolute; left: 50%; top: -35px; z-index: 8; width: 21px; height: 31px; transform: translateX(-50%) rotate(45deg); border-radius: 50% 50% 50% 0; background: #ffd76b; box-shadow: 0 0 8px #fff0a1, 0 0 22px #f4a83d, 0 0 42px rgba(244,168,61,.75); animation: candleGlow 1s ease-in-out infinite alternate; }
@keyframes candleGlow { from { filter: brightness(.9); transform: translateX(-50%) rotate(45deg) scale(.92); } to { filter: brightness(1.3); transform: translateX(-50%) rotate(45deg) scale(1.08); } }
.completion-kicker { position: relative; z-index: 1; margin: 5px 0 12px; color: #e5b75f; font: 11px var(--display); letter-spacing: .15em; text-transform: uppercase; }
.completion-cake-card h2 { position: relative; z-index: 1; margin: 0 0 13px; color: #fff6f1; font: 600 clamp(34px, 6vw, 58px)/.93 var(--headline); }
.completion-message { position: relative; z-index: 1; max-width: 510px; margin: 0 auto 17px; color: rgba(255,239,235,.8); font: 16px/1.45 var(--body); }
.completion-signoff { position: relative; z-index: 1; margin: 0 0 22px; color: #f7d889; font: 700 22px var(--headline); }
.completion-continue { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; min-width: min(100%, 320px); padding: 15px 23px; overflow: hidden; border: 2px solid #f7d889; border-radius: 999px; color: #fff8ef; background: linear-gradient(115deg, #72132f, #b52e50 55%, #7d1532); box-shadow: 0 0 0 4px rgba(229,183,95,.12), 0 9px 0 rgba(44,5,18,.7), 0 0 28px rgba(229,183,95,.42); cursor: pointer; font: 700 13px var(--display); letter-spacing: .08em; text-transform: uppercase; animation: completionButtonPulse 2.3s ease-in-out infinite; transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.completion-continue::before { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(255,240,220,.42); border-radius: inherit; pointer-events: none; }
.completion-continue:hover, .completion-continue:focus-visible { filter: brightness(1.14); outline: none; transform: translateY(-3px); box-shadow: 0 0 0 6px rgba(229,183,95,.16), 0 12px 0 rgba(44,5,18,.7), 0 0 38px rgba(229,183,95,.66); }
.completion-continue:focus-visible { outline: 2px solid #fff0c0; outline-offset: 5px; }
.completion-continue:active { transform: translateY(4px); box-shadow: 0 0 0 3px rgba(229,183,95,.12), 0 4px 0 rgba(44,5,18,.7), 0 0 22px rgba(229,183,95,.42); }
.completion-continue span { margin-left: 12px; color: #f7d889; font-size: 17px; }
@keyframes completionButtonPulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(229,183,95,.12), 0 9px 0 rgba(44,5,18,.7), 0 0 28px rgba(229,183,95,.42); } 50% { box-shadow: 0 0 0 7px rgba(229,183,95,.18), 0 9px 0 rgba(44,5,18,.7), 0 0 40px rgba(229,183,95,.68); } }
body.completion-open { overflow: hidden; }
.cassette-stage { position: relative; min-height: 100vh; padding: clamp(48px, 7vw, 92px) clamp(20px, 8vw, 120px); overflow: hidden; background: radial-gradient(circle at 16% 18%, rgba(229,183,95,.12), transparent 24%), radial-gradient(circle at 84% 75%, rgba(164,33,61,.2), transparent 32%), linear-gradient(145deg, #170a12, #050506 78%); }
.cassette-stars { position: absolute; top: 26px; left: 50%; color: var(--gold); font: 15px var(--headline); letter-spacing: .4em; transform: translateX(-50%); opacity: .65; }
.cassette-header { position: relative; z-index: 1; max-width: 650px; margin: 0 auto 34px; text-align: center; }
.cassette-header h2 { margin: 0 0 17px; color: #fff0eb; font-size: clamp(48px, 7vw, 82px); line-height: .86; }
.cassette-header h2 span { color: #c4455a; }
.cassette-intro { max-width: 510px; margin: 0 auto; color: rgba(255,239,235,.7); font: 16px/1.45 var(--body); }
.cassette-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 650px) minmax(260px, 360px); align-items: center; justify-content: center; gap: clamp(30px, 7vw, 100px); max-width: 1150px; margin: 0 auto; }
.cassette-deck { perspective: 1200px; }
.cassette-shell { position: relative; min-height: 390px; padding: 36px 46px 28px; color: #3a1c1d; background: linear-gradient(145deg, #fffdf3, #ded6c9 58%, #b7aaa0); border: 1px solid rgba(255,255,255,.9); border-radius: 13px; box-shadow: 20px 24px 0 rgba(0,0,0,.35), 0 30px 70px rgba(0,0,0,.45), inset 0 0 0 7px rgba(57,34,30,.08), inset 0 -14px 20px rgba(82,53,43,.14); transform: rotateX(4deg) rotateY(-7deg) rotateZ(-1deg); transition: transform .5s ease; }
.cassette-shell:hover { transform: rotateX(2deg) rotateY(-3deg) rotateZ(0deg) translateY(-5px); }
.cassette-brand { color: #732131; font: 700 15px var(--display); letter-spacing: .16em; }.cassette-brand span { float: right; color: #8d725b; font-size: 10px; letter-spacing: .08em; }
.cassette-screw { position: absolute; width: 11px; height: 11px; border: 1px solid #8e8177; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #9d9289); box-shadow: inset 1px 1px 2px rgba(0,0,0,.28); }.cassette-screw--one { top: 19px; left: 22px; }.cassette-screw--two { top: 19px; right: 22px; }.cassette-screw--three { bottom: 18px; left: 22px; }.cassette-screw--four { bottom: 18px; right: 22px; }
.cassette-label { display: grid; gap: 5px; margin: 25px auto 20px; padding: 13px 18px 11px; text-align: center; color: #f7e8dc; background: repeating-linear-gradient(-8deg, rgba(255,255,255,.07) 0 2px, transparent 2px 5px), linear-gradient(105deg, #8e2439, #5d1729); box-shadow: 0 4px 0 rgba(69,30,27,.18); }.cassette-label span { font: 11px var(--display); letter-spacing: .22em; }.cassette-label strong { color: #f7d889; font: 700 20px var(--headline); letter-spacing: .08em; }.cassette-label small { font: 9px var(--display); letter-spacing: .1em; opacity: .75; }
.cassette-window { position: relative; display: flex; justify-content: space-between; align-items: center; height: 116px; padding: 0 58px; overflow: hidden; background: linear-gradient(180deg, #321b1b, #120d0e); border: 7px solid #6c5e57; box-shadow: inset 0 0 0 2px #baa99a, inset 0 0 24px rgba(0,0,0,.8); }.cassette-window::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.15), transparent 34% 70%, rgba(0,0,0,.28)); pointer-events: none; }.cassette-window b { position: absolute; left: 50%; color: #e5b75f; font: 26px var(--headline); transform: translateX(-50%); z-index: 2; }
.cassette-reel { position: relative; z-index: 1; display: grid; place-items: center; width: 72px; height: 72px; border: 7px solid #bcb0a3; border-radius: 50%; background: repeating-conic-gradient(#6e625b 0 18deg, #c9beb0 18deg 36deg); box-shadow: 0 0 0 5px #4d403c, inset 0 0 0 8px #82756d; animation: cassetteSpin 3s linear infinite paused; }.cassette-reel i { width: 19px; height: 19px; border: 5px solid #cfc4b5; border-radius: 50%; background: #3a2522; }.cassette-stage.is-playing .cassette-reel { animation-play-state: running; }.cassette-stage.has-recording .cassette-label { background: repeating-linear-gradient(-8deg, rgba(255,255,255,.08) 0 2px, transparent 2px 5px), linear-gradient(105deg, #a4213d, #641228); }.cassette-stage.has-recording .cassette-window { box-shadow: inset 0 0 0 2px #baa99a, inset 0 0 24px rgba(0,0,0,.8), 0 0 20px rgba(196,69,90,.18); }
@keyframes cassetteSpin { to { transform: rotate(360deg); } }
.cassette-tape-line { height: 5px; margin: 15px 20px 18px; background: repeating-linear-gradient(90deg, #7f2637 0 28px, #c6b6a6 28px 31px); border-radius: 6px; }
.cassette-buttons { display: flex; justify-content: center; gap: 12px; }.cassette-buttons button { display: grid; place-items: center; width: 82px; height: 51px; border: 1px solid #887c73; border-radius: 5px; color: #f7e8dc; background: linear-gradient(#8a2737, #581321); box-shadow: 0 4px 0 #3b1b20, inset 0 1px 0 rgba(255,255,255,.25); font-size: 19px; transition: transform .18s, filter .18s; }.cassette-buttons button:hover, .cassette-buttons button:focus-visible { filter: brightness(1.2); transform: translateY(-2px); outline: none; }.cassette-buttons small { margin-top: 2px; color: #f7d889; font: 8px var(--display); letter-spacing: .12em; }
.cassette-bottom { display: flex; justify-content: space-between; margin-top: 24px; color: #765f56; font: 9px var(--display); letter-spacing: .12em; }
.lyrics-panel { position: relative; min-height: 390px; padding: 18px 8px 24px; color: #fff0eb; text-align: center; overflow: hidden; }.lyrics-panel__seal { display: none; }.lyrics-heading { position: relative; z-index: 2; margin-bottom: 10px; }.cassette-kicker { margin-bottom: 8px; color: #f7d889; font: 10px var(--display); letter-spacing: .16em; text-transform: uppercase; }.lyrics-heading span { color: rgba(255,239,235,.55); font: 11px var(--body); }.lyrics-viewport { position: relative; height: 285px; overflow: hidden; padding: 120px 8px 125px; mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent); }.lyrics-list { display: flex; flex-direction: column; gap: 24px; transition: transform .35s ease; }.lyrics-line { margin: 0; color: rgba(255,239,235,.32); font: 19px/1.22 var(--headline); transition: color .35s ease, opacity .35s ease, transform .35s ease; }.lyrics-line.is-active { color: #fff0eb; text-shadow: 0 0 18px rgba(247,216,137,.24); transform: scale(1.035); }.lyrics-upload { display: inline-block; margin: 2px 0 16px; color: rgba(247,216,137,.72); cursor: pointer; font: 10px var(--display); letter-spacing: .1em; text-transform: uppercase; }.lyrics-upload:hover { color: #f7d889; }.cassette-back { display: block; margin: 0 auto; border: 0; color: #f7d889; background: none; font: 11px var(--display); letter-spacing: .06em; }.cassette-back:hover { color: #fff0eb; }
body.cassette-open { overflow-x: hidden; }
@media (max-width: 850px) { .cassette-layout { grid-template-columns: 1fr; max-width: 650px; } .lyrics-panel { max-width: 440px; width: 100%; margin: 0 auto; } }
@media (max-width: 570px) { .cassette-stage { padding: 55px 20px 40px; } .cassette-shell { min-height: 320px; padding: 27px 24px 22px; transform: none; }.cassette-shell:hover { transform: translateY(-3px); }.cassette-label { margin-top: 19px; }.cassette-window { height: 88px; padding: 0 34px; }.cassette-reel { width: 54px; height: 54px; border-width: 5px; }.cassette-reel i { width: 15px; height: 15px; border-width: 4px; }.cassette-buttons { gap: 6px; }.cassette-buttons button { width: 72px; height: 47px; }.cassette-bottom { margin-top: 18px; font-size: 7px; }.lyrics-panel { min-height: 360px; padding-inline: 0; }.lyrics-viewport { height: 250px; padding-top: 105px; padding-bottom: 105px; }.lyrics-line { font-size: 17px; } }
@media (max-width: 570px) { .completion-cake-card { padding: 28px 22px 30px; } .completion-cake { transform: scale(.78); transform-origin: center top; margin-bottom: -38px; } .completion-message { font-size: 15px; } .completion-signoff { font-size: 19px; } }
.paper-top span:last-child, .paper-signoff { color: #74404c; }
@media (min-width: 700px) {
  .treasury-stage:not(.archive-unlocked) .box-scene { min-height: clamp(330px, 37vh, 390px); margin-top: clamp(28px, 4vh, 48px); margin-bottom: 20px; }
  .treasury-stage:not(.archive-unlocked) .treasure-box { transform: perspective(1100px) rotateX(2deg) rotateY(-3deg) scale(.84); transform-origin: center center; }
}
.lyrics-heart { color: #c4455a; font-family: Georgia, serif; text-shadow: 0 0 10px rgba(196,69,90,.45); }
.cassette-particles { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }.cassette-particle { position: absolute; left: var(--x); top: var(--y); width: var(--size); height: var(--size); border-radius: 50%; background: #e5b75f; box-shadow: 0 0 8px #e5b75f, 0 0 22px rgba(196,69,90,.7); opacity: 0; animation: cassetteFloat var(--duration) ease-in-out var(--delay) infinite; }.cassette-particle:nth-child(3n) { background: #c4455a; box-shadow: 0 0 8px #c4455a, 0 0 22px rgba(247,216,137,.5); }.cassette-particle:nth-child(5n) { border-radius: 1px; transform: rotate(45deg); }.lyrics-word { transition: color .18s ease, text-shadow .18s ease; }.lyrics-word.is-spoken { color: rgba(255,239,235,.82); }.lyrics-word.is-current { color: #f7d889; text-shadow: 0 0 12px rgba(247,216,137,.55); }.lyrics-heart { color: #c4455a; font-family: Georgia, serif; text-shadow: 0 0 10px rgba(196,69,90,.45); }@keyframes cassetteFloat { 0% { opacity: 0; transform: translate3d(0, 20px, 0) scale(.55); } 22%, 72% { opacity: .72; } 50% { transform: translate3d(var(--drift), -42px, 0) scale(1); } 100% { opacity: 0; transform: translate3d(calc(var(--drift) * -0.5), -80px, 0) scale(.72); } }
body.cassette-open { overflow: hidden; }.cassette-stage { height: 100svh; min-height: 100svh; padding-top: clamp(28px, 4vh, 54px); padding-bottom: clamp(18px, 3vh, 42px); overflow: hidden; }.cassette-header { margin-bottom: clamp(14px, 2.5vh, 34px); }.cassette-layout { max-height: calc(100svh - 190px); }.cassette-shell { min-height: 0; }.lyrics-panel { min-height: 0; }.lyrics-viewport { height: clamp(180px, 32vh, 285px); }
@media (max-width: 850px) { .cassette-stage { overflow: hidden; }.cassette-layout { max-height: calc(100svh - 160px); gap: 12px; } }
@media (max-width: 570px) { .cassette-stage { padding: 26px 16px 18px; }.cassette-header { margin-bottom: 10px; }.cassette-header h2 { font-size: 42px; margin-bottom: 8px; }.cassette-intro { font-size: 13px; }.cassette-layout { max-height: calc(100svh - 145px); gap: 4px; }.cassette-shell { min-height: 265px; padding: 20px 22px 16px; }.cassette-label { margin-top: 12px; margin-bottom: 12px; padding: 9px 12px 8px; }.cassette-label strong { font-size: 16px; }.cassette-window { height: 78px; }.lyrics-panel { min-height: 250px; padding-top: 4px; }.lyrics-viewport { height: 165px; padding-top: 65px; padding-bottom: 70px; }.lyrics-line { font-size: 16px; } }
.lyrics-line { font-family: 'Quicksand', var(--body), sans-serif; font-size: 17px; font-weight: 600; line-height: 1.38; letter-spacing: .01em; }.lyrics-line.is-active { font-weight: 700; }
.key-card { padding: 42px 38px 34px; border-radius: 3px 18px 5px 14px; background: radial-gradient(circle at 86% 8%, rgba(229,183,95,.2), transparent 21%), linear-gradient(145deg, rgba(111,23,48,.98), rgba(27,9,18,.98) 82%); border: 1px solid rgba(229,183,95,.62); box-shadow: 14px 18px 0 rgba(0,0,0,.32), 0 28px 70px rgba(0,0,0,.42), inset 0 0 0 7px rgba(229,183,95,.045), inset 0 0 34px rgba(196,69,90,.12); transform: rotate(-1.5deg); }.key-card::before { inset: 14px; border: 1px solid rgba(229,183,95,.38); box-shadow: inset 0 0 0 1px rgba(196,69,90,.24); }.key-card::after { content: '✦  ♥  ✦'; right: 22px; bottom: 14px; color: rgba(229,183,95,.5); font: 15px var(--headline); letter-spacing: .4em; }.key-card__topline { position: relative; z-index: 1; padding-bottom: 14px; border-bottom: 1px solid rgba(229,183,95,.28); color: #f7d889; font-size: 10px; }.seal--small { position: relative; z-index: 2; width: 68px; height: 68px; margin: 18px auto 24px; color: #ffe8d4; font-size: 27px; box-shadow: 0 0 0 6px rgba(229,183,95,.08), 0 8px 16px rgba(0,0,0,.35), 0 0 26px rgba(196,69,90,.34); }.key-card label { position: relative; z-index: 1; margin: 0 0 7px 4px; color: #f7d889; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }.key-card input { position: relative; z-index: 1; margin-bottom: 20px; padding: 14px 15px 12px; border: 1px solid rgba(247,216,137,.28); border-radius: 2px; color: #fff0eb; background: rgba(8,4,8,.5); box-shadow: inset 0 2px 10px rgba(0,0,0,.18); font: 18px var(--headline); transition: border-color .2s, box-shadow .2s, transform .2s; }.key-card input:focus { border-color: #e5b75f; box-shadow: 0 0 0 3px rgba(229,183,95,.1), 0 0 18px rgba(196,69,90,.18); transform: translateY(-1px); }.peek { top: 7px; right: 10px; color: #f7d889; }.wax-button { position: relative; z-index: 1; margin-top: 8px; padding: 15px 16px 14px 19px; border-radius: 2px 10px 2px 10px; letter-spacing: .12em; box-shadow: 4px 6px 0 rgba(0,0,0,.28), 0 0 18px rgba(164,33,61,.2); }.form-hint { position: relative; z-index: 1; margin-top: 17px; color: rgba(247,216,137,.7); font-family: 'Quicksand', var(--body), sans-serif; }
@media (max-width: 700px) { .key-card { justify-self: center; width: min(100%, 420px); transform: rotate(-.6deg); } }
.letter-card { perspective: 700px; overflow: visible; }.envelope { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 3px 8px 4px 6px; background: radial-gradient(circle at 24% 18%, rgba(255,231,177,.22), transparent 23%), linear-gradient(145deg, #a52a48, #5f1028 78%); box-shadow: 4px 6px 0 rgba(91,52,40,.2), 0 12px 18px rgba(91,52,40,.15), inset 0 0 0 3px rgba(255,239,195,.08); transform-origin: center center; transition: transform .36s cubic-bezier(.2,.85,.25,1.2), box-shadow .36s ease, filter .36s ease; }.envelope::before { background: linear-gradient(140deg, transparent 47%, rgba(35,13,14,.22) 48%, transparent 50%), linear-gradient(40deg, transparent 47%, rgba(35,13,14,.22) 48%, transparent 50%); }.envelope::after { height: 53%; background: linear-gradient(145deg, #c04b62, #8d1834); clip-path: polygon(0 0, 100% 0, 50% 100%); box-shadow: 0 2px 0 rgba(45,8,18,.16); }.envelope-seal { width: 30px; height: 30px; border: 2px solid rgba(247,216,137,.7); background: radial-gradient(circle at 32% 25%, #d65362, #5f1028 76%); box-shadow: 0 0 0 3px rgba(229,183,95,.12), 1px 2px 0 rgba(32,12,11,.35), 0 0 13px rgba(196,69,90,.3); font-size: 14px; transition: transform .36s ease, box-shadow .36s ease; }.letter-card.is-opening .envelope { z-index: 5; transform: scale(1.22) rotate(-3deg) translateY(-5px); filter: brightness(1.2); box-shadow: 0 12px 0 rgba(91,52,40,.18), 0 22px 35px rgba(91,52,40,.28), 0 0 25px rgba(196,69,90,.4); }.letter-card.is-opening .envelope-seal { transform: translate(-50%, -42%) scale(1.15); box-shadow: 0 0 0 5px rgba(229,183,95,.16), 0 0 22px rgba(196,69,90,.5); }.letter-card.is-read .envelope { filter: saturate(.7); }.letter-card.is-read .envelope-seal { background: var(--gold); color: var(--red-deep); }
.envelope { overflow: visible; transform-style: preserve-3d; }
.envelope::before { z-index: 1; }
.envelope::after { z-index: 3; transform-origin: 50% 0; transform: rotateX(0deg); backface-visibility: hidden; transition: transform .62s cubic-bezier(.2,.8,.25,1), filter .62s ease; }
.envelope-paper { position: absolute; left: 10%; right: 10%; bottom: 9%; z-index: 2; height: 76%; border: 1px solid rgba(103,48,31,.28); background: repeating-linear-gradient(to bottom, transparent 0 12px, rgba(112,46,39,.15) 13px 14px), linear-gradient(135deg, #f1d39c, #c48e58); box-shadow: 0 3px 8px rgba(38,10,12,.28); opacity: 0; transform: translateY(108%) rotate(-1deg); transform-origin: center bottom; transition: transform .68s cubic-bezier(.18,.82,.28,1), opacity .25s ease; }
.envelope-paper::after { content: '♥'; position: absolute; right: 8px; bottom: 5px; color: rgba(95,16,40,.55); font: 12px var(--headline); }
.envelope-preview-text { position: relative; z-index: 1; display: block; padding: 17px 4px 16px; color: #5f3040; font: italic 600 10.5px/1.05 'Cormorant Garamond', Georgia, serif; letter-spacing: .01em; text-align: center; text-wrap: balance; }
.envelope-seal { z-index: 4; transition: transform .42s cubic-bezier(.2,.85,.25,1.2), box-shadow .42s ease, opacity .3s ease; }
.letter-card.is-opening .envelope { z-index: 5; transform: scale(1.22) rotate(-3deg) translateY(-5px); filter: brightness(1.2); box-shadow: 0 12px 0 rgba(91,52,40,.18), 0 22px 35px rgba(91,52,40,.28), 0 0 25px rgba(196,69,90,.4); }
.letter-card.is-opening .envelope::after { transform: rotateX(180deg); filter: brightness(.86); }
.letter-card.is-opening .envelope-paper { opacity: 1; transform: translateY(-42%) rotate(-1deg); }
.letter-card.is-opening .envelope-seal { transform: translate(-50%, -42%) scale(1.18) rotate(8deg); opacity: .18; box-shadow: 0 0 0 5px rgba(229,183,95,.16), 0 0 22px rgba(196,69,90,.5); }
.letter-card.is-closing .envelope { z-index: 5; transform: scale(1.08) rotate(1deg); }
.letter-card.is-closing .envelope::after { transform: rotateX(0deg); }
.letter-card.is-closing .envelope-paper { opacity: 0; transform: translateY(108%) rotate(1deg); }
.letter-card.is-closing .envelope-seal { opacity: 1; transform: translate(-50%, -42%) scale(1) rotate(0); }
.letter-modal.is-closing { pointer-events: none; }
.letter-modal.is-closing .letter-paper { transform: translateY(18px) rotate(-5deg) scaleX(.22) scaleY(.42); filter: blur(1px) drop-shadow(0 12px 15px rgba(0,0,0,.3)); }
.letter-paper { transform: translateY(22px) rotate(-5deg); opacity: 0; transition: transform .62s cubic-bezier(.2,.85,.25,1.05), opacity .22s ease, filter .3s ease; }
.letter-modal.is-visible .letter-paper { transform: translateY(0) rotate(-1deg); opacity: 1; filter: drop-shadow(0 24px 25px rgba(0,0,0,.42)); }
.letter-modal.is-closing .letter-paper { transform: translateY(18px) rotate(-5deg); opacity: 0; filter: drop-shadow(0 12px 15px rgba(0,0,0,.3)); }
.jar-letter { position: relative; display: block; width: 29px; height: 20px; border: 1px solid rgba(91,52,40,.4); border-radius: 2px 4px 2px 3px; background: #e9c98f; box-shadow: 1px 2px 0 rgba(38,15,11,.2), inset 0 0 0 1px rgba(255,244,202,.25); font-size: 0; overflow: visible; }
.jar-letter::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(145deg, transparent 47%, rgba(91,52,40,.22) 48%, transparent 50%), linear-gradient(35deg, transparent 47%, rgba(91,52,40,.18) 48%, transparent 50%); pointer-events: none; }
.jar-letter-paper { position: absolute; inset: 0; display: block; background: linear-gradient(145deg, rgba(255,242,190,.18), transparent 44%), repeating-linear-gradient(to bottom, transparent 0 5px, rgba(112,46,39,.1) 6px 7px); }
.jar-letter-number { position: absolute; left: 3px; bottom: 2px; z-index: 2; color: rgba(95,16,40,.65); font: 5px/1 var(--cute, 'Quicksand', sans-serif); }
.jar-letter-seal { position: absolute; top: 50%; left: 50%; z-index: 3; display: grid; place-items: center; width: 9px; height: 9px; transform: translate(-50%, -50%); border: 1px solid rgba(247,216,137,.75); border-radius: 50%; color: #f7d889; background: #7a1730; box-shadow: 0 1px 2px rgba(38,15,11,.3); font: 6px/1 Georgia, serif; }
.jar-letter:nth-child(3n) { background: #d99d73; }
.jar-letter:nth-child(4n) { background: #f1d4a0; }
.jar-sidecar { background: radial-gradient(circle at 50% 46%, rgba(229,183,95,.16), transparent 34%), radial-gradient(circle at 15% 8%, rgba(196,69,90,.2), transparent 28%), linear-gradient(155deg, #531c2b 0%, #2b101b 58%, #10080e 100%); box-shadow: 12px 16px 0 rgba(45,20,14,.25), 0 24px 40px rgba(0,0,0,.32), inset 0 0 35px rgba(229,183,95,.06); }
.jar-sidecar::before { inset: 9px; border-color: rgba(247,216,137,.3); box-shadow: inset 0 0 0 1px rgba(196,69,90,.2), 0 0 20px rgba(229,183,95,.08); }
.jar-illustration { perspective: 900px; transform: rotateY(-4deg) rotateX(1deg); transform-style: preserve-3d; filter: drop-shadow(0 20px 15px rgba(0,0,0,.32)); }
.jar-illustration::before { content: ''; position: absolute; left: 18%; right: 18%; bottom: 2px; height: 40px; border-radius: 50%; background: rgba(229,183,95,.22); filter: blur(18px); transform: translateZ(-20px); }
.jar-illustration::after { content: '♡  LOVE LETTERS  ♡'; position: absolute; left: 50%; bottom: 12px; z-index: 6; width: 104px; padding: 5px 4px 4px; transform: translateX(-50%) rotate(-2deg); border: 1px solid rgba(247,216,137,.62); color: #f7d889; background: linear-gradient(145deg, rgba(95,16,40,.92), rgba(45,8,24,.94)); box-shadow: 0 3px 0 rgba(25,4,12,.35), inset 0 0 0 1px rgba(229,183,95,.14); font: 8px var(--display); letter-spacing: .08em; text-align: center; }
.jar-lid { width: 96px; height: 22px; border: 1px solid rgba(247,216,137,.78); border-radius: 7px 7px 4px 4px; background: linear-gradient(180deg, #f0c879 0%, #b8783d 27%, #6c2d2d 74%, #3e1422 100%); box-shadow: 0 3px 0 #2b0d17, 0 6px 10px rgba(0,0,0,.32), inset 0 2px 0 rgba(255,246,190,.48), inset 0 -4px 0 rgba(45,8,20,.25); transform: translateX(-50%) translateZ(18px); }
.jar-lid::before { content: ''; position: absolute; left: 5px; right: 5px; top: 6px; height: 1px; background: rgba(255,240,178,.55); box-shadow: 0 4px 0 rgba(255,240,178,.3), 0 8px 0 rgba(70,20,24,.3); }
.jar-lid::after { content: '♥'; position: absolute; left: 50%; top: -3px; display: grid; place-items: center; width: 22px; height: 22px; transform: translateX(-50%); border: 1px solid rgba(247,216,137,.65); border-radius: 50%; color: #f7d889; background: #74152e; box-shadow: 0 2px 4px rgba(0,0,0,.3); font: 12px/1 Georgia, serif; }
.jar-neck { width: 78px; height: 46px; border-color: rgba(255,240,190,.58); background: linear-gradient(90deg, rgba(255,244,202,.04), rgba(255,244,202,.3) 46%, rgba(255,244,202,.07)); box-shadow: inset 8px 0 12px rgba(255,250,220,.08), inset -8px 0 12px rgba(28,6,15,.2); transform: translateX(-50%) translateZ(7px); }
.jar-body { width: 154px; height: 194px; border: 1px solid rgba(255,239,190,.68); background: linear-gradient(105deg, rgba(255,250,220,.09) 0%, rgba(255,240,190,.27) 22%, rgba(255,255,240,.1) 46%, rgba(107,31,49,.16) 76%, rgba(20,5,13,.28) 100%), radial-gradient(ellipse at 50% 86%, rgba(229,183,95,.25), transparent 50%), linear-gradient(180deg, rgba(255,239,195,.16), rgba(91,19,42,.24)); box-shadow: inset 13px 0 24px rgba(255,250,220,.12), inset -18px 0 28px rgba(21,4,13,.3), inset 0 0 0 3px rgba(255,247,211,.08), 0 18px 25px rgba(0,0,0,.32); transform: translateX(-50%) translateZ(0); backdrop-filter: blur(2px); }
.jar-body::before { content: ''; position: absolute; inset: 2px; z-index: 4; border-radius: inherit; background: linear-gradient(105deg, rgba(255,255,240,.3), transparent 11% 68%, rgba(255,240,190,.12) 84%, transparent 94%); pointer-events: none; }
.jar-highlight { left: 16px; width: 13px; height: 136px; background: linear-gradient(180deg, rgba(255,255,240,.46), rgba(255,255,240,.04)); filter: blur(.3px); box-shadow: 0 0 13px rgba(255,247,215,.24); }
.jar-letters { inset: 33px 13px 40px; transform: translateZ(5px); }
@media (max-width: 570px) {
  .jar-body { width: 108px; height: 140px; border-radius: 19px 19px 26px 26px; }
  .jar-neck { width: 57px; height: 32px; }
  .jar-lid { width: 70px; height: 17px; }
  .jar-lid::after { width: 18px; height: 18px; font-size: 10px; }
  .jar-letters { inset: 24px 9px 30px; gap: 3px 2px; }
  .jar-illustration::after { bottom: 9px; width: 82px; padding: 4px 2px 3px; font-size: 6px; }
  .jar-highlight { left: 12px; height: 92px; width: 9px; }
}
.key-card__topline { font-family: 'IM Fell English SC', 'Cormorant Garamond', Georgia, serif; font-size: 12px; letter-spacing: .16em; text-shadow: 0 1px 0 rgba(0,0,0,.22); }
.key-card label { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 17px; font-weight: 600; letter-spacing: .04em; text-transform: none; }
.key-card input { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 21px; font-weight: 600; letter-spacing: .02em; }
.key-card input::placeholder { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 500; }
.form-hint { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 15px; font-style: italic; letter-spacing: .015em; }
.wax-button { font-family: 'IM Fell English SC', 'Cormorant Garamond', Georgia, serif; font-size: 14px; letter-spacing: .12em; }
.key-card { background: radial-gradient(circle at 50% 0%, rgba(229,183,95,.13), transparent 28%), linear-gradient(145deg, #6f1730, #1b0912 82%); animation: registerPageTurn .85s cubic-bezier(.2,.85,.25,1.05) both; transform-origin: 82% 12%; }
@keyframes registerPageTurn { 0% { opacity: 0; transform: perspective(900px) rotateY(-12deg) rotate(1deg) translateX(18px); filter: brightness(1.2); } 65% { opacity: 1; transform: perspective(900px) rotateY(2deg) rotate(1deg) translateX(-2px); filter: brightness(1.04); } 100% { opacity: 1; transform: perspective(900px) rotateY(0) rotate(1deg) translateX(0); filter: brightness(1); } }
.wax-button { position: relative; overflow: hidden; isolation: isolate; transition: transform .24s cubic-bezier(.2,.85,.25,1.2), box-shadow .24s ease, filter .24s ease; }
.wax-button::before { content: ''; position: absolute; inset: -40% auto -40% -28%; z-index: -1; width: 24%; transform: translateX(-160%) rotate(18deg); background: linear-gradient(90deg, transparent, rgba(255,240,181,.58), transparent); transition: transform .55s ease; }
.wax-button:hover, .wax-button:focus-visible { transform: translateY(-3px) scale(1.015); filter: brightness(1.12); box-shadow: 4px 7px 0 rgba(53,6,20,.35), 0 0 24px rgba(229,183,95,.28), 0 0 42px rgba(196,69,90,.22); outline: none; }
.wax-button:hover::before, .wax-button:focus-visible::before { transform: translateX(620%) rotate(18deg); }
.wax-button:active { transform: translateY(2px) scale(.975); box-shadow: 2px 2px 0 rgba(53,6,20,.4), 0 0 14px rgba(229,183,95,.18); filter: brightness(.96); }
