:root {
  --bg: #0b0614;
  --panel: rgba(18, 10, 32, 0.82);
  --panel-solid: #140b24;
  --line: rgba(190, 140, 255, 0.18);
  --line-strong: rgba(190, 140, 255, 0.38);
  --text: #f3ecff;
  --muted: #a99bc4;
  --orange: #ff7a18;
  --orange-2: #ffb347;
  --purple: #9b4dff;
  --green: #7dff9a;
  --red: #ff3d6e;
  --radius: 14px;
  --font: 'Noto Sans KR', system-ui, -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --display: 'Black Han Sans', 'Noto Sans KR', sans-serif;
  --spooky: 'Creepster', 'Black Han Sans', cursive;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; outline: none; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#ui > * { pointer-events: auto; }
#ui .pass { pointer-events: none; }
#ui .pass > * { pointer-events: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: var(--text); }
svg.ico { width: 20px; height: 20px; flex: none; display: block; }

/* ---------- fade / loading ---------- */
.fade { position: fixed; inset: 0; z-index: 50; background: radial-gradient(ellipse at 50% 40%, #241038 0%, #07040d 70%); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.fade.on { opacity: 1; pointer-events: auto; }
.fade-inner { text-align: center; }
.fade p { font-family: var(--display); letter-spacing: .06em; color: var(--muted); margin: 18px 0 0; }
.loader-moon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; background: radial-gradient(circle at 35% 35%, #fff6d6, #f5c76a 60%, #b8742a); box-shadow: 0 0 40px #f5c76a88, 0 0 90px #ff7a1844; position: relative; animation: moon 2.4s ease-in-out infinite; }
.loader-moon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #241038; transform: translateX(46%); animation: eclipse 2.4s ease-in-out infinite; }
@keyframes moon { 50% { transform: scale(1.06); } }
@keyframes eclipse { 0%, 100% { transform: translateX(46%); } 50% { transform: translateX(70%); } }

/* ---------- generic panels / buttons ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 10px 40px rgba(0, 0, 0, .45); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 12px; font-weight: 700; letter-spacing: -.01em; transition: transform .12s ease, filter .15s ease, background .2s; min-height: 44px; }
.btn:active { transform: scale(.97); }
.btn .art { width: 22px; height: 22px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--orange), #ff4d1f); color: #1a0800; box-shadow: 0 6px 24px rgba(255, 122, 24, .38), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, .11); }
.btn-purple { background: linear-gradient(135deg, #a259ff, #6a1fd1); box-shadow: 0 6px 24px rgba(155, 77, 255, .35); }
.btn-sm { padding: 7px 12px; min-height: 36px; font-size: 13px; border-radius: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); font-size: 13px; font-weight: 500; transition: all .15s; }
.chip.on { border-color: var(--orange); background: rgba(255, 122, 24, .16); color: #ffd7b0; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.input { width: 100%; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-strong); outline: none; transition: border .15s, box-shadow .15s; user-select: text; -webkit-user-select: text; }
.input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 122, 24, .2); }
textarea.input { resize: none; min-height: 72px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.hide { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* ---------- entry ---------- */
.entry { position: fixed; inset: 0; display: grid; grid-template-columns: 1fr minmax(320px, 420px); align-items: center; padding: 32px clamp(16px, 4vw, 64px); gap: 24px; background: linear-gradient(90deg, rgba(7, 4, 13, 0) 30%, rgba(7, 4, 13, .7) 70%); }
.entry-hero { align-self: start; padding-top: 2vh; pointer-events: none; }
.logo { font-family: var(--spooky); font-size: clamp(48px, 6.5vw, 96px); line-height: .9; letter-spacing: .02em; color: #ffb347; text-shadow: 0 0 18px rgba(255, 122, 24, .8), 0 0 60px rgba(255, 60, 0, .5), 0 4px 0 #5a1c00; margin: 0; }
.logo small { display: block; font-family: var(--display); font-size: clamp(16px, 2vw, 22px); letter-spacing: .3em; color: #d9c2ff; text-shadow: 0 0 12px rgba(155, 77, 255, .8); margin-top: 10px; }
.tagline { font-size: 15px; color: #d8cceb; max-width: 440px; line-height: 1.6; margin-top: 14px; text-shadow: 0 1px 8px #000; }
.entry-card { padding: 22px; display: grid; gap: 16px; max-height: calc(100vh - 48px); overflow: auto; }
.entry-card h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .02em; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { border: 1px solid var(--line); background: rgba(255, 255, 255, .04); border-radius: 12px; padding: 8px 6px 9px; display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 500; transition: all .15s; }
.preset svg { width: 44px; height: 44px; }
.preset img.pix, img.pix { width: 44px; height: 44px; image-rendering: pixelated; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.preset.on { border-color: var(--orange); background: rgba(255, 122, 24, .14); box-shadow: 0 0 0 1px var(--orange) inset; }
.preset.photo { grid-column: span 3; grid-template-columns: auto 1fr auto; justify-items: start; align-items: center; padding: 10px 12px; gap: 10px; text-align: left; border-style: dashed; border-color: rgba(255, 179, 71, .5); }
.preset.photo b { display: block; font-size: 13px; }
.preset.photo span { color: var(--muted); }
.preset.photo img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.hue { width: 100%; accent-color: var(--orange); }
.demo-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- HUD ---------- */
.hud-top { position: fixed; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; display: flex; align-items: flex-start; gap: 10px; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.zone-badge { padding: 9px 14px 9px 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.zone-badge .z-name { font-family: var(--display); font-size: 16px; letter-spacing: .02em; }
.zone-badge .z-sub { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); display: inline-block; }
.dot.off { background: var(--red); box-shadow: 0 0 8px var(--red); }
.now-playing { margin: 0 auto; padding: 8px 14px 8px 8px; display: flex; align-items: center; gap: 10px; max-width: min(460px, 44vw); cursor: pointer; }
.np-disc { width: 34px; height: 34px; border-radius: 50%; flex: none; background: conic-gradient(from 0deg, #1b1027, #3a1f5c, #1b1027, #5b2a00, #1b1027); border: 2px solid #ff7a18aa; position: relative; animation: spin 3.2s linear infinite; }
.np-disc::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 6px var(--orange); }
@keyframes spin { to { transform: rotate(360deg); } }
.np-text { min-width: 0; }
.np-title { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-by { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-bars { display: flex; gap: 2px; align-items: flex-end; height: 18px; flex: none; }
.np-bars i { width: 3px; background: var(--orange); border-radius: 2px; height: 30%; transition: height .08s; }
.wallet { padding: 6px 6px 6px 12px; display: flex; align-items: center; gap: 8px; }
.wallet b { font-family: var(--display); font-size: 18px; font-weight: 400; color: var(--orange-2); }
.wallet .w-label { font-size: 11px; color: var(--muted); line-height: 1.2; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); }
.mobile-actions-toggle { display: none; }
.touch .mobile-actions-toggle { display: grid; }
.mobile-actions-glyph { font-size: 11px; font-weight: 900; line-height: 1; letter-spacing: -.04em; }
.actions-collapsed .mobile-actions-toggle { border-color: rgba(255, 179, 71, .55); color: var(--orange-2); }

.actions { position: fixed; right: 12px; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; pointer-events: none; }
.actions > * { pointer-events: auto; }
.act { width: 72px; padding: 10px 4px 8px; border-radius: 18px; display: grid; justify-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(160deg, rgba(60, 26, 98, .92), rgba(16, 8, 30, .92)); border: 1px solid rgba(190, 140, 255, .28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08); transition: transform .12s, border-color .15s, box-shadow .2s; }
.act .art { width: 38px; height: 38px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5)); transition: transform .2s; }
.act:hover { border-color: rgba(255, 138, 42, .6); }
.act:hover .art { transform: translateY(-2px) rotate(-4deg); }
.act:active { transform: scale(.94); }
.act.hot { border-color: rgba(255, 138, 42, .75); box-shadow: 0 0 22px rgba(255, 122, 24, .38), 0 8px 24px rgba(0, 0, 0, .45); animation: hot 2.4s ease-in-out infinite; }
@keyframes hot { 50% { box-shadow: 0 0 34px rgba(255, 122, 24, .6), 0 8px 24px rgba(0, 0, 0, .45); } }
svg.art { display: block; flex: none; }
.zone-badge .z-ic .art { width: 30px; height: 30px; }
.wallet .art.coin { width: 26px; height: 26px; }
.icon-btn .art { width: 26px; height: 26px; }

.emotes { position: fixed; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; }
.emote { padding: 5px 8px 4px; border-radius: 12px; font-size: 11px; font-weight: 700; white-space: nowrap; min-width: 58px; display: grid; justify-items: center; gap: 2px; }
.emote .art { width: 26px; height: 26px; }
.emote:hover { background: rgba(255, 255, 255, .08); }
.emote.on { background: rgba(255, 122, 24, .22); color: #ffd7b0; box-shadow: inset 0 0 0 1px rgba(255, 138, 42, .6); }

.chat-log { max-height: 30vh; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding: 4px 2px; mask-image: linear-gradient(transparent, #000 18px); -webkit-mask-image: linear-gradient(transparent, #000 18px); scrollbar-width: none; user-select: text; -webkit-user-select: text; }
.chat-log::-webkit-scrollbar { display: none; }
.msg { font-size: 13.5px; line-height: 1.45; text-shadow: 0 1px 4px #000, 0 0 2px #000; word-break: break-word; }
.msg b { color: var(--orange-2); font-weight: 700; margin-right: 6px; }
.msg.me b { color: #c9a2ff; }
.msg.sys { color: #c9b8e8; font-size: 12.5px; font-style: italic; }
.chat-form { display: flex; gap: 6px; padding: 5px; }
.chat-form .input { padding: 9px 12px; border-radius: 10px; background: rgba(0, 0, 0, .25); border-color: var(--line); }
.prompt .art { width: 26px; height: 26px; }
.prompt { cursor: pointer; border-color: rgba(255, 138, 42, .55); box-shadow: 0 0 22px rgba(255, 122, 24, .3); }
.prompt { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translateX(-50%); padding: 10px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; animation: pop .25s ease; }
.prompt kbd { font-family: var(--font); font-size: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .12); border: 1px solid var(--line-strong); }
@keyframes pop { from { transform: translate(-50%, 8px); opacity: 0; } }

.toasts { position: fixed; bottom: calc(80px + var(--safe-b)); left: 50%; transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; pointer-events: none; z-index: 40; }
.toast { padding: 10px 16px; font-size: 13.5px; font-weight: 500; animation: pop .25s ease; max-width: 90vw; text-align: center; }
.toast.warn { border-color: rgba(255, 61, 110, .5); }
.toast.good { border-color: rgba(125, 255, 154, .45); }

/* ---------- joystick (floating: appears under the thumb on the left side) ---------- */
.joy { position: fixed; left: 26px; bottom: calc(150px + var(--safe-b)); width: 124px; height: 124px; border-radius: 50%; pointer-events: none !important;
  background: radial-gradient(circle, rgba(155, 77, 255, .18), rgba(20, 10, 36, .45) 70%); border: 2px solid rgba(255, 179, 71, .45); box-shadow: 0 0 24px rgba(155, 77, 255, .3); z-index: 5;
  opacity: 1; visibility: visible; transform: scale(1); transition: opacity .14s ease, transform .14s ease, visibility 0s; }
.joy i { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffd08a, #ff7a18 70%); box-shadow: 0 0 20px rgba(255, 122, 24, .7), inset 0 -4px 8px rgba(120, 30, 0, .4); }
.joy span { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); font-size: 11px; font-weight: 700; color: #e6dcf5; white-space: nowrap; text-shadow: 0 1px 4px #000; display: none; }
.joy.idle { opacity: 0; visibility: hidden; transform: scale(.72); transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s; }
.jump-btn { position: fixed; right: 92px; bottom: calc(150px + var(--safe-b)); width: 70px; height: 70px; border-radius: 50%; display: none; place-items: center; font-weight: 800; font-size: 13px;
  background: radial-gradient(circle at 40% 30%, rgba(162, 89, 255, .9), rgba(60, 20, 110, .9)); border: 2px solid rgba(255, 255, 255, .25); box-shadow: 0 6px 20px rgba(0, 0, 0, .45); touch-action: none; transition: opacity .14s ease, transform .1s ease, visibility 0s; }
.touch .jump-btn { display: grid; }
.jump-btn:active { transform: scale(.92); }
.jump-btn:focus-visible, .mobile-actions-toggle:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
body.touch-ui-suppressed .joy, body.touch-ui-suppressed .jump-btn { opacity: 0; visibility: hidden; pointer-events: none !important; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(5, 2, 10, .55); display: grid; place-items: center; padding: 16px; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } }
.sheet { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 0; display: flex; flex-direction: column; animation: rise .25s cubic-bezier(.2, .9, .3, 1.2); }
.sheet.wide { width: min(760px, 100%); }
@keyframes rise { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel-solid); z-index: 1; border-radius: var(--radius) var(--radius) 0 0; }
.sheet-head h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: .02em; flex: 1; }
.sheet-head .sub { font-size: 12px; color: var(--muted); }
.sheet-body { padding: 18px; display: grid; gap: 16px; }
.sheet-foot { padding: 14px 18px 18px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); flex-wrap: wrap; }
.close { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.close:hover { background: rgba(255, 255, 255, .08); }

/* queue */
.queue { display: grid; gap: 6px; }
.q-item { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.q-item.now { border-color: rgba(255, 122, 24, .55); background: rgba(255, 122, 24, .08); }
.q-n { font-family: var(--display); color: var(--muted); text-align: center; }
.q-title { font-weight: 700; font-size: 14px; }
.q-meta { font-size: 12px; color: var(--muted); }
.badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; font-weight: 700; white-space: nowrap; background: rgba(255, 255, 255, .08); }
.badge.gen { background: rgba(155, 77, 255, .25); color: #d9c2ff; }
.badge.ready { background: rgba(125, 255, 154, .18); color: #b5ffc6; }
.badge.fail { background: rgba(255, 61, 110, .2); color: #ffb3c6; }
.badge.pri { background: rgba(255, 122, 24, .25); color: #ffd7b0; }

/* song request */
.song-ask { display: grid; gap: 10px; }
.song-ask textarea { min-height: 84px; font-size: 15px; }
.song-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.song-buttons .btn { justify-content: flex-start; text-align: left; padding: 10px 14px; }
.song-buttons .btn span { display: grid; gap: 1px; }
.song-buttons .btn small { font-size: 11px; font-weight: 500; opacity: .8; }
@media (max-width: 520px) { .song-buttons { grid-template-columns: 1fr; } }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick .chip { cursor: pointer; }
.quick .chip:hover { border-color: var(--orange); }

/* billboard preview */
.bb-preview { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-strong); background: #000; aspect-ratio: 8 / 3; }
.bb-preview canvas { width: 100%; height: 100%; display: block; }
.styles { display: flex; gap: 6px; flex-wrap: wrap; }
.cost { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 122, 24, .08); border: 1px solid rgba(255, 122, 24, .3); font-size: 13.5px; }
.cost b { color: var(--orange-2); }

/* ad player */
.ad-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.ad-stage canvas { width: 100%; height: 100%; display: block; }
.ad-count { position: absolute; top: 10px; right: 10px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .65); font-weight: 700; font-size: 13px; }
.ad-tag { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 6px; background: #ffd34d; color: #221a00; font-weight: 900; font-size: 11px; letter-spacing: .05em; }
.progress { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--purple), var(--orange)); transition: width .3s; }

/* avatar studio */
.studio { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.drop { border: 2px dashed rgba(255, 179, 71, .45); border-radius: 14px; padding: 18px; display: grid; place-items: center; text-align: center; gap: 8px; min-height: 230px; background: rgba(255, 122, 24, .04); position: relative; overflow: hidden; cursor: pointer; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.drop-hint { display: grid; justify-items: center; gap: 6px; }
.drop-hint svg { width: 30px; height: 30px; color: var(--orange-2); }
.drop.has .drop-hint { display: none; }
.steps { display: grid; gap: 8px; }
.step { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; font-size: 13.5px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.step .s-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); }
.step.run { background: rgba(155, 77, 255, .12); }
.step.run .s-ic { border-color: var(--purple); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.step.ok .s-ic, .step.demo .s-ic { background: var(--green); border-color: var(--green); color: #032; }
.step.demo .s-ic { background: #ffd34d; border-color: #ffd34d; }
.step.fail .s-ic { background: var(--red); border-color: var(--red); }
.preview3d { border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 50% 30%, #2a1446, #0b0614); aspect-ratio: 1; position: relative; border: 1px solid var(--line); }
.preview3d canvas { width: 100%; height: 100%; display: block; }
.preview3d .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 20px; }
.tpose-img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.stats { font-size: 12px; color: var(--muted); display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.stats b { color: var(--text); font-weight: 700; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: #d8cceb; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); margin-top: 2px; flex: none; }

/* places */
.places { display: grid; gap: 10px; }
.place { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); text-align: left; transition: all .15s; }
.place:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .06); }
.place.here { border-color: rgba(255, 122, 24, .55); }
.place-ic { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #3a1f5c, #1b1027); }
.place-ic svg { width: 30px; height: 30px; }
.place h4 { margin: 0 0 2px; font-size: 15.5px; }
.place p { margin: 0; font-size: 12px; color: var(--muted); }
.channels { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chan { font-size: 11.5px; padding: 6px 9px; border-radius: 9px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); display: grid; gap: 4px; min-width: 74px; text-align: left; }
.chan .bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.chan .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--orange)); }
.chan.full { opacity: .5; }
.place-ic { background: radial-gradient(circle at 30% 25%, #4a2378, #160b26); }
.place-ic .art { width: 36px; height: 36px; }
.chan.here { border-color: var(--orange); color: #ffd7b0; }
.chan:hover { border-color: var(--line-strong); }
.count { font-family: var(--display); font-size: 18px; text-align: right; }
.count small { display: block; font-family: var(--font); font-size: 11px; color: var(--muted); }

.help { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.help kbd { font-family: var(--font); font-size: 12px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); white-space: nowrap; justify-self: start; }

/* ---------- compact HUD ---------- */
.top-right { display: flex; gap: 8px; align-items: center; }
.coin-chip { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; min-height: 44px; }
.coin-chip b { font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--orange-2); }
.coin-chip .plus { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #1a0800; font-weight: 900; font-size: 14px; line-height: 1; }
.top-right .icon-btn.panel { width: 44px; height: 44px; }
svg.caret { width: 10px; height: 10px; transform: rotate(90deg); display: inline-block; vertical-align: middle; opacity: .7; }
.pop-open .feed { opacity: 0; }
.actions { transition: opacity .2s ease, visibility 0s; }
.actions-collapsed .actions { opacity: 0; visibility: hidden; pointer-events: none; }
.dock { position: fixed; z-index: 2; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.dock > * { pointer-events: auto; }
.dock-bar { display: flex; gap: 4px; padding: 5px; border-radius: 22px; }
.dock-btn { width: 74px; padding: 7px 4px 6px; border-radius: 16px; display: grid; justify-items: center; gap: 2px; font-size: 12px; font-weight: 800; transition: background .15s, transform .1s; position: relative; }
.dock-btn .art, .dock-btn img { width: 30px; height: 30px; image-rendering: pixelated; }
.dock-btn:hover { background: rgba(255, 255, 255, .07); }
.dock-btn:active { transform: scale(.94); }
.dock-btn.on { background: rgba(255, 122, 24, .22); }
.dock-btn.active::after { content: ''; position: absolute; top: 6px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.pop { padding: 12px; width: min(540px, calc(100vw - 24px)); max-height: 48vh; overflow: auto; animation: pop .18s ease; }
.pop-title { font-weight: 800; font-size: 13px; margin-bottom: 9px; display: flex; gap: 8px; align-items: baseline; }
.dance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dance-btn { position: relative; display: grid; justify-items: center; gap: 3px; padding: 9px 4px 7px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: 11.5px; font-weight: 700; }
.dance-btn .art { width: 26px; height: 26px; }
.dance-btn kbd { position: absolute; top: 4px; right: 5px; font-family: var(--font); font-size: 9.5px; color: var(--muted); }
.dance-btn:hover { border-color: var(--line-strong); }
.dance-btn.on { border-color: var(--orange); background: rgba(255, 122, 24, .18); color: #ffd7b0; }
.react-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.react-btn { padding: 6px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); display: grid; place-items: center; transition: transform .12s; }
.react-btn img { width: 40px; height: 40px; image-rendering: pixelated; }
.react-btn:hover { transform: translateY(-3px) scale(1.06); border-color: var(--orange); }
.react-btn:active { transform: scale(.9); }
.shout-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.shout-btn { padding: 12px 6px; border-radius: 12px; font-weight: 900; font-size: 14px; color: #1a0800; background: linear-gradient(135deg, #ffb347, #ff6a1f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.shout-btn:active { transform: scale(.95); }
.chan-pop { position: fixed; top: calc(70px + var(--safe-t)); left: 12px; width: min(330px, calc(100vw - 24px)); padding: 12px; z-index: 6; animation: pop .18s ease; }
.chan-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.chan-list .chan { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 12px; text-align: left; }
.chan-list .chan .bar { grid-column: span 2; }

/* event feed (all zones): short lines that fade away on their own */
.feed { position: fixed; left: 14px; bottom: calc(104px + var(--safe-b)); z-index: 1; transition: opacity .2s ease; width: min(380px, 44vw); display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.feed-line { font-size: 13px; line-height: 1.45; padding: 6px 11px; border-radius: 10px; background: rgba(14, 8, 26, .62); border: 1px solid rgba(190, 140, 255, .14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #e6dcf5; transition: opacity 1.1s ease, transform 1.1s ease; animation: pop .25s ease; width: fit-content; max-width: 100%; }
.feed-line b { color: var(--orange-2); margin-right: 6px; }
.feed-line.out { opacity: 0; transform: translateX(-10px); }

/* in the chat lounge the chat panel is wide: move the emote bar out of its way */

/* touch / small screens */
@media (max-width: 760px) {
  /* phones: logo up top, the chosen character in the middle, a compact sheet at the bottom */
  .entry { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; align-items: end; padding: 12px; padding-bottom: calc(10px + var(--safe-b)); gap: 8px; background: linear-gradient(180deg, rgba(7, 4, 13, .55) 0%, rgba(7, 4, 13, 0) 22%, rgba(7, 4, 13, 0) 48%, rgba(7, 4, 13, .9) 70%); }
  .entry-hero { padding-top: calc(4px + env(safe-area-inset-top, 0px)); grid-row: 1; }
  .entry-hero .logo { font-size: 40px; }
  .entry-hero .logo small { font-size: 12px; margin-top: 4px; }
  .entry-hero .tagline { display: none; }
  .entry-card { grid-row: 3; max-height: 54vh; padding: 14px; gap: 10px; }
  .entry-card .cstyles { grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-template-columns: none; grid-auto-columns: 64px; overflow-x: auto; overflow-y: hidden; max-height: none; padding-bottom: 4px; scrollbar-width: thin; }
  .entry-card .field { gap: 6px; }
  .entry-card .demo-note { display: none; }
  .entry-card [data-enter] { position: sticky; bottom: -14px; z-index: 2; box-shadow: 0 -10px 20px rgba(14, 8, 26, .9); }
  .entry-card .field > label, .entry-card .field-head label { font-size: 12px; }
  .entry-card #nick { padding: 9px 12px; }
  .hud-top { flex-wrap: wrap; gap: 8px; left: max(10px, var(--safe-l)); right: max(10px, var(--safe-r)); }
  .zone-badge { padding: 7px 10px; white-space: nowrap; }
  .zone-badge > svg { display: none; }
  .zone-badge .z-name { font-size: 14px; }
  .wallet { margin-left: auto; padding: 4px 4px 4px 10px; gap: 4px; }
  .wallet .w-label { display: none; }
  .wallet .icon-btn { width: 38px; height: 38px; }
  .now-playing { order: 3; flex-basis: 100%; max-width: none; margin: 0; padding: 6px 12px 6px 6px; }
  .np-disc { width: 28px; height: 28px; }
  .np-disc::after { inset: 9px; }
  .np-bars { display: none; }
  .zone-badge .z-sub span.hide-sm { display: none; }
  .top-right { margin-left: auto; gap: 6px; }
  .top-right .icon-btn.panel { width: 42px; height: 42px; }
  /* phones: the side buttons live up under the top bar, clear of the joystick and jump */
  .actions { top: calc(122px + env(safe-area-inset-top, 0px)); bottom: auto; transform: none; right: 10px; gap: 8px; }
  .act { width: 58px; font-size: 10.5px; padding: 8px 2px 7px; }
  .act svg { width: 22px; height: 22px; }
  .emotes { left: 12px; right: 12px; transform: none; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .dock-btn { width: 64px; }
  .dance-grid { grid-template-columns: repeat(3, 1fr); }
  .react-grid { grid-template-columns: repeat(4, 1fr); }
  .shout-grid { grid-template-columns: repeat(2, 1fr); }

  /* phones: the bottom-left belongs to the joystick, so notices sit under the top bar */
  .feed { top: calc(118px + env(safe-area-inset-top, 0px)); bottom: auto; width: calc(100vw - 96px); }
  .feed-line { font-size: 12px; padding: 5px 9px; }
  .pop-open .actions { opacity: 0; visibility: hidden; pointer-events: none; }
  .act .art { width: 30px; height: 30px; }
  .emotes::-webkit-scrollbar { display: none; }
  .studio { grid-template-columns: 1fr; }
  .jump-btn { width: 64px; height: 64px; bottom: calc(92px + var(--safe-b)); right: max(16px, var(--safe-r)); }
  .prompt { bottom: calc(130px + var(--safe-b)); }
}

@media (max-width: 390px) {
  .coin-chip { padding-right: 8px; }
  .coin-chip .coin-txt small { display: none; }
  .top-right { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .joy, .jump-btn, .actions { transition-duration: .01ms; }
}


/* ---------- zone transition: gothic doors ---------- */
.warp { position: fixed; inset: 0; z-index: 45; pointer-events: none; overflow: hidden; }
.warp.on { pointer-events: auto; }
.warp-door { position: absolute; top: 0; bottom: 0; width: 50.5%; transition: transform .55s cubic-bezier(.7, 0, .3, 1);
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 122, 24, .25) 0 6%, transparent 7%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .35) 0 2px, transparent 2px 64px),
    linear-gradient(180deg, #2a140c, #160a06 60%, #0c0503);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .8); }
.warp-door::before { content: ''; position: absolute; inset: 7% 12%; border: 3px solid rgba(201, 162, 74, .5); border-radius: 50% 50% 6px 6px / 22% 22% 6px 6px; }
.warp-door.l { left: 0; transform: translateX(-102%); border-right: 3px solid #0a0503; }
.warp-door.r { right: 0; transform: translateX(102%); border-left: 3px solid #0a0503; }
.warp.on .warp-door { transform: none; }
.warp-bats { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.warp.on .warp-bats { opacity: 1; }
.warp-bats i { position: absolute; width: 34px; height: 14px; background: #050208; clip-path: polygon(0 30%, 18% 0, 32% 40%, 50% 20%, 68% 40%, 82% 0, 100% 30%, 78% 100%, 62% 60%, 50% 90%, 38% 60%, 22% 100%); animation: batfly 2.4s linear infinite; }
.warp-bats i:nth-child(1) { top: 18%; animation-delay: 0s; }
.warp-bats i:nth-child(2) { top: 30%; animation-delay: .4s; transform: scale(.7); }
.warp-bats i:nth-child(3) { top: 62%; animation-delay: .9s; }
.warp-bats i:nth-child(4) { top: 76%; animation-delay: 1.3s; transform: scale(.6); }
.warp-bats i:nth-child(5) { top: 44%; animation-delay: 1.7s; }
.warp-bats i:nth-child(6) { top: 10%; animation-delay: 2s; transform: scale(.5); }
.warp-bats i:nth-child(7) { top: 86%; animation-delay: .2s; }
@keyframes batfly { from { left: -6%; } to { left: 106%; } }
.warp-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.94); width: min(420px, 88vw); padding: 26px 24px 20px; text-align: center; border-radius: 22px;
  background: rgba(14, 6, 24, .9); border: 1px solid rgba(255, 138, 42, .45); box-shadow: 0 20px 60px rgba(0, 0, 0, .7), 0 0 50px rgba(255, 122, 24, .2); opacity: 0; transition: opacity .3s .15s, transform .35s .15s; }
.warp.on .warp-card { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.warp-ic .art { width: 64px; height: 64px; margin: 0 auto; filter: drop-shadow(0 4px 14px rgba(255, 122, 24, .5)); }
.warp-from { font-size: 12px; letter-spacing: .3em; color: var(--muted); margin-top: 8px; }
.warp-card h2 { margin: 4px 0 2px; font-family: var(--display); font-weight: 400; font-size: 30px; color: #ffd08a; text-shadow: 0 0 18px rgba(255, 122, 24, .6); }
.warp-card p { margin: 0 0 14px; color: #d9c9f0; font-size: 13px; }
.warp-status { font-size: 13px; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.warp-bar { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.warp-bar i { display: block; height: 100%; width: 15%; background: linear-gradient(90deg, var(--purple), var(--orange)); animation: warpload 2.2s ease-out forwards; }
.warp-bar i.done { width: 100% !important; animation: none; transition: width .3s; }
@keyframes warpload { to { width: 85%; } }
.warp-tip { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---------- club door ID check ---------- */
.idcheck { position: fixed; left: 50%; bottom: calc(110px + var(--safe-b)); transform: translateX(-50%); width: min(360px, 92vw); padding: 14px; display: grid; gap: 10px; z-index: 20; animation: pop .25s ease; }
.idcheck .id-head { display: flex; gap: 10px; align-items: center; }
.idcheck .id-head .art { width: 34px; height: 34px; }
.id-line { display: flex; align-items: baseline; gap: 10px; }
.id-pos { font-family: var(--display); font-size: 26px; color: var(--orange-2); }
.idcheck.pass { background: none; border: 0; box-shadow: none; bottom: 30%; }
.id-card { position: relative; border-radius: 16px; padding: 14px 16px 16px; background: linear-gradient(135deg, #2a1046, #120820 60%, #3a1406); border: 2px solid #c9a24a; box-shadow: 0 18px 50px rgba(0, 0, 0, .7); animation: cardin .45s cubic-bezier(.2, .9, .3, 1.3); overflow: hidden; }
@keyframes cardin { from { transform: translateY(40px) rotate(-6deg); opacity: 0; } }
.id-top { display: flex; justify-content: space-between; font-family: var(--display); font-size: 13px; letter-spacing: .12em; color: #ffd08a; margin-bottom: 12px; }
.id-body { display: flex; gap: 14px; align-items: center; }
.id-face { width: 72px !important; height: 72px !important; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .25); background: #000; }
.id-name { font-size: 18px; }
.id-name span { font-size: 13px; color: #b9a6e0; margin-left: 4px; font-weight: 500; }
.id-stamp { position: absolute; right: 14px; bottom: 12px; padding: 6px 12px; border: 3px solid #ff3d6e; border-radius: 8px; color: #ff3d6e; font-family: var(--display); font-size: 20px; transform: rotate(-14deg) scale(2.4); opacity: 0; animation: stamp .35s .55s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes stamp { to { transform: rotate(-14deg) scale(1); opacity: .95; } }

/* ---------- chat panel (dock popover) ---------- */
.chat-pop { display: grid; gap: 8px; }
.chat-pop .chat-log { max-height: 34vh; min-height: 120px; mask-image: none; -webkit-mask-image: none; padding: 4px 2px; }
.chat-pop .msg { text-shadow: none; }
.chat-pop .chat-form { display: flex; gap: 6px; padding: 0; }
.chat-pop .chat-form .input { padding: 10px 12px; }
.badge-dot { position: absolute; top: 5px; right: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.feed-line.k-chat { border-color: rgba(255, 179, 71, .25); }

/* ---------- credits chip ---------- */
.coin-chip { gap: 8px; padding: 5px 12px 5px 6px; }
.coin-chip .coin-txt { display: grid; line-height: 1.05; text-align: left; }
.coin-chip .coin-txt b { font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--orange-2); }
.coin-chip .coin-txt small { font-size: 10px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.coin-chip .art.coin { width: 28px; height: 28px; }

/* ---------- rooms / invite ---------- */
.invite { display: grid; gap: 10px; }
.invite-code { display: flex; align-items: baseline; gap: 10px; }
.invite-code b { font-family: var(--display); font-size: 30px; letter-spacing: .18em; color: var(--orange-2); }
.invite .row .input { min-width: 0; flex: 1; font-size: 13px; }
.invite .row .btn { white-space: nowrap; flex-shrink: 0; }
.inline-art { width: 18px !important; height: 18px !important; display: inline-block !important; vertical-align: -4px; margin-right: 4px; }
.chan-pop .pop-title .art { width: 20px; height: 20px; }

/* ---------- pixel skin painter ---------- */
.pixel-cta { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; text-align: left;
  background: linear-gradient(135deg, rgba(155, 77, 255, .28), rgba(255, 122, 24, .22)); border: 1px solid rgba(255, 179, 71, .45); }
.pixel-cta span { display: grid; gap: 2px; }
.pixel-cta small { color: var(--muted); font-size: 12px; }
.skin-ed { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.skin-views { display: flex; gap: 12px; }
.skin-views canvas { display: block; width: 176px; height: 352px; image-rendering: pixelated; border-radius: 10px; border: 1px solid var(--line-strong); touch-action: none; cursor: crosshair; }
.skin-side { display: grid; gap: 12px; align-content: start; }
.skin-prev { aspect-ratio: 1 / 1; max-height: 230px; }
.tools .chip { cursor: pointer; }
.palette { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.swatch { aspect-ratio: 1; border-radius: 8px; border: 2px solid rgba(255, 255, 255, .15); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--orange); }
.swatch.custom { display: grid; place-items: center; background: conic-gradient(#ff3d6e, #ffd34d, #7dff9a, #4ad8ff, #a259ff, #ff3d6e); cursor: pointer; }
.swatch.custom svg { width: 16px; height: 16px; color: #fff; }
@media (max-width: 760px) {
  .skin-ed { grid-template-columns: 1fr; }
  .skin-views { justify-content: center; }
  .skin-views canvas { width: 40vw; height: 80vw; max-width: 176px; max-height: 352px; }
  .skin-prev { max-height: 180px; }
}

/* ---------- character styles (entry + studio) ---------- */
.cstyles { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.cstyle { display: grid; justify-items: center; gap: 3px; padding: 7px 2px 6px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: 11px; font-weight: 700; color: #e6dcf5; transition: border-color .15s, background .15s, transform .1s; }
.cstyle img { width: 34px; height: 34px; image-rendering: pixelated; border-radius: 6px; }
.cstyle span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cstyle:hover { background: rgba(255, 255, 255, .08); }
.cstyle:active { transform: scale(.96); }
.cstyle.on { border-color: var(--orange); background: rgba(255, 122, 24, .16); box-shadow: 0 0 0 1px var(--orange) inset; }
.cstyle.mine { grid-auto-flow: column; justify-content: start; gap: 8px; padding: 6px 10px; margin-bottom: 6px; width: 100%; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 2px solid rgba(255, 255, 255, .15); transition: transform .1s; }
.sw.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 122, 24, .6); transform: scale(1.08); }
.photo-skin summary { cursor: pointer; display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13px; color: #d9c2ff; list-style: none; }
.photo-skin summary::-webkit-details-marker { display: none; }
.photo-skin summary svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .cstyles { grid-template-columns: repeat(4, 1fr); }
}

/* the joystick and jump button always draw above notices and pickers' shadows */
.joy, .jump-btn { z-index: 3; }
/* where a chat line came from (friends' rooms span every place) */
.loc { font-style: normal; font-size: 10.5px; font-weight: 700; color: #cbb6ff; background: rgba(178, 107, 255, .18); border-radius: 6px; padding: 1px 6px; margin-right: 6px; white-space: nowrap; }
.adv-sound { margin: 4px 0 10px; }
.adv-sound summary { cursor: pointer; font-weight: 700; font-size: 13px; color: #d9c2ff; margin-bottom: 8px; }
/* after a drink at the bar */
body.drunk #scene { filter: blur(.7px) saturate(1.35) hue-rotate(-8deg); animation: tipsy 3.2s ease-in-out infinite; }
@keyframes tipsy { 0%, 100% { transform: translateX(0) scale(1.01); } 50% { transform: translateX(6px) scale(1.025); } }

/* ---------- AI attractions: fortune, tarot, bar, trick-or-treat ---------- */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .25); margin-bottom: 12px; }
.seg button { flex: 1; padding: 8px; border-radius: 9px; font-weight: 800; font-size: 13px; color: var(--muted); }
.seg button.on { background: rgba(178, 107, 255, .28); color: #fff; }
.oracle { display: grid; gap: 10px; margin-top: 14px; padding: 14px; border-radius: 14px; background: linear-gradient(160deg, rgba(178, 107, 255, .14), rgba(255, 122, 24, .08)); border: 1px solid rgba(190, 140, 255, .25); animation: pop .3s ease; }
.oracle h4 { margin: 0; font-size: 16px; color: var(--orange-2); }
.oracle p { margin: 0; line-height: 1.6; }
.oracle-wait { display: flex; gap: 10px; align-items: center; margin-top: 14px; color: #d9c2ff; font-weight: 700; }
.spin-art { width: 34px; height: 34px; animation: spin-art 1.6s linear infinite; }
@keyframes spin-art { to { transform: rotate(360deg); } }
.pillars { display: flex; gap: 8px; justify-content: center; }
.pillar { display: grid; justify-items: center; gap: 2px; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.pillar b { font-size: 22px; line-height: 1.1; font-family: var(--display); }
.elements { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 12px; font-weight: 700; }
.elements span { display: flex; align-items: center; gap: 5px; }
.elements i { display: inline-block; height: 8px; border-radius: 4px; }
.tarot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tcard { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 14px 6px; border-radius: 12px; background: linear-gradient(180deg, #2a1546, #140a24); border: 1px solid rgba(255, 196, 107, .5); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); animation: flip-in .5s ease both; }
.tcard b { font-size: 15px; color: #ffd08a; }
.tcard em { font-style: normal; font-size: 11.5px; color: #d9c2ff; }
.tcard.rev b { transform: rotate(180deg); }
@keyframes flip-in { from { transform: rotateY(90deg); opacity: 0; } to { transform: none; opacity: 1; } }
.drink-card { grid-template-columns: 90px 1fr; align-items: center; }
.mocktail { width: 84px; height: 100px; filter: drop-shadow(0 0 12px rgba(178, 107, 255, .5)); }
.oracle.trick { justify-items: center; text-align: center; }
.oracle.trick .art { width: 64px; height: 64px; }

.entry-card .cstyles { max-height: 300px; overflow: auto; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.paint-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 800; color: #ffd08a; background: rgba(255, 122, 24, .14); border: 1px solid rgba(255, 179, 71, .4); }
.paint-link svg { width: 14px; height: 14px; }
.paint-link:active { transform: scale(.96); }
.room-upload { align-items: center; gap: 10px; margin: 6px 0 12px; }
.room-upload .grow { display: grid; gap: 2px; }
.q-item .dl { padding: 5px 9px; font-size: 12px; gap: 4px; }
.q-item .dl svg { width: 13px; height: 13px; }
.q-n .art { width: 20px; height: 20px; }

/* ---------- selfie mode ---------- */
.selfie { position: fixed; inset: 0; z-index: 20; pointer-events: none; display: grid; grid-template-rows: 1fr auto auto; }
.selfie-frame { pointer-events: auto; margin: 14px; border: 2px solid rgba(255, 179, 71, .55); border-radius: 22px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .18); touch-action: none; }
.selfie-bar { pointer-events: auto; display: flex; justify-content: center; align-items: center; gap: 22px; padding: 8px 12px calc(16px + var(--safe-b)); }
.selfie-tip { text-align: center; color: #e6dcf5; text-shadow: 0 1px 6px #000; padding-bottom: 10px; }
.shutter { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: rgba(255, 255, 255, .15); display: grid; place-items: center; box-shadow: 0 0 22px rgba(255, 122, 24, .6); }
.shutter i { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffd08a, #ff7a18); transition: transform .1s; }
.shutter:active i { transform: scale(.86); }
.selfie-flash { position: fixed; inset: 0; z-index: 50; background: #fff; animation: flash .5s ease-out forwards; pointer-events: none; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
.selfie-result .sheet { display: grid; gap: 12px; padding: 14px; max-width: min(720px, calc(100vw - 24px)); }
.selfie-result img { width: 100%; border-radius: 12px; display: block; }
body:has(.selfie) .hud-top, body:has(.selfie) .dock, body:has(.selfie) .feed, body:has(.selfie) .actions, body:has(.selfie) .joy, body:has(.selfie) .jump-btn { visibility: hidden; }
/* channel picker: compact chips coloured by how full they are (scales to 100 channels) */
.chan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 5px; max-height: 38vh; overflow: auto; margin-bottom: 8px; padding-right: 2px; }
.chip-ch { display: grid; justify-items: center; gap: 1px; padding: 5px 2px; border-radius: 9px; border: 1px solid var(--line); background: linear-gradient(0deg, rgba(255, 122, 24, calc(var(--k) * .45)) 0%, rgba(255, 122, 24, calc(var(--k) * .45)) calc(var(--k) * 100%), rgba(0, 0, 0, .25) calc(var(--k) * 100%)); font-size: 10.5px; color: var(--muted); }
.chip-ch b { font-size: 13px; color: #fff; }
.chip-ch.here { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.chip-ch.full { opacity: .45; }
.chan-jump { gap: 6px; margin-bottom: 8px; }
.chan-jump .input { padding: 7px 10px; }
/* status effect on you: what it is and a countdown until it wears off */
.status-chip { position: fixed; top: calc(130px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 7px 14px 9px; border-radius: 14px; background: rgba(40, 12, 50, .82); border: 1px solid rgba(178, 107, 255, .5); color: #f2e6ff; font-weight: 800; font-size: 13px; box-shadow: 0 6px 22px rgba(0, 0, 0, .45); pointer-events: none; overflow: hidden; animation: pop .2s ease; }
.status-chip .art { width: 22px; height: 22px; }
.status-chip i { position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--k) * 100%); background: linear-gradient(90deg, var(--purple, #b26bff), var(--orange)); transition: width .9s linear; }
@media (max-width: 760px) {
  .status-chip { top: calc(114px + env(safe-area-inset-top, 0px)); font-size: 12px; padding: 6px 12px 8px; }
  /* notices step down while a status chip is showing */
  body:has(.status-chip:not(.hide)) .feed { top: calc(156px + env(safe-area-inset-top, 0px)); }
}
