@font-face{font-family:Cormorant;src:url("./assets/vendor/fonts/cormorant-medium.woff2") format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:Cormorant;src:url("./assets/vendor/fonts/cormorant-italic.woff2") format("woff2");font-weight:500;font-style:italic;font-display:swap}
:root{color-scheme:dark;--paper:#eaf0ed;--soft:#adbfca;--ice:#bde7ed;--line:rgba(157,192,205,.23);--sans:"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;--song:"Songti SC","STSong","Noto Serif CJK SC","SimSun",serif;--content:1320px}
*{box-sizing:border-box}
body{margin:0;background:#07101a;color:var(--paper);font-family:var(--sans);-webkit-font-smoothing:antialiased}
body::before{content:"";position:fixed;inset:0;z-index:-2;background:radial-gradient(ellipse at 72% 46%,#102533 0%,#0b1925 30%,transparent 62%),linear-gradient(125deg,#101822,#07111d 62%,#09141e);pointer-events:none}
button,input,textarea{font:inherit}
button{border:0;cursor:pointer;color:inherit;background:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:focus-visible,textarea:focus-visible,.file-input:focus-visible{outline:2px solid #bcecf7;outline-offset:4px}
button:disabled{cursor:wait;opacity:.65}
button,button svg{transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.symbols{position:absolute;width:0;height:0;overflow:hidden}
#sky{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1}
.shell{width:min(100%,var(--content));padding:0 clamp(24px,5.6vw,82px) 30px;margin:auto;min-height:100svh;display:flex;flex-direction:column}
header{height:clamp(68px,9vh,92px);flex:none;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.brand{display:flex;gap:12px;align-items:center;color:#e6eee9;font:500 clamp(27px,2.6vw,37px)/1 Cormorant,Georgia,serif;white-space:nowrap;letter-spacing:-.045em}
.brand svg{width:30px;height:30px;color:#c7e5e7;filter:drop-shadow(0 0 8px #91ddef50)}
.brand i{font-weight:500}
.head-actions{display:flex;align-items:center;gap:14px}
.quiet,.icon-btn,.upload{display:inline-flex;align-items:center;justify-content:center;gap:9px;font-size:13px;color:#c4d1d5;border:1px solid transparent;border-radius:30px}
.quiet{min-height:40px;padding:0 13px}
.quiet:hover,.icon-btn:hover{background:#bce8f00e;border-color:var(--line);color:white}
.quiet svg{width:17px;height:17px}
main{flex:1;display:grid;grid-template-columns:minmax(225px,.74fr) minmax(0,1.8fr);grid-template-rows:minmax(390px,1fr) auto;min-height:min(750px,calc(100svh - 120px));position:relative}
.intro{align-self:center;padding:4px 0 25px clamp(0px,1.2vw,20px);position:relative}
h1{margin:0 0 25px;font:400 clamp(48px,5.65vw,82px)/1.16 var(--song);letter-spacing:.08em}
h1 em{color:#c3e4e8;font-style:normal}
.lead{font-size:clamp(13px,1.05vw,15px);color:#bbc8cc;line-height:1.95;letter-spacing:.04em;margin:0 0 25px}
.camera-controls{max-width:365px}
.primary{display:inline-flex;gap:10px;align-items:center;justify-content:center;background:#c1e6e9;color:#0d2a33;border:1px solid #e0f0edb0;border-radius:24px;min-height:45px;padding:0 20px;font-size:14px;letter-spacing:.035em;font-weight:600;box-shadow:0 2px 15px #6fcbd813}
.primary:hover{background:#d8f4f4;box-shadow:0 3px 22px #72c6d92a}
.primary svg{width:18px;height:18px}
.camera-status{display:flex;align-items:baseline;gap:8px;font-size:12px;color:#a5b6c1;margin-top:13px;line-height:1.6}
.indicator{width:6px;height:6px;border:1px solid #92a6b1;border-radius:50%;flex:none;align-self:flex-start;margin-top:6px}
.camera-status[data-kind="on"] .indicator{background:#a9dfce;border-color:#a9dfce;box-shadow:0 0 6px #a9dfce60}
.camera-status[data-kind="error"]{color:#edc5a5}
.camera-status[data-kind="error"] .indicator{border-color:#edc5a5}
.stage{position:relative;min-width:0;min-height:0;isolation:isolate;overflow:hidden;cursor:grab;touch-action:pan-y;user-select:none}
.stage.dragging{cursor:grabbing}
#particles,#cards{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#cards{overflow:hidden}
.postcard{position:absolute;top:0;left:0;width:128px;aspect-ratio:1.18;background:#eeeade;padding:5px 5px 12px;box-shadow:0 2px 14px #03091370;transform-origin:50% 50%;will-change:transform,opacity}
.postcard img{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
#greeting{position:absolute;left:50%;top:49%;transform:translate(-50%,-45%) scale(.96);text-align:center;opacity:0;transition:opacity .55s,transform .65s;pointer-events:none;width:65%;font:500 clamp(30px,4.3vw,69px)/.97 Cormorant,var(--song),Georgia,serif;color:#f1f5ed;text-shadow:0 0 22px #71d6ff60;white-space:pre-line;overflow-wrap:anywhere}
#greeting.long{font-size:clamp(18px,2.5vw,39px);line-height:1.24;width:57%}
#greeting .merry{display:block;font-style:italic;font-size:.76em;margin-bottom:.06em;color:#d5eff2}
#greeting.visible{opacity:1;transform:translate(-50%,-50%) scale(1)}
.stage-note{position:absolute;bottom:10px;right:9px;display:flex;align-items:center;gap:7px;font-size:11px;letter-spacing:.08em;color:#a0b4bd;pointer-events:none;transition:opacity .3s}
.stage-note svg{width:17px;height:17px}
#camera-preview{position:absolute;top:14px;right:8px;width:88px;aspect-ratio:4/3;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#0d1720}
#webcam{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}
.scene-nav{grid-column:1/-1;padding:16px 0 0;align-self:end}
.nav-title{display:flex;align-items:baseline;justify-content:space-between;margin:0 1px 14px}
.nav-title h2{font-weight:500;font-size:14px;letter-spacing:.1em;margin:0}
.nav-title span{font-size:11px;color:#a7b7c1;letter-spacing:.06em}
.scene-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.scene{min-height:77px;display:flex;align-items:center;text-align:left;gap:clamp(10px,1.3vw,20px);position:relative;background:#13212ba8;border:1px solid var(--line);border-radius:12px;padding:12px clamp(13px,1.6vw,23px);color:#b7c9ce}
.scene>svg{flex:none;width:30px;height:30px;stroke-width:1.38}
.scene>span{display:flex;flex-direction:column;gap:4px}
.scene strong{font-size:clamp(14px,1.25vw,17px);font-weight:500;letter-spacing:.055em;color:#e3e9e8;white-space:nowrap}
.scene small{font-size:11px;letter-spacing:.08em;color:#a1b2bd}
.scene kbd{position:absolute;right:10px;top:9px;font:10px/1 var(--sans);color:#82959f}
.scene:hover{background:#1b303b;border-color:#71929a}
.scene[aria-pressed="true"]{background:linear-gradient(110deg,#233c46e6,#182b37e6);border-color:#8abac3;box-shadow:inset 0 0 24px #a0f7fa06;color:#c9edf0}
.scene[aria-pressed="true"] strong,.scene[aria-pressed="true"] kbd{color:#d7f0f1}
.scene[aria-pressed="true"] small{color:#b5d0d4}
#exit-view{position:fixed;right:18px;top:16px;z-index:5;background:#13212bc9;border-color:var(--line);backdrop-filter:blur(6px)}
.immersive{overflow:hidden}
.immersive .shell{max-width:none;width:100%;padding:0}
.immersive header,.immersive .intro,.immersive .scene-nav,.immersive .stage-note,.immersive #camera-preview{display:none}
.immersive main{display:block;min-height:100svh}
.immersive .stage{width:100vw;height:100svh}
.toast{position:fixed;bottom:18px;left:50%;transform:translate(-50%,7px);background:#20323d;color:#e4eeec;box-shadow:0 4px 20px #0005;font-size:13px;padding:9px 17px;border:1px solid var(--line);border-radius:25px;z-index:9;opacity:0;pointer-events:none;transition:.2s;max-width:90vw;text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
dialog{border:1px solid #47606d;border-radius:20px;padding:0;background:#14232f;color:var(--paper);width:min(430px,calc(100% - 30px));max-height:88svh;box-shadow:0 24px 100px #01060cc9}
dialog::backdrop{background:#040b12b5;backdrop-filter:blur(5px)}
dialog form{padding:25px}
.dialog-head,.dialog-foot,.photo-label{display:flex;align-items:center;justify-content:space-between}
.dialog-head{margin-bottom:23px}
.dialog-head h2{font:400 26px var(--song);margin:0}
.icon-btn{width:36px;height:36px}
dialog label{font-size:14px;letter-spacing:.04em}
textarea{display:block;margin:8px 0 20px;width:100%;resize:vertical;padding:10px 12px;background:#0c1924;border:1px solid #3c535f;border-radius:8px;color:white;font-size:16px;line-height:1.5;max-height:145px}
.photo-label span,.help,.form-message{font-size:12px;color:var(--soft)}
.thumbnails{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:9px 0 12px}
.thumbnails img{width:100%;height:48px;object-fit:cover;border-radius:3px}
.upload{border:1px solid #58727e;min-height:37px;padding:0 13px;cursor:pointer;color:#dcebed}
.upload:hover,.upload:has(+.file-input:focus-visible){border-color:#bfebf0;background:#1e3542}
.upload svg{width:15px;height:15px}
.file-input{width:1px;height:1px;position:absolute;clip-path:inset(50%);overflow:hidden}
.help{line-height:1.6;margin:9px 0 0}
.form-message{color:#f2c19c;line-height:1.5}
.form-message:not(:empty){margin:10px 0}
.dialog-foot{margin-top:22px;border-top:1px solid var(--line);padding-top:17px}
.dialog-foot .primary{min-height:37px}
.text-btn{font-size:13px;color:#b8c7cc;padding:8px 0}
.text-btn:hover{color:white}
[hidden]{display:none!important}
noscript{position:fixed;bottom:5px;left:5px;background:#152331;color:#fff}
@media(min-width:1500px){.shell{max-width:1510px}.scene{min-height:86px}}
@media(max-width:800px){.shell{padding-left:24px;padding-right:24px}.head-actions{gap:3px}.scene{gap:9px}.scene>svg{width:25px;height:25px}.intro{padding-left:0}main{grid-template-columns:minmax(200px,.72fr) minmax(0,1.6fr)}}
@media(max-width:650px){
  .shell{padding:0 18px max(18px,env(safe-area-inset-bottom));min-height:100svh}
  header{height:58px}.brand{font-size:27px;gap:8px}.brand svg{width:24px;height:24px}
  .quiet{padding:0 8px;gap:5px;font-size:12px}.quiet svg{width:16px}
  main{grid-template-columns:1fr;grid-template-rows:auto minmax(270px,1fr) auto;min-height:calc(100svh - 78px)}
  .intro{display:grid;grid-template-columns:1fr auto;align-items:center;align-self:start;column-gap:10px;padding:20px 0 0}
  h1{font-size:clamp(27px,6.8vw,38px);letter-spacing:.03em;line-height:1.22;margin:0}h1 br{display:none}
  .lead{font-size:11px;line-height:1.7;letter-spacing:0;grid-column:1/-1;margin:6px 0 0;grid-row:2}.lead br{display:none}
  .camera-controls{grid-column:2;grid-row:1}.camera-controls .primary{min-height:36px;padding:0 12px;font-size:12px;gap:6px}.camera-controls svg{width:15px;height:15px}
  .camera-status{margin:4px 0 0;justify-content:flex-end;font-size:10px;max-width:156px;gap:5px}.indicator{width:5px;height:5px;margin-top:5px}
  .stage-note{font-size:10px;right:3px;bottom:2px}
  .scene-nav{padding-top:11px}.nav-title{margin-bottom:8px}.nav-title h2{font-size:12px}.nav-title span{font-size:10px}
  .scene-buttons{gap:5px}.scene{flex-direction:column;gap:3px;min-height:76px;padding:7px 2px;border-radius:9px;text-align:center}.scene>svg{width:23px;height:23px}
  .scene>span{gap:2px}.scene strong{font-size:12px;letter-spacing:.025em}.scene small{font-size:10px}.scene kbd{display:none}
  #greeting{font-size:clamp(32px,9vw,52px)}#greeting.long{font-size:clamp(17px,5.5vw,28px)}
  #camera-preview{width:62px;top:8px;right:0}
}
@media(max-width:365px){.shell{padding-left:13px;padding-right:13px}.quiet span{display:none}.quiet{min-width:36px}.brand{font-size:25px}}
@media(min-width:651px) and (max-height:640px){.shell{padding-bottom:15px}header{height:54px}main{min-height:calc(100svh - 69px);grid-template-rows:minmax(255px,1fr) auto}h1{font-size:43px;margin-bottom:12px}.lead{font-size:12px;margin-bottom:12px}.intro{padding-bottom:0}.scene{min-height:57px}.scene-nav{padding-top:5px}.nav-title{margin-bottom:7px}}
@media(prefers-reduced-motion:reduce){*,*::after{scroll-behavior:auto!important;transition:none!important}}
