/* 禾光町 · Shared scene and interface. Keep gameplay geometry in page styles. */
:root {
  --hh-font-title:"Hehe Serif","Songti SC","SimSun",serif;
  --hh-font-body:"Hehe Sans","PingFang SC","Microsoft YaHei",sans-serif;
  --hh-font-latin:"Hehe Serif",Georgia,serif;
  --hh-size-small:.8125rem; --hh-size-body:1rem; --hh-size-label:1.125rem;
  --hh-size-heading:clamp(1.55rem,2.25vw,2.5rem); --hh-size-display:clamp(2.5rem,5.2vw,5.5rem);
  --hh-track-body:.025em; --hh-track-title:.09em;
  --hh-gold:#f0cf95; --hh-ink:#fff5e4; --hh-muted:#d6c9b7;
  --hh-panel:#162438eb; --hh-edge:#ddc18d91; --hh-radius:12px;
  --hh-shadow:0 12px 34px #07101e55,inset 0 1px 0 #ffffff15;
  --hh-accent:var(--hh-gold);
}
body[data-scene] {
  --hh-accent:var(--hh-scene-color,var(--hh-gold));
  --hh-edge:color-mix(in srgb,var(--hh-accent) 57%,transparent);
  --serif:var(--hh-font-title); --sans:var(--hh-font-body); --body:var(--hh-font-body); --pixel:var(--hh-font-title);
  font-family:var(--hh-font-body); font-size:var(--hh-size-body); letter-spacing:var(--hh-track-body);
}
body[data-scene] :where(h1,h2,h3,h4) { font-family:var(--hh-font-title); letter-spacing:var(--hh-track-title) }
:where(body[data-scene]) :where(h1) { font-size:var(--hh-size-display) }
:where(body[data-scene]) :where(h2) { font-size:var(--hh-size-heading) }
:where(body[data-scene]) :where(h3,h4) { font-size:var(--hh-size-label) }
:where(body[data-scene]) :where(small) { font-size:var(--hh-size-small) }
body[data-scene] :where(button,input,textarea,select) { font-family:var(--hh-font-body) }
[data-stage6] { isolation:isolate }
[data-scene-host] { position:relative; isolation:isolate }
.hh-stage { position:absolute; inset:0; z-index:-1; overflow:hidden; pointer-events:none; background:#191b27 }
.hh-stage-fixed { position:fixed }
.hh-surface,.hh-motes { position:absolute; inset:-7px }
.hh-surface > img,.hh-surface > video { position:absolute; width:100%; height:100%; inset:0; object-fit:cover }
.hh-surface video { opacity:0; transition:opacity .35s }
.hh-surface video.ready { opacity:1 }
.hh-stage[data-still=true] .hh-surface { transform:none!important }
.hh-motes i { position:absolute; display:block; width:3px; height:3px; background:var(--hh-accent); border-radius:50%; box-shadow:0 0 7px var(--hh-accent); animation:hh-drift var(--speed) ease-in-out infinite alternate; opacity:.65 }
.hh-motes[data-effect=petal] i { width:8px; height:4px; border-radius:80% 15%; box-shadow:none }
.hh-motes[data-effect=rain] i { width:1px; height:18px; border-radius:0; animation-name:hh-rain; animation-duration:1.8s }
.hh-motes[data-effect=lamp] i { width:4px; height:6px; box-shadow:0 0 10px 2px var(--hh-accent) }
.hh-motes[data-effect=firefly] i { animation-name:hh-firefly }
@keyframes hh-drift { from{transform:translate3d(-18px,25px,0) rotate(-20deg);opacity:.12} to{transform:translate3d(17px,-30px,0) rotate(35deg);opacity:.75} }
@keyframes hh-rain { from{transform:translate3d(14px,-50px,0) rotate(12deg);opacity:0} 60%{opacity:.35} to{transform:translate3d(-14px,76px,0) rotate(12deg);opacity:0} }
@keyframes hh-firefly { from{transform:translate3d(-16px,18px,0);opacity:.04} to{transform:translate3d(28px,-15px,0);opacity:.8} }
.hh-paused .hh-motes i { animation-play-state:paused }
/* Typography and icon masks are shared by the HUD, menus, gallery and shopfronts. */
.hh-latin { font-family:var(--hh-font-latin); font-weight:400; letter-spacing:.12em }
.hh-icon,.hh-lamp-mark,.hh-wallet::before,.hh-toast-star::before {
  display:inline-block; flex:none; width:1.1em; height:1.1em; vertical-align:-.13em; background:currentColor;
  -webkit-mask:var(--hh-icon) center / contain no-repeat; mask:var(--hh-icon) center / contain no-repeat;
}
.hh-icon[data-icon="lantern"],.hh-lamp-mark,.hh-wallet::before { --hh-icon:url("v3/ui/lantern.svg") }
.hh-icon[data-icon="album"] { --hh-icon:url("v3/ui/album.svg") }
.hh-icon[data-icon="back"] { --hh-icon:url("v3/ui/back.svg") }
.hh-icon[data-icon="star"],.hh-toast-star::before { --hh-icon:url("v3/ui/star.svg") }
.hh-icon[data-icon="close"] { --hh-icon:url("v3/ui/close.svg") }
.hh-icon[data-icon="checkin"] { --hh-icon:url("v3/ui/checkin.svg") }
.hh-icon[data-icon="play"] { --hh-icon:url("v3/ui/play.svg") }
.hh-icon[data-icon="sound"] { --hh-icon:url("v3/ui/sound.svg") }
.hh-bar,.hh-dialog,.hh-toast { box-sizing:border-box; font-family:var(--hh-font-body); color:var(--hh-ink) }
.hh-bar { position:relative; display:flex; align-items:center; gap:20px; min-height:60px; padding:8px clamp(16px,5vw,100px); z-index:5 }
.hh-bar,[data-hh-topbar].hh-bar { border-bottom:1px solid var(--hh-edge); background:linear-gradient(100deg,#18283a,#161e30 55%,#263344) }
.hh-bar > :first-child { margin-right:auto }
.hh-brand { display:inline-flex; align-items:center; gap:10px; color:inherit; text-decoration:none }
.hh-brand b { font:520 20px/1.2 var(--hh-font-title); letter-spacing:.11em; white-space:nowrap }
.hh-lamp-mark { width:30px; height:33px; -webkit-mask:none; mask:none; background:url("v3/ui/crest.svg") center / contain no-repeat; filter:drop-shadow(0 0 4px #ffc26742) }
.hh-bar-nav { display:flex; gap:28px; margin-right:auto }
.hh-bar-nav a,.hh-bar-album { display:inline-flex; align-items:center; min-height:40px; color:inherit; text-decoration:none; font:inherit; font-size:.9rem }
.hh-bar-album { cursor:pointer; gap:5px; background:none; border:0; padding:0 4px }
.hh-wallet { display:inline-flex; align-items:center; gap:5px; color:var(--hh-gold); font:500 .9rem/1.3 var(--hh-font-body); white-space:nowrap; font-variant-numeric:tabular-nums }
.hh-wallet::before,.hh-toast-star::before { content:"" }
:where(.hh-panel) { padding:clamp(16px,2vw,28px) }
.hh-panel,.hh-dialog,.hh-toast {
  --hh-glass:linear-gradient(135deg,color-mix(in srgb,var(--hh-accent) 11%,transparent),transparent 24%,transparent 76%,#a5d9ff0d),linear-gradient(155deg,#26394cec,#162236ed 70%);
  background-color:var(--hh-panel); background-image:var(--hh-glass);
  border:1px solid var(--hh-edge); border-radius:var(--hh-radius); color:var(--hh-ink);
  box-shadow:var(--hh-shadow);
}
.hh-ornate {
  background-image:url("v3/ui/sakura-corner.svg"),url("v3/ui/star-trail.svg"),var(--hh-glass,linear-gradient(160deg,#25364aee,#162135ef));
  background-position:top 3px left 3px,bottom 3px right 3px,center,center;
  background-repeat:no-repeat; background-size:48px 38px,55px 38px,cover,cover;
}
.hh-button,.hh-tab,.hh-tag {
  box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; gap:.48em;
  border:1px solid var(--hh-edge); border-radius:7px; color:var(--hh-ink);
  background:linear-gradient(152deg,#40546ae8,#223346f5 66%,#293b52f2);
  font:400 var(--hh-size-body)/1.4 var(--hh-font-body); letter-spacing:.035em; text-decoration:none;
}
.hh-button,.hh-tab {
  min-height:42px; padding:8px 16px; cursor:pointer;
  box-shadow:inset 0 1px 0 #fff4cf21,0 3px 10px #07101a3b;
  transition:transform .26s cubic-bezier(.2,1.65,.45,1),box-shadow .22s,background-color .18s,border-color .18s;
}
.hh-primary,.hh-tab:is([aria-selected=true],[aria-pressed=true]),.hh-button[aria-pressed=true] {
  color:#2c2530; border-color:#ffdfa5; background:linear-gradient(128deg,#ffedcb,#e2bc81 68%,#ffe5ac);
  box-shadow:inset 0 1px 0 #fff6e5a8,0 3px 12px #c4924e39;
}
@media(hover:hover) {
  :is(.hh-button,.hh-tab):not(:disabled):hover { border-color:#ffdfad; box-shadow:inset 0 0 14px #f7d6a021,0 0 12px #f7d6a033; transform:translateY(-1px) }
}
:is(.hh-button,.hh-tab):not(:disabled):active { transform:translateY(1px) scale(.97); box-shadow:0 0 15px #ffce846b,inset 0 0 10px #fff2bd33; transition-duration:.08s }
:is(.hh-button,.hh-tab,.hh-brand,.hh-bar-album):focus-visible { outline:2px solid var(--hh-gold); outline-offset:3px }
:is(.hh-button,.hh-tab):disabled { opacity:.62; cursor:default }
.hh-tabs,.hh-filters { display:flex; gap:8px; flex-wrap:wrap; align-items:center }
.hh-tab,.hh-tag { font-size:var(--hh-size-small) }
.hh-tag { padding:3px 10px; border-radius:30px; background:#203346d9; color:#ffe7b7 }
.hh-dialog { width:min(92vw,620px); max-height:85dvh; overflow:auto; padding:clamp(21px,3vw,32px); color-scheme:dark }
.hh-dialog::backdrop { background:#09101cc4 }
.hh-gallery-head { display:flex; align-items:center; gap:10px; justify-content:space-between; margin-bottom:18px }
.hh-gallery-head h2 { font:520 var(--hh-size-heading)/1.35 var(--hh-font-title); margin:0; letter-spacing:var(--hh-track-title) }
.hh-filters { margin-bottom:18px }
.hh-shelf { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(145px,100%),1fr)); gap:14px }
.hh-exhibit { margin:0; padding:12px; border:1px solid var(--hh-edge); border-radius:8px; background:#243347; overflow-wrap:anywhere }
.hh-exhibit img { width:100%; height:110px; border-radius:4px; object-fit:contain; background:#192637 }
.hh-exhibit small,.hh-empty { color:var(--hh-muted) }
.hh-empty { line-height:1.8 }
.hh-toast {
  position:fixed; z-index:10000; bottom:max(26px,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%);
  max-width:min(90vw,480px); width:max-content; padding:12px 18px; pointer-events:none; font-size:var(--hh-size-body);
}
.hh-toast-star::before { color:var(--hh-gold); margin-right:.5em }
.hh-dialog,.hh-toast { -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px) }
@media(max-width:700px) { .hh-dialog,.hh-toast { -webkit-backdrop-filter:blur(5px); backdrop-filter:blur(5px) } }
@media(prefers-reduced-motion:reduce) { :is(.hh-tab,.hh-button):not(:disabled):is(:active,:hover) { transform:none; transition:none } }
@media(min-width:760px) {
  [data-scene-panel],.hh-scene-panel { max-width:48%; margin-right:auto; margin-left:0 }
  [data-scene-side=left] :is([data-scene-panel],.hh-scene-panel) { margin-right:0; margin-left:auto }
}
@media(max-width:700px) { .hh-bar { gap:14px; min-height:54px } .hh-bar-nav { display:none } .hh-brand b { font-size:17px } }
@media(prefers-reduced-motion:reduce) { .hh-motes i { animation:none } .hh-button,.hh-surface video { transition:none } }
.hh-tilt { flex:none; background:none; color:inherit; border:1px solid currentColor; border-radius:4px; padding:4px 6px; font:inherit; font-size:12px; cursor:pointer }

/* 黄昏彗星 · names of public classes and tokens are stable. */
:root {
  --hh-gold:#ffda9d; --hh-pink:#ffb8cf; --hh-washi:#f4effc; --hh-indigo:#23396f;
  --hh-violet:#6556a8; --hh-lacquer:#49478a; --hh-ink:#fff7ee; --hh-muted:#e4d9f2;
  --hh-panel:#29385aed; --hh-edge:#eedca597; --hh-radius:9px;
  --hh-title-brush:"STKaiti","KaiTi","Kaiti SC","Hehe Serif",serif;
  --hh-metal:linear-gradient(165deg,#fff1c4 3%,#ffda9d 38%,#ad793e 72%,#f7db98);
  --hh-lacquer-fill:linear-gradient(150deg,#615e9e,#484e88 45%,#394674);
  --hh-night:radial-gradient(ellipse at 82% 84%,#ffaf8d8f,transparent 51%),linear-gradient(158deg,#1d326a 3%,#414c90 42%,#865eaa 80%,#b876a1);
}
body[data-stage6] { --hh-edge:#f1daad99 }
.hh-night-sky {
  isolation:isolate; position:relative; color:var(--hh-ink); background-color:var(--hh-indigo);
  background-image:url("v3/ui/yozakura/foil-field.webp?v=dusk1"),var(--hh-night); background-size:640px auto,cover,cover; background-repeat:repeat,no-repeat,no-repeat;
}
.hh-night-sky::before {
  position:absolute; content:""; inset:0; pointer-events:none; z-index:-1;
  background:url("v3/ui/yozakura/waves.webp?v=dusk1") 0 0/330px auto repeat; opacity:.22;
  mask-image:linear-gradient(110deg,#000c,transparent 35%,transparent 65%,#000);
}
.hh-page-frame { position:relative; isolation:isolate }
.hh-page-frame::after {
  content:""; position:absolute; inset:var(--hh-frame-inset,12px); z-index:3; pointer-events:none;
  border:1px solid #e8d5a67d; border-radius:inherit; box-shadow:inset 0 0 10px #b7d5ff16;
}
.hh-heading { font-family:var(--hh-title-brush); color:var(--hh-gold); letter-spacing:.13em; text-shadow:0 2px 4px #24142e }
.hh-ribbon {
  display:inline-grid; place-items:center; min-width:11em; min-height:2.7em; padding:.35em 2.1em .55em;
  color:#fff8e9; border:1px solid #f6dfbd91; border-radius:99px; background:linear-gradient(115deg,#485d8fd9,#715f94cc);
  font:600 1rem/1.2 var(--hh-font-title); letter-spacing:.16em;
}
.hh-washi {
  color:#3b3759; background:var(--hh-washi) url("v3/ui/yozakura/washi.webp?v=dusk1") center/cover no-repeat;
  border:1px solid #c8a564; box-shadow:0 8px 26px #150b2840,inset 0 0 16px #cba76d28;
}
.hh-panel,.hh-dialog,.hh-toast {
  --hh-glass:linear-gradient(136deg,#515d95ef,#35436dee 52%,#42416ff2);
  background-color:var(--hh-panel); background-image:var(--hh-glass);
  border-color:var(--hh-edge); box-shadow:inset 0 0 0 3px #ebc8810d,0 8px 24px #180b2c52;
}
.hh-ornate { background-image:url("v3/ui/yozakura/foil.webp?v=dusk1"),var(--hh-glass); background-position:7px 7px,center; background-size:20px auto,cover; background-repeat:no-repeat }
.hh-button,.hh-tab { background:var(--hh-lacquer-fill); border:1px solid #c69c5c; box-shadow:inset 0 0 0 2px #f1cc781a,0 3px 7px #170d2352; color:#ffe9b3 }
.hh-primary,.hh-tab:is([aria-selected=true],[aria-pressed=true]),.hh-button[aria-pressed=true] { background:linear-gradient(145deg,#73619e,#525391 48%,#3b487f); color:#fff0b7; border-color:#f7ce7e; box-shadow:inset 0 0 0 2px #e9c77d44,0 0 10px #eaaf6a28 }
.hh-tag { background:#3d4a7d; color:#fee7bc; border-color:var(--hh-edge) }
.hh-tabs { border-bottom:1px solid #dec17a55; padding-bottom:.4em }
.hh-exhibit { background:linear-gradient(145deg,#52628d,#364367) }
.hh-seal {
  color:#ffe5a2; background:transparent url("v3/ui/yozakura/seal.webp?v=dusk1") center/contain no-repeat;
  display:inline-grid; place-content:center; padding:24% 0 0; aspect-ratio:1; border:0;
  font:600 1rem/1.25 var(--hh-font-title); filter:drop-shadow(0 3px 3px #633c3545); cursor:pointer;
}
.hh-seal:not(:disabled):active { transform:scale(.96) }
.hh-bar,[data-hh-topbar] { background:linear-gradient(105deg,#24345c,#394674 65%,#594d80); color:#fae4b4; border-bottom:1px solid #bc985c85 }
.hh-petals { position:absolute; inset:0; overflow:hidden; z-index:2; pointer-events:none }
.hh-petals i {
  position:absolute; top:-5%; left:var(--x); width:var(--w); aspect-ratio:1;
  background:url("v3/ui/yozakura/petal.webp?v=dusk1") center/contain no-repeat; opacity:0;
  animation:hh-petal-fall var(--dur) linear var(--delay) infinite;
}
@keyframes hh-petal-fall {
  0% { transform:translate3d(0,-5vh,0) rotate(10deg); opacity:0 } 10%,84% { opacity:.76 }
  48% { transform:translate3d(38px,48vh,0) rotate(140deg) }
  100% { transform:translate3d(-25px,106vh,0) rotate(275deg); opacity:0 }
}
.hh-motes[data-effect=petal] i { width:11px; height:9px; background:transparent url("v3/ui/yozakura/petal.webp?v=dusk1") center/contain no-repeat }
@media(prefers-reduced-motion:reduce){ .hh-petals,.hh-motes { display:none } }

.hh-audio-trigger {
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
  min-height:34px;padding:4px 11px;border:1px solid var(--hh-edge,#e8c77a);
  border-radius:99px;background:#273654da;color:#ffe7bb;
  font:inherit;font-size:.85rem;white-space:nowrap;cursor:pointer;
}
.hh-audio-trigger:focus-visible,.hh-audio-dialog input:focus-visible {outline:2px solid #ffdc90;outline-offset:2px}
dialog.hh-audio-dialog {box-sizing:border-box;width:min(23rem,calc(100vw - 32px));max-height:85dvh;padding:20px;color:#fff1dd;}
.hh-audio-dialog form,.hh-audio-dialog label {display:flex;align-items:center;justify-content:space-between;gap:.7em}
.hh-audio-dialog h2 {margin:0;font:600 1.3rem var(--hh-font-title)}
.hh-audio-dialog label {flex-wrap:wrap;min-height:44px;padding-block:5px}
.hh-audio-dialog output {font-variant-numeric:tabular-nums;color:#ffdb97}
.hh-audio-dialog input {accent-color:#e8c77a;margin:0;padding:0}
.hh-audio-dialog input[type=checkbox] {flex:none;width:19px;height:19px;cursor:pointer}
.hh-audio-dialog input[type=range] {flex:1 0 100%;width:100%;min-height:22px}
@media(max-width:640px){.hh-audio-trigger{font-size:.76rem;padding-inline:7px}}

.hh-profile-trigger {flex:0 0 35px;width:35px;height:35px;min-width:0;padding:2px;border-radius:50%;cursor:pointer;border:1px solid #ebc988;background:radial-gradient(at 50% 80%,#a96581,#443e73 70%);box-shadow:0 0 7px #edbd8d55;overflow:hidden}
.hh-profile-trigger img {display:block;width:100%;height:100%;object-fit:contain}
.hh-profile-trigger[data-owner=true] {border:2px solid #ffe395}
dialog.hh-profile-card {width:min(94vw,410px);padding:0;overflow:auto;color:#fff2dd;border:1px solid #ebc68c;border-radius:18px;background:linear-gradient(145deg,#5e4269,#312c53 55%,#272944);box-shadow:0 22px 90px #130c29ba}
.hh-profile-card form {display:block;padding:0 22px 20px}
.hh-profile-sky {position:relative;display:grid;place-items:center;margin:0 -22px 12px;padding:15px;background:linear-gradient(180deg,#343a7933,#ea9b8b22 60%,#482c5d99),url("v3/town/dusk-pier.webp") left 22% / 200% auto;border-bottom:1px solid #e1b88194}
.hh-profile-crest {box-sizing:border-box;width:66px;height:66px;object-fit:contain;padding:5px;background:radial-gradient(#65507fcc,#302846f5);border:2px solid #ffdf9c;border-radius:50%;box-shadow:0 0 0 3px #785c7b,0 0 22px #ffcc9d99}
.hh-profile-owner {position:absolute;bottom:6px;left:50%;transform:translateX(-50%);padding:1px 8px;border-radius:12px;background:#f4cb81;color:#48301d;font-weight:700;font-size:12px}
.hh-profile-card [hidden] {display:none}
.hh-profile-card h2 {margin:0;color:#ffdfa7;font:600 1.55rem var(--hh-font-title);letter-spacing:.1em}
.hh-profile-card form>p {margin:6px 0 12px;font-size:.86rem;line-height:1.5}
.hh-profile-card form>label,.hh-profile-card legend {font-weight:600;color:#ffdfb1}
.hh-profile-card input[name=nickname] {display:block;box-sizing:border-box;width:100%;margin:5px 0 0;padding:9px 12px;border:1px solid #e3b98e9c;border-radius:8px;background:#211d38;color:#fff4e9;font:inherit}
.hh-profile-card small {font-size:.75rem;color:#e6ccdb}
.hh-profile-card fieldset {min-width:0;margin:10px 0 0;padding:0;border:0}
.hh-profile-options {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin-top:5px}
.hh-profile-options label {position:relative;display:grid;justify-items:center;gap:2px;padding:4px 0;border:1px solid transparent;border-radius:9px;font-size:.76rem;cursor:pointer}
.hh-profile-options input {position:absolute;opacity:0;width:1px;height:1px}
.hh-profile-options img {width:32px;height:32px;object-fit:contain}
.hh-profile-options label:has(:checked) {background:#8d5c8266;border-color:#efce93}
.hh-profile-options label:focus-within {outline:2px solid #ffda98}
.hh-profile-card #hh-profile-error {min-height:1.4em;color:#ffd3cf;margin:4px 0}
.hh-profile-actions {display:flex;gap:10px;justify-content:flex-end}
.hh-profile-actions button {min-height:40px}
@media(max-width:460px){.hh-profile-trigger{width:32px;height:32px;flex-basis:32px}.hh-profile-card form{padding-inline:15px}.hh-profile-sky{margin-inline:-15px}.hh-profile-options{gap:2px}}
@media(max-width:460px) {
  .shop-nav[data-hh-topbar],.night-bar[data-hh-topbar] {flex-wrap:wrap;row-gap:4px}
  .shop-nav[data-hh-topbar] > a:first-child {font-size:0;padding-inline:5px;gap:0}
  .shop-nav[data-hh-topbar] > a:first-child .hh-icon {width:18px;height:18px}
}

.hh-sky-paused .hh-petals i { animation-play-state: paused }
