body.my-page {
  min-height: 100vh;
  margin: 0;
  padding: 14px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  color: #17345f;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.6), transparent 34%),
    linear-gradient(180deg, rgba(236, 248, 255, 0.96), rgba(214, 233, 255, 0.98)),
    url("assets/images/backgrounds/common/cloud-kingdom-game-bg.jpg") center bottom / cover fixed no-repeat,
    #dcefff;
  overflow-x: hidden;
}

body.my-page *,
body.my-page *::before,
body.my-page *::after {
  box-sizing: border-box;
  text-shadow: none !important;
}

.my-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.my-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 12px 16px;
}

.my-title-block {
  min-width: 0;
}

.my-eyebrow,
.my-section-tag {
  margin: 0;
  color: #4f82c4;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
}

.my-title-block h1,
.my-trial-head h2,
.my-section-head h2,
.my-phone-head h2,
.my-phone-head h3 {
  margin: 4px 0 0;
  color: #17345f;
  font-size: 20px;
  font-weight: 1000;
  line-height: 1.15;
}

.my-back-link,
.my-record-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1.5px solid rgba(91, 137, 190, 0.5);
  border-radius: 999px;
  color: #1e4778;
  background: linear-gradient(180deg, #ffffff, #def2ff);
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.my-record-link-ghost {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.my-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
  align-items: start;
}

.my-trial,
.my-learning,
.my-invitation,
.my-phone-panel,
.my-stats-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.my-trial {
  grid-column: 1 / -1;
}

.my-trial-head,
.my-section-head,
.my-phone-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.my-trial-body {
  display: grid;
  gap: 8px;
}

.my-trial-copy span,
.my-mini-stat span,
.my-section-note,
.my-account-summary span {
  color: #5b7598;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.my-section-note {
  display: block;
  margin-top: -2px;
}

.my-account-summary {
  display: grid;
  gap: 8px;
}

.my-account-row {
  display: grid;
  gap: 4px;
}

.my-account-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.my-account-value-row strong,
.my-account-row strong {
  color: #17345f;
  font-size: 24px;
  font-weight: 1000;
  line-height: 1.2;
}

.my-trial-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.my-trial-copy strong {
  color: #17345f;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 1000;
  line-height: 1;
}

.my-progress {
  height: 14px;
  padding: 2px;
  border: 1px solid rgba(91, 137, 190, 0.28);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(229, 243, 255, 0.9), rgba(248, 252, 255, 0.95));
  overflow: hidden;
}

.my-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8fd4ff, #5ba7f0 56%, #3766c7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease;
}

.my-trial-body p {
  margin: 0;
  color: #54729a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.my-learning {
  min-height: 0;
}

.my-deck-list {
  display: grid;
  gap: 8px;
}

.my-deck-card {
  padding: 12px;
  border: 1.5px solid rgba(91, 137, 190, 0.35);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(229, 243, 255, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.my-deck-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.my-deck-top strong {
  display: block;
  color: #17345f;
  font-size: 16px;
  font-weight: 1000;
  line-height: 1.2;
}

.my-deck-top span,
.my-deck-footer {
  color: #59779b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.my-deck-pill {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(95, 151, 222, 0.12);
  color: #2c5f9d;
  font-size: 12px;
  font-weight: 900;
  line-height: 28px;
}

.my-deck-empty {
  padding: 18px 14px;
  border: 1px dashed rgba(91, 137, 190, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  color: #5b7598;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.my-record-open {
  overflow: hidden;
}

.my-record-dialog {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
}

.my-record-dialog.hidden {
  display: none;
}

.my-record-mask {
  position: absolute;
  inset: 0;
  background: rgba(37, 72, 115, 0.32);
  backdrop-filter: blur(8px);
}

.my-record-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  padding: 16px;
  overflow: hidden;
}

.my-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.my-record-head strong {
  display: block;
  margin-top: 6px;
  color: #17345f;
  font-size: 22px;
  font-weight: 1000;
  line-height: 1.15;
}

.my-record-close {
  min-height: 36px;
  padding: 0 14px;
  border: 1.5px solid rgba(91, 137, 190, 0.5);
  border-radius: 999px;
  color: #1e4778;
  background: linear-gradient(180deg, #ffffff, #def2ff);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.my-record-body {
  display: grid;
  grid-template-columns: minmax(210px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.my-record-decks,
.my-record-detail {
  min-height: 0;
  overflow: auto;
}

.my-record-decks {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: calc(100vh - 172px);
  padding-right: 2px;
}

.my-record-deck {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 1.5px solid rgba(91, 137, 190, 0.28);
  border-radius: 14px;
  color: #17345f;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(234, 246, 255, 0.86));
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.my-record-deck.active {
  border-color: rgba(70, 131, 218, 0.72);
  background: linear-gradient(180deg, #ffffff, #dff1ff);
  box-shadow: inset 0 0 0 1px rgba(105, 172, 244, 0.24);
}

.my-record-deck strong {
  font-size: 15px;
  font-weight: 1000;
  line-height: 1.2;
}

.my-record-deck span,
.my-record-empty {
  color: #5b7598;
  font-size: 13px;
  font-weight: 800;
}

.my-record-detail {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 172px);
}

.my-record-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.my-record-summary div {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px;
  border: 1.5px solid rgba(91, 137, 190, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(234, 246, 255, 0.86));
}

.my-record-summary span {
  color: #5b7598;
  font-size: 13px;
  font-weight: 800;
}

.my-record-summary strong {
  align-self: end;
  color: #17345f;
  font-size: 22px;
  font-weight: 1000;
  line-height: 1;
}

.my-record-table {
  display: grid;
  gap: 6px;
}

.my-record-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, 1.2fr) 64px 76px;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(91, 137, 190, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: #17345f;
  font-size: 13px;
  font-weight: 800;
}

.my-record-row-head {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #5b7598;
  background: #edf7ff;
}

.my-record-row strong {
  color: #2c5f9d;
  font-weight: 1000;
}

.my-record-row span,
.my-record-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.my-stats-panel {
  grid-template-columns: 1fr;
}

.my-mini-stat {
  display: grid;
  gap: 6px;
  min-height: 100px;
  padding: 14px;
  border: 1.5px solid rgba(91, 137, 190, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(234, 246, 255, 0.88));
}

.my-mini-stat strong {
  align-self: end;
  color: #17345f;
  font-size: 26px;
  font-weight: 1000;
  line-height: 1;
}

.my-mini-stat:last-child strong {
  font-size: 22px;
}

@media (max-width: 920px) {
  .my-dashboard {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body.my-page {
    padding: 12px 12px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .my-topbar {
    padding: 10px 12px;
  }

  .my-title-block h1,
  .my-trial-head h2,
  .my-section-head h2,
  .my-phone-head h2 {
    font-size: 20px;
  }

  .my-eyebrow,
  .my-section-tag {
    font-size: 16px;
  }

  .my-trial,
  .my-learning,
  .my-invitation,
  .my-stats-panel {
    padding: 12px;
  }

  .my-record-dialog {
    padding: 10px;
  }

  .my-record-panel {
    max-height: calc(100vh - 20px);
    padding: 12px;
  }

  .my-record-body {
    grid-template-columns: 1fr;
  }

  .my-record-decks {
    display: flex;
    overflow-x: auto;
    max-height: none;
    padding-bottom: 2px;
  }

  .my-record-deck {
    min-width: 190px;
  }

  .my-record-detail {
    max-height: calc(100vh - 238px);
  }

  .my-record-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .my-record-row {
    grid-template-columns: minmax(78px, 1fr) minmax(92px, 1fr) 48px 64px;
    gap: 6px;
    padding: 8px;
    font-size: 12px;
  }

  .my-trial-head,
  .my-section-head,
  .my-phone-head,
  .my-trial-copy {
    align-items: flex-start;
  }

  .my-mini-stat {
    min-height: 88px;
  }

  .my-mini-stat strong {
    font-size: 22px;
  }
}

.my-vip-link {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border-color: rgba(183, 117, 24, 0.55);
  color: #74480d;
  background: linear-gradient(180deg, #fff5cf, #f5d77b);
  font-size: 13px;
}

.my-activation-row { display: flex; gap: 12px; align-items: center; }
.my-activation-row input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid rgba(92, 67, 45, .22); border-radius: 8px; background: rgba(255,255,255,.8); color: #4b3025; font: inherit; }
.my-activation-row button { height: 42px; padding: 0 16px; border: 0; border-radius: 8px; background: #ff7657; color: #fff; font: inherit; cursor: pointer; }
.my-activation-row button:disabled { opacity: .6; cursor: wait; }
.my-activation-message { min-height: 1.4em; margin: 10px 0 0; color: #7a5c4d; font-size: .92rem; }
@media (max-width: 520px) { .my-activation-row { align-items: stretch; flex-direction: column; } .my-activation-row button { width: 100%; } }
/* Keep the weekly code action inside the membership card. */
.my-activation { margin-top: 4px; padding-top: 12px; border-top: 1px solid rgba(91, 117, 152, .18); }
.my-activation-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.my-activation-head .my-section-tag { margin: 0; }
.my-activation-head > span { color: #7890ad; font-size: 12px; font-weight: 700; }
.my-activation-row { gap: 10px; }
.my-activation-row input { height: 40px; border: 1px solid #c8d9ed; border-radius: 10px; background: #fff; color: #17345f; font-size: 14px; }
.my-activation-row button { min-width: 92px; height: 40px; padding: 0 14px; border-radius: 10px; background: #ff7657; font-size: 14px; font-weight: 800; }
.my-activation-message { min-height: 18px; margin: 6px 0 0; color: #7890ad; font-size: 12px; font-weight: 700; }
.my-activation-help {
  display: block;
  margin: 0 auto;
  padding: 4px 8px;
  border: 0;
  color: #3976bd;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.my-code-help-open { overflow: hidden; }
.my-code-help-dialog {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
}
.my-code-help-dialog.hidden { display: none; }
.my-code-help-mask {
  position: absolute;
  inset: 0;
  background: rgba(37, 72, 115, 0.42);
  backdrop-filter: blur(6px);
}
.my-code-help-panel {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(360px, 100%);
  padding: 22px 20px 20px;
  text-align: center;
}
.my-code-help-panel .my-section-tag { margin: 0 48px 2px; }
.my-code-help-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #b8d2ef;
  border-radius: 8px;
  color: #315f94;
  background: #f5fbff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.my-code-help-qr {
  display: block;
  width: min(240px, 72vw);
  aspect-ratio: 1;
  margin-top: 4px;
  border: 1px solid #c9def5;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}
.my-code-help-qr.hidden { display: none; }
.my-code-help-loading { display: grid; place-items: center; align-content: center; gap: 12px; color: #6b83a2; font-size: 14px; font-weight: 700; }
.my-code-help-loading.hidden { display: none; }
.my-code-help-spinner { width: 28px; height: 28px; border: 3px solid #d8e8f8; border-top-color: #4f86c6; border-radius: 50%; animation: my-code-help-spin 0.8s linear infinite; }
@keyframes my-code-help-spin { to { transform: rotate(360deg); } }
.my-code-help-panel strong { color: #17345f; font-size: 17px; }
.my-code-help-panel > p:last-child { margin: -4px 0 0; color: #6b83a2; font-size: 13px; font-weight: 700; }
.my-registration-panel { gap: 12px; padding-top: 28px; }
.my-registration-panel .my-section-tag { margin-bottom: 2px; }
.my-registration-panel > p { margin: 0; color: #6b83a2; font-size: 13px; font-weight: 700; }
.my-registration-action {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #ff7657;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
@media (max-width: 520px) {
  .my-activation-row { flex-direction: row; align-items: center; }
  .my-activation-row button { width: auto; min-width: 86px; }
}
.my-invitation { min-width: 0; }
.my-invitation .my-section-head { align-items: flex-start; }
.my-invitation-copy { width: 100%; max-width: 100%; box-sizing: border-box; margin: 10px 0 14px; color: #5b7598; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: normal; }
.my-invitation-btn { display: block; width: min(100%, 180px); min-width: 0; min-height: 40px; margin: 12px auto 0; padding: 0 14px; box-sizing: border-box; border: 0; border-radius: 10px; background: #ff7657; color: #fff; font-size: 14px; font-weight: 800; line-height: 40px; white-space: nowrap; text-align: center; cursor: pointer; }
.my-invitation-dialog { width: min(92vw, 360px); max-width: 100%; box-sizing: border-box; gap: 12px; overflow: hidden; }
.my-invitation-dialog > p:last-child { width: 100%; max-width: 100%; box-sizing: border-box; margin: 0; line-height: 1.55; overflow-wrap: anywhere; white-space: normal; }
@media (max-width: 420px) {
  .my-invitation { padding-left: 16px; padding-right: 16px; }
  .my-invitation .my-section-head { gap: 8px; }
  .my-invitation .my-section-tag, .my-invitation .my-section-note { font-size: 15px; }
}




/* Invitation card alignment */
.my-invitation .my-invitation-copy { color: #17345f; font-weight: 1000; }
.my-invitation .my-invited-count { display: block; width: 100%; margin: 10px 0 0; color: #5b7598; font-size: 15px; font-weight: 800; line-height: 1.4; text-align: center; }

