/* ===========================================================================
   Nuxr Worlds — bubbly UI stylesheet (landing, auth, HUD, panels)
   ======================================================================== */
:root {
  --ink: #3d3654;
  --ink-soft: #6c6488;
  --pink: #ff7eb6;
  --pink-deep: #ff5fa8;
  --blue: #7ec8e3;
  --lav: #b8a7ff;
  --cream: #fffbf2;
  --card: rgba(255, 255, 255, 0.88);
  --shadow: 0 10px 30px rgba(120, 100, 180, 0.18);
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Quicksand', 'Segoe UI', sans-serif;
  color: var(--ink);
}

/* ------------------------------------------------------------- buttons -- */
.btn-primary, .btn-soft {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-deep) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 95, 168, 0.35);
}
.btn-soft {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.btn-primary:hover, .btn-soft:hover { transform: translateY(-2px) scale(1.02); }
.btn-primary:disabled { opacity: .45; cursor: default; transform: none; }
.btn-big { padding: 14px 30px; font-size: 17px; }
.btn-block { width: 100%; }

/* ------------------------------------------------- floating bubbles bg -- */
.landing-page, .auth-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #ffe3f0 0%, #e8f4ff 45%, #e2ffe9 100%);
  overflow-x: hidden;
}
.bubbles-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.bg-bubble {
  position: absolute;
  bottom: -120px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.95), rgba(255,255,255,.25) 55%, rgba(255,255,255,.05));
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  animation: bubbleRise linear infinite;
}
.bg-bubble:nth-child(3n)   { width: 34px; height: 34px; }
.bg-bubble:nth-child(3n+1) { width: 58px; height: 58px; }
.bg-bubble:nth-child(3n+2) { width: 22px; height: 22px; }
.bg-bubble:nth-child(1)  { left: 4%;  animation-duration: 16s; }
.bg-bubble:nth-child(2)  { left: 12%; animation-duration: 21s; animation-delay: 3s; }
.bg-bubble:nth-child(3)  { left: 21%; animation-duration: 14s; animation-delay: 6s; }
.bg-bubble:nth-child(4)  { left: 30%; animation-duration: 24s; animation-delay: 1s; }
.bg-bubble:nth-child(5)  { left: 38%; animation-duration: 17s; animation-delay: 8s; }
.bg-bubble:nth-child(6)  { left: 47%; animation-duration: 20s; animation-delay: 4s; }
.bg-bubble:nth-child(7)  { left: 55%; animation-duration: 15s; animation-delay: 10s; }
.bg-bubble:nth-child(8)  { left: 63%; animation-duration: 23s; animation-delay: 2s; }
.bg-bubble:nth-child(9)  { left: 71%; animation-duration: 18s; animation-delay: 7s; }
.bg-bubble:nth-child(10) { left: 79%; animation-duration: 22s; animation-delay: 5s; }
.bg-bubble:nth-child(11) { left: 86%; animation-duration: 16s; animation-delay: 9s; }
.bg-bubble:nth-child(12) { left: 93%; animation-duration: 19s; animation-delay: 0s; }
.bg-bubble:nth-child(13) { left: 26%; animation-duration: 26s; animation-delay: 12s; }
.bg-bubble:nth-child(14) { left: 60%; animation-duration: 25s; animation-delay: 14s; }
@keyframes bubbleRise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateY(-110vh) translateX(24px); opacity: 0; }
}

/* -------------------------------------------------------------- landing -- */
.landing {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  text-align: center;
}
.hero-bubble {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 8px auto 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #ffd1ec 45%, #f7a8d8 100%);
  box-shadow: var(--shadow), inset 0 0 22px rgba(255,255,255,.65);
  animation: heroFloat 4.5s ease-in-out infinite;
}
.hero-eye {
  position: absolute;
  top: 52px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ink);
}
.hero-eye:nth-child(1) { left: 38px; }
.hero-eye:nth-child(2) { right: 38px; }
.hero-smile {
  position: absolute;
  top: 72px;
  left: 50%;
  width: 26px;
  height: 13px;
  transform: translateX(-50%);
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 26px 26px;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.landing h1 {
  font-size: clamp(34px, 7vw, 52px);
  margin: 0 0 10px;
  background: linear-gradient(135deg, var(--pink-deep), var(--lav) 60%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-tag {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 auto 26px;
  max-width: 480px;
}
.landing-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-bottom: 34px; }
.landing-feats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}
.feat {
  background: var(--card);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
}
.feat span { margin-right: 6px; }
.landing-foot { color: var(--ink-soft); font-size: 13px; }
.landing-foot a { color: var(--ink-soft); }

/* ----------------------------------------------------------------- auth -- */
.auth-page { display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 410px;
  background: var(--card);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 30px 24px;
}
.auth-logo {
  display: block;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 12px;
}
.auth-card h1 { margin: 0 0 4px; font-size: 26px; text-align: center; }
.auth-sub { margin: 0 0 18px; text-align: center; color: var(--ink-soft); font-size: 14px; }
.auth-card label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 5px; }
.auth-card input[type="text"], .auth-card input[type="email"], .auth-card input[type="password"] {
  width: 100%;
  border: 2px solid #eee4f4;
  border-radius: 14px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.auth-card input:focus { border-color: var(--pink); }
.auth-check { font-weight: 500 !important; font-size: 13px !important; color: var(--ink-soft); margin: 14px 0 16px !important; }
.auth-check input { margin-right: 6px; }
.auth-alt { text-align: center; font-size: 14px; color: var(--ink-soft); margin-top: 16px; }
.auth-alt a, .auth-check a { color: var(--pink-deep); font-weight: 600; }
.auth-error {
  background: #ffe4ec;
  border: 1.5px solid #ffb3cd;
  color: #c2356f;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 6px;
}

/* ============================================================== GAME ==== */
.game-page {
  overflow: hidden;
  position: fixed;
  inset: 0;
  background: #cfe9ff;
  touch-action: none;
}
#game-canvas { position: fixed; inset: 0; display: block; }

#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: linear-gradient(160deg, #ffe3f0, #e8f4ff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.boot-bubble {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, #ffd1ec 50%, #f7a8d8);
  animation: heroFloat 1.6s ease-in-out infinite;
  box-shadow: var(--shadow);
}
.boot-text { color: var(--ink-soft); font-weight: 600; }
#boot-error { color: #c2356f; font-weight: 600; max-width: 320px; text-align: center; }
.boot-logout { color: var(--ink-soft); font-size: 13px; }

/* HUD root: overlay that lets the canvas receive touches */
#hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
#hud [hidden] { display: none !important; }
#hud > * { pointer-events: auto; }

.hud-top {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }

.hud-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 6px 16px 6px 6px;
}
#hud-avatar { width: 52px; height: 52px; }
.hud-name { font-weight: 700; font-size: 14px; }
.hud-level {
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  color: #fff;
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 4px;
}
.hud-xpbar {
  width: 150px;
  height: 8px;
  background: #efe7f7;
  border-radius: 99px;
  overflow: hidden;
  margin: 4px 0 3px;
}
.hud-xpfill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue), var(--lav), var(--pink));
  transition: width .4s ease;
}
.hud-sub { font-size: 11px; color: var(--ink-soft); font-weight: 600; }

.hud-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hud-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 19px;
  cursor: pointer;
  transition: transform .12s;
}
.hud-btn:hover { transform: translateY(-2px) scale(1.06); }
.hud-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pink-deep);
  border: 2px solid #fff;
  animation: pulseDot 1.4s infinite;
}
@keyframes pulseDot { 50% { transform: scale(1.25); } }

.hud-world {
  position: absolute;
  top: max(64px, calc(env(safe-area-inset-top) + 56px));
  right: 14px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(80, 70, 120, 0.75);
  background: rgba(255,255,255,.55);
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none !important;
}

/* quest tracker */
.hud-quests {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 230px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 10px 14px;
  font-size: 13px;
}
.hud-quests:empty { display: none; }
.hud-quests-title { font-weight: 700; font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.hud-quest { display: flex; gap: 7px; align-items: baseline; padding: 2px 0; font-weight: 600; }
.hud-quest em { font-style: normal; color: var(--ink-soft); font-size: 11px; }
.hud-quest.done { color: #51b06e; }
.hud-quest-check { font-size: 12px; }

/* interact prompt */
.hud-prompt {
  position: absolute;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 9px 18px;
  font-weight: 700;
  font-size: 14px;
  pointer-events: none !important;
}
.hud-key {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  border-radius: 7px;
  font-size: 12px;
  padding: 2px 7px;
  font-weight: 700;
}

/* NPC dialog */
.hud-dialog {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  background: var(--card);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 22px 12px;
  cursor: pointer;
}
.hud-dialog-name { font-weight: 700; color: var(--pink-deep); margin-bottom: 4px; }
.hud-dialog-text { font-size: 16px; line-height: 1.55; min-height: 44px; }
.hud-dialog-next { text-align: right; font-size: 11px; color: var(--ink-soft); margin-top: 4px; }

/* panels */
.hud-panel-wrap {
  position: absolute;
  inset: 0;
  background: rgba(80, 60, 120, 0.25);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.hud-panel {
  width: min(620px, 100%);
  max-height: min(82vh, 700px);
  overflow-y: auto;
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(60, 40, 100, 0.35);
  padding: 22px 26px;
}
.hud-panel h2 { margin: 0 0 8px; display: flex; align-items: center; justify-content: space-between; }
.panel-hint { color: var(--ink-soft); font-size: 14px; margin: 0 0 14px; }
.panel-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* character panel */
.cp-layout { display: flex; gap: 20px; }
.cp-preview {
  flex: 0 0 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: linear-gradient(160deg, #e8f4ff, #ffe9f4);
  border-radius: 18px;
  padding: 10px;
  align-self: flex-start;
}
.cp-name { font-weight: 700; }
.cp-slots { flex: 1; min-width: 0; }
.cp-slot { margin-bottom: 12px; }
.cp-slot-label { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.cp-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.cp-choice, .cc-choice {
  position: relative;
  border: 2.5px solid transparent;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(120, 100, 180, 0.12);
  padding: 6px 9px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  transition: transform .1s;
}
.cp-choice:hover, .cc-choice:hover { transform: scale(1.07); }
.cp-choice.sel, .cc-choice.sel { border-color: var(--pink-deep); }
.cp-choice.locked { opacity: .45; cursor: not-allowed; }
.cp-swatch { display: block; width: 22px; height: 22px; border-radius: 50%; }
.cp-lock { position: absolute; bottom: -7px; right: -7px; font-size: 10px; background: #fff; border-radius: 8px; padding: 1px 4px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }

/* skills panel */
.sp-points {
  font-size: 13px;
  background: linear-gradient(135deg, var(--lav), var(--pink));
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
}
.sp-list { display: flex; flex-direction: column; gap: 10px; }
.sp-skill {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(120, 100, 180, 0.1);
  padding: 12px 14px;
}
.sp-icon { font-size: 26px; }
.sp-body { flex: 1; min-width: 0; }
.sp-name { font-weight: 700; }
.sp-desc { font-size: 13px; color: var(--ink-soft); }
.sp-pips { display: flex; gap: 4px; margin-top: 5px; }
.sp-pip { width: 18px; height: 7px; border-radius: 99px; background: #ece4f4; }
.sp-pip.on { background: linear-gradient(90deg, var(--blue), var(--pink)); }
.sp-up { min-width: 52px; }

/* worlds panel */
.wp-list { display: flex; flex-direction: column; gap: 10px; }
.wp-world {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(120, 100, 180, 0.1);
  padding: 12px 14px;
}
.wp-world.soon { opacity: .68; }
.wp-orb { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 3px 10px rgba(120,100,180,.25); flex: 0 0 38px; }
.wp-body { flex: 1; min-width: 0; }
.wp-name { font-weight: 700; }
.wp-tag { font-size: 13px; color: var(--ink-soft); }
.wp-here, .wp-soon { font-size: 12px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.wp-here { color: #51b06e; }

/* leaderboard panel */
.lb-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.lb-tab {
  border: 0;
  border-radius: 999px;
  background: #f1e9f8;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 16px;
  cursor: pointer;
  color: var(--ink-soft);
}
.lb-tab.on { background: linear-gradient(135deg, var(--pink), var(--pink-deep)); color: #fff; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 14px;
}
.lb-row:nth-child(odd) { background: rgba(255, 255, 255, 0.75); }
.lb-row.me { outline: 2px solid var(--pink); background: #fff0f7; }
.lb-rank { width: 38px; font-weight: 700; }
.lb-dot { display: block; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset -2px -3px 5px rgba(0,0,0,.12); }
.lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.lb-lvl { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.lb-score { font-weight: 700; color: var(--pink-deep); }
.lb-loading { text-align: center; color: var(--ink-soft); padding: 22px 0; font-weight: 600; }
.lb-me {
  margin-top: 12px;
  text-align: center;
  font-weight: 700;
  background: #fff;
  border-radius: 12px;
  padding: 9px;
  box-shadow: 0 3px 12px rgba(120, 100, 180, 0.1);
}

/* help panel */
.help-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 16px;
  margin: 14px 0;
  font-size: 14px;
  align-items: center;
}

/* toasts */
.hud-toasts {
  position: absolute;
  top: max(70px, calc(env(safe-area-inset-top) + 62px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none !important;
}
.hud-toast {
  background: var(--card);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 9px 20px;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  transform: translateY(-8px);
  transition: all .35s ease;
}
.hud-toast.show { opacity: 1; transform: translateY(0); }
.hud-toast.good { background: #eaffef; color: #2f9456; }
.hud-toast.bad { background: #ffe4ec; color: #c2356f; }

/* level up celebration */
.hud-levelup {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.6);
  text-align: center;
  opacity: 0;
  transition: all .45s cubic-bezier(.2, 1.6, .4, 1);
  pointer-events: none !important;
}
.hud-levelup.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.lv-burst { font-size: 64px; animation: spinPop 1.2s ease; }
.lv-title {
  font-size: 42px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink-deep), var(--lav), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 24px rgba(255, 255, 255, 0.6);
}
.lv-sub { font-weight: 700; color: var(--ink); background: var(--card); display: inline-block; border-radius: 999px; padding: 6px 16px; box-shadow: var(--shadow); }
@keyframes spinPop { 0% { transform: scale(0) rotate(-180deg); } 70% { transform: scale(1.25) rotate(10deg); } 100% { transform: scale(1); } }

/* world transition fade */
.hud-fade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, #fff 0%, #e8d8ff 100%);
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none !important;
}
.hud-fade.on { opacity: 1; }

/* chat dock */
.hud-chat {
  position: absolute;
  bottom: 16px;
  left: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: min(320px, 72vw);
}
.hud-chat-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 19px;
  cursor: pointer;
  transition: transform .12s;
}
.hud-chat-toggle:hover { transform: translateY(-2px) scale(1.06); }
.hud-chat-toggle.unread::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pink-deep);
  border: 2px solid #fff;
  animation: pulseDot 1.4s infinite;
}
.hud-chat-box {
  width: min(300px, 70vw);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hud-chat-log {
  max-height: 150px;
  overflow-y: auto;
  padding: 10px 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hud-chat-log:empty::before {
  content: 'no bubbles talking yet\2026 say hi!';
  color: var(--ink-soft);
  font-size: 12px;
}
.hud-chat-msg { font-size: 12.5px; line-height: 1.35; overflow-wrap: break-word; }
.hud-chat-msg b { color: var(--pink-deep); }
.hud-chat-msg.self b { color: #51a0c8; }
#hud-chat-form { display: flex; border-top: 1.5px solid rgba(120, 100, 180, 0.12); }
#hud-chat-input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
#hud-chat-form button {
  border: 0;
  background: transparent;
  font-size: 15px;
  cursor: pointer;
  padding: 0 12px;
  color: var(--pink-deep);
}

/* dialog close button */
.hud-dialog-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: rgba(120, 100, 180, 0.1);
  color: var(--ink-soft);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.hud-dialog-close:hover { background: rgba(120, 100, 180, 0.22); color: var(--ink); }

/* ------------------------------------------------- character creator -- */
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: linear-gradient(160deg, #ffe3f0, #e8f4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.cc-card {
  width: min(480px, 100%);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  text-align: center;
  max-height: 94vh;
  overflow-y: auto;
}
.cc-card h1 { margin: 0 0 2px; font-size: 26px; }
.cc-card p { margin: 0 0 10px; color: var(--ink-soft); font-size: 14px; }
#cc-canvas { margin: 0 auto; display: block; }
#cc-name {
  width: 100%;
  border: 2px solid #eee4f4;
  border-radius: 14px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  outline: none;
  margin: 8px 0 14px;
}
#cc-name:focus { border-color: var(--pink); }
.cc-rows { text-align: left; }
.cc-row { margin-bottom: 10px; }
.cc-row-label { font-weight: 700; font-size: 13px; display: block; margin-bottom: 5px; }
.cc-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.cc-hint { font-size: 12px !important; }
.cc-go { width: 100%; margin-top: 6px; }
.cc-error { color: #c2356f; font-weight: 600; font-size: 13px; min-height: 18px; margin-top: 8px; }

/* ------------------------------------------------------------- mobile -- */
@media (max-width: 640px) {
  .hud-xpbar { width: 96px; }
  .hud-btn { width: 40px; height: 40px; font-size: 17px; }
  .hud-quests { max-width: 150px; font-size: 11px; padding: 8px 10px; opacity: .92; }
  .cp-layout { flex-direction: column; }
  .cp-preview { align-self: center; }
  .hud-panel { padding: 16px; }
  .hud-prompt { bottom: 120px; }
  .hud-chat-log { max-height: 100px; }
  .hud-chat { bottom: 12px; }
}
