/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #060a18;
  --panel: rgba(16, 20, 38, 0.86);
  --panel-border: rgba(255, 214, 150, 0.18);
  --text: #f4ecdf;
  --muted: #a9a39a;
  --accent: #ffb455;
  --accent-ink: #2a1606;
  --danger: #ff7b7b;
  --radius: 14px;
  --serif: 'Gowun Batang', serif;
  --sans: 'Noto Sans KR', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); }
body { overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }

.stage { position: fixed; inset: 0; }
.stage canvas { touch-action: none; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); color: var(--accent); font-size: 1.1rem; }

.overlay { position: absolute; inset: 0; pointer-events: none; }
.overlay > * { pointer-events: auto; }

/* 상단 바 */
.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; justify-content: flex-end; gap: 12px;
  padding: 16px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(6, 10, 24, 0.75), transparent);
}
.topbar > * { pointer-events: auto; }
.actions { display: flex; gap: 8px; flex-shrink: 0; }
/* 상단 아이콘 메뉴 */
.iconbar { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.menu-wrap { position: relative; }
.icon-menu-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box; height: 48px; min-width: 48px; padding: 0 14px; justify-content: center; line-height: 1; border-radius: 999px; border: 1px solid var(--panel-border); background: rgba(16, 20, 38, 0.72); color: var(--text); cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.icon-menu-btn:hover, .icon-menu-btn.on { background: rgba(255, 180, 85, 0.18); border-color: rgba(255, 180, 85, 0.5); color: #ffe3b3; }
.icon-menu-btn .label { font-size: 0.9rem; }
.icon-menu-btn.icon-only { padding: 0; width: 48px; }
.icon-menu-btn .count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; }
.menu-pop { overflow-x: hidden; overflow-y: auto; grid-template-columns: minmax(0, 1fr); position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; min-width: 168px; max-width: calc(100vw - 24px); padding: 6px; display: grid; grid-gap: 2px; gap: 2px; border-radius: 14px; background: rgba(16, 20, 38, 0.95); border: 1px solid var(--panel-border); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.menu-item { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 0.95rem; text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: rgba(255, 255, 255, 0.08); }
.menu-item.primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.menu-item.primary:hover { background: #ffc274; }
.menu-item.kakao-login { background: #fee500; color: #191600; font-weight: 700; }
.menu-item.kakao-login:hover { background: #ffeb3b; }
.menu-count { padding: 0 8px; border-radius: 999px; background: rgba(255, 180, 85, 0.2); color: var(--accent); font-size: 0.78rem; }
.count-chip { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--panel-border); background: rgba(16, 20, 38, 0.72); color: #ffe3b3; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.count-chip b { font-size: 0.95rem; }
.lantern-icon.small { width: 24px; height: 24px; }
.lantern-icon.big { width: 40px; height: 40px; }
.icon-menu-btn svg, .icon-menu-btn .lantern-icon { flex: none; display: block; }
.menu-wrap { display: flex; align-items: center; }
.lantern-icon { width: 30px; height: 30px; display: block; filter: drop-shadow(0 0 6px rgba(255, 150, 190, 0.55)); }
.menu-item:disabled { opacity: 0.5; cursor: not-allowed; }
.menu-pop.wide { width: min(300px, calc(100vw - 24px)); }
.my-list, .my-list ul, .my-list li { min-width: 0; }
.my-list { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--panel-border); }
.my-head { margin: 0; padding: 2px 14px 6px; display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.my-list ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-gap: 2px; gap: 2px; }
.my-list .menu-item { justify-content: flex-start; gap: 10px; padding: 10px 14px; font-size: 0.9rem; }
.my-list .menu-item .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.my-wish { flex: 1 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); }
.my-tag { flex: none; padding: 1px 7px; border-radius: 999px; font-size: 0.7rem; color: var(--accent); border: 1px solid rgba(255, 180, 85, 0.4); }
.my-no { flex: none; color: var(--muted); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.my-empty, .my-foot { margin: 0; padding: 6px 14px; line-height: 1.5; }
.menu-who { margin: 0; padding: 8px 14px 4px; font-size: 0.85rem; color: #ffe3b3; }

.badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; background: rgba(255, 180, 85, 0.16); color: var(--accent); border: 1px solid rgba(255, 180, 85, 0.35); }

/* 버튼 */
.btn {
  border: 1px solid var(--panel-border); background: rgba(255, 255, 255, 0.06);
  padding: 10px 16px; border-radius: 999px; font-weight: 500; white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 0 20px rgba(255, 170, 80, 0.4); }
.btn.primary:hover { background: #ffc477; }
.btn.ghost { background: rgba(16, 20, 38, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn.done { opacity: 0.7; }
.btn.sm { padding: 7px 12px; font-size: 0.85rem; }
.btn.wide { width: 100%; padding: 13px; font-size: 1rem; }
.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: 1rem; padding: 6px; line-height: 1; border-radius: 8px; }
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }

/* 패널 공통 */
.panel {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.panel h2 { margin: 0; font-family: var(--serif); font-size: 1.25rem; color: #ffe3b3; }
.panel-foot { padding: 12px 18px 18px; }
.chips.dest { padding: 4px 18px 10px; }
.chips.dest .chip { flex: 1 1; padding: 9px; }
.muted { color: var(--muted); }
.small { font-size: 0.78rem; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 8px currentColor; flex-shrink: 0; }

.modal-backdrop { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(3, 5, 12, 0.55); }

/* 연등 만들기 */
.maker { width: min(720px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.maker-body { display: flex; gap: 20px; padding: 4px 18px; overflow-y: auto; }
.maker-form { flex: 1 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.preview { position: relative; flex-shrink: 0; width: 180px; min-height: 300px; display: block; border-radius: 12px; background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--glow) 35%, transparent), transparent 65%); }
.enter-hint { color: #ffe3b3; line-height: 1.5; }
.enter-hint kbd { padding: 0 6px; border: 1px solid rgba(255, 214, 150, 0.5); border-radius: 5px; font: inherit; font-weight: 600; }
.preview canvas { position: absolute; left: 0; top: 0; display: block; filter: drop-shadow(0 0 14px var(--glow)) drop-shadow(0 0 28px color-mix(in srgb, var(--glow) 60%, transparent)); }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; position: relative; }
.field > span { font-size: 0.82rem; color: var(--muted); }
.field textarea, .field input:not([type='radio']) {
  width: 100%; resize: none; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--panel-border); background: rgba(0, 0, 0, 0.3); outline: none;
}
.field textarea { font-family: var(--serif); font-size: 1.05rem; line-height: 1.5; }
.field textarea:focus, .field input:focus { border-color: var(--accent); }
.count { position: absolute; right: 10px; bottom: 8px; color: var(--muted); font-size: 0.72rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--panel-border); background: transparent; font-size: 0.9rem; }
.chip.on { background: rgba(255, 180, 85, 0.18); border-color: var(--accent); color: #ffe3b3; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; outline: 2px solid transparent; }
.swatch.on { border-color: var(--bg); outline-color: var(--text); box-shadow: 0 0 14px currentColor; }
.radios { display: flex; flex-direction: column; gap: 6px; }
.radio { display: grid; grid-template-columns: auto 1fr; grid-column-gap: 8px; column-gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--panel-border); cursor: pointer; }
.radio input { grid-row: span 2; accent-color: var(--accent); }
.radio small { color: var(--muted); }
.radio.on { border-color: var(--accent); background: rgba(255, 180, 85, 0.08); }
.error { margin: 8px 18px 0; color: var(--danger); font-size: 0.9rem; }

/* 자리 고르기 */
.banner {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: min(560px, calc(100% - 32px)); padding: 14px 16px; text-align: center;
  background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
}
.banner p { margin: 0 0 10px; font-family: var(--serif); color: #ffe3b3; }
.banner .row { justify-content: center; }

/* 연등 확대 화면 */
.closeup-backdrop { background: rgba(3, 5, 12, 0.72); }
.closeup {
  position: relative; width: min(880px, 100%); max-height: calc(100dvh - 32px);
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; overflow: hidden;
  border-color: color-mix(in srgb, var(--glow) 55%, transparent);
  box-shadow: 0 0 60px color-mix(in srgb, var(--glow) 25%, transparent), 0 20px 60px rgba(0, 0, 0, 0.5);
}
.closeup .close { position: absolute; top: 10px; right: 10px; z-index: 2; }
.closeup-stage { position: relative; aspect-ratio: 3 / 4; max-height: calc(100dvh - 32px); background: #070b1a; }
.closeup-stage canvas { display: block; }
.closeup-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); font-family: var(--serif); }
.closeup-info { padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.closeup-info .lit-title { font-size: 1.3rem; text-shadow: 0 0 16px rgba(255, 170, 80, 0.5); }
.closeup-info .meta { margin: 0; font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.closeup-info .meta .dot { color: var(--glow); }
.closeup-info blockquote { margin: 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.6; word-break: normal; overflow-wrap: anywhere; white-space: pre-line; }
.closeup-info blockquote.muted { font-size: 1rem; }
.byline { margin: 0; font-size: 0.85rem; color: var(--muted); }
.share-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 8px; }
.share-actions .btn { width: 100%; }
.btn.kakao { background: #fee500; color: #191600; border-color: transparent; font-weight: 700; }
.btn.kakao:hover:not(:disabled) { background: #ffeb3b; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn.danger { background: rgba(255, 90, 90, 0.12); color: #ff9a9a; border-color: rgba(255, 90, 90, 0.4); }
.btn.danger:hover:not(:disabled) { background: rgba(255, 90, 90, 0.22); }
.who { align-self: center; font-size: 0.85rem; color: #ffe3b3; white-space: nowrap; }
.keybox { display: grid; grid-gap: 6px; gap: 6px; margin: 6px 0 4px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 180, 85, 0.08); border: 1px solid rgba(255, 180, 85, 0.3); }
.keybox > div { display: flex; align-items: center; gap: 10px; }
.keybox small { color: var(--muted); min-width: 4.2em; }
.keybox b { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.keybox b.key { font-family: ui-monospace, monospace; letter-spacing: 0.12em; }
.keybox p { margin: 0; line-height: 1.5; }
.keybox-wrap { display: grid; grid-gap: 6px; gap: 6px; margin: 6px 0 4px; justify-items: start; }
.keybox-wrap .keybox { margin: 0; width: 100%; }
.keybox-toggle { display: inline-flex; align-items: center; gap: 6px; }
.notice { margin: 0 18px; padding: 10px 12px; border-radius: 10px; font-size: 0.82rem; line-height: 1.5; color: #ffe3b3; background: rgba(255, 180, 85, 0.1); border: 1px solid rgba(255, 180, 85, 0.3); }
.find.stack { flex-direction: column; align-items: stretch; }
.find.stack label { display: grid; grid-gap: 4px; gap: 4px; }
.find.stack input.key { font-size: 16px; letter-spacing: 0.15em; font-family: ui-monospace, monospace; }
.btn:disabled:not(.done) { opacity: 0.55; }
.kakao-icon { margin-right: 4px; }
.hint { margin: 0; line-height: 1.5; }

/* 내 연등 */
.mine { position: absolute; top: 76px; right: 16px; width: min(320px, calc(100% - 32px)); max-height: 60dvh; overflow-y: auto; padding-bottom: 12px; }
.mine ul { list-style: none; margin: 0; padding: 0 8px; }
.mine li button { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; border: 0; background: transparent; padding: 10px; border-radius: 10px; }
.mine li button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.07); }
.mine li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); }
.mine > p { padding: 0 18px; margin: 8px 0 0; }

.toast { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: rgba(0, 0, 0, 0.8); border: 1px solid var(--panel-border); font-size: 0.9rem; max-width: calc(100% - 32px); text-align: center; }

.help { position: absolute; left: 16px; bottom: 24px; display: flex; gap: 6px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(6, 10, 24, 0.6); font-size: 0.78rem; color: var(--muted); max-width: calc(100% - 92px); }

@media (max-width: 640px) {
  /* 좁은 화면에서는 글자 없이 아이콘만 둔다. */
  .icon-menu-btn { padding: 0; width: 48px; }
  .icon-menu-btn .label { display: none; }
  .iconbar { gap: 6px; }
  .count-chip { padding: 0 12px 0 8px; }
  .maker-body { flex-direction: column; gap: 8px; }
  .preview { width: 100%; }
  .closeup-backdrop { padding: 0; place-items: stretch; }
  .closeup { grid-template-columns: 1fr; grid-template-rows: auto 1fr; max-height: 100dvh; border-radius: 0; border: 0; }
  .closeup-stage { aspect-ratio: auto; height: 58dvh; }
  .closeup-info { padding: 14px 16px 18px; gap: 10px; }
  .share-actions { flex-direction: row; flex-wrap: wrap; }
  .share-actions .btn { flex: 1 1 30%; padding: 10px 8px; font-size: 0.85rem; }
  .share-actions .btn.kakao { flex-basis: 100%; }
  .mine { top: 76px; }
  .help { display: none; }
}

/* 화면에는 보이지 않지만 검색 엔진과 화면 낭독기는 읽는 설명 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lantern-no { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; color: #ffe3b3; }
.find { display: flex; gap: 8px; padding: 4px 16px 12px; }
.find input { flex: 1 1; min-width: 0; font-size: 20px; letter-spacing: 0.2em; text-align: center; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; padding: 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); color: inherit; }
.keybox { gap: 4px; padding: 8px 12px; }
.keybox > div { gap: 8px; }
.keybox small { min-width: 3.6em; }

/* 링크로 들어왔을 때: 월드를 불러오는 동안 가림막을 보여 주고, 연등으로 줌인하는 동안 메뉴를 숨긴다. (lib/intro.ts) */
.intro-splash { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; grid-gap: 14px; gap: 14px; background: radial-gradient(circle at 50% 42%, #1a2347, #060a18 70%); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.8s ease, visibility 0s linear 0.8s; }
.splash-lantern { width: 120px; height: 120px; animation: intro-pulse 1.8s ease-in-out infinite; }
.intro-splash p { margin: 0; color: #ffe3b3; font-family: var(--serif); letter-spacing: 0.08em; text-align: center; line-height: 1.6; padding: 0 24px; }
.intro-splash .splash-guide { color: var(--muted); font-family: inherit; font-size: 0.8rem; letter-spacing: 0.06em; line-height: normal; padding: 0; word-break: keep-all; text-wrap: balance; }
.splash-link { display: none; }
.intro-splash .splash-state { color: #ffe3b3; font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.08em; text-align: center; line-height: 1.6; padding: 0 24px; word-break: keep-all; text-wrap: balance; }
html.intro-ui .splash-guide, html.intro-ui .splash-state { display: none; }
html.intro-ui .splash-link { display: block; }
html.intro-cover .intro-splash, .intro-splash.boot { opacity: 1; visibility: visible; pointer-events: auto; transition: none; }
html.intro-ui .topbar, html.intro-ui .help, html.intro-ui .toast.hidden-intro { display: none; }
@keyframes intro-pulse { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(255, 150, 190, 0.35)); } 50% { transform: scale(1.06); filter: drop-shadow(0 0 22px rgba(255, 150, 190, 0.7)); } }

/* 공유 팝업 */
.share-popup-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(3, 5, 12, 0.6); }
.share-popup { width: min(420px, 100%); padding-bottom: 18px; }
.share-link { display: flex; gap: 8px; padding: 4px 18px 14px; }
.share-link input { flex: 1 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); color: inherit; font: inherit; font-size: 0.85rem; text-overflow: ellipsis; }
.share-targets { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 14px 8px; gap: 14px 8px; padding: 4px 18px 8px; }
.share-target { display: grid; justify-items: center; grid-gap: 6px; gap: 6px; padding: 6px 2px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.82rem; cursor: pointer; border-radius: 12px; }
.share-target:hover:not(:disabled) { background: rgba(255, 255, 255, 0.07); }
.share-target:disabled { opacity: 0.5; cursor: default; }
.share-target .glyph { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.share-note { margin: 8px 18px 0; line-height: 1.5; }

/* 동시 접속: 머리 위 이름표·말풍선, 채팅, 입장 대기 */
.iconbar { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 32px); }
.wait-tag { font-size: 0.72rem; color: var(--accent); }
.peer-tag-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; transform: translate(-50%, -100%); pointer-events: none; }
.peer-tag { padding: 2px 10px; border-radius: 999px; font-size: 0.9rem; white-space: nowrap; color: #ffe3b3; background: rgba(6, 10, 24, 0.62); border: 1px solid rgba(255, 214, 150, 0.25); }
.chat-bubble { position: relative; width: max-content; max-width: min(300px, 70vw); white-space: pre-wrap; padding: 6px 11px; border-radius: 14px; background: rgba(255, 252, 240, 0.96); color: #2a1c10; font-size: 0.82rem; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; text-align: left; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); animation: bubble-life 6s ease forwards; }
.peer-tag.me { color: #ffffff; background: rgba(138, 74, 38, 0.85); border-color: rgba(255, 214, 150, 0.55); font-weight: 700; }
.chat-bubble::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: inherit; transform: translateX(-50%) rotate(45deg); }
@keyframes bubble-life { 0% { opacity: 0; transform: translateY(6px) scale(0.92); } 6% { opacity: 1; transform: none; } 90% { opacity: 1; } 100% { opacity: 0; } }
.chat-fab { position: absolute; right: 16px; bottom: 24px; z-index: 12; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--panel-border); background: rgba(16, 20, 38, 0.82); color: #ffe3b3; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); }
.chat-fab:hover { background: rgba(255, 180, 85, 0.2); border-color: rgba(255, 180, 85, 0.5); }
.chat-fab .count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.72rem; font-weight: 700; display: grid; place-items: center; }
.chat-panel { position: absolute; right: 16px; bottom: 24px; z-index: 12; width: min(340px, calc(100% - 32px)); display: grid; overflow: hidden; }
/* 큰 화면에서는 채팅창을 더 넓게 */
@media (min-width: 900px) { .chat-panel { width: min(460px, calc(100% - 32px)); } }
@media (min-width: 1500px) { .chat-panel { width: min(520px, calc(100% - 32px)); } }
.chat-panel.compact { grid-template-rows: auto auto auto; }
.chat-panel.with-history { height: min(460px, calc(100dvh - 190px)); grid-template-rows: auto 1fr auto auto; }
.chat-history-btn { font-size: 0.78rem; padding: 4px 10px; margin-left: auto; margin-right: 6px; }
.chat-count { font-size: 0.78rem; color: var(--muted); font-family: var(--sans); font-weight: 400; }
.chat-list { overflow-y: auto; padding: 4px 14px 8px; display: flex; flex-direction: column; gap: 6px; }
.chat-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 0.88rem; line-height: 1.45; }
.chat-nick { color: var(--accent); font-weight: 700; font-size: 0.8rem; }
.chat-line.me .chat-nick { color: #9fd0ff; }
.chat-text { word-break: break-word; min-width: 0; }
.chat-time { margin-left: auto; font-size: 0.68rem; color: var(--muted); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.chat-empty { margin: 12px 4px; }
.chat-error { margin: 0 14px 6px; font-size: 0.8rem; }
.chat-form { display: flex; gap: 8px; padding: 8px 12px 12px; border-top: 1px solid var(--panel-border); }
.chat-form input { flex: 1 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); color: inherit; font: inherit; font-size: 16px; }
.chat-form input:disabled { opacity: 0.5; }
.gate-queue { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); z-index: 11; width: min(420px, calc(100% - 32px)); display: grid; grid-gap: 4px; gap: 4px; justify-items: center; text-align: center; padding: 14px 18px; border-radius: 16px; background: rgba(16, 20, 38, 0.9); border: 1px solid rgba(255, 180, 85, 0.45); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.gate-queue b { color: #ffe3b3; font-family: var(--serif); font-size: 1.05rem; }
.gate-queue em { font-style: normal; color: var(--accent); font-weight: 700; }
.gate-queue span, .gate-queue small { color: var(--muted); font-size: 0.85rem; }
html.intro-ui .chat-fab, html.intro-ui .music-wrap, html.intro-ui .chat-panel, html.intro-ui .gate-queue { display: none; }
@media (max-width: 640px) {
  .help { max-width: calc(100% - 92px); }
  .chat-panel { right: 8px; bottom: 12px; width: calc(100% - 16px); }
  .gate-queue { top: 140px; }
}
.zoom-btns { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: flex; flex-direction: column; gap: 6px; }
.zoom-btns .icon-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(16, 20, 38, 0.72); border: 1px solid var(--panel-border); display: grid; place-items: center; font-size: 1.1rem; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.closeup-stage canvas { cursor: zoom-in; }
.name-edit { display: grid; grid-template-columns: minmax(0, 1fr); grid-gap: 6px; gap: 6px; min-width: 0; padding: 8px 10px 10px; border-bottom: 1px solid var(--panel-border); }
.name-edit label { display: flex; align-items: baseline; gap: 8px; }
.name-now { color: #ffe3b3; font-size: 0.95rem; overflow-wrap: anywhere; }
.name-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-gap: 6px; gap: 6px; }
.name-row input { width: 100%; min-width: 0; box-sizing: border-box; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); color: inherit; font: inherit; font-size: 16px; }
.name-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.name-text { display: grid; grid-gap: 1px; gap: 1px; min-width: 0; }
.name-pencil { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #ffe3b3; }
.name-pencil:hover { background: rgba(255, 180, 85, 0.18); }
.name-dialog { width: min(380px, 100%); }
.name-dialog-body { display: grid; grid-gap: 10px; gap: 10px; padding: 4px 18px 0; }
.name-dialog-body input { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); color: inherit; font: inherit; font-size: 16px; }
.name-dialog-body p { margin: 0; }
.name-dialog-actions { justify-content: flex-end; gap: 8px; }
.music-wrap { position: absolute; right: 16px; bottom: 86px; z-index: 12; }
.music-fab { position: relative; z-index: 12; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--panel-border); background: rgba(16, 20, 38, 0.82); color: var(--muted); cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); }
.music-fab.on { color: #ffe3b3; }
.music-fab:hover { background: rgba(255, 180, 85, 0.2); border-color: rgba(255, 180, 85, 0.5); }
/* 행동 아이콘: 음악 아이콘 위. 누르면 행동 목록이 위로 펼쳐진다. */
.action-wrap { position: absolute; right: 16px; bottom: 148px; z-index: 12; }
.action-fab { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--panel-border); background: rgba(16, 20, 38, 0.82); color: #ffe3b3; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.action-fab:hover, .action-fab.on { background: rgba(255, 180, 85, 0.2); border-color: rgba(255, 180, 85, 0.5); }
.action-pop { position: absolute; right: 0; bottom: calc(100% + 8px); min-width: 168px; max-height: min(60dvh, 420px); overflow-y: auto; display: grid; grid-gap: 2px; gap: 2px; padding: 6px; border-radius: 14px; border: 1px solid var(--panel-border); background: rgba(16, 20, 38, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.action-head { margin: 6px 10px 2px; }
.action-move { display: flex; justify-content: space-between; align-items: center; }
.action-move.on { color: #ffe3b3; }
.action-check { font-weight: 700; }
/* 아바타 선택 창 */
.avatar-picker { width: min(640px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.avatar-picker-body { display: flex; gap: 16px; padding: 4px 18px; overflow-y: auto; }
.avatar-stage { flex-shrink: 0; width: 240px; height: 320px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #2a3560, #0b1022 75%); }
.avatar-wait { display: grid; place-items: center; height: 100%; margin: 0; }
.avatar-side { flex: 1 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.avatar-list { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-now { margin-left: 6px; font-size: 0.7rem; color: var(--accent); }
.avatar-info { margin: 0; display: grid; grid-gap: 6px; gap: 6px; }
.avatar-info > div { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.avatar-info dt { color: var(--muted); }
.avatar-info dd { margin: 0; font-weight: 600; color: #ffe3b3; }
.avatar-acts { display: grid; grid-gap: 8px; gap: 8px; }
.avatar-acts .row { gap: 6px; }
.avatar-import { margin: 12px 18px 0; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--panel-border); display: grid; grid-gap: 6px; gap: 6px; }
.avatar-import .row { align-items: center; gap: 8px; }
.avatar-import p, .avatar-import ul { margin: 0; }
.avatar-import ul { padding-left: 18px; max-height: 96px; overflow-y: auto; }
.avatar-foot { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 640px) {
  .avatar-picker-body { flex-direction: column; }
  .avatar-stage { width: 100%; height: 260px; }
}
.music-fab.playing svg { animation: music-pulse 2.4s ease-in-out infinite; }
@keyframes music-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.info-pop { min-width: 220px; padding: 8px 6px; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; grid-gap: 2px; gap: 2px; }
.info-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: #ffe3b3; }
.info-list .info-name { flex: 1 1; color: var(--text); font-size: 0.9rem; }
.info-list b { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.info-note { margin: 2px 10px 6px; line-height: 1.5; }
/* 상단 왼쪽 이름: 좁은 화면에서는 눈에는 숨기고(sr-only) 넓은 화면에서만 보인다. */
.brand-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (min-width: 900px) {
  .topbar { justify-content: space-between; align-items: center; }
  .brand-title { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; font-family: var(--serif); font-size: 1.6rem; font-weight: 700; letter-spacing: 0.08em; color: #ffe3b3; text-shadow: 0 0 18px rgba(255, 170, 80, 0.55); }
}

/* 연등 달기: 상단 메뉴 바로 아래, 오른쪽. 눌러서 연등 만들기·내 연등 메뉴를 아래로 펼친다. */
.lantern-dock { position: absolute; right: 16px; top: 72px; z-index: 12; }
.lantern-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 10px; border-radius: 999px; border: 1px solid rgba(255, 180, 85, 0.55); background: rgba(16, 20, 38, 0.86); color: #ffe3b3; font: inherit; font-size: 1rem; font-weight: 700; letter-spacing: 0.02em; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); }
.lantern-pill:hover, .lantern-pill.on { background: rgba(255, 180, 85, 0.2); border-color: rgba(255, 180, 85, 0.8); }
.lantern-pill .count { position: absolute; top: -5px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.72rem; font-weight: 700; display: grid; place-items: center; }
.lantern-dock .menu-pop { top: calc(100% + 8px); right: 0; }
html.intro-ui .lantern-dock { display: none; }

/* 음악 볼륨: 아이콘 위로 세로 막대가 펼쳐진다. 가로 막대를 세워서 쓴다. */
.music-vol { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); display: grid; justify-items: center; grid-gap: 8px; gap: 8px; padding: 10px 6px 12px; width: 44px; border-radius: 22px; background: rgba(16, 20, 38, 0.92); border: 1px solid var(--panel-border); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.music-vol b { font-size: 0.78rem; color: #ffe3b3; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.music-vol-track { position: relative; width: 32px; height: 140px; }
.music-vol-track input { position: absolute; left: 50%; top: 50%; width: 140px; height: 32px; margin: 0; transform: translate(-50%, -50%) rotate(-90deg); accent-color: #ffb455; cursor: pointer; background: transparent; }

/* 처음 입장: 아바타 고르기와 이름 정하기 */
.entry-pick-backdrop { background: rgba(3, 5, 12, 0.72); }
.entry-pick { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; }
.entry-pick-body { display: grid; grid-gap: 14px; gap: 14px; padding: 4px 18px 6px; }
.entry-pick-body p { margin: 0; }
.entry-avatars { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 8px; gap: 8px; }
.entry-avatar { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 8px; border-radius: 14px; border: 1px solid var(--panel-border); background: rgba(255, 255, 255, 0.03); color: inherit; cursor: pointer; font: inherit; }
.entry-avatar img { width: 100%; max-width: 110px; height: auto; aspect-ratio: 2 / 3; object-fit: contain; pointer-events: none; }
.entry-avatar b { font-family: var(--serif); font-size: 1rem; color: #ffe3b3; }
.entry-avatar:hover { background: rgba(255, 180, 85, 0.1); }
.entry-avatar.on { background: rgba(255, 180, 85, 0.18); border-color: var(--accent); box-shadow: 0 0 16px rgba(255, 170, 80, 0.3); }
.entry-pick .field input { font-size: 16px; }
@media (max-width: 420px) { .entry-avatar { padding: 8px 2px 6px; } .entry-avatar small { font-size: 0.72rem; } }

