@font-face {
  font-family: 'BlackHanSans';
  src: url('/fonts/BlackHanSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gaegu';
  src: url('/fonts/Gaegu-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #3c2b38;
  --ink-soft: #6c5364;
  --cream: #fff9f4;
  --cream-2: #fdf0e6;
  --peach: #ff9a8b;
  --coral: #ff7a70;
  --mint: #84d9ba;
  --lavender: #b8a4ea;
  --gold: #ffd470;
  --outline: 2.5px solid #453240;
  --shadow-offset: 4px 4px 0px #453240;
  --shadow-lg: 6px 6px 0px #453240;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f5dce0;
  font-family: 'Gaegu', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  color: var(--ink);
  touch-action: none;
}

#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  cursor: grab;
}

#webgl-canvas:active {
  cursor: grabbing;
}

.hidden {
  display: none !important;
}

/* World Floating Labels & Speech Bubbles */
#world-labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.npc-nametag {
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(255, 250, 245, 0.92);
  border: 2px solid #453240;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 2px 2px 0px #453240;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.npc-nametag:hover {
  transform: translate(-50%, -108%) scale(1.06);
  background: #fff3c4;
}

.npc-nametag .role-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid #453240;
}

.world-speech-bubble {
  position: absolute;
  transform: translate(-50%, -100%);
  background: #fffdf9;
  border: 2.5px solid #453240;
  border-radius: 18px;
  padding: 8px 14px;
  width: max-content;
  min-width: 150px;
  max-width: 260px;
  word-break: keep-all;
  font-size: 16px;
  line-height: 1.3;
  color: var(--ink);
  box-shadow: 3px 4px 0px #453240;
  pointer-events: none;
  z-index: 14;
  animation: popIn 0.22s cubic-bezier(0.2, 1.3, 0.4, 1);
}

.world-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 9px 8px 0;
  border-style: solid;
  border-color: #453240 transparent transparent;
}

.world-speech-bubble b {
  display: block;
  font-family: 'BlackHanSans', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: #c9596e;
  margin-bottom: 2px;
}

.player-emoji-pop {
  position: absolute;
  transform: translate(-50%, -100%);
  background: #fffef8;
  border: 3px solid #453240;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 4px 4px 0px #453240;
  animation: emojiBounce 0.35s cubic-bezier(0.2, 1.5, 0.5, 1);
  z-index: 15;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translate(-50%, -80%) scale(0.7);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -100%) scale(1);
  }
}

@keyframes emojiBounce {
  0% { transform: translate(-50%, -60%) scale(0.3); }
  70% { transform: translate(-50%, -115%) scale(1.12); }
  100% { transform: translate(-50%, -100%) scale(1); }
}

/* Zone Title Banner (Messenger Style) */
.zone-banner {
  position: fixed;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 25;
  pointer-events: none;
  background: rgba(255, 250, 244, 0.94);
  border: var(--outline);
  border-radius: var(--radius-md);
  padding: 10px 28px 12px;
  box-shadow: var(--shadow-offset);
  animation: zoneSlide 3.4s ease forwards;
}

.zone-sub {
  font-family: 'BlackHanSans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #d0677a;
}

.zone-title {
  font-family: 'BlackHanSans', sans-serif;
  font-size: 28px;
  color: var(--ink);
  margin: 2px 0;
}

.zone-desc {
  font-size: 16px;
  color: var(--ink-soft);
}

@keyframes zoneSlide {
  0% { opacity: 0; transform: translate(-50%, -16px) scale(0.94); }
  12% { opacity: 1; transform: translate(-50%, 0px) scale(1); }
  82% { opacity: 1; transform: translate(-50%, 0px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -10px) scale(0.97); }
}

/* Top-Left HUD */
.hud-top-left {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.location-pill,
.stats-pill {
  background: var(--cream);
  border: var(--outline);
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: var(--shadow-offset);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
}

.location-pill {
  font-family: 'BlackHanSans', sans-serif;
  font-weight: 400;
  font-size: 17px;
}

.loc-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff7a70;
  border: 2px solid #453240;
}

.stats-pill {
  font-size: 16px;
  padding: 5px 14px;
  background: #fff5ea;
}

.stats-pill b {
  color: #d6556b;
  font-family: 'BlackHanSans', sans-serif;
  font-weight: 400;
}

.sep {
  opacity: 0.45;
}

/* Top-Right Side Buttons (Messenger Style) */
.side-buttons {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.side-btn {
  appearance: none;
  background: var(--cream);
  border: var(--outline);
  border-radius: 16px;
  padding: 8px 13px;
  box-shadow: var(--shadow-offset);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-family: 'BlackHanSans', sans-serif;
  font-size: 14px;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.side-btn:hover {
  background: #ffefc8;
  transform: translate(-1px, -2px);
  box-shadow: 5px 6px 0px #453240;
}

.side-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #453240;
}

.btn-icon {
  font-size: 18px;
  line-height: 1;
}

/* Bottom-Left Minimap */
.minimap-wrap {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 20;
  background: var(--cream);
  border: var(--outline);
  border-radius: 22px;
  padding: 8px;
  box-shadow: var(--shadow-offset);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.minimap-wrap:hover {
  transform: scale(1.03);
}

#minimap-canvas {
  display: block;
  border-radius: 15px;
  border: 2px solid #453240;
  background: #f4dfe1;
}

.minimap-caption {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* Nearby Interaction Prompt */
.interact-prompt {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  background: #fff9db;
  border: var(--outline);
  border-radius: 999px;
  padding: 8px 20px;
  box-shadow: var(--shadow-offset);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.key-badge {
  background: #ff7a70;
  color: #fff;
  font-family: 'BlackHanSans', sans-serif;
  font-size: 13px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 2px solid #453240;
}

/* Controls Hint Bar */
.controls-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 18;
  background: rgba(255, 249, 244, 0.92);
  border: var(--outline);
  border-radius: 999px;
  padding: 7px 20px;
  box-shadow: var(--shadow-offset);
  font-size: 16px;
  color: var(--ink);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.4s ease;
}

.controls-hint b {
  font-family: 'BlackHanSans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: #c95267;
}

/* Drawer Panels (Emoji & Residents) */
.drawer-panel {
  position: fixed;
  top: 74px;
  right: 18px;
  z-index: 30;
  background: var(--cream);
  border: var(--outline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  width: 350px;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  animation: popDrawer 0.18s ease-out;
}

.residents-drawer {
  width: 410px;
}

@keyframes popDrawer {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'BlackHanSans', sans-serif;
  font-size: 18px;
  padding-bottom: 10px;
  border-bottom: 2px dashed #dec8d2;
  margin-bottom: 12px;
}

.drawer-close {
  appearance: none;
  background: #ffe3de;
  border: 2px solid #453240;
  border-radius: 10px;
  width: 30px;
  height: 30px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}

.drawer-close:hover {
  background: #ff9a8b;
  color: #fff;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.emoji-cell {
  appearance: none;
  background: #fffdf9;
  border: 2px solid #453240;
  border-radius: 14px;
  padding: 8px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 2px 2px 0px #453240;
  transition: transform 0.1s ease, background 0.1s ease;
}

.emoji-cell:hover {
  background: #fff0be;
  transform: translateY(-2px);
}

.emoji-cell .emo-char {
  font-size: 24px;
}

.emoji-cell .emo-key {
  font-family: 'BlackHanSans', sans-serif;
  font-size: 11px;
  color: var(--ink-soft);
}

/* Residents & Props Tabs */
.drawer-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.tab-btn {
  flex: 1;
  appearance: none;
  background: #f5e5dc;
  border: 2px solid #453240;
  border-radius: 12px;
  padding: 7px 10px;
  font-family: 'BlackHanSans', sans-serif;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
}

.tab-btn.active {
  background: #ff9a8b;
  color: #fff;
  box-shadow: 2px 2px 0px #453240;
}

.tab-content {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  max-height: 460px;
}

.resident-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffdf9;
  border: 2px solid #453240;
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 2px 2px 0px #453240;
}

.resident-item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #453240;
  background: #fff;
}

.resident-meta {
  flex: 1;
  min-width: 0;
}

.resident-meta .r-title {
  font-family: 'BlackHanSans', sans-serif;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.resident-meta .r-sub {
  font-size: 14px;
  color: var(--ink-soft);
}

.resident-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-btn {
  appearance: none;
  background: #ffe8c2;
  border: 1.5px solid #453240;
  border-radius: 9px;
  padding: 4px 8px;
  font-family: 'BlackHanSans', sans-serif;
  font-size: 11px;
  cursor: pointer;
  color: var(--ink);
}

.mini-btn:hover {
  background: #ffd470;
}

/* Modal Backdrop & Cards */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(45, 30, 42, 0.52);
  backdrop-filter: blur(4px);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--cream);
  border: var(--outline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px 26px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.badge-tag {
  display: inline-block;
  background: #ffd470;
  border: 2px solid #453240;
  border-radius: 999px;
  padding: 2px 10px;
  font-family: 'BlackHanSans', sans-serif;
  font-size: 11px;
  margin-bottom: 4px;
}

.modal-header h2 {
  font-family: 'BlackHanSans', sans-serif;
  font-weight: 400;
  font-size: 26px;
  margin: 0;
}

.modal-desc {
  margin: 0 0 14px;
  font-size: 17px;
  color: var(--ink-soft);
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.char-card {
  background: #fffdf9;
  border: 2.5px solid #453240;
  border-radius: 18px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  box-shadow: 3px 3px 0px #453240;
  transition: transform 0.14s ease, background 0.14s ease;
}

.char-card:hover {
  transform: translateY(-3px);
  background: #fff6db;
}

.char-card.selected {
  background: #ffe0d8;
  border-color: #d6455d;
  box-shadow: 4px 4px 0px #d6455d;
}

.char-card img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid #453240;
  background: #fff;
}

.char-card .c-name {
  font-family: 'BlackHanSans', sans-serif;
  font-size: 15px;
  margin-top: 6px;
}

.char-card .c-job {
  font-size: 14px;
  color: var(--ink-soft);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 2px dashed #dec8d2;
  padding-top: 14px;
}

.selected-char-info {
  font-size: 17px;
}

.primary-btn {
  appearance: none;
  background: linear-gradient(180deg, #ff9a8b 0%, #ff756b 100%);
  border: var(--outline);
  border-radius: 999px;
  padding: 11px 24px;
  color: #fff;
  font-family: 'BlackHanSans', sans-serif;
  font-size: 17px;
  cursor: pointer;
  box-shadow: var(--shadow-offset);
}

.primary-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Map Modal */
.map-card {
  max-width: 920px;
}

.map-body {
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 18px;
  align-items: start;
}

#big-map-canvas {
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: var(--outline);
  box-shadow: var(--shadow-offset);
  cursor: crosshair;
  background: #f4dfe1;
}

.map-sidebar h3 {
  font-family: 'BlackHanSans', sans-serif;
  font-weight: 400;
  font-size: 18px;
  margin: 0 0 6px;
}

.map-tip {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.zone-teleport-list,
.npc-teleport-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.tp-btn {
  appearance: none;
  background: #fffdf9;
  border: 2px solid #453240;
  border-radius: 12px;
  padding: 7px 10px;
  text-align: left;
  font-family: 'Gaegu', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0px #453240;
  transition: background 0.12s ease, transform 0.12s ease;
}

.tp-btn:hover {
  background: #ffefc2;
  transform: translateY(-1px);
}

/* Messenger-Style Dialogue Box */
.dialog-box {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  width: min(740px, calc(100vw - 32px));
  background: var(--cream);
  border: 3px solid #453240;
  border-radius: 26px;
  box-shadow: 6px 7px 0px #453240;
  padding: 16px 20px;
  display: flex;
  gap: 18px;
  align-items: center;
  animation: dialogPop 0.2s cubic-bezier(0.2, 1.3, 0.4, 1);
}

@keyframes dialogPop {
  from { opacity: 0; transform: translate(-50%, 24px) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.dialog-portrait-wrap {
  flex-shrink: 0;
  width: 106px;
  height: 106px;
  border-radius: 20px;
  border: 2.5px solid #453240;
  background: #fff;
  overflow: hidden;
  box-shadow: 3px 3px 0px #453240;
}

.dialog-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialog-content {
  flex: 1;
  min-width: 0;
}

.dialog-top-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.dialog-name {
  font-family: 'BlackHanSans', sans-serif;
  font-size: 22px;
  color: var(--ink);
}

.dialog-role {
  font-size: 16px;
  font-weight: 700;
  color: #c9596e;
}

.dialog-text {
  font-size: 21px;
  line-height: 1.38;
  min-height: 54px;
  color: var(--ink);
  margin-bottom: 10px;
}

.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.dialog-btn {
  appearance: none;
  border: 2px solid #453240;
  border-radius: 999px;
  padding: 6px 15px;
  font-family: 'BlackHanSans', sans-serif;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 2px 2px 0px #453240;
}

.dialog-btn.primary {
  background: #ff8577;
  color: #fff;
}

.dialog-btn.secondary {
  background: #ffe8a3;
  color: var(--ink);
}

.dialog-btn.ghost {
  background: #f3e6df;
  color: var(--ink-soft);
}

/* Intro Title Screen Overlay */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at center, rgba(255, 240, 236, 0.25) 0%, rgba(55, 36, 49, 0.45) 100%);
  transition: opacity 0.55s ease;
}

.intro-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.intro-card {
  width: min(680px, 95vw);
  background: rgba(255, 250, 245, 0.95);
  border: 3px solid #453240;
  border-radius: 32px;
  padding: 26px 28px 22px;
  box-shadow: 8px 10px 0px #453240;
  text-align: center;
}

.intro-badge {
  display: inline-block;
  background: #ffe299;
  border: 2px solid #453240;
  border-radius: 999px;
  padding: 4px 14px;
  font-family: 'BlackHanSans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink);
  box-shadow: 2px 2px 0px #453240;
}

.intro-title {
  font-family: 'BlackHanSans', sans-serif;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 50px);
  margin: 12px 0 6px;
  color: var(--ink);
  text-shadow: 3px 3px 0px #ffd4c4;
}

.intro-subtitle {
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.intro-picker-section {
  background: #fffdf9;
  border: 2.5px solid #453240;
  border-radius: 22px;
  padding: 12px 14px;
  margin-bottom: 18px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

.intro-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.intro-picker-header strong {
  font-family: 'BlackHanSans', sans-serif;
  font-weight: 400;
  color: #d64f66;
  font-size: 17px;
}

.intro-char-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.intro-char-btn {
  appearance: none;
  background: #fff8f2;
  border: 2px solid #453240;
  border-radius: 14px;
  padding: 6px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: transform 0.12s ease, background 0.12s ease;
}

.intro-char-btn:hover {
  transform: translateY(-2px);
  background: #fff2cc;
}

.intro-char-btn.active {
  background: #ffd9d2;
  border-color: #d4435c;
  box-shadow: 2px 3px 0px #d4435c;
}

.intro-char-btn img {
  width: 54px;
  height: 54px;
  border-radius: 11px;
  object-fit: cover;
  border: 1.5px solid #453240;
  background: #fff;
}

.intro-char-btn span {
  font-family: 'BlackHanSans', sans-serif;
  font-size: 12px;
  color: var(--ink);
}

.begin-btn {
  appearance: none;
  width: 100%;
  background: linear-gradient(180deg, #ff9685 0%, #ff6f69 100%);
  border: 3px solid #453240;
  border-radius: 999px;
  padding: 14px 28px;
  font-family: 'BlackHanSans', sans-serif;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
  box-shadow: 5px 6px 0px #453240;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.begin-btn:disabled {
  background: #d8c7c8;
  cursor: wait;
  color: #6f5d66;
}

.begin-btn:not(:disabled):hover {
  filter: brightness(1.05);
  transform: translate(-1px, -2px);
  box-shadow: 6px 8px 0px #453240;
}

.intro-footer {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* Mobile Controls */
.mobile-controls {
  position: fixed;
  inset: auto 0 24px 0;
  z-index: 25;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 24px;
}

.joystick-zone {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 250, 245, 0.75);
  border: 3px solid #453240;
  box-shadow: 4px 4px 0px #453240;
  position: relative;
  pointer-events: auto;
}

.joystick-knob {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ff8577;
  border: 2.5px solid #453240;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -24px;
  margin-top: -24px;
  box-shadow: 2px 2px 0px #453240;
}

.mobile-actions {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.mob-btn {
  appearance: none;
  background: var(--cream);
  border: 2.5px solid #453240;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  font-family: 'BlackHanSans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  box-shadow: 3px 4px 0px #453240;
}

@media (max-width: 780px) {
  .controls-hint {
    display: none;
  }
  .minimap-wrap {
    display: none;
  }
  .map-body {
    grid-template-columns: 1fr;
  }
  .char-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .btn-label {
    display: none;
  }
}
