/* VIVAZO Space Cinema: 깊은 우주 남색 + 홀로그램 청록 + 네온 자홍 */
:root {
  --bg: #05060f;
  --panel: rgba(7, 11, 26, 0.78);
  --panel-border: rgba(56, 232, 255, 0.22);
  --text: #eef6ff;
  --muted: #8fa3c4;
  --cyan: #38e8ff;
  --magenta: #ff3ecf;
  --violet: #8b5cff;
  --mint: #2effc4;
  --amber: #ffb547;
  --holo: linear-gradient(100deg, #b8f6ff 0%, #38e8ff 40%, #8b5cff 72%, #ff7ae0 100%);
  --cta: linear-gradient(135deg, #8b5cff, #ff3ecf);
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  --font-logo: "Unbounded", var(--font);
  color-scheme: dark;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: rgba(56, 232, 255, 0.3) transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
a { color: var(--cyan); }

button {
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--cta);
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s, opacity 0.15s;
}
button:hover:not(:disabled) { filter: brightness(1.12); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.4; cursor: default; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
button.ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }
button.small { padding: 6px 10px; font-size: 12.5px; }
button.big { width: 100%; padding: 13px; font-size: 15.5px; font-weight: 800; box-shadow: 0 12px 30px -12px rgba(139, 92, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
input, textarea {
  font: inherit;
  color: var(--text);
  background: rgba(56, 232, 255, 0.04);
  border: 1px solid rgba(120, 180, 255, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
  outline: none;
}
input:focus, textarea:focus { border-color: rgba(56, 232, 255, 0.7); box-shadow: 0 0 0 3px rgba(56, 232, 255, 0.14); }
input::placeholder, textarea::placeholder { color: rgba(143, 163, 196, 0.85); }

/* ---------- 3D 무대: 뒤에 유튜브(CSS3D), 앞에 WebGL */
#stage { position: fixed; inset: 0; z-index: 0; background: var(--bg); }
#css3d { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #000; }
#gl { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.yt-wrap { background: #000; }
.yt-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- 입장 화면 */
#join {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  background:
    radial-gradient(80% 60% at 12% 0%, rgba(56, 232, 255, 0.12), transparent 60%),
    radial-gradient(60% 50% at 90% 100%, rgba(255, 62, 207, 0.1), transparent 60%),
    linear-gradient(90deg, rgba(5, 6, 15, 0.93), rgba(5, 6, 15, 0.72) 50%, rgba(5, 6, 15, 0.5));
}
.join-wrap {
  min-height: calc(100% - 52px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 48px) 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  align-items: center;
  gap: clamp(28px, 6vw, 88px);
}
.hero { display: grid; gap: 18px; justify-items: start; position: relative; }
.scan { width: min(420px, 100%); height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent); box-shadow: 0 0 14px var(--cyan); animation: scan 3.2s ease-in-out infinite; }
@keyframes scan { 50% { transform: scaleX(0.35); opacity: 0.5; } }
.marquee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(56, 232, 255, 0.4);
  border-radius: 999px;
  background: rgba(56, 232, 255, 0.06);
  font: 700 10.5px var(--font-logo);
  letter-spacing: 0.26em;
  color: var(--cyan);
}
.rec { width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 10px var(--magenta); animation: blink 1.6s infinite; flex: none; }
@keyframes blink { 50% { opacity: 0.3; } }
.logo { margin: 0; display: grid; line-height: 0.95; }
.logo-word {
  font: 900 clamp(52px, 7.2vw, 112px) var(--font-logo);
  letter-spacing: 0.02em;
  background: var(--holo);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(56, 232, 255, 0.35));
}
.logo-sub { margin-top: 10px; padding-left: 0.2em; font: 700 clamp(12px, 1.5vw, 19px) var(--font-logo); letter-spacing: 0.62em; color: #cfe9ff; }
.tagline { margin: 0; color: #d3def2; font-size: clamp(14.5px, 1.4vw, 17px); line-height: 1.7; }
.tagline b { color: var(--cyan); }
.features { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: min(640px, 100%); }
.features li { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: linear-gradient(180deg, rgba(56, 232, 255, 0.07), rgba(139, 92, 255, 0.04)); border: 1px solid rgba(56, 232, 255, 0.16); }
.f-ico { font-size: 18px; }
.features b { font-size: 14px; }
.features small { color: var(--muted); font-size: 12px; }

.card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12, 18, 40, 0.94), rgba(6, 8, 20, 0.95));
  border: 1px solid rgba(56, 232, 255, 0.16);
  border-top-color: rgba(56, 232, 255, 0.55);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 40px -20px rgba(56, 232, 255, 0.35);
}
.card-head { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px dashed rgba(56, 232, 255, 0.3); }
.card-head .step {
  grid-row: span 2;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 8px 4px;
  border-radius: 6px;
  background: var(--holo);
  color: #04101c;
  font: 900 9.5px var(--font-logo);
  letter-spacing: 0.2em;
}
.card-head b { font-size: 18px; }
.card-sub { color: var(--muted); font-size: 12.5px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: #dbe7fb; }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.25);
}
.swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 3px rgba(56, 232, 255, 0.55), 0 0 14px var(--c), inset 0 -6px 10px rgba(0, 0, 0, 0.25); }

#rules-box { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 12.5px; line-height: 1.55; }
.rules-head { font-size: 13.5px; font-weight: 800; color: #ffb4d9; }
.rules-list { margin: 0; padding-left: 18px; display: grid; gap: 2px; color: #d6deee; }
#rules-box a { font-size: 12px; }
.agree { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #fff; cursor: pointer; }
.agree input { width: 18px; height: 18px; flex: none; accent-color: var(--magenta); }
#rules-box.need { animation: shake 0.4s; border-color: var(--magenta); }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sec-title { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; color: var(--cyan); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
#rooms { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; max-height: 232px; overflow-y: auto; }
#rooms .empty { padding: 8px 2px; }
.room {
  width: 100%;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  text-align: left;
  font-weight: 600;
  background: rgba(56, 232, 255, 0.04);
  border: 1px solid rgba(56, 232, 255, 0.14);
  border-left: 3px solid var(--cyan);
}
.room .thumb { width: 64px; height: 36px; border-radius: 6px; background: #101830 center / cover; }
.r-info { display: grid; min-width: 0; }
.r-info b, .r-info small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.r-info small { color: #a9dff0; font-size: 12px; font-weight: 500; }
.r-count { color: var(--muted); font-size: 12px; }
#create { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.create-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.max-field { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.max-field input { width: 72px; text-align: center; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; gap: 2px; padding: 10px; border-radius: 10px; text-align: center; font-size: 13.5px; font-weight: 700; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.03); }
.seg small { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.seg input:checked + span { border-color: var(--cyan); background: rgba(56, 232, 255, 0.1); box-shadow: 0 0 18px -8px var(--cyan); }
.seg input:focus-visible + span { outline: 2px solid var(--cyan); }
#code-join summary { cursor: pointer; color: var(--muted); font-size: 13px; }
#code-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
#join-error { margin: 0; min-height: 1.2em; color: #ff8ad8; font-size: 13.5px; font-weight: 700; }
.join-foot { padding: 12px 16px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.join-foot a { color: var(--muted); }
.empty { list-style: none; color: var(--muted); font-size: 12.5px; }
body.busy #ticket button { pointer-events: none; opacity: 0.7; }

/* ---------- 정거장 안 화면 */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; user-select: none; -webkit-user-select: none; }
#hud > *:not(#side), #side > * { pointer-events: auto; }
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: 0 14px 40px -18px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 24px -16px rgba(56, 232, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.panel-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--cyan); }
.panel-head b { padding: 0 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); color: var(--text); font-size: 11px; }
.panel-head b:empty { display: none; }
.chip { padding: 8px 12px; font-size: 13px; white-space: nowrap; background: var(--panel); border: 1px solid var(--panel-border); }
.chip.ghost { color: var(--muted); }
.zone-chip { border-color: rgba(56, 232, 255, 0.55); box-shadow: 0 0 16px -8px var(--cyan); }
.wallet { display: inline-flex; align-items: center; gap: 4px; border-radius: 10px; font-weight: 800; color: #bff8ff; }
.wallet.bump { animation: bump 0.6s; }
@keyframes bump { 30% { transform: scale(1.15); box-shadow: 0 0 20px var(--cyan); } }
.icon { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; flex: none; font-size: 14px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1); }
.mini { padding: 4px 8px; font-size: 12px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; white-space: nowrap; }
.mini.armed { background: var(--magenta); border-color: var(--magenta); }

#topbar { position: absolute; top: 12px; left: 12px; max-width: calc(100% - 380px); display: flex; align-items: center; gap: 8px; }
.brand { padding: 9px 12px; border-radius: 10px; background: var(--panel); border: 1px solid rgba(56, 232, 255, 0.35); color: var(--cyan); font: 900 12px var(--font-logo); letter-spacing: 0.14em; text-shadow: 0 0 10px rgba(56, 232, 255, 0.6); }
.room-name { display: grid; min-width: 0; padding: 5px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--panel-border); }
.room-name b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.room-name small { color: var(--muted); font-size: 11px; }

#side { position: absolute; top: 12px; right: 12px; width: 344px; max-height: calc(100% - 24px); display: grid; grid-template-rows: auto minmax(0, 1fr); align-content: start; gap: 10px; }
body:not(.theater) #side { display: none; }
#now { display: grid; gap: 10px; padding: 12px; }
.now-head { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: center; }
.now-thumb { width: 72px; height: 40px; display: grid; place-items: center; border-radius: 6px; background: #101830 center / cover; }
#now.idle .now-thumb { border: 1px solid rgba(56, 232, 255, 0.3); }
#now.idle .now-thumb::after { content: "🎬"; font-size: 17px; opacity: 0.75; }
.now-text { display: grid; gap: 1px; min-width: 0; }
.now-label { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font: 700 9.5px var(--font-logo); letter-spacing: 0.2em; }
#now.idle .rec { background: var(--muted); box-shadow: none; animation: none; }
#now-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
#now-by { color: var(--muted); font-size: 12px; }
.seek { height: 6px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, 0.1); }
.seek.can { height: 8px; cursor: pointer; }
.seek i { display: block; width: 0; height: 100%; background: var(--holo); box-shadow: 0 0 10px var(--cyan); }
.now-ctrl { display: flex; align-items: center; gap: 8px; }
#play:not(:disabled) { background: var(--cta); border: 0; }
#time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#skip { margin-left: auto; padding: 7px 10px; font-size: 12.5px; }
#skip-count:empty { display: none; }
.vol { display: flex; align-items: center; gap: 4px; }
#volume, .range-input { width: 64px; padding: 0; border: 0; background: none; accent-color: var(--cyan); }
#unmute { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 62, 207, 0.25); } }

#queue { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 10px; min-height: 0; padding: 12px; }
#add-form, #chat-form, #title-form, .row-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
#add-form input, #chat-form input, #title-form input, .row-form input { padding: 8px 10px; font-size: 13.5px; }
#add-form button, #chat-form button, #title-form button, .row-form button { padding: 8px 12px; font-size: 13px; }
#queue-list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; gap: 6px; min-height: 0; overflow-y: auto; }
#queue-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
#queue-list li.empty { display: block; }
#queue-list img { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; }
.q-info { display: grid; min-width: 0; }
.q-info b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; }
.q-info small { color: var(--muted); font-size: 11px; }

/* 구역 판 (게임 점수·버튼) */
#zpanel { position: absolute; top: 12px; right: 12px; width: 320px; max-height: calc(100% - 24px); overflow-y: auto; display: grid; gap: 10px; padding: 14px; }
.zp-head { display: flex; align-items: center; gap: 8px; }
.zp-head b { font-size: 16px; }
.zp-head small { margin-left: auto; color: var(--muted); font-size: 12px; }
.zp-state { padding: 10px 12px; border-radius: 10px; background: rgba(56, 232, 255, 0.07); border: 1px solid rgba(56, 232, 255, 0.2); font-weight: 800; text-align: center; }
.zp-state.live { background: rgba(255, 62, 207, 0.12); border-color: rgba(255, 62, 207, 0.45); color: #ffd0f1; }
.zp-big { font: 900 26px var(--font-logo); color: var(--cyan); text-shadow: 0 0 12px rgba(56, 232, 255, 0.6); }
.zp-tip { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.zp-row { display: flex; gap: 6px; flex-wrap: wrap; }
.zp-row > button { flex: 1; padding: 8px 6px; font-size: 12.5px; white-space: nowrap; }
.zp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.zp-list li { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); }
.zp-list li b { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.zp-list li.me { background: rgba(56, 232, 255, 0.12); }
.zp-cap { font-size: 12px; font-weight: 800; color: var(--cyan); letter-spacing: 0.04em; }
.score2 { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; text-align: center; }
.score2 b { font: 900 30px var(--font-logo); }
.score2 .a b { color: var(--cyan); }
.score2 .b b { color: var(--magenta); }
.score2 small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hold { touch-action: none; user-select: none; -webkit-user-select: none; }
.power { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.power i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--amber), var(--magenta)); }

#chat { position: absolute; left: 12px; bottom: 12px; width: 372px; height: 300px; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 6px; padding: 10px; }
#chat-log { list-style: none; margin: 0; padding: 0 2px; display: grid; align-content: start; gap: 3px; overflow-y: auto; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
#chat-log b { margin-right: 6px; }
#chat-log .sys { color: #a9e9ff; font-size: 12.5px; white-space: pre-line; }
#chat-log .where { margin-right: 4px; font-size: 11px; opacity: 0.8; }
#reacts { display: flex; gap: 3px; }
.react { flex: 1; padding: 4px 0; font-size: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); }
.react.emote { background: rgba(139, 92, 255, 0.14); border-color: rgba(139, 92, 255, 0.35); }

#people { position: absolute; top: 62px; left: 12px; width: 320px; max-height: calc(100% - 390px); min-height: 150px; display: none; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
#people.open { display: grid; }
#people .panel-head { justify-content: space-between; }
#people-list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; gap: 6px; overflow-y: auto; }
#people-list li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
#people-list .dot { width: 10px; height: 10px; flex: none; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.p-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#people-list small { color: var(--muted); font-size: 11.5px; }

/* 손에 든 상품 */
#itembar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-radius: 14px; background: var(--panel); border: 1px solid rgba(56, 232, 255, 0.4); box-shadow: 0 0 24px -10px var(--cyan); }
#item-ico { font-size: 20px; }
#itembar b { font-size: 13.5px; }
#itembar small { color: var(--muted); font-size: 12px; }

/* 화면 맞춤(F) 중엔 패널이 영상을 덜 가리게 */
body.fit #side, body.fit #chat:not(:focus-within) { opacity: 0.28; transition: opacity 0.3s; }
body.fit #side:hover, body.fit #chat:hover { opacity: 1; }
body.fit #crosshair { display: none; }
/* 글씨 숨기기(U): 사진 찍기·감상용 */
body.noui #hud > *:not(#topbar):not(#offline):not(#countdown) { display: none !important; }
body.noui #topbar > *:not(#ui-btn) { display: none; }

#crosshair { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255, 255, 255, 0.8); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35), 0 0 8px var(--cyan); pointer-events: none !important; }
#aim { position: absolute; left: 50%; top: calc(50% + 22px); transform: translateX(-50%); padding: 5px 10px; border-radius: 8px; background: rgba(7, 11, 26, 0.88); border: 1px solid rgba(56, 232, 255, 0.5); color: #c9f7ff; font-size: 12.5px; font-weight: 700; white-space: nowrap; pointer-events: none !important; }
#aim .bar { display: block; height: 3px; margin-top: 4px; border-radius: 2px; background: var(--cyan); transform-origin: left; }
#hint { position: absolute; left: 396px; right: 368px; bottom: 14px; text-align: center; color: rgba(238, 246, 255, 0.6); font-size: 12px; text-shadow: 0 1px 2px #000; pointer-events: none !important; }
#hint b { color: var(--cyan); }
body:not(.theater) #hint { right: 344px; }
#announce { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100% - 24px)); padding: 10px 16px; border-radius: 12px; background: rgba(30, 10, 50, 0.92); border: 1px solid rgba(255, 62, 207, 0.6); color: #ffe0f6; font-weight: 700; text-align: center; }
#countdown { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font: 900 96px var(--font-logo); color: #fff; text-shadow: 0 0 30px var(--cyan), 0 0 60px var(--magenta); pointer-events: none !important; }
#offline { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 6, 15, 0.6); }
#offline span { padding: 12px 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--panel-border); font-weight: 700; }

/* ---------- 홀로그램 창 */
#modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(2, 4, 12, 0.45); }
.holo {
  position: relative;
  width: min(560px, 100%);
  max-height: min(84vh, 760px);
  overflow-y: auto;
  padding: 16px;
  border-radius: 18px;
  background:
    repeating-linear-gradient(0deg, rgba(56, 232, 255, 0.035) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, rgba(10, 22, 48, 0.94), rgba(6, 10, 26, 0.96));
  border: 1px solid rgba(56, 232, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(56, 232, 255, 0.08), 0 0 50px -12px rgba(56, 232, 255, 0.6), 0 30px 80px -30px #000;
  animation: holo-in 0.22s ease-out;
}
@keyframes holo-in { from { opacity: 0; transform: translateY(12px) scale(0.98); filter: blur(4px); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sheet-head b { font-size: 17px; color: #c9f7ff; text-shadow: 0 0 12px rgba(56, 232, 255, 0.6); }
#sheet-body { display: grid; gap: 12px; }
.tabs { display: flex; gap: 6px; }
.tabs button { flex: 1; padding: 8px; font-size: 13px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
.tabs button.on { background: rgba(56, 232, 255, 0.16); border-color: var(--cyan); }
.zlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.zlist button { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; text-align: left; background: rgba(56, 232, 255, 0.05); border: 1px solid rgba(56, 232, 255, 0.16); }
.zlist button.here { border-color: var(--cyan); background: rgba(56, 232, 255, 0.14); }
.zlist .zi { font-size: 24px; text-align: center; }
.zlist .zt { display: grid; min-width: 0; }
.zlist .zt small { color: var(--muted); font-size: 12px; font-weight: 500; }
.zlist .zc { color: var(--cyan); font-size: 12.5px; }
.vgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vitem { display: grid; gap: 4px; justify-items: center; padding: 12px 8px; border-radius: 14px; text-align: center; background: linear-gradient(180deg, rgba(56, 232, 255, 0.1), rgba(139, 92, 255, 0.05)); border: 1px solid rgba(56, 232, 255, 0.25); }
.vitem .vi { font-size: 40px; filter: drop-shadow(0 0 12px rgba(56, 232, 255, 0.6)); }
.vitem b { font-size: 13.5px; }
.vitem small { color: var(--muted); font-size: 11.5px; }
.vitem button { width: 100%; padding: 8px; font-size: 13px; }
.klist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.klist li { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(56, 232, 255, 0.16); }
.klist .kt { display: flex; align-items: center; gap: 8px; }
.klist .kt b { flex: 1; }
.klist .kt small { color: var(--muted); }
.klist .kn { color: #bff8ff; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.notes li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); font-size: 13.5px; }
.notes li span { flex: 1; overflow-wrap: anywhere; }
.notes li small { color: var(--muted); font-size: 11px; white-space: nowrap; }
textarea { width: 100%; min-height: 90px; resize: vertical; }
.photo-img { width: 100%; border-radius: 12px; border: 1px solid rgba(56, 232, 255, 0.4); display: block; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
.keys dt { color: var(--cyan); font-weight: 800; }
.keys dd { margin: 0; color: #dbe7fb; }

/* 워프 연출 */
#warp { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, rgba(180, 250, 255, 0.95), rgba(56, 232, 255, 0.55) 30%, rgba(5, 6, 15, 0.92) 70%); animation: warp-in 0.35s ease-out; pointer-events: none; }
#warp b { position: relative; padding: 10px 18px; border-radius: 12px; background: rgba(5, 6, 15, 0.7); border: 1px solid rgba(56, 232, 255, 0.6); font-size: 16px; }
.warp-ring { position: absolute; width: 60vmin; height: 60vmin; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.85); box-shadow: 0 0 40px var(--cyan), inset 0 0 40px var(--magenta); animation: ring 0.9s linear infinite; }
@keyframes warp-in { from { opacity: 0; } }
@keyframes ring { from { transform: scale(0.2); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
#flash { position: fixed; inset: 0; z-index: 16; background: #fff; animation: flash 0.5s ease-out forwards; pointer-events: none; }
@keyframes flash { to { opacity: 0; } }

#toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 30;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(7, 11, 26, 0.95);
  border: 1px solid rgba(56, 232, 255, 0.5);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 휴대폰·태블릿: 조이스틱 + 버튼, 채팅·예약·사람 목록은 아래에서 올라오는 판 */
#stick { position: absolute; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; border: 2px solid rgba(56, 232, 255, 0.35); background: rgba(7, 11, 26, 0.35); pointer-events: none !important; }
#stick i { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: rgba(56, 232, 255, 0.7); box-shadow: 0 0 16px var(--cyan); }
#touch-btns { display: none; }
body.touch #touch-btns { position: absolute; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(2, 58px); gap: 8px; }
#touch-btns button { position: relative; height: 58px; padding: 0; display: grid; place-items: center; align-content: center; font-size: 20px; line-height: 1.1; background: rgba(7, 11, 26, 0.8); border: 1px solid var(--panel-border); border-radius: 14px; }
#touch-btns small { color: var(--muted); font-size: 10.5px; max-width: 54px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#touch-btns .on { border-color: var(--cyan); box-shadow: 0 0 14px -4px var(--cyan); }
body:not(.theater) #m-fit, body:not(.theater) #m-queue { display: none; }
#m-chat.dot::after { content: ""; position: absolute; top: 7px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); }
body.touch #crosshair, body.touch #aim, body.touch #hint { display: none; }
body.touch #chat, body.touch #queue { display: none; }
body.touch #chat.open, body.touch #queue.open, body.touch #people.open {
  display: grid;
  position: fixed;
  left: 8px;
  right: 8px;
  top: auto;
  bottom: calc(144px + env(safe-area-inset-bottom));
  width: auto;
  height: min(46vh, 380px);
  max-height: none;
  z-index: 6;
}
body.touch #itembar { bottom: calc(14px + env(safe-area-inset-bottom)); left: 12px; transform: none; }
body.touch #zpanel .zp-tip { display: none; }

@media (max-width: 980px) {
  #hint { display: none; }
}
@media (max-width: 760px) {
  #topbar { top: calc(8px + env(safe-area-inset-top)); left: 8px; right: 8px; max-width: none; gap: 5px; flex-wrap: wrap; }
  .brand, #ui-btn, #invite-copy { display: none; }
  .room-name { flex: 1 1 100%; order: -1; }
  .chip { padding: 7px 9px; font-size: 12.5px; }
  #side { top: calc(98px + env(safe-area-inset-top)); left: 8px; right: 8px; width: auto; }
  #zpanel { top: calc(98px + env(safe-area-inset-top)); left: 8px; right: 8px; width: auto; max-height: 34vh; padding: 10px; gap: 8px; }
  #now { gap: 8px; padding: 10px; }
  .now-head { grid-template-columns: 56px minmax(0, 1fr); }
  .now-thumb { width: 56px; height: 32px; }
  #volume { display: none; }
  #chat { left: 8px; right: 8px; width: auto; height: 34vh; }
  #people { top: auto; left: 8px; right: 8px; width: auto; }
  .vgrid { gap: 6px; }
  .vitem .vi { font-size: 32px; }
}

/* 입장 화면 반응형 */
@media (max-width: 960px) {
  .join-wrap { grid-template-columns: minmax(0, 1fr); max-width: 540px; gap: 24px; align-items: start; }
  .hero { justify-items: center; text-align: center; }
  .features { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .join-wrap { padding: 20px 16px 16px; }
  .card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .scan, .rec, #unmute, .warp-ring, .holo { animation: none; }
}
