:root {
  --bg: #0b0806;
  --surface: rgba(24, 17, 12, 0.88);
  --surface-2: rgba(44, 31, 22, 0.92);
  --line: rgba(224, 164, 88, 0.22);
  --text: #f4ead5;
  --muted: #b8a68a;
  --accent: #e0a458;
  --accent-strong: #f2b766;
  --danger: #e46a5a;
  --ok: #7fbf7f;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ── 3D 레이어: WebGL 아래, 이름표 위 ── */
#app { position: fixed; inset: 0; touch-action: none; }
#gl, #labels { position: absolute; inset: 0; }
#gl { z-index: 1; }
#gl canvas { display: block; width: 100%; height: 100%; }
#labels { z-index: 2; pointer-events: none; }

/* ── 유튜브 플레이어: 3D 밖의 평평한 창. 유튜브 규정대로 맨 앞에 두고(아무것도 겹치지 않게) 변형하지 않는다 ── */
#player {
  position: fixed; z-index: 60; background: #000; overflow: hidden; border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55); min-width: 356px; min-height: 200px;
}
#player iframe { display: block; width: 100%; height: 100%; border: 0; }
#player .player-shield { position: absolute; inset: 0; z-index: 1; cursor: pointer; touch-action: none; }
#player-backdrop { position: fixed; inset: 0; z-index: 58; background: rgba(0, 0, 0, 0.88); }
.player-bar { position: fixed; z-index: 59; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.player-bar[hidden] { display: none; }
.player-bar button, .player-grip, .player-muted {
  padding: 4px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.player-grip { cursor: grab; touch-action: none; user-select: none; }
.player-grip:active { cursor: grabbing; }
.player-grip[hidden], .player-muted[hidden] { display: none; }
.player-muted { background: rgba(0, 0, 0, 0.7); pointer-events: none; }
.bigscreen-close {
  position: fixed; top: 12px; right: 12px; z-index: 61; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
}

/* 이름표·말풍선 */
.nametag {
  position: relative; font-size: 12px; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: rgba(0, 0, 0, 0.55); color: #fff;
}
.nametag.me { background: rgba(224, 164, 88, 0.85); color: #1a0f06; }
/* ── 말풍선 ──
   바깥 .bubble-anchor 는 CSS2D 가 위치(transform)를 정하고, 안쪽 .bubble 이 모양이다(움직이는 모양도 안쪽에서).
   모양(b_*)은 꾸미기 창에서 고르고, 이름표(.nametag)도 같은 모양을 입는다(세트). --tint 는 고른 색(대개 바탕), --ink 는 그 색에 맞춘 글자색(avatar.js 가 정한다). */
.bubble {
  position: relative; max-width: 200px; padding: 6px 10px; border-radius: 12px; font-size: 13px; line-height: 1.35;
  background: var(--tint, #fff8ea); color: var(--ink, #2a1a10); word-break: break-word; text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
:is(.bubble, .nametag).b_cloud { border-radius: 26px; padding: 8px 14px; background: var(--tint, #ffffff); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.06); }
:is(.bubble, .nametag).b_comic { background: var(--tint, #ffffff); border: 3px solid #111; border-radius: 14px; font-weight: 800; box-shadow: 3px 3px 0 #111; }
:is(.bubble, .nametag).b_memo { background: var(--tint, #ffe98a); border-radius: 2px; transform: rotate(-2deg); box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.35); }
:is(.bubble, .nametag).b_memo::before {
  content: ''; position: absolute; top: -7px; left: calc(50% - 18px); width: 36px; height: 12px;
  background: rgba(255, 255, 255, 0.55); transform: rotate(3deg);
}
:is(.bubble, .nametag).b_mint { background: var(--tint, #c9f2df); border: 2px solid #5fbf95; border-radius: 16px; }
:is(.bubble, .nametag).b_heart { background: var(--tint, #ffd1e3); border: 2px solid #ff5c93; border-radius: 18px; padding-right: 18px; }
:is(.bubble, .nametag).b_heart::after { content: '♥'; position: absolute; top: 1px; right: 6px; color: #ff5c93; font-size: 11px; }
:is(.bubble, .nametag).b_ticket {
  background: var(--tint, #ffe0b0); border-radius: 6px; padding: 6px 14px;
  border-left: 4px dashed rgba(0, 0, 0, 0.3); border-right: 4px dashed rgba(0, 0, 0, 0.3);
}
:is(.bubble, .nametag).b_receipt {
  background: var(--tint, #ffffff); border-radius: 0; font-family: ui-monospace, Consolas, monospace; font-size: 12px;
  border-bottom: 3px dotted rgba(0, 0, 0, 0.3); padding-bottom: 8px;
}
:is(.bubble, .nametag).b_polaroid { background: var(--tint, #ffffff); border-radius: 2px; padding: 8px 10px 18px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45); }
:is(.bubble, .nametag).b_sheet {
  background: repeating-linear-gradient(to bottom, transparent 0 5px, rgba(0, 0, 0, 0.28) 5px 6px), var(--tint, #fffdf5);
  border-radius: 6px; padding: 8px 12px; font-weight: 600;
}
:is(.bubble, .nametag).b_chalk {
  background: var(--tint, #2f4f3a); color: var(--ink, #f4f1e8); border: 4px solid #8a5a33; border-radius: 4px;
  letter-spacing: 0.02em; text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}
:is(.bubble, .nametag).b_wood {
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 9px), var(--tint, #b07a45);
  color: var(--ink, #fff4e0); border: 2px solid #5a3a1e; border-radius: 6px; font-weight: 700;
}
:is(.bubble, .nametag).b_pixel {
  background: var(--tint, #ffffff); border-radius: 0; margin: 4px; font-family: ui-monospace, Consolas, monospace; font-size: 12px;
  box-shadow: 0 -4px 0 #222, 0 4px 0 #222, -4px 0 0 #222, 4px 0 0 #222;
}
:is(.bubble, .nametag).b_night {
  background: radial-gradient(1px 1px at 18% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 72% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 45% 82%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 88% 20%, #fff 50%, transparent 51%), var(--tint, #1a2240);
  color: var(--ink, #e8ecff); border-radius: 14px;
}
:is(.bubble, .nametag).b_vinyl {
  background: repeating-radial-gradient(circle, #141414 0 2px, #262626 2px 4px); color: #fff;
  border: 3px solid var(--tint, #c8323c); border-radius: 22px;
}
:is(.bubble, .nametag).b_menu {
  background: var(--tint, #1b1410); color: var(--ink, #f2d28a); border: 3px double #d4a52a; border-radius: 6px;
  font-family: Georgia, 'Times New Roman', serif; font-style: italic;
}
/* 움직이는 말풍선 */
:is(.bubble, .nametag).b_float { background: var(--tint, #e8f4ff); border-radius: 18px; animation: bubble-float 2.4s ease-in-out infinite; }
:is(.bubble, .nametag).b_heartbeat { background: var(--tint, #ffd1e3); border: 2px solid #ff5c93; border-radius: 18px; animation: bubble-beat 1.1s ease-in-out infinite; }
:is(.bubble, .nametag).b_jelly { background: var(--tint, #ffc46b); border-radius: 20px; animation: bubble-jelly 1.6s ease-in-out infinite; }
:is(.bubble, .nametag).b_wave {
  background: linear-gradient(90deg, var(--tint, #7cc4ff), #c9ecff, var(--tint, #7cc4ff)); background-size: 200% 100%;
  border-radius: 16px; animation: bubble-pan 3s ease-in-out infinite alternate;
}
:is(.bubble, .nametag).b_sparkle {
  border: 2px solid transparent; border-radius: 14px; background-size: 100% 100%, 300% 100%;
  background-image: linear-gradient(var(--tint, #fff8ea), var(--tint, #fff8ea)), linear-gradient(90deg, #fff, #ffd76a, #fff, #9ad7ff, #fff);
  background-origin: padding-box, border-box; background-clip: padding-box, border-box;
  animation: bubble-pan2 2s linear infinite alternate;
}
:is(.bubble, .nametag).b_marquee {
  background: var(--tint, #111111); color: var(--ink, #ffd84d); border: 3px dotted #ffd84d; border-radius: 6px;
  font-family: ui-monospace, Consolas, monospace; animation: bubble-blink 0.8s steps(1) infinite;
}
:is(.bubble, .nametag).b_glitch { background: var(--tint, #111111); color: var(--ink, #ffffff); border-radius: 4px; animation: bubble-glitch 1.4s steps(1) infinite; }
:is(.bubble, .nametag).b_snowfall {
  background-color: var(--tint, #2a3d66); color: var(--ink, #ffffff); border-radius: 14px;
  background-image: radial-gradient(2px 2px at 8px 6px, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 28px 22px, #fff 50%, transparent 51%);
  background-size: 40px 40px; animation: bubble-snow 3s linear infinite;
}
:is(.bubble, .nametag).b_neon {
  background: var(--tint, #120a1e); color: var(--ink, #ffffff); border: 2px solid #ff4fa3; border-radius: 12px;
  text-shadow: 0 0 6px #ff4fa3; animation: bubble-flicker 3s linear infinite;
}
:is(.bubble, .nametag).b_fire { background: var(--tint, #2a0d05); color: var(--ink, #ffe6b0); border-radius: 12px; animation: bubble-flame 0.9s ease-in-out infinite alternate; }
:is(.bubble, .nametag).b_rainbow {
  background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #c77dff, #ff6b6b); background-size: 300% 100%;
  color: #1b1410; font-weight: 700; border: 2px solid var(--tint, #ffffff); border-radius: 16px; animation: bubble-pan 4s linear infinite alternate;
}
:is(.bubble, .nametag).b_aurora {
  background: linear-gradient(120deg, #0b1a3a, #1fd1a5, #7b5cff, #0b1a3a); background-size: 300% 300%; color: #ffffff;
  border: 2px solid var(--tint, rgba(255, 255, 255, 0.25)); border-radius: 16px; animation: bubble-pan 6s ease-in-out infinite alternate;
}
:is(.bubble, .nametag).b_disco { background: var(--tint, #1b1410); color: var(--ink, #ffffff); border-radius: 12px; font-weight: 700; animation: bubble-disco 1.2s steps(1) infinite; }
:is(.bubble, .nametag).b_gold {
  background: linear-gradient(110deg, #b8862b 0%, #f5d77a 40%, #fff3c4 50%, #f5d77a 60%, #b8862b 100%); background-size: 250% 100%;
  color: #3a2400; font-weight: 800; border-radius: 12px; padding-left: 24px; box-shadow: 0 0 0 2px var(--tint, #e0b040), 0 2px 10px rgba(0, 0, 0, 0.45);
  animation: bubble-pan 2.5s linear infinite;
}
:is(.bubble, .nametag).b_gold::before { content: '👑'; position: absolute; left: 5px; top: 50%; transform: translateY(-50%); font-size: 12px; }
@keyframes bubble-float { 50% { transform: translateY(-5px); } }
@keyframes bubble-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.08); } 30% { transform: scale(1); } 45% { transform: scale(1.05); } }
@keyframes bubble-jelly { 0%, 100% { transform: scale(1, 1); } 25% { transform: scale(1.07, 0.93); } 50% { transform: scale(0.95, 1.05); } 75% { transform: scale(1.03, 0.97); } }
@keyframes bubble-pan { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes bubble-pan2 { from { background-position: 0 0, 0% 0; } to { background-position: 0 0, 100% 0; } }
@keyframes bubble-blink { 50% { border-color: #ff4f8b; } }
@keyframes bubble-glitch {
  0%, 100% { text-shadow: -1px 0 #ff3b3b, 1px 0 #3bd5ff; transform: none; }
  20% { text-shadow: 2px 0 #ff3b3b, -2px 0 #3bd5ff; transform: translateX(1px); }
  40% { text-shadow: -2px 1px #ff3b3b, 2px -1px #3bd5ff; transform: translateX(-1px); }
}
@keyframes bubble-snow { to { background-position: 0 40px, 0 40px; } }
@keyframes bubble-flicker {
  0%, 18%, 22%, 58%, 62%, 100% { box-shadow: 0 0 10px #ff4fa3, inset 0 0 6px #ff4fa3; opacity: 1; }
  20%, 60% { box-shadow: none; opacity: 0.7; }
}
@keyframes bubble-flame {
  from { box-shadow: 0 0 8px #ff7b1a, 0 -3px 10px #ffb347; }
  to { box-shadow: 0 0 14px #ff5a1a, 0 -6px 18px #ffd27a; }
}
@keyframes bubble-disco {
  0% { box-shadow: 0 0 0 3px #ff4fa3, 0 0 12px #ff4fa3; }
  25% { box-shadow: 0 0 0 3px #4ff0ff, 0 0 12px #4ff0ff; }
  50% { box-shadow: 0 0 0 3px #ffd84d, 0 0 12px #ffd84d; }
  75% { box-shadow: 0 0 0 3px #6dff8a, 0 0 12px #6dff8a; }
}
/* 이름표는 작게: 말풍선용 넓은 여백은 줄인다 */
.nametag.b_cloud, .nametag.b_polaroid, .nametag.b_sheet, .nametag.b_receipt { padding: 2px 10px; }
.nametag.b_gold { padding-left: 22px; }
@media (prefers-reduced-motion: reduce) { .bubble, .nametag { animation: none !important; } }
.emote-pop { font-size: 28px; animation: pop 1.8s ease-out forwards; }
@keyframes pop {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  15% { transform: translateY(-6px) scale(1.1); opacity: 1; }
  100% { transform: translateY(-36px) scale(1); opacity: 0; }
}

/* ── 입장 화면 ── */
.overlay {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(11, 8, 6, 0.55), rgba(11, 8, 6, 0.92));
}
.card {
  width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px 24px; display: grid; gap: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); backdrop-filter: blur(6px);
}
.logo {
  margin: 0; text-align: center; font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: 34px; letter-spacing: 0.06em; color: var(--accent-strong);
  text-shadow: 0 0 18px rgba(242, 183, 102, 0.45);
}
#entry-form { position: relative; }
.lang-select {
  position: absolute; top: 10px; right: 12px; padding: 3px 6px; border-radius: 8px; font-size: 12px;
  background: rgba(0, 0, 0, 0.35); color: var(--muted); border: 1px solid var(--line);
}
.sub { margin: -8px 0 4px; text-align: center; color: var(--muted); font-size: 14px; }
.field { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.field input, .admin input, .panel-input {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35); color: var(--text); font-size: 16px; outline: none;
}
.field input:focus, .admin input:focus, .panel-input:focus { border-color: var(--accent); }
.colors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.colors button {
  aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; padding: 0;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25);
}
.colors button[aria-checked="true"] { border-color: var(--text); transform: scale(1.08); }
.admin summary { color: var(--muted); font-size: 13px; cursor: pointer; }
.admin input { margin-top: 8px; }
.primary {
  padding: 13px; border: 0; border-radius: 10px; background: var(--accent); color: #1a0f06;
  font-weight: 700; font-size: 16px;
}
.primary:disabled { opacity: 0.6; cursor: progress; }
.status { margin: 0; min-height: 1.2em; text-align: center; font-size: 13px; color: var(--muted); }
.status.error { color: var(--danger); }

/* ── HUD ── */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud > * { pointer-events: auto; }
#hud.menu-open { z-index: 25; }
#topbar {
  position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 12px;
  justify-content: space-between; align-items: center; pointer-events: none;
}
#topbar > * { pointer-events: auto; }
.np {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 12px; min-width: 0; max-width: min(520px, 55vw); display: grid;
}
.np-label { font-size: 10px; letter-spacing: 0.14em; color: var(--accent); }
#np-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.top-actions {
  display: flex; gap: 8px; align-items: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px;
}
.top-actions button { background: none; border: 0; font-size: 18px; padding: 2px 4px; }
#count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.sound-ctl { position: relative; display: flex; align-items: center; }
.top-actions #sound-opts { font-size: 12px; color: var(--muted); padding: 2px; }
#sound-menu {
  position: absolute; top: calc(100% + 10px); right: -6px; z-index: 30; display: grid; gap: 8px; min-width: 170px;
  padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
#sound-menu label { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; cursor: pointer; }
#sound-menu input { width: 16px; height: 16px; accent-color: var(--accent); }
#sound-menu .sfx-volume { padding-left: 24px; }
#sound-menu .sfx-volume input { width: 120px; height: auto; }
.volume { display: flex; align-items: center; gap: 4px; }
.volume input { width: 90px; accent-color: var(--accent); }
#ios-note { font-size: 11px; color: var(--muted); max-width: 120px; }

#emotes {
  position: absolute; bottom: calc(16px + var(--safe-b)); left: 16px;
  display: flex; gap: 8px;
}
/* PC 게임 안 광고: 표현 버튼·앉기 줄·춤 버튼(댄스 플로어 위에서) 위 */
#emotes button, #sit-btn, #tap-sound {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 20px; display: flex; align-items: center; gap: 6px;
}
#emotes button span { font-size: 13px; color: var(--muted); }
#emotes button:disabled { opacity: 0.45; }
#actions {
  position: absolute; bottom: calc(72px + var(--safe-b)); left: 16px; right: 390px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none;
}
#actions > * { pointer-events: auto; }
#sit-btn { font-size: 15px; background: var(--accent); color: #1a0f06; font-weight: 700; white-space: nowrap; }
#jump-btn { display: none !important; }
#tap-sound {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 18px; padding: 14px 22px; background: var(--accent); color: #1a0f06; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
#conn-status {
  position: absolute; top: 70px; left: 50%; transform: translateX(-50%); margin: 0;
  background: var(--danger); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: 13px;
}
#joystick {
  position: absolute; left: 24px; bottom: calc(24px + var(--safe-b)); width: 120px; height: 120px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18);
  touch-action: none;
}
#joystick .knob {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%; background: rgba(224, 164, 88, 0.7);
}

/* ── 패널 ── */
#panel {
  position: fixed; z-index: 20; top: 72px; right: 12px; bottom: 12px; width: 360px;
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; backdrop-filter: blur(6px);
  transition: transform 0.25s ease;
}
#panel.collapsed { transform: translateX(calc(100% - 44px)); }
.tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; }
.tabs button {
  flex: 1; background: none; border: 0; padding: 11px 4px; font-size: 13px; color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tabs button[aria-selected="true"] { color: var(--accent-strong); border-bottom-color: var(--accent); }
.tabs .toggle { flex: none; width: 44px; font-size: 16px; }
.tab-body { flex: 1; min-height: 0; display: none; flex-direction: column; }
.tab-body.active { display: flex; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; }
.composer { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); flex: none; }
.composer .panel-input { padding: 9px 10px; font-size: 15px; }
.btn {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; font-size: 13px; white-space: nowrap;
}
.btn.accent { background: var(--accent); color: #1a0f06; border-color: transparent; font-weight: 700; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: 0.4; cursor: default; }
.icon-btn { background: none; border: 0; padding: 4px 6px; font-size: 14px; color: var(--muted); }
.icon-btn:hover { color: var(--text); }

.chat-msg { margin: 0 0 8px; font-size: 14px; line-height: 1.4; word-break: break-word; }
.chat-msg .who { color: var(--accent); margin-right: 6px; font-weight: 600; }
.chat-msg.system { color: var(--muted); font-size: 12px; }

.track { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.track img { width: 64px; height: 36px; object-fit: cover; border-radius: 4px; flex: none; background: #000; }
.track .meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.track .title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .by { font-size: 11px; color: var(--muted); }
.track .actions { display: flex; flex: none; }
.badge {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 999px; margin-right: 4px;
  background: rgba(224, 164, 88, 0.2); color: var(--accent-strong);
}
.section-title { font-size: 11px; letter-spacing: 0.12em; color: var(--accent); margin: 14px 0 4px; }
.section-title:first-child { margin-top: 0; }
.now { background: rgba(224, 164, 88, 0.08); border-radius: 8px; padding: 8px; }
.controls { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.progress { width: 100%; accent-color: var(--accent); margin-top: 6px; }
.time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 0; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.req-status { font-size: 11px; }
.req-status.approved { color: var(--ok); }
.req-status.rejected { color: var(--danger); }
.toast {
  position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 50;
  background: var(--surface-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px;
  font-size: 13px; animation: fade 3s forwards;
}
@keyframes fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* 서버 전체 공지 띠: 입장 화면(z 40) 위, 다른 창(46~)보다는 아래. 게임 안에서는 위쪽 막대 밑으로 내린다. */
#server-notice {
  position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 45;
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 32px);
  padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--accent-strong); color: #1b1410;
  font-size: 14px; font-weight: 600; line-height: 1.4; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
#server-notice[hidden] { display: none; }
/* 이벤트 띠: 게임 안 위쪽 막대 밑, 공지가 떠 있으면 그 밑 */
#event-bar {
  position: fixed; top: calc(64px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 44;
  display: flex; gap: 10px; width: max-content; max-width: calc(100% - 32px); padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 61, 154, 0.9); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 0 16px rgba(255, 61, 154, 0.5);
}
body:has(#server-notice:not([hidden])) #event-bar { top: calc(118px + env(safe-area-inset-top, 0px)); }
#room-closing {
  position: fixed; top: calc(112px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 45;
  width: max-content; max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 12px;
  background: var(--danger); color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
#room-closing[hidden] { display: none; }
#reload-bar {
  position: fixed; top: calc(112px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 45;
  width: max-content; max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 12px;
  background: var(--accent); color: #1a0f06; font-size: 14px; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
#reload-bar[hidden] { display: none; }
#server-notice span { overflow-wrap: anywhere; }
#server-notice button { flex: none; background: none; border: 0; color: inherit; font-size: 14px; cursor: pointer; padding: 2px 6px; }
body:has(#hud:not([hidden])) #server-notice { top: calc(64px + env(safe-area-inset-top, 0px)); }
body:has(#server-notice:not([hidden])) .toast { top: 124px; }

/* ── 모바일 ── */
@media (max-width: 767px), (pointer: coarse) and (max-width: 1024px) {
  #topbar { top: 8px; left: 8px; right: 8px; gap: 6px; }
  .np { max-width: 46vw; padding: 6px 10px; }
  .volume input { width: 64px; }
  #ios-note { display: none; }
  #emotes { left: auto; right: 12px; transform: none; flex-direction: column; bottom: calc(76px + var(--safe-b)); }
  #emotes button { padding: 8px 10px; }
  #emotes button span { display: none; }
  #actions { left: 12px; right: 12px; justify-content: center; bottom: calc(196px + var(--safe-b)); }
  #jump-btn { display: flex !important; }
  #panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 60vh; border-radius: 16px 16px 0 0;
    padding-bottom: var(--safe-b);
  }
  #panel.collapsed { transform: translateY(calc(100% - 44px - var(--safe-b))); }
  #panel .tabs .toggle { order: -1; }
  #joystick { bottom: calc(60px + var(--safe-b)); }
}

/* ── 꾸미기 ── */
.outfit-btn {
  padding: 10px; border-radius: 10px; border: 1px dashed var(--line); background: rgba(0, 0, 0, 0.25);
  color: var(--text); font-size: 14px;
}
.wardrobe { z-index: 45; }
.wardrobe-card { width: min(760px, 100%); max-height: calc(100vh - 32px); padding: 18px; gap: 12px; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.wardrobe-head { display: flex; justify-content: space-between; align-items: center; }
.wardrobe-head h2 { margin: 0; font-size: 18px; color: var(--accent-strong); }
/* 꾸미기 창의 「☕ 후원」: 포인트가 모자라면 번쩍이고 아래에 작은 말풍선 */
.shop-tip-wrap { position: relative; }
.shop-tip {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--accent); background: rgba(224, 164, 88, 0.12);
  color: var(--accent-strong); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.shop-tip:hover { background: rgba(224, 164, 88, 0.25); }
.shop-tip-bubble {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 3; display: none;
  padding: 4px 9px; border-radius: 8px; background: #ffdd00; color: #1a0f06; font-size: 11.5px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); pointer-events: none;
}
.shop-tip-bubble::before {
  content: ''; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-bottom-color: #ffdd00;
}
.shop-tip-wrap.nudge .shop-tip-bubble { display: block; animation: tip-bob 1.6s ease-in-out infinite; }
.shop-tip-wrap.nudge .shop-tip { border-color: #ffdd00; color: #ffdd00; animation: tip-flash 0.9s ease-in-out infinite; }
@keyframes tip-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 221, 0, 0); background: rgba(255, 221, 0, 0.1); }
  50% { box-shadow: 0 0 14px 3px rgba(255, 221, 0, 0.65); background: rgba(255, 221, 0, 0.32); }
}
@keyframes tip-bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 3px); } }
@media (prefers-reduced-motion: reduce) {
  .shop-tip-wrap.nudge .shop-tip, .shop-tip-wrap.nudge .shop-tip-bubble { animation: none; }
}
.wardrobe-close { background: none; border: 0; font-size: 18px; color: var(--muted); }
.wardrobe-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; min-height: 0; }
.wardrobe-preview {
  height: 300px; border-radius: 14px; overflow: hidden; touch-action: none; cursor: grab;
  background: radial-gradient(circle at 50% 35%, #3a2416, #120b07 75%);
}
.wardrobe-preview canvas { display: block; }
.spin-toggle {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line); color: var(--text); cursor: pointer;
}
.wardrobe-preview { position: relative; }
.bubble-preview {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); pointer-events: none; z-index: 1;
  display: grid; justify-items: center; gap: 8px;
}
.bubble-preview[hidden] { display: none; }
.wardrobe-pick { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; min-height: 0; }
.tint-row { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.tint-row[hidden] { display: none; }
.tint-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.tint-reset { padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 12px; }
.tint-reset:disabled { opacity: 0.4; }
.wardrobe-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wardrobe-tabs button {
  padding: 7px 0; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px;
}
.wardrobe-tabs button[aria-selected="true"] { background: var(--accent); color: #1a0f06; border-color: var(--accent); font-weight: 700; }
.wardrobe-items {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px;
  overflow-y: auto; max-height: 300px; padding-right: 2px; scrollbar-color: var(--line) transparent;
}
.wardrobe-item {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 4px;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3);
}
.wardrobe-item .icon { font-size: 24px; line-height: 1.1; }
.wardrobe-item .name { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.2; }
.wardrobe-item .badge { position: absolute; top: 3px; right: 4px; font-size: 10px; }
.wardrobe-item .moving { position: absolute; top: 3px; left: 4px; font-size: 10px; }
.wardrobe-item[aria-pressed="true"] { border-color: var(--accent); background: rgba(224, 164, 88, 0.2); }
.wardrobe-item[aria-pressed="true"] .name { color: var(--text); }
.wardrobe-item:disabled { opacity: 0.45; cursor: not-allowed; }
.wardrobe-note { margin: 0; font-size: 12px; color: var(--muted); }
.wardrobe-foot { display: flex; gap: 8px; justify-content: flex-end; }
.wardrobe-foot .primary { min-width: 120px; padding: 10px 16px; }
.wardrobe-reset { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--muted); }

@media (max-width: 640px) {
  .wardrobe-card { padding: 14px; }
  .wardrobe-body { grid-template-columns: 1fr; }
  .wardrobe-preview { height: 190px; }
  .wardrobe-items { max-height: none; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── 바: 주문·잡기/마시기 버튼, 칵테일 메뉴, 제조 연출 ── */
#order-btn, #act-btn {
  border-radius: 999px; padding: 8px 14px; font-size: 15px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--accent); color: var(--text);
}
#order-btn { background: linear-gradient(135deg, #ff6fa3, #e0a458) !important; color: #1a0f06 !important; border: 0 !important; }
#act-btn kbd, #sit-btn kbd {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-right: 6px; border-radius: 5px;
  background: var(--accent); color: #1a0f06; font: 700 12px/18px var(--font);
}
.cocktail-menu { z-index: 45; }
.menu-card { width: min(1000px, 100%); max-height: calc(100vh - 32px); padding: 18px; gap: 10px; grid-template-rows: auto auto auto minmax(0, 1fr); }
.menu-body { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 12px; min-height: 0; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; overflow-y: auto; align-content: start; scrollbar-color: var(--line) transparent; }
.menu-item.previewing { border-color: var(--accent-strong); background: rgba(224, 164, 88, 0.16); }
.menu-preview {
  display: grid; grid-template-rows: auto auto auto auto auto 1fr; gap: 4px; align-content: start; padding: 12px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); overflow-y: auto;
}
.menu-stage { height: 230px; border-radius: 10px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #3a2416, #120b07 75%); }
.menu-stage canvas { display: block; }
.menu-pv-name { margin-top: 6px; font-size: 18px; color: var(--accent-strong); }
.menu-pv-en { font: italic 13px Georgia, serif; color: var(--muted); }
.menu-pv-desc { margin: 6px 0 0; font-size: 14px; line-height: 1.5; }
.menu-pv-meta { margin: 2px 0 0; font-size: 12px; color: var(--accent); }
.menu-pv-order { align-self: end; margin-top: 10px; }
.menu-preview.premium { border-color: rgba(232, 193, 90, 0.55); }
.menu-preview.premium .menu-stage { background: radial-gradient(circle at 50% 40%, #4a3510, #0d0904 75%); }
.menu-preview.premium .menu-pv-name { color: #ffe7a3; }
@media (max-width: 700px) {
  .menu-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .menu-preview { order: -1; grid-template-columns: 110px 1fr; grid-template-rows: none; column-gap: 10px; }
  .menu-stage { height: 120px; grid-row: span 5; }
  .menu-pv-name { margin-top: 0; font-size: 15px; }
  .menu-pv-desc { font-size: 13px; margin: 2px 0 0; }
  .menu-pv-order { padding: 8px; font-size: 14px; }
}
.menu-item {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left;
  padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3);
}
.menu-item:hover { border-color: var(--accent); background: rgba(224, 164, 88, 0.12); }
.menu-item .swatch {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25), 0 0 14px rgba(255, 180, 100, 0.25);
}
.menu-item .text { display: grid; gap: 2px; min-width: 0; }
.menu-item .text b { font-size: 14.5px; }
.menu-item .text small { font-size: 11.5px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.menu-item .strength { font-size: 10px; color: var(--accent); letter-spacing: 1px; }

.cine { position: fixed; inset: 0; z-index: 35; pointer-events: none; }
.cine-bar {
  position: absolute; left: 0; right: 0; height: 12vh; background: #000;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cine-bar.top { top: 0; transform: translateY(-100%); }
.cine-bar.bottom { bottom: 0; transform: translateY(100%); }
.cine.on .cine-bar { transform: none; }
.cine-title {
  position: absolute; left: 0; right: 0; bottom: 15vh; text-align: center; opacity: 0;
  transform: translateY(12px) scale(0.96); transition: opacity 0.5s, transform 0.5s;
}
.cine.title-on .cine-title { opacity: 1; transform: none; }
.cine-title small { display: block; font-size: 13px; letter-spacing: 0.35em; text-transform: uppercase; color: var(--muted); }
.cine-title b {
  display: block; font: italic 700 clamp(34px, 7vw, 72px) Georgia, "Times New Roman", serif; color: #ffe1b0;
  text-shadow: 0 0 8px #ff8a3d, 0 0 26px #ff6a1a, 0 0 48px rgba(255, 90, 30, 0.6);
  animation: neon-flicker 2.4s steps(1) infinite;
}
.cine-title span { display: block; margin-top: 4px; font-size: 16px; color: var(--text); letter-spacing: 0.2em; }
@keyframes neon-flicker {
  0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; }
  20%, 63% { opacity: 0.55; }
}
.cine-hidden { visibility: hidden; }

#sit-btn kbd { background: #1a0f06; color: var(--accent); }
.screen-hover { cursor: zoom-in; }

/* ── 입장 화면: 가운데 입장 카드, 양옆에 열린 방 ── */
#entry { overflow-y: auto; place-items: safe center; }
.entry-layout {
  display: grid; grid-template-columns: minmax(250px, 280px) minmax(0, 380px) minmax(250px, 280px);
  gap: 20px; align-items: start; justify-content: center; width: min(1020px, 100%);
}
/* 방 목록 칸: 위는 스크롤되는 목록, 왼쪽 칸 맨 아래에 광고 자리(160x300) */
.room-col { display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 32px); min-height: 0; }
.room-list { display: grid; gap: 8px; align-content: start; flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-color: var(--line) transparent; }
.room-col-title { margin: 4px 2px; font-size: 12px; letter-spacing: 0.1em; color: var(--accent); }
.room-card {
  display: grid; gap: 4px; text-align: left; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(6px);
  transition: border-color 0.15s, transform 0.15s;
}
.room-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.room-card.selected { border-color: var(--accent-strong); background: rgba(224, 164, 88, 0.18); box-shadow: 0 0 0 1px var(--accent) inset; }
.room-card.quiet:not(.selected) { opacity: 0.7; }
.room-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.room-card-head b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.room-card .room-desc { font-size: 12px; color: var(--muted); white-space: pre-line; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.room-pick { font-size: 11px; color: var(--muted); }
.room-card.selected .room-pick { color: var(--accent-strong); font-weight: 700; }
.room-empty { padding: 14px 12px; border-radius: 12px; border: 1px dashed var(--line); background: rgba(0, 0, 0, 0.3); display: grid; gap: 10px; }
.room-empty p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.secondary-btn {
  padding: 11px; border-radius: 10px; border: 1px solid var(--accent); background: transparent; color: var(--accent-strong);
  font-weight: 700; font-size: 15px;
}
.secondary-btn:hover { background: rgba(224, 164, 88, 0.12); }
@media (max-width: 900px) {
  .entry-layout { grid-template-columns: minmax(0, 420px); }
  #entry-form { order: -1; width: 100%; }
  .room-col { max-height: none; }
  .room-list { overflow: visible; }
}

/* ── 방·계정·포인트 ── */
.entry-room {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted);
  padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line);
}
.entry-room b { color: var(--accent-strong); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-row button {
  padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px;
}
.account-box .hint { margin: 8px 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.account-row { display: flex; gap: 6px; margin-top: 6px; }
.account-row input { flex: 1; margin-top: 0 !important; font-size: 13px !important; padding: 8px 10px !important; }
#room-title { font-size: 13px; color: var(--accent); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#points { font-size: 13px; color: #ffd76a; white-space: nowrap; cursor: pointer; }
#points:hover { text-decoration: underline; }
.wardrobe-head { gap: 10px; }
.wardrobe-head h2 { flex: 1; }
.wardrobe-points { font-size: 14px; color: #ffd76a; font-weight: 700; }
.wardrobe-item.locked .icon { filter: grayscale(0.6); opacity: 0.75; }
.wardrobe-item .badge.price { font-size: 10px; color: #ffd76a; top: 2px; right: 3px; }
.buy-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px;
  border-radius: 10px; background: rgba(255, 215, 106, 0.1); border: 1px solid rgba(255, 215, 106, 0.35); font-size: 13px;
}
.cart-main { display: grid; gap: 6px; min-width: 0; }
.cart-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cart-clear { padding: 2px 9px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
.cart-clear:hover { color: var(--danger); border-color: var(--danger); }
.cart-list { display: flex; flex-wrap: wrap; gap: 4px; max-height: 64px; overflow-y: auto; scrollbar-color: var(--line) transparent; }
.try-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px;
  border-radius: 10px; border: 1px dashed rgba(255, 215, 106, 0.35); font-size: 13px;
}
.cart-add { padding: 6px 12px; border-radius: 9px; border: 1px solid #ffd76a; background: none; color: #ffd76a; font-weight: 700; white-space: nowrap; }
.cart-add.in { border-color: var(--line); color: var(--muted); font-weight: 400; }
.cart-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 999px; font-size: 12px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 215, 106, 0.3); white-space: nowrap;
}
.cart-x { background: none; border: 0; color: var(--muted); font-size: 11px; padding: 0 4px; cursor: pointer; }
.cart-x:hover { color: var(--danger); }
.buy-btn { padding: 7px 12px; border-radius: 9px; border: 0; background: #ffd76a; color: #1a0f06; font-weight: 700; white-space: nowrap; }
.buy-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.buy-btns { display: grid; gap: 6px; }
.buy-btn.voucher { background: #9fd8ff; }
.rooms-dialog { z-index: 46; }
.rooms-card { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; gap: 10px; }
.room-private { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

/* ── 댄스 스테이지 버튼 ── */
#dance-bar {
  position: absolute; left: 16px; bottom: calc(128px + var(--safe-b));
  display: flex; gap: 6px; padding: 6px; border-radius: 999px;
  background: rgba(20, 10, 30, 0.85); border: 1px solid rgba(255, 61, 154, 0.5);
  box-shadow: 0 0 18px rgba(255, 61, 154, 0.35);
}
#dance-bar button {
  display: flex; align-items: center; gap: 5px; padding: 7px 11px; border-radius: 999px; border: 0;
  background: transparent; font-size: 18px; color: var(--text);
}
#dance-bar button span { font-size: 12.5px; color: #f6c6ff; }
#dance-bar button:hover { background: rgba(255, 61, 154, 0.18); }
#dance-bar button.on { background: linear-gradient(135deg, #ff3d9a, #9b5cff); }
#dance-bar button.on span { color: #fff; }
@media (max-width: 767px), (pointer: coarse) and (max-width: 1024px) {
  #dance-bar { left: 50%; transform: translateX(-50%); bottom: calc(250px + var(--safe-b)); flex-wrap: wrap; justify-content: center; width: min(92vw, 420px); border-radius: 18px; }
  #dance-bar button span { display: none; }
}

/* ── 프리미엄 샷 연출·메뉴 ── */
.cine.gold::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.8s;
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 200, 90, 0.08), rgba(10, 6, 2, 0.55) 70%);
}
.cine.gold.on::before { opacity: 1; }
.cine.gold .cine-title b {
  color: #fff3c4; text-shadow: 0 0 8px #e8c15a, 0 0 26px #c9962a, 0 0 46px rgba(232, 193, 90, 0.6);
  font-family: "Didot", "Bodoni MT", Georgia, serif; letter-spacing: 0.04em; animation: none;
}
.cine.gold .cine-title small { color: #e8c15a; }
/* 프리미엄 샷: 불이 꺼진 듯 더 어둡게, 영문 이름은 한 글자씩 떠오른다 */
.cine.gold::before { background: radial-gradient(ellipse at 50% 45%, rgba(255, 200, 90, 0.06), rgba(6, 3, 1, 0.82) 62%); }
.cine.gold .cine-title b span { display: inline-block; white-space: pre; opacity: 0; transform: translateY(14px) scale(1.4); filter: blur(6px); }
.cine.gold.title-on .cine-title b span { animation: letter-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; animation-delay: calc(var(--i) * 55ms + 0.25s); }
@keyframes letter-in { to { opacity: 1; transform: none; filter: none; } }
.cine-flash { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at 50% 45%, #fff6d8, rgba(255, 220, 140, 0.5) 45%, transparent 75%); }
.cine-flash.warm { background: radial-gradient(circle at 50% 50%, #ffd08a, rgba(255, 120, 40, 0.45) 45%, transparent 75%); }
.cine-flash.on { animation: flash 0.55s ease-out; }
@keyframes flash { 0% { opacity: 0.85; } 100% { opacity: 0; } }
.menu-tabs { display: flex; gap: 6px; }
.menu-tabs button {
  flex: 1; padding: 8px 0; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px;
}
.menu-tabs button[aria-selected="true"] { background: var(--accent); color: #1a0f06; border-color: var(--accent); font-weight: 700; }
.menu-item.premium { border-color: rgba(232, 193, 90, 0.45); background: linear-gradient(135deg, rgba(232, 193, 90, 0.1), rgba(0, 0, 0, 0.3)); }
.menu-item.premium .swatch { box-shadow: inset 0 0 0 2px #e8c15a, 0 0 14px rgba(232, 193, 90, 0.45); }
.menu-item.premium .strength { color: #ff8a3d; }

/* ── 방 공지(채팅 위) · 자동 승인 ── */
.notice { flex: none; margin: 10px 12px 0; padding: 8px 10px; border-radius: 10px; background: rgba(224, 164, 88, 0.1); border: 1px solid var(--line); }
.notice-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: 0.08em; color: var(--accent); }
.notice-text { margin: 4px 0 0; font-size: 13px; line-height: 1.45; white-space: pre-line; word-break: break-word; max-height: 7.5em; overflow-y: auto; }
.notice-text.empty-notice { color: var(--muted); font-size: 12px; }
.notice-text.folded { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: none; cursor: pointer; opacity: 0.75; }
.notice-fold { background: none; border: 0; padding: 0; font-size: 11px; letter-spacing: 0.08em; color: var(--accent); }
.notice-form { display: grid; gap: 6px; margin-top: 6px; }
.notice-input { resize: vertical; font-size: 14px; padding: 8px 10px; }
.auto-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; cursor: pointer;
  background: rgba(127, 191, 127, 0.08); border: 1px solid rgba(127, 191, 127, 0.3);
}
.auto-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ok); flex: none; }
.auto-row span { display: grid; gap: 2px; }
.auto-row b { font-size: 14px; }
.auto-row small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.room-create textarea { resize: vertical; font-size: 14px; }
.color-row { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; }
.color-row button { aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; padding: 0; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25); }
.color-row button[aria-checked="true"] { border-color: var(--text); transform: scale(1.1); }
.cine.gold.cheers .cine-title b { animation: cheers-pop 0.7s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes cheers-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── 쿠폰 창 ── */
.coupons { z-index: 45; }
.coupon-card { width: min(420px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 18px; gap: 10px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; font-size: 15px; }
.coupon-row .primary { padding: 10px 16px; font-size: 15px; white-space: nowrap; }
.coupon-card input:not([type="number"]) { text-transform: uppercase; letter-spacing: 0.04em; }
.coupon-card input::placeholder { text-transform: none; letter-spacing: 0; }
.coupon-card .status { text-align: left; }
/* 입장 화면의 쿠폰 칸: 작게 한 줄 */
.entry-coupon { display: grid; gap: 4px; }
.entry-coupon .coupon-row input { font-size: 14px; padding: 8px 10px; }
.entry-coupon .coupon-row .primary { padding: 8px 14px; font-size: 14px; }
.entry-coupon .status { font-size: 12px; min-height: 0; }
.coupon-code { text-transform: uppercase; letter-spacing: 0.04em; }
.referral-line {
  display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: 2px 8px; padding: 8px 10px;
  border-radius: 10px; border: 1px dashed var(--accent); background: rgba(224, 164, 88, 0.08); font-size: 13px;
}
.referral-line > span { color: var(--muted); }
.referral-line .ref-code { font-size: 16px; letter-spacing: 0.14em; color: var(--accent-strong); font-family: ui-monospace, Consolas, monospace; }
.referral-line .ref-copy { padding: 3px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 12px; }
.referral-line small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.coupon-code::placeholder { text-transform: none; letter-spacing: 0; }

/* ── 후원 ── */
.ad-slot { flex: none; align-self: center; max-width: 100%; overflow: hidden; }
.ad-preview {
  display: grid; place-items: center; width: 100%; height: 100%; border: 1px dashed var(--accent); border-radius: 8px;
  font-size: 12px; color: var(--accent); background: rgba(224, 164, 88, 0.06);
}
#entry-ad { margin: 0 auto; max-width: 100%; }
.tip-link {
  background: none; border: 0; padding: 2px; font-size: 12.5px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
}
.room-official {
  font-size: 10px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); margin-left: 6px; font-weight: 400;
}
.support { z-index: 46; }
.support-card { width: min(980px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 18px; gap: 12px; }
/* 왼쪽 내 정보·혜택, 오른쪽 Ko-fi 양식. 좁으면 위아래로 */
.support-body { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
.support-info { display: grid; gap: 12px; }
.support-pay { display: grid; gap: 10px; }
.support-pay-title { margin: 0; font-size: 13px; color: var(--accent); }
.tier-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.tier-card {
  display: grid; gap: 3px; justify-items: center; text-align: center; padding: 10px 6px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); color: var(--text); position: relative;
}
.tier-card:hover { border-color: var(--accent); }
.tier-card[aria-checked="true"] { border-color: var(--accent-strong); background: rgba(224, 164, 88, 0.18); box-shadow: 0 0 0 1px var(--accent) inset; }
.tier-card.open::after { content: '✓'; position: absolute; top: 4px; right: 7px; font-size: 12px; color: var(--ok); }
.tier-icon { font-size: 22px; }
.tier-name { font-size: 12.5px; }
.tier-price { font-size: 13px; color: #ffd76a; font-weight: 700; }
.tier-perks { font-size: 10.5px; color: var(--muted); line-height: 1.3; }
.tier-tip { font-size: 11px; color: var(--accent); }
.support-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 6px; }
.support-steps li {
  counter-increment: step; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px;
  padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line);
}
.support-steps li::before {
  content: counter(step); flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #1a0f06; font-weight: 700; font-size: 12px;
}
.support-steps li span { flex: 1; min-width: 0; }
.support-steps .step-code { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.15em; color: var(--accent-strong); font-size: 15px; }
.support-steps .btn { padding: 5px 10px; font-size: 12px; }
.kofi-frame { width: 100%; height: 712px; border: none; padding: 4px; border-radius: 12px; background: #f9f9f9; }
.kofi-open { font-size: 12px; color: var(--muted); text-align: center; }
.pay-method, .pay-kofi { display: grid; gap: 10px; }
.pay-kofi[hidden], .pay-bmc[hidden], .pay-tabs[hidden] { display: none; }
.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pay-tab {
  padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--muted); font-weight: 700;
}
.pay-tab[aria-selected="true"] { border-color: var(--accent-strong); color: var(--text); background: rgba(224, 164, 88, 0.18); }
.pay-bmc { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); }
.bmc-btn {
  padding: 13px 22px; border-radius: 12px; background: #ffdd00; color: #0d0c22; font-weight: 800; font-size: 16px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(255, 221, 0, 0.25);
}
.bmc-btn:hover { background: #ffe94d; }
.bmc-qr { margin: 0; display: grid; justify-items: center; gap: 4px; }
.bmc-qr img { width: 132px; height: 132px; border-radius: 10px; background: #fff; padding: 6px; }
.bmc-qr figcaption { font-size: 11.5px; color: var(--muted); }
@media (pointer: coarse) { .bmc-qr { display: none; } }
@media (max-width: 760px) {
  .support-body { grid-template-columns: minmax(0, 1fr); }
  .tier-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.support-code {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; padding: 12px 14px;
  border-radius: 12px; border: 1px dashed var(--accent); background: rgba(224, 164, 88, 0.08);
}
.support-code > span { font-size: 13px; color: var(--muted); }
.support-code b { font-size: 24px; letter-spacing: 0.18em; color: var(--accent-strong); font-family: ui-monospace, Consolas, monospace; }
.support-code small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.support-code.none { display: block; margin: 0; font-size: 13px; color: var(--muted); }
.support-total { margin: 0; font-size: 15px; font-weight: 700; }
.support-total small { font-weight: 400; color: var(--muted); font-size: 13px; }
.support-tiers { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.support-tiers li { display: grid; grid-template-columns: 92px 1fr; gap: 8px; font-size: 13px; color: var(--muted); padding: 5px 8px; border-radius: 8px; }
.support-tiers li b { white-space: nowrap; }
.support-tiers li.open { color: var(--text); background: rgba(127, 191, 127, 0.1); }
.support-tiers li.open b { color: var(--ok); }
.support-coupon { margin: 0; font-size: 13px; color: var(--ok); }
.menu-item.locked { opacity: 0.6; }
.menu-item.locked .strength { font-size: 11px; color: var(--muted); white-space: nowrap; }
.menu-pv-order.locked { background: var(--surface-2); color: var(--accent); border: 1px solid var(--accent); }

/* ── 색 팔레트 칸(기본 색 뒤의 🎨) ── */
.color-custom {
  position: relative; aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; cursor: pointer; overflow: hidden;
  display: grid; place-items: center; font-size: 15px;
  background: conic-gradient(#ff4d4d, #ffd24d, #5fdc5f, #4dd2ff, #6b6bff, #e04dff, #ff4d4d);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25);
}
.color-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.color-custom span { pointer-events: none; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8)); }
.color-custom[aria-checked="true"] { border-color: var(--text); transform: scale(1.08); }

/* ── 방 목록: 비공개 방은 회색, 아래쪽 더 불러오기 ── */
.room-card.locked { cursor: default; opacity: 0.45; filter: grayscale(1); }
.room-card.locked:hover { border-color: var(--line); transform: none; }
.room-more { min-height: 1px; font-size: 12px; color: var(--muted); text-align: center; padding: 4px 0; }

/* 짱깸뽀: 기계 앞면만 보이게 다가간 동안의 화면(아래 손 버튼, 오른쪽 위 확률표, 양옆 광고) */
.janken { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.janken > * { pointer-events: auto; }
.janken-bar {
  position: absolute; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(700px, calc(100vw - 24px)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: 12px; padding: 8px 12px; text-align: center;
}
/* 안내는 아래 창 위에 말풍선처럼 */
.janken-status {
  position: absolute; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  max-width: calc(100vw - 24px); padding: 6px 14px; border-radius: 999px; background: rgba(10, 14, 40, 0.8);
  font-size: 15px; font-weight: 700; color: #ffd76a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.janken-status:empty { display: none; }
.janken-bet { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; }
.janken-bet-value { min-width: 52px; color: #ffd76a; font-size: 18px; }
.janken-bet-step { padding: 3px 10px; border-radius: 8px; border: 1px solid #ffd23d; background: none; color: #ffd23d; font-weight: 700; }
.janken-bet-step:disabled { opacity: 0.4; }
.janken-hands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.janken-hand {
  display: grid; justify-items: center; gap: 1px; padding: 5px 4px 3px; border-radius: 12px; border: 2px solid #ffd23d;
  background: #1d4fd0; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer;
}
.janken-hand .icon { font-size: 26px; line-height: 1; }
.janken-hand kbd { font-size: 10px; opacity: 0.7; }
.janken-hand:hover:not(:disabled) { background: #2a62f0; }
.janken-hand:active:not(:disabled) { transform: translateY(2px); }
.janken-hand:disabled { opacity: 0.5; cursor: default; }
.janken-foot { display: grid; justify-items: center; gap: 4px; }
.janken-points { color: #ffd76a; font-weight: 700; }
.janken-quit { padding: 5px 12px; border-radius: 9px; border: 1px solid var(--line); background: none; color: var(--muted); }
.janken-quit:hover { color: var(--text); border-color: var(--text); }
.janken-odds {
  position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 190px; display: grid; gap: 3px; min-width: 170px;
  padding: 10px 12px; border-radius: 12px; background: rgba(16, 32, 74, 0.88); border: 2px solid #ffd23d; color: #fff; font-size: 13px;
}
.janken-odds strong { color: #ffd23d; }
.janken-odds .janken-boost { color: #ff7ab8; }
.janken-odds div { display: flex; justify-content: space-between; gap: 14px; }
.janken-odds small { color: #9fd8ff; max-width: 180px; }
.janken-ad { position: absolute; top: 50%; transform: translateY(-50%); }
.janken-ad { left: 12px; }
.janken-odds-line { display: none; grid-column: 1 / -1; color: #9fd8ff; font-size: 11px; }
@media (max-width: 900px) {
  /* 좁은 화면: 왼쪽 세로 배너 대신 화면 위 가운데 320x50(ui/janken.js 가 고른다) */
  .janken-ad { top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); }
  .janken-odds { display: none; }
  .janken-odds-line { display: block; }
}
/* 휴대폰: 거는 양과 포인트를 한 줄, 그 아래 손 버튼 */
@media (max-width: 560px) {
  .janken-bar { grid-template-columns: 1fr auto; gap: 8px; }
  .janken-hands { grid-column: 1 / -1; grid-row: 2; }
  .janken-foot { display: flex; }
  .janken-status { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
}

/* 전면 광고 카드: 화면 가운데 배너, 몇 초 뒤 닫기 */
.interstitial { z-index: 70; background: rgba(0, 0, 0, 0.72); }
.interstitial.loading { opacity: 0; pointer-events: none; } /* 광고가 채워지기 전 */
.interstitial-card {
  display: grid; justify-items: center; gap: 8px; padding: 12px 14px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
.interstitial-card small { justify-self: start; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
/* 닫기: 광고 안쪽 오른쪽 위의 작은 동그라미(처음 몇 초는 남은 초) */
.interstitial-ad { position: relative; }
.interstitial-close {
  position: absolute; top: 4px; right: 4px; z-index: 1; width: 24px; height: 24px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(0, 0, 0, 0.6);
  color: #fff; font-size: 13px; line-height: 1; cursor: pointer;
}
.interstitial-close:disabled { opacity: 0.7; cursor: default; }

/* ── 튜토리얼(ui/tutorial.js) ── */
.tutorial {
  position: absolute; top: calc(76px + env(safe-area-inset-top, 0px)); left: 12px; width: min(280px, calc(100vw - 24px));
  padding: 10px 12px; display: grid; gap: 4px; border: 1px solid var(--accent); animation: tutorial-in 0.35s ease-out;
}
.tutorial-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tutorial-step { color: var(--accent); font-size: 11px; letter-spacing: 0.04em; }
.tutorial-title { font-size: 15px; }
.tutorial-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.tutorial-skip { padding: 2px 8px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 11px; cursor: pointer; }
.tutorial-skip:hover { color: var(--text); border-color: var(--text); }
.tutorial-glow { animation: tutorial-glow 1.2s ease-in-out infinite; border-radius: 10px; }
@keyframes tutorial-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes tutorial-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 61, 0.9); } 50% { box-shadow: 0 0 0 6px rgba(255, 210, 61, 0); } }
@media (max-width: 767px), (pointer: coarse) and (max-width: 1024px) {
  .tutorial { top: calc(74px + env(safe-area-inset-top, 0px)); left: 8px; width: min(240px, 60vw); padding: 8px 10px; }
  .tutorial-title { font-size: 13px; }
  .tutorial-hint { font-size: 11px; }
}


/* Local darts camera, hold/release controls and impact feedback. */
.darts-ui{position:fixed;inset:0;z-index:75;pointer-events:none;color:#f6eddc;}
.darts-ui[hidden]{display:none;}
.darts-input{position:absolute;inset:0;pointer-events:auto;touch-action:none;cursor:none;}
.darts-hud{position:absolute;top:24px;left:24px;width:250px;padding:18px;background:linear-gradient(145deg,#12202bf5,#101219e6);border:1px solid #ad945c;border-radius:14px;box-shadow:0 16px 60px #0008;}
.darts-hud small{display:block;color:#a5d8ce;font:10px monospace;letter-spacing:.15em;}
.darts-score{display:block;font:700 62px/1.2 monospace;color:#e8ce83;text-shadow:0 0 20px #f6cc6a44;}
.darts-count{font:12px monospace;color:#e6d8b6;}
.darts-hud p{font-size:11px;line-height:1.65;margin:9px 0 0;color:#b4c5cc;}
.darts-cursor{position:fixed;width:26px;height:26px;transform:translate(-50%,-50%);border:2px solid #ffecad;border-radius:50%;box-shadow:0 0 12px #d6a84d;transition:border-color .15s;}
.darts-cursor:before,.darts-cursor:after{content:'';position:absolute;background:#ffecad;}
.darts-cursor:before{width:2px;height:36px;left:10px;top:-7px;}.darts-cursor:after{height:2px;width:36px;top:10px;left:-7px;}
.charging .darts-cursor{border-color:#8dffe2;box-shadow:0 0 22px #70ffe4;animation:dart-lock .7s ease-in-out infinite alternate;}
.darts-result{position:absolute;left:24px;bottom:150px;width:250px;padding:10px 14px;border-radius:10px;background:#0e1826ed;font-size:14px;line-height:1.5;color:#f5d88d;text-align:center;}
.darts-power{--power:0;position:absolute;left:50%;bottom:24px;width:250px;padding:10px 14px;background:#101e29f5;border:1px solid #6a786a;border-radius:12px;}
.darts-power[hidden]{display:none;}.darts-power-readout{display:flex;justify-content:space-between;font:11px monospace;color:#b9c8c7;}.darts-power b{color:#f4ce75;}
.darts-power-track{display:block;position:relative;height:18px;margin:8px 0 0;border-radius:4px;background:#27333d;overflow:hidden;}
.darts-power-track:before{content:'';position:absolute;left:70%;right:0;inset-block:0;background:#3b886a66;border-left:1px solid #82e6b6;}
.darts-power-track i{position:absolute;inset:0;background:linear-gradient(90deg,#bd6452,#e1bd64 65%,#80efc4);transform:scaleX(var(--power));transform-origin:left;box-shadow:0 0 14px #89e7c5;}
.darts-power-track em{position:absolute;top:0;bottom:0;width:2px;left:calc(var(--power)*100%);background:white;box-shadow:0 0 7px white;}
.darts-power small{font-size:10px;color:#9fb6bd;}.darts-power.ready{border-color:#82efc4;box-shadow:0 0 24px #6eedd526;}
.darts-quit,.darts-throw{position:absolute;bottom:24px;pointer-events:auto;min-height:46px;touch-action:none;user-select:none;}
.darts-throw{left:50%;transform:translateX(-50%);min-width:180px;cursor:pointer;}.darts-throw:focus-visible{outline:2px solid #a9ffe1;outline-offset:4px;}.darts-throw:hover{border-color:#a9d9c5;}.darts-quit{right:24px;border:1px solid #9f8c62;border-radius:9px;padding:10px 16px;background:#15212a;color:#f4e5bb;cursor:pointer;}
.darts-hit-label{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);font:bold 30px monospace;color:#fff2b4;text-shadow:0 2px 3px #000,0 0 20px #ffb63f;opacity:0;white-space:nowrap;}
.darts-impact .darts-hit-label{animation:dart-pop 1.5s ease-out;}.darts-impact .darts-score{animation:dart-score .6s ease-out;}
.darts-ui[data-feedback=miss] .darts-hit-label,.darts-ui[data-feedback=bust] .darts-hit-label{color:#ffb59a;}
.darts-ui:after{content:'';position:absolute;inset:0;box-shadow:inset 0 0 100px #d8b35c00;pointer-events:none;}
.darts-impact:after{animation:dart-impact .55s ease-out;}.darts-ui[data-feedback=bull]:after{animation:dart-impact .7s ease-out;}
@keyframes dart-lock{to{box-shadow:0 0 25px #a4ffe0;}}
@keyframes dart-pop{0%{opacity:0;transform:translate(-50%,0) scale(.7);}15%,60%{opacity:1;transform:translate(-50%,-50%) scale(1.05);}100%{opacity:0;transform:translate(-50%,-110%) scale(1);}}
@keyframes dart-score{30%{color:white;text-shadow:0 0 32px #ffc85d;transform:scale(1.08);}100%{transform:scale(1);}}
@keyframes dart-impact{15%{box-shadow:inset 0 0 110px #e1b75755;}100%{box-shadow:inset 0 0 100px #e1b75700;}}
body.darts-playing #player-backdrop,body.darts-playing .bigscreen-close,body.darts-playing #joystick,body.darts-playing #event-bar{visibility:hidden!important;}
@media(max-width:720px){
  .darts-hud{top:12px;left:12px;right:12px;width:auto;padding:9px 12px;}.darts-hud small{font-size:9px;}.darts-score{display:inline-block;font-size:33px;margin-right:12px;}.darts-count{font-size:10px;}.darts-hud p{font-size:10px;line-height:1.3;margin:3px 0;}.darts-hud p br{display:none;}
  .darts-result{top:132px;bottom:auto;left:12px;right:12px;width:auto;font-size:11px;padding:5px 9px;}.darts-power{left:12px;right:auto;bottom:14px;width:calc(100vw - 160px);padding:10px;}.darts-power-track{margin:6px 0 0;height:16px;}.darts-power small{font-size:9px;}
  .darts-quit{right:12px;font-size:10px;bottom:14px;padding:8px 10px;}.darts-throw{left:12px;transform:none;min-width:0;font-size:12px;bottom:14px;}.darts-hit-label{font-size:21px;}
}
@media(prefers-reduced-motion:reduce){.charging .darts-cursor,.darts-impact .darts-hit-label,.darts-impact .darts-score,.darts-impact:after{animation:none;}.darts-impact .darts-hit-label{opacity:1;}}

/* Paid round opening: a short camera reveal and a locked 3-2-1 countdown. */
.darts-intro{position:absolute;inset:0;display:grid;place-items:center;background:radial-gradient(ellipse at center,#07171a33,#020909aa);}
.darts-intro[hidden]{display:none;}.darts-intro-card{position:relative;overflow:hidden;width:min(540px,85vw);padding:28px 30px;text-align:center;border:1px solid #cfb36d;border-radius:20px;background:linear-gradient(145deg,#0e2029ed,#061117e8);box-shadow:0 0 80px #72e8d326;}
.darts-intro-card:before{content:'';position:absolute;inset:-60%;background:linear-gradient(100deg,transparent 42%,#c3fff519 49%,transparent 57%);animation:dart-reveal 1.8s ease-out;}
.darts-intro-card small{position:relative;font:10px monospace;letter-spacing:.2em;color:#a2dbcd;}.darts-intro-card h2{margin:14px 0 0;font:700 46px monospace;color:#ecd18a;letter-spacing:.2em;}
.darts-countdown{position:relative;display:block;min-height:120px;font:800 clamp(56px,10vw,100px)/1.2 monospace;color:#e9fff8;text-shadow:0 0 36px #83efd9;}.darts-countdown.pop{animation:dart-ready .38s ease-out;}
.darts-intro-card p{position:relative;font-size:12px;color:#d7c58d;}.darts-intro-card span{font:10px monospace;letter-spacing:.22em;color:#89b7b6;}.intro-active .darts-hud,.intro-active .darts-result{opacity:.2;}
@keyframes dart-ready{from{opacity:0;transform:scale(1.5);}to{opacity:1;transform:scale(1);}}
@keyframes dart-reveal{from{transform:translateX(-40%);}to{transform:translateX(40%);}}
@media(max-width:720px){.darts-intro-card{padding:22px 16px;}.darts-intro-card h2{font-size:35px;}.darts-countdown{min-height:100px;}}
@media(prefers-reduced-motion:reduce){.darts-countdown.pop,.darts-intro-card:before{animation:none;}}

/* Count first, reveal the board afterwards. The room music video stays visible. */
.darts-intro{background:radial-gradient(ellipse at center,#14313a,#050e14 75%);}
.intro-active .darts-hud,.intro-active .darts-result,.intro-active .darts-throw{visibility:hidden;}
#player.darts-dock{z-index:90;min-width:200px;}.player-bar.darts-dock{z-index:89;max-width:356px;}
@media(max-width:720px){
  body.darts-playing:has(#player:not([hidden])) .darts-hud{right:auto;width:calc(100vw - 236px);min-width:88px;min-height:200px;padding:8px;}
  body.darts-playing:has(#player:not([hidden])) .darts-hud p{font-size:9px;line-height:1.4;}
  body.darts-playing:has(#player:not([hidden])) .darts-hud p:last-child{display:none;}
  body.darts-playing:has(#player:not([hidden])) .darts-result{top:246px;}
}

@media(min-width:721px) and (max-width:1100px){.darts-hud{top:12px;left:12px;width:170px;padding:12px;}.darts-score{font-size:46px;}.darts-hud p{font-size:10px;}.darts-result{left:12px;width:170px;font-size:12px;}}

/* The power meter is also the hold/release control. Hints appear once per idle spell. */
.darts-idle-hint{position:absolute;max-width:180px;padding:12px 16px;border:1px solid #e5c46b;border-radius:12px;background:#101e29ed;color:#ffe5a1;box-shadow:0 0 24px #d6b45d33;font-size:14px;line-height:1.4;white-space:nowrap;pointer-events:none;animation:dart-idle-blink .6s ease-in-out infinite alternate;}
.darts-idle-hint[hidden]{display:none;}.darts-idle-hint small{display:block;margin-top:3px;color:#bed8ce;font-size:11px;}
@keyframes dart-idle-blink{from{opacity:.4;}to{opacity:1;}}
@media(max-width:720px){.darts-idle-hint{padding:8px 12px;font-size:12px;}.darts-idle-hint small{font-size:10px;}}
@media(prefers-reduced-motion:reduce){.darts-idle-hint{animation:none;}}
