/* The members' pages (/login, /join, /account, /testing, /shop, /admin): same stickers as the hub (style.css tokens,
   chips, cards, Play), laid out as plain pages. Art from assets/members/ (tools/gen.mjs members). */
body.members { min-height: 100vh; padding-bottom: 60px; }
.m-top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--gutter) 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.m-top .brand img { width: clamp(110px, 12vw, 160px); }
.m-top .nav .chip[aria-current="page"] { background: var(--yellow); }
.m-chip-img { width: 30px; height: auto; margin: -4px 0; }
.m-chip-av { width: 26px; height: 26px; margin: -4px 0; border-radius: 50%; background: var(--lilac); border: 2px solid var(--ink); object-fit: cover; }
.m-wrap { max-width: var(--max); margin: 18px auto 0; padding: 0 var(--gutter); display: grid; gap: 22px; }
.m-wrap:focus { outline: none; }
.m-loading { text-align: center; font: 400 22px var(--display); color: var(--ink-soft); }

/* cards */
.m-card {
  background: var(--cream);
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--lift);
  padding: clamp(16px, 2.4vw, 26px);
  min-width: 0;
}
.m-card h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; }
.m-card h2 { font-size: 26px; margin-bottom: 8px; }
.m-card h3 { font-size: 20px; margin: 18px 0 8px; }
.m-narrow { max-width: 480px; width: 100%; justify-self: center; text-align: center; }
.m-narrow .m-form { text-align: left; }
.m-note { color: var(--ink-soft); font-size: 15px; margin: 6px 0 12px; }
.m-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 22px; align-items: start; }
.m-empty { text-align: center; }
.m-hero { width: 120px; margin: -64px auto 6px; filter: drop-shadow(0 5px 0 rgba(29, 24, 56, .3)); }
.m-login { margin-top: 70px; }

/* banners */
.m-banner {
  display: grid;
  grid-template-columns: minmax(140px, 260px) 1fr;
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
  background: var(--violet);
  color: #fff;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--lift);
  padding: 14px clamp(16px, 3vw, 32px);
}
.m-banner img { width: 100%; margin: -34px 0 -6px; filter: drop-shadow(0 6px 0 rgba(29, 24, 56, .4)); }
.m-banner h1 { font-size: clamp(32px, 5vw, 56px); text-shadow: 0 4px 0 var(--ink); }
.m-banner p { margin: 6px 0 0; font-size: 17px; max-width: 60ch; }
.m-banner a { color: var(--yellow); }
.m-banner .m-tickets { color: var(--ink); }
@media (max-width: 600px) {
  .m-banner { grid-template-columns: 1fr; text-align: center; }
  .m-banner img { width: 60%; margin: -40px auto 0; }
}

/* forms */
.m-form { display: grid; gap: 12px; }
.m-field { display: grid; gap: 4px; }
.m-field label, .m-label { font: 400 17px var(--display); }
.m-field small { color: var(--ink-soft); font-size: 13.5px; }
.m-form input, .m-form select, .m-form textarea, .m-actions select, .m-give input {
  font: 700 17px/1.3 var(--body);
  color: var(--ink);
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 46px;
  width: 100%;
}
.m-form textarea { resize: vertical; min-height: 96px; }
.m-form input:focus, .m-form select:focus, .m-form textarea:focus { outline: 4px solid var(--violet); outline-offset: 1px; }
.m-msg { margin: 0; color: #c2185b; font-weight: 800; min-height: 1em; }
.m-msg:empty { display: none; }
.m-count { color: var(--ink-soft); margin-top: -6px; }
.m-inline { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
@media (pointer: coarse) { .m-form input, .m-form select, .m-form textarea { font-size: 18px; } }

/* buttons */
.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  font: 400 18px/1 var(--display);
  color: #fff;
  text-shadow: 0 2px 0 var(--ink);
  text-decoration: none;
  background: var(--pink);
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--lift-sm);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.m-btn:hover:not(:disabled) { transform: translateY(-2px); }
.m-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.m-btn:disabled { opacity: .55; cursor: default; }
.m-btn.big { min-height: 54px; font-size: 22px; }
.m-btn.small { min-height: 38px; padding: 6px 12px; font-size: 15px; }
.m-btn.ghost { background: var(--paper); color: var(--ink); text-shadow: none; }
.m-btn.danger { background: #e53935; }
@media (pointer: coarse) { .m-btn.small { min-height: 44px; } }

/* pills, tickets, lists */
.m-pill {
  display: inline-block;
  padding: 2px 10px;
  margin: 0 6px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: 400 14px/1.4 var(--display);
  background: var(--lilac);
  vertical-align: 2px;
}
.m-pill.ok, .m-pill.tester { background: var(--lime); color: #fff; text-shadow: 0 1px 0 var(--ink); }
.m-pill.admin { background: var(--orange); color: #fff; text-shadow: 0 1px 0 var(--ink); }
.m-pill.player { background: var(--cyan); color: #fff; text-shadow: 0 1px 0 var(--ink); }
.m-pill.bad { background: #ffcdd2; }
.m-pill.wait { background: var(--yellow); }
.m-tickets { display: inline-flex; align-items: center; gap: 6px; font: 400 20px/1 var(--display); vertical-align: middle;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px 3px 6px; }
.m-tickets img { width: 46px; height: auto; }
.m-tickets-link { text-decoration: none; }
.m-bar { display: flex; justify-content: flex-end; margin: -8px 0 -6px; }
.m-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.m-list > li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 14px;
}
.m-list > li > div:first-child { flex: 1 1 220px; min-width: 0; }
.m-list small { display: block; color: var(--ink-soft); font-size: 13.5px; overflow-wrap: anywhere; }
.m-ledger b.plus { color: #2e7d32; }
.m-ledger b.minus { color: #c62828; }
.m-log span { display: block; overflow-wrap: anywhere; }

/* account */
.m-me { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.m-me > div { flex: 1; }
.m-me h1 { overflow-wrap: anywhere; font-size: clamp(26px, 6vw, 44px); }
.m-me > div { min-width: 180px; }
@media (max-width: 520px) { .m-me > .m-btn { width: 100%; } .m-me-av { width: 72px; height: 72px; } }
.m-me p { margin: 6px 0 0; }
.m-me-av, .m-av { border-radius: 50%; background: var(--lilac); border: var(--line) solid var(--ink); object-fit: cover; }
.m-me-av { width: 92px; height: 92px; }
.m-av { width: 34px; height: 34px; border-width: 2px; }
.m-critters { display: flex; flex-wrap: wrap; gap: 10px; }
.m-critter { padding: 4px; border: var(--line) solid var(--ink); border-radius: 50%; background: var(--paper); cursor: pointer; }
.m-critter[aria-checked="true"] { background: var(--yellow); box-shadow: var(--lift-sm); transform: translateY(-3px); }
.m-critter-img { width: 64px; height: 64px; border-radius: 50%; }
.m-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.m-badge-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 14px 4px 4px; background: var(--paper);
  border: var(--line) solid var(--ink); border-radius: 999px; font: 400 16px var(--display); cursor: pointer; }
.m-badge-pick[aria-pressed="true"] { background: var(--yellow); box-shadow: var(--lift-sm); }

/* badge pictures: 2x2 sheets */
.m-badge { display: inline-block; flex: none; background-size: 200% 200%; background-repeat: no-repeat; vertical-align: middle; }
.m-badge[data-art^="a"] { background-image: url(/assets/members/badges_a.webp); }
.m-badge[data-art^="b"] { background-image: url(/assets/members/badges_b.webp); }
.m-badge[data-art$="0"] { background-position: 0 0; }
.m-badge[data-art$="1"] { background-position: 100% 0; }
.m-badge[data-art$="2"] { background-position: 0 100%; }
.m-badge[data-art$="3"] { background-position: 100% 100%; }
.m-badge.sm { width: 28px; height: 28px; }
.m-badge.md { width: 40px; height: 40px; }
.m-badge.lg { width: 110px; height: 110px; }

/* stars: a 2x1 sheet, filled and empty */
.m-stars { display: inline-flex; gap: 1px; vertical-align: -3px; }
.m-star { display: inline-block; width: 18px; height: 18px; background: url(/assets/members/stars.webp) 100% 0 / 200% 100% no-repeat; }
.m-star.on { background-position: 0 0; }
.m-star-input { display: flex; gap: 6px; }
.m-star-input .m-star { width: 46px; height: 46px; border: 0; padding: 0; cursor: pointer; background-color: transparent; transition: transform .1s; }
.m-star-input .m-star:hover { transform: scale(1.12) rotate(-6deg); }

/* testing hub */
.m-tests { display: grid; gap: 26px; }
.m-test { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; align-items: start; }
.m-test-side { display: grid; gap: 14px; }
.m-facts { margin: 0; }
.m-test-art { position: relative; border: var(--line) solid var(--ink); border-radius: 16px; overflow: hidden; background: var(--ink); }
.m-poster { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.m-poster.none { background: var(--lilac-deep); }
.m-ribbon { position: absolute; top: 0; right: 0; width: 38%; pointer-events: none; }
.m-logo { width: min(320px, 80%); margin: -6px 0 4px; filter: drop-shadow(0 4px 0 rgba(29, 24, 56, .3)); }
.m-round { margin: 4px 0; }
.m-round .m-pill { margin-left: 0; }
.m-play { margin: 8px 0 6px; font-size: 22px; padding: 12px 22px; }
.m-gate { background: var(--lilac); border: 2px dashed var(--ink); border-radius: 14px; padding: 12px 14px; }
.m-gate p { margin: 0 0 8px; }
@media (max-width: 760px) { .m-test { grid-template-columns: 1fr; } }
.m-reviews { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.m-review { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; }
.m-review.hidden { opacity: .6; }
.m-review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-review-head small { color: var(--ink-soft); margin-left: auto; }
.m-review-text { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 700; }
.m-review-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 0; }

/* shop */
.m-shop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.m-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.m-item h3 { margin: 4px 0 0; }
.m-item p { margin: 0; font-size: 15px; }
.m-item .m-btn { margin-top: auto; width: 100%; }
.m-item.owned { background: #f1ffe9; }
.m-cost { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.m-cost small { color: var(--ink-soft); }

/* admin */
.m-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.m-tab { font: 400 17px var(--display); padding: 8px 14px; min-height: 44px; border: var(--line) solid var(--ink); border-radius: 14px;
  background: var(--paper); cursor: pointer; }
.m-tab[aria-selected="true"] { background: var(--yellow); box-shadow: var(--lift-sm); transform: translateY(-2px); }
.m-tabbody { display: grid; gap: 22px; }
.m-seg { display: inline-flex; border: var(--line) solid var(--ink); border-radius: 12px; overflow: hidden; }
.m-seg button { font: 400 15px var(--display); padding: 8px 12px; min-height: 40px; border: 0; background: var(--paper); cursor: pointer; }
.m-seg button + button { border-left: 2px solid var(--ink); }
.m-seg button[aria-pressed="true"][data-stage="live"] { background: var(--lime); color: #fff; text-shadow: 0 1px 0 var(--ink); }
.m-seg button[aria-pressed="true"][data-stage="testing"] { background: var(--yellow); }
.m-seg button[aria-pressed="true"][data-stage="hidden"] { background: var(--ink); color: #fff; }
.m-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.m-actions select { width: auto; min-height: 38px; padding: 4px 8px; font-size: 15px; }
.m-give { display: inline-flex; gap: 4px; align-items: center; }
.m-give input { min-height: 38px; padding: 4px 8px; font-size: 15px; width: 110px; }
.m-give input.m-num, .m-num { width: 76px; }
.m-linkbox:empty { display: none; }
.m-linkbox { margin-top: 14px; padding: 12px; background: #fff8c4; border: 2px dashed var(--ink); border-radius: 14px; }
.m-linkbox p { margin: 0 0 8px; }
.m-copy { display: flex; gap: 8px; }
.m-copy input { flex: 1; min-width: 0; font: 700 14px var(--body); padding: 8px; border: 2px solid var(--ink); border-radius: 10px; }
.m-artpick { display: flex; gap: 6px; flex-wrap: wrap; }
.m-artpick button { padding: 3px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); cursor: pointer; line-height: 0; }
.m-artpick button[aria-checked="true"] { background: var(--yellow); }
.m-artpick .m-badge.sm { width: 36px; height: 36px; }
.m-itemform { margin-top: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.m-shopadmin summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-shopadmin details { width: 100%; }
.toast.bad { background: #ffcdd2; }
@media (max-width: 640px) {
  .m-top .nav { flex-wrap: wrap; }
  .m-top .nav .chip { display: inline-flex; font-size: 15px; padding: 6px 10px; }
}
