/* =========================================================
   Duovly — My Page (마이페이지) design layer
   Reproduces ui_kits/app/MyPage.html look inside profile.js.
   Uses tokens.css variables only (no raw hex for palette).
   letter-spacing fixed to 0 (token spec). Namespaced `mp-*`
   to avoid colliding with global .menu-* (Settings screen).
   ========================================================= */

.mp-screen {
  background:
    radial-gradient(120% 60% at 50% 0%, var(--coral-50) 0%, transparent 46%),
    linear-gradient(180deg, var(--warm-white) 0%, var(--surface) 70%);
  padding-bottom: 88px;
}

/* ---- header ---- */
.mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}
.mp-header__title {
  font-size: var(--fs-h1);
  font-weight: var(--fw-heavy);
  color: var(--ink-900);
  letter-spacing: 0;
  margin: 0;
}
.mp-header__set {
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-700);
  border: 1px solid var(--border);
  background: radial-gradient(120% 120% at 30% 22%, var(--surface) 0 38%, var(--surface-sunken) 100%);
  box-shadow: inset 0 1px 1.5px rgba(255,255,255,0.95), var(--sh-2);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.mp-header__set:hover { transform: translateY(-1px); box-shadow: inset 0 1px 1.5px rgba(255,255,255,0.95), var(--sh-3); }
.mp-header__set:active { transform: scale(0.96); }
.mp-header__set svg { width: 21px; height: 21px; }

/* ---- profile card (signature card) ---- */
.mp-profile {
  margin: 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-card);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  width: calc(100% - 32px);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.mp-profile:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.mp-profile:active { transform: translateY(0) scale(0.995); }
.mp-profile__av {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.mp-profile__av .avatar-wrap,
.mp-profile__av img {
  width: 64px !important;
  height: 64px !important;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-sunken);
  display: block;
}
.mp-profile__ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2.5px solid var(--butter-500);
  pointer-events: none;
}
.mp-profile__m { flex: 1; min-width: 0; }
.mp-profile__nm {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: var(--fs-h2);
  font-weight: var(--fw-heavy);
  color: var(--ink-900);
  letter-spacing: 0;
  line-height: 1.2;
}
.mp-profile__tier {
  font-size: 10.5px;
  font-weight: var(--fw-heavy);
  color: var(--on-action);
  background: linear-gradient(135deg, var(--butter-500), var(--warning));
  padding: 2px 8px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.mp-profile__id {
  font-size: var(--fs-meta);
  font-weight: var(--fw-semibold);
  color: var(--ink-400);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0;
}
.mp-profile__edit {
  background: var(--surface);
  border: 1.4px solid var(--border);
  border-radius: var(--r-sm);
  min-height: 44px;
  padding: 0 14px;
  font-size: var(--fs-meta);
  font-weight: var(--fw-heavy);
  color: var(--ink-700);
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.mp-profile__edit:hover { background: var(--surface-sunken); border-color: var(--border-strong); }
.mp-profile__edit:active { transform: scale(0.97); }

/* ---- wallet 3-stat row ---- */
.mp-wallet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 12px 16px 0;
}
.mp-wcell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
  padding: 13px 8px;
  cursor: pointer;
  text-align: center;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.mp-wcell:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.mp-wcell:active { transform: translateY(0) scale(0.98); }
.mp-wcell__ic {
  width: 34px;
  height: 34px;
  margin: 0 auto 7px;
  object-fit: contain;
}
.mp-wcell__v {
  font-size: var(--fs-h3);
  font-weight: var(--fw-heavy);
  color: var(--ink-900);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.mp-wcell__l {
  font-size: 10.5px;
  font-weight: var(--fw-bold);
  color: var(--ink-400);
  margin-top: 3px;
  letter-spacing: 0;
}
.mp-wcell--charge {
  background: linear-gradient(135deg, var(--butter-100), var(--butter-300));
  border-color: var(--butter-300);
}
.mp-wcell--charge .mp-wcell__l { color: var(--warning); }

/* ---- become-a-mate promo banner ---- */
.mp-promo {
  margin: 14px 16px 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  padding: 16px 112px 16px 16px;
  color: var(--on-action);
  text-align: left;
  width: calc(100% - 32px);
  cursor: pointer;
  background: linear-gradient(120deg, var(--mint-500), var(--mint-700));
  box-shadow: 0 12px 26px rgba(18,169,156,0.30);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.mp-promo:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(18,169,156,0.36); }
.mp-promo:active { transform: translateY(0) scale(0.99); }
.mp-promo__t {
  font-size: var(--fs-h3);
  font-weight: var(--fw-heavy);
  letter-spacing: 0;
}
.mp-promo__d {
  font-size: 11.5px;
  font-weight: var(--fw-semibold);
  color: rgba(255,255,255,0.88);
  margin-top: 4px;
  line-height: 1.45;
  letter-spacing: 0;
}
.mp-promo__img {
  position: absolute;
  right: 6px;
  bottom: -6px;
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.20));
  pointer-events: none;
}

/* ---- menu groups (signature card, real buttons) ---- */
.mp-grp { margin: 18px 16px 0; }
.mp-grp__t {
  font-size: var(--fs-meta);
  font-weight: var(--fw-heavy);
  color: var(--ink-400);
  margin: 0 4px 8px;
  letter-spacing: 0;
}
.mp-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
  overflow: hidden;
}
.mp-mi {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--ink-900);
  transition: background var(--dur-fast) var(--ease-out);
}
.mp-mi:last-child { border-bottom: none; }
.mp-mi:hover { background: var(--surface-warm); }
.mp-mi:active { background: var(--surface-sunken); }
.mp-mi__ic {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}
.mp-mi__ic--line {
  width: 24px;
  height: 24px;
  margin: 0 3px;
  color: var(--ink-500);
  stroke: currentColor;
  fill: none;
}
.mp-mi__l {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--ink-900);
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-mi__r {
  font-size: var(--fs-meta);
  font-weight: var(--fw-bold);
  color: var(--ink-400);
  letter-spacing: 0;
  flex-shrink: 0;
}
.mp-mi__r--ok { color: var(--mint-600); }
.mp-mi__badge {
  font-size: 10.5px;
  font-weight: var(--fw-heavy);
  color: var(--on-action);
  background: var(--coral-500);
  border-radius: var(--r-pill);
  padding: 1px 8px;
  flex-shrink: 0;
  letter-spacing: 0;
}
.mp-mi__chev {
  width: 18px;
  height: 18px;
  color: var(--ink-400);
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .mp-header__set,
  .mp-profile,
  .mp-wcell,
  .mp-promo,
  .mp-profile__edit,
  .mp-mi {
    transition: none;
  }
  .mp-header__set:hover,
  .mp-header__set:active,
  .mp-profile:hover,
  .mp-profile:active,
  .mp-wcell:hover,
  .mp-wcell:active,
  .mp-promo:hover,
  .mp-promo:active,
  .mp-profile__edit:active { transform: none; }
}
