@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --glass: rgba(20, 16, 30, 0.55); --line: rgba(255, 230, 190, 0.22); --ink: #fff6e6; --soft: #e9dcc4; --gold: #f2c26b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1430; color: var(--ink); font-family: var(--font); -webkit-tap-highlight-color: transparent; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }

/* the door */
#door { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, rgba(11,20,48,0.15), rgba(6,10,26,0.82)); z-index: 20; padding: 16px; }
#door .card { position: relative; text-align: center; max-width: 380px; width: 100%; padding: 34px 26px 24px; border-radius: 26px; background: rgba(16, 14, 28, 0.62); border: 1px solid var(--line); backdrop-filter: blur(10px); }
#door .glow { position: absolute; left: 50%; top: -34px; width: 68px; height: 68px; margin-left: -34px; border-radius: 50%; background: radial-gradient(circle, #ffe7b0 0 18%, rgba(255,180,90,0.55) 30%, rgba(255,150,60,0) 70%); animation: breathe 3.2s ease-in-out infinite; }
#door h1 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 8px 0 6px; letter-spacing: 0.3px; }
#door .sub { margin: 0 0 22px; color: var(--soft); font-size: 15px; }
#door input { width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.07); color: var(--ink); font: inherit; font-size: 16px; outline: none; text-align: center; }
#door input:focus { border-color: rgba(242, 194, 107, 0.7); }
.big { margin-top: 12px; width: 100%; padding: 14px; border-radius: 14px; font-weight: 800; font-size: 17px; background: linear-gradient(180deg, #f6cf7c, #e0a24a); color: #3a2410; box-shadow: 0 6px 24px rgba(240, 170, 80, 0.35); }
#door .hint { margin: 14px 0 0; font-size: 13px; color: rgba(233, 220, 196, 0.75); }
/* the door: who you are and how you look (2026-11-12) */
#door { overflow-y: auto; }
#door .card { max-width: 420px; padding: 30px 20px 20px; }
#door .me { display: flex; gap: 12px; align-items: stretch; margin-bottom: 6px; }
#preview { width: 132px; height: 168px; flex: none; border-radius: 18px; background: radial-gradient(ellipse at 50% 35%, rgba(255, 214, 150, 0.22), rgba(255, 255, 255, 0.03) 70%); border: 1px solid var(--line); }
#door .fields { flex: 1; display: flex; flex-direction: column; gap: 9px; justify-content: center; min-width: 0; }
.seg { display: flex; padding: 3px; border-radius: 14px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); }
.seg button { flex: 1; padding: 9px 4px; border-radius: 11px; font-weight: 800; font-size: 15px; color: var(--soft); }
.seg button.on { background: rgba(242, 194, 107, 0.9); color: #3a2410; }
.chip.small { padding: 7px 10px; font-size: 13px; }
#door .pick { display: grid; grid-template-columns: 58px 1fr; gap: 6px 8px; align-items: center; text-align: left; margin-top: 9px; }
#door .pick b { font-size: 13px; color: var(--soft); font-weight: 800; }
#door .pick .sw:only-of-type { grid-row: span 2; }
.opts { display: flex; flex-wrap: wrap; gap: 5px; }
.opts button { padding: 6px 10px; border-radius: 999px; font-size: 13px; background: rgba(255,255,255,0.07); border: 1px solid var(--line); }
.opts button.on { background: rgba(242, 194, 107, 0.9); color: #3a2410; border-color: transparent; font-weight: 800; }
.opts.num button { width: 34px; height: 34px; padding: 0; border-radius: 50%; font-weight: 800; }
.sw { display: flex; flex-wrap: wrap; gap: 7px; }
.sw button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); padding: 0; }
.sw button.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(242, 194, 107, 0.9); }
@media (max-height: 700px) { #door { place-items: start center; } }
@keyframes breathe { 0%, 100% { transform: scale(0.94); opacity: 0.9; } 50% { transform: scale(1.06); opacity: 1; } }

/* in the chapel */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(8px); font-size: 14px; }
.pill.icon { width: 40px; height: 40px; justify-content: center; padding: 0; font-size: 17px; }
#hud { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; z-index: 5; pointer-events: none; }
#hud > * { pointer-events: auto; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #7be08f; box-shadow: 0 0 8px #7be08f; }
#ctx { position: fixed; left: 0; right: 0; bottom: calc(96px + env(safe-area-inset-bottom)); text-align: center; z-index: 5; }
#ctx .pill { font-weight: 800; font-size: 15px; padding: 10px 18px; background: rgba(40, 26, 14, 0.7); border-color: rgba(242, 194, 107, 0.5); }
#bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); display: flex; gap: 8px; padding: 8px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); z-index: 5; }
#bar button { width: 68px; height: 62px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
#bar button span { font-size: 24px; line-height: 1; }
#bar button i { font-style: normal; font-size: 12px; color: var(--soft); font-weight: 700; }
#bar button:hover, #bar button.on { background: rgba(255, 220, 160, 0.14); }
#bar button.on i { color: var(--gold); }
#sheet { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,0.25); }
#sheet .inner { width: min(460px, 100%); margin: 0 12px calc(12px + env(safe-area-inset-bottom)); padding: 18px 16px 16px; border-radius: 22px; background: rgba(20, 16, 30, 0.88); border: 1px solid var(--line); backdrop-filter: blur(12px); }
#sheet h3 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: 19px; text-align: center; }
#sheetBody { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid var(--line); font-size: 15px; }
.chip:hover { background: rgba(255, 220, 160, 0.16); }
#lyrics { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(150px + env(safe-area-inset-bottom)); width: min(560px, calc(100% - 32px)); text-align: center; z-index: 4; pointer-events: none; text-shadow: 0 2px 10px rgba(0,0,0,0.75); }
#lyTitle { font-size: 12px; font-weight: 800; color: var(--gold); letter-spacing: 0.3px; margin-bottom: 4px; }
#lyNow { font-family: var(--serif); font-size: 22px; color: #fff8ea; line-height: 1.25; }
#lyNext { font-family: var(--serif); font-size: 15px; color: rgba(255, 240, 215, 0.55); margin-top: 3px; }
#sheet textarea { width: 100%; min-height: 96px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.07); color: var(--ink); font: inherit; font-size: 16px; resize: vertical; outline: none; }
#sheet .note { width: 100%; margin: 0 0 4px; font-size: 14px; color: var(--soft); text-align: center; line-height: 1.45; }
#sheet .note.small { font-size: 12px; opacity: 0.7; margin-top: 6px; }
#toast { position: fixed; left: 50%; top: 64px; transform: translate(-50%, -8px); padding: 10px 16px; border-radius: 14px; background: rgba(20,16,30,0.82); border: 1px solid var(--line); font-size: 14px; opacity: 0; transition: opacity .25s, transform .25s; z-index: 12; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#wave { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%) scale(0.8); font-family: var(--serif); font-size: 64px; color: #ffe6b0; text-shadow: 0 0 24px rgba(255, 180, 80, 0.9); opacity: 0; pointer-events: none; z-index: 6; }
#wave.on { animation: wave 2.6s ease-out; }
@keyframes wave { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1.15); } }
#fade { position: fixed; inset: 0; background: #05070f; opacity: 0; pointer-events: none; transition: opacity .35s; z-index: 8; }
#fade.on { opacity: 1; }

#stick { position: fixed; left: 18px; bottom: calc(100px + env(safe-area-inset-bottom)); width: 110px; height: 110px; border-radius: 50%; background: rgba(20,16,30,0.35); border: 1px solid var(--line); z-index: 5; touch-action: none; }
#stick i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(255, 236, 200, 0.35); }

/* name tags and words over heads */
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.tag { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); white-space: nowrap; text-align: center; will-change: transform; }
.tag .n { display: inline-block; padding: 2px 9px; border-radius: 999px; background: rgba(16, 12, 24, 0.55); font-size: 12px; font-weight: 700; color: #fff3df; }
.tag.me .n { background: rgba(120, 76, 20, 0.7); }
.tag .b { display: block; margin: 0 auto 4px; width: max-content; max-width: 220px; padding: 7px 12px; border-radius: 14px; background: rgba(255, 249, 238, 0.95); color: #3a2a1a; font-size: 14px; font-weight: 700; white-space: normal; box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
.tag .h { font-size: 13px; }

@media (max-width: 420px) {
  #bar button { width: 60px; height: 58px; }
  #door h1 { font-size: 28px; }
}
