:root {
  --bg: #07070c;
  --bg-2: #0d0c18;
  --card: rgba(20, 19, 36, 0.72);
  --card-solid: #13121f;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f1f0fa;
  --dim: #a9a7c2;
  --faint: #6c6a86;
  --violet: #8b7bff;
  --blue: #5b8cff;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --gold: #fbbf24;
  --green: #34d399;
  --red: #f87171;
  --grad: linear-gradient(135deg, #8b7bff 0%, #5b8cff 50%, #22d3ee 100%);
  --radius: 18px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }

svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Boot ---------- */

.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.logo-mark { width: 40px; height: 40px; flex: none; display: inline-block; background: url(icon.svg) center / contain no-repeat; }
.boot .logo-mark { width: 64px; height: 64px; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(0.9); opacity: 0.6; } }

/* ---------- Buttons & inputs ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04); font-weight: 600; font-size: 14.5px; white-space: nowrap;
  transition: transform 0.08s, filter 0.15s, background 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 30px -10px rgba(139, 123, 255, 0.9); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.block { width: 100%; height: 52px; font-size: 16px; border-radius: 14px; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--dim); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }
.btn.loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center;
  border: 1px solid var(--line-2); background: rgba(10, 10, 20, 0.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.icon-btn:active { transform: scale(0.95); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; color: var(--dim); margin-bottom: 7px; font-weight: 500; }
.input {
  display: flex; align-items: center; height: 54px; border-radius: 14px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.35); padding: 0 16px; gap: 10px; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 123, 255, 0.18); }
.input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 17px; }
.input .prefix { color: var(--dim); font-weight: 600; }
.input.code input { font: 600 26px/1 var(--display); letter-spacing: 0.5em; text-align: center; padding-left: 0.5em; }
.error { min-height: 20px; color: var(--red); font-size: 13px; margin: 2px 0 10px; }

/* ---------- Auth ---------- */

.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: #05050b; }
.auth-art .art-stage { position: absolute; inset: 0; }
.auth-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 7, 12, 0) 45%, rgba(7, 7, 12, 0.95) 100%);
}
.auth-copy { position: absolute; left: 48px; right: 48px; bottom: 48px; z-index: 2; }
.auth-copy h1 { font: 700 clamp(34px, 4.2vw, 56px)/1.02 var(--display); letter-spacing: -0.03em; margin: 0 0 14px; }
.auth-copy h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-copy p { color: var(--dim); max-width: 460px; margin: 0; font-size: 16px; }
.auth-feats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.auth-feats span {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 100px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); font-size: 13px; color: var(--dim);
}
.auth-feats svg.i { width: 15px; height: 15px; color: var(--cyan); }
.auth-side { display: grid; place-items: center; padding: 32px 24px; background: radial-gradient(ellipse at 50% 0%, rgba(139, 123, 255, 0.14), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 390px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.brand b { font: 700 19px var(--display); letter-spacing: -0.01em; display: block; }
.brand small { color: var(--faint); font-size: 12.5px; }
.auth-card h2 { font: 700 28px/1.15 var(--display); letter-spacing: -0.02em; margin: 0 0 8px; }
.auth-card .sub { color: var(--dim); margin: 0 0 26px; }
.demo-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; margin-bottom: 16px;
  background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.3); font-size: 13.5px; color: #bff4fb;
}
.demo-note svg.i { color: var(--cyan); margin-top: 1px; }
.demo-note b { font-family: var(--display); letter-spacing: 0.12em; color: #fff; }
.demo-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.demo-chips > span { width: 100%; color: var(--faint); font-size: 12.5px; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 100px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04); font-size: 12.5px; color: var(--dim);
}
.chip:hover, .chip.on { color: var(--text); border-color: var(--violet); background: rgba(139, 123, 255, 0.14); }
.link { background: none; border: 0; color: var(--dim); font-size: 13.5px; padding: 0; margin-top: 16px; text-decoration: underline; text-underline-offset: 3px; }
.legal { color: var(--faint); font-size: 12px; margin-top: 28px; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: 42vh auto; }
  .auth-copy { left: 22px; right: 22px; bottom: 22px; }
  .auth-copy p, .auth-feats { display: none; }
  .auth-side { align-items: start; padding: 26px 20px calc(30px + var(--safe-b)); }
  .auth-side .brand { display: none; }
}

/* ---------- App shell ---------- */

.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: calc(12px + var(--safe-t)) 24px 12px; background: rgba(7, 7, 12, 0.78);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line);
}
.topbar .brand { margin: 0; }
.tabs { display: flex; gap: 4px; margin-left: 18px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 11px;
  border: 0; background: transparent; color: var(--dim); font-weight: 600; font-size: 14px;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.tab.on { color: var(--text); background: rgba(139, 123, 255, 0.16); }
.tab.on svg.i { color: var(--violet); }
.spacer { flex: 1; }
.coins {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 100px;
  background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.3); font-weight: 700; font-variant-numeric: tabular-nums;
}
.coin {
  width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font: 800 12px var(--display); color: #5a3a00;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #fbbf24 55%, #d97706);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}
.coin.sm { width: 18px; height: 18px; font-size: 10px; }
.coins.bump { animation: bump 0.5s ease-out; }
@keyframes bump { 30% { transform: scale(1.12); } }
.me {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 4px; border-radius: 100px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03);
}
.me span { font-weight: 600; font-size: 14px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font: 700 12.5px var(--display); color: #fff; background: var(--grad);
}
.menu {
  position: absolute; right: 24px; top: calc(62px + var(--safe-t)); min-width: 220px; padding: 8px; border-radius: 16px;
  background: var(--card-solid); border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); z-index: 40;
  animation: pop 0.14s ease-out;
}
.menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who b { display: block; }
.menu .who small { color: var(--faint); }
.menu .ver { padding: 8px 12px 4px; margin-top: 6px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--dim); text-align: left; }
.menu button:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
@keyframes pop { from { transform: translateY(-4px) scale(0.98); opacity: 0; } }

main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 30px 24px calc(40px + var(--safe-b)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font: 700 clamp(26px, 3vw, 34px)/1.1 var(--display); letter-spacing: -0.025em; margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--dim); }

.bottom-nav { display: none; }
@media (max-width: 760px) {
  .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar .brand small, .tabs, .me > span:not(.avatar) { display: none; }
  .me { padding: 0 4px; }
  main { padding: 20px 16px calc(96px + var(--safe-b)); }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 8px 10px calc(8px + var(--safe-b));
    background: rgba(9, 9, 16, 0.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line);
  }
  .bottom-nav { padding-left: 4px; padding-right: 4px; }
  .bottom-nav .tab { flex: 1 1 0; min-width: 0; padding: 0 2px; flex-direction: column; height: 56px; gap: 3px; font-size: 11px; }
  .menu { right: 12px; }
}

/* ---------- Worlds ---------- */

.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 30px; margin-bottom: 26px; min-height: 180px;
  background: radial-gradient(ellipse at 85% 20%, rgba(34, 211, 238, 0.28), transparent 50%), radial-gradient(ellipse at 10% 100%, rgba(244, 114, 182, 0.2), transparent 55%), linear-gradient(135deg, #1b1640, #0f1030);
  border: 1px solid var(--line-2);
}
.hero h1 { font: 700 clamp(26px, 3.4vw, 40px)/1.08 var(--display); letter-spacing: -0.03em; margin: 0 0 8px; max-width: 620px; }
.hero p { margin: 0 0 20px; color: #c9c6e6; max-width: 540px; }
.hero .orb {
  position: absolute; right: -60px; top: -60px; width: 300px; height: 300px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 120deg, #8b7bff, #22d3ee, #f472b6, #8b7bff); filter: blur(60px); opacity: 0.35; animation: drift 12s linear infinite;
}
@keyframes drift { to { transform: rotate(360deg); } }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.world-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--line); transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s; text-align: left; padding: 0;
}
.world-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.9); }
.world-art { position: relative; height: 150px; overflow: hidden; }
.world-art .glow { position: absolute; inset: 0; }
.world-art .grid-floor {
  position: absolute; left: -20%; right: -20%; bottom: -40px; height: 120px; transform: perspective(200px) rotateX(55deg);
  background-image: linear-gradient(var(--tint) 1px, transparent 1px), linear-gradient(90deg, var(--tint) 1px, transparent 1px);
  background-size: 28px 28px; opacity: 0.35;
}
.world-art .live {
  position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 100px;
  background: rgba(0, 0, 0, 0.5); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; backdrop-filter: blur(6px);
}
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: breathe 1.6s infinite; }
.world-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.world-body h3 { margin: 0; font: 600 19px var(--display); letter-spacing: -0.01em; text-transform: capitalize; }
.world-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--dim); font-size: 13px; }
.world-stats span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.world-stats svg.i { width: 15px; height: 15px; }
.world-stats .ai { color: var(--cyan); }

.empty { text-align: center; padding: 60px 20px; color: var(--dim); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty svg.i { width: 34px; height: 34px; color: var(--violet); margin-bottom: 10px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* ---------- Store ---------- */

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.item-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; padding: 0; text-align: left;
  background: var(--card); border: 1px solid var(--line); transition: transform 0.18s, border-color 0.18s;
}
.item-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.item-thumb { position: relative; aspect-ratio: 1 / 0.82; background: radial-gradient(circle at 50% 40%, #2d2752, #0c0b18); display: grid; place-items: center; overflow: hidden; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.item-card:hover .item-thumb img { transform: scale(1.05); }
.item-thumb .ph { color: rgba(196, 187, 255, 0.55); }
.item-thumb .ph svg.i { width: 46px; height: 46px; stroke-width: 1.4; }
.ribbon { position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 100px; font-size: 11px; font-weight: 700; background: rgba(251, 191, 36, 0.92); color: #3b2500; }
.badge3d { position: absolute; right: 10px; top: 10px; padding: 3px 8px; border-radius: 100px; font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line-2); backdrop-filter: blur(6px); }
.item-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.item-body b { font-size: 15px; font-weight: 600; }
.item-body small { color: var(--faint); font-size: 12.5px; }
.item-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.owned { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-weight: 600; font-size: 13px; }
.owned svg.i { width: 15px; height: 15px; }
.item-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 520px) { .item-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }

/* ---------- Modal ---------- */

.modal-back {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(3, 3, 8, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 0.15s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 860px; max-height: calc(100dvh - 40px); overflow: auto; border-radius: 24px;
  background: var(--card-solid); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  display: grid; grid-template-columns: 1.15fr 1fr; animation: pop 0.18s ease-out;
}
.modal-stage { position: relative; min-height: 380px; background: radial-gradient(ellipse at 50% 35%, #2a2450, #121022 55%, #08080f); }
.modal-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.modal-stage canvas { position: absolute; inset: 0; cursor: grab; }
.modal-stage .hint { position: absolute; left: 14px; bottom: 12px; font-size: 12px; color: var(--dim); background: rgba(0, 0, 0, 0.5); padding: 4px 10px; border-radius: 100px; pointer-events: none; }
.modal-info { padding: 28px 26px; display: flex; flex-direction: column; gap: 14px; }
.modal-info .kind { color: var(--cyan); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.modal-info h2 { margin: 0; font: 700 28px/1.1 var(--display); letter-spacing: -0.02em; }
.modal-info p { margin: 0; color: var(--dim); }
.modal-info .price { font-size: 24px; }
.modal-info .spacer { min-height: 10px; }
.modal-close { position: absolute; right: 14px; top: 14px; z-index: 3; }
.modal-wrap { position: relative; width: 100%; max-width: 860px; }
.note { font-size: 13px; color: var(--faint); }
.note.warn { color: var(--gold); }
@media (max-width: 760px) {
  .modal-back { place-items: end center; padding: 0; }
  .modal { grid-template-columns: 1fr; border-radius: 24px 24px 0 0; max-height: 92dvh; }
  .modal-stage { min-height: 300px; }
  .modal-info { padding: 22px 20px calc(24px + var(--safe-b)); }
}

/* ---------- Toast ---------- */

.toasts { position: fixed; left: 50%; top: calc(18px + var(--safe-t)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 500;
  background: rgba(20, 19, 36, 0.95); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); animation: pop 0.2s ease-out;
}
.toast svg.i { color: var(--green); }
.toast.error svg.i { color: var(--red); }
.toast.out { opacity: 0; transition: opacity 0.25s; }

/* ---------- World (in-game) ---------- */

.game { position: fixed; inset: 0; z-index: 50; background: #05050b; overflow: hidden; touch-action: none; }
.game-stage { position: absolute; inset: 0; }
.game-stage canvas { position: absolute; inset: 0; display: block; }
.game-stage .w-labels { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.hud { position: absolute; z-index: 5; display: flex; gap: 10px; align-items: center; }
.hud.tl { left: 16px; top: calc(16px + var(--safe-t)); }
.hud.tr { right: 16px; top: calc(16px + var(--safe-t)); }
.glass {
  background: rgba(10, 10, 20, 0.62); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.world-title { padding: 7px 14px 7px 12px; border-radius: 14px; }
.world-title b { display: block; font: 600 15px var(--display); text-transform: capitalize; line-height: 1.2; }
.world-title small { color: var(--dim); font-size: 12px; display: flex; gap: 10px; }
.world-title small span { display: inline-flex; align-items: center; gap: 4px; }
.world-title small svg.i { width: 13px; height: 13px; }
.game .coins { background: rgba(40, 30, 5, 0.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

.chat-log {
  position: absolute; left: 16px; bottom: calc(84px + var(--safe-b)); z-index: 5; width: min(380px, calc(100% - 32px));
  display: flex; flex-direction: column; gap: 6px; pointer-events: none;
}
.chat-line { align-self: flex-start; max-width: 100%; padding: 7px 12px; border-radius: 12px; font-size: 13.5px; animation: pop 0.2s ease-out; transition: opacity 0.6s; }
.chat-line b { font-weight: 600; margin-right: 6px; }
.chat-line.agent b { color: var(--cyan); }
.chat-line.me b { color: var(--violet); }
.chat-line.system { color: var(--dim); font-size: 12.5px; }
.chat-line.old { opacity: 0.55; }
.chat-line .ai { font-size: 9.5px; font-weight: 800; color: #031a1f; background: var(--cyan); border-radius: 4px; padding: 0 4px; margin-right: 6px; vertical-align: 1px; }

.dock {
  position: absolute; left: 16px; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 6;
  display: flex; gap: 10px; align-items: center; max-width: 760px; margin: 0 auto;
}
.say { flex: 1; display: flex; align-items: center; height: 52px; border-radius: 16px; padding: 0 6px 0 16px; gap: 8px; }
.say input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; height: 100%; }
.say input::placeholder { color: var(--faint); }
.say .send { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--grad); display: grid; place-items: center; color: #fff; }
.emotes { display: flex; gap: 6px; }
.emote { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; border: 1px solid var(--line-2); }
.emote:active { transform: scale(0.94); }

.game-hint {
  position: absolute; left: 50%; top: calc(80px + var(--safe-t)); transform: translateX(-50%); z-index: 5;
  padding: 10px 16px; border-radius: 14px; font-size: 13.5px; color: var(--dim); display: flex; gap: 14px; align-items: center;
  animation: pop 0.3s ease-out; transition: opacity 0.6s; white-space: nowrap;
}
.game-hint b { color: var(--text); font-weight: 600; }
.game-hint kbd { font: 600 11px var(--sans); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.06); color: var(--text); }
.game-hint.gone { opacity: 0; pointer-events: none; }
.game-loading { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: #05050b; transition: opacity 0.4s; }
.game-loading.gone { opacity: 0; pointer-events: none; }
.game-loading div { display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--dim); }
.game-loading .logo-mark { width: 56px; height: 56px; animation: breathe 1.4s ease-in-out infinite; }

.joystick {
  display: none; position: absolute; right: 22px; bottom: calc(92px + var(--safe-b)); z-index: 6;
  width: 124px; height: 124px; border-radius: 50%; touch-action: none;
}
.joystick .knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: var(--grad); opacity: 0.9; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
@media (pointer: coarse) {
  .joystick { display: block; }
  .game-hint .keys { display: none; }
}
@media (max-width: 760px) {
  .emotes .emote:nth-child(n+2) { display: none; }
  .dock { right: 16px; }
  .game-hint { white-space: normal; width: calc(100% - 32px); justify-content: center; text-align: center; }
  .chat-log { bottom: calc(80px + var(--safe-b)); width: calc(100% - 170px); }
  .world-title small .hide-sm { display: none; }
}

/* 3D labels from the shared viewer */
.w-tag {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 600 12px var(--sans); color: #fff;
  background: rgba(10, 10, 18, 0.72); border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 3px 9px; border-radius: 100px; transform: translateY(-4px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.w-tag.agent { border-color: rgba(34, 211, 238, 0.75); box-shadow: 0 0 14px rgba(34, 211, 238, 0.35); }
.w-tag.self { border-color: var(--violet); }
.w-tag.obj { font-size: 10.5px; color: #c4bbff; border-color: rgba(139, 123, 255, 0.4); }
.w-ai { font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; color: #031a1f; background: #22d3ee; border-radius: 4px; padding: 0 4px; }
.w-you { font-size: 9.5px; font-weight: 800; color: #fff; background: var(--violet); border-radius: 4px; padding: 0 4px; }
.w-tier { font-size: 10px; color: #67e8f9; font-weight: 700; }
.w-bubble {
  max-width: 240px; white-space: normal; text-align: left;
  font: 500 12.5px/1.35 var(--sans); color: #0b0b14; background: #fff;
  padding: 7px 11px; border-radius: 12px 12px 12px 4px; transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); animation: pop 0.18s ease-out;
}

/* ---------- Spaces ---------- */

.vis { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 100px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-2); color: var(--dim); white-space: nowrap; }
.vis svg.i { width: 13px; height: 13px; }
.vis-public { color: var(--green); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.vis-invite { color: #93c5fd; border-color: rgba(96, 165, 250, 0.35); background: rgba(96, 165, 250, 0.08); }
.my-space { display: grid; grid-template-columns: 1.3fr 1fr; border-radius: 24px; overflow: hidden; border: 1px solid var(--line-2); background: var(--card); }
.my-space-art { position: relative; min-height: 300px; background: #0c0b18; }
.my-space-art canvas { position: absolute; inset: 0; }
.my-space-art .w-labels { position: absolute; inset: 0; pointer-events: none; }
.my-space-info { padding: 28px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.my-space-info h2 { margin: 0; font: 700 28px/1.1 var(--display); letter-spacing: -0.02em; }
.kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.kicker svg.i { width: 15px; height: 15px; }
.space-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--dim); font-size: 13px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.warn-note { background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.35); color: #fde68a; }
.warn-note svg.i { color: var(--gold); }
.space-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); text-align: left; transition: transform 0.18s, border-color 0.18s; }
.space-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.space-card > div { flex: 1; }
.space-card b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-card small { color: var(--faint); }
.avatar.lg { width: 46px; height: 46px; font-size: 15px; }
@media (max-width: 760px) {
  .my-space { grid-template-columns: 1fr; }
  .my-space-art { min-height: 220px; }
  .my-space-info { padding: 20px; }
}

.btn.danger { color: var(--red); border-color: rgba(248, 113, 113, 0.4); background: transparent; }
.btn.danger:hover { background: rgba(248, 113, 113, 0.1); }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; }
.btn.glass { background: rgba(10, 10, 20, 0.62); }

.sel-bar {
  position: absolute; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%); z-index: 7;
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 16px; animation: pop 0.15s ease-out; max-width: calc(100% - 24px);
}
.sel-bar b { font-size: 14px; margin-right: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-bar[hidden] { display: none; }
.tray { position: absolute; left: 16px; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 6; border-radius: 18px; padding: 10px 12px 12px; max-width: 900px; margin: 0 auto; }
.tray-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 8px; }
.tray-head b { font-size: 13.5px; }
.tray-head small { color: var(--faint); font-size: 12px; }
.tray-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.tray-item { position: relative; flex: none; width: 96px; display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); text-align: left; }
.tray-item.on { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2); }
.tray-thumb { aspect-ratio: 1; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #2d2752, #0c0b18); }
.tray-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tray-thumb .ph svg.i { width: 26px; height: 26px; color: rgba(196, 187, 255, 0.55); }
.tray-name { font-size: 11.5px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-n { position: absolute; right: 8px; top: 8px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 100px; background: rgba(0, 0, 0, 0.6); }
.tray-empty { color: var(--dim); font-size: 13.5px; padding: 10px 4px; }
.tray-empty .link { margin: 0 0 0 4px; }

.modal-wrap.narrow { max-width: 520px; }
.sheet-form { width: 100%; max-height: calc(100dvh - 40px); overflow: auto; padding: 26px; border-radius: 24px; background: var(--card-solid); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7); animation: pop 0.18s ease-out; }
.sheet-form h2 { margin: 0 0 18px; padding-right: 44px; font: 700 24px var(--display); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg-opt, .env-opt { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); cursor: pointer; }
.seg-opt input, .env-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt b, .env-opt b { font-size: 13.5px; }
.seg-opt small { color: var(--faint); font-size: 11.5px; line-height: 1.3; }
.seg-opt:has(input:checked), .env-opt:has(input:checked) { border-color: var(--violet); background: rgba(139, 123, 255, 0.14); }
.env-list { display: flex; flex-wrap: wrap; gap: 8px; }
.invites { display: flex; flex-wrap: wrap; gap: 6px; }
.invitee { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 11px; border-radius: 100px; background: rgba(96, 165, 250, 0.1); border: 1px solid rgba(96, 165, 250, 0.3); font-size: 13px; }
.invitee button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: transparent; color: var(--dim); display: grid; place-items: center; padding: 0; }
.invitee svg.i { width: 13px; height: 13px; }
.people { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.person { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.person b { flex: 1; font-weight: 500; font-size: 14px; }
.input svg.i { color: var(--faint); }
@media (max-width: 760px) {
  .seg { grid-template-columns: 1fr; }
  .sheet-form { border-radius: 24px 24px 0 0; max-height: 92dvh; padding: 22px 20px calc(24px + var(--safe-b)); }
  .modal-back:has(.sheet-form) { place-items: end center; padding: 0; }
  .sel-bar { bottom: calc(160px + var(--safe-b)); }
  .sel-bar b { display: none; }
}

/* ---------- Me ---------- */

.me-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: start; }
.me-stage { position: sticky; top: 90px; height: min(620px, 72vh); border-radius: 24px; overflow: hidden; border: 1px solid var(--line-2); background: radial-gradient(ellipse at 50% 30%, #2a2450, #121022 55%, #08080f); }
.me-stage canvas { position: absolute; inset: 0; cursor: grab; }
.me-stage .w-labels { position: absolute; inset: 0; pointer-events: none; }
.me-stage .hint { position: absolute; left: 14px; bottom: 12px; z-index: 2; font-size: 12px; color: var(--dim); background: rgba(0, 0, 0, 0.5); padding: 4px 10px; border-radius: 100px; }
.me-edit { display: flex; flex-direction: column; gap: 18px; padding: 22px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); }
.me-row h4 { margin: 0 0 9px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips .chip { display: inline-flex; align-items: center; gap: 5px; height: 34px; }
.chip svg.i { width: 13px; height: 13px; }
.chip.premium { border-color: rgba(251, 191, 36, 0.35); color: #fde68a; }
.chip.premium.on { background: rgba(251, 191, 36, 0.16); border-color: var(--gold); color: #fff; }
.chip[data-locked] { opacity: 0.6; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.swatches button, .swatches .custom { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.12); background: var(--c); padding: 0; }
.swatches button.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(139, 123, 255, 0.55); }
.swatches .custom { position: relative; overflow: hidden; background: conic-gradient(#f472b6, #fbbf24, #34d399, #22d3ee, #8b7bff, #f472b6); cursor: pointer; }
.swatches .custom input { position: absolute; inset: -8px; opacity: 0; cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--violet); }
.me-save { position: sticky; bottom: 12px; }
@media (max-width: 860px) {
  .me-grid { grid-template-columns: 1fr; }
  .me-stage { position: relative; top: 0; height: 360px; }
  .me-edit { padding: 18px; }
  .me-save { bottom: calc(84px + var(--safe-b)); }
}

/* ---------- Shops (R-Mall) ---------- */

.sub-head { margin: 26px 0 12px; font: 600 16px/1 var(--display); color: var(--dim); letter-spacing: 0.02em; }
.warn { color: var(--gold, #fbbf24); font-weight: 600; font-size: 13px; }
.order-list { display: flex; flex-direction: column; gap: 10px; }
.order { display: flex; justify-content: space-between; gap: 14px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.order small { display: block; color: var(--faint); font-size: 12.5px; margin-top: 3px; }
.order-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 100px; background: rgba(139, 123, 255, 0.16); }
.status.s-delivered { background: rgba(52, 211, 153, 0.16); color: var(--green); }
.status.s-cancelled { background: rgba(255, 255, 255, 0.08); color: var(--faint); }
.ship summary { cursor: pointer; font-size: 13px; color: var(--dim); margin-bottom: 8px; }
.ship .field { margin-bottom: 8px; }
.ship .input { height: 40px; }
.ship .input input { font-size: 15px; }

/* ---------- Live shows (R-Auditorium) ---------- */

.show-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, transparent), var(--card) 60%); border: 1px solid var(--line); }
.show-card h3 { margin: 4px 0 0; font: 700 20px/1.15 var(--display); }
.show-card p { margin: 0; color: var(--dim); font-size: 14px; }
.show-card p.dim { color: var(--faint); font-size: 13px; }
.show-top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--dim); }
.show-top .venue { font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; color: var(--cyan); }
.show-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.show-foot small { color: var(--faint); }
.show-panel { position: absolute; left: 12px; bottom: 150px; z-index: 6; width: min(340px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 8px; }
.show-panel .drop, .show-panel .cards { padding: 12px 14px; border-radius: 16px; background: rgba(12, 10, 28, 0.86); backdrop-filter: blur(10px); border: 1px solid var(--line-2); }
.show-panel .drop { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-color: var(--gold, #fbbf24); }
.show-panel .drop.soon, .show-panel .drop.out, .show-panel .drop.got, .show-panel .drop.over { border-color: var(--line-2); }
.show-panel .drop b { display: block; font-size: 14px; }
.show-panel .drop small, .show-panel .cards > small { display: block; color: var(--dim); font-size: 12px; }
.show-panel .tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 100px; background: var(--gold, #fbbf24); color: #3b2500; font-size: 10.5px; font-weight: 800; }
.show-panel .cards { display: flex; flex-direction: column; gap: 6px; }
.pcard { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.pcard b { font-size: 13px; display: block; }
.pcard small { color: var(--faint); font-size: 11.5px; }

/* ---------- Studio (artist dashboard) ---------- */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.kpi small { color: var(--dim); font-size: 12.5px; }
.kpi b { font: 700 28px/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi span { color: var(--faint); font-size: 12px; }
.kpi.warn { border-color: rgba(251, 191, 36, 0.45); }
.panel { padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); margin-bottom: 16px; }
.panel h3 { margin: 0 0 12px; font: 600 15px/1 var(--display); }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12px; padding: 0 10px 8px 0; white-space: nowrap; }
.tbl td { padding: 10px 10px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.tbl small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, 0.08); color: var(--dim); }
.pill.ok { background: rgba(52, 211, 153, 0.16); color: var(--green); }
.pill.warn { background: rgba(251, 191, 36, 0.16); color: #fde68a; }
.pill.bad { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.ful { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px; }
.ful b { display: block; font: 700 22px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.ful small { color: var(--faint); font-size: 12px; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .tip[hidden] { display: none; }
.chart .bar { fill: #3987e5; }
.chart .bar.on { fill: #6aa6ee; }
.chart .gl { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .ax { fill: var(--faint); font-size: 10.5px; }
.chart .hit { fill: transparent; }
.chart g[data-i] { cursor: default; }
.chart .tip { position: absolute; top: 0; width: 150px; padding: 8px 10px; border-radius: 10px; background: rgba(12, 10, 28, 0.95); border: 1px solid var(--line-2); font-size: 12px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; z-index: 2; }
.chart .tip span { color: var(--dim); }
.chart .tip .tot { color: var(--text); font-weight: 600; margin-top: 2px; }
.as-table { margin-top: 10px; font-size: 13px; }
.as-table summary { cursor: pointer; color: var(--dim); }
.as-table table { width: 100%; margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.as-table th, .as-table td { text-align: left; padding: 4px 8px 4px 0; border-top: 1px solid var(--line); }
select.chip { appearance: none; padding-right: 14px; }

/* ---------- Create (R-Write Camp) ---------- */

.status.s-draft, .status.s-archived, .status.s-on_hold { background: rgba(255, 255, 255, 0.08); color: var(--faint); }
.status.s-under_review { background: rgba(91, 140, 255, 0.18); color: #a9c2ff; }
.status.s-shortlisted, .status.s-released { background: rgba(52, 211, 153, 0.16); color: var(--green); }
.status.sp-draft { background: rgba(255, 255, 255, 0.08); color: var(--faint); }
.status.sp-proposed { background: rgba(251, 191, 36, 0.16); color: #fde68a; }
.status.sp-confirmed { background: rgba(52, 211, 153, 0.16); color: var(--green); }
.tbl tfoot td { border-top: 1px solid var(--line-2); }
.panel h3 .status { font-size: 11px; vertical-align: middle; }
.modal-info textarea { resize: vertical; }

/* ---------- Camp audio ---------- */

.version { padding: 12px 0; border-top: 1px solid var(--line); }
.version:first-of-type { border-top: 0; padding-top: 0; }
.version-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.version-head small { color: var(--faint); font-size: 12px; }
.file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.file b { font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file small { display: block; color: var(--faint); font-size: 11.5px; }
.file .player { flex-basis: 100%; }
.file audio { width: 100%; margin-top: 6px; height: 36px; }

/* ---------- Creator groups ---------- */

.posts { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.post { padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.post-head small { display: block; color: var(--faint); font-size: 12px; }
.post > p { margin: 0 0 10px; white-space: pre-wrap; }
.post-actions { margin-top: 10px; }
.status.s-looking_for { background: rgba(251, 191, 36, 0.16); color: #fde68a; }
.status.s-showcase { background: rgba(52, 211, 153, 0.16); color: var(--green); }
.status.s-discussion { background: rgba(255, 255, 255, 0.08); color: var(--faint); }
.replies { border-left: 2px solid var(--line-2); padding-left: 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.reply b { font-size: 13px; }
.reply small { color: var(--faint); font-size: 11.5px; }
.reply p { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; }
.reply-box { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.reply-box:empty { display: none; }
.reply-box .input { flex: 1; height: 40px; }

/* ---------- R-POS: the fan's side ---------- */

.pos-code {
  font: 700 36px/1 var(--display); letter-spacing: 0.16em; padding: 22px 10px; margin: 8px 0 4px;
  border-radius: 16px; background: #0e0d18; border: 1px solid var(--line-2); font-variant-numeric: tabular-nums;
}
.mono-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; letter-spacing: 0.06em; color: var(--gold, #fbbf24); }

/* ---------- Aurai (concierge) ---------- */
.aurai-fab {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 14px; border: 0; border-radius: 999px;
  background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 14px 34px -10px rgba(139, 123, 255, 0.95);
}
.aurai-fab:active { transform: scale(0.96); }
.aurai-fab .i { width: 18px; height: 18px; }
.aurai-fab.at-shell { position: fixed; right: 22px; bottom: calc(22px + var(--safe-b)); z-index: 35; }
.aurai-fab.at-hud { height: 40px; padding: 0 14px 0 12px; }
@media (max-width: 760px) {
  .aurai-fab.at-shell { right: 14px; bottom: calc(84px + var(--safe-b)); height: 44px; }
  .aurai-fab.at-hud span { display: none; }
  .aurai-fab.at-hud { width: 40px; padding: 0; justify-content: center; }
}

.aurai {
  position: fixed; right: 22px; bottom: calc(22px + var(--safe-b)); z-index: 90; width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100dvh - 120px));
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: var(--card-solid); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7); animation: pop 0.18s ease-out;
}
@media (max-width: 760px) {
  .aurai { left: 0; right: 0; bottom: 0; width: 100%; height: calc(100dvh - 56px - var(--safe-t)); border-radius: 22px 22px 0 0; border-bottom: 0; }
}
.aurai-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--line); }
.aurai-head > div { flex: 1; min-width: 0; }
.aurai-head b { display: block; }
.aurai-head small { color: var(--faint); font-size: 12px; }
.aurai-mark { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
.aurai-mark .i { width: 18px; height: 18px; }
.aurai-consent { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; font-size: 12px; color: var(--dim); border-bottom: 1px solid var(--line); cursor: pointer; }
.aurai-consent input { margin-top: 2px; accent-color: var(--violet); }
.aurai-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.aurai .msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; }
.aurai .msg p { margin: 0; }
.aurai .msg.me { align-self: flex-end; background: rgba(139, 123, 255, 0.2); border: 1px solid rgba(139, 123, 255, 0.35); border-bottom-right-radius: 6px; }
.aurai .msg.ai { align-self: flex-start; max-width: 100%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-bottom-left-radius: 6px; display: flex; flex-direction: column; gap: 10px; }
.aurai .msg.ai > .btn { align-self: flex-start; }
.aurai .typing { flex-direction: row !important; gap: 5px !important; padding: 14px; }
.aurai .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); animation: breathe 1s infinite; }
.aurai .typing i:nth-child(2) { animation-delay: 0.15s; }
.aurai .typing i:nth-child(3) { animation-delay: 0.3s; }
.aurai-prods { display: flex; gap: 8px; overflow-x: auto; margin: 0 -4px; padding: 0 4px 4px; scroll-snap-type: x mandatory; }
.aurai-prod {
  flex: 0 0 136px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 3px; padding: 0 0 10px; text-align: left;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, 0.25); color: var(--text); overflow: hidden;
}
.aurai-prod:hover { border-color: var(--violet); }
.aurai-prod .ap-img { height: 96px; display: grid; place-items: center; color: var(--dim); margin-bottom: 6px; }
.aurai-prod .ap-img img { width: 100%; height: 100%; object-fit: cover; }
.aurai-prod .ap-img .i { width: 30px; height: 30px; }
.aurai-prod b, .aurai-prod small, .aurai-prod .price { padding: 0 10px; }
.aurai-prod b { font-size: 13px; line-height: 1.3; }
.aurai-prod small { color: var(--faint); font-size: 11px; }
.aurai-prod .price { display: flex; align-items: center; gap: 5px; font-weight: 600; font-size: 13px; margin-top: 2px; }
.aurai-shows { display: flex; flex-direction: column; gap: 8px; }
.aurai-shows .btn { align-self: flex-start; }
.aurai-show { padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }
.aurai-show b { display: block; font-size: 13px; }
.aurai-show small { color: var(--dim); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.aurai-basket { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.3); }
.aurai-basket .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.aurai-basket .row span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.aurai-basket .row .i { width: 15px; height: 15px; color: var(--violet); flex: none; }
.aurai-basket .row b { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.aurai-basket .row.total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; }
.aurai-basket .note { color: var(--dim); font-size: 12px; }
.aurai-basket .note.warn { color: var(--gold); }
.aurai-basket .acts { display: flex; gap: 8px; margin-top: 2px; }
.aurai-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 10px; }
.aurai-chips:empty { display: none; }
.aurai-chips .chip { flex: none; height: 32px; font-size: 12px; }
.aurai-say { display: flex; align-items: center; gap: 8px; margin: 0 12px calc(12px + var(--safe-b)); height: 50px; padding: 0 6px 0 16px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); }
.aurai-say:focus-within { border-color: var(--violet); }
.aurai-say input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; height: 100%; color: var(--text); }
.aurai-say input::placeholder { color: var(--faint); }
.aurai-say .send { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--grad); display: grid; place-items: center; color: #fff; flex: none; }

/* ---------- Collection: numbered items + digital twins ---------- */
.twin-chip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 6px; padding: 3px 9px 3px 7px; border-radius: 100px; font-size: 11.5px; font-weight: 600; color: #e9e4ff; background: rgba(139, 123, 255, 0.16); border: 1px solid rgba(139, 123, 255, 0.4); }
.twin-chip .i { width: 13px; height: 13px; color: var(--violet); }
.coll-card { cursor: default; }
.coll-card .item-body { display: flex; flex-direction: column; gap: 4px; }
.coll-card .note { margin: 4px 0 0; font-size: 12px; }
.coll-card .acts, .order .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.order.offer { border-color: rgba(139, 123, 255, 0.45); background: linear-gradient(135deg, rgba(139, 123, 255, 0.1), var(--card)); }
.order.offer > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.person.on { background: rgba(139, 123, 255, 0.12); border-radius: 10px; }
@media (max-width: 560px) {
  .order.offer { flex-direction: column; }
  .order.offer .order-side { align-items: flex-start; }
}
.order-list + .grid { margin-top: 22px; }

/* ---------- Fan clubs, bundles, member pricing ---------- */
.thumb-tags { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; pointer-events: none; }
.thumb-tags .tag { padding: 3px 9px; border-radius: 100px; font-size: 11px; font-weight: 700; white-space: nowrap; background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line-2); backdrop-filter: blur(6px); }
.thumb-tags .tag.gold { background: rgba(251, 191, 36, 0.92); border-color: transparent; color: #3b2500; }
.thumb-tags .tag.violet { background: rgba(139, 123, 255, 0.92); border-color: transparent; color: #fff; }
.was { color: var(--faint); font-weight: 500; font-size: 0.85em; margin-left: 4px; }
.member-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 100px; font-size: 11px; font-weight: 700; color: #e9e4ff; background: rgba(139, 123, 255, 0.2); vertical-align: middle; }

.club {
  margin: 4px 0 26px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), var(--card);
}
.club-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.club-head h3 { margin: 0 0 4px; font: 700 20px var(--display); }
.club-head p { margin: 0; color: var(--dim); font-size: 14px; }
.club > .note { margin: 14px 0 0; font-size: 12px; }
.tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tier { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }
.tier.mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tier > b { font: 700 17px var(--display); }
.tier .price { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 18px; }
.tier .price small { color: var(--faint); font-weight: 500; font-size: 12px; }
.tier ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tier li { display: flex; gap: 7px; font-size: 13px; color: var(--dim); }
.tier li .i { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--green); }
.tier .btn { align-self: flex-start; }

.bundle-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.bundle-card {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; text-align: left; color: var(--text);
  border-radius: var(--radius); border: 1px solid var(--line); transition: transform 0.15s, border-color 0.15s;
  background: radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 65%), var(--card);
}
.bundle-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.bundle-card > b { font: 700 17px var(--display); }
.bundle-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bundle-top .kind, .bundle-form .kind { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.bundle-top .save { padding: 2px 9px; border-radius: 100px; font-size: 11px; font-weight: 700; color: #052e1c; background: var(--green); }
.bundle-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.bundle-card li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }
.bundle-card li .i { width: 15px; height: 15px; color: var(--violet); flex: none; }
.bundle-card .item-foot small { color: var(--faint); }
.bundle-form h2 { margin-top: 6px; }
.bundle-parts { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; }
.bundle-parts .part { display: flex; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.bundle-parts .part > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bundle-parts .part > div > .i { width: 16px; height: 16px; color: var(--violet); }
.bundle-parts .part small { color: var(--faint); font-size: 12px; }
.bundle-parts .part .filters { margin-top: 4px; }
.price.big { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 24px; font-weight: 700; margin: 14px 0 4px; }
.deal {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 12px; text-align: left;
  border: 1px dashed rgba(139, 123, 255, 0.5); background: rgba(139, 123, 255, 0.08); color: var(--text); font-size: 13px;
}
.deal .i { width: 16px; height: 16px; color: var(--violet); flex: none; }
.deal > span { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }

/* ---------- Payouts (Studio) ---------- */
.payouts .pending-pay { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding: 14px 16px; margin-bottom: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(139, 123, 255, 0.07); }
.payouts .pending-pay > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.payouts .pending-pay small { color: var(--dim); font-size: 12.5px; }
.payouts .pending-pay b { font: 700 26px/1.15 var(--display); font-variant-numeric: tabular-nums; }
.payouts .pending-pay span { color: var(--faint); font-size: 12px; }
.payouts .pay-break { display: flex; flex-direction: column; gap: 4px; align-self: center; font-size: 12.5px; color: var(--dim); }
.payouts .pay-break b { font: inherit; font-weight: 700; color: var(--text); }
.payouts .note { margin: 0; font-size: 13px; }
