@font-face {
  font-family: "Geist";
  src: url("/geist.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: 'Gate Brush';
  src: url('/nanum-brush-gate.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+B098, U+B2E4, U+BE44, U+C774;
}
:root {
  color-scheme: dark;
  --bg: #101310;
  --panel: #191e19;
  --text: #f3f2eb;
  --muted: #c0c9bb;
  --dim: #a0ab9d;
  --gold: #d9ff64;
  --lime: #d9ff64;
  --magenta: #ff8cda;
  --line: #353e34;
  --line-gold: #727e50;
  --display: Geist, "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", system-ui, sans-serif;
  --serif: var(--display);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 300px;
  background: radial-gradient(ellipse at 43% -25%, #293026 0, var(--bg) 60%);
  color: var(--text);
  font: 1rem/1.55 var(--sans);
}
body:has(dialog[open]) { overflow: hidden; }
body:has(.visit-loading:not([hidden])) { overflow: hidden; }
body:has(.stage-shell.expanded) { overflow: hidden; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button:enabled { cursor: pointer; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
[hidden] { display: none !important; }
svg { display: block; }
[data-icon] { display: inline-grid; align-items: center; justify-items: center; }
[data-icon] svg { width: 17px; height: 17px; }

.topbar { border-bottom: 1px solid #393b44; background: #15161b; }
.top-inner {
  max-width: 1570px;
  margin: auto;
  padding: 0 clamp(17px, 3.7vw, 64px);
  min-height: 69px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font: 810 1.21rem/1.06 var(--display);
  letter-spacing: -.058em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 7px;
  background: var(--lime);
  color: #171b12;
  font: 880 1.55rem/.9 var(--display);
}
.brand small {
  display: block;
  margin-top: .22rem;
  color: #a9aab1;
  font: 560 .62rem var(--display);
  letter-spacing: .126em;
}
.header-actions { display: flex; align-items: center; gap: clamp(.65rem, 2.1vw, 1.35rem); }
.live-state {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .46rem;
  color: var(--muted);
  font-size: .85rem;
}
.live-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8c8d97;
}
.live-state[data-state="online"] i { background: var(--lime); box-shadow: 0 0 8px #d9ff6499; }
.live-state[data-state="offline"] i { background: #f5a69d; }
.share-button, .icon-button, .wave-button, .nearby-button, .fullscreen-button, .guestbook-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: 8px;
  border: 1px solid #50535e;
  background: #252831f0;
  color: var(--text);
  min-height: 37px;
}
.share-button { padding: .35rem .78rem; font-size: .87rem; white-space: nowrap; }
.share-button [data-icon] { color: var(--lime); }
.share-button:hover, .icon-button:hover, .wave-button:enabled:hover { border-color: var(--lime); color: var(--lime); }
.icon-button { width: 37px; height: 37px; padding: 0; flex: none; }
.fullscreen-button {
  flex: none;
  padding: .25rem .62rem;
  border-color: #a1b46b;
  background: #344328;
  color: #f0ffcc;
  font-size: .81rem;
  font-weight: 760;
  white-space: nowrap;
}
.fullscreen-button:hover, .fullscreen-button[aria-pressed="true"] { border-color: #d9ff64; background: #405032; }
.guestbook-shortcut { display: none; }

.site-main { max-width: 1570px; margin: auto; padding: 0 clamp(17px, 3.7vw, 64px); }
.intro { padding: clamp(1.25rem, 2.7vw, 2.4rem) 0 1.2rem; }
.eyebrow {
  margin: 0;
  color: var(--lime);
  font: 660 .77rem/1.5 var(--sans);
  letter-spacing: .075em;
}
.intro h1 {
  margin: .22rem 0 .32rem;
  font: 830 clamp(2.6rem, 5.2vw, 5rem)/.98 var(--display);
  letter-spacing: -.085em;
}
.intro-copy { margin: .64rem 0 0; color: var(--muted); font-size: 1rem; letter-spacing: -.03em; }
.stage-shell {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
}
.stage-shell { box-shadow: 0 14px 50px #05050a70; }
.stage-viewport {
  position: relative;
  isolation: isolate;
  height: clamp(430px, 64vh, 735px);
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 48% 55%, #343934, #22252b 55%, #16171e 95%);
}
.world { position: absolute; inset: 0; overflow: hidden; isolation: isolate; touch-action: none; }
.world:focus-visible { outline-offset: -3px; }
.world-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.world-canvas:active { cursor: grabbing; }
.world-labels { position: absolute; inset: 0; pointer-events: none; }
.world-spot, .world-peer-label { position: absolute; transform: translate(-50%, -100%); }
.world-spot {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 35px;
  padding: .31rem .59rem;
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--spot-accent, var(--lime)) 55%, #25262e);
  border-radius: 6px;
  color: #fafaf2;
  font-size: .85rem;
  font-weight: 680;
  text-shadow: 0 1px 4px #090b0d;
  background: #171920ed;
  box-shadow: 0 3px 12px #08090ba4;
}
.world-spot::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--spot-accent, var(--lime));
}
.world-spot:hover, .world-spot.is-nearby {
  border-color: var(--spot-accent, var(--lime));
  background: #25292cee;
}
.world-spot[data-check-in="true"] {
  padding-inline: .72rem;
  border-color: #f1d39a;
  color: #2c220e;
  background: #ffe9b3;
  font-weight: 820;
  text-shadow: none;
  box-shadow: 0 3px 14px #161106b8;
}
.world-spot[data-check-in="true"]::before { background: #88662c; }
.world-spot[data-check-in="true"]:hover { background: #fff3ce; }
.world-peer-label {
  pointer-events: none;
  font-size: .72rem;
  padding: .07rem .37rem;
  border: 1px solid #62616c;
  border-radius: 4px;
  color: #faf9ed;
  white-space: nowrap;
  background: #16171cdd;
}
.stage-top, .stage-bottom {
  pointer-events: none;
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  left: 13px;
  right: 13px;
}
.stage-top { top: 13px; justify-content: space-between; }
.stage-bottom { bottom: 13px; justify-content: flex-end; align-items: center; }
.stage-tools { display: flex; gap: .42rem; }
.stage-tools button, .stage-bottom button { pointer-events: auto; }
.stage-profile { display: grid; align-content: start; justify-items: start; gap: .33rem; }
.admission-ticket {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-height: 25px;
  padding: .14rem .48rem;
  border: 1px solid #a2c875;
  border-radius: 6px;
  color: #e9fac0;
  background: #293621f5;
  font-size: .75rem;
  font-weight: 760;
  white-space: nowrap;
}
.admission-ticket img {
  display: block;
  width: 25px;
  height: auto;
  transform: rotate(-7deg);
}
.inventory-button {
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  min-height: 38px;
  padding: .23rem .48rem;
  border: 1px solid #72825d;
  border-radius: 8px;
  color: #e6f4cd;
  background: #232c20f5;
  white-space: nowrap;
}
.inventory-button:hover { border-color: #d9ff64; background: #2d3b24; }
.inventory-button [data-icon] svg { width: 15px; height: 15px; color: var(--lime); }
.inventory-caption { display: grid; justify-items: start; font-size: .68rem; font-weight: 700; line-height: 1.18; }
.inventory-caption strong { color: var(--lime); font-size: .78rem; font-variant-numeric: tabular-nums; }
.admission-reward {
  position: fixed;
  inset: 0;
  width: min(89vw, 540px);
  max-width: none;
  overflow: visible;
  padding: 0;
  margin: auto;
  border: 0;
  color: #ecffc3;
  background: transparent;
  outline: none;
}
.admission-reward::backdrop { background: #080c08d9; backdrop-filter: blur(3px); }
.admission-reward-content {
  display: grid;
  justify-items: center;
  gap: clamp(.7rem, 3vw, 1.28rem);
  text-align: center;
}
.admission-reward-content p {
  margin: 0;
  color: #f0ffbf;
  font: 820 clamp(1.72rem, 6vw, 2.9rem)/1.12 var(--sans);
  letter-spacing: -.06em;
  text-shadow: 0 3px 24px #9ad04f77;
}
.admission-reward-content img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 54px #000a, 0 0 38px #c5fa6350;
}
@media (prefers-reduced-motion: no-preference) {
  .admission-reward[open] img { animation: ticket-arrive .62s cubic-bezier(.19, .94, .34, 1.12) both; }
  .admission-reward[open] p { animation: ticket-caption .35s ease-out both; }
}
@keyframes ticket-arrive {
  from { opacity: 0; transform: translateY(3rem) rotate(-10deg) scale(.72); }
  to { opacity: 1; transform: translateY(0) rotate(-3deg) scale(1); }
}
@keyframes ticket-caption {
  from { opacity: 0; transform: translateY(.48rem); }
  to { opacity: 1; transform: translateY(0); }
}
.stage-friend {
  --friend-tone: #d9ff64;
  display: flex;
  align-items: center;
  gap: .46rem;
  min-height: 48px;
  padding: .25rem .62rem .25rem .26rem;
  border: 1px solid color-mix(in srgb, var(--friend-tone) 43%, #363843);
  border-radius: 9px;
  background: #191b22f2;
  box-shadow: 0 2px 12px #11151b38;
}
.stage-friend-art {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 6px;
  background: color-mix(in srgb, var(--friend-tone) 22%, #272b2b);
}
.stage-friend-art img { width: 33px; height: 34px; object-fit: contain; }
.stage-friend-text small, .stage-friend-text strong { display: block; line-height: 1.3; }
.stage-friend-text small { color: #d6d7da; font-size: .69rem; }
.stage-friend-text strong { color: var(--friend-tone); font-size: .87rem; letter-spacing: -.035em; }
.stage-notice {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .76rem;
  padding: 1rem;
  text-align: center;
  background: #181a21c4;
  color: var(--text);
}
.stage-fallback { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; max-width: 31rem; }
.stage-fallback button { min-height: 40px; padding: .34rem .64rem; border: 1px solid #6c7c55; border-radius: 6px; background: #272e22; }
.stage-fallback button:hover { border-color: var(--lime); }
.wave-button, .nearby-button { padding: .37rem .68rem; font-size: .86rem; }
.wave-button [data-icon] { color: var(--lime); }
.wave-button:disabled { opacity: .63; }
.nearby-button { margin-right: auto; color: #191c10; border-color: var(--lime); background: var(--lime); font-weight: 760; }
.nearby-button:hover { background: #f1ffa8; }
.nearby-button kbd { color: #1c2017; border-color: #8da73f; background: #c3e955; }
.stage-footer {
  min-height: 48px;
  padding: .45rem .82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .62rem;
  color: var(--muted);
  font-size: .81rem;
}
.desktop-controls, .touch-controls { display: flex; align-items: center; gap: .25rem; }
.desktop-controls span:first-of-type { margin-left: .27rem; }
.touch-controls { display: none; }
.control-separator { width: 1px; height: 12px; background: #545662; margin: 0 .4rem; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  min-height: 21px;
  padding: 0 .16rem;
  border: 1px solid #525561;
  background: #2b2d36;
  border-radius: 4px;
  color: #f0efe8;
  font: 650 .72rem/1 var(--display);
}
.stage-meta { white-space: nowrap; color: var(--dim); }
.reception-prompt {
  display: inline-flex;
  flex: none;
  min-height: 42px;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  border: 1px solid #f3d595;
  border-radius: 7px;
  color: #281f0e;
  background: linear-gradient(115deg, #ffecb4, #eac179);
  font-weight: 800;
  white-space: nowrap;
}
.reception-prompt:hover { background: #fff1c4; }
.stage-footer:has(.reception-prompt:not([hidden])) { padding-block: .25rem; }
.stage-footer:has(.reception-prompt:not([hidden])) .stage-meta { display: none; }
.reception-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  padding: .8rem;
  border: 1px solid #657c64;
  border-radius: 9px;
  background: #2a362a;
}
.reception-confirm p { margin: 0; color: #e3efd8; }
.stage-shell:fullscreen, .stage-shell.expanded {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100dvh;
  background: #181a20;
  border: 0;
  border-radius: 0;
}
.stage-shell:fullscreen .stage-viewport, .stage-shell.expanded .stage-viewport { flex: 1; height: auto; }
.stage-shell.expanded { position: fixed; inset: 0; z-index: 10; }

.footer { display: flex; justify-content: space-between; gap: .7rem; align-items: center; padding: 1rem 0 1.4rem; color: var(--dim); font-size: .8rem; }
.footer-dot { margin: 0 .15rem; }
.footer button { border: 0; background: transparent; color: var(--muted); padding: 0; }
.footer button:hover { color: var(--lime); }

.experience-dialog {
  width: min(94vw, 790px);
  max-height: min(90dvh, 900px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #5b5d68;
  border-radius: 14px;
  background: #1d1f27;
  color: var(--text);
  box-shadow: 0 20px 95px #05050bdd;
  scrollbar-color: #696c78 #1e2028;
}
.experience-dialog::backdrop { background: #0b0d16bd; backdrop-filter: blur(7px); }
.dialog-top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .7rem;
  padding: 1.04rem clamp(16px, 3.1vw, 28px);
  background: #1d1f27f5;
  border-bottom: 1px solid var(--line);
}
.dialog-top .eyebrow { font-family: var(--display); }
.dialog-top h2 { font-size: clamp(1.46rem, 3vw, 2rem); margin: .14rem 0 0; letter-spacing: -.06em; }
.dialog-content { padding: clamp(16px, 3.1vw, 28px); }
.toast {
  position: fixed;
  z-index: 12;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  padding: .59rem .86rem;
  width: max-content;
  max-width: 92vw;
  background: #292d34;
  color: var(--text);
  border: 1px solid #6f775d;
  border-radius: 8px;
  box-shadow: 0 8px 36px #0a0a10ad;
  font-size: .91rem;
}
@media (max-width: 920px) {
  .stage-viewport { height: clamp(390px, 61svh, 690px); }
}
@media (max-width: 580px) {
  .top-inner { min-height: 59px; padding-inline: 13px; }
  .brand { gap: .43rem; font-size: 1.04rem; }
  .brand-mark { width: 28px; height: 28px; font-size: 1.32rem; }
  .brand small { font-size: .53rem; margin-top: .18rem; }
  .live-state { font-size: .74rem; gap: .31rem; }
  .share-button { padding: .28rem .43rem; min-height: 31px; font-size: .74rem; }
  .share-button [data-icon] svg { width: 14px; height: 14px; }
  .site-main { padding-inline: 11px; }
  .intro { padding: 1.08rem 0 .83rem; }
  .intro h1 { font-size: clamp(2.1rem, 9.6vw, 3.2rem); }
  .intro-copy { margin-top: .5rem; font-size: .86rem; }
  .stage-viewport { height: clamp(350px, 54svh, 560px); }
  .stage-top, .stage-bottom { left: 8px; right: 8px; }
  .stage-top { top: 8px; }
  .stage-bottom { bottom: 8px; }
  .wave-button, .nearby-button { font-size: .77rem; }
  .stage-friend { min-height: 42px; padding-right: .51rem; }
  .stage-friend-art { width: 32px; height: 32px; }
  .stage-friend-art img { width: 27px; height: 29px; }
  .stage-friend-text small { font-size: .65rem; }
  .stage-friend-text strong { font-size: .76rem; }
  .world-spot { min-height: 31px; padding: .23rem .4rem; font-size: .72rem; }
  .world-spot::before { width: 5px; height: 5px; }
  .stage-footer { min-height: 40px; padding-inline: .54rem; font-size: .73rem; }
  .experience-dialog { width: min(96vw, 790px); max-height: 94dvh; }
}
@media (pointer: coarse), (max-width: 640px) {
  .desktop-controls, .nearby-button kbd { display: none; }
  .touch-controls { display: flex; }
}
.entry-screen {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(14px, 3vw, 46px);
}
.entry-card {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(254px, 1fr);
  align-items: stretch;
  width: min(100%, 1290px);
  border: 1px solid #45474c;
  border-radius: 17px;
  overflow: hidden;
  background: #1c1f24;
  box-shadow: 0 28px 85px #06070aa3;
}
.entry-visual {
  position: relative;
  min-width: 0;
  align-self: center;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  container-type: inline-size;
  background: #302317;
}
.entry-gate {
  position: absolute;
  inset: 0;
}
.entry-gate img {
  display: block;
  width: 100%;
  height: 100%;
}
.entry-plaque {
  position: absolute;
  top: 19.3%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: .14em .8em .17em .98em;
  border: 1px solid #aa8c58;
  border-radius: .12em;
  background: linear-gradient(180deg, #373323, #241f17);
  color: #f2dfb5;
  box-shadow: inset 0 0 0 2px #211a12, 0 3px 12px #190d09cc;
  font: 750 clamp(1.3rem, 6.3cqw, 3.7rem)/.97 var(--display);
  letter-spacing: .18em;
  white-space: nowrap;
}
.entry-screen.is-entering {
  position: fixed;
  z-index: 19;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%, #343122, #151714 56%, #101215 85%);
}
.is-entering .entry-card { display: block; width: min(100%, 1060px, calc((100svh - 3rem) * 1.5)); }
.is-entering .entry-panel { display: none; }
.entry-door-motion {
  position: absolute;
  inset: 25.65% 16.35% 4% 16.4%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  perspective: 720px;
  pointer-events: none;
}
.is-entering .entry-door-motion {
  background: radial-gradient(ellipse at 50% 78%, #88754c, #3c3524 43%, #1b1c15 78%);
  box-shadow: inset 0 0 26px #120c09d9;
}
.entry-door-leaf {
  position: relative;
  background-repeat: no-repeat;
  background-size: 297.4% 142.15%;
  backface-visibility: hidden;
}
.entry-door-inscription {
  position: absolute;
  top: 36%;
  transform: translateY(-50%);
  color: #51280f;
  font: 400 clamp(1.6rem, 8.85cqw, 5.55rem)/.92 'Gate Brush', var(--serif);
  letter-spacing: -.025em;
  white-space: nowrap;
  opacity: .83;
  mix-blend-mode: multiply;
  text-shadow: 0 0 .05em #49230d80;
}
.entry-door-left .entry-door-inscription { right: 9%; }
.entry-door-right .entry-door-inscription { left: 9%; }
.entry-door-left { --opening-turn: 83deg; background-position: 24.7% 86.5%; transform-origin: left center; }
.entry-door-right { --opening-turn: -83deg; background-position: 75.3% 86.5%; transform-origin: right center; }
.is-entering .entry-door-leaf {
  background-image: url('/hanok-gate.webp');
}
.is-opening .entry-door-leaf { animation: open-entry-door .57s cubic-bezier(.32,.01,.25,1) .12s both; }
@keyframes open-entry-door { to { transform: rotateY(var(--opening-turn)); } }
@media (prefers-reduced-motion: reduce) {
  .is-opening .entry-door-leaf { animation: none; }
}
.visit-loading {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: radial-gradient(ellipse at 50% 42%, #343122, #151714 56%, #101215 85%);
  color: #fff1ce;
  text-align: center;
  font: 760 clamp(1.12rem, 4vw, 1.8rem)/1.4 var(--sans);
  letter-spacing: -.045em;
}
.visit-loading:focus { outline: none; }
.visit-loading p { margin: 0; }
.visit-loading.over-entry-gate {
  align-items: end;
  padding-bottom: max(clamp(1.5rem, 5vh, 2.65rem), env(safe-area-inset-bottom));
  background: none;
}
.visit-loading.over-entry-gate p {
  padding: .4em .78em;
  border: 1px solid #a58b62;
  border-radius: .36rem;
  background: #272119eb;
}
.entry-panel {
  align-self: center;
  padding: clamp(23px, 3.6vw, 51px);
}
.entry-credit {
  margin: 0 0 .7rem;
  color: var(--lime);
  font: 660 .91rem/1.4 var(--display);
  letter-spacing: .035em;
}
.entry-panel h1, .entry-picker h1 {
  margin: 0;
  font: 800 clamp(2.43rem, 4.7vw, 4rem)/1.08 var(--sans);
  letter-spacing: -.095em;
  word-break: keep-all;
}
.entry-form {
  display: grid;
  gap: .49rem;
  margin-top: 1.3rem;
}
.entry-form > label {
  font-weight: 680;
  font-size: .95rem;
}
.entry-form [name="nickname"] {
  width: 100%;
  min-height: 51px;
  padding: .64rem .8rem;
  background: #12151a;
  border: 1px solid #555961;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
}
.entry-form [name="nickname"]::placeholder { color: #91929a; }
.entry-form [name="nickname"]:focus { outline: 2px solid var(--lime); outline-offset: 1px; }
.entry-form [name="nickname"][aria-invalid="true"] { border-color: #ff9f9f; }
.entry-hint, .entry-error {
  margin: 0;
  font-size: .84rem;
  color: var(--muted);
  word-break: keep-all;
}
.entry-error { color: #ffb3aa; }
.entry-picker {
  width: min(100%, 1190px);
  padding: clamp(18px, 3.4vw, 42px);
  border: 1px solid #45474c;
  border-radius: 17px;
  background: #1c1f24;
  box-shadow: 0 28px 85px #06070aa3;
}
.entry-picker-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .4rem 1rem;
  margin-bottom: clamp(.9rem, 2.8vw, 1.6rem);
}
.entry-picker h1 { font-size: clamp(1.6rem, 4vw, 3.35rem); }
.entry-picker h1:focus { outline: none; }
.entry-picker-header p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.entry-picker-layout {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(.9rem, 3vw, 2.5rem);
}
.entry-character-preview { min-width: 0; }
.entry-characters {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.entry-character-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.42rem, 1.1vw, .85rem); }
.entry-character { position: relative; min-width: 0; cursor: pointer; }
.entry-character input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  clip-path: inset(50%);
  overflow: hidden;
}
.entry-character-card {
  display: grid;
  height: 100%;
  justify-items: center;
  align-content: start;
  gap: .35rem;
  padding: .55rem .23rem .64rem;
  border: 1px solid #454a53;
  border-radius: 11px;
  background: radial-gradient(ellipse at 50% 39%, color-mix(in srgb, var(--character-tone) 20%, #22252b), #22252b 75%);
  color: #ebede5;
  font-size: clamp(.78rem, 1.2vw, .97rem);
  font-weight: 730;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
}
.entry-character-card img { width: 100%; max-width: 132px; height: clamp(72px, 9vw, 124px); object-fit: contain; }
.entry-character:hover .entry-character-card { border-color: var(--character-tone); }
.entry-character input:checked + .entry-character-card {
  border-color: var(--character-tone);
  background: radial-gradient(ellipse at 50% 36%, color-mix(in srgb, var(--character-tone) 31%, #24272f), #24272f 94%);
  box-shadow: inset 0 0 0 1px var(--character-tone);
}
.entry-character input:focus-visible + .entry-character-card { outline: 2px solid var(--lime); outline-offset: 2px; }
.entry-characters .entry-error { margin-top: .65rem; }
.entry-picker-actions {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 240px);
  justify-content: space-between;
  gap: .55rem;
  margin-top: clamp(.9rem, 2.7vw, 1.6rem);
}
.entry-back {
  min-height: 48px;
  padding: .55rem .8rem;
  border: 1px solid #525661;
  border-radius: 8px;
  background: #272a31;
  font-weight: 690;
}
.entry-back:hover { border-color: #8e929d; background: #343741; }
.entry-submit {
  margin-top: .4rem;
  min-height: 50px;
  padding: .66rem 1rem;
  border: 1px solid var(--lime);
  border-radius: 8px;
  color: #151810;
  background: var(--lime);
  font-size: 1rem;
  font-weight: 790;
}
.entry-submit:hover { background: #e8ff9e; }
.entry-picker .entry-submit { margin-top: 0; }
.brand { letter-spacing: -.047em; }
.brand-mark { font: 760 1.18rem/1 var(--sans); }
.brand small { letter-spacing: .045em; }
.intro h1 { font-family: var(--sans); line-height: 1.08; }
#main-title:focus { outline: none; }
.world-peer-label {
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.world-self-label {
  border-color: #a5b668;
  color: #f2ffba;
}
.world-welcome-bubble {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, -100%);
  padding: .33em .79em .37em;
  border: 1px solid #36503f;
  border-radius: .72em;
  color: #183523;
  background: #f5f8e6;
  font-size: clamp(.86rem, 2vw, 1.16rem);
  font-weight: 790;
  line-height: 1.22;
  width: max-content;
  max-width: min(76%, 16rem);
  text-align: center;
  text-wrap: balance;
  pointer-events: none;
  filter: drop-shadow(0 3px 8px #1725197d);
}
.world-welcome-bubble::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: .57em;
  height: .57em;
  transform: translate(-50%, -55%) rotate(45deg);
  border: solid #36503f;
  border-width: 0 1px 1px 0;
  background: inherit;
  content: '';
}
@media (max-width: 740px) {
  .entry-card { grid-template-columns: minmax(0, 1fr); width: min(100%, 510px); }
  .entry-panel { padding: clamp(19px, 5.5vw, 28px); }
  .entry-credit { margin-bottom: .37rem; }
  .entry-panel h1 { font-size: clamp(2.1rem, 9vw, 2.8rem); }
  .entry-form { margin-top: .98rem; }
  .entry-picker { width: min(100%, 510px); }
  .entry-picker-layout { grid-template-columns: minmax(0, 1fr); gap: .68rem; }
  .entry-character-grid { gap: .38rem; }
  .entry-character-card { font-size: .73rem; gap: .2rem; padding: .26rem .12rem .36rem; }
  .entry-character-card img { height: clamp(54px, 15.6vw, 76px); }
  .entry-picker-actions { grid-template-columns: minmax(0, max-content) minmax(0, 1fr); }
}
@media (max-width: 740px) and (max-height: 690px) {
  .entry-screen { padding: 12px; }
  .entry-panel { padding-block: 15px; }
  .entry-form { gap: .35rem; margin-top: .7rem; }
  .entry-form [name="nickname"], .entry-submit { min-height: 44px; padding-block: .46rem; }
  .entry-character-card { padding-block: .34rem .38rem; }
  .entry-character-card img { height: clamp(50px, 14vw, 68px); }
}
@media (max-width: 580px) {
  .brand-mark { font-size: .99rem; }
}

.stage-shell { align-self: start; }
.item-tray {
  position: absolute;
  z-index: 6;
  top: 50%;
  right: clamp(9px, 2.8%, 26px);
  transform: translateY(-50%);
  width: min(36%, 304px);
  max-height: calc(100% - 84px);
  pointer-events: none;
}
@media (max-width: 580px) {
  .item-tray { right: 8px; width: min(45%, 198px); }
}
.held-use {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  padding: .2rem .66rem .2rem .2rem;
  border: 1px solid #a58b62;
  border-radius: 10px;
  background: linear-gradient(135deg, #393326, #25231c);
  color: #ffe8af;
  white-space: nowrap;
  text-align: left;
  box-shadow: 0 3px 12px #12110f85;
}
.held-use:hover, .held-use:focus-visible, .held-use[aria-expanded="true"] {
  border-color: #ffe3a5;
  box-shadow: 0 0 0 1px #ffe3a540, 0 3px 12px #12110f85;
}
.held-use[data-kind="keycap"] { background: linear-gradient(135deg, #34402d, #242c21); color: #e7f7cc; border-color: #93a57a; }
.held-art {
  display: grid;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 6px;
  background: #e1d9c8;
}
.held-art img { width: 100%; height: 100%; object-fit: cover; }
.held-caption { display: grid; gap: .12rem; line-height: 1.19; }
.held-caption small { font-size: .61rem; color: #e3dece; }
.held-caption strong { font-size: .79rem; font-weight: 740; }
.world-item-buff {
  --buff-tone: #ceef9d;
  position: absolute;
  transform: translate(-50%, -100%);
  width: max-content;
  max-width: min(10.15rem, 39%);
  padding: .25rem .48rem;
  border: 1px solid color-mix(in srgb, var(--buff-tone) 82%, #3a4934);
  border-radius: 6px;
  color: var(--buff-tone);
  background: #111713e8;
  box-shadow: 0 3px 9px #080b0780;
  font-size: clamp(.64rem, 1.15vw, .78rem);
  font-weight: 720;
  line-height: 1.24;
  text-align: center;
  word-break: keep-all;
  pointer-events: none;
}
.world-item-buff[data-theme="fire"] { --buff-tone: #ffc0a6; }
.world-item-buff[data-theme="earth"] { --buff-tone: #efcd94; }
.world-item-buff[data-theme="metal"] { --buff-tone: #e9e9dc; }
.world-item-buff[data-theme="water"] { --buff-tone: #aee3ff; }
.world-item-buff[data-theme="talisman"] { --buff-tone: #ffe0a0; }
@media (max-width: 580px) {
  .held-use { gap: .32rem; padding-right: .45rem; }
  .held-art { width: 31px; height: 31px; }
  .held-caption strong { font-size: .71rem; }
}

@media (max-width: 640px), (pointer: coarse) and (max-height: 600px) {
  #visit-shell { --visit-header-height: calc(52px + env(safe-area-inset-top, 0px)); }
  .top-inner {
    min-height: var(--visit-header-height);
    gap: .5rem;
    padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
  }
  .header-actions { gap: .55rem; }
  .site-main { padding-inline: 0; }
  .intro { display: none; }
  .stage-shell {
    display: flex;
    flex-direction: column;
    height: calc(100svh - var(--visit-header-height) - 1px);
    height: calc(100dvh - var(--visit-header-height) - 1px);
    min-height: 224px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .stage-viewport { flex: 1 1 auto; height: auto; }
  .stage-top {
    top: 8px;
    left: max(9px, env(safe-area-inset-left, 0px));
    right: max(9px, env(safe-area-inset-right, 0px));
    gap: .36rem;
  }
  .stage-shell:fullscreen .stage-top, .stage-shell.expanded .stage-top {
    top: max(8px, env(safe-area-inset-top, 0px));
  }
  .stage-tools { gap: .32rem; }
  .stage-tools .icon-button { width: 40px; height: 44px; }
  .stage-tools .inventory-button, .fullscreen-button { min-height: 44px; }
  .fullscreen-button { padding-inline: .53rem; gap: .3rem; }
  .fullscreen-button [data-icon] svg { width: 15px; height: 15px; }
  .stage-friend { max-width: min(31vw, 150px); }
  .stage-friend-art, .held-art { flex: none; }
  .stage-friend-text, .held-caption { min-width: 0; }
  .stage-friend-text strong, .held-caption strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stage-bottom {
    bottom: 12px;
    left: auto;
    right: max(10px, env(safe-area-inset-right, 0px));
    width: calc(100% - 144px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .38rem;
  }
  .stage-bottom .nearby-button { max-width: 100%; margin: 0; text-align: right; }
  .stage-bottom .nearby-button [data-icon] { flex: none; }
  .held-use { max-width: 100%; }
  .stage-footer, .stage-footer:has(.reception-prompt:not([hidden])) {
    min-height: 54px;
    padding: 6px max(11px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(11px, env(safe-area-inset-left, 0px));
    flex: none;
    border-top: 1px solid var(--line);
    background: #161c16;
  }
  .stage-footer .stage-meta, .stage-footer:has(.reception-prompt:not([hidden])) .touch-controls { display: none; }
  .guestbook-shortcut {
    display: inline-flex;
    flex: none;
    min-height: 44px;
    margin-left: auto;
    padding-inline: .72rem;
    border-color: #78856c;
    background: #2e392a;
    color: #edf5e7;
    font-size: .79rem;
    font-weight: 740;
    white-space: nowrap;
  }
  .guestbook-shortcut:hover, .guestbook-shortcut:focus-visible { border-color: var(--lime); }
  .guestbook-shortcut [data-icon] { color: var(--lime); }
  .guestbook-section, .footer { margin-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px)); }
  .guestbook-section { scroll-margin-block-start: 12px; }
  .guestbook-section:not([data-open]) { display: none; }
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 600px) {
  .stage-viewport .direction-pad.joystick { --joystick-size: clamp(76px, 23dvh, 102px); --joystick-bottom: 12px; }
}
