:root {
  --bg-top: #dff4ff;
  --bg-bottom: #f4fbff;
  --panel-bg: #ffffff;
  --panel-border: #c5e3f6;
  --panel-shadow: 0 8px 22px rgba(28, 78, 118, 0.1);
  --text-main: #1d3557;
  --text-muted: #5c7591;
  --accent-blue: #3b9eff;
  --accent-green: #58b947;
  --accent-gold: #f5b82e;
  --accent-coral: #ff6b6b;
  --card-radius: 18px;
}

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

html, body {
  height: 100%;
  font-family: "Nunito", "Fredoka", system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* App Shell */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 72px;
  gap: 14px;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
}

/* Top HUD */
.top-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.hud-left {
  display: flex;
  align-items: center;
}

.game-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--panel-border);
  border-radius: 16px;
  padding: 8px 14px;
  box-shadow: 0 4px 12px rgba(28, 78, 118, 0.08);
}

.brand-badge {
  font-size: 1.7rem;
  line-height: 1;
}

.game-title {
  font-family: "Fredoka", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.15;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.sync-dot.online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.sync-dot.offline {
  background: #f59e0b;
}

/* Top Center: Penguin Level */
.hud-center {
  display: flex;
  justify-content: center;
}

.level-card {
  background: #ffffff;
  border: 3px solid #9bd3f7;
  border-radius: 18px;
  padding: 8px 20px 10px;
  min-width: 240px;
  box-shadow: 0 6px 16px rgba(28, 78, 118, 0.12);
  text-align: center;
}

.level-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.level-title {
  font-family: "Fredoka", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.level-badge {
  background: linear-gradient(135deg, #4cc9f0, #3b9eff);
  color: #ffffff;
  font-family: "Fredoka", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(59, 158, 255, 0.35);
}

.xp-bar-track {
  width: 100%;
  height: 10px;
  background: #e6f2fa;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #cce3f3;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7cb518, #9ef01a);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.xp-text {
  margin-top: 4px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
}

/* Top Right: Coins */
.hud-right {
  display: flex;
  justify-content: flex-end;
}

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #fffdf5, #fff3cc);
  border: 3px solid #f0b429;
  border-radius: 999px;
  padding: 7px 20px 7px 10px;
  box-shadow: 0 6px 14px rgba(217, 150, 12, 0.2);
  transition: transform 0.15s ease;
}

.coin-pill.bump {
  transform: scale(1.1);
}

.coin-svg {
  width: 34px;
  height: 34px;
}

.coin-count {
  font-family: "Fredoka", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: #9c6500;
  min-width: 24px;
  text-align: center;
}

/* Main 3-Column Layout */
.main-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 310px;
  gap: 16px;
  align-items: stretch;
  min-height: 560px;
}

/* Side Panels */
.panel {
  background: var(--panel-bg);
  border: 3px solid var(--panel-border);
  border-radius: var(--card-radius);
  box-shadow: var(--panel-shadow);
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}

.panel-header h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.panel-sub {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Inventory Cards */
.inventory-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inv-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #f8fcff;
  border: 2.5px solid #d2e9f8;
  border-radius: 15px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 3px 0 #c5e2f5;
}

.inv-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #6ab9f7;
  background: #f0f9ff;
}

.inv-card:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #c5e2f5;
}

.inv-card.needed {
  border-color: #ff9f1c;
  background: #fff9eb;
  box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.22), 0 3px 0 #f0b429;
  animation: gentlePulse 1.6s infinite ease-in-out;
}

.inv-card.empty {
  opacity: 0.6;
}

.inv-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fish-bg { background: #e0f5ff; }
.water-bg { background: #e2f2ff; }
.toy-bg { background: #ffecec; }
.book-bg { background: #f3e8ff; }

.item-svg {
  width: 36px;
  height: 36px;
}

.inv-info {
  flex: 1;
}

.inv-name {
  font-family: "Fredoka", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.inv-desc {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.inv-qty {
  font-family: "Fredoka", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #e0effe;
  border-radius: 11px;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

/* Health Status Box (above Care Timers) */
.health-box {
  background: #f5fafe;
  border: 2px solid #d5e8f7;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-bar-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.health-overall-row {
  padding-bottom: 6px;
  border-bottom: 1.5px dashed #cfe4f5;
}

.stat-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-label-row small {
  font-weight: 700;
  color: var(--text-muted);
}

.stat-pct {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
}

.stat-track {
  width: 100%;
  height: 9px;
  background: #e2effa;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #cce3f3;
}

.stat-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  transition: width 0.35s ease, background 0.35s ease;
}

.stat-fill.stat-mid {
  background: linear-gradient(90deg, #facc15, #f59e0b);
}

.stat-fill.stat-low {
  background: linear-gradient(90deg, #fb7185, #ef4444);
}

/* Care Timers Box */
.needs-box {
  background: #f5fafe;
  border: 2px solid #d5e8f7;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.needs-title {
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.need-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 9px;
  background: #ffffff;
  border: 1.5px solid #e2effa;
}

.need-row.active-need {
  background: #fff3cd;
  border-color: #f59e0b;
  color: #92400e;
}

.need-timer {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
}

/* CENTER STAGE */
.center-stage {
  position: relative;
  border-radius: 24px;
  border: 3px solid var(--panel-border);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #b8e6ff 0%, #e7f8ff 65%, #ffffff 100%);
  min-height: 540px;
}

.location-banner {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.location-pill {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #a9d6f5;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: 0 3px 10px rgba(28, 78, 118, 0.1);
}

.return-home-btn {
  pointer-events: auto;
  background: #ffffff;
  border: 2px solid #5aa9e6;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 #9ecdf2;
  transition: transform 0.12s ease, background 0.12s ease;
}

.return-home-btn:hover {
  background: #eef7ff;
  transform: translateY(-1px);
}

.return-home-btn:active {
  transform: translateY(1px);
}

/* Home & Store Stage Scene */
.stage-scene {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sky-clouds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  height: 36px;
}

.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
}

.cloud-1 {
  width: 110px;
  top: 68px;
  left: 12%;
  animation: driftCloud 26s linear infinite;
}
.cloud-1::before { width: 46px; height: 46px; top: -20px; left: 16px; }
.cloud-1::after { width: 34px; height: 34px; top: -14px; right: 18px; }

.cloud-2 {
  width: 86px;
  top: 110px;
  right: 14%;
  animation: driftCloud 34s linear infinite reverse;
}
.cloud-2::before { width: 36px; height: 36px; top: -16px; left: 14px; }
.cloud-2::after { width: 28px; height: 28px; top: -10px; right: 14px; }

.ground-hill {
  position: absolute;
  bottom: -60px;
  left: -10%;
  width: 120%;
  height: 220px;
  background: radial-gradient(ellipse at top, #ffffff 0%, #eaf6ff 65%, #d4edff 100%);
  border-top: 4px solid #c7e6fb;
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}

/* Store Backdrop */
.store-backdrop {
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  background: #fff7e6;
  border: 3px solid #e09f3e;
  border-radius: 18px;
  padding: 0 0 12px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(146, 94, 15, 0.14);
  z-index: 2;
}

.store-awning {
  height: 24px;
  border-radius: 14px 14px 0 0;
  background: repeating-linear-gradient(
    90deg,
    #ff6b6b 0px,
    #ff6b6b 24px,
    #ffffff 24px,
    #ffffff 48px
  );
  border-bottom: 3px solid #d94b4b;
}

.store-sign {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #9c4a1a;
  letter-spacing: 0.06em;
  margin-top: 6px;
}

.store-window {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 6px;
  font-size: 1.5rem;
}

/* Thought Bubble */
.thought-bubble {
  position: relative;
  z-index: 8;
  margin-bottom: 8px;
  background: #ffffff;
  border: 3px solid #8ac4ef;
  border-radius: 28px;
  padding: 10px 18px;
  box-shadow: 0 8px 18px rgba(28, 78, 118, 0.14);
  animation: floatBubble 2.4s ease-in-out infinite;
}

.thought-items {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thought-item-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 2px solid #d6ecfb;
  background: #f6fbff;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.thought-item-btn:hover {
  transform: scale(1.1);
  background: #fff4d6;
  border-color: #f59e0b;
}

.thought-item-btn svg {
  width: 34px;
  height: 34px;
}

.thought-dot {
  position: absolute;
  background: #ffffff;
  border: 3px solid #8ac4ef;
  border-radius: 50%;
}

.dot-1 {
  width: 15px;
  height: 15px;
  bottom: -14px;
  left: 44%;
}

.dot-2 {
  width: 10px;
  height: 10px;
  bottom: -25px;
  left: 48%;
}

/* Penguin Clickable Button */
.penguin-btn {
  position: relative;
  z-index: 5;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.penguin-btn:hover {
  transform: scale(1.03);
}

.penguin-btn:active,
.penguin-btn.squish {
  transform: scale(0.93, 1.05);
}

.penguin-svg {
  width: 225px;
  height: 245px;
  filter: drop-shadow(0 12px 16px rgba(28, 78, 118, 0.16));
}

.penguin-body-group {
  transform-origin: 110px 205px;
  animation: penguinIdle 3s ease-in-out infinite;
}

.penguin-btn.happy .penguin-body-group {
  animation: penguinBounce 0.45s ease-out;
}

.eyes-happy,
.eyes-sleeping {
  opacity: 0;
}

.penguin-btn.happy .eyes-normal,
.penguin-btn.sleeping .eyes-normal {
  opacity: 0;
}

.penguin-btn.happy .eyes-happy {
  opacity: 1;
}

.penguin-btn.sleeping .eyes-sleeping {
  opacity: 1;
}

.penguin-btn.sleeping .penguin-body-group {
  animation: penguinSleepBreath 2.6s ease-in-out infinite;
}

.sleep-zzz {
  position: absolute;
  top: 24px;
  right: 12px;
  font-family: "Fredoka", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #3b4f8c;
  background: rgba(255, 255, 255, 0.88);
  padding: 4px 10px;
  border-radius: 999px;
  border: 2px solid #93c5fd;
  animation: floatBubble 1.8s ease-in-out infinite;
}

.center-stage.sleeping {
  background: linear-gradient(180deg, #273c75 0%, #485f99 65%, #8296c9 100%);
}

.center-stage.sleeping .stage-caption {
  background: rgba(255, 255, 255, 0.9);
  color: #1e3a8a;
}

.stage-actions {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.sleep-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  color: #ffffff;
  border: 2px solid #4338ca;
  border-radius: 999px;
  padding: 7px 18px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 #3730a3;
  transition: transform 0.12s ease, filter 0.15s ease;
}

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

.sleep-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.sleep-btn:disabled {
  opacity: 0.72;
  cursor: default;
}

.book-buff-pill {
  background: #f3e8ff;
  color: #6b21a8;
  border: 2px solid #c084fc;
  border-radius: 999px;
  padding: 5px 12px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
}

.hardware-backdrop {
  background: #f1f5f9;
  border-color: #64748b;
}

.hardware-awning {
  background: repeating-linear-gradient(
    90deg,
    #334155 0px,
    #334155 24px,
    #f59e0b 24px,
    #f59e0b 48px
  );
  border-bottom-color: #1e293b;
}

.stage-caption {
  position: relative;
  z-index: 5;
  margin-top: 4px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.78);
  padding: 5px 14px;
  border-radius: 999px;
}

/* Travel Overlay */
.travel-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: rgba(223, 244, 255, 0.88);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.travel-card {
  background: #ffffff;
  border: 3px solid #79bdf2;
  border-radius: 22px;
  padding: 24px 28px;
  width: min(340px, 86%);
  text-align: center;
  box-shadow: 0 12px 28px rgba(28, 78, 118, 0.18);
}

.travel-penguin-walk {
  font-size: 2.8rem;
  margin-bottom: 8px;
  animation: waddle 0.5s ease-in-out infinite alternate;
}

.travel-title {
  font-family: "Fredoka", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.travel-bar-track {
  width: 100%;
  height: 14px;
  background: #e6f2fa;
  border-radius: 999px;
  overflow: hidden;
  border: 1.5px solid #bfe0f7;
}

.travel-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b9eff, #58b947);
  border-radius: 999px;
}

.travel-eta {
  margin-top: 8px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* PARK SCENE */
.park-scene {
  justify-content: flex-start;
  padding: 58px 14px 14px;
  gap: 10px;
  background: linear-gradient(180deg, #a8e0ff 0%, #d4f5dc 100%);
}

.park-hud {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  z-index: 6;
}

.park-stat {
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #88d4ab;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1b4332;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.park-playground {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 360px;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid #6bbf8a;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.park-bg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.park-avocado {
  position: absolute;
  left: 48%;
  bottom: 14%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 4;
  pointer-events: none;
  animation: parkExplore 5s ease-in-out infinite alternate;
}

.park-avocado-emoji {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.park-avocado-tag {
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid #52b788;
  border-radius: 999px;
  padding: 1px 8px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1b4332;
}

.pinecones-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
}

.pinecone-btn {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, filter 0.15s ease;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
}

.pinecone-btn:hover {
  transform: translate(-50%, -50%) scale(1.24) rotate(-8deg);
  filter: drop-shadow(0 0 8px rgba(255, 230, 109, 0.9));
}

.pinecone-btn svg {
  width: 28px;
  height: 28px;
}

.park-tip {
  font-family: "Fredoka", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1b4332;
  background: rgba(255, 255, 255, 0.85);
  padding: 5px 14px;
  border-radius: 999px;
}

/* PLACES PANEL (Right) */
.places-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.place-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.place-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #f8fcff;
  border: 2.5px solid #cde6f7;
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 0 #c2dff2;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.place-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #5aa9e6;
  background: #eef8ff;
}

.place-card:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #c2dff2;
}

.place-card.active-place {
  border-color: #58b947;
  background: #effcf0;
  box-shadow: 0 3px 0 #8bd17e;
}

.place-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.store-icon { background: #fff0d9; }
.park-icon { background: #dff7e6; }
.hardware-icon { background: #e2e8f0; }

.place-card.locked-place {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 3px 0 #cbd5e1;
}

.place-status.locked {
  background: #fef3c7;
  color: #92400e;
}

.hardware-menu {
  background: #f8fafc;
  border-color: #94a3b8;
}

.hardware-menu .store-menu-header {
  color: #334155;
}

.shop-item-btn.owned {
  background: #ecfdf5;
  border-color: #86efac;
  opacity: 0.85;
  cursor: default;
}

.shop-item-btn.owned .shop-price {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tips-list li {
  background: #f5fafe;
  border: 2px solid #d5e8f7;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-main);
}

.tips-list li:first-child {
  background: #faf5ff;
  border-color: #d8b4fe;
}

/* Death Screen */
.death-backdrop {
  z-index: 90;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
}

.death-card {
  border-color: #fda4af;
  text-align: center;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.death-icon {
  font-size: 3.5rem;
  line-height: 1;
}

.death-card h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #be123c;
}

.death-desc {
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.death-summary {
  background: #fff1f2;
  border: 2px solid #fecdd3;
  color: #9f1239;
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
}

.death-restart-btn {
  margin-top: 6px;
  padding: 11px 28px;
  font-size: 1.05rem;
}

/* Penguin Jump Launch Button & Park Footer */
.park-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.jump-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(180deg, #10b981, #059669);
  color: #ffffff;
  border: 2px solid #047857;
  border-radius: 999px;
  padding: 7px 16px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 #065f46;
  transition: transform 0.12s ease, filter 0.15s ease;
}

.jump-launch-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.jump-launch-btn:active {
  transform: translateY(1px);
}

.shop-name small {
  font-weight: 600;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Penguin Jump Modal */
.jump-modal-card {
  width: min(700px, 100%);
}

.jump-body {
  gap: 12px;
}

.jump-hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.jump-stat {
  background: #f0f9ff;
  border: 2px solid #c5e3f6;
  border-radius: 999px;
  padding: 5px 14px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.92rem;
  color: var(--text-main);
}

.jump-stat.reward-stat {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.jump-canvas-wrap {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid #9bd3f7;
  background: #dff4ff;
}

#jump-canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
}

.jump-overlay {
  position: absolute;
  inset: 0;
  background: rgba(29, 53, 87, 0.56);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  gap: 8px;
  color: #ffffff;
}

.jump-overlay-title {
  font-family: "Fredoka", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.jump-overlay-sub {
  font-size: 0.92rem;
  font-weight: 700;
  max-width: 440px;
  opacity: 0.95;
}

.jump-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.jump-tap-btn {
  background: linear-gradient(180deg, #3b9eff, #2563eb);
  border-color: #1d4ed8;
  box-shadow: 0 3px 0 #1e40af;
}

.jump-hint {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.jump-easy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ecfdf5;
  border: 2px solid #86efac;
  border-radius: 999px;
  padding: 5px 12px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  color: #166534;
  cursor: pointer;
}

.jump-easy-toggle input[type="checkbox"] {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: #10b981;
}

/* Firebase-Verified Developer Tools (mounted dynamically only for Rick F) */
.dev-toggle-btn {
  border-color: #a78bfa;
  background: #f5f3ff;
  color: #5b21b6;
}

.dev-toggle-btn:hover {
  border-color: #7c3aed;
  background: #ede9fe;
}

.dev-toggle-btn.active {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  border-color: #5b21b6;
  color: #ffffff;
}

.dev-panel {
  position: fixed;
  bottom: 66px;
  left: 18px;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 2.5px solid #8b5cf6;
  border-radius: 16px;
  padding: 8px 12px;
  box-shadow: 0 10px 24px rgba(91, 33, 182, 0.22);
  animation: slideDown 0.18s ease-out;
}

.dev-panel-label {
  font-family: "Fredoka", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #5b21b6;
  white-space: nowrap;
}

.dev-coin-input {
  width: 130px;
  border: 2px solid #c4b5fd;
  border-radius: 10px;
  padding: 6px 10px;
  font-family: "Nunito", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  user-select: text;
}

.dev-coin-input:focus {
  border-color: #7c3aed;
}

.dev-check-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 2px solid #059669;
  background: linear-gradient(180deg, #10b981, #059669);
  color: #ffffff;
  font-family: "Fredoka", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 #047857;
  transition: transform 0.1s ease, filter 0.12s ease;
}

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

.dev-check-btn:active {
  transform: translateY(1px);
}

.place-info {
  flex: 1;
}

.place-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.place-name {
  font-family: "Fredoka", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
}

.place-status {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.place-status.unlocked {
  background: #dcfce7;
  color: #166534;
}

.place-status.here {
  background: #3b9eff;
  color: #ffffff;
}

.place-meta {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.place-extra {
  margin-top: 4px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #2d6a4f;
}

/* Easy Store Submenu (below Easy Store) */
.store-menu {
  background: #fffaf0;
  border: 2.5px solid #f0c27b;
  border-radius: 15px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideDown 0.22s ease-out;
}

.store-menu-header {
  font-family: "Fredoka", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: #9c5700;
  padding: 0 4px;
}

.shop-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #ffffff;
  border: 2px solid #f2d5a7;
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
  font-family: "Fredoka", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: 0 2px 0 #ebd0a3;
  transition: transform 0.1s ease, background 0.12s ease, border-color 0.12s ease;
}

.shop-item-btn:hover {
  background: #fff6e0;
  border-color: #f0b429;
  transform: translateY(-1px);
}

.shop-item-btn:active {
  transform: translateY(1px);
}

.shop-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-emoji {
  font-size: 1.25rem;
}

.shop-price {
  background: #fff3cc;
  color: #9c6500;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1.5px solid #f0c24b;
}

/* Bottom Left Controls */
.bottom-left-bar {
  position: fixed;
  bottom: 14px;
  left: 18px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 2.5px solid #b9dbf3;
  border-radius: 14px;
  padding: 9px 14px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(28, 78, 118, 0.12);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.control-btn:hover {
  transform: translateY(-2px);
  border-color: #5aa9e6;
  background: #f5fbff;
}

.control-btn:active {
  transform: translateY(1px);
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Floating Popups */
.floating-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
}

.float-text {
  position: absolute;
  font-family: "Fredoka", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1d3557;
  text-shadow: 0 2px 0 #ffffff, 0 -1px 0 #ffffff, 1px 0 0 #ffffff, -1px 0 0 #ffffff;
  animation: floatUpFade 1.1s ease-out forwards;
  white-space: nowrap;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: #1d3557;
  color: #ffffff;
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(29, 53, 87, 0.28);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 42, 66, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: #ffffff;
  border: 3px solid #a9d6f5;
  border-radius: 22px;
  width: min(420px, 100%);
  box-shadow: 0 18px 40px rgba(20, 42, 66, 0.25);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f0f9ff;
  border-bottom: 2px solid #d4eaf9;
}

.modal-header h3 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 8px;
}

.modal-close:hover {
  background: #dceefa;
}

.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-desc {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.modal-desc code {
  background: #eef6fc;
  padding: 2px 6px;
  border-radius: 6px;
  color: #1d4ed8;
  font-weight: 700;
}

.field-label {
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: -6px;
}

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

.name-input-row input {
  flex: 1;
  border: 2px solid #bfdcf2;
  border-radius: 12px;
  padding: 9px 12px;
  font-family: "Nunito", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  user-select: text;
}

.name-input-row input:focus {
  border-color: #3b9eff;
}

.primary-btn {
  background: linear-gradient(180deg, #4da8ff, #2b86e6);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 9px 18px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 0 #1f68b8;
}

.primary-btn:hover {
  filter: brightness(1.06);
}

.setting-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f6fbff;
  border: 2px solid #dceefa;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
}

.setting-toggle-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.setting-info-box {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}

.modal-danger-zone {
  padding-top: 8px;
  border-top: 1.5px solid #e6eff7;
  display: flex;
  justify-content: flex-end;
}

.danger-btn {
  background: #fff1f2;
  color: #be123c;
  border: 2px solid #fecdd3;
  border-radius: 11px;
  padding: 8px 14px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.danger-btn:hover {
  background: #ffe4e6;
}

footer {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 0;
}

/* Animations */
@keyframes penguinIdle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(1.2deg); }
}

@keyframes penguinSleepBreath {
  0%, 100% { transform: scaleY(1) translateY(0); }
  50% { transform: scaleY(0.96) translateY(3px); }
}

@keyframes penguinBounce {
  0% { transform: scale(1, 1) translateY(0); }
  35% { transform: scale(1.08, 0.92) translateY(-14px); }
  70% { transform: scale(0.96, 1.04) translateY(-4px); }
  100% { transform: scale(1, 1) translateY(0); }
}

@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes driftCloud {
  0% { transform: translateX(-18px); }
  50% { transform: translateX(22px); }
  100% { transform: translateX(-18px); }
}

@keyframes waddle {
  0% { transform: rotate(-10deg) translateY(0); }
  100% { transform: rotate(10deg) translateY(-6px); }
}

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

@keyframes floatUpFade {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.95); }
  100% { opacity: 0; transform: translate(-50%, -56px) scale(1.1); }
}

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

@keyframes parkExplore {
  0% { left: 42%; }
  100% { left: 56%; }
}

/* Responsive Layout */
@media (max-width: 1024px) {
  .top-hud {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .hud-left, .hud-right {
    justify-content: center;
  }
  .main-grid {
    grid-template-columns: 1fr;
  }
  .center-stage {
    order: -1;
    min-height: 460px;
  }
  .bottom-left-bar {
    position: static;
    justify-content: center;
    margin-top: 8px;
  }
  .app-shell {
    padding-bottom: 24px;
  }
}
