/* ============ マイページ ============ */

.login-message {
  text-align: center;
  padding: 12px 0;
  color: #8FA9BB;
  font-size: 14px;
}

/* ---- プロフィールカード ---- */
.profile-card {
  padding: 20px;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FBD3E0, #F48FB1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: white;
  flex: none;
  cursor: pointer;
  overflow: hidden;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 20px;
  font-weight: 800;
  color: #3E5C70;
  margin-bottom: 4px;
}

.profile-level {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #F6C26B;
}

.level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F6C26B;
  display: inline-block;
}

/* ---- スタッツ ---- */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #F7FBFE;
  border-radius: 16px;
  padding: 16px 8px;
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: #6EC2EE;
  line-height: 1;
  margin-bottom: 4px;
}

.badge-count {
  color: #F6C26B;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #8FA9BB;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: #DCEAF3;
}

/* ---- カードヘッダー行 ---- */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header-row h2 {
  margin: 0;
}

.see-all {
  font-size: 12px;
  font-weight: 700;
  color: #6EC2EE;
  cursor: pointer;
}

/* ---- バッジグリッド ---- */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.badge-item {
  text-align: center;
}

.badge-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 6px;
  border: 3px solid transparent;
}

.badge-item.earned .badge-circle {
  border-color: rgba(255,255,255,.8);
  box-shadow: 0 2px 8px rgba(90,160,210,.2);
}

.badge-item.locked .badge-circle {
  border: 3px dashed #DCEAF3;
}

.badge-label {
  font-size: 10px;
  font-weight: 700;
  color: #8FA9BB;
  line-height: 1.3;
}

.badge-item.earned .badge-label {
  color: #4A6B80;
}

/* ---- タブ（ランキング） ---- */
.tab-wrap {
  display: flex;
  background: #EAF2F7;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 14px;
  border: none;
}

.tab-btn {
  flex: 1;
  padding: 9px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: #8FA9BB;
  border: none;
  background: none;
  border-radius: 999px;
  margin: 0;
  width: auto;
  box-shadow: none;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, .5);
}

.tab-btn.active {
  color: #4FA8D8;
  background: #fff;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(90, 160, 210, .15);
}

.loading-text {
  text-align: center;
  color: #8FA9BB;
  font-size: 14px;
  padding: 20px;
}

/* ---- 自分の順位表示 ---- */
.my-rank-display {
  text-align: center;
  padding: 12px 0 4px;
}

.my-rank-number {
  font-size: 48px;
  font-weight: 800;
  color: #4FA8D8;
  line-height: 1;
}

.my-rank-number .unit {
  font-size: 20px;
  font-weight: 700;
  margin-left: 2px;
}

.my-rank-total {
  font-size: 13px;
  font-weight: 700;
  color: #8FA9BB;
  margin-top: 8px;
}

.my-rank-count {
  font-size: 13px;
  font-weight: 700;
  color: #7CB342;
  margin-top: 4px;
}

/* ---- メニュー ---- */
.menu-card {
  padding: 8px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background .15s;
  border-radius: 12px;
}

.menu-item:hover {
  background: #F7FBFE;
}

.menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: none;
}

.menu-label {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: #3E5C70;
}

.menu-arrow {
  font-size: 20px;
  color: #B0C8D8;
  font-weight: 700;
}

/* ---- プロフィール編集 ---- */
.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  color: #8FA9BB;
  font-weight: 700;
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #DCEAF3;
  border-radius: 14px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  color: #3E5C70;
  outline: none;
  box-sizing: border-box;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: #6EC2EE;
}

/* ---- メッセージ ---- */
.message {
  padding: 12px;
  border-radius: 12px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  display: none;
  text-align: center;
}

.message.success {
  background: #DFF0D0;
  color: #5A8A3A;
}

.message.error {
  background: #FBE1EA;
  color: #C0506A;
}

/* ---- ログアウトボタン ---- */
.logout-btn {
  background: #EAF2F7;
  color: #8FA9BB;
  box-shadow: none;
}

.logout-btn:hover {
  background: #DCEAF3;
}