/*
VOICE   tender, quiet, cinematic — a moment at the river, not an app
IDEA    an anime-film evening: the sky is the hero, the interface is breath on glass
PICTURE full-screen 3D river and steel arch bridge; locks glint on the railing
COLOUR  dusk indigo #1c2366, lavender #b2629f, apricot light #ffae78, paper white #fff8f0
TYPE    Noto Serif SC throughout: 300 for words, 500 for the name
*/
:root {
  --ink: #fff8f0;
  --soft: rgba(255, 248, 240, .72);
  --faint: rgba(255, 248, 240, .5);
  --indigo: #1c2366;
  --lav: #b2629f;
  --apricot: #ffae78;
  --glass: rgba(255, 255, 255, .1);
  --glass-line: rgba(255, 255, 255, .26);
  --serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, serif;
}
* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #12163f; color: var(--ink); font: 300 16px/1.7 var(--serif); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--apricot); outline-offset: 3px; }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 12px max(18px, env(safe-area-inset-left));
  pointer-events: none; transition: opacity 1.2s ease;
  background: linear-gradient(rgba(12, 10, 36, .42), rgba(12, 10, 36, 0));
}
.top > * { pointer-events: auto; }
.brand { font-weight: 500; font-size: 17px; letter-spacing: .18em; text-decoration: none; text-shadow: 0 1px 14px rgba(20, 10, 40, .5); white-space: nowrap; }
.live { font-size: 13px; color: var(--soft); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; text-shadow: 0 1px 10px rgba(20, 10, 40, .6); }
.live:not(:empty)::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ffc98f; box-shadow: 0 0 12px 2px #ff9a3c; animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.modes { display: flex; padding: 3px; border-radius: 99px; background: rgba(16, 12, 42, .38); border: 1px solid var(--glass-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.modes button { border: 0; background: none; padding: 6px 13px; min-height: 34px; border-radius: 99px; font-size: 13.5px; color: var(--soft); cursor: pointer; transition: background .4s, color .4s; }
.modes button[aria-checked="true"] { background: rgba(255, 248, 240, .9); color: #2a1d40; font-weight: 500; }
.is-flat .modes { display: none; }
.lang { font-size: 13px; color: var(--soft); text-decoration: none; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--glass-line); background: rgba(16, 12, 42, .38); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* ---------- stage ---------- */
.stage { position: relative; height: 100svh; min-height: 540px; overflow: hidden; background: linear-gradient(#1c2366 0%, #b2629f 55%, #ffae78 72%, #2a1f4c 73%, #12163f 100%); }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; opacity: 0; transition: opacity 2.4s ease; }
.is-3d.ready #gl { opacity: 1; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; transition: opacity 1.6s ease 0.4s; }
.loading span { font-size: 15px; letter-spacing: .3em; color: var(--soft); animation: breathe 2.4s ease-in-out infinite; }
.ready .loading { opacity: 0; }

.hero { position: absolute; left: 0; right: 0; top: calc(78px + 6svh); text-align: center; padding: 0 24px; pointer-events: none; transition: opacity 2.5s ease, transform 2.5s ease; }
.hero h1 { margin: 0; font-weight: 300; font-size: clamp(40px, 9vw, 84px); line-height: 1.05; letter-spacing: .32em; text-indent: .32em; text-shadow: 0 2px 40px rgba(60, 20, 70, .55), 0 0 2px rgba(255, 255, 255, .3); }
html:not([lang="zh-Hans"]) .hero h1 { letter-spacing: .04em; text-indent: 0; font-weight: 300; }
.hero .tag { margin: 18px auto 0; max-width: 30em; font-size: clamp(15px, 2.6vw, 18px); line-height: 1.9; color: var(--soft); letter-spacing: .06em; text-shadow: 0 1px 18px rgba(40, 10, 50, .8); text-wrap: balance; }
.is-3d .hero { opacity: 0; transform: translateY(8px); }
.is-3d.ready .hero { opacity: 1; transform: none; transition-delay: .9s; }
.is-3d.settled .hero { opacity: 0; transform: translateY(-6px); transition-delay: 0s; }

.dock { position: absolute; left: 0; right: 0; bottom: max(30px, calc(env(safe-area-inset-bottom) + 20px)); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 18px; pointer-events: none; transition: opacity 1.2s ease; }
.dock > * { pointer-events: auto; }
.count { margin: 4px 0 0; font-size: 13px; color: var(--faint); text-align: center; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }

.is-quiet .top, .is-quiet .dock, .is-quiet .hero { opacity: 0; pointer-events: none; }
.is-quiet .top > *, .is-quiet .dock > * { pointer-events: none; }
.leave-quiet { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); border: 0; background: none; color: rgba(255, 248, 240, .35); font-size: 13px; letter-spacing: .2em; padding: 12px 18px; cursor: pointer; transition: color .4s; }
.leave-quiet:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn { border: 0; border-radius: 99px; padding: 12px 24px; min-height: 44px; cursor: pointer; font-size: 15.5px; letter-spacing: .08em; transition: transform .2s, background .4s, box-shadow .4s, opacity .3s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.light {
  padding: 14px 40px; font-size: 17px; font-weight: 500; letter-spacing: .24em; text-indent: .24em; color: #fffaf3;
  background: linear-gradient(180deg, rgba(255, 236, 214, .26), rgba(255, 200, 160, .12));
  border: 1px solid rgba(255, 228, 200, .6);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .05) inset, 0 0 36px rgba(255, 160, 100, .35), 0 10px 40px rgba(30, 10, 50, .35);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
html:not([lang="zh-Hans"]) .btn.light { letter-spacing: .08em; text-indent: 0; }
.btn.light:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 0 52px rgba(255, 170, 110, .55), 0 10px 40px rgba(30, 10, 50, .35); }
.btn.quiet { background: none; color: var(--soft); font-size: 14px; letter-spacing: .1em; padding: 8px 14px; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
.btn.quiet:hover { color: var(--ink); }
.btn.ghost { background: rgba(255, 255, 255, .08); border: 1px solid var(--glass-line); }
.btn.solid { background: #fff4e8; color: #2a1d40; font-weight: 500; box-shadow: 0 0 30px rgba(255, 170, 110, .35); }
.btn.text { background: none; color: var(--soft); padding: 8px 10px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .3); letter-spacing: .04em; }

/* ---------- flat fallback (no 3D) ---------- */
.fence {
  position: absolute; left: 0; right: 0; top: 38%; bottom: 170px; overflow-y: auto; padding: 18px 14px 40px;
  display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 6px 4px;
  background-image: repeating-linear-gradient(45deg, rgba(40, 30, 60, .5) 0 2px, transparent 2px 22px), repeating-linear-gradient(-45deg, rgba(40, 30, 60, .5) 0 2px, transparent 2px 22px);
  border-top: 8px solid #2c2f3d; border-bottom: 8px solid #2c2f3d;
}
.mini { background: none; border: 0; padding: 0; cursor: pointer; animation: sway 4s ease-in-out infinite; transform-origin: 50% 0; }
.mini:nth-child(3n) { animation-delay: -1.3s; } .mini:nth-child(3n+1) { animation-delay: -2.6s; }
@keyframes sway { 50% { transform: rotate(4deg); } }

/* ---------- lock drawing ---------- */
.lock-svg { display: block; overflow: visible; filter: drop-shadow(0 0 18px rgba(255, 200, 150, .45)); }
.lock-svg.is-open { opacity: .85; filter: none; }
.lock-svg .shackle { transition: transform .8s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 86px 70px; }
.lock-svg.is-open .shackle { transform: translateY(-14px) rotate(-18deg); }
.lock-svg.snap { animation: snap 1s ease; }
@keyframes snap { 40% { filter: drop-shadow(0 0 46px #ffe2b0); transform: scale(1.06); } }

/* ---------- sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 6, 30, .25); opacity: 0; transition: opacity .3s; }
.sheet-card {
  position: relative; width: min(500px, 100%); max-height: 88svh; overflow-y: auto; text-align: center;
  background: linear-gradient(180deg, rgba(48, 36, 92, .72), rgba(24, 22, 66, .82));
  backdrop-filter: blur(26px) saturate(1.2); -webkit-backdrop-filter: blur(26px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .18); border-bottom: 0;
  border-radius: 30px 30px 0 0; padding: 30px 24px max(24px, env(safe-area-inset-bottom));
  transform: translateY(40px); opacity: 0; transition: transform .45s cubic-bezier(.2, .9, .3, 1), opacity .3s;
  box-shadow: 0 -20px 80px rgba(10, 5, 30, .4);
}
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-card { border-radius: 30px; border-bottom: 1px solid rgba(255, 255, 255, .18); } }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-card { transform: none; opacity: 1; }
.sheet-card h2 { font-weight: 500; font-size: 24px; letter-spacing: .12em; margin: 4px 0 14px; }
.sheet-card p { color: var(--soft); margin: 8px auto; max-width: 30em; }
.sheet-card .lead { font-size: 21px; color: var(--ink); letter-spacing: .06em; }
.muted { color: var(--faint) !important; font-size: 14px; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.foot-row { margin-top: 6px; }
.lock-hero { display: flex; justify-content: center; margin: 0 0 8px; }
blockquote { margin: 14px auto; max-width: 400px; padding: 14px 18px; background: rgba(255, 255, 255, .06); border-radius: 16px; font-size: 18px; line-height: 1.7; white-space: pre-wrap; }
blockquote small { font-size: 12px; color: var(--faint); }

form { text-align: left; }
.names { display: flex; align-items: flex-end; gap: 10px; }
.names label { flex: 1; }
.heart { color: #ffb3c7; font-size: 20px; padding-bottom: 12px; }
label > span, legend { display: block; font-size: 13px; color: var(--faint); margin-bottom: 6px; letter-spacing: .04em; }
input, textarea { width: 100%; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); border-radius: 14px; color: var(--ink); padding: 12px 14px; font: 300 16px/1.5 var(--serif); }
input:focus, textarea:focus { outline: 2px solid rgba(255, 190, 140, .7); outline-offset: 1px; }
.hint-s { font-size: 12.5px !important; color: var(--faint) !important; margin: 8px 0 14px !important; text-align: left; }
.colors { border: 0; padding: 0; margin: 0 0 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.colors legend { width: 100%; }
.sw { position: relative; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw span { display: block; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), var(--c); border: 2px solid transparent; cursor: pointer; box-shadow: 0 0 16px color-mix(in srgb, var(--c) 55%, transparent); transition: transform .2s; }
.sw input:checked + span { border-color: #fff; transform: scale(1.1); }
.sw input:focus-visible + span { outline: 2px solid #fff; outline-offset: 3px; }
.note small { display: block; font-size: 12px; color: var(--faint); margin-top: 4px; }
.preview { display: flex; justify-content: center; margin: 12px 0 0; }
.err { color: #ffb0bd !important; font-size: 14px; min-height: 1em; text-align: center; }
.linkbox input { text-align: center; font-size: 14px; }
.mine { display: grid; gap: 8px; margin: 8px 0 4px; }
.mine-item { display: flex; align-items: center; gap: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 8px 16px; cursor: pointer; font-size: 17px; }

.toast { position: fixed; left: 50%; top: calc(18px + env(safe-area-inset-top)); transform: translate(-50%, -20px); background: rgba(255, 248, 240, .95); color: #2a1d40; padding: 10px 20px; border-radius: 99px; font-size: 14px; opacity: 0; transition: .3s; z-index: 80; pointer-events: none; max-width: 90vw; overflow-wrap: anywhere; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- readable content (people, search engines and AI read this) ---------- */
.info { background: linear-gradient(#12163f, #0d1030 40%); }
.info > * { max-width: 640px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.info { padding: 64px 0 40px; color: var(--soft); line-height: 1.95; }
.info h2 { font-weight: 500; font-size: 26px; color: var(--ink); margin-top: 40px; margin-bottom: 12px; letter-spacing: .1em; }
.info p { margin-top: 0; margin-bottom: 16px; }
.how { padding-left: 44px; }
.how li { margin-bottom: 12px; }
.how strong { display: block; color: var(--ink); font-weight: 500; }
.faq details { border-bottom: 1px solid rgba(255, 255, 255, .1); padding: 14px 0; }
.faq summary { cursor: pointer; color: var(--ink); font-weight: 500; }
.faq p { margin: 8px 0 0; }
.foot { text-align: center; color: var(--faint); font-size: 13px; padding: 26px 16px 44px; background: #0d1030; letter-spacing: .1em; }

@media (max-width: 600px) {
  .top { gap: 8px; flex-wrap: wrap; }
  .brand { font-size: 15px; letter-spacing: .12em; }
  .live { order: 3; width: 100%; font-size: 12px; }
  .modes button { padding: 5px 10px; font-size: 13px; }
  .lang { padding: 5px 10px; }
  .hero { top: calc(108px + 5svh); }
}
@media (prefers-reduced-motion: reduce) { .mini, .loading span, .live::before { animation: none; } * { transition-duration: .01ms !important; } }

/* ---------- relationship choice, lock number, thinking-of-you, welcome back ---------- */
.rels { border: 0; padding: 0; margin: 0 0 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.rels legend { width: 100%; }
.rel input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rel span { display: inline-block; min-height: 40px; padding: 8px 18px; border-radius: 99px; border: 1px solid var(--glass-line); color: var(--soft); cursor: pointer; font-size: 15px; letter-spacing: .08em; transition: background .3s, color .3s; }
.rel input:checked + span { background: rgba(255, 248, 240, .92); color: #2a1d40; border-color: transparent; font-weight: 500; }
.rel input:focus-visible + span { outline: 2px solid var(--apricot); outline-offset: 2px; }
.lock-no { font-size: 13.5px !important; color: var(--faint) !important; letter-spacing: .06em; margin-top: -2px !important; }
.lock-no span { color: var(--soft); }
.thoughts { margin: 16px auto 4px; padding: 16px 14px 10px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); max-width: 420px; }
.thoughts .row { margin-top: 10px; }
.pulse-line { color: var(--ink) !important; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.beat { width: 9px; height: 9px; border-radius: 50%; background: #ff8fb1; box-shadow: 0 0 14px #ff6f9c; animation: beat 1.4s ease-in-out infinite; flex: none; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.5); } 30% { transform: scale(1); } 45% { transform: scale(1.3); } }
.small { font-size: 12.5px !important; }
.mine-item span { display: flex; flex-direction: column; align-items: flex-start; }
.mine-item small { font-size: 12px; color: var(--faint); font-family: var(--serif); }
.find { display: flex; gap: 10px; align-items: flex-end; margin-top: 18px; }
.find label { flex: 1; }
.welcome {
  position: absolute; left: 50%; top: calc(76px + 2svh); z-index: 15; transform: translate(-50%, -12px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 12px; width: min(460px, calc(100% - 28px)); padding: 12px 14px 12px 12px; border-radius: 22px;
  background: rgba(40, 30, 80, .55); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: opacity .8s ease, transform .8s ease; box-shadow: 0 20px 60px rgba(10, 5, 30, .35);
}
.welcome.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.w-lock { flex: none; }
.w-text { flex: 1; display: flex; flex-direction: column; font-size: 13.5px; line-height: 1.5; color: var(--soft); }
.w-text strong { font-weight: 500; color: var(--ink); font-size: 15.5px; letter-spacing: .06em; }
.welcome .btn { padding: 8px 14px; min-height: 38px; font-size: 14px; flex: none; }
.w-x { flex: none; border: 0; background: none; color: var(--faint); font-size: 22px; width: 32px; height: 32px; cursor: pointer; }
.is-quiet .welcome { opacity: 0; pointer-events: none; }

body.settled .hero { opacity: 0; }

body[data-mode="day"] .count, body[data-mode="day"] .btn.quiet { text-shadow: 0 1px 12px rgba(10, 20, 50, .9); }

/* ---------- wordmark: the domain itself, a heart where the dot was ---------- */
.wm { display: inline-flex; align-items: baseline; gap: .08em; font-family: "Cormorant Garamond", "Noto Serif SC", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: .01em; white-space: nowrap; }
.wm-heart { width: .56em; height: .5em; align-self: center; margin: 0 .06em; overflow: visible; filter: drop-shadow(0 0 .18em rgba(255, 143, 177, .8)) drop-shadow(0 0 .5em rgba(255, 170, 120, .45)); animation: heartbeat 4.8s ease-in-out 1.2s infinite; transform-origin: center; }
@keyframes heartbeat { 0%, 70%, 100% { transform: scale(1); } 76% { transform: scale(1.16); } 82% { transform: scale(1); } 88% { transform: scale(1.1); } }
.brand { letter-spacing: 0 !important; font-size: 21px !important; font-weight: 400 !important; }
.hero h1 { letter-spacing: 0 !important; text-indent: 0 !important; font-size: clamp(46px, 10vw, 104px) !important; }
.hero .sub { margin: 10px 0 0; font-size: clamp(16px, 2.8vw, 21px); letter-spacing: .28em; color: var(--ink); text-shadow: 0 1px 18px rgba(40, 10, 50, .8); }
html:not([lang="zh-Hans"]) .hero .sub { letter-spacing: .06em; font-style: italic; }
.hero .sub .dot { margin: 0 .5em; opacity: .5; }
html:not([lang="zh-Hans"]) .hero .sub [data-t="name"], html:not([lang="zh-Hans"]) .hero .sub .dot { display: none; }
.hero .tag { margin-top: 14px !important; }
@media (prefers-reduced-motion: reduce) { .wm-heart { animation: none; } }

/* ---------- music ---------- */
.music { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--glass-line); background: rgba(16, 12, 42, .38); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: grid; place-items: center; cursor: pointer; padding: 0; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.bars i { width: 2px; height: 4px; background: var(--soft); border-radius: 1px; transition: height .3s; }
.music[aria-pressed="true"] .bars i { background: #ffd1dc; animation: eq 1.2s ease-in-out infinite; }
.music[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.4s; }
.music[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.8s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.now-playing { position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); font-size: 12px; color: var(--faint); letter-spacing: .04em; opacity: 0; transition: opacity 1.5s ease; pointer-events: none; font-style: italic; }
.now-playing.show { opacity: 1; }
.is-quiet .tools .music { opacity: 1; pointer-events: auto; }
.is-quiet .top { opacity: 1 !important; pointer-events: none; }
.is-quiet .top > :not(.tools), .is-quiet .tools > :not(.music) { opacity: 0; pointer-events: none !important; }
.is-quiet .tools .music { pointer-events: auto !important; }
.foot small { display: block; max-width: 640px; margin: 10px auto 0; font-size: 11.5px; line-height: 1.7; opacity: .75; letter-spacing: .02em; }
/* hero lines arrive one at a time, like subtitles */
.ready .hero .sub { animation: line 1.8s ease 1.4s both; }
.ready .hero .tag { animation: line 1.8s ease 3.6s both; }
@keyframes line { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.btn.light { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.3; }
.btn.light small { font-size: 12px; font-weight: 300; letter-spacing: .12em; text-indent: .12em; opacity: .8; }
html:not([lang="zh-Hans"]) .btn.light small { letter-spacing: .02em; text-indent: 0; }
.note.first textarea { font-size: 17px; min-height: 88px; }
@media (prefers-reduced-motion: reduce) { .ready .hero .sub, .ready .hero .tag { animation: none; } }
/* soft shade behind the hero lines and at the foot of the scene, so words stay readable on a bright sky */
.hero::before { content: ""; position: absolute; left: 50%; top: 45%; width: min(760px, 120vw); height: 150%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(28, 14, 48, .42), rgba(28, 14, 48, 0)); z-index: -1; pointer-events: none; }
.hero { z-index: 1; }
.hero .tag { color: var(--ink) !important; text-shadow: 0 1px 3px rgba(30, 10, 40, .7), 0 1px 18px rgba(30, 10, 40, .9) !important; }
.stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 34%; background: linear-gradient(rgba(10, 6, 30, 0), rgba(10, 6, 30, .55)); pointer-events: none; }
.dock { z-index: 2; }

/* ---------- six languages ---------- */
:root { --serif: "Noto Serif SC", "Noto Serif", "Noto Naskh Arabic", "Songti SC", Georgia, serif; }
html:not([lang="zh-Hans"]) .sheet-card h2, html:not([lang="zh-Hans"]) .info h2, html:not([lang="zh-Hans"]) .foot,
html:not([lang="zh-Hans"]) .loading span, html:not([lang="zh-Hans"]) .leave-quiet, html:not([lang="zh-Hans"]) .btn.quiet { letter-spacing: .02em; }
html[lang="ar"] * { letter-spacing: 0 !important; text-indent: 0 !important; }   /* Arabic letters must join */
html[lang="ar"] body { font-family: "Noto Naskh Arabic", var(--serif); }
html[lang="ar"] .hero .sub, html[lang="ar"] .btn.light small { font-style: normal; }
.wm, .live, .lock-no span, .linkbox input { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] form, [dir="rtl"] .hint-s { text-align: right; }
[dir="rtl"] .how { padding-left: 0; padding-right: 44px; }
[dir="rtl"] .now-playing { left: auto; right: max(18px, env(safe-area-inset-right)); }
.langs { position: relative; }
.lang { cursor: pointer; font: inherit; font-size: 13px; }
.lang-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; margin: 0; padding: 6px; list-style: none; min-width: 150px; z-index: 30;
  background: rgba(24, 20, 58, .92); border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 18px 50px rgba(5, 3, 20, .45); }
.lang-menu a { display: block; padding: 9px 14px; border-radius: 10px; text-decoration: none; color: var(--soft); font-size: 15px; }
.lang-menu a:hover, .lang-menu a:focus-visible { background: rgba(255, 255, 255, .08); color: var(--ink); }
.lang-menu a[aria-current] { color: var(--ink); background: rgba(255, 255, 255, .12); }

/* quiet mode: the way back must always be visible */
.leave-quiet { color: rgba(255, 248, 240, .82); background: rgba(30, 22, 60, .38); border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; padding: 11px 22px; font-size: 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-shadow: 0 1px 8px rgba(0, 0, 0, .5); transition: opacity .8s, color .4s; }
.leave-quiet.dim { opacity: .45; }

/* longer languages (fr/es/ru/ar) crowd the header earlier: give the live line its own row sooner */
@media (max-width: 980px) {
  .top { flex-wrap: wrap; row-gap: 4px; }
  .live { order: 3; width: 100%; font-size: 12px; }
}
.lang { white-space: nowrap; }
@media (max-width: 600px) { .lang > span[aria-hidden] { display: none; } }
/* the hero always starts just below the header, however many rows the header needs */
.hero { top: calc(var(--top-h, 64px) + 2svh + 8px); }

/* ---------- wish wall ---------- */
.pubs { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 2px 0 12px; text-align: start; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.switch.sub { font-size: 13.5px; color: var(--soft); padding-inline-start: 4px; }
.switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 99px; background: rgba(255, 255, 255, .18); position: relative; flex: none; margin: 0; cursor: pointer; transition: background .3s; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .3s; }
.switch input:checked { background: #ff8fb0; }
.switch input:checked::after { transform: translateX(16px); }
[dir="rtl"] .switch input:checked::after { transform: translateX(-16px); }
.switch input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.wall-btn { font-size: 13.5px; padding: 4px 10px; }
.wishes { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; max-height: min(56vh, 520px); overflow-y: auto; padding: 2px; }
.wish { display: block; text-align: start; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); border-radius: 16px; padding: 12px 16px; color: var(--ink); font: inherit; cursor: pointer; transition: background .3s; }
.wish:hover, .wish:focus-visible { background: rgba(255, 255, 255, .1); }
.wish p { margin: 0 0 4px; font-size: 16.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.wish small { color: var(--soft); font-size: 12px; }
.wish-big { font-size: 20px; }
.wall-own { margin: 6px 0 2px; }
.wall-own p { margin: 0; }
.report { font-size: 12px; opacity: .65; }
.drift { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.drift-line { position: absolute; left: var(--x); top: var(--y); max-width: min(420px, 80vw); pointer-events: auto; background: none; border: 0; padding: 6px 10px; cursor: pointer; text-align: start;
  color: rgba(255, 246, 236, .95); font: italic 300 17px/1.6 var(--serif); text-shadow: 0 1px 4px rgba(20, 8, 40, .7), 0 0 22px rgba(20, 8, 40, .8);
  opacity: 0; transform: translateY(10px); filter: blur(3px); transition: opacity 2.4s ease, transform 9s linear, filter 2.4s ease; white-space: pre-wrap; overflow-wrap: anywhere; }
.drift-line small { display: block; font-style: normal; font-size: 11.5px; color: rgba(255, 240, 225, .7); margin-top: 2px; }
.drift-line.in { opacity: 1; transform: translateY(-16px); filter: none; }
@media (max-width: 600px) { .drift-line { font-size: 15px; max-width: 78vw; } }
@media (prefers-reduced-motion: reduce) { .drift-line { transition: opacity 1s; transform: none !important; } }

/* ---------- festivals ---------- */
.hero .fest { margin: 12px auto 0; max-width: 34em; font-size: 15px; letter-spacing: .05em; color: #ffe8c4; text-shadow: 0 1px 3px rgba(30, 10, 40, .8), 0 0 20px rgba(30, 10, 40, .9); animation: festIn 2.6s ease 1.6s both; }
@keyframes festIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.is-quiet .hero .fest { opacity: 0; }
/* festival icon in the name: a warm glow instead of the pink one */
.wm-heart.fest-icon { filter: drop-shadow(0 0 .14em rgba(255, 240, 220, .85)) drop-shadow(0 0 .45em rgba(255, 210, 150, .4)); }
/* the two ways in sit side by side, equally quiet */
.dock-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
