
:root {
  --night: #050818;
  --sky-ink: #f3ead9;
  --sky-ink-soft: rgba(243, 234, 217, 0.8);
  --dawn-ink: #2c2638;
  --crimson: #a8102c;
  --crimson-deep: #7c0a20;
  --gold: #b98a45;
  --gold-soft: #e2c48e;
  --note-ink: #efd9b8;
  --paper: #fbf3e8;
  --ink: #3b4036;
  --display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --body: "EB Garamond", Garamond, "Times New Roman", serif;
  --script: "Pinyon Script", "Tiro Devanagari Names", "Snell Roundhand", "Apple Chancery", cursive;   
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --tw: 300px;
  --th: 476px;
  --L: 44px;
  --on-sky: var(--sky-ink);
  --on-sky-soft: var(--sky-ink-soft);
  color-scheme: dark;
}
html { margin: 0; scrollbar-color: var(--crimson) transparent; }
body {
  margin: 0;
  background: var(--night);
  color: var(--sky-ink);
  font-family: var(--body);
  font-size: 18px;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 3.2s ease;
}
::selection { background: var(--crimson); color: var(--paper); }
[hidden] { display: none !important; }
body.dawn {
  background: #7a5f6f;
  --sky-ink: #2c2638;
  --sky-ink-soft: rgba(44, 38, 56, 0.84);
  --gold-soft: #6f4c1a;
  --note-ink: #4a2a17;
  --on-sky: var(--dawn-ink);
  --on-sky-soft: rgba(44, 38, 56, 0.84);
}
.layer { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; display: block; pointer-events: none; }
#sky-night, #sky-dawn, #stars { z-index: 0; }
.sky-stars, .meteors { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.con-stars { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 0; pointer-events: none; }
.sky-stars span, .con-stars span { position: absolute; border-radius: 50%; }
.sky-stars .grp, .con-stars .grp { position: absolute; left: 0; top: 0; will-change: opacity; animation: 1s cubic-bezier(.37, 0, .63, 1) infinite alternate; }
.sky-stars .grp { width: 100%; height: 100%; }
.grp.full { animation-name: tw-full; } .grp.c { animation-name: tw-cons; } .grp.f { animation-name: tw-far; }
.con-stars span::after { content: ""; position: absolute; left: 50%; top: 50%; width: var(--core); height: var(--core); translate: -50% -50%; border-radius: 50%; background: var(--core-c); }
@keyframes tw-full { from { opacity: 0; } to { opacity: 1; } }
@keyframes tw-cons { from { opacity: 0.82; } to { opacity: 1; } }
@keyframes tw-far { from { opacity: 0.8; } to { opacity: 1; } }
.meteors span { position: absolute; left: 0; top: 0; height: 1.3px; margin-top: -0.65px; transform-origin: 0 50%; background: linear-gradient(90deg, rgb(255, 248, 236), rgba(255, 248, 236, 0)); will-change: transform, opacity; }
#petals { z-index: 19; height: 100vh; }
#sky-dawn { opacity: 0; transition: opacity 3.2s cubic-bezier(.37, 0, .35, 1); }   
.dawn #sky-dawn { opacity: 1; }
body.rewind, .rewind #sky-dawn { transition-duration: 1.8s; }
#fx { z-index: 20; height: 100vh; }
.scene {
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-block: 0 calc(56px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: clip;
}
#flags { position: absolute; left: 0; top: 0; width: 100%; height: 150px; pointer-events: none; }
.stage {
  position: relative;
  margin-top: 64px;
  width: var(--tw);
  height: calc(var(--L) + var(--th));
  opacity: 0;
  transition: opacity 0.9s ease;
}
.ready .stage { opacity: 1; }
.rig { position: absolute; pointer-events: none; }
#rig-back { z-index: 1; }
#rig-front { z-index: 3; }
#pulse { z-index: 2; left: 0; top: 0; }   
#rig-back, #rig-front { will-change: transform; }
.swing { position: absolute; inset: 0; z-index: 2; transform-origin: 50% 0; will-change: transform; }
.tag {
  position: absolute;
  left: 0;
  top: var(--L);
  width: var(--tw);
  height: var(--th);
  perspective: 1500px;
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  outline: none;
  -webkit-user-select: none;
  user-select: none;
}
.opened .tag { cursor: pointer; }
.tag:focus-visible { box-shadow: 0 0 0 3px var(--gold-soft); }
.spin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face-front { transform: rotateY(180deg); visibility: hidden; }
.face img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 28px 30px rgba(3, 5, 18, 0.55)) drop-shadow(0 6px 8px rgba(3, 5, 18, 0.25));
  -webkit-user-drag: none;
}
.gloss, .shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.face-back .gloss, .face-back .shade { -webkit-mask-image: url(../img/save-the-date/tag-back.b67723df08.webp); mask-image: url(../img/save-the-date/tag-back.b67723df08.webp); }
.face-front.has-art .gloss, .face-front.has-art .shade { -webkit-mask-image: url(../img/save-the-date/tag-front.4df8eb0841.webp); mask-image: url(../img/save-the-date/tag-front.4df8eb0841.webp); }   
.gloss {
  background: linear-gradient(100deg, transparent 32%, rgba(255, 250, 240, 0.28) 48%, rgba(255, 255, 255, 0.06) 56%, transparent 68%);
  background-size: 300% 100%;
  background-position: var(--gloss-x, 150%) 0;
  opacity: var(--gloss-o, 0);
}
.shade { background: #120c1e; opacity: var(--shade-o, 0); }
.cover-text {
  position: absolute;
  left: 9%;
  right: 9%;
  top: calc(40% - var(--cv-lift, 0px));   
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--tw) * 0.028);
  text-align: center;
  pointer-events: none;
  isolation: isolate;
}
.cover-text::before {
  content: "";
  position: absolute;
  inset: -14% -10% -10%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(253, 244, 236, 0.88), rgba(253, 244, 236, 0.62) 55%, rgba(253, 244, 236, 0) 100%);
}
.cover-text .pre {
  font-family: var(--display);
  font-weight: 500;
  font-size: max(8.5px, calc(var(--tw) * 0.037));
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  transition: opacity 1s ease;
}
.cover-text .main {
  font-family: var(--script);
  font-size: calc(var(--tw) * 0.15);
  line-height: 1.02;
  padding: 0.12em 0.4em 0.18em;
  margin: -0.12em -0.28em -0.18em;
  color: #94091f;
  -webkit-text-stroke: 0.014em currentColor;
  text-shadow: 0 0 0.08em rgba(253, 244, 236, 0.95), 0 0 0.22em rgba(253, 244, 236, 0.8);
  white-space: pre-line;   
  overflow-wrap: anywhere;
  -webkit-mask-image: linear-gradient(90deg, #000 42%, transparent 58%);
  mask-image: linear-gradient(90deg, #000 42%, transparent 58%);
  -webkit-mask-size: 260% 100%;
  mask-size: 260% 100%;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.cover-text .rule { width: calc(var(--tw) * 0.26); height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0; transition: opacity 1s ease; }
.cover-text .post {
  margin-top: calc(var(--tw) * 0.01);
  font-family: var(--body);
  font-style: italic;
  font-size: max(11px, calc(var(--tw) * 0.05));
  color: var(--ink);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.cover-text .names {
  margin-top: calc(var(--tw) * -0.022);
  font-family: var(--script);
  font-size: max(17px, calc(var(--tw) * 0.088));
  line-height: 1.15;
  color: #8b5f24;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.written .cover-text .pre, .written .cover-text .rule, .written .cover-text .post, .written .cover-text .names { opacity: 1; }
.written .cover-text .pre { transition-delay: 0s; }
.written .cover-text .rule { transition-delay: 1.9s; }
.written .cover-text .post { transition-delay: 2.2s; }
.written .cover-text .names { transition-delay: 2.5s; }
.written .cover-text .main {
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  transition: -webkit-mask-position 2.1s cubic-bezier(.5, .1, .35, 1) 0.35s, mask-position 2.1s cubic-bezier(.5, .1, .35, 1) 0.35s;
}
.handle {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 0;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: grab;
  touch-action: none;
}
.handle:active { cursor: grabbing; }
.handle:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: -8px; }
.opened .handle { display: none; }
.hint {
  margin: 4px 0 0;
  padding: 12px 40px 11px;
  max-width: calc(100% - 32px);
  border-radius: 50%;
  font-family: var(--display);
  font-size: clamp(11px, 3.1vw, 12.5px);
  font-weight: 600;
  letter-spacing: 0.24em;
  line-height: 1.4;
  text-transform: uppercase;
  text-align: center;
  color: #ffe2a0;
  text-shadow: 0 1px 2px rgba(6, 9, 26, 0.85), 0 0 14px rgba(6, 9, 26, 0.7);
  background: radial-gradient(closest-side, rgba(6, 9, 26, 0.55), rgba(6, 9, 26, 0.26) 62%, rgba(6, 9, 26, 0));
  opacity: 0;
  transition: opacity 0.8s ease, color 3s ease 0.6s, text-shadow 3s ease 0.6s;
}
body:not(.opened) .hint::after { content: ""; display: block; width: 7px; height: 7px; margin: 5px auto 0; border: solid #ffe2a0; border-width: 0 1.4px 1.4px 0; rotate: 45deg; opacity: 0.85; }
body:not(.opened) .hint.show::after { animation: pull 2.2s ease-in-out infinite; will-change: transform; }
@keyframes pull { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2.1px, 2.1px); } }   
@media (prefers-reduced-motion: reduce) { body:not(.opened) .hint.show::after { animation: none; } }
.dawn .hint { color: var(--dawn-ink); text-shadow: 0 0 10px rgba(255, 248, 243, 0.9), 0 0 2px rgba(255, 248, 243, 0.8); background: radial-gradient(closest-side, rgba(255, 248, 243, 0.62), rgba(255, 248, 243, 0.3) 62%, rgba(255, 248, 243, 0)); }
.hint.show { opacity: 1; }
.letter {
  position: relative;
  width: min(100% - 24px, 28rem);
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  color: var(--sky-ink);
}
.letter * { transition: color 3s ease, background-color 3s ease, box-shadow 3s ease; }
.lg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 1.7rem 1.25rem 1.8rem;
  border-radius: 22px;
  background: rgba(255, 249, 241, 0.5) linear-gradient(165deg, rgba(255, 252, 245, 0.32), rgba(246, 232, 210, 0.16));
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 24px 46px -34px rgba(56, 34, 88, 0.4);
  scale: 0.95;
  opacity: 0;
  translate: 0 44px;
  transition: opacity 1.1s cubic-bezier(.16, 1, .3, 1), translate 1.4s cubic-bezier(.16, 1, .3, 1), background-color 3s ease, box-shadow 3s ease;
}
.lg-info { transition-delay: 0.12s; }
body:not(.dawn) .lg { background: rgba(6, 9, 26, 0.45) linear-gradient(165deg, rgba(255, 244, 222, 0.05), rgba(226, 196, 142, 0.03)); box-shadow: inset 0 0 0 1px rgba(226, 196, 142, 0.15); }
.letter.open .lg { opacity: 1; translate: none; }
.lg > * { transition: color 3s ease; }
#letter-title:focus { outline: none; }
.dear { margin: 0 0 -0.55rem; font-family: var(--script); font-size: 2.3rem; line-height: 1.1; color: var(--gold-soft); white-space: pre-line; overflow-wrap: anywhere; }
.letter h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.14rem, 4.8vw, 1.42rem);
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--sky-ink);
  text-wrap: balance;
}
.lead { margin: -0.45rem 0 0; font-size: 1.1rem; line-height: 1.48; font-style: italic; color: var(--sky-ink-soft); max-width: 23rem; text-wrap: balance; }
.note {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 20rem);
  margin: 0.2rem 0 0;
  padding: 0.2rem 0.4rem;
  rotate: -1.2deg;
}
.lg-note .note::before { content: ""; display: block; width: 84px; height: 1px; margin: 0 auto 0.75rem; background: linear-gradient(90deg, transparent, var(--gold-soft), transparent); rotate: 1.2deg; }
.note p {
  margin: 0;
  font-family: var(--hand);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.08;
  color: var(--note-ink);
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
  transition: color 3s ease;
}
.lg-ps { gap: 0.6rem; transition-delay: 0.06s; }
.lg-ps .note { width: min(100%, 22rem); margin: 0; }
.lg-ps .note p { font-size: 1.45rem; line-height: 1.1; }
.ps-head { margin: 0; font-family: var(--display); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-soft); }
.pen { position: absolute; left: 0; top: 0; width: 26px; height: 26px; opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }
.pen.on { opacity: 1; }
.pen svg { display: block; width: 100%; height: 100%; filter: drop-shadow(1px 2px 1.5px rgba(40, 25, 20, 0.3)); }
.orn { display: flex; align-items: center; gap: 10px; width: 62%; color: var(--gold-soft); }
.orn::before, .orn::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.orn::after { background: linear-gradient(90deg, currentColor, transparent); }
.orn svg { width: 9px; height: 9px; flex: none; }
.count-block { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; width: 100%; }
.count { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; max-width: 21rem; }
.count div { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding-block: 0.2rem; }
.count div + div { border-left: 1px solid color-mix(in srgb, var(--gold-soft) 45%, transparent); }
.count span { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 7vw, 2.05rem); line-height: 1; color: var(--sky-ink); font-variant-numeric: tabular-nums lining-nums; }
.count small { font-family: var(--display); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-soft); }
.count-far { display: none; margin: 0; flex-direction: column; align-items: center; gap: 0.35rem; }
.count-far span { font-family: var(--display); font-weight: 500; font-size: clamp(3rem, 13vw, 3.6rem); line-height: 1; color: var(--sky-ink); font-variant-numeric: lining-nums; }
.count-far small { font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-soft); }
.count-block[data-mode="far"] .count-far { display: flex; }
.count-block[data-mode="far"] .count { display: none; }
.count-block[data-mode="days"] .count { grid-template-columns: repeat(2, 1fr); max-width: 13rem; }
.count-block[data-mode="days"] .count .fine { display: none; }
.count-block[data-mode="days"] .count span { font-size: clamp(2.2rem, 9vw, 2.7rem); }
.count-note { margin: 0; font-size: 0.98rem; font-style: italic; color: var(--sky-ink-soft); }
.events { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.events li { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.2rem 0.3rem; }
.events li + li { border-left: 1px solid color-mix(in srgb, var(--gold-soft) 45%, transparent); }
.ic-mehendi { --src: url(../img/save-the-date/event-mehendi.753f0e640d.webp); } .ic-wedding { --src: url(../img/save-the-date/event-wedding.ed833f4dab.webp); } .ic-reception { --src: url(../img/save-the-date/event-reception.327869be5e.webp); }
.events .ic { height: 2.35rem; width: 3.2rem; margin-bottom: 0.3rem; background-color: var(--gold-soft); -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; transition: background-color 3s ease; }
.events .date { font-family: var(--display); font-weight: 500; font-size: 1rem; letter-spacing: 0.04em; color: var(--sky-ink); }
.events .what { font-family: var(--display); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-soft); }
.events .day { font-size: 0.95rem; font-style: italic; color: var(--sky-ink-soft); }
.ktm { margin: 0; font-size: 0.86rem; font-style: italic; color: var(--sky-ink-soft); }
.ktm b { font-weight: 400; font-style: normal; color: var(--sky-ink-soft); font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.15rem;
  border-radius: 2px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: none;
  transition: background-color 0.25s ease, color 3s ease, box-shadow 0.25s ease;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-solid { background: var(--crimson); color: var(--paper); box-shadow: inset 0 0 0 1px var(--crimson-deep), inset 0 0 0 3px var(--crimson), inset 0 0 0 4px rgba(226, 196, 142, 0.7); }
.btn-solid:hover { background: var(--crimson-deep); }
.btn-line { color: var(--gold-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold-soft) 60%, transparent); }
.btn-line:hover { background: color-mix(in srgb, var(--gold-soft) 10%, transparent); box-shadow: inset 0 0 0 1px var(--gold-soft); }
.btn:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.follow { margin: 0.2rem 0 0; font-family: var(--display); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-soft); }
.sign { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.sign .warm { margin: 0.3rem 0 0.45rem; font-size: 1.12rem; font-style: italic; color: var(--sky-ink); }
.sign i { font-size: 1.05rem; color: var(--sky-ink-soft); }
.sign span { font-family: var(--script); font-size: 2.4rem; line-height: 1.15; color: var(--gold-soft); }
body[data-letter="sides"] .scene { padding-block-end: 28px; }
body[data-letter="sides"] .letter { position: absolute; inset: 0; width: auto; margin: 0; display: block; pointer-events: none; }
body[data-letter="sides"] .lg {
  position: absolute;
  box-sizing: border-box;
  top: var(--panel-mid, 50%);
  width: var(--panel-w, 24rem);
  gap: 0.95rem;
  padding: 1.7rem 1.35rem 1.8rem;
  pointer-events: auto;
  translate: 0 calc(-50% + 36px);
}
body[data-letter="sides"] .lg-note { left: var(--panel-x, 32px); }
body[data-letter="sides"] .lg-info { right: var(--panel-x, 32px); }
body[data-letter="sides"] .letter.open .lg { translate: 0 -50%; }
body[data-letter="sides"] .dear { font-size: 2.15rem; margin-bottom: -0.45rem; }
body[data-letter="sides"] .letter h2 { font-size: 1.2rem; }
body[data-letter="sides"] .lead { margin-top: -0.35rem; font-size: 1.06rem; }
body[data-letter="sides"] .lg-note .note p { font-size: 1.2rem; }
body[data-letter="sides"] .lg-note { top: var(--left-mid, var(--panel-mid, 50%)); }
body[data-letter="sides"] .lg-ps { left: var(--panel-x, 32px); top: var(--ps-mid, 50%); padding: 1.1rem 1.35rem 1.25rem; }
body[data-letter="sides"] .sign span { font-size: 2.25rem; }
body[data-letter="sides"] .count span { font-size: 1.75rem; }
.again {
  margin-top: 20px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 248, 243, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-family: var(--body);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--on-sky);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 3s ease 0.6s;
}
.again:hover { color: var(--on-sky); }
body:not(.dawn) .again { background: rgba(6, 9, 26, 0.55); }
.again:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.cue {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  transform: translate(-50%, 12px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(251, 243, 232, 0.92);
  color: var(--crimson);
  font-family: var(--display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 24px -8px rgba(40, 20, 40, 0.45);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.16, 1, .3, 1);
}
.cue.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.cue svg { width: 14px; height: 14px; }
.cue.show svg { animation: nudge 1.8s ease-in-out infinite; }   
@keyframes nudge { 50% { transform: translateY(3px); } }
.sound {
  position: fixed;
  z-index: 11;
  right: 12px;
  top: calc(env(safe-area-inset-top, 0px) + 74px);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(226, 196, 142, 0.5);
  background: rgba(5, 8, 24, 0.5);
  color: #f3ead9;
  cursor: pointer;
  transition: opacity 0.4s ease, background-color 3s ease 0.6s, color 3s ease 0.6s, border-color 3s ease 0.6s;
}
.scrolled .sound { opacity: 0; pointer-events: none; }
.dawn .sound { background: rgba(251, 243, 232, 0.7); color: var(--dawn-ink); border-color: rgba(44, 38, 56, 0.25); }
.sound svg { width: 18px; height: 18px; }
.sound .off { display: none; }
.sound[aria-pressed="false"] .on { display: none; }
.sound[aria-pressed="false"] .off { display: inline; }
.sound:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; font: 12px/1 sans-serif; }   
@media (prefers-reduced-motion: reduce) {
  .cue svg { animation: none; }
}
@media print {
  @page { margin: 14mm; }
  html, body, body.dawn { background: #fff !important; color: #2c2638 !important; --sky-ink: #2c2638; --sky-ink-soft: rgba(44, 38, 56, 0.84); --gold-soft: #6f4c1a; --note-ink: #4a2a17; }
  * { animation: none !important; transition: none !important; }
  .layer, #flags, .rig, .handle, .hint, .cue, .sound, .again, #fx { display: none !important; }
  .scene { padding: 0 !important; }
  .stage { margin: 0 auto 8mm !important; opacity: 1 !important; }
  .swing, .spin { transform: none !important; }
  .face-back { display: none !important; }
  .face-front { visibility: visible !important; transform: none !important; }
  .face img, .face-front { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .letter, .letter[hidden], body[data-letter="sides"] .letter { display: block !important; position: static !important; }
  .lg:not([hidden]), body[data-letter="sides"] .lg:not([hidden]) { display: flex !important; position: static !important; opacity: 1 !important; translate: none !important; scale: 1 !important; width: 120mm !important; margin: 0 auto 6mm !important;
    background: #fff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: inset 0 0 0 1px rgba(185, 138, 69, 0.6) !important; break-inside: avoid; }
  .lg > * { opacity: 1 !important; }
  .actions { display: none !important; }
  #note-text { -webkit-mask: none !important; mask: none !important; }
}
.pv-badge { position: fixed; z-index: 30; bottom: calc(14px + env(safe-area-inset-bottom)); left: calc(14px + env(safe-area-inset-left)); margin: 0; padding: 5px 11px 4px; border-radius: 999px; background: rgba(5, 8, 24, 0.45); box-shadow: inset 0 0 0 1px rgba(232, 200, 130, 0.35); font-family: var(--display); font-weight: 500; font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(240, 216, 160, 0.85); pointer-events: none; }
