@font-face {
  font-family: "Magic Hand";
  src: url("fonts/caveat-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

/* One letter on a desk, with the world waiting behind it. No photo or WebGL UI assets. */
.magic-invitation {
  --magic-ink: #352e29;
  --magic-paper: #f5ead0;
  --magic-gold: #96702b;
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  padding: max(14px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  color: var(--magic-ink);
  background: radial-gradient(ellipse at 48% 38%, #3f74636b 0, transparent 63%), linear-gradient(140deg, #182943f7, #131f35f7 60%, #233b40f7);
  font: 400 14px/1.5 Inter, sans-serif;
  isolation: isolate;
  overscroll-behavior: contain;
}
.magic-invitation[hidden], .magic-invitation [hidden], .magic-notebook[hidden], .magic-toast[hidden] { display: none; }
.magic-invitation *, .magic-notebook *, .magic-toast * { box-sizing: border-box; }
.magic-invitation button, .magic-invitation a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.magic-invitation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1100px, 100%);
  margin: 0 auto;
  flex: none;
}
.magic-invitation-heading { display: flex; align-items: center; gap: 11px; }
.magic-invitation-heading h1 { margin: 0; color: #f4ecd8; font: 400 15px/1.4 Fraunces, serif; }
.magic-small-seal {
  width: 31px; height: 33px; display: grid; place-items: center;
  background: #943e32; border: 1px solid #c07454; color: #f6e5c5;
  font: 400 14px Fraunces, serif; border-radius: 4px 2px 4px 2px; transform: rotate(-4deg);
  box-shadow: inset 0 0 0 2px #6c2f292c;
}
.magic-invitation-links { display: flex; align-items: center; gap: 9px; }
.magic-invitation-link {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 7px 11px; color: #f4ecd8; border-bottom: 1px solid #c8ae764f;
  text-decoration: none; font-size: 12px; white-space: nowrap;
}
.magic-invitation-link:hover { color: #ffe4ac; border-color: #e7c686; }
.magic-invitation-close { width: 44px; height: 44px; display: grid; place-items: center; padding: 10px; background: none; border: 0; color: #f4ecd8; border-radius: 2px; }
.magic-invitation-close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.magic-invitation-close:hover { background: #fff1ce14; }
.magic-invitation :is(a,button):focus-visible { outline: 2px solid #f6cf77; outline-offset: 4px; }
.magic-invitation-stage {
  min-height: 0; flex: 1; display: grid; align-items: center; justify-items: center;
  overflow-y: auto; overflow-x: hidden; padding: 28px 14px 24px;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #baa376 #18273b;
  -webkit-overflow-scrolling: touch;
}
.magic-envelope-scene { width: min(560px, 100%); text-align: center; padding: 12px 0 6px; }
.magic-envelope-eyebrow { color: #d4c8aa; font-size: 11px; letter-spacing: .12em; margin: 0 0 6px; }
.magic-envelope-title { color: #f6ead0; font: 600 clamp(34px, 5vw, 47px)/1.15 "Magic Hand", cursive; margin: 0 0 42px; }
.magic-envelope {
  --magic-grain: repeating-linear-gradient(2deg, transparent 0 5px, #754f2005 6px 7px);
  position: relative; display: block; width: 100%; aspect-ratio: 1.68;
  padding: 0; border: 1px solid #d2bd91; border-radius: 2px 4px 3px 2px;
  background: var(--magic-grain), linear-gradient(25deg,#e3cf9f,#f2e3bf 70%);
  box-shadow: 0 25px 50px #09191555, 0 4px 7px #08181540, inset 0 0 50px #bf9b5530;
  cursor: pointer; transform: rotate(-2deg); transition: transform .3s ease, box-shadow .3s ease;
}
.magic-envelope:hover { transform: rotate(-1deg) translateY(-3px); box-shadow: 0 28px 55px #09191555, 0 4px 7px #08181540; }
.magic-envelope:active { transform: rotate(-1deg) translateY(0); }
.magic-envelope-letter {
  position: absolute; left: 7%; right: 7%; top: -20px; height: 58%; padding: 20px 24px;
  text-align: left; background: #f8efd9; color: #63503a;
  border: 1px solid #dbc69b; box-shadow: 0 -4px 10px #1a2b2920;
  font: 600 28px/1 "Magic Hand", cursive; transform: rotate(1deg);
}
.magic-envelope-back { position: absolute; inset: 0; background: linear-gradient(150deg,#e2cd9d,#f4e7c8); }
.magic-envelope-fold { position: absolute; inset: 0; pointer-events: none; }
.magic-envelope-fold-left { background: linear-gradient(75deg,#e6d1a6,#efddb9); clip-path: polygon(0 0,54% 54%,0 100%); }
.magic-envelope-fold-right { background: linear-gradient(285deg,#d9bf8f,#f0debb); clip-path: polygon(100% 0,46% 54%,100% 100%); }
.magic-envelope-fold-bottom { background: linear-gradient(2deg,#e4cda0,#f2e2c0); clip-path: polygon(0 100%,50% 45%,100% 100%); }
.magic-envelope-flap { position: absolute; inset: 0; background: linear-gradient(168deg,#f4e5c5 25%,#e6cfa1 75%); clip-path: polygon(0 0,100% 0,50% 57%); filter: drop-shadow(0 2px 1px #977e5440); }
.magic-envelope-thread { position: absolute; inset: 0; width: 100%; height: 100%; stroke: #aa873f; stroke-width: .9; opacity: .75; pointer-events: none; }
.magic-wax-seal {
  position: absolute; width: 69px; height: 67px; left: 50%; top: 54%; transform: translate(-50%,-50%) rotate(-9deg);
  display: grid; place-items: center; border-radius: 46% 54% 48% 52% / 53% 48% 52% 47%;
  background: radial-gradient(circle at 34% 25%,#c37659 0,#a34e3d 43%,#77382f 79%,#a35e42 96%);
  border: 1px solid #8c3e2f; box-shadow: 1px 3px 2px #5c34234a, inset 1px 1px 1px #dda47b70, inset -2px -2px 2px #552a2d70;
}
.magic-wax-seal::before { content: ""; position: absolute; inset: 10px; border: 1px solid #dfb2937a; border-radius: 50%; box-shadow: inset 1px 1px 2px #612d2c70; }
.magic-wax-seal span { font: 400 22px Fraunces, serif; color: #e3b391; text-shadow: -1px -1px #67342e, 0 1px #e7ae7980; }
.magic-read-letter { color: #f1dfb9; background: none; border: 0; border-bottom: 1px solid #bb9e6866; margin-top: 29px; padding: 9px 2px; min-height: 44px; font: inherit; }
.magic-read-letter svg { display: inline-block; width: 16px; height: 16px; margin-left: 9px; vertical-align: -3px; fill: none; stroke: #d2ad5e; stroke-width: 1.4; }
.magic-read-letter:hover { color: #fff2d1; border-color: #dab972; }
.magic-letter-paper {
  position: relative; width: min(610px, 100%); align-self: start; margin: auto;
  padding: 19px clamp(25px,5vw,48px) 27px; color: var(--magic-ink);
  background: repeating-linear-gradient(3deg,transparent 0 11px,#76502704 12px 13px), radial-gradient(ellipse at 25% 0,#fff8e595,transparent 70%), linear-gradient(105deg,#efe1bd,#faf0d9 48%,#f0e0bd);
  border: 1px solid #d4bf97; border-radius: 1px 2px 3px 1px;
  box-shadow: 0 20px 50px #071a164a, inset 0 0 50px #bc915012;
  animation: magic-letter-arrive .38s ease-out both;
}
.magic-letter-paper::before { content: ""; position: absolute; inset: 8px; border: 1px solid #b693452b; pointer-events: none; }
.magic-letter-flourish { display: block; width: 100%; height: 42px; margin-bottom: 12px; stroke: #ad8b48; stroke-width: .9; opacity: .7; }
.magic-letter-greeting { margin: 0 0 13px; font: 600 clamp(31px,4.2vw,36px)/1.1 "Magic Hand", cursive; }
.magic-letter-greeting:focus { outline: none; }
.magic-letter-ink { font: 600 clamp(25px,3.4vw,29px)/1.24 "Magic Hand", cursive; letter-spacing: .005em; }
.magic-letter-ink p { margin: 0 0 14px; }
.magic-letter-signature { position: relative; width: fit-content; margin: 2px 0 0 10px; font: 600 39px/1.2 "Magic Hand", cursive; transform: rotate(-4deg); }
.magic-signature-stroke { position: absolute; left: 5px; right: -15px; bottom: -3px; height: 6px; border-bottom: 1px solid #705638; border-radius: 50%; transform: rotate(-3deg); }
.magic-letter-stamp { position: absolute; bottom: 30px; right: 37px; width: 35px; height: 38px; display: grid; place-items: center; border: 1px solid #a04f3ca8; box-shadow: inset 0 0 0 2px #9d50371c; color: #994934; font: 400 15px Fraunces, serif; transform: rotate(4deg); opacity: .8; }
.magic-invitation-footer { flex: none; text-align: center; padding: 7px 0 0; }
.magic-enter-world { display: inline-flex; align-items: center; justify-content: space-between; gap: 27px; min-width: 210px; min-height: 48px; padding: 11px 22px; border: 1px solid #dbc086; border-radius: 2px 5px 2px 5px; background: linear-gradient(125deg,#ead3a0,#f6e5bc); color: #3e392d; box-shadow: 0 3px 0 #12282480; font: 600 14px/1.4 Inter,sans-serif; transition: background .2s, transform .2s; }
.magic-enter-world:hover:not(:disabled) { background: #ffedc1; transform: translateY(-1px); }
.magic-enter-world:active:not(:disabled) { transform: translateY(1px); }
.magic-enter-world:disabled { cursor: wait; color: #dfd0aa; border-color: #c0a77765; background: #6880733b; box-shadow: none; }
.magic-enter-arrow { font-size: 21px; line-height: 1; }
.magic-invitation-note { color: #cabea1; font-size: 11px; margin: 9px 0 0; }
.magic-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Optional runtime-owned utilities: discoveries are book entries, never unlock cards. */
.magic-toolbox { position: absolute; z-index: 25; right: max(18px,env(safe-area-inset-right)); bottom: calc(78px + env(safe-area-inset-bottom)); display: flex; gap: 9px; }
.magic-letter-button, .magic-notebook-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 12px; border: 1px solid #a7884d; border-radius: 2px 5px 2px 5px; color: #393b2d; background: #f5e7cafa; font: 600 12px/1.4 Inter,sans-serif; box-shadow: 0 2px 7px #17292021; }
.magic-letter-button:hover, .magic-notebook-button:hover { background: #fff1d4; border-color: #806231; }
.magic-letter-button svg, .magic-notebook-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.magic-letter-button:focus-visible, .magic-notebook-button:focus-visible, .magic-notebook :is(button,a):focus-visible { outline: 2px solid #845925; outline-offset: 3px; }
.magic-notebook {
  position: absolute; z-index: 50; right: max(18px,env(safe-area-inset-right));
  top: 22px; bottom: calc(136px + env(safe-area-inset-bottom)); width: min(370px,calc(100% - 36px));
  display: flex; flex-direction: column; color: #393629; background: #f6ebd1;
  border: 1px solid #bda576; border-left: 8px solid #725542; border-radius: 2px 5px 5px 2px;
  box-shadow: 0 12px 35px #172b3040, inset 4px 0 8px #6b4a1f15; font: 400 13px/1.6 Inter,sans-serif;
}
.magic-notebook-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding: 22px 23px 16px; border-bottom: 1px solid #b89c6138; }
.magic-notebook h2 { font: 600 29px/1.1 "Magic Hand",cursive; margin: 0; }
.magic-notebook-header p { font-size: 11px; margin: 7px 0 0; color: #746b57; }
.magic-notebook-close { flex: none; min-width: 44px; min-height: 44px; margin: -9px -10px 0 0; background: none; border: 0; color: inherit; font-size: 22px; }
.magic-notebook-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 3px 23px 24px; }
.magic-notebook-list { margin: 0; padding: 0; list-style: none; }
.magic-notebook-entry { position: relative; padding: 17px 0 16px; border-bottom: 1px solid #bca6754d; }
.magic-notebook-entry h3 { margin: 0 0 4px; font: 400 17px/1.3 Fraunces,serif; }
.magic-notebook-entry p { margin: 4px 0; font-size: 12px; }
.magic-notebook-entry a, .magic-notebook-entry button { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 0; color: #73561f; background: none; border: 0; text-decoration: underline; text-underline-offset: 4px; font: 600 12px/1.4 Inter,sans-serif; }
.magic-notebook-empty { padding: 22px 0; color: #736953; font-size: 13px; }
.magic-notebook-footnote { color: #756c57; font-size: 11px; margin: 18px 0 0; }
.magic-toast { position: absolute; z-index: 35; top: 22px; left: 50%; transform: translateX(-50%); max-width: min(440px,calc(100% - 40px)); padding: 11px 17px; border-top: 1px solid #ba9556; border-bottom: 1px solid #ba9556; background: #fff0d6f5; color: #39382a; box-shadow: 0 5px 18px #213b2b1a; text-align: center; font: 400 12px/1.5 Inter,sans-serif; pointer-events: none; }

@keyframes magic-letter-arrive { from { opacity: 0; transform: translateY(12px) rotate(-.5deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }
@media (max-width: 600px) {
  .magic-invitation { padding-right: max(12px,env(safe-area-inset-right)); padding-left: max(12px,env(safe-area-inset-left)); }
  .magic-invitation-header { gap: 8px; }
  .magic-invitation-heading h1 { font-size: 12px; max-width: 120px; }
  .magic-invitation-heading { gap: 8px; }
  .magic-invitation-links { gap: 2px; }
  .magic-invitation-link { font-size: 11px; padding: 7px 8px; }
  .magic-invitation-stage { padding: 21px 4px 16px; }
  .magic-envelope-title { margin-bottom: 36px; }
  .magic-envelope-scene { padding-inline: 4px; }
  .magic-envelope-letter { font-size: 24px; padding: 14px 18px; top: -15px; }
  .magic-wax-seal { width: 54px; height: 53px; }
  .magic-wax-seal::before { inset: 8px; }
  .magic-wax-seal span { font-size: 19px; }
  .magic-letter-paper { padding: 16px 25px 29px; }
  .magic-letter-flourish { height: 30px; margin-bottom: 13px; }
  .magic-letter-ink { font-size: 25px; line-height: 1.25; }
  .magic-letter-greeting { font-size: 31px; }
  .magic-letter-stamp { right: 27px; bottom: 27px; }
  .magic-invitation-footer { padding-top: 4px; }
  .magic-enter-world { min-height: 46px; }
  .magic-toolbox { right: 14px; bottom: calc(113px + env(safe-area-inset-bottom)); gap: 7px; }
  .magic-letter-button, .magic-notebook-button { padding: 9px 10px; font-size: 11px; }
  .magic-notebook { top: 14px; bottom: calc(168px + env(safe-area-inset-bottom)); right: 12px; width: calc(100% - 24px); }
  .magic-toast { top: 82px; max-width: calc(100% - 32px); }
}
@media (max-width: 390px) {
  .magic-invitation-heading h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .magic-invitation-links { gap: 4px; }
  .magic-invitation-stage { padding-inline: 3px; }
  .magic-letter-paper { padding-inline: 21px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .magic-invitation { padding-block: max(6px,env(safe-area-inset-top)) max(7px,env(safe-area-inset-bottom)); }
  .magic-invitation-stage { padding-block: 12px; }
  .magic-envelope-scene { max-width: 340px; }
  .magic-envelope-eyebrow, .magic-invitation-note { display: none; }
  .magic-envelope-title { font-size: 29px; margin-bottom: 20px; }
  .magic-read-letter { margin-top: 12px; }
  .magic-enter-world { min-height: 42px; padding-block: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .magic-letter-paper { animation: none; }
  .magic-envelope, .magic-enter-world { transition: none; }
  .magic-envelope:hover, .magic-envelope:active, .magic-enter-world:hover:not(:disabled), .magic-enter-world:active:not(:disabled) { transform: none; }
}

/* Invitation details: a double rule on the flap, a whale stamp with a Dalian to San Francisco postmark,
   a snowy owl feather under the seal, a little gold paw, floating sparkles, and a pagoda watermark. */
.magic-envelope-rule { position: absolute; inset: 0; width: 100%; height: 100%; stroke: #2a56b4; stroke-width: 1; opacity: .5; pointer-events: none; }
.magic-envelope-rule path + path { stroke: #c9a55a; opacity: .9; }
.magic-envelope-feather { position: absolute; left: 51%; top: 28%; width: 30px; height: 96px; transform: rotate(38deg); transform-origin: 50% 80%; pointer-events: none; }
.magic-envelope-feather path { fill: #fbfaf6; stroke: #b9b3a6; stroke-width: .8; }
.magic-envelope-feather .shade { fill: #6b4f2a; stroke: none; opacity: .18; }
.magic-envelope-feather .spine { fill: none; stroke: #9c9486; stroke-width: .8; }
.magic-envelope-feather .barbs { fill: none; stroke: #cfc9bc; stroke-width: .6; }
.magic-envelope-feather circle { fill: #7d7a74; }
.magic-envelope-stamp { position: absolute; right: 5%; top: 7%; width: 74px; height: 58px; padding: 5px; transform: rotate(3deg); pointer-events: none;
  background: radial-gradient(circle at 0 0,transparent 2.5px,#fbf6ea 3px) -4px -4px/8px 8px; }
.magic-envelope-stamp svg { display: block; width: 100%; height: 100%; box-shadow: 0 0 0 1px #e8dcc0; background: linear-gradient(170deg,#1f3f70,#2c6a8f 70%,#3f8aa0); }
.magic-envelope-stamp .sea { fill: #8fc6d3; opacity: .55; }
.magic-envelope-stamp .whale { fill: #eef4f6; }
.magic-envelope-stamp .spout { fill: none; stroke: #eef4f6; stroke-width: 1.2; stroke-linecap: round; }
.magic-envelope-stamp circle { fill: #1f3f70; }
.magic-envelope-postmark { position: absolute; right: 9%; top: 13%; width: 120px; height: 70px; fill: none; stroke: #4a3f6a; stroke-width: 1.1; opacity: .55; transform: rotate(-11deg); pointer-events: none; }
.magic-envelope-postmark text { fill: #4a3f6a; stroke: none; font: 600 6.4px/1 "Courier New",monospace; letter-spacing: .06em; }
.magic-envelope-postmark .date { font-size: 8px; }
.magic-envelope-paw { position: absolute; left: 7%; bottom: 9%; width: 26px; height: 26px; fill: #c9a55a; opacity: .7; transform: rotate(-18deg); pointer-events: none; }
.magic-envelope-sparkles { position: absolute; inset: -18px; pointer-events: none; }
.magic-envelope-sparkles i { position: absolute; width: 7px; height: 7px; background: radial-gradient(circle,#fff6d2,#f2c96a 45%,transparent 70%); border-radius: 50%; opacity: 0; animation: magic-twinkle 3.2s ease-in-out infinite; }
.magic-envelope-sparkles i:nth-child(1){left:2%;top:12%;animation-delay:.1s}.magic-envelope-sparkles i:nth-child(2){left:96%;top:22%;animation-delay:.7s}.magic-envelope-sparkles i:nth-child(3){left:88%;top:94%;animation-delay:1.3s}.magic-envelope-sparkles i:nth-child(4){left:8%;top:84%;animation-delay:1.9s}
.magic-envelope-sparkles i:nth-child(5){left:48%;top:-2%;animation-delay:2.4s}.magic-envelope-sparkles i:nth-child(6){left:99%;top:62%;animation-delay:.4s}.magic-envelope-sparkles i:nth-child(7){left:-1%;top:48%;animation-delay:1.6s}.magic-envelope-sparkles i:nth-child(8){left:60%;top:101%;animation-delay:2.8s}
/* opacity only: animating a transform inside the tilted envelope upsets some compositors */
@keyframes magic-twinkle { 0%,100% { opacity: 0; } 45% { opacity: 1; } 60% { opacity: .7; } }
.magic-letter-watermark { position: absolute; left: 50%; top: 50%; width: 46%; max-width: 230px; transform: translate(-50%,-50%); fill: none; stroke: #8a6a3a; stroke-width: 1.2; opacity: .07; pointer-events: none; }
.magic-letter-ink, .magic-letter-greeting, .magic-letter-signature { position: relative; }
.magic-letter-ps { position: relative; margin: 18px 0 0; padding-top: 10px; border-top: 1px dashed #b6934566; font: 600 clamp(21px,3vw,24px)/1.25 "Magic Hand", cursive; color: #6a4f33; }
.magic-letter-paw { position: absolute; right: 82px; bottom: 26px; width: 30px; height: 30px; fill: #a04f3c; opacity: .45; transform: rotate(16deg); pointer-events: none; }
@media (max-width: 700px) {
  .magic-envelope-stamp { width: 56px; height: 44px; }
  .magic-envelope-postmark { width: 92px; height: 54px; right: 6%; }
  .magic-envelope-feather { width: 22px; height: 70px; }
  .magic-letter-paw { right: 68px; bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) { .magic-envelope-sparkles i { animation: none; opacity: .6; } }

/* Knock, knock, knock: the entrance */
.magic-knock { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; align-content: center; gap: 10px; background: radial-gradient(ellipse at 50% 52%, #0b182a55 0, #07101dcc 70%); color: #f6ead0; cursor: pointer; animation: magic-knock-in .35s ease-out both; }
.magic-knock.is-leaving { animation: magic-knock-out .6s ease-in forwards; }
@keyframes magic-knock-in { from { opacity: 0; } }
@keyframes magic-knock-out { to { opacity: 0; } }
.magic-knock-rings { position: absolute; left: 50%; top: 52%; width: 0; height: 0; pointer-events: none; }
.magic-knock-rings i { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border: 2px solid #f2d79a; border-radius: 50%; opacity: 0; animation: magic-knock-ring 1.3s ease-out forwards; }
@keyframes magic-knock-ring { 0% { transform: scale(.4); opacity: .85; } 100% { transform: scale(4.2); opacity: 0; } }
.magic-knock-words { position: relative; margin: 0; display: grid; gap: 6px; text-align: center; }
.magic-knock-knocks { min-height: 1.2em; font: 600 clamp(28px, 4.2vw, 42px)/1.15 "Magic Hand", cursive; letter-spacing: .02em; color: #e9cf91; }
.magic-knock-name { min-height: 1.1em; font: 600 clamp(52px, 9vw, 96px)/1 "Magic Hand", cursive; text-shadow: 0 0 22px #f2c96a66, 0 2px 0 #0008; }
.magic-knock-name.is-answer { font-size: clamp(40px, 6vw, 64px); color: #fff2cf; }
.is-pop { animation: magic-knock-pop .45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes magic-knock-pop { from { opacity: 0; transform: scale(.7) translateY(8px); } }
.magic-knock-skip { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0; text-align: center; font: 400 11px/1.4 Inter, sans-serif; letter-spacing: .08em; color: #d9c9a3aa; }
@media (prefers-reduced-motion: reduce) { .magic-knock-rings { display: none; } .is-pop { animation: none; } }

/* Progress while the island is built: the enter button fills like a lantern being lit, and the loading
   screen has a thin gold thread that grows (it shimmers until the first step is known). */
.magic-enter-world.is-loading { position: relative; overflow: hidden; }
.magic-enter-world.is-loading::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--progress, 4%); background: linear-gradient(90deg, rgba(214, 170, 92, .22), rgba(240, 204, 128, .42)); box-shadow: 1px 0 6px rgba(255, 214, 140, .55); transition: width .5s ease; pointer-events: none; }
.magic-enter-world.is-loading > * { position: relative; }
/* a slow sweep of light that keeps moving even while the page is busy building (it runs on the
   compositor: transform only) */
.magic-enter-world.is-loading::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%; background: linear-gradient(90deg, transparent, rgba(255, 236, 190, .3), transparent); animation: enterSweep 1.9s linear infinite; pointer-events: none; will-change: transform; }
@keyframes enterSweep { from { transform: translateX(-100%); } to { transform: translateX(270%); } }
.world-loading .loading-bar { position: relative; width: min(220px, 60vw); height: 3px; margin: 12px auto 8px; border-radius: 3px; background: rgba(252, 240, 215, .16); overflow: hidden; }
.world-loading .loading-bar > span { position: absolute; inset: 0 auto 0 0; width: 30%; border-radius: 3px; background: linear-gradient(90deg, #c9a352, #f3d48e); box-shadow: 0 0 8px rgba(243, 212, 142, .7); animation: loadingShimmer 1.6s ease-in-out infinite; will-change: transform; }
.world-loading .loading-bar.is-known > span { width: var(--progress, 0%); animation: none; transition: width .5s ease; }
.world-loading .loading-bar.is-known::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255, 246, 214, .7), transparent); animation: loadingShimmer 1.6s linear infinite; will-change: transform; }
@keyframes loadingShimmer { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { .world-loading .loading-bar > span, .world-loading .loading-bar::after, .magic-enter-world.is-loading::after { animation: none; } }
