/* Yaşam Maratonu: Büyük Dünya v3 — Ultra-Clean Minimalist Indie RPG UI (100% Offline) */
* { box-sizing: border-box; user-select: none; -webkit-user-select: none; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden; background: #0f172a; color: #f8fafc;
  font-family: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
}
.hidden { display: none !important; }
canvas#gameCanvas { display: block; width: 100vw; height: 100vh; }

.glass-panel {
  background: linear-gradient(165deg, rgba(18, 28, 49, 0.92), rgba(10, 16, 30, 0.95));
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

#hud {
  pointer-events: none;
  position: fixed; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 10px 12px;
}

.hud-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}

/* SLIM COMPACT STATS PILL */
.compact-stats {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
}
.mini-stat {
  display: flex; align-items: center; gap: 5px; font-size: 12px;
}
.mini-bar {
  width: 48px; height: 9px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
.stat-fill {
  height: 100%; border-radius: 99px;
  transition: width 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.stat-divider { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.16); }
.money-text {
  font-size: 14px; font-weight: 900; color: #4ade80;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.28);
}
.level-text {
  font-size: 10.5px; font-weight: 900; color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.32);
  padding: 2px 6px; border-radius: 999px;
}

/* CENTER SINGLE PILL */
.center-pill {
  padding: 6px 14px;
  font-size: 12px; font-weight: 800; color: #fde047;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 100%;
  letter-spacing: 0.2px;
}
.pill-sep { opacity: 0.32; color: #fff; }

/* TOP-RIGHT HOTKEY ICON PILLS */
.hotkey-bar {
  pointer-events: auto;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.icon-pill {
  padding: 6px 10px;
  background: linear-gradient(180deg, rgba(22, 34, 58, 0.88), rgba(12, 19, 36, 0.9));
  color: #f8fafc;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 12px; font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.icon-pill b { color: #fde047; font-family: monospace; font-size: 11px; }
.icon-pill:hover {
  border-color: #fde047;
  background: linear-gradient(180deg, rgba(34, 48, 78, 0.96), rgba(18, 28, 48, 0.96));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.45), 0 0 0 2px rgba(253, 224, 71, 0.18);
}
.icon-pill:active { transform: translateY(0) scale(0.97); }
.icon-pill.gold {
  background: linear-gradient(180deg, #fde047, #f59e0b);
  color: #0f172a; border-color: #0f172a;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.icon-pill.gold b { color: #7c2d12; }

/* INTERACT PROMPT */
.interact-prompt {
  pointer-events: auto;
  cursor: pointer;
  align-self: center;
  margin-top: auto; margin-bottom: 14px;
  padding: 7px 16px 7px 9px;
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(24, 36, 62, 0.96), rgba(12, 19, 36, 0.98));
  color: #fef9c3;
  border: 2px solid #facc15;
  box-shadow: 0 5px 0 #090e1a, 0 12px 26px rgba(2, 6, 23, 0.55), 0 0 18px rgba(250, 204, 21, 0.22);
  border-radius: 14px;
  font-weight: 900; font-size: 13.5px;
  transition: transform 0.1s ease;
  animation: promptFloat 1.8s ease-in-out infinite;
}
.interact-prompt:hover { border-color: #fef08a; box-shadow: 0 5px 0 #090e1a, 0 12px 28px rgba(250, 204, 21, 0.34); }
.interact-prompt:active { transform: translateY(2px); }
.rpg-keycap {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; padding: 0 7px;
  background: linear-gradient(180deg, #fef08a, #f59e0b);
  color: #0f172a; font-family: monospace; font-size: 13px; font-weight: 900;
  border: 2px solid #0f172a; border-radius: 8px;
  box-shadow: 0 3px 0 #78350f, inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.rpg-prompt-label { letter-spacing: 0.2px; }
@keyframes promptFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* STARTER DISCOVERY GUIDE (IN-FLOW BELOW HUD-TOP — NEVER OVERLAPS!) */
.hud-top-stack {
  display: flex; flex-direction: column; gap: 8px; align-items: stretch;
  pointer-events: none;
}
.hud-sub-area {
  display: flex; align-items: flex-start; gap: 10px;
  flex-wrap: wrap;
  pointer-events: none;
}
.hud-left-stack {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  pointer-events: none;
}
.hud-center-stack {
  flex: 1 1 260px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none;
  min-width: 0;
}
.guide-card {
  align-self: flex-start;
  width: 266px;
  max-width: calc(100vw - 24px);
  padding: 9px 11px;
  pointer-events: auto;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(15, 23, 42, 0.86);
  z-index: 14;
}
.guide-head {
  display: flex; align-items: center; gap: 6px; margin-bottom: 5px;
}
.guide-label {
  font-size: 10px; font-weight: 900; letter-spacing: 0.7px; color: #38bdf8;
}
.guide-step {
  font-size: 10px; font-weight: 900; color: #fde047;
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 999px; padding: 1px 6px;
}
.guide-btns {
  margin-left: auto; display: flex; gap: 4px;
}
.guide-mini-action {
  width: 22px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px; color: #e2e8f0;
  font-size: 11px; cursor: pointer;
}
.guide-mini-action:hover { border-color: #fde047; color: #fde047; }
.guide-mini-action.off { opacity: 0.42; filter: grayscale(1); }
.guide-progress-track {
  height: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden; margin-bottom: 7px;
}
.guide-progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #4ade80);
  transition: width 0.3s ease;
}
.guide-task-title {
  font-size: 12.5px; font-weight: 900; color: #f8fafc; line-height: 1.25;
}
.guide-task-hint {
  font-size: 11px; color: #cbd5e1; margin-top: 2px; line-height: 1.3;
}
.guide-foot {
  display: flex; align-items: center; gap: 6px; margin-top: 7px;
  padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.guide-meta {
  font-size: 10.5px; font-weight: 800; color: #4ade80;
}
.guide-dist {
  font-size: 10.5px; font-weight: 800; color: #38bdf8; margin-left: auto;
}
.guide-skip-btn {
  background: none; border: none; color: #94a3b8;
  font-size: 10px; font-weight: 800; cursor: pointer; padding: 1px 4px;
}
.guide-skip-btn:hover { color: #fde047; }
.guide-mini-pill {
  align-self: flex-start;
  pointer-events: auto;
  z-index: 14;
  border-color: rgba(56, 189, 248, 0.55);
}

/* BOTTOM COMPACT DOCK + MINIMAP */
.hud-bottom {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
}
.quick-dock {
  pointer-events: auto;
  display: flex; gap: 5px;
}
.dock-btn {
  position: relative;
  width: 40px; height: 40px;
  background: linear-gradient(180deg, rgba(22, 34, 58, 0.86), rgba(12, 19, 36, 0.9));
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  font-size: 17px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.dock-btn span {
  position: absolute; bottom: 1px; right: 3px;
  font-size: 9px; font-weight: 900; color: #fde047; font-family: monospace;
}
.dock-btn:hover {
  border-color: #fde047;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.48), 0 0 0 2px rgba(253, 224, 71, 0.18);
}
.dock-btn:active { transform: translateY(0) scale(0.95); }

.minimap-box {
  width: 196px; height: 152px; overflow: hidden; position: relative;
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.minimap-box canvas { width: 100%; height: 100%; display: block; }
.minimap-lbl {
  position: absolute; top: 5px; left: 7px;
  font-size: 9px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px #000;
  background: rgba(15, 23, 42, 0.65); padding: 1px 5px; border-radius: 5px;
}
.minimap-legend {
  position: absolute; bottom: 3px; left: 5px; right: 5px;
  display: flex; justify-content: space-between;
  font-size: 8px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px #000;
}

/* MODALS */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.shop-modal {
  width: min(560px, 100%); padding: 20px 22px;
  max-height: 88vh; overflow-y: auto;
  animation: modalIn 0.16s cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}
.shop-modal::-webkit-scrollbar { width: 6px; }
.shop-modal::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.35); border-radius: 99px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.shop-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.hud-btn {
  padding: 7px 13px;
  background: linear-gradient(180deg, rgba(26, 39, 64, 0.94), rgba(15, 23, 42, 0.96));
  color: #f8fafc;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  font-size: 12px; font-weight: 800; cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.hud-btn:hover { border-color: #fde047; color: #fde047; transform: translateY(-1px); }
.hud-btn:active { transform: translateY(0) scale(0.97); }
.hud-btn.gold {
  background: linear-gradient(180deg, #fde047, #f59e0b);
  color: #0f172a; border-color: #0f172a;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.hud-btn.gold:hover { color: #0f172a; box-shadow: 0 5px 14px rgba(245, 158, 11, 0.42); }

.shop-grid, .quest-modal-list { display: flex; flex-direction: column; gap: 8px; }
.shop-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.shop-item:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); }
.shop-buy-btn {
  padding: 7px 14px; border-radius: 9px; border: 2px solid #0f172a;
  background: linear-gradient(180deg, #fde047, #f59e0b);
  color: #0f172a; font-weight: 900; cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease;
}
.shop-buy-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.shop-buy-btn.owned { background: linear-gradient(180deg, #22c55e, #16a34a); color: #fff; cursor: default; }

.quest-row {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  font-size: 13px; color: #f1f5f9;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.quest-row.done { background: rgba(22, 163, 74, 0.16); color: #86efac; text-decoration: line-through; }

.help-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px; font-size: 12px;
}
.help-grid div {
  padding: 7px 10px; background: rgba(255,255,255,0.06);
  border-radius: 8px; display: flex; justify-content: space-between; gap: 8px;
}
.help-grid b { color: #fde047; font-family: monospace; }
.help-grid span { color: #cbd5e1; text-align: right; }

/* FISHING BAR & HOME ROOM */
.fishing-bar-wrap {
  pointer-events: auto; align-self: center;
  margin-top: auto; margin-bottom: 16px;
  width: min(390px, 92vw); padding: 12px 16px; text-align: center;
}
.fish-title { font-size: 12px; font-weight: 900; color: #fde047; margin-bottom: 8px; }
.fish-track {
  position: relative; height: 24px; background: #991b1b;
  border: 3px solid #111; border-radius: 99px; overflow: hidden;
}
.fish-good-zone { position: absolute; top: 0; bottom: 0; left: 22%; width: 56%; background: #0284c7; }
.fish-sweet-zone {
  position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 18%; background: #facc15; box-shadow: 0 0 12px rgba(250, 204, 21, 0.85);
}
.fish-cursor {
  position: absolute; top: -2px; bottom: -2px; left: 50%;
  width: 8px; transform: translateX(-50%);
  background: #fff; border: 2px solid #111; border-radius: 4px;
}

.room-preview {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 10px; background: rgba(30, 41, 59, 0.85);
  border: 2px solid rgba(250, 204, 21, 0.3); border-radius: 10px; margin-bottom: 8px;
}
.room-slot {
  padding: 6px; border-radius: 7px; font-size: 11px; font-weight: 800;
  text-align: center; background: rgba(74, 222, 128, 0.18); color: #bbf7d0;
  border: 1px solid rgba(74, 222, 128, 0.4);
}
.room-slot.locked { background: rgba(148, 163, 184, 0.08); color: #64748b; border-style: dashed; }

/* MOBILE TOUCH */
#touchControls {
  display: none; pointer-events: none;
  position: fixed; bottom: 14px; left: 14px; right: 14px; z-index: 12;
  justify-content: space-between; align-items: flex-end;
}
.touch-pad { display: grid; grid-template-columns: repeat(3, 42px); gap: 4px; }
.touch-btn {
  pointer-events: auto;
  height: 42px; border-radius: 8px; border: 2px solid #111;
  background: rgba(15, 23, 42, 0.85); color: #fff; font-weight: 900;
}

@media (max-width: 760px) {
  .mini-bar { width: 28px; }
  .help-grid { grid-template-columns: 1fr; }
  .minimap-box { width: 132px; height: 102px; margin-bottom: 58px; }
  .quick-dock { display: none; }
  #touchControls { display: flex; }
}

/* v4 ADDITIONS: TITLE SCREEN, CHARACTER PICKER, ACHIEVEMENTS, EVENT TOAST */
.title-card {
  width: min(460px, 95vw);
  max-height: 92vh; overflow-y: auto;
  padding: 24px 26px;
  text-align: center;
}
.title-badge {
  display: inline-block; padding: 4px 12px; border-radius: 99px;
  background: rgba(56, 189, 248, 0.18); color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 11px; font-weight: 900; letter-spacing: 0.06em;
}
.title-heading {
  margin: 10px 0 4px; font-size: 36px; font-weight: 900;
  color: #fde047; letter-spacing: 0.04em;
  text-shadow: 0 3px 14px rgba(250, 204, 21, 0.3);
}
.title-sub { margin: 0 0 16px; font-size: 12px; color: #cbd5e1; }
.custom-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; background: rgba(255,255,255,0.06); border-radius: 10px;
}
.name-input {
  width: 170px; padding: 6px 10px; border-radius: 7px;
  border: 1.5px solid rgba(255,255,255,0.25); background: #0f172a; color: #fff;
  font-weight: 800; font-size: 13px; user-select: text; -webkit-user-select: text;
}
.color-picker-row { display: flex; gap: 7px; }
.color-dot {
  width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid #111;
  cursor: pointer; transition: transform 0.12s;
}
.color-dot.active { transform: scale(1.22); box-shadow: 0 0 0 2.5px #fde047; }
.title-cta-row { display: flex; gap: 10px; margin-top: 16px; }
.title-play-btn { flex: 1; padding: 12px; font-size: 15px; }
.title-hint { margin-top: 12px; font-size: 10px; color: #94a3b8; }

.event-toast {
  padding: 7px 16px; z-index: 24;
  font-size: 13px; font-weight: 900; color: #fde047;
  border-color: rgba(250, 204, 21, 0.55);
  white-space: nowrap; max-width: min(560px, 100%); overflow: hidden; text-overflow: ellipsis;
}

.career-banner {
  padding: 10px 12px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(56,189,248,0.18), rgba(250,204,21,0.14));
  border: 1px solid rgba(56,189,248,0.35);
  font-size: 13px; font-weight: 800; color: #f8fafc;
}
.ach-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px;
}
.ach-card {
  padding: 8px 10px; border-radius: 9px; font-size: 11px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: #64748b;
}
.ach-card.unlocked {
  background: rgba(250, 204, 21, 0.14); border-color: rgba(250, 204, 21, 0.5);
  color: #fef08a;
}

/* v5 ADDITIONS: BARISTA RUSH MINI-GAME OVERLAY */
.barista-wrap {
  position: fixed; left: 50%; top: 52%; transform: translate(-50%, -50%);
  width: min(370px, 92vw); padding: 14px 16px; pointer-events: auto;
  border-color: rgba(250, 204, 21, 0.7); text-align: center;
  z-index: 25;
}
.barista-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 900; margin-bottom: 10px;
}
.barista-order-box {
  background: rgba(30, 41, 59, 0.9); border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px; padding: 12px; margin-bottom: 10px;
}
.barista-order-icon {
  font-size: 46px; line-height: 1.1; margin: 4px 0;
}
.barista-order-name {
  font-size: 15px; font-weight: 900; color: #fde047; margin-bottom: 8px;
}
.barista-patience-track {
  height: 7px; border-radius: 99px; background: rgba(255,255,255,0.12); overflow: hidden;
}
.barista-patience-fill {
  height: 100%; width: 100%; background: linear-gradient(90deg, #ef4444, #facc15, #4ade80);
  transition: width 0.08s linear;
}
.barista-btns {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.barista-serve-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 8px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.22);
  background: rgba(15, 23, 42, 0.88); color: #f8fafc; font-weight: 900; font-size: 13px;
  cursor: pointer; transition: transform 0.08s, border-color 0.12s;
}
.barista-serve-btn:hover { border-color: #fde047; transform: translateY(-1px); }
.barista-serve-btn:active { transform: scale(0.96); }
.barista-serve-btn kbd {
  padding: 2px 5px; border-radius: 4px; background: rgba(250, 204, 21, 0.2);
  color: #fde047; font-size: 11px; font-family: monospace;
}

/* v6 ADDITIONS: EXPRESS DELIVERY BANNER */
.delivery-banner {
  display: flex; align-items: center; gap: 12px; pointer-events: auto;
  padding: 6px 14px; font-size: 12px; font-weight: 900; color: #f8fafc;
  border-color: rgba(250, 204, 21, 0.65); z-index: 23;
  white-space: nowrap;
}

/* v7 ADDITIONS: MUSIC & RADIO STUDIO MODAL */
.music-now-card {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px; margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.95));
  border: 1.5px solid rgba(56, 189, 248, 0.45);
}
.music-eq {
  display: flex; align-items: flex-end; gap: 3px; height: 22px; padding: 0 2px;
}
.music-eq span {
  display: block; width: 3.5px; border-radius: 3px;
  background: linear-gradient(180deg, #fde047, #38bdf8);
  animation: eqPulse 0.95s ease-in-out infinite;
}
.music-eq span:nth-child(1) { height: 9px;  animation-delay: 0.00s; }
.music-eq span:nth-child(2) { height: 18px; animation-delay: 0.18s; }
.music-eq span:nth-child(3) { height: 13px; animation-delay: 0.36s; }
.music-eq span:nth-child(4) { height: 21px; animation-delay: 0.12s; }
.music-eq span:nth-child(5) { height: 11px; animation-delay: 0.28s; }
.music-eq.paused span { animation: none; height: 4px !important; opacity: 0.4; }
@keyframes eqPulse {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1.0); }
}

.music-sliders {
  display: grid; gap: 8px; margin-bottom: 12px;
  background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 10px 12px;
}
.music-slider-row {
  display: grid; grid-template-columns: 128px 1fr 38px; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 800; color: #e2e8f0;
}
.music-slider-row input[type="range"] {
  width: 100%; accent-color: #38bdf8; cursor: pointer; height: 5px;
}
.music-slider-val {
  text-align: right; color: #fde047; font-size: 11px; font-weight: 900;
}

.station-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.station-btn {
  display: flex; align-items: center; gap: 9px; text-align: left;
  padding: 9px 11px; border-radius: 10px; cursor: pointer;
  background: rgba(30, 41, 59, 0.78); border: 1.5px solid rgba(255,255,255,0.12);
  color: #f8fafc; transition: transform 0.08s, border-color 0.14s, background 0.14s;
}
.station-btn:hover { border-color: rgba(56, 189, 248, 0.7); transform: translateY(-1px); }
.station-btn.active {
  border-color: #fde047; background: rgba(250, 204, 21, 0.14);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.18);
}
.station-btn.full-span { grid-column: 1 / -1; }
.station-ico { font-size: 20px; flex-shrink: 0; }
.station-name { font-size: 12px; font-weight: 900; color: #f8fafc; line-height: 1.2; }
.station-desc { font-size: 10px; color: #94a3b8; margin-top: 2px; line-height: 1.25; }

/* v10 ADDITIONS: AUTONOMOUS LIFE SWARM / AUTO-PILOT HUD */
.icon-pill.swarm-active {
  background: rgba(22, 163, 74, 0.28);
  border-color: #4ade80;
  color: #bbf7d0;
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.35);
}
.icon-pill.swarm-active b { color: #4ade80; }

.swarm-banner {
  display: flex; align-items: center; gap: 8px; pointer-events: auto;
  padding: 5px 11px; font-size: 11px; font-weight: 800; color: #f8fafc;
  border-color: rgba(74, 222, 128, 0.62); z-index: 22;
  max-width: min(500px, calc(100vw - 24px));
}
.swarm-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: swarmPulse 1.1s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes swarmPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.7; }
  50% { transform: scale(1.22); opacity: 1; }
}
.swarm-role {
  padding: 2px 7px; border-radius: 6px;
  background: rgba(74, 222, 128, 0.18); color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
  font-size: 10px; font-weight: 900; white-space: nowrap;
}
.swarm-task {
  color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ───────── Life Chapters (v11.1) ───────── */
.chapter-pill b { font-family: inherit; letter-spacing: 0.3px; }
.chapter-pill.chapter-ready { border-color: #fde047; box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.35); animation: chapterPulse 1.6s ease-in-out infinite; }
@keyframes chapterPulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.25); } 50% { box-shadow: 0 0 0 5px rgba(253, 224, 71, 0.5); } }
.chapter-modal { max-width: 640px; }
.chapter-modal .shop-header { gap: 10px; }
.chapter-age { margin-left: auto; font-size: 12px; font-weight: 900; color: #38bdf8; background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.35); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.chapter-track { display: flex; gap: 6px; margin: 12px 0 10px; overflow-x: auto; padding-bottom: 2px; }
.chapter-step { flex: 1 1 0; min-width: 78px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 4px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); opacity: 0.55; }
.chapter-step.done { opacity: 0.9; background: rgba(22, 163, 74, 0.16); border-color: rgba(74, 222, 128, 0.4); }
.chapter-step.active { opacity: 1; background: rgba(253, 224, 71, 0.14); border-color: #fde047; }
.chapter-step-icon { font-size: 18px; }
.chapter-step-name { font-size: 9.5px; font-weight: 900; color: #e2e8f0; text-align: center; letter-spacing: 0.3px; }
.chapter-story { font-size: 13px; line-height: 1.5; color: #e2e8f0; margin: 4px 0 6px; padding: 10px 12px; border-left: 3px solid #fde047; background: rgba(15, 23, 42, 0.45); border-radius: 0 10px 10px 0; }
.chapter-sec { font-size: 11px; font-weight: 900; color: #38bdf8; margin: 12px 0 6px; letter-spacing: 0.4px; }
.chapter-friends { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.chapter-friend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 12px; color: #f1f5f9; }
.chapter-friend.tier-2 { border-color: rgba(244, 114, 182, 0.45); }
.chapter-friend.tier-3 { border-color: #f472b6; background: rgba(244, 114, 182, 0.12); }
.chapter-friend-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #111; flex: 0 0 auto; }
.chapter-friend-tier { font-size: 11px; color: #cbd5e1; width: 100%; }
.chapter-friend-tag { font-size: 10px; font-weight: 800; color: #fde047; }
.chapter-empty { grid-column: 1 / -1; font-size: 12px; color: #94a3b8; }
.chapter-vicdan { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(255, 255, 255, 0.12); }
.chapter-vicdan-score { font-size: 13px; font-weight: 900; color: #fde047; }
.chapter-vicdan-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chapter-vicdan-chip { font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.chapter-vicdan-chip.pos { background: rgba(22, 163, 74, 0.2); color: #86efac; }
.chapter-vicdan-chip.neg { background: rgba(220, 38, 38, 0.2); color: #fca5a5; }
.chapter-verdict { margin-top: 10px; font-size: 14px; font-weight: 900; padding: 10px; border-radius: 10px; text-align: center; }
.chapter-verdict.heaven { background: rgba(254, 249, 195, 0.18); color: #fef9c3; border: 1px solid rgba(254, 240, 138, 0.5); }
.chapter-verdict.hell { background: rgba(127, 29, 29, 0.4); color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.5); }
.chapter-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.chapter-actions .hud-btn:disabled { opacity: 0.55; cursor: not-allowed; }

@keyframes moneyPop { 0% { transform: scale(1); } 35% { transform: scale(1.22); color: #fde047; } 100% { transform: scale(1); } }
.money-pop { display: inline-block; animation: moneyPop 0.36s ease; }

/* ───────── v11.4 Enriched HUD: XP bar, Low-Stat Warning, Buff Chip, Dock States & Title Polish ───────── */
.level-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.xp-micro-track { width: 34px; height: 3.5px; background: rgba(255, 255, 255, 0.14); border-radius: 99px; overflow: hidden; }
.xp-micro-fill { height: 100%; background: linear-gradient(90deg, #38bdf8, #fde047); border-radius: 99px; transition: width 0.25s ease; }
.mini-stat.low .mini-bar { border-color: rgba(239, 68, 68, 0.9); box-shadow: 0 0 8px rgba(239, 68, 68, 0.65); animation: lowStatPulse 0.9s ease-in-out infinite; }
.mini-stat.low span { filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.85)); }
@keyframes lowStatPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.buff-badge {
  font-size: 10.5px; font-weight: 900; color: #bbf7d0;
  background: rgba(22, 163, 74, 0.22);
  border: 1px solid rgba(74, 222, 128, 0.45);
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}

.dock-btn.locked { opacity: 0.48; filter: grayscale(0.65); }
.dock-btn.locked:hover { opacity: 0.82; filter: grayscale(0.2); }
.dock-btn.active {
  border-color: #38bdf8;
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.65), rgba(15, 23, 42, 0.92));
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35), 0 6px 16px rgba(56, 189, 248, 0.28);
}

.title-card {
  border-color: rgba(253, 224, 71, 0.32);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.65), 0 0 0 1px rgba(253, 224, 71, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.title-heading {
  text-shadow: none;
  background: linear-gradient(180deg, #fef08a 0%, #facc15 55%, #f59e0b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 12px rgba(250, 204, 21, 0.32));
}

/* ───────── v11.6 RPG Adventure Board & Goal Cards ───────── */
#questList.quest-modal-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 9px;
}
.rpg-quest-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; border-radius: 12px;
  background: linear-gradient(160deg, rgba(30, 44, 72, 0.78), rgba(15, 23, 42, 0.88));
  border: 1.5px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.12s ease, border-color 0.15s ease;
}
.rpg-quest-card:hover { transform: translateY(-1px); border-color: rgba(250, 204, 21, 0.55); }
.rpg-quest-card.done {
  background: linear-gradient(160deg, rgba(20, 83, 45, 0.34), rgba(15, 23, 42, 0.85));
  border-color: rgba(74, 222, 128, 0.55);
}
.rpg-quest-icon {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
}
.rpg-quest-card.done .rpg-quest-icon { border-color: #fde047; background: rgba(250, 204, 21, 0.16); }
.rpg-quest-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rpg-quest-title { font-size: 12px; font-weight: 800; color: #f8fafc; line-height: 1.25; }
.rpg-quest-card.done .rpg-quest-title { color: #bbf7d0; }
.rpg-bar-track {
  height: 6px; border-radius: 99px; overflow: hidden;
  background: rgba(2, 6, 23, 0.6); border: 1px solid rgba(255, 255, 255, 0.1);
}
.rpg-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #38bdf8, #facc15);
  transition: width 0.25s ease;
}
.rpg-quest-card.done .rpg-bar-fill, .rpg-goal-card.done .rpg-bar-fill {
  background: linear-gradient(90deg, #4ade80, #fde047);
}
.rpg-quest-foot { display: flex; align-items: center; gap: 6px; font-size: 10.5px; }
.rpg-reward-gold { color: #fde047; font-weight: 900; background: rgba(250, 204, 21, 0.12); padding: 1px 6px; border-radius: 99px; }
.rpg-reward-xp { color: #7dd3fc; font-weight: 800; background: rgba(56, 189, 248, 0.12); padding: 1px 6px; border-radius: 99px; }
.rpg-quest-count { margin-left: auto; color: #e2e8f0; font-size: 11px; }
.rpg-quest-card.done .rpg-quest-count { color: #4ade80; }

.rpg-goal-card {
  padding: 9px 11px; border-radius: 11px;
  background: linear-gradient(160deg, rgba(30, 44, 72, 0.72), rgba(15, 23, 42, 0.88));
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  display: flex; flex-direction: column; gap: 6px;
}
.rpg-goal-card.done { border-color: rgba(74, 222, 128, 0.55); background: rgba(20, 83, 45, 0.28); }
.rpg-goal-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.rpg-goal-ico { font-size: 16px; }
.rpg-goal-title { flex: 1; font-weight: 800; color: #f1f5f9; }
.rpg-goal-card.done .rpg-goal-title { color: #86efac; }
.rpg-goal-prog { font-size: 11.5px; color: #fde047; }
.rpg-goal-card.done .rpg-goal-prog { color: #4ade80; }

/* ───────── v11.7 Mobile Finger-Follow & Decluttered Mobile HUD ───────── */
.mobile-menu-btn { display: none; }
.touch-car-pill {
  margin-left: auto;
  width: 46px; height: 46px; border-radius: 50% !important;
  background: linear-gradient(180deg, #22d3ee, #0284c7) !important;
  color: #0f172a !important; font-size: 20px;
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.45);
}

@media (max-width: 760px) {
  #hud { padding: 6px 8px; }
  .hud-top { gap: 5px; }
  .compact-stats { padding: 4px 8px; gap: 5px; }
  .mini-stat { gap: 3px; font-size: 11px; }
  .mini-bar { width: 22px; height: 7px; }
  .money-text { font-size: 12px; }
  .level-text { font-size: 9.5px; padding: 1px 5px; }
  .xp-micro-track { width: 26px; }
  .center-pill { padding: 4px 9px; font-size: 10.5px; gap: 5px; }
  .buff-badge { display: none !important; }

  /* Collapse 8 top-right buttons into 3 clean pills + expandable ☰ menu */
  .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; }
  .hotkey-bar { gap: 4px; }
  .hotkey-bar .icon-pill { padding: 5px 8px; font-size: 12px; }
  .hotkey-bar .icon-pill b { display: none; }
  .hotkey-bar #chapterChip, .hotkey-bar #langHudCode { display: inline; font-size: 10.5px; }
  .hotkey-bar .mob-extra { display: none; }
  .hotkey-bar.mobile-menu-open .mob-extra { display: inline-flex; }

  .guide-card { width: min(240px, calc(100vw - 16px)); padding: 7px 9px; }
  .minimap-box { width: 132px; height: 102px; margin-bottom: 52px; }
  #touchControls { justify-content: flex-end; bottom: 14px; right: 12px; left: auto; }
}

/* ───────── v11.8 Dedicated Desktop vs. Mobile UI ───────── */
.mobile-bar, .mobile-drawer { display: none; }

@media (max-width: 760px) {
  /* Hide desktop-only top hotkey bar on phones; bottom thumb bar replaces it! */
  .hotkey-bar { display: none !important; }
  .hud-top { justify-content: space-between; gap: 4px; }
  .compact-stats { flex: 1 1 auto; justify-content: space-between; }
  .center-pill { width: 100%; justify-content: center; padding: 3px 8px; font-size: 10.5px; }
  .interact-prompt { margin-bottom: 66px; font-size: 13px; padding: 6px 14px 6px 8px; }
  .fishing-bar-wrap { margin-bottom: 72px; }
  .minimap-box { margin-bottom: 62px; }

  .mobile-bar {
    display: flex; align-items: center; justify-content: space-around; gap: 4px;
    position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 22;
    padding: 5px 6px; border-radius: 16px;
    pointer-events: auto;
  }
  .mob-nav-btn {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 5px 2px; border-radius: 11px; border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.05); color: #f8fafc;
    font-size: 17px; cursor: pointer;
  }
  .mob-nav-btn span { font-size: 9.5px; font-weight: 800; color: #cbd5e1; }
  .mob-nav-btn.gold { background: linear-gradient(180deg, #fde047, #f59e0b); color: #0f172a; }
  .mob-nav-btn.gold span { color: #451a03; font-weight: 900; }
  .mob-nav-btn.chapter-ready { border-color: #fde047; box-shadow: 0 0 10px rgba(253, 224, 71, 0.4); }
  .mob-nav-btn:active { transform: scale(0.95); }

  .mobile-drawer {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
    position: fixed; left: 10px; right: 10px; bottom: 68px; z-index: 24;
    padding: 10px; border-radius: 16px;
    pointer-events: auto;
    animation: modalIn 0.14s ease;
  }
  .mob-tool {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 4px; border-radius: 11px;
    background: rgba(255, 255, 255, 0.06); border: 1.5px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc; font-size: 18px; cursor: pointer;
  }
  .mob-tool span { font-size: 9.5px; font-weight: 800; color: #cbd5e1; }
  .mob-tool.locked { opacity: 0.45; filter: grayscale(0.7); }
  .mob-tool.active { border-color: #38bdf8; background: rgba(14, 116, 144, 0.42); }
}
