.mh-page { padding-bottom: 3.5rem; container: member-home / inline-size; }
.mh-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(16px, 3vw, 44px);
  padding: clamp(22px, 3.6vw, 48px); min-height: 210px;
  background: var(--brand-deep); color: #fff; border-radius: 18px;
}
.mh-hero-copy { min-width: 0; }
.mh-hero h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 3.4vw, 3.3rem); overflow-wrap: anywhere; line-height: 1.25; color: #fff; }
.mh-hero .mh-intro {
  margin: 0 0 22px; max-width: 100%; line-height: 1.65; white-space: nowrap;
  overflow-x: auto; scrollbar-width: thin; scrollbar-color: #7aa596 transparent;
}
.mh-intro:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 3px; }
.mh-score-summary {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 14px 18px;
  min-height: 66px; align-self: center; justify-self: start; max-width: 100%;
  border: 1px solid #4f8070; border-radius: 14px; background: #1c483c; color: #fff;
  text-align: start; font: inherit; cursor: pointer;
}
.mh-score-summary:hover,.mh-score-summary:focus-visible { border-color: var(--brand-green); background: #245345; }
.mh-score-summary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mh-score-emblem { display: grid; place-items: center; flex: none; width: 46px; height: 46px; background: var(--brand-green); color: white; border-radius: 50%; }
.mh-score-copy { display: grid; gap: 2px; min-width: 0; }
.mh-score-copy > span { color: #dfefe9; font-size: .88rem; font-weight: 600; }
.mh-score-value { justify-self: start; font-size: clamp(1.3rem, 2.2vw, 2rem); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mh-score-value small { font: 700 .76rem/1 Huwiya, Arial, sans-serif; }
.mh-actions, .member-discover-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mh-actions .btn { min-height: 42px; }
.mh-actions .mh-primary { color: #201b18; background: var(--mh-accent); border-color: var(--mh-accent); }
.mh-actions .mh-secondary { color: #fff; background: transparent; border-color: #827c70; }
.mh-actions .mh-secondary:hover { background: #393630; }
.mh-section, .mh-activity { margin-top: clamp(24px, 4vw, 40px); }
.mh-section > h2, .mh-activity h2 { margin: 0 0 15px; font-size: clamp(1.35rem, 2vw, 1.65rem); }
.mh-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mh-card { min-width: 0; position: relative; display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 6px 8px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.mh-card:hover, .mh-card:focus-visible { border-color: var(--mh-red); }
.mh-card-icon { width: 38px; height: 38px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--mh-red); background: #faf0e8; }
.mh-card-en { align-self: center; color: #6a656e; font: 500 .74rem/1.3 Huwiya, Arial, sans-serif; }
.mh-card h3 { grid-column: 1/-1; font-size: 1.17rem; margin: 6px 0 0; }
.mh-card p { grid-column: 1/-1; margin: 0; padding-inline-end: 16px; font-size: .92rem; color: var(--muted); }
.mh-card-arrow { color: var(--mh-red); position: absolute; inset-inline-end: 12px; bottom: 14px; }
.mh-activity { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 3vw, 28px); }
.mh-activity .pp-section-line h2 { margin: 0; }
@media (max-width: 710px) {
  .mh-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  body:has(.mh-page) { min-width: 0; }
  .mh-card-grid { gap: 8px; }
  .mh-card { padding: 12px; }
  .mh-card-icon { width: 31px; height: 31px; }
  .mh-card-en { font-size: .66rem; overflow-wrap: anywhere; }
  .mh-card h3 { font-size: 1.05rem; }
  .mh-card-arrow { display: none; }
  .mh-card p { font-size: .84rem; padding: 0; }
}

.mh-xp { --pp-line:var(--line,#deded5); --pp-muted:var(--muted,#65645d); --pp-purple:#5942b7; --pp-ink:var(--ink,#26251f); display:grid; gap:12px; margin-block:clamp(22px,4vw,38px); min-width:0; }
.mh-xp > *, .mh-xp-pair > *, .mh-xp-details > * { min-width:0; }
.mh-xp-head,.mh-award-title { display:flex; align-items:center; gap:10px; }
.mh-xp-head { justify-content:space-between; flex-wrap:wrap; }
.mh-xp-head h2 { display:flex; align-items:center; gap:10px; margin:0; font-size:clamp(1.35rem,2vw,1.65rem); }
.mh-xp-head a { color:#5942a8; font-size:.94rem; }
.mh-xp-pair,.mh-xp-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-items:start; }
.mh-xp-record { display:grid; gap:12px; }
.mh-xp-record:only-child { grid-column:1/-1; }
#mh-achievements { scroll-margin-block-start:5rem; }
#mh-achievements:focus-visible { outline:2px solid var(--brand-focus); outline-offset:4px; border-radius:8px; }
.mh-xp-head h2 svg { color:var(--brand-strong); flex:none; }
.mh-xp .pp-xp-total,.mh-xp .pp-standing:not(.pp-unranked) { color:var(--brand-strong)!important; }
.mh-xp .pp-all-badges { grid-template-columns:repeat(auto-fit,minmax(min(215px,100%),1fr)); }
.mh-xp-panel { background:var(--paper,#fff); border:1px solid var(--pp-line); border-radius:12px; padding:clamp(16px,2.4vw,22px); }
.mh-xp-panel h3 { margin:0 0 12px; font-size:1.13rem; }
.mh-xp-panel p { color:var(--pp-muted); line-height:1.65; font-size:.95rem; margin:5px 0 10px; }
.mh-xp .mh-next-award { align-self:stretch; }
.mh-next-award .mh-award-title { margin:12px 0 6px; }
.mh-award-title svg { color:#5942a8; flex:none; }
.mh-xp progress { display:block; height:8px; width:100%; border:0; border-radius:8px; overflow:hidden; accent-color:#6653a4; background:#e4dcea; }
.mh-xp progress::-webkit-progress-bar { background:#e4dcea; }
.mh-xp progress::-webkit-progress-value { background:#6653a4; border-radius:8px; }
.mh-xp progress::-moz-progress-bar { background:#6653a4; }
.mh-next-award>small { display:block; margin-top:5px; color:var(--pp-muted); font-size:.87rem; }
.mh-xp-actions,.mh-xp-log { list-style:none; margin:0; padding:0; }
.mh-xp-actions li+li,.mh-xp-log li+li { border-top:1px solid var(--pp-line); }
.mh-xp-actions :is(button,a),.mh-xp-log li { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; padding:9px 0; }
.mh-xp-actions :is(button,a) { color:var(--pp-ink); background:none; border:0; text-decoration:none; text-align:start; cursor:pointer; font:inherit; min-height:44px; }
.mh-xp-actions :is(button,a):hover strong,.mh-xp-actions :is(button,a):focus-visible strong { color:var(--pp-purple); text-decoration:underline; text-underline-offset:3px; }
.mh-xp-log li>span,.mh-xp-actions :is(button,a)>span { display:grid; gap:4px; min-width:0; }
.mh-xp-log strong,.mh-xp-actions strong { font-size:.98rem; }
.mh-xp-log time,.mh-xp-actions small { color:var(--pp-muted); font-size:.87rem; }
.mh-xp-log bdi,.mh-xp-actions bdi { white-space:nowrap; direction:ltr; font-variant-numeric:tabular-nums; color:#4d397d; background:#f1ecf7; padding:3px 7px; border-radius:5px; font-size:.86rem; font-weight:600; }
.mh-xp-log~button { margin-top:8px; }
@media (max-width:820px) { .pp-main-column .mh-xp-pair { grid-template-columns:1fr; } }
@media (max-width:700px) { .mh-xp-pair,.mh-xp-details { grid-template-columns:1fr; } }

@container member-home (max-width: 50rem) {
  .mh-hero { grid-template-columns: minmax(0,1fr); gap: 16px; min-height: 0; }
  .mh-score-summary { padding: 6px 10px; gap: 8px; min-height: 44px; }
  .mh-score-emblem { width: 30px; height: 30px; }
  .mh-score-emblem svg { width: 18px; height: 18px; }
  .mh-score-copy { display: flex; align-items: baseline; gap: 8px; }
  .mh-score-value { font-size: 1.12rem; }
}
@container member-home (max-width: 35rem) {
  .mh-hero { padding: 20px 14px; }
  .mh-hero .mh-intro { font-size: clamp(.8125rem,3.4cqi,1rem); margin-bottom: 16px; }
  .mh-xp-pair,.mh-xp-details { grid-template-columns: 1fr; }
  .mh-actions { gap: 6px; }
  .mh-actions .btn { padding-inline: 9px; }
}
@media(max-width:430px) {
  .container.mh-page { padding-inline:10px; }
  .mh-hero { padding-inline:10px; }
}
