/* 데스크탑에서는 savedNutritionCount 숨기기 */
#savedNutritionCount {
  display: none;
}

/* 기본 미니게임 버튼 스타일 (768px 이하 기본값) */
.go-mini-game-btn {
  display: inline-block;
  margin: 0px auto 0 auto;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #6ee7b7 0%, #3b82f6 100%);
  border: none;
  border-radius: 22px;
  box-shadow: 0 3px 10px rgba(42, 125, 225, 0.12);
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
  position: relative;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 140px;
}

.go-mini-game-btn:hover,
.go-mini-game-btn:focus {
  background: linear-gradient(90deg, #3b82f6 0%, #6ee7b7 100%);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 15px rgba(42, 125, 225, 0.2);
}

.go-mini-game-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.go-mini-game-btn::before {
  content: "🎮";
  margin-right: 7px;
  vertical-align: baseline;
  display: inline-block;
  line-height: 1;
  font-size: 1rem;
}

.saved-meals-mini-preview {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.mini-meal-card {
  background: #f8faff;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(42, 125, 225, 0.07);
  padding: 12px 16px 10px 16px;
  min-width: 140px;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  transition: box-shadow 0.2s, border 0.2s;
}
.mini-meal-card:focus,
.mini-meal-card:hover {
  cursor: pointer;
}
.mini-meal-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: #27408b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.mini-meal-ingredient {
  font-size: 0.92rem;
  color: #4a69bd;
  margin-bottom: 2px;
}
.mini-meal-date {
  font-size: 0.85rem;
  color: #888;
}
.mini-meal-emoji {
  font-size: 1.25rem;
  margin-right: 4px;
}
.saved-supplements-mini-preview {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.mini-supplement-card {
  background: #f8faff;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(42, 125, 225, 0.07);
  padding: 12px 16px 10px 16px;
  min-width: 140px;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  transition: box-shadow 0.2s, border 0.2s;
}
.mini-supplement-card:focus,
.mini-supplement-card:hover {
  cursor: pointer;
}
.mini-supplement-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: #27408b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.mini-supplement-category {
  font-size: 0.92rem;
  color: #4a69bd;
  margin-bottom: 2px;
}
.mini-supplement-date {
  font-size: 0.85rem;
  color: #888;
}
.mini-supplement-emoji {
  font-size: 1.25rem;
  margin-right: 4px;
}
.mypage-profile-card {
  cursor: pointer;
}
.mypage-profile-card:focus,
.mypage-profile-card:hover {
  cursor: pointer;
}
.mypage-points-card {
  cursor: pointer;
}
.mypage-points-card:focus,
.mypage-points-card:hover {
  cursor: pointer;
}
.points-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.current-points {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
}
.points-icon {
  font-size: 1.5rem;
}
.points-value {
  font-size: 2rem;
  font-weight: 700;
}
.points-unit {
  font-size: 1.2rem;
  font-weight: 500;
  opacity: 0.9;
}
.points-history {
  max-height: 120px;
  overflow-y: auto;
}
.points-loading {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  padding: 8px;
}
.points-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}
.points-history-item:last-child {
  border-bottom: none;
}
.points-history-description {
  color: #4a69bd;
  flex: 1;
}
.points-history-amount {
  font-weight: 600;
  margin-left: 8px;
}
.points-history-amount.positive {
  color: #10b981;
}
.points-history-amount.negative {
  color: #ef4444;
}
.points-history-date {
  font-size: 0.8rem;
  color: #888;
  margin-left: 8px;
}
.mypage-stats-row {
  margin-top: 24px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 12px;
}
.stat-item {
  text-align: center;
  padding: 16px 12px;
  background: #f8faff;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  transition: all 0.2s ease;
}
.stat-item:hover {
  border-color: #4a69bd;
  box-shadow: 0 4px 12px rgba(42, 125, 225, 0.1);
}
.stat-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.9rem;
  color: #4a69bd;
  font-weight: 500;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #27408b;
}
/* 마이페이지 카드 레이아웃 */
.mypage-dashboard-row1,
.mypage-dashboard-row2,
.mypage-dashboard-row3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.mypage-card {
  background: #f8faff;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
  position: relative;
}

.mypage-card:hover {
  border-color: #4a69bd;
  box-shadow: 0 4px 12px rgba(42, 125, 225, 0.15);
}

.mypage-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #27408b;
  margin-bottom: 16px;
}

.mypage-edit-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1.1rem;
}

.mypage-profile-flex {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mypage-profile-avatar {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.mypage-profile-info {
  flex: 1;
}

.mypage-card-content {
  font-size: 0.95rem;
  line-height: 1.6;
}

.mypage-card-content > div {
  margin-bottom: 4px;
}

/* 스토어 마이페이지 모달 - store.html과 동일한 스타일 적용 */
.storeMypage-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.storeMypage-backdrop.active {
  display: flex;
}
.storeMypage-modal {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}
.storeMypage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8f9fa;
}
.storeMypage-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}
.storeMypage-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}
.storeMypage-close:hover {
  background-color: #f3f4f6;
}
.storeMypage-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.storeMypage-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 10px;
}
.storeMypage-tab {
  padding: 10px 20px;
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.2s;
}
.storeMypage-tab.active {
  background: #3b82f6;
  color: white;
}
.storeMypage-tab:hover:not(.active) {
  background: #e5e7eb;
}
.storeMypage-content .tab {
  display: none;
}
.storeMypage-content .tab.active {
  display: block;
}
.storeMypage-empty {
  text-align: center;
  color: #6b7280;
  padding: 40px 20px;
  font-size: 1rem;
}
.storeMypage-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.storeMypage-cardRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  transition: box-shadow 0.2s;
}
.storeMypage-cardRow:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.storeMypage-orderStatus {
  font-weight: 600;
  color: #059669;
  background: #d1fae5;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
}
.storeMypage-reviewRating {
  color: #f59e0b;
  font-size: 1.2rem;
}
.saved-nutrition-mini-preview {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.mini-nutrition-card {
  background: #f8faff;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(42, 125, 225, 0.07);
  padding: 12px 16px 10px 16px;
  min-width: 140px;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  transition: box-shadow 0.2s, border 0.2s;
}
.mini-nutrition-card:focus,
.mini-nutrition-card:hover {
  cursor: pointer;
  border-color: #4a69bd;
  box-shadow: 0 4px 12px rgba(42, 125, 225, 0.15);
}
.mini-nutrition-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: #27408b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.mini-nutrition-category {
  font-size: 0.92rem;
  color: #4a69bd;
  margin-bottom: 2px;
}
.mini-nutrition-date {
  font-size: 0.85rem;
  color: #888;
}
.mini-nutrition-emoji {
  font-size: 1.25rem;
  margin-right: 4px;
}
.mypage-nutrition-card {
  cursor: pointer;
}
.mypage-nutrition-card:focus,
.mypage-nutrition-card:hover {
  cursor: pointer;
}

/* 스토어 활동 카드 전용 스타일 */
.store-activity-card {
  background: #ffffff;
  color: #1f2937;
  border: 2px solid #e5e7eb;
  position: relative;
  overflow: hidden;
}

.store-activity-card .mypage-card-title {
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
  font-weight: 700;
}

.store-icon {
  font-size: 1.2rem;
  filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.store-activity-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.activity-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.activity-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

.activity-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 2px;
  font-weight: 500;
}

.activity-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
}

.store-activity-btn {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.store-activity-btn:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-icon {
  font-size: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 공통 활동 카드 스타일 */
.profile-activity-card,
.nutrition-activity-card,
.points-activity-card,
.meal-activity-card,
.supplement-activity-card,
.stats-activity-card {
  background: #ffffff;
  color: #1f2937;
  border: 2px solid #e5e7eb;
  position: relative;
  overflow: hidden;
}

/* 공통 제목 스타일 */
.profile-activity-card .mypage-card-title,
.nutrition-activity-card .mypage-card-title,
.points-activity-card .mypage-card-title,
.meal-activity-card .mypage-card-title,
.supplement-activity-card .mypage-card-title,
.stats-activity-card .mypage-card-title {
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
  font-weight: 700;
}

/* 아이콘 스타일 */
.profile-icon,
.nutrition-icon,
.points-icon,
.meal-icon,
.supplement-icon,
.stats-icon {
  font-size: 1.2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 통계 레이아웃 */
.profile-activity-stats,
.nutrition-activity-stats,
.points-activity-stats,
.meal-activity-stats,
.supplement-activity-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.stats-activity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

/* 활동 정보 레이아웃 */
.activity-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 버튼 스타일 */
.profile-activity-btn,
.nutrition-activity-btn,
.points-activity-btn,
.meal-activity-btn,
.supplement-activity-btn,
.stats-activity-btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

/* 설정 버튼 스타일 */

#settingsBtn:focus {
  outline: 2px solid #4a69bd;
  outline-offset: 2px;
}

/* 마이페이지 전용 body 스타일 */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* 활동 버튼 배경색 통일 */
.store-activity-btn,
.profile-activity-btn,
.nutrition-activity-btn,
.points-activity-btn,
.meal-activity-btn,
.supplement-activity-btn {
  background: #4a69bd !important;
  box-shadow: 0 4px 15px rgba(74, 105, 189, 0.3) !important;
}

.store-activity-btn:hover,
.profile-activity-btn:hover,
.nutrition-activity-btn:hover,
.points-activity-btn:hover,
.meal-activity-btn:hover,
.supplement-activity-btn:hover {
  background: #3b82f6 !important;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4) !important;
}
/* 마이페이지 제목 스타일 */
h1 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
}

/* 설정 버튼 기본 스타일 */
#settingsBtn {
  position: absolute;
  top: 90px;
  right: 16px;
  background: none;
  border: none;
  box-shadow: none;
  outline: none;
  padding: 8px 12px;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  z-index: 10;
  width: auto;
  min-width: 0;
  max-width: none;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

#settingsBtn:focus {
  outline: 2px solid #4a69bd;
  outline-offset: 2px;
}

#settingsText {
  font-size: 1.05rem;
  font-weight: 500;
  color: #4a69bd;
  text-decoration: underline;
}
.mypage-card-title {
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .container {
    padding: 16px 12px 100px 12px;
    margin: 0 auto;
    max-width: 100%;
  }

  h1 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 600;
  }

  #settingsBtn {
    top: 70px;
    right: 16px;
    padding: 8px 12px;
    border-radius: 20px;
  }

  #settingsText {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
  }

  /* 모바일 전용 컴팩트 레이아웃 */
  .mypage-dashboard-row1,
  .mypage-dashboard-row2,
  .mypage-dashboard-row3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }

  .mypage-card {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(74, 105, 189, 0.1);
  }

  .mypage-card-title {
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a69bd;
  }

  /* 모바일용 편집 아이콘 스타일 */
  .mypage-edit-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.9rem;
    opacity: 0.8;
  }

  /* 프로필 카드 컴팩트 디자인 */
  .mypage-profile-flex {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    text-align: left;
  }

  .mypage-profile-avatar {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    width: 6rem;
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mypage-profile-info {
    flex: 1;
    min-width: 0;
  }

  .mypage-card-content {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .mypage-card-content > div {
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* 포인트 카드 컴팩트 디자인 */
  .current-points {
    padding: 8px;
    gap: 4px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }

  .points-icon {
    font-size: 1.2rem;
  }

  .points-value {
    font-size: 1.4rem;
    font-weight: 700;
  }

  .points-unit {
    font-size: 0.9rem;
  }

  /* 미니 카드들을 가로 스크롤로 변경 */
  .saved-meals-mini-preview,
  .saved-supplements-mini-preview,
  .saved-nutrition-mini-preview {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    box-sizing: border-box;
  }

  .saved-meals-mini-preview::-webkit-scrollbar,
  .saved-supplements-mini-preview::-webkit-scrollbar,
  .saved-nutrition-mini-preview::-webkit-scrollbar {
    display: none;
  }

  .mini-meal-card,
  .mini-supplement-card,
  .mini-nutrition-card {
    min-width: 80px;
    max-width: 80px;
    padding: 6px 8px;
    border-radius: 12px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8faff 0%, #e8f4fd 100%);
    border: 1px solid rgba(74, 105, 189, 0.15);
    box-sizing: border-box;
    overflow: hidden;
  }

  .mini-meal-title,
  .mini-supplement-title,
  .mini-nutrition-title {
    font-size: 0.7rem;
    max-width: 64px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mini-meal-ingredient,
  .mini-supplement-category,
  .mini-nutrition-category {
    font-size: 0.7rem;
    margin-bottom: 2px;
    color: #666;
  }

  .mini-meal-date,
  .mini-supplement-date,
  .mini-nutrition-date {
    font-size: 0.65rem;
    color: #888;
  }

  .mini-meal-emoji,
  .mini-supplement-emoji,
  .mini-nutrition-emoji {
    font-size: 1rem;
    margin-right: 2px;
  }

  /* 통계 그리드를 4열로 유지 */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .stat-item {
    padding: 12px 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8faff 0%, #e8f4fd 100%);
    border: 1px solid rgba(74, 105, 189, 0.15);
    text-align: center;
  }

  .stat-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
  }

  .stat-label {
    font-size: 0.75rem;
    margin-bottom: 2px;
    font-weight: 500;
  }

  .stat-value {
    font-size: 1rem;
    font-weight: 600;
  }

  /* 모바일용 미니게임 버튼 스타일 */
  .go-mini-game-btn {
    padding: 6px 18px;
    font-size: 0.7rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(42, 125, 225, 0.07);
    transition: background 0.2s, transform 0.1s;
    min-width: auto;
  }

  .go-mini-game-btn:hover,
  .go-mini-game-btn:focus {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(42, 125, 225, 0.15);
  }

  .go-mini-game-btn::before {
    margin-right: 6px;
    font-size: 1rem;
  }

  /* 모바일에서 savedNutritionPreview 숨기고 savedNutritionCount 보이기 */
  #savedNutritionPreview {
    display: none !important;
  }

  #savedNutritionCount {
    display: block !important;
  }
  .go-mini-game-btn {
    display: inline-block;
    margin: 0px auto 0 auto;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #6ee7b7 0%, #3b82f6 100%);
    border: none;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(42, 125, 225, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 160px;
  }

  .go-mini-game-btn:hover,
  .go-mini-game-btn:focus {
    background: linear-gradient(90deg, #3b82f6 0%, #6ee7b7 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(42, 125, 225, 0.25);
  }

  .go-mini-game-btn:active {
    transform: translateY(-1px) scale(0.98);
  }

  .go-mini-game-btn::before {
    content: "🎮";
    margin-right: 8px;
    vertical-align: baseline;
    display: inline-block;
    line-height: 1;
    font-size: 1.1rem;
  }

  /* 데스크탑용 모든 활동 카드 스타일 */
  .store-activity-card .mypage-card-title,
  .profile-activity-card .mypage-card-title,
  .nutrition-activity-card .mypage-card-title,
  .points-activity-card .mypage-card-title,
  .meal-activity-card .mypage-card-title,
  .supplement-activity-card .mypage-card-title,
  .stats-activity-card .mypage-card-title {
    font-size: 1.1rem;
    gap: 8px;
    margin-bottom: 20px;
    color: #1f2937;
    font-weight: 700;
  }

  .store-activity-stats,
  .profile-activity-stats,
  .nutrition-activity-stats,
  .points-activity-stats,
  .meal-activity-stats,
  .supplement-activity-stats {
    margin-bottom: 20px;
  }

  .stats-activity-grid {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
  }

  .activity-icon {
    font-size: 2rem;
    margin-bottom: 8px;
  }

  .activity-label {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #6b7280;
  }

  .activity-count {
    font-size: 1.4rem;
    color: #1f2937;
  }

  .store-activity-btn,
  .profile-activity-btn,
  .nutrition-activity-btn,
  .points-activity-btn,
  .meal-activity-btn,
  .supplement-activity-btn,
  .stats-activity-btn {
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 12px;
    gap: 10px;
    color: white;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 12px 8px 75px 8px;
    margin: 0 auto;
    max-width: 100%;
  }

  h1 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    font-weight: 600;
    text-align: center;
  }

  #settingsBtn {
    top: 40px;
    right: 0px;
    padding: 6px 10px;
    border-radius: 20px;
  }

  #settingsText {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
  }

  /* 모바일 전용 가로 레이아웃 */
  .mypage-dashboard-row1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
  }

  .mypage-dashboard-row2,
  .mypage-dashboard-row3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }

  .mypage-stats-row {
    margin-top: 0;
  }

  /* 모바일용 모든 활동 카드 스타일 */
  .store-activity-card,
  .profile-activity-card,
  .nutrition-activity-card,
  .points-activity-card,
  .meal-activity-card,
  .supplement-activity-card,
  .stats-activity-card {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
  }

  .store-activity-card .mypage-card-title,
  .profile-activity-card .mypage-card-title,
  .nutrition-activity-card .mypage-card-title,
  .points-activity-card .mypage-card-title,
  .meal-activity-card .mypage-card-title,
  .supplement-activity-card .mypage-card-title,
  .stats-activity-card .mypage-card-title {
    color: #1f2937;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    font-weight: 700;
  }

  .store-activity-stats,
  .nutrition-activity-stats,
  .points-activity-stats,
  .meal-activity-stats,
  .supplement-activity-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 8px;
  }

  .stats-activity-grid {
    display: flex;
    justify-content: space-around;
    margin-bottom: 8px;
  }

  .activity-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
  }

  .activity-icon {
    font-size: 1rem;
    margin-bottom: 2px;
  }

  .activity-label {
    font-size: 0.6rem;
    color: #6b7280;
    margin-bottom: 1px;
  }

  .activity-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1f2937;
  }

  .store-activity-btn,
  .profile-activity-btn,
  .nutrition-activity-btn,
  .points-activity-btn,
  .meal-activity-btn,
  .supplement-activity-btn,
  .stats-activity-btn {
    width: 100%;
    padding: 6px 8px;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .mypage-card-title {
    font-size: 0.75rem;
    margin-bottom: 6px;
    font-weight: 600;
    color: #4a69bd;
    text-align: center;
  }

  /* 480px 이하 모바일용 편집 아이콘 스타일 */
  .mypage-edit-icon {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.85rem;
    opacity: 0.7;
  }

  /* 모바일에서 savedNutritionPreview 숨기고 savedNutritionCount 보이기 */
  #savedNutritionPreview {
    display: none !important;
  }

  #savedNutritionCount {
    display: block !important;
  }

  /* 프로필 카드 - 가로 정렬로 변경 */
  .mypage-profile-flex {
    flex-direction: row;
    align-items: center;
    gap: 3px;
    text-align: left;
    flex: 1;
    justify-content: flex-start;
  }

  .mypage-profile-avatar {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mypage-profile-info {
    flex: 1;
    min-width: 0;
  }

  .mypage-card-content {
    font-size: 0.7rem;
    line-height: 1.4;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .mypage-card-content > div {
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
  }

  /* 포인트 카드 더 컴팩트하게 */
  .current-points {
    padding: 8px 4px;
    gap: 4px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 90px;
    width: 100%;
    box-sizing: border-box;
  }

  .points-display {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .points-icon {
    font-size: 1rem;
  }

  .points-value {
    font-size: 1.1rem;
    font-weight: 700;
  }

  .points-unit {
    font-size: 0.75rem;
  }

  /* 미니 카드들을 세로 스택으로 변경 */
  .saved-meals-mini-preview,
  .saved-supplements-mini-preview,
  .saved-nutrition-mini-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
    max-height: 120px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    box-sizing: border-box;
  }

  .saved-meals-mini-preview::-webkit-scrollbar,
  .saved-supplements-mini-preview::-webkit-scrollbar,
  .saved-nutrition-mini-preview::-webkit-scrollbar {
    display: none;
  }

  .mini-meal-card,
  .mini-supplement-card,
  .mini-nutrition-card {
    min-width: 100%;
    max-width: 100%;
    padding: 6px 8px;
    border-radius: 10px;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f8faff 0%, #e8f4fd 100%);
    border: 1px solid rgba(74, 105, 189, 0.1);
    box-sizing: border-box;
    overflow: hidden;
  }

  .mini-meal-title,
  .mini-supplement-title,
  .mini-nutrition-title {
    font-size: 0.7rem;
    max-width: none;
    flex: 1;
    margin-bottom: 0;
    font-weight: 600;
  }

  .mini-meal-ingredient,
  .mini-supplement-category,
  .mini-nutrition-category {
    font-size: 0.65rem;
    margin-bottom: 0;
    color: #666;
    flex-shrink: 0;
  }

  .mini-meal-date,
  .mini-supplement-date,
  .mini-nutrition-date {
    font-size: 0.6rem;
    color: #888;
    margin-left: auto;
    flex-shrink: 0;
  }

  .mini-meal-emoji,
  .mini-supplement-emoji,
  .mini-nutrition-emoji {
    font-size: 0.9rem;
    margin-right: 2px;
    flex-shrink: 0;
  }

  /* 통계 그리드를 4열 컴팩트 그리드로 변경 */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }

  .stat-item {
    padding: 6px 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8faff 0%, #e8f4fd 100%);
    border: 1px solid rgba(74, 105, 189, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 60px;
    min-width: 60px;
    justify-content: center;
  }

  .stat-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
    flex-shrink: 0;
  }

  .stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .stat-label {
    font-size: 0.65rem;
    margin-bottom: 1px;
    font-weight: 500;
    color: #666;
    line-height: 1.1;
  }

  .stat-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a69bd;
    line-height: 1.1;
  }
  n
        /* 480px 이하 모바일용 미니게임 버튼 스타일 */
        .go-mini-game-btn {
    padding: 4px 12px;
    font-size: 0.65rem;
    border-radius: 18px;
    box-shadow: 0 1px 4px rgba(42, 125, 225, 0.1);
    transition: background 0.2s, transform 0.1s;
    min-width: auto;
  }

  .go-mini-game-btn:hover,
  .go-mini-game-btn:focus {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 2px 8px rgba(42, 125, 225, 0.15);
  }

  .go-mini-game-btn::before {
    margin-right: 4px;
    font-size: 0.9rem;
  }
}
