:root {
  --bg-dark: rgba(24, 18, 12, 0.86);
  --bg-card: rgba(38, 27, 18, 0.94);
  --border-gold: #e6b84d;
  --accent-gold: #ffd166;
  --accent-red: #d63a2f;
  --accent-green: #2c9c5a;
  --accent-river: #1b88b8;
  --text-main: #fff8eb;
  --text-muted: #d8c6a8;
  --shadow-strong: 0 12px 32px rgba(0, 0, 0, 0.55);
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #1a241e;
  color: var(--text-main);
}

input {
  user-select: text;
  -webkit-user-select: text;
}

.hidden {
  display: none !important;
}

#canvas-container {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.floating-labels-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.floating-label {
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(25, 18, 12, 0.82);
  border: 1px solid rgba(255, 209, 102, 0.65);
  color: #fff6e0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.floating-speech {
  position: absolute;
  transform: translate(-50%, -120%);
  background: #fffdf5;
  color: #2b1d0e;
  border: 2px solid #d97706;
  padding: 6px 11px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  max-width: 240px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: radial-gradient(circle, rgba(16, 86, 118, 0.92), rgba(8, 36, 54, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeWave 0.6s ease;
}

.transition-text {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}

@keyframes fadeWave {
  0% { opacity: 0; }
  45% { opacity: 1; }
  100% { opacity: 0.95; }
}

.community-toast-container {
  position: fixed;
  top: calc(var(--hud-offset, 58px) + 32px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  width: min(92vw, 560px);
}

.community-toast {
  background: linear-gradient(90deg, rgba(35, 23, 12, 0.92), rgba(68, 43, 16, 0.92), rgba(35, 23, 12, 0.92));
  border: 1.5px solid var(--border-gold);
  color: #fff6dc;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  animation: slideDownToast 0.3s ease;
}

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

.screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: radial-gradient(circle at 65% 38%, rgba(18, 14, 10, 0.25), rgba(12, 9, 6, 0.82));
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 24px;
  overflow-y: auto;
}

.boot-card {
  width: min(96vw, 540px);
  max-height: 94vh;
  overflow-y: auto;
  background: rgba(24, 17, 11, 0.92);
  border: 2px solid var(--border-gold);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: var(--shadow-strong);
  text-align: center;
  backdrop-filter: blur(8px);
}

.boot-banner {
  display: inline-block;
  background: linear-gradient(90deg, #b91c1c, #d97706, #b91c1c);
  color: #fff9db;
  font-weight: 800;
  font-size: 11.5px;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.boot-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--accent-gold);
  margin-bottom: 3px;
}

.boot-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.boot-section {
  text-align: left;
}

.form-group {
  margin-bottom: 10px;
}

.customizer-row {
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.customizer-row.focused-row {
  border-color: rgba(250, 204, 21, 0.65);
  background: rgba(250, 204, 21, 0.07);
}

.customizer-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #ffdf8e;
  margin-bottom: 4px;
}

.customizer-label-row label {
  margin-bottom: 0;
}

.customizer-sub-desc {
  font-size: 11.5px;
  color: #fde68a;
  font-weight: 600;
}

.carousel-nav-btns {
  display: flex;
  gap: 5px;
}

.btn-mini-arrow {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid #b48a4e;
  color: #fef08a;
  border-radius: 7px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.btn-mini-arrow:hover {
  background: rgba(250, 204, 21, 0.28);
}

.name-input-row {
  display: flex;
  gap: 8px;
}

.name-input-row input,
#prof-edit-name,
.code-input {
  flex: 1;
  width: 100%;
  background: rgba(15, 11, 7, 0.88);
  border: 1.5px solid #8c6b3f;
  border-radius: 10px;
  color: #fff;
  padding: 8px 11px;
  font-size: 14.5px;
  font-weight: 700;
}

.code-input {
  text-transform: uppercase;
  letter-spacing: 1.2px;
  text-align: center;
}

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

.hairstyle-grid,
.outfit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.gender-card,
.hairstyle-card,
.outfit-card {
  background: rgba(24, 17, 11, 0.88);
  border: 1.5px solid #785a32;
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  transition: all 0.14s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.gender-card:hover,
.hairstyle-card:hover,
.outfit-card:hover {
  border-color: var(--accent-gold);
  background: rgba(58, 39, 19, 0.9);
}

.gender-card.active,
.gender-card.selected,
.hairstyle-card.active,
.hairstyle-card.selected,
.outfit-card.active,
.outfit-card.selected {
  background: rgba(217, 119, 6, 0.34);
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.28);
}

.outfit-card-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff4d6;
  margin-bottom: 0;
  line-height: 1.25;
}

.outfit-card-desc {
  display: none !important;
}

.hud-customize-tag {
  font-size: 11px;
  color: #fde047;
  font-weight: 800;
}

.boot-bonus-note {
  background: rgba(44, 156, 90, 0.18);
  border: 1px dashed #4ade80;
  color: #d1fae5;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 10px;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1f1305;
  border: none;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

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

.btn-giant {
  width: 100%;
  padding: 13px 20px;
  font-size: 17px;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.42);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffe8b3;
  border: 1px solid #9c7a44;
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.boot-sub-links {
  margin-top: 12px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-link {
  background: none;
  border: none;
  color: #fcd34d;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.returning-greeting {
  font-size: 19px;
  font-weight: 800;
  color: #fde68a;
  text-align: center;
  margin-bottom: 8px;
}

.returning-stats {
  background: rgba(15, 11, 7, 0.72);
  border: 1px solid #785c38;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: #f3e8d2;
  margin-bottom: 14px;
  text-align: center;
  line-height: 1.5;
}

.recover-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.error-banner {
  margin-top: 12px;
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid #f87171;
  color: #fecaca;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.hud-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(180deg, rgba(20, 14, 8, 0.94), rgba(20, 14, 8, 0.72));
  border-bottom: 1.5px solid rgba(230, 184, 77, 0.55);
  backdrop-filter: blur(6px);
  flex-wrap: nowrap;
  white-space: nowrap;
}

.hud-left,
.hud-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-shrink: 0;
}

.hud-pill {
  background: rgba(38, 27, 16, 0.92);
  border: 1px solid rgba(230, 184, 77, 0.55);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12.5px;
  color: #fff6e0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  white-space: nowrap;
}

#hud-name {
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.hud-pill-clickable {
  cursor: pointer;
  font-weight: 700;
}

.hud-pill-clickable:hover {
  border-color: var(--accent-gold);
  background: rgba(65, 45, 24, 0.95);
}

.hud-badge {
  background: #d97706;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.hud-sub-merit {
  font-size: 11.5px;
  color: #fcd34d;
}

.hud-pill-money strong {
  color: #4ade80;
}

.hud-pill-buff {
  background: rgba(217, 119, 6, 0.32);
  border-color: #fbbf24;
  color: #fef08a;
  font-weight: 700;
}

.hud-btn {
  background: rgba(52, 36, 20, 0.92);
  border: 1px solid rgba(230, 184, 77, 0.6);
  color: #ffefc2;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.hud-btn:hover {
  background: rgba(84, 58, 30, 0.96);
}

.audio-dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.audio-caret {
  font-size: 10px;
  opacity: 0.85;
}

.audio-dropdown-menu {
  position: fixed;
  top: 46px;
  right: 12px;
  z-index: 120;
  min-width: 220px;
  background: rgba(24, 16, 9, 0.97);
  border: 1.5px solid var(--accent-gold);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.78);
  display: flex;
  flex-direction: column;
  gap: 5px;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.audio-dropdown-item {
  width: 100%;
  background: rgba(45, 31, 18, 0.9);
  border: 1px solid rgba(230, 184, 77, 0.35);
  border-radius: 9px;
  padding: 8px 10px;
  color: #fff6e0;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: all 0.14s ease;
}

.audio-dropdown-item:hover {
  border-color: var(--accent-gold);
  background: rgba(72, 50, 27, 0.95);
}

.audio-dropdown-item.active {
  border-color: #4ade80;
  background: rgba(22, 101, 52, 0.32);
}

.audio-dropdown-item.active .audio-item-meta strong {
  color: #4ade80;
}

.audio-dropdown-item:not(.active) .audio-item-meta strong {
  color: #f87171;
}

.audio-item-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
}

.scene-ui {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.market-shortcuts-bar {
  position: fixed;
  top: var(--hud-offset, 48px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  flex-wrap: nowrap;
  white-space: nowrap;
  justify-content: center;
  pointer-events: auto;
  padding: 4px 8px;
  max-width: 99vw;
}

.shortcut-chip {
  background: rgba(28, 20, 12, 0.86);
  border: 1px solid rgba(230, 184, 77, 0.55);
  color: #ffe8b0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.shortcut-chip .chip-short {
  display: none;
}

.shortcut-chip:hover {
  background: #d97706;
  color: #1c1208;
}

.context-action-wrap {
  position: fixed;
  bottom: 112px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
  z-index: 25;
}

.btn-context-action {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  border: 2px solid #fef08a;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(234, 88, 12, 0.65);
  animation: pulseAction 1.3s infinite ease-in-out;
}

@keyframes pulseAction {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.market-bottom-bar {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

.joystick-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.joystick-base {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(25, 18, 10, 0.68);
  border: 2px solid rgba(255, 209, 102, 0.65);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.joystick-stick {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd166, #d97706);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  position: absolute;
}

.controls-hint {
  background: rgba(22, 16, 10, 0.78);
  border: 1px solid rgba(255, 209, 102, 0.4);
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12px;
  color: #f3e5c8;
  max-width: 240px;
}

.btn-river-shortcut {
  pointer-events: auto;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  border: 2px solid #7dd3fc;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.55);
}

.btn-river-shortcut.highlight {
  background: linear-gradient(135deg, #10b981, #0284c7);
  border-color: #fef08a;
  animation: pulseAction 1.3s infinite ease-in-out;
}

.stall-overlay {
  position: fixed;
  inset: var(--hud-offset, 48px) 0 0 0;
  z-index: 28;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 14px 10px;
  pointer-events: none;
}

.stall-top-bar {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  flex-wrap: wrap;
}

.btn-back-market {
  background: rgba(24, 16, 10, 0.88);
  border: 1.5px solid var(--border-gold);
  color: #fff4d4;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.stall-Location-badge {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(180, 83, 9, 0.86);
  border: 1.5px solid #fde68a;
  color: #fffbeb;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}

.stall-wallet,
.stall-wallet-pill {
  display: none !important;
}

.stall-dialogue-bubble {
  align-self: center;
  width: min(94vw, 660px);
  background: rgba(24, 16, 9, 0.82);
  backdrop-filter: blur(6px);
  color: #fffbeb;
  border: 1.5px solid rgba(251, 191, 36, 0.78);
  border-radius: 13px;
  padding: 6px 13px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  margin-bottom: auto;
  margin-top: 4px;
}

.npc-avatar-tag {
  font-size: 11.5px;
  font-weight: 900;
  color: #fde047;
  margin-bottom: 2px;
}

.stall-dialogue-bubble p {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff7e6;
}

.stall-bottom-card {
  align-self: center;
  width: min(96vw, 770px);
  background: rgba(24, 16, 10, 0.84);
  backdrop-filter: blur(7px);
  border: 1.5px solid var(--border-gold);
  border-radius: 15px;
  padding: 8px 12px;
  box-shadow: var(--shadow-strong);
  pointer-events: auto;
}

.stall-card-header {
  font-size: 11.5px;
  font-weight: 800;
  color: #fde68a;
  margin-bottom: 6px;
}

.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 6px;
  margin-bottom: 7px;
}

.species-card {
  background: rgba(14, 10, 6, 0.82);
  border: 1.5px solid #6b5335;
  border-radius: 10px;
  padding: 5px 8px;
  cursor: pointer;
  transition: all 0.14s ease;
  text-align: left;
}

.species-card:hover {
  border-color: var(--accent-gold);
}

.species-card.active {
  background: rgba(217, 119, 6, 0.32);
  border-color: #ffd166;
  box-shadow: 0 0 0 1.5px rgba(255, 209, 102, 0.32);
}

.species-card-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #fff6dc;
}

.species-card-meta {
  font-size: 11px;
  color: #4ade80;
  font-weight: 700;
  margin-top: 1px;
}

.species-card-merit {
  font-size: 10.5px;
  color: #fcd34d;
  margin-top: 1px;
}

.stall-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
}

.btn-qty {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border-gold);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.qty-value {
  min-width: 60px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--accent-gold);
}

.stall-cost-summary {
  font-size: 13.5px;
}

.stall-cost-summary strong {
  color: #4ade80;
  font-size: 15px;
}

.merit-preview {
  font-size: 12px;
  color: #fcd34d;
  margin-left: 5px;
}

.stall-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stall-action-buttons-3 {
  grid-template-columns: 1.2fr 1.15fr 0.95fr;
}

.btn-buy-action {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  border: 1.5px solid #86efac;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}

.btn-beg-action {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}

.btn-haggle-action {
  background: linear-gradient(135deg, #be123c, #881337);
  color: #fff;
  border: 1.5px solid #fda4af;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.btn-buy-action:hover,
.btn-beg-action:hover,
.btn-haggle-action:hover {
  filter: brightness(1.1);
}

.stall-river-cta {
  margin-top: 7px;
}

.btn-river-giant {
  width: 100%;
  background: linear-gradient(90deg, #0284c7, #10b981, #0284c7);
  color: #fff;
  border: 1.5px solid #fef08a;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(16, 185, 129, 0.5);
}

.riverbank-ui {
  position: fixed;
  inset: var(--hud-offset, 56px) 0 0 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 26px;
  pointer-events: none;
}

.riverbank-banner {
  background: rgba(12, 54, 78, 0.88);
  border: 1.5px solid #7dd3fc;
  color: #e0f2fe;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.riverbank-inventory-box {
  margin-top: auto;
  margin-bottom: 12px;
  background: rgba(18, 28, 36, 0.88);
  border: 1px solid #93c5fd;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
}

.riverbank-action-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  pointer-events: auto;
}

.btn-release-choice {
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  border: 2px solid #fff;
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.btn-choice-fish {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #7dd3fc;
}

.btn-choice-bird {
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-color: #86efac;
}

.btn-choice-back {
  background: rgba(42, 30, 18, 0.92);
  border-color: var(--border-gold);
}

.cutscene-ui {
  position: fixed;
  inset: var(--hud-offset, 56px) 0 0 0;
  z-index: 28;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 28px;
  pointer-events: none;
}

.cutscene-top-info {
  background: rgba(16, 40, 56, 0.88);
  border: 1.5px solid #7dd3fc;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.creature-thank-bubble {
  background: #fffef7;
  color: #1f1408;
  border: 3px solid #f59e0b;
  border-radius: 18px;
  padding: 13px 20px;
  max-width: 520px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  animation: popBubble 0.35s ease;
}

.creature-thank-title {
  font-size: 13px;
  font-weight: 900;
  color: #b45309;
  margin-bottom: 4px;
}

.creature-thank-text {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

@keyframes popBubble {
  0% { transform: scale(0.75); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.merit-flyup-banner {
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.95), rgba(180, 83, 9, 0.95), rgba(120, 53, 15, 0.95));
  border: 2px solid #fde047;
  border-radius: 16px;
  padding: 12px 24px;
  text-align: center;
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.55);
  animation: floatUpMerit 0.45s ease;
}

.merit-flyup-main {
  font-size: 20px;
  font-weight: 900;
  color: #fef08a;
}

.merit-flyup-sub {
  font-size: 13.5px;
  color: #fffbeb;
  margin-top: 4px;
}

@keyframes floatUpMerit {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cutscene-trigger-wrap {
  pointer-events: auto;
  text-align: center;
}

.cutscene-trigger-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-trigger-release {
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  color: #fff;
  border: 3px solid #fef08a;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.6);
  animation: pulseAction 1.2s infinite ease-in-out;
}

.btn-trigger-release-all {
  background: linear-gradient(135deg, #0284c7, #10b981);
  border-color: #fde047;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.65);
}

.kbd-hint {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 5px;
  margin-left: 3px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 240, 180, 0.55);
  color: #fef08a;
  vertical-align: middle;
}

.noodle-scene-dialogues {
  align-self: center;
  width: min(94vw, 680px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 3px;
  margin-bottom: auto;
  pointer-events: auto;
}

.noodle-owner-bubble {
  margin: 0;
  width: 100%;
  padding: 5px 12px;
}

.noodle-gossip-box {
  background: rgba(20, 14, 9, 0.78);
  backdrop-filter: blur(5px);
  border: 1px dashed #fbbf24;
  border-radius: 10px;
  padding: 4px 11px;
  color: #fef3c7;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.gossip-header {
  font-size: 10.5px;
  font-weight: 900;
  color: #fbbf24;
  margin-bottom: 1px;
}

.noodle-gossip-box p {
  font-size: 12px;
  font-weight: 700;
  color: #fffbeb;
  line-height: 1.25;
}

.noodle-condiment-status {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.condiment-badge {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(250, 204, 21, 0.55);
  color: #fef08a;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}

.noodle-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 6px;
  margin-bottom: 7px;
}

.btn-noodle-action {
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  transition: transform 0.1s ease, filter 0.12s ease;
}

.btn-noodle-action:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-noodle-call {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.btn-noodle-lime {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.btn-noodle-chili {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

.btn-noodle-sauce {
  background: linear-gradient(135deg, #ea580c, #b45309);
}

.btn-noodle-chat {
  background: linear-gradient(135deg, #9333ea, #6b21a8);
}

.grocery-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn-grocery-mi {
  background: linear-gradient(135deg, #ea580c, #c2410c);
}

.btn-grocery-keo {
  background: linear-gradient(135deg, #db2777, #9d174d);
}

.btn-grocery-suachua {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}

.btn-grocery-thitho {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

.btn-grocery-daphinh {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.btn-grocery-drama {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.btn-grocery-fortune {
  background: linear-gradient(135deg, #4f46e5, #3730a3);
}

.btn-grocery-lottery {
  background: linear-gradient(135deg, #ca8a04, #a16207);
}

.cutscene-hint {
  margin-top: 8px;
  font-size: 13px;
  color: #e0f2fe;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.cutscene-next-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  pointer-events: auto;
}

.btn-next-action {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  border: 1.5px solid #fff;
}

.btn-next-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #a7f3d0;
}

.btn-next-secondary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #7dd3fc;
}

.btn-next-back {
  background: rgba(38, 27, 18, 0.94);
  border-color: var(--border-gold);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10, 7, 4, 0.76);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: min(95vw, 540px);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 2px solid var(--border-gold);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow-strong);
}

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

.modal-header h2 {
  font-size: 20px;
  color: var(--accent-gold);
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid #8c6b3f;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.stat-box {
  background: rgba(18, 13, 8, 0.8);
  border: 1px solid #6b5335;
  border-radius: 10px;
  padding: 8px 11px;
}

.stat-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
}

.stat-val {
  font-size: 15px;
  color: #fff;
}

.stat-val.gold {
  color: #fde047;
}

.recovery-box {
  background: rgba(217, 119, 6, 0.16);
  border: 1.5px dashed var(--border-gold);
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 14px;
}

.recovery-title {
  font-size: 13px;
  font-weight: 800;
  color: #fde68a;
  margin-bottom: 6px;
}

.recovery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.recovery-code-display {
  background: rgba(12, 9, 5, 0.9);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
  color: #4ade80;
  letter-spacing: 1px;
}

.recovery-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

.modal-divider {
  border: none;
  border-top: 1px solid rgba(230, 184, 77, 0.3);
  margin: 12px 0;
}

.shop-npc-greeting {
  background: rgba(255, 250, 235, 0.95);
  color: #291807;
  border: 2px solid #d97706;
  border-radius: 12px;
  padding: 10px 13px;
  margin-bottom: 12px;
}

.shop-npc-greeting strong {
  color: #b45309;
  font-size: 13px;
}

.shop-npc-greeting p {
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 3px;
}

.shop-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.shop-item-row {
  background: rgba(18, 13, 8, 0.85);
  border: 1px solid #6b5335;
  border-radius: 11px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.shop-item-info h4 {
  font-size: 14px;
  color: #fff6dc;
}

.shop-item-info p {
  font-size: 12px;
  color: #fcd34d;
  margin-top: 2px;
}

.rumor-feed-item,
.leaderboard-item {
  background: rgba(18, 13, 8, 0.82);
  border: 1px solid #5c462c;
  border-radius: 10px;
  padding: 8px 11px;
  margin-bottom: 7px;
  font-size: 13px;
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.floating-label-clickable {
  border-color: #facc15;
  box-shadow: 0 2px 10px rgba(250, 204, 21, 0.35);
}

.floating-peer-label {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(125, 211, 252, 0.55);
  color: #e0f2fe;
  font-size: 11px;
}

button,
.shortcut-chip,
.species-card,
.outfit-card,
.gender-card,
.hairstyle-card,
.hud-pill-clickable,
.audio-dropdown-item {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 1620px) {
  .hud-customize-tag {
    display: none;
  }
  .hud-carry-unit {
    display: none;
  }
  #hud-name {
    max-width: 145px;
  }
}

@media (max-width: 1440px) {
  .hud-label-text {
    display: none;
  }
  #hud-name {
    max-width: 130px;
  }
  .hud-bar {
    padding: 6px 10px;
    gap: 5px;
  }
  .hud-left,
  .hud-right {
    gap: 5px;
  }
  .hud-pill {
    padding: 4px 9px;
    font-size: 12px;
  }
  .hud-btn {
    padding: 5px 9px;
    font-size: 12px;
  }
}

@media (max-width: 1180px) {
  .hud-bar .kbd-hint {
    display: none;
  }
  #hud-name {
    max-width: 110px;
  }
  .shortcut-chip .chip-full {
    display: none;
  }
  .shortcut-chip .chip-short {
    display: inline;
  }
  .shortcut-chip {
    padding: 4px 9px;
    font-size: 11.5px;
  }
}

@media (max-width: 960px) {
  .stall-Location-badge {
    display: none;
  }
}

@media (max-width: 920px) {
  .hud-btn-label {
    display: none;
  }
  .hud-sub-merit {
    display: none;
  }
  #hud-name {
    max-width: 92px;
  }
  .hud-pill,
  .hud-btn {
    padding: 4px 8px;
    font-size: 11.5px;
  }
}

@media (max-height: 800px) {
  .boot-card {
    padding: 14px 16px;
    max-height: 94vh;
    overflow-y: auto;
  }
  .boot-title {
    font-size: 22px;
  }
  .outfit-grid,
  .hairstyle-grid,
  .gender-grid {
    gap: 6px;
    margin-bottom: 8px;
  }
  .outfit-card,
  .hairstyle-card,
  .gender-card {
    padding: 7px 9px;
  }
  .stall-overlay {
    padding: 6px 12px 10px;
  }
  .stall-dialogue-bubble {
    padding: 7px 13px;
    margin-top: 4px;
  }
  .stall-dialogue-bubble p {
    font-size: 13px;
    line-height: 1.3;
  }
  .noodle-scene-dialogues {
    gap: 5px;
    margin-top: 4px;
  }
  .noodle-gossip-box {
    padding: 6px 11px;
  }
  .noodle-gossip-box p {
    font-size: 12.5px;
  }
  .stall-bottom-card {
    padding: 10px 13px;
    max-height: 52vh;
    overflow-y: auto;
  }
  .stall-card-header {
    font-size: 12px;
    margin-bottom: 6px;
  }
  .species-grid {
    gap: 6px;
    margin-bottom: 8px;
  }
  .species-card {
    padding: 6px 8px;
  }
  .species-card-name {
    font-size: 12.5px;
  }
  .stall-controls-row {
    margin-bottom: 8px;
  }
  .btn-buy-action,
  .btn-beg-action {
    padding: 9px 12px;
    font-size: 13.5px;
  }
  .noodle-condiment-status {
    margin-bottom: 6px;
    gap: 5px;
  }
  .condiment-badge {
    padding: 3px 9px;
    font-size: 11.5px;
  }
  .noodle-actions-grid,
  .grocery-actions-grid {
    gap: 6px;
    margin-bottom: 7px;
  }
  .btn-noodle-action {
    padding: 7px 10px;
    font-size: 12.5px;
  }
  .btn-river-giant {
    padding: 9px 14px;
    font-size: 14px;
  }
}

@media (max-width: 768px), (pointer: coarse) {
  .kbd-hint {
    display: none !important;
  }
  .controls-hint {
    display: none;
  }
}

@media (max-width: 768px) {
  .hud-bar {
    padding: 5px 6px;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hud-bar::-webkit-scrollbar {
    display: none;
  }
  .hud-left,
  .hud-right {
    gap: 4px;
    flex-wrap: nowrap;
    flex-shrink: 0;
  }
  .hud-pill-carrying {
    display: none;
  }
  .hud-buff-short {
    display: none;
  }
  #hud-name {
    max-width: 78px;
  }
  .hud-pill {
    padding: 4px 7px;
    font-size: 11px;
    gap: 4px;
  }
  .hud-badge {
    font-size: 10px;
    padding: 1px 5px;
  }
  .hud-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
  .audio-dropdown-menu {
    right: 8px;
    min-width: 205px;
  }
  .market-shortcuts-bar {
    width: 98vw;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 3px 6px;
    gap: 4px;
  }
  .market-shortcuts-bar::-webkit-scrollbar {
    display: none;
  }
  .shortcut-chip {
    flex: 0 0 auto;
    font-size: 11px;
    padding: 4px 9px;
  }
  .context-action-wrap {
    bottom: 100px;
    width: 92vw;
    text-align: center;
  }
  .btn-context-action {
    font-size: 14px;
    padding: 10px 16px;
    max-width: 92vw;
  }
  .market-bottom-bar {
    bottom: 10px;
    left: 10px;
    right: 10px;
  }
  .joystick-base {
    width: 78px;
    height: 78px;
  }
  .joystick-stick {
    width: 34px;
    height: 34px;
  }
  .btn-river-shortcut {
    padding: 10px 13px;
    font-size: 13px;
  }
  .outfit-grid,
  .hairstyle-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }
  .boot-screen {
    justify-content: center;
    padding: 6px;
  }
  .boot-card {
    width: 96vw;
    max-height: 92vh;
    padding: 11px 12px;
  }
  .stall-overlay {
    padding: 6px 8px 8px;
  }
  .stall-top-bar {
    gap: 6px;
  }
  .btn-back-market {
    padding: 6px 10px;
    font-size: 12px;
  }
  .stall-wallet-pill {
    padding: 5px 10px;
    font-size: 12px;
  }
  .stall-dialogue-bubble {
    padding: 6px 10px;
    max-width: 96vw;
  }
  .stall-dialogue-bubble p {
    font-size: 12px;
  }
  .noodle-gossip-box {
    padding: 5px 9px;
  }
  .noodle-gossip-box p {
    font-size: 11.5px;
  }
  .species-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }
  .noodle-actions-grid,
  .grocery-actions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }
  .stall-action-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .stall-action-buttons-3 .btn-haggle-action {
    grid-column: 1 / -1;
  }
  .stall-location-badge {
    display: none;
  }
  .stall-bottom-card {
    width: 96vw;
    max-height: 44vh;
    overflow-y: auto;
    padding: 8px 10px;
  }
  .modal-card {
    width: 95vw;
    max-height: 88vh;
    padding: 14px;
  }
  .cutscene-trigger-buttons {
    flex-direction: column;
    width: 92vw;
  }
  .btn-trigger-release {
    width: 100%;
    padding: 12px 16px;
    font-size: 14.5px;
  }
}

@media (max-width: 480px) {
  #hud-name {
    max-width: 64px;
  }
  .hud-badge {
    display: none;
  }
  .hud-pill,
  .hud-btn {
    padding: 3px 6px;
    font-size: 10.5px;
  }
  .boot-title {
    font-size: 19px;
  }
  .outfit-card-title {
    font-size: 11.5px;
  }
  .btn-buy-action,
  .btn-beg-action {
    font-size: 12px;
    padding: 8px 8px;
  }
  .btn-noodle-action {
    font-size: 11.5px;
    padding: 6px 8px;
  }
}

.boot-seo-nav {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(245, 194, 83, 0.25);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.boot-seo-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(245, 194, 83, 0.35);
  color: #fde68a;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.boot-seo-link:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #fbbf24;
  transform: translateY(-1px);
}

.btn-grocery-share {
  background: linear-gradient(135deg, #b45309, #d97706);
  border: 1.5px solid #fde68a;
  color: #fffbeb;
}

.btn-grocery-share:hover {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.btn-next-share {
  background: linear-gradient(135deg, #b45309, #d97706);
  border: 1.5px solid #fde68a;
  color: #fffbeb;
  font-weight: 800;
}

.btn-next-share:hover {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.modal-share-card-box {
  max-width: 520px;
  width: 94vw;
}

.share-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.share-canvas-wrap {
  width: 100%;
  max-width: 350px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #f59e0b;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  background: #fef3c7;
}

#share-card-canvas {
  display: block;
  width: 100%;
  height: auto;
}

.share-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.seo-semantic-article {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

