/* mst.css V1.8 - 2026-10-04, Nolan. Player Card campaign: the placeholder card's rules are retired (the Stat Tracker opens the canonical Player Card). */
/* mst.css V1.7 - 2026-10-03, Nolan. Almost there / Recently earned: the trophy shape no longer stretches across the row (the text column rule excluded it). */
/* mst.css V1.6 - 2026-10-03, Nolan. The Add stats rule says why it is glass (contrast over-wash). */
/* mst.css V1.5 - 2026-10-03, Nolan. TK-01 (Karl's walk): Add stats floats (sticky to the bottom of the scrolling page) as a glass button instead of sitting in the Trophies section. */
/* mst.css V1.4 - 2026-10-03, Nolan. `--p` declared on the bar (an inline value overrides it); the steppers' number is 16px (no zoom on phones); ring and trust-icon rules. */
/* mst.css V1.3 - 2026-10-03, Nolan. `.h-mst__quiet`. */
/* mst.css V1.2 - 2026-10-03, Nolan. Progress bars take a fraction (`--p`). */
/* mst.css V1.1 - 2026-10-03, Nolan. Contrast pass: tints composited over a surface; season and ahead-of-pace tokens readable in both themes. */
/* mst.css V1.0 - 2026-10-03, Nolan. MST-4/MST-5: the full-screen Stat Tracker and Milestones tools, to Karl's accepted prototype (trust colours, result pills, the three trophy shapes, rings, pace, checkpoints, the earned moment). Tokens only; dark only (the light theme is retired). */

/* ---- the tool layer: over the app's navigation (both navs hidden, GC-OP-01),
   under the sheet layer (50+) so every sheet opens on top. Same layer rules
   as the roster manager (`.h-grm`, 46). ------------------------------------ */
.h-mst {
  position: absolute; inset: 0; z-index: 46; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  opacity: 0; transform: translateY(8px); transition: opacity var(--t-fast), transform var(--t-fast);
}
.h-mst.is-open { opacity: 1; transform: none; }
.h-mst__head {
  flex: none; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.h-mst__back, .h-mst__x {
  width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 50%;
  background: var(--panel2); color: var(--ink); cursor: pointer;
}
.h-mst__back .h-ic, .h-mst__x .h-ic { width: 18px; height: 18px; }
.h-mst__titles { min-width: 0; }
.h-mst__titles small { display: block; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-mst__titles h2 { margin: 2px 0 0; font-family: var(--font-head); font-size: 22px; line-height: 1.1; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-mst__headr { display: flex; align-items: center; gap: 8px; }
.h-mst__who {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px 0 4px; border: 1px solid var(--line2);
  border-radius: var(--r-pill); background: var(--panel2); color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
}
.h-mst__who .h-ic { width: 14px; height: 14px; }
.h-mst__av { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--active-purple-bg); color: var(--active-purple-ink); font-size: 12px; font-weight: 800; }
.h-mst__body { position: relative; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.h-mst__wrap { max-width: 1120px; margin: 0 auto; padding: 14px 16px calc(40px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; }
.h-mst__wrap.has-fab { padding-bottom: 8px; }   /* the sticky button takes its own room at the end */

/* ---- shared bits ------------------------------------------------------------ */
.h-mst__lbl { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--soft, var(--ink)); }
.h-mst__lbl span { font-size: 11px; color: var(--muted); letter-spacing: 0; text-transform: none; font-weight: 600; }
.h-mst__lnk { border: 0; background: none; padding: 6px 2px; color: var(--green); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; text-decoration: none; }
.h-mst__note, .h-mst__cap, .h-mst__p, .h-mst__intro { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.h-mst__intro b.is-gold { color: var(--gold); } .h-mst__intro b.is-green { color: var(--green); }
.h-mst__cap { text-align: center; font-size: 12px; }
.h-mst__quiet { margin: 0; padding: 14px; border: 1px dashed var(--line); border-radius: var(--r-md); font-size: 13px; color: var(--muted); text-align: center; }
.h-mst__card { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.h-mst__acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.h-mst__acts.is-col { flex-direction: column; align-items: stretch; }
.h-mst__acts .h-btn .h-ic { width: 15px; height: 15px; }
.h-btn--teal { background: var(--ci-teal); color: var(--on-ci-teal); border-color: var(--ci-teal); }
.h-mst__state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 16px; text-align: center; }
.h-mst__state > .h-ic { width: 32px; height: 32px; color: var(--muted); }
.h-mst__state h3 { margin: 0; font-size: 18px; }
.h-mst__state p { margin: 0; color: var(--muted); font-size: 13px; max-width: 34ch; }
.h-mst__sk { height: 120px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--panel), var(--panel2), var(--panel)); background-size: 200% 100%; animation: h-mst-sk 1.4s linear infinite; }
.h-mst__sk.is-short { height: 60px; }
@keyframes h-mst-sk { to { background-position: -200% 0; } }

/* ---- trust words (fixed everywhere) and result pills ------------------------ */
.h-mst__trust { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.h-mst__trust .h-ic { width: 11px; height: 11px; }
.h-mst__trust.is-v { color: var(--green); }
.h-mst__trust.is-a { color: var(--warn); }
.h-mst__trust.is-y { color: var(--mst-record); }
.h-mst__trust.is-n { color: var(--mst-untracked); }
.h-mst__trust.is-s { color: var(--mst-season); }
.h-mst__r { display: inline-block; padding: 1px 7px; border-radius: var(--r-pill); font-size: 10px; font-weight: 800; }
.h-mst__r.is-W { background: linear-gradient(rgba(var(--green-rgb), .16), rgba(var(--green-rgb), .16)), var(--panel); color: var(--green); }
.h-mst__r.is-L { background: linear-gradient(rgba(var(--danger-rgb), .14), rgba(var(--danger-rgb), .14)), var(--panel); color: var(--danger); }
.h-mst__r.is-T { background: linear-gradient(rgba(var(--info-rgb), .16), rgba(var(--info-rgb), .16)), var(--panel); color: var(--info); }
.h-mst__r.is-OTL { background: linear-gradient(rgba(var(--danger-rgb), .08), rgba(var(--danger-rgb), .08)), var(--panel); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(var(--danger-rgb), .35); }

/* ---- the three trophy shapes (Round 4) -------------------------------------- */
.h-mst__shp { --s: 44px; width: var(--s); height: var(--s); flex: none; display: grid; place-items: center; }
.h-mst__shp.s44 { --s: 44px; } .h-mst__shp.s62 { --s: 62px; } .h-mst__shp.s96 { --s: 96px; height: 104px; } .h-mst__shp.s132 { --s: 132px; height: 140px; }
.h-mst__shp .h-ic { width: 40%; height: 40%; }
.h-mst__shp.is-cup {
  align-items: start; padding-top: 12%;
  background: linear-gradient(170deg, var(--gold-hi) 0%, var(--gold-mid) 38%, var(--gold-lo) 100%); color: var(--on-gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M22 6H78V30C78 50 66 60 50 60C34 60 22 50 22 30Z'/%3E%3Cpath d='M22 12C6 12 4 38 26 42L27 35C14 32 13 19 22 19Z'/%3E%3Cpath d='M78 12C94 12 96 38 74 42L73 35C86 32 87 19 78 19Z'/%3E%3Cpath d='M44 58H56V74H44Z'/%3E%3Cpath d='M31 73H69V84H31Z'/%3E%3Cpath d='M24 84H76V95H24Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M22 6H78V30C78 50 66 60 50 60C34 60 22 50 22 30Z'/%3E%3Cpath d='M22 12C6 12 4 38 26 42L27 35C14 32 13 19 22 19Z'/%3E%3Cpath d='M78 12C94 12 96 38 74 42L73 35C86 32 87 19 78 19Z'/%3E%3Cpath d='M44 58H56V74H44Z'/%3E%3Cpath d='M31 73H69V84H31Z'/%3E%3Cpath d='M24 84H76V95H24Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.h-mst__shp.is-cup .h-ic { width: 34%; height: 34%; }
.h-mst__shp.is-hex { clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); background: linear-gradient(160deg, var(--active-green-bg), var(--panel2)); color: var(--green); }
.h-mst__shp.is-lck { clip-path: circle(44% at 50% 50%); background: var(--panel2); color: var(--faint); }

/* ---- rings ----------------------------------------------------------------- */
.h-mst__herow { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.h-mst__hero { position: relative; width: 146px; height: 146px; flex: none; }
.h-mst__heroc { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.h-mst__heroc b { font-family: var(--font-head); font-size: 30px; line-height: 1; }
.h-mst__heroc small { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.h-mst__legend { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.h-mst__legend div { display: flex; align-items: baseline; gap: 6px; }
.h-mst__legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; align-self: center; }
.h-mst__legend b { font-size: 16px; } .h-mst__legend small { font-size: 12px; color: var(--muted); }
.h-mst__ring1 { position: relative; display: inline-grid; place-items: center; flex: none; }
.h-mst__ring1 svg { position: absolute; inset: 0; }
.h-mst__ring1c { position: relative; display: grid; place-items: center; text-align: center; line-height: 1.05; }
.h-mst__ring1c b { font-size: 15px; } .h-mst__ring1c small { font-size: 10px; color: var(--muted); }
.h-mst__ring1c .h-ic { width: 34px; height: 34px; color: var(--green); }

/* ---- the Stat Tracker main ------------------------------------------------- */
.h-mst__menus { display: flex; gap: 8px; flex-wrap: wrap; }
.h-mst__menu { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid var(--line2);
  border-radius: var(--r-pill); background: var(--panel2); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.h-mst__menu .h-ic { width: 15px; height: 15px; }
.h-mst__stat4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.h-mst__stat4 div { padding: 10px 6px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); text-align: center; min-width: 0; }
.h-mst__stat4 b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.h-mst__stat4 small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: var(--muted); overflow-wrap: anywhere; }
.h-mst__srcB { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.h-mst__srcT { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.h-mst__srcT b { font-size: 14px; } .h-mst__srcT small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.h-mst__bar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--mst-track); }
.h-mst__bar i { display: block; min-width: 2px; }
.b-v { background: var(--green); } .b-a { background: var(--warn); } .b-y { background: var(--mst-record); } .b-s { background: var(--mst-season); } .b-n { background: var(--mst-untracked); }
.h-mst__keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.h-mst__keys .h-mst__lnk { margin-left: auto; padding: 0; }
.h-mst__rq { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid rgba(var(--warn-rgb), .35); border-radius: var(--r-lg);
  background: linear-gradient(rgba(var(--warn-rgb), .05), rgba(var(--warn-rgb), .05)), var(--panel); }
.h-mst__rqh { display: flex; align-items: center; gap: 8px; } .h-mst__rqh .h-ic { width: 16px; height: 16px; color: var(--warn); }
.h-mst__rqh .h-mst__lnk { margin-left: auto; }
.h-mst__ri { display: flex; gap: 10px; align-items: flex-start; }
.h-mst__ri p { margin: 0; font-size: 13px; line-height: 1.45; } .h-mst__ri small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.h-mst__ic2 { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(rgba(var(--warn-rgb), .16), rgba(var(--warn-rgb), .16)), var(--panel); color: var(--warn); }
.h-mst__ic2.is-gr { background: linear-gradient(rgba(var(--green-rgb), .14), rgba(var(--green-rgb), .14)), var(--panel); color: var(--green); } .h-mst__ic2.is-gy { background: var(--panel2); color: var(--muted); }
.h-mst__ic2 .h-ic { width: 15px; height: 15px; }
.h-mst__ribs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.h-mst__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.h-mst__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 760px) { .h-mst__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.h-mst__tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--panel); color: var(--ink); font: inherit; text-align: center; cursor: pointer; min-width: 0; }
.h-mst__tile b { font-size: 12.5px; line-height: 1.2; overflow-wrap: anywhere; } .h-mst__tile small { font-size: 11px; color: var(--muted); }
.h-mst__swrow { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.h-mst__swrow div { flex: 1; min-width: 0; } .h-mst__swrow b { display: block; font-size: 13.5px; } .h-mst__swrow small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.h-mst__sw { position: relative; width: 46px; height: 28px; flex: none; border: 1px solid var(--line2); border-radius: 14px; background: var(--panel2); cursor: pointer; }
.h-mst__sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform var(--t-fast), background var(--t-fast); }
.h-mst__sw.is-on { background: rgba(var(--green-rgb), .2); border-color: var(--green); }
.h-mst__sw.is-on::after { transform: translateX(18px); background: var(--green); }
.h-mst__games { display: flex; flex-direction: column; gap: 6px; }
.h-mst__gl { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background 1.6s ease; }
.h-mst__gl.is-flash { background: rgba(var(--green-rgb), .14); transition: none; }
.h-mst__sq { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; font-size: 11px; font-weight: 800; }
.h-mst__sq.is-big { width: 46px; height: 46px; }
.h-mst__sq.is-tot { background: linear-gradient(rgba(var(--mst-season-rgb), .16), rgba(var(--mst-season-rgb), .16)), var(--panel); color: var(--mst-season); }
.h-mst__sq.is-h { background: var(--active-green-bg); color: var(--active-green-ink); }
.h-mst__sq.is-own { background: var(--panel2); color: var(--mst-record); }
.h-mst__sq .h-ic { width: 17px; height: 17px; }
.h-mst__glm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.h-mst__glm > b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-mst__glm small { font-size: 11.5px; color: var(--muted); }
.h-mst__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.h-mst__glr { flex: none; text-align: right; display: flex; flex-direction: column; gap: 2px; }
.h-mst__glr b { font-size: 14px; font-variant-numeric: tabular-nums; } .h-mst__glr b.is-muted { color: var(--mst-untracked); }
.h-mst__glr small { font-size: 11px; color: var(--muted); }
.h-mst__qline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); }
.h-mst__qline p { margin: 0; flex: 1 1 200px; font-size: 12.5px; color: var(--muted); }
.h-mst__probtn { min-height: 34px; padding: 0 12px; border: 1px solid var(--mst-season); border-radius: var(--r-pill); background: none; color: var(--mst-season); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.h-mst__pro { font-size: 11px; color: var(--mst-season); }
.h-mst__bars { display: flex; align-items: flex-end; gap: 10px; min-height: 120px; padding-top: 6px; overflow-x: auto; }
.h-mst__bars div { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 40px; }
.h-mst__bars i { display: block; width: 22px; border-radius: 4px 4px 0 0; background: var(--green); }
.h-mst__bars small { font-size: 10.5px; color: var(--muted); } .h-mst__bars b { font-size: 12px; }
/* GLASS ON PURPOSE (TK-01, Karl 10-03): Add stats floats over the scrolling record like the pinned buttons; 88% green keeps its words at 4.5:1, and compositing it over --panel would make it solid. */
.h-mst__fab { position: sticky; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 4; display: flex; align-items: center; gap: 6px;
  width: max-content; margin: 8px 16px 0 auto;
  min-height: 48px; padding: 0 18px; border: 0; border-radius: var(--r-pill); color: var(--on-green); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
  background: rgba(var(--green-rgb), .88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 18px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(var(--glass-btn-blur)) saturate(1.4); backdrop-filter: blur(var(--glass-btn-blur)) saturate(1.4); }
@media (prefers-reduced-transparency: reduce) { .h-mst__fab { background: var(--green); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.h-mst__fab .h-ic { width: 17px; height: 17px; }
.h-mst__ro, .h-mst__madeby, .h-mst__stl, .h-mst__upL, .h-mst__warn2, .h-mst__demo {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); font-size: 13px; line-height: 1.45; }
.h-mst__ro p, .h-mst__madeby p, .h-mst__stl p, .h-mst__upL p { margin: 0; }
.h-mst__ro .h-ic, .h-mst__madeby .h-ic, .h-mst__stl .h-ic, .h-mst__upL .h-ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.h-mst__ro { border: 1px solid var(--line); background: var(--panel); color: var(--soft, var(--ink)); }
.h-mst__madeby { border: 1px solid rgba(var(--purple-rgb), .45); background: var(--active-purple-bg); color: var(--active-purple-ink); }
.h-mst__stl { border: 1px solid rgba(var(--warn-rgb), .35); background: linear-gradient(rgba(var(--warn-rgb), .06), rgba(var(--warn-rgb), .06)), var(--panel); }
.h-mst__stl.is-gy { border-color: var(--line); background: var(--panel); color: var(--muted); }
.h-mst__upL { border: 1px solid rgba(var(--green-rgb), .35); background: var(--active-green-bg); color: var(--active-green-ink); }
.h-mst__warn2 { display: block; margin: 8px 0; border: 1px solid rgba(var(--danger-rgb), .45); background: linear-gradient(rgba(var(--danger-rgb), .08), rgba(var(--danger-rgb), .08)), var(--panel); color: var(--ink); }
.h-mst__demo { border: 1px dashed var(--line2); color: var(--muted); }

/* ---- tables ---------------------------------------------------------------- */
.h-mst__tblw { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.h-mst__tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.h-mst__tbl th { padding: 8px 10px; font-size: 10.5px; letter-spacing: .08em; text-align: left; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--panel2); }
.h-mst__tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.h-mst__tbl tr:last-child td { border-bottom: 0; }
.h-mst__tbl tr.is-tot td { font-weight: 800; }
.h-mst__tbl td.is-dif { color: var(--warn); font-weight: 800; }
.h-mst__means { display: flex; flex-direction: column; gap: 6px; }
.h-mst__means p { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ---- game detail and forms -------------------------------------------------- */
.h-mst__gh { display: flex; align-items: center; gap: 12px; }
.h-mst__gh b { display: block; font-size: 16px; } .h-mst__gh small { font-size: 12.5px; color: var(--muted); }
.h-mst__chipline { margin: 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.h-mst__more { display: flex; flex-direction: column; align-items: flex-start; }
.h-mst__steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.h-mst__steps.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 380px) { .h-mst__steps.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.h-mst__step { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.h-mst__stepc { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; border: 1px solid var(--line2); border-radius: var(--r-md); overflow: hidden; background: var(--panel); }
.h-mst__stepc button { min-height: 40px; border: 0; background: var(--panel2); color: var(--ink); font-size: 18px; cursor: pointer; }
.h-mst__stepc input { min-width: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; font-weight: 800; text-align: center; -moz-appearance: textfield; }
.h-mst__stepc input::-webkit-outer-spin-button, .h-mst__stepc input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.h-mst__check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.h-mst__check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); }
.h-mst__check b { display: block; } .h-mst__check small { display: block; color: var(--muted); font-size: 12px; }
.h-mst__lab { font-size: 12px; color: var(--muted); font-weight: 700; }
.h-mst__datebtn { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line2); border-radius: var(--r-md);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.h-mst__datebtn .h-ic { width: 15px; height: 15px; }
.h-mst__rseg { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.h-mst__rseg button { min-height: 40px; border: 1px solid var(--line2); border-radius: var(--r-md); background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.h-mst__rseg .rW.is-on { background: var(--green); color: var(--on-green); border-color: var(--green); }
.h-mst__rseg .rL.is-on { background: var(--danger); color: var(--on-warn); border-color: var(--danger); }
.h-mst__rseg .rT.is-on { background: var(--info); color: var(--on-warn); border-color: var(--info); }
.h-mst__rseg .rOTL.is-on { background: linear-gradient(rgba(var(--danger-rgb), .28), rgba(var(--danger-rgb), .28)), var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--danger); }
.h-mst__rseg .rN.is-on { background: var(--elev); color: var(--ink); }
.h-mst__calc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.h-mst__calc div { padding: 10px 6px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); text-align: center; }
.h-mst__calc b { display: block; font-size: 17px; } .h-mst__calc small { font-size: 10px; font-weight: 800; color: var(--muted); letter-spacing: .06em; }

/* ---- trophy detail ----------------------------------------------------------- */
.h-mst__trh { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 6px 0; }
.h-mst__trh h3 { margin: 4px 0 0; font-size: 20px; } .h-mst__trh p { margin: 0; color: var(--muted); font-size: 13px; }
.h-mst__trh .h-mst__shp.is-cup { filter: drop-shadow(0 10px 26px rgba(var(--gold-rgb), .32)); }
.h-mst__pbar { display: block; height: 6px; border-radius: 3px; background: var(--mst-track); overflow: hidden; width: 100%; }
.h-mst__pbar.is-220 { width: 220px; max-width: 100%; }
.h-mst__pbar i { --p: 0; display: block; height: 100%; width: calc(var(--p) * 100%); background: var(--green); border-radius: 3px; }
.h-mst__ladder { display: flex; flex-wrap: wrap; gap: 6px; }
.h-mst__ladder span { padding: 4px 9px; border: 1px solid var(--line2); border-radius: var(--r-pill); font-size: 11.5px; color: var(--muted); }
.h-mst__ladder span.is-d { border-color: var(--gold); color: var(--gold); } .h-mst__ladder span.is-n { border-color: var(--green); color: var(--green); }
.h-mst__wfr { margin: 0; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }

/* ---- Milestones -------------------------------------------------------------- */
.h-mst__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); }
.h-mst__tabs button { min-height: 38px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.h-mst__tabs button.is-on { background: var(--panel2); color: var(--ink); box-shadow: inset 0 -2px 0 var(--green); }
.h-mst__rings { display: block; flex: none; }
.h-mst__tic { font-size: 12px; }
.h-mst__rings3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.h-mst__rings3 > * { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--panel); color: var(--ink); font: inherit; text-align: center; cursor: pointer; min-width: 0; }
.h-mst__rings3 > div { cursor: default; }
.h-mst__rings3 > * > b { font-size: 13px; } .h-mst__rings3 > * > small { font-size: 11px; color: var(--muted); }
.h-mst__row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel);
  color: var(--ink); font: inherit; text-align: left; width: 100%; }
button.h-mst__row { cursor: pointer; }
/* The text column grows; the trophy shape (also a span) keeps its size (Karl's walk: Almost there shapes stretched across the row). */
.h-mst__row > span:not(.h-mst__shp), .h-mst__rowm > span:not(.h-mst__shp) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.h-mst__row b { font-size: 13.5px; } .h-mst__row small { font-size: 12px; color: var(--muted); }
.h-mst__row > .h-ic { width: 20px; height: 20px; color: var(--green); flex: none; }
.h-mst__rowm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; padding: 0; }
.h-mst__sharep { min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: var(--ci-teal); color: var(--on-ci-teal); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.h-mst__gpcard { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid rgba(var(--green-rgb), .35); border-radius: var(--r-lg);
  background: var(--active-green-bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.h-mst__gpcard small { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--green); }
.h-mst__gpcard b { font-size: 15px; } .h-mst__gpcard span { font-size: 12.5px; color: var(--muted); }
.h-mst__hidden { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--line2); border-radius: var(--r-md); background: none; color: var(--muted); font: inherit; cursor: pointer; }
.h-mst__hidden .h-ic { width: 16px; height: 16px; } .h-mst__hidden b { margin-left: auto; color: var(--green); }
.h-mst__tgt { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.h-mst__tgth { display: flex; gap: 12px; align-items: center; } .h-mst__tgth > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.h-mst__tgth b { font-size: 14.5px; } .h-mst__tgth small { font-size: 12px; color: var(--muted); }
.h-mst__pace { align-self: flex-start; padding: 2px 9px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; }
.h-mst__pace.is-on { background: var(--active-green-bg); color: var(--green); }
.h-mst__pace.is-behind { background: linear-gradient(rgba(var(--warn-rgb), .14), rgba(var(--warn-rgb), .14)), var(--panel); color: var(--warn); }
.h-mst__pace.is-ahead { background: var(--panel2); color: var(--mst-ahead); box-shadow: inset 0 0 0 1px var(--mst-ahead); }
.h-mst__pace.is-done { background: var(--panel2); color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.h-mst__cps { list-style: none; margin: 0; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 6px; }
.h-mst__cps li { position: relative; display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.h-mst__cps li small { margin-left: auto; color: var(--muted); }
.h-mst__cps i { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line2); font-style: normal; font-size: 11px; font-weight: 800; }
.h-mst__cps li.is-done i { background: var(--green); border-color: var(--green); color: var(--on-green); }
.h-mst__cps li.is-current i { border-color: var(--green); animation: h-mst-pulse 1.6s ease-in-out infinite; }
@keyframes h-mst-pulse { 50% { box-shadow: 0 0 0 5px rgba(var(--green-rgb), .2); } }
.h-mst__src { margin: 0; font-size: 12px; color: var(--muted); }
.h-mst__tgtb { display: flex; flex-wrap: wrap; gap: 6px; }
.h-mst__addt { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px dashed var(--line2); border-radius: var(--r-lg); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.h-mst__addt .h-ic { width: 18px; height: 18px; color: var(--green); } .h-mst__addt span { display: flex; flex-direction: column; } .h-mst__addt small { font-size: 12px; color: var(--muted); }
.h-mst__wbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.h-mst__wbar i { height: 4px; border-radius: 2px; background: var(--line2); } .h-mst__wbar i.is-on { background: var(--green); }
.h-mst__wiz { display: flex; flex-direction: column; gap: 10px; }
.h-mst__wiz h3 { margin: 6px 0 0; font-size: 19px; }
.h-mst__wt { display: flex; flex-direction: column; gap: 4px; grid-column: 1 / -1; }
.h-mst__wt > b { font-size: 13.5px; } .h-mst__wt > small { font-size: 12px; color: var(--muted); }
.h-mst__ready { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 10px 0; }
.h-mst__opts { display: flex; flex-direction: column; gap: 6px; }
.h-mst__opt { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; width: 100%; }
.h-mst__opt > span:not(.h-mst__av):not(.h-mst__shp) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.h-mst__opt b { font-size: 13.5px; } .h-mst__opt small { font-size: 12px; color: var(--muted); }
.h-mst__opt > .h-ic { width: 18px; height: 18px; color: var(--green); flex: none; }
.h-mst__opt.is-on { border-color: var(--green); background: var(--active-green-bg); }
.h-mst__opt.is-danger > .h-ic { color: var(--danger); }
.h-mst__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.h-mst__chip { position: relative; cursor: pointer; }
.h-mst__chip input { position: absolute; opacity: 0; }
.h-mst__chip span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line2); border-radius: var(--r-pill); font-size: 12.5px; }
.h-mst__chip input:checked + span { background: var(--green); color: var(--on-green); border-color: var(--green); font-weight: 800; }
.h-mst__chip input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.h-mst__cprow { display: flex; align-items: center; gap: 10px; margin-top: 6px; } .h-mst__cprow span { flex: 1; font-size: 13px; } .h-mst__cprow .h-input { width: 110px; }

/* ---- the earned moment (ML-09, ML-20) -------------------------------------- */
.h-mst__cel { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 50% 38%, rgba(var(--gold-rgb), .35), var(--bg) 62%); }
.h-mst__celin { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 340px; }
.h-mst__celin > small { font-size: 12px; font-weight: 800; letter-spacing: .24em; color: var(--gold); }
.h-mst__celin h3 { margin: 0; font-size: 24px; } .h-mst__celin p { margin: 0; color: var(--muted); }
.h-mst__cel .h-mst__shp { animation: h-mst-flip .9s ease-out both; filter: drop-shadow(0 10px 26px rgba(var(--gold-rgb), .32)); }
@keyframes h-mst-flip { from { transform: rotateY(90deg) scale(.6); } to { transform: none; } }

/* REDUCE MOTION: no flip, no pulse, no flash, no slide (prototype rule). */
@media (prefers-reduced-motion: reduce) {
  .h-mst, .h-mst__pcin, .h-mst__gl, .h-mst__sw::after { transition: none; }
  .h-mst__cel .h-mst__shp, .h-mst__cps li.is-current i, .h-mst__sk { animation: none; }
}
html[data-motion="off"] .h-mst, html[data-motion="off"] .h-mst__pcin, html[data-motion="off"] .h-mst__gl { transition: none; }
html[data-motion="off"] .h-mst__cel .h-mst__shp, html[data-motion="off"] .h-mst__cps li.is-current i { animation: none; }
.h-mst__cel.is-still .h-mst__shp { animation: none; }
.h-mst :focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
