/* Social Gym Club demo: page layout + gym panel */
:root {
  --bg: #0d0a12; --card: #1c1626; --card2: #241d2e; --line: rgba(255,255,255,.07); --text: #f3eefa; --muted: #9d95ad;
  --ember: #FF7333; --deep: #E64026; --grn: #3de8a8; --yel: #ffc93d; --red: #ff4d5e; --blu: #54B5FF; --vio: #BF85FF;
  --grad: linear-gradient(135deg, #FF8A3D, #E64026);
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--text); background: var(--bg); overflow: hidden; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(900px 500px at 8% -10%, rgba(255,115,51,.16), transparent 60%), radial-gradient(800px 600px at 100% 110%, rgba(191,133,255,.12), transparent 60%);
}
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
.ic { flex: none; }

/* top bar */
.top { height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(13,10,18,.7); backdrop-filter: blur(12px); position: relative; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand .sep { width: 1px; height: 18px; background: rgba(255,255,255,.15); }
.brand .pt { color: var(--muted); }
.pill-demo { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--yel); background: rgba(255,201,61,.1); border: 1px solid rgba(255,201,61,.35); border-radius: 20px; padding: 4px 10px; white-space: nowrap; }
.gymname { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; color: var(--muted); }
.gymname:focus-within { border-color: var(--ember); }
.gymname input { background: transparent; border: 0; color: #fff; font-size: 14px; font-weight: 700; width: 200px; padding: 8px 0; outline: none; }
.spacer { flex: 1; }
.seg { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 800; color: var(--muted); background: transparent; border: 0; }
.seg button.on { background: #fff; color: #15101c; }
.seg-pane { display: none; }
body.narrow .seg-pane { display: flex; }

/* stage */
.stage { display: flex; gap: 28px; padding: 20px 24px; height: calc(100vh - 60px); }
.pane-gym { flex: 1; min-width: 0; display: flex; }
.pane-member { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
body.narrow .stage { padding: 14px; }
body.narrow[data-pane="gym"] .pane-member, body.narrow[data-pane="member"] .pane-gym { display: none; }
body.narrow .pane-member { flex: 1; }

.browser { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: 14px; background: #14101b; border: 1px solid rgba(255,255,255,.09); box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; }
.browser-bar { height: 38px; flex: none; display: flex; align-items: center; padding: 0 14px; background: #1a1522; border-bottom: 1px solid var(--line); position: relative; }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.url { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; background: #0f0c15; color: var(--muted); font-size: 12px; border-radius: 8px; padding: 4px 16px; white-space: nowrap; max-width: 60%; overflow: hidden; }
.app { flex: 1; display: flex; min-height: 0; }

/* sidebar */
.side { width: 216px; flex: none; padding: 16px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; background: #120e18; overflow-y: auto; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 650; text-align: left; }
.nav:hover { background: rgba(255,255,255,.04); color: #fff; }
.nav.on { background: rgba(255,115,51,.14); color: #fff; }
.nav.on .ic { color: var(--ember); }
.nb { margin-left: auto; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 10px; background: #2E2E3D; color: #fff; font-style: normal; }
.nb.red { background: var(--red); }
.nb.dim { background: transparent; color: var(--muted); }
.pro { font-style: normal; font-size: 9.5px; font-weight: 900; letter-spacing: .06em; padding: 2px 5px; border-radius: 5px; background: var(--grad); color: #fff; vertical-align: middle; }
.side-foot { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; }
.gymcard { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--card); }
.gymcard b { display: block; font-size: 13.5px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gymcard small { color: var(--yel); font-size: 11.5px; font-weight: 700; }
.demo-note { display: flex; gap: 6px; font-size: 11px; color: var(--muted); margin: 0; line-height: 1.35; }

/* content */
.content { flex: 1; min-width: 0; overflow-y: auto; padding: 26px 30px 40px; container-type: inline-size; }
.view.enter { animation: viewIn .35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.head h1 { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.head .sub { color: var(--muted); font-size: 14px; margin: 6px 0 0; max-width: 720px; line-height: 1.45; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--grn); background: rgba(61,232,168,.1); border-radius: 20px; padding: 5px 12px; white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--grn); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: rgba(255,77,94,.09); border: 1px solid rgba(255,77,94,.35); color: #ffd5d9; margin-bottom: 18px; }
.alert .ic { color: var(--red); }
.alert p { flex: 1; margin: 0; font-size: 14px; line-height: 1.4; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi { background: var(--card); border-radius: 14px; padding: 16px; border: 1px solid var(--line); min-width: 0; }
.kpi-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.kic { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }
.k-ora .kic { background: rgba(255,115,51,.15); color: var(--ember); }
.k-grn .kic { background: rgba(61,232,168,.13); color: var(--grn); }
.k-red .kic { background: rgba(255,77,94,.14); color: var(--red); }
.k-blu .kic { background: rgba(84,181,255,.14); color: var(--blu); }
.kpi-v { display: block; font-size: 34px; font-weight: 800; margin: 10px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; transition: color .3s; }
.kpi-v.up { color: var(--grn); } .kpi-v.down { color: var(--yel); }
.kpi small { color: var(--muted); font-size: 12.5px; }

.grid2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-bottom: 14px; }
.grid2.r { grid-template-columns: 1fr 1fr; }
@container (max-width: 860px) { .grid2, .grid2.r { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--card); border-radius: 14px; padding: 18px; border: 1px solid var(--line); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card h3 { font-size: 16px; font-weight: 750; margin: 0 0 4px; }
.card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.card-h small { color: var(--muted); font-size: 12.5px; }
.hic { color: var(--yel); }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg.m { background: rgba(255,255,255,.16); } .lg.a { background: var(--grad); }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gl { stroke: rgba(255,255,255,.06); }
.chart .ax { fill: #6f6880; font-size: 10.5px; font-family: var(--font); }
.chart .ax.cur { fill: #fff; font-weight: 800; }
.chart .bm { fill: rgba(255,255,255,.08); }
.chart .ba { fill: url(#gA); }
.chart .bar:hover .ba { filter: brightness(1.2); }
.chart .val { fill: #fff; font-weight: 800; font-size: 12.5px; font-family: var(--font); }
.chart.anim rect { transform-box: fill-box; transform-origin: 50% 100%; animation: grow .8s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d); }
.chart.anim .val { animation: viewIn .4s .9s both; }
@keyframes grow { from { transform: scaleY(0); } }

.prize-mini { display: flex; gap: 8px; align-items: center; background: rgba(255,201,61,.1); color: var(--yel); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 8px; }
.prize-mini b { color: #fff; }
.rank { list-style: none; padding: 0; margin: 0; }
.rank li { display: grid; grid-template-columns: 24px 28px minmax(0, 1fr) 64px auto; align-items: center; gap: 10px; padding: 7px 6px; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 13px; }
.rank.big li { grid-template-columns: 26px 28px minmax(0, 1fr) 140px auto; padding: 9px 6px; }
.rank li:last-child { border-bottom: 0; }
.rank .nk { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.rank li.me { background: rgba(255,201,61,.09); border-radius: 10px; }
.rank li.gap { display: block; text-align: center; color: var(--muted); padding: 0; line-height: 1; border: 0; }
.pos { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800; background: #2E2E3D; color: #d9d3e6; }
.pos.p1 { background: #FFC93D; color: #3a2500; } .pos.p2 { background: #d5d9e2; color: #222; } .pos.p3 { background: #e0915a; color: #2a1405; }
.xpbar { display: block; height: 6px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; }
.xpbar i { display: block; height: 100%; border-radius: 4px; background: var(--grad); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.rank .xp { font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
em.you { font-style: normal; font-size: 10.5px; font-weight: 800; background: var(--yel); color: #2a1c00; border-radius: 5px; padding: 1px 5px; vertical-align: middle; }

.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid rgba(255,255,255,.04); border-radius: 10px; }
.feed li:last-child { border-bottom: 0; }
.feed p { flex: 1; margin: 0; font-size: 14px; color: #d8d1e6; }
.feed b { color: #fff; }
.feed .fi { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,115,51,.12); color: var(--ember); }
.feed .f-join .fi { background: rgba(84,181,255,.14); color: var(--blu); }
.feed .f-pr .fi { background: rgba(255,201,61,.14); color: var(--yel); }
.feed .f-back .fi, .feed .f-first .fi { background: rgba(61,232,168,.14); color: var(--grn); }
.feed time { color: var(--muted); font-size: 12px; min-width: 74px; text-align: right; }
.feed li.new { animation: feedIn .7s ease both; }
@keyframes feedIn { 0% { opacity: 0; transform: translateX(-10px); background: rgba(255,115,51,.18); } 60% { opacity: 1; transform: none; background: rgba(255,115,51,.12); } 100% { background: transparent; } }

/* tables */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.chip { padding: 7px 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 650; color: var(--muted); }
.chip span { background: #2E2E3D; color: #fff; border-radius: 10px; padding: 0 7px; margin-left: 7px; font-size: 11.5px; }
.chip.on { background: #fff; color: #15101c; }
.chip.on span { background: rgba(0,0,0,.1); color: #15101c; }
.stat { font-size: 13px; color: var(--muted); }
b.ok { color: var(--grn); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: #191322; white-space: nowrap; }
.tbl td.nw { white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(255,255,255,.02); }
.tbl td.act { text-align: right; white-space: nowrap; }
.tbl tr.back td { background: rgba(61,232,168,.06); }
.tbl tr.me td { background: rgba(255,201,61,.07); }
.who { display: flex; gap: 10px; align-items: center; }
.who b { display: block; font-weight: 700; }
.who small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.none { color: #6f6880; font-style: italic; }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 30px !important; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.badge.amber { background: rgba(255,201,61,.14); color: var(--yel); }
.badge.red { background: rgba(255,77,94,.15); color: #ff8592; }
.badge.grey { background: rgba(255,255,255,.08); color: #c9c2d6; }
.under { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.tag { display: inline-flex; gap: 4px; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 800; vertical-align: middle; white-space: nowrap; }
.tag.ok, .tag.new { background: rgba(61,232,168,.14); color: var(--grn); }
.tag.done { background: rgba(255,255,255,.07); color: #c9c2d6; }
.tag.coach { background: rgba(84,181,255,.15); color: #86cbff; }
.tag.red { background: rgba(255,77,94,.15); color: #ff8592; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; width: 360px; max-width: 100%; color: var(--muted); }
.search:focus-within { border-color: var(--ember); }
.search input { background: transparent; border: 0; color: #fff; font-size: 14px; padding: 10px 0; flex: 1; outline: none; min-width: 0; }
.note { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.note.big { font-size: 14px; justify-content: center; margin-top: 22px; color: #d8d1e6; }
.note.big .ic { color: var(--rose, #FF5C9E); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 10px; font-size: 13.5px; font-weight: 750; border: 1px solid rgba(255,255,255,.1); background: #2a2236; color: #fff; white-space: nowrap; transition: filter .15s, background .15s, transform .1s; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.97); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn.primary { background: var(--grad); border-color: transparent; box-shadow: 0 6px 18px rgba(230,64,38,.35); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: rgba(255,255,255,.05); }
.btn.danger { background: transparent; color: #ff8592; border-color: rgba(255,77,94,.35); }
.btn.danger:hover { background: rgba(255,77,94,.1); }
.btn.wide { width: 100%; justify-content: center; }
.btn.icon { padding: 9px; }
.btn:disabled { opacity: .38; cursor: default; filter: none; transform: none; }
.btn.pulse { animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,115,51,.6); } 70% { box-shadow: 0 0 0 12px rgba(255,115,51,0); } 100% { box-shadow: 0 0 0 0 rgba(255,115,51,0); } }

/* race */
.fld { display: block; margin: 12px 0 14px; }
.fld span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 650; margin-bottom: 6px; }
.fld input, .fld textarea { width: 100%; background: #120e18; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 11px 13px; color: #fff; font-size: 15px; resize: vertical; outline: none; line-height: 1.4; }
.fld input:focus, .fld textarea:focus { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255,115,51,.18); }
.live-hint { display: flex; gap: 8px; align-items: center; background: rgba(61,232,168,.08); color: #8ff0c9; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 0 0 14px; }
.champ { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,201,61,.16), rgba(255,115,51,.06)); color: var(--yel); }
.champ small { display: block; color: var(--muted); font-size: 12px; }
.champ b { display: block; font-size: 17px; color: #fff; }
.champ span { font-size: 13px; }
.tip { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin: 14px 0 0; line-height: 1.4; }
.tip .ic { color: var(--yel); margin-top: 2px; }

/* wall */
.post { display: flex; gap: 14px; background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 10px; border: 1px solid var(--line); max-width: 860px; }
.post.flag { border-color: rgba(255,77,94,.5); background: rgba(255,77,94,.06); }
.pb { flex: 1; min-width: 0; }
.ph { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ph time { color: var(--muted); font-size: 12px; }
.post p { margin: 6px 0 10px; font-size: 14.5px; color: #e9e3f3; line-height: 1.45; }
.pf { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 13px; }
.pf > span { display: inline-flex; gap: 5px; align-items: center; }
.pf .btn { margin-left: 4px; }

/* poster + plan */
.poster-layout { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.poster-prev { width: 397px; height: 562px; flex: none; border-radius: 6px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.poster-scale { width: 210mm; height: 297mm; transform: scale(.5); transform-origin: 0 0; }
.poster-side { width: 290px; flex: none; }
.poster-side .lbl { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.code-big { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 34px; font-weight: 800; letter-spacing: .16em; margin: 4px 0 16px; color: #fff; }
.poster-side .btn { margin-bottom: 10px; }
.hint { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 6px 0 0; }
.trial { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; background: rgba(255,115,51,.09); border: 1px solid rgba(255,115,51,.3); color: #ffc7ab; margin-bottom: 18px; max-width: 820px; font-size: 14px; }
.tbar { flex-basis: 100%; height: 6px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.tbar i { display: block; height: 100%; background: var(--grad); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 820px; }
@container (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; position: relative; }
.plan h3 { margin: 0; font-size: 18px; }
.plan .price { font-size: 28px; font-weight: 800; margin: 8px 0 2px; }
.plan > small { color: var(--muted); font-size: 13px; }
.plan ul { list-style: none; padding: 0; margin: 18px 0; }
.plan li { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 14px; }
.plan li .ic { color: var(--grn); }
.plan.plan-pro { border-color: rgba(255,115,51,.5); background: linear-gradient(180deg, rgba(255,115,51,.13), var(--card) 45%); }
.plan.plan-pro .btn { margin-bottom: 10px; }
.ribbon { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 800; background: var(--grn); color: #062b1e; border-radius: 6px; padding: 3px 8px; }
.center { display: block; text-align: center; color: var(--muted); font-size: 12px; }

/* avatars */
.av { display: inline-flex; align-items: center; justify-content: center; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); color: #140f1a; font-size: calc(var(--s) * .38); font-weight: 800; flex: none; letter-spacing: -.02em; }
.av.gym { background: linear-gradient(135deg, #FF7333, #BF85FF); color: #fff; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; background: #241d2e; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 11px 16px; font-size: 13.5px; color: #fff; box-shadow: 0 14px 40px rgba(0,0,0,.5); opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .3s; max-width: 460px; }
.toast.in { opacity: 1; transform: none; }
.toast .ic { color: var(--ember); }
.toast.ok .ic { color: var(--grn); }
.toast.warn .ic { color: var(--yel); }

@media (max-width: 1180px) {
  .brand .pt, .brand .sep, .top [data-act=reset] span { display: none; }
  .gymname input { width: 160px; }
}
@media (max-width: 900px) {
  .side { width: 62px; padding: 12px 8px; }
  .nav span, .nav .pro, .side-foot { display: none; }
  .nav { justify-content: center; position: relative; }
  .nav .nb { position: absolute; top: 2px; right: 2px; }
  .brand .pt, .brand .sep, .pill-demo { display: none; }
  .gymname input { width: 140px; }
  .content { padding: 20px 18px 30px; }
}

/* phone-size screens (a gym owner opening the link on a mobile) */
@media (max-width: 640px) {
  body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
  .top { height: auto; flex: none; flex-wrap: wrap; gap: 8px 8px; padding: 10px 12px; }
  .brand { order: 0; font-size: 14px; }
  .brand img { width: 26px; height: 26px; }
  .top .spacer { order: 1; }
  .top .seg:not(.seg-pane) { order: 2; }
  .top [data-act=reset] { order: 3; }
  .top .seg-pane { order: 4; }
  .gymname { order: 5; flex: 1 1 120px; min-width: 0; }
  .gymname input { width: 100%; min-width: 0; font-size: 13px; padding: 7px 0; }
  .seg button { padding: 6px 10px; }
  .stage { flex: 1; height: auto; min-height: 0; }
  body.narrow .stage { padding: 0; }
  .browser { border-radius: 0; border: 0; box-shadow: none; }
  .browser-bar { display: none; }
  .side { width: 50px; padding: 10px 5px; }
  .nav { padding: 9px 6px; }
  .content { padding: 16px 12px 28px; }
  .head { flex-wrap: wrap; gap: 10px; }
  .head h1 { font-size: 21px; }
  .head .sub { font-size: 13px; }
  .alert { flex-wrap: wrap; padding: 12px; }
  .alert p { font-size: 13px; flex-basis: calc(100% - 40px); }
  .kpis { gap: 10px; }
  .kpi { padding: 12px; }
  .kpi-top { font-size: 12px; gap: 6px; }
  .kic { width: 26px; height: 26px; }
  .kpi-v { font-size: 27px; }
  .card { padding: 14px; }
  .card.flush { overflow-x: auto; }
  .poster-prev { width: 270px; height: 382px; }
  .poster-scale { transform: scale(.34); }
  .poster-side { width: 100%; }
  .plan { padding: 18px; }
  .pane-member { overflow: hidden; }
  .toasts { width: calc(100% - 24px); bottom: 14px; }
  .toast { max-width: 100%; }
}
