/* DBC Members Portal — builds on /styles/site.css tokens. App-like, thumb-friendly. */

body.portal {
  /* Native controls (date pickers, selects, file inputs, scrollbars) render in dark mode. */
  color-scheme: dark;
  min-height: 100svh;
  --smoke: #a19d91;          /* brighter muted text: ≥ 4.5:1 on the dark cards */
  --nav-h: 64px;
}
body.portal::after { opacity: 0.035; } /* calmer grain for an app people read daily */
[hidden] { display: none !important; }

.p-ico {
  width: 20px; height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn .p-ico { width: 18px; height: 18px; }

/* ---------- Signed-out screens ---------- */
.p-center {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 16px;
  text-align: center;
}
.p-splash-logo, .p-auth-logo img { width: 150px; }
.p-auth-logo { display: block; }

.p-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: 20px;
  margin-bottom: 14px;
  text-align: left;
}
.p-auth { width: 100%; max-width: 420px; position: relative; padding: 26px 22px; }
.p-auth::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 48px; height: 48px;
  border-top: 4px solid var(--gold);
  border-left: 4px solid var(--gold);
}
.p-auth p { color: var(--bone-dim); margin-bottom: 14px; }
.p-auth .kicker { margin-bottom: 6px; color: var(--gold); }

.p-h1 {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 2.8rem;
  line-height: 0.95;
  margin-bottom: 14px;
}
.p-h2 {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 10px;
}
.p-h2 small {
  font-family: var(--f-label);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--smoke);
  vertical-align: middle;
  margin-left: 6px;
}

/* ---------- Buttons ---------- */
.btn { gap: 10px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Secondary actions: real buttons with icon + label, 40px+ tap target. */
.p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  background: var(--ink-3);
  border: 1px solid var(--line-strong);
  color: var(--bone);
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.p-btn .p-ico { width: 16px; height: 16px; }
.p-btn:hover { border-color: var(--gold); color: var(--gold); }
.p-btn-sm { min-height: 36px; padding: 6px 11px; font-size: 0.74rem; }
.p-btn-danger:hover { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.p-btn-icononly { padding: 8px; width: 40px; }
.p-btn-icononly span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.p-btn-icononly.p-btn-sm { width: 36px; }
/* On the yellow banner, buttons invert. */
.p-banner .p-btn { background: transparent; border-color: rgba(10, 10, 10, 0.35); color: var(--ink); }
.p-banner .p-btn:hover { background: var(--ink); color: var(--gold); border-color: var(--ink); }

.p-textbtn {
  background: none;
  border: 0;
  padding: 10px 4px;
  color: var(--bone-dim);
  font-family: var(--f-label);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.p-textbtn:hover { color: var(--gold); }

/* ---------- Forms ---------- */
.p-form { display: flex; flex-direction: column; gap: 6px; }
.p-form > label:not(.p-drop),
.p-form div > label,
.p-guardian > label {
  font-family: var(--f-label);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-top: 12px;
}
.p-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.p-form select,
.p-form textarea,
.p-member select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--bone);
  font-size: 1rem;
}
.p-form input:focus, .p-form select:focus, .p-form textarea:focus, .p-member select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.p-form input::placeholder, .p-form textarea::placeholder { color: #77736a; }
/* Make the native picker icons gold so they're visible on black. */
.p-form input::-webkit-calendar-picker-indicator { filter: invert(84%) sepia(56%) saturate(1200%) hue-rotate(2deg); cursor: pointer; opacity: 0.9; }
/* iOS Safari gives date/time inputs a native width that pokes out of the card. */
.p-form input[type="date"], .p-form input[type="time"], .p-form input[type="datetime-local"] {
  -webkit-appearance: none; appearance: none;
  display: block; max-width: 100%; min-width: 0; box-sizing: border-box; text-align: left;
}
.p-form input::-webkit-date-and-time-value { text-align: left; }
.p-row2 > *, .p-row3 > * { min-width: 0; }
.p-form .btn { margin-top: 18px; }
.p-code {
  font-family: var(--f-display) !important;
  font-size: 2rem !important;
  letter-spacing: 0.4em;
  text-align: center;
}
.p-hint { font-size: 0.85rem; color: var(--smoke); margin: 4px 0 6px; }
.p-row2, .p-row3 { display: grid; gap: 0 12px; }
.p-row2 { grid-template-columns: 1fr 1fr; }
.p-row3 { grid-template-columns: 1.3fr 1fr 1fr; }
@media (max-width: 520px) { .p-row2 { grid-template-columns: 1fr; } }

/* Tap-to-toggle chips (audience, groups, post type) */
.p-toggles { border: 0; padding: 0; margin: 14px 0 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p-toggles legend {
  grid-column: 1 / -1;
  padding: 0;
  margin-bottom: 8px;
  font-family: var(--f-label);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.p-kinds { grid-template-columns: repeat(3, 1fr); }
.p-toggle { position: relative; display: block; cursor: pointer; }
.p-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.p-toggle > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  height: 100%;
  padding: 10px 12px;
  text-align: center;
  border: 1px solid var(--line-strong);
  background: var(--ink);
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone-dim);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.p-toggle-tall > span { flex-direction: column; gap: 2px; }
.p-toggle-tall small { font-family: var(--f-body); text-transform: none; letter-spacing: 0; font-size: 0.72rem; opacity: 0.8; }
.p-toggle:hover > span { border-color: var(--gold); color: var(--bone); }
.p-toggle input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }
.p-toggle input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.p-toggle input:disabled { cursor: default; }
.p-toggles.is-readonly .p-toggle:hover > span { border-color: var(--line-strong); color: var(--bone-dim); }
.p-toggles-sm { grid-template-columns: repeat(4, 1fr); margin: 12px 0 0; gap: 6px; }
@media (max-width: 560px) { .p-toggles-sm { grid-template-columns: repeat(2, 1fr); } }
.p-toggle input:disabled:checked + span { opacity: 0.75; }
.p-toggles-sm .p-toggle > span { min-height: 38px; font-size: 0.72rem; padding: 6px; }

/* On/off switch rows */
.p-switches { display: flex; flex-direction: column; margin-top: 14px; border-top: 1px solid var(--line); }
.p-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.p-switch-text { display: flex; flex-direction: column; }
.p-switch-text strong { font-weight: 700; }
.p-switch-text small { color: var(--smoke); font-size: 0.82rem; }
.p-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.p-switch-ui {
  position: relative;
  flex-shrink: 0;
  width: 50px; height: 30px;
  border-radius: 999px;
  background: var(--ink-4);
  border: 1px solid var(--line-strong);
  transition: background 0.2s, border-color 0.2s;
}
.p-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bone);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.p-switch input:checked ~ .p-switch-ui { background: var(--gold); border-color: var(--gold); }
.p-switch input:checked ~ .p-switch-ui::after { transform: translateX(20px); background: var(--ink); }
.p-switch input:focus-visible ~ .p-switch-ui { outline: 3px solid var(--gold); outline-offset: 2px; }

.p-status { min-height: 1.5em; margin-top: 10px; font-weight: 700; color: var(--gold) !important; }
.p-fine { font-size: 0.85rem; color: var(--smoke) !important; margin-top: 12px; }
.p-fine a { color: var(--bone-dim); }
.p-access { margin: 12px 0; }
.p-access > summary { cursor: pointer; color: var(--gold); font-size: 0.9rem; }
.p-access .p-form { margin-top: 10px; }
.p-muted { color: var(--bone-dim); margin-bottom: 12px; }
.p-meta { font-size: 0.85rem; color: var(--smoke); }
.p-error { color: var(--bone); border-color: var(--gold); }
.p-note {
  border-left: 3px solid var(--gold);
  background: var(--gold-glow);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.92rem;
}

/* ---------- App chrome ---------- */
.p-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.p-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.p-brand img { width: 46px; }
.p-brand span { font-family: var(--f-display); text-transform: uppercase; line-height: 0.95; font-size: 0.95rem; }
.p-who { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.p-who-text { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.p-who-name { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.p-who-role { font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.p-avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.p-avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }

/* Tabs: bottom bar on phones, top strip on wider screens. */
.p-tabs {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(14, 14, 13, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-strong);
}
.p-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  text-decoration: none;
  color: var(--smoke);
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.p-tab .p-ico { width: 22px; height: 22px; }
.p-tab span { white-space: nowrap; }
.p-tab.is-active { color: var(--gold); }
.p-tab.is-active::before {
  content: "";
  position: absolute;
  top: -1px; left: 22%; right: 22%;
  height: 3px;
  background: var(--gold);
}
/* The Post tab gets a gold button so coaches always find it. */
.p-tab.is-post { gap: 2px; }
.p-tab.is-post .p-ico {
  width: 32px; height: 32px;
  padding: 6px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  stroke-width: 2.6;
}
.p-tab.is-post.is-active::before { display: none; }

.p-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 14px calc(var(--nav-h) + 40px + env(safe-area-inset-bottom));
}

@media (min-width: 760px) {
  .p-tabs {
    position: sticky;
    top: calc(67px + env(safe-area-inset-top));
    bottom: auto;
    height: auto;
    padding: 0 max(16px, calc((100vw - 860px) / 2));
    display: flex;
    gap: 4px;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 10, 10, 0.96);
  }
  .p-tab {
    flex-direction: row;
    gap: 8px;
    padding: 15px 14px 13px;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
  }
  .p-tab .p-ico { width: 18px; height: 18px; }
  .p-tab.is-active::before { top: auto; bottom: -1px; left: 0; right: 0; }
  .p-tab.is-post { margin-left: auto; order: 9; }
  .p-tab.is-post .p-ico { width: 26px; height: 26px; padding: 4px; margin: 0; }
  .p-tab.is-post { color: var(--gold); }
  .p-tab:last-child:not(.is-post) { order: 10; }
  .p-main { padding: 24px 20px 70px; }
}

.p-section { margin-top: 26px; }
.p-loading { padding: 30px 0; text-align: center; }

/* ---------- Updates ---------- */
.p-quickpost {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px dashed var(--line-strong);
  color: var(--bone-dim);
  text-decoration: none;
  font-family: var(--f-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.p-quickpost .p-ico { color: var(--gold); }
.p-quickpost:hover { border-color: var(--gold); color: var(--bone); }
@media (min-width: 760px) { .p-quickpost { display: none; } }

.p-banner {
  position: relative;
  background: var(--gold);
  color: var(--ink);
  padding: 22px 20px 16px;
  margin-bottom: 14px;
}
.p-banner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 8px, transparent 8px 16px);
}
.p-banner-kicker { font-family: var(--f-label); font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.75rem; margin-top: 2px; }
.p-banner h2 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: 1.9rem; line-height: 1; margin: 6px 0 8px; }
.p-banner .p-meta { color: rgba(10, 10, 10, 0.78); }
.p-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 10px; }

/* Card footers: info on the left, actions on the right, always spaced. */
.p-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.p-banner .p-foot { border-top-color: rgba(10, 10, 10, 0.18); }

.p-events { display: grid; gap: 12px; }
.p-event {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--ink-2);
  border: 1px solid rgba(250, 216, 20, 0.4);
}
.p-event-body { min-width: 0; }
.p-event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  border: 2px solid var(--gold);
  height: 70px;
}
.p-event-date span { font-family: var(--f-label); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.p-event-date strong { font-family: var(--f-display); font-weight: 400; font-size: 2rem; line-height: 1; }
.p-event h3, .p-post h3 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: 1.4rem; line-height: 1.05; }

.p-post.is-pinned { border-color: rgba(250, 216, 20, 0.5); }
.p-post-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.p-kind { font-family: var(--f-label); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.p-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.p-chip {
  font-family: var(--f-label);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  color: var(--bone-dim);
}
.p-chip.is-all { border-color: transparent; background: var(--ink-4); color: var(--bone); }
.p-empty { text-align: center; color: var(--bone-dim); }
.p-empty .btn { margin-top: 14px; }

/* ---------- Schedule ---------- */
.p-week { display: grid; gap: 18px; }
.p-day-name {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.4rem;
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 4px;
  margin-bottom: 4px;
}
.p-slot {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.p-slot-time { font-family: var(--f-label); font-weight: 600; font-size: 1.02rem; line-height: 1.25; }
.p-slot-time span { display: block; font-weight: 400; font-size: 0.8rem; color: var(--smoke); }
.p-slot-info { min-width: 0; }
.p-slot-info h3 { font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; }
.p-slot-info .p-meta { margin-bottom: 6px; }

.p-add { margin-top: 22px; padding: 0; }
.p-add summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  cursor: pointer;
  font-family: var(--f-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  list-style: none;
}
.p-add summary::-webkit-details-marker { display: none; }
.p-add[open] summary { border-bottom: 1px solid var(--line); }
.p-add > form { padding: 6px 20px 20px; }

/* ---------- Photos ---------- */
.p-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.p-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 150px;
  padding: 22px;
  border: 2px dashed rgba(250, 216, 20, 0.45);
  background: rgba(250, 216, 20, 0.04);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.p-drop:hover, .p-drop.is-over, .p-file:focus-visible + .p-drop { border-color: var(--gold); background: rgba(250, 216, 20, 0.1); }
.p-file:focus-visible + .p-drop { outline: 3px solid var(--gold); outline-offset: 2px; }
.p-drop-ico { width: 40px; height: 40px; color: var(--gold); stroke-width: 1.6; }
.p-drop-title { font-family: var(--f-display); text-transform: uppercase; font-size: 1.35rem; color: var(--bone); }
.p-drop-sub { font-size: 0.85rem; color: var(--smoke); }
.p-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin-top: 8px; }
.p-previews:empty { display: none; }
.p-previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line-strong); }
.p-progress { list-style: none; padding: 0; margin-top: 10px; font-size: 0.88rem; color: var(--bone-dim); }
.p-progress li { padding: 3px 0; }
.p-progress .is-ok { color: var(--bone); }
.p-progress .is-err { color: var(--gold); }

.p-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.p-photo { background: var(--ink-2); border: 1px solid var(--line); margin: 0; }
.p-photo-img { position: relative; }
.p-photo-img img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.p-photo.is-hidden .p-photo-img img { opacity: 0.3; filter: grayscale(1); }
.p-photo-badge {
  position: absolute;
  top: 6px; left: 6px;
  padding: 3px 7px;
  font-family: var(--f-label);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bone-dim);
  border: 1px solid var(--line-strong);
}
.p-photo-badge.is-live { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.p-photo-badge.is-builtin { left: auto; right: 6px; }
.p-photo-alt {
  padding: 8px 8px 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--bone-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.p-photo figcaption { display: flex; gap: 6px; padding: 6px; }
.p-photo figcaption .p-btn:first-child { flex: 1; }
.p-photo-share { padding: 6px 6px 0; }
.p-photo-share .p-btn { width: 100%; border-color: rgba(250, 216, 20, 0.45); color: var(--gold); }
.p-photo-share .p-btn:hover { background: var(--gold); color: var(--ink); }

/* ---------- Members ---------- */
.p-roster { display: grid; gap: 10px; }
.p-member { padding: 14px; background: var(--ink-2); border: 1px solid var(--line); }
.p-member.is-inactive { opacity: 0.6; }
.p-member-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; }
.p-member-main { min-width: 0; }
.p-member h3 { font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p-member .p-meta { overflow-wrap: anywhere; }
.p-member-head select { width: auto; min-height: 38px; padding: 6px 10px; font-size: 0.88rem; }
.p-tag { font-family: var(--f-label); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 2px 6px; background: var(--gold); color: var(--ink); }
.p-tag.is-muted { background: var(--ink-4); color: var(--bone); }
.p-member-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 420px) {
  .p-member-head { grid-template-columns: auto 1fr; }
  .p-member-head select { grid-column: 1 / -1; width: 100%; }
  .p-toggles-sm .p-toggle > span { font-size: 0.66rem; }
}
.p-guardian { display: flex; flex-direction: column; gap: 6px; padding: 10px 0 0; }

/* ---------- Me ---------- */
.p-me { display: flex; gap: 16px; align-items: flex-start; }
.p-me .p-h2 { margin-bottom: 4px; }

/* ---------- Install prompt ---------- */
.p-ios-steps { list-style: none; padding: 0; margin: 12px 0 4px; display: grid; gap: 10px; }
.p-ios-steps li { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.p-step-n {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--f-display);
  font-size: 0.9rem;
}
.p-kbd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  margin: 0 2px;
  border-radius: 6px;
  background: var(--ink-4);
  color: var(--bone);
  font-weight: 700;
  white-space: nowrap;
}
.p-kbd .p-ico { width: 16px; height: 16px; color: #4da3ff; }

.p-install {
  position: fixed;
  left: 10px; right: 10px;
  bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom));
  z-index: 40;
  max-width: 460px;
  margin: 0 auto;
  padding: 18px 18px 12px;
  background: var(--ink-2);
  border: 1px solid rgba(250, 216, 20, 0.55);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
.p-install.is-on { transform: none; opacity: 1; }
.p-install::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 7px, transparent 7px 14px);
}
.p-install-head { display: flex; gap: 14px; align-items: center; padding-right: 30px; }
.p-install-head img { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; }
.p-install-title { font-family: var(--f-display); text-transform: uppercase; font-size: 1.35rem; line-height: 1; }
.p-install-sub { font-size: 0.88rem; color: var(--bone-dim); margin-top: 4px; }
.p-install-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.p-install-actions .btn { flex: 1; }
.p-install.is-ios .p-install-actions { justify-content: flex-end; margin-top: 6px; }
.p-install-x {
  position: absolute;
  top: 10px; right: 8px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: var(--bone-dim);
  cursor: pointer;
}
.p-install-x:hover { color: var(--gold); }
.p-install-arrow {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  font-size: 1.6rem;
  color: var(--gold);
  animation: nudge 1.2s ease-in-out infinite;
}
@keyframes nudge { 50% { transform: translate(-50%, 6px); } }
@media (min-width: 760px) {
  .p-install { left: auto; right: 20px; bottom: 20px; margin: 0; width: 380px; }
  .p-install-arrow { display: none; }
}
.p-install-inline .p-ios-steps { margin-top: 4px; }

/* ---------- Toast ---------- */
.p-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  z-index: 60;
  max-width: min(92vw, 480px);
  padding: 12px 18px;
  background: var(--bone);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 30px);
  opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s;
  pointer-events: none;
}
.p-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.p-toast.is-err { background: var(--gold); }
@media (min-width: 760px) { .p-toast { bottom: 24px; } }

/* ---------- Class sign-ups ---------- */
.p-subnav { display: flex; gap: 6px; margin: -2px 0 16px; }
.p-subnav a {
  flex: 1;
  text-align: center;
  padding: 10px;
  border: 1px solid var(--line-strong);
  font-family: var(--f-label);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-dim);
}
.p-subnav a.is-active, .p-subnav a:hover { border-color: var(--gold); color: var(--gold); }

.p-class { grid-template-columns: 84px 1fr auto; }
.p-class.is-mine { border-left: 3px solid var(--gold); padding-left: 10px; }
.p-slot-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.p-slot-actions .btn { margin: 0; white-space: nowrap; }
.p-spots { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.p-spots-bar { position: relative; flex: 0 0 90px; height: 6px; background: var(--ink-4); overflow: hidden; }
.p-spots-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--gold); transition: width 0.4s var(--ease); }
.p-class.is-full .p-spots-fill { background: var(--bone-dim); }
.p-spots-text { font-family: var(--f-label); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone-dim); }
.p-class.is-full .p-spots-text { color: var(--bone); }
.p-mine { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 2px; }
.p-mine li { color: var(--gold); font-size: 0.92rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.p-mine strong { color: var(--bone); }
.p-mine .p-textbtn { padding: 4px; font-size: 0.72rem; }
.p-signup { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.p-signup input { flex: 1 1 160px; min-height: 40px; padding: 8px 10px; background: var(--ink); border: 1px solid var(--gold); color: var(--bone); font-size: 1rem; }
.p-signup .p-hint { flex-basis: 100%; margin: 0; }
.p-roster-list { margin: 10px 0 0; padding-left: 1.3em; display: grid; gap: 4px; }
.p-roster-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.p-roster-list li::marker { color: var(--gold); }
.p-roster-list small { color: var(--smoke); }
@media (max-width: 520px) {
  .p-class { grid-template-columns: 70px 1fr; }
  .p-slot-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; padding-left: 84px; }
}
@media (max-width: 380px) { .p-slot-actions { padding-left: 0; } }

.p-badge {
  position: absolute;
  top: 6px; left: 55%;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 0.66rem;
  line-height: 18px;
  text-align: center;
  letter-spacing: 0;
}
@media (min-width: 760px) { .p-badge { position: static; margin-left: 4px; } }

/* ---------- 1:1 sessions ---------- */
.p-section-head { margin-bottom: 10px; scroll-margin-top: 140px; }
.p-h3 {
  font-family: var(--f-label);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 20px 0 10px;
}
.p-h3 small { color: var(--smoke); margin-left: 4px; }
.p-request { border-left: 3px solid var(--line-strong); }
.p-request.is-pending { border-left-color: var(--gold); }
.p-request-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.p-request-name { font-size: 1.05rem; }
.p-request-actions { display: flex; gap: 8px; margin-top: 12px; }
.p-request-actions .btn { flex: 1; margin: 0; }
.p-request input[type="text"], .p-request input[type="datetime-local"] {
  width: 100%; min-height: 42px; margin-top: 8px; padding: 8px 10px;
  background: var(--ink); border: 1px solid var(--line-strong); color: var(--bone); font-size: 0.95rem;
}
.p-picks { grid-template-columns: 1fr; margin-top: 6px; }
.p-picks .p-toggle > span { justify-content: flex-start; text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: 0.95rem; min-height: 42px; }
.p-status-chip {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--f-label);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--bone-dim);
}
.p-status-chip.is-ok { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.p-status-chip.is-wait { border-color: var(--gold); color: var(--gold); }
.p-status-chip.is-no { border-color: var(--bone-dim); color: var(--bone); }
.p-coach-note { margin-top: 8px; padding: 8px 12px; background: var(--gold-glow); border-left: 3px solid var(--gold); font-size: 0.92rem; }
.p-upcoming { list-style: none; padding: 0; display: grid; gap: 6px; }
.p-upcoming li { padding: 10px 12px; background: var(--ink-2); border: 1px solid var(--line); }
.p-upcoming small { color: var(--smoke); }

/* ---------- Manage weekly classes ---------- */
.p-manage { margin-top: 26px; }
.p-manage-body { padding: 4px 20px 20px; }
.p-manage-day h4 { font-family: var(--f-label); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin: 14px 0 6px; }
.p-manage-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.p-manage-row > span:first-child { flex: 1; min-width: 0; }
.p-cap-label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-label); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--smoke); }
.p-cap { width: 64px; min-height: 36px; padding: 4px 8px; background: var(--ink); border: 1px solid var(--line-strong); color: var(--bone); font-size: 0.95rem; }
.p-addclass { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-strong); }

/* ---------- Drop-in classes + class editing ---------- */
.p-manage-flag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  font-family: var(--f-label);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--smoke);
  vertical-align: middle;
}
.p-addclass.is-editing { border-top-color: var(--gold); }
.p-addclass.is-editing h4 { color: var(--gold); }
.p-cancel-edit { align-self: center; }

/* ---------- Suggested 1:1 times ---------- */
.p-suggests { margin: -4px 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.p-suggests .p-h3 { margin-top: 0; margin-bottom: 4px; }
.p-suggest-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.p-suggest {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 52px;
  padding: 8px 10px;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  color: var(--bone);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.p-suggest strong { font-size: 0.9rem; }
.p-suggest small { font-size: 0.75rem; color: var(--smoke); }
.p-suggest:hover { border-color: var(--gold); }
.p-suggest.is-on { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.p-suggest.is-on small { color: rgba(10, 10, 10, 0.7); }
.p-suggest.is-alt { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }

/* ---------- Share explainer ---------- */
.p-why { margin: 10px 0 4px; font-size: 0.9rem; }
.p-why summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--bone-dim);
  font-size: 0.85rem;
  list-style: none;
}
.p-why summary::-webkit-details-marker { display: none; }
.p-why summary .p-ico { width: 16px; height: 16px; color: var(--gold); }
.p-why summary:hover { color: var(--gold); }
.p-why[open] summary { color: var(--bone); }
.p-why p { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--gold); color: var(--bone-dim); max-width: 62ch; }

/* ---------- Waivers ---------- */
.p-waiver-nudge { border-color: var(--gold); border-left: 4px solid var(--gold); }
.p-waiver-nudge h3 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: 1.35rem; line-height: 1.05; margin: 4px 0 6px; }
.p-waiver-nudge .btn { margin-top: 12px; }
.p-waiver { scroll-margin-top: 140px; }
.p-waiver-list { list-style: none; padding: 0; margin: 4px 0 6px; display: grid; gap: 6px; }
.p-waiver-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--ink); border: 1px solid var(--line); flex-wrap: wrap; }
.p-waiver-list li.is-ok { border-color: rgba(250, 216, 20, 0.35); }
.p-waiver-list small { color: var(--smoke); }
.p-waiver-list .btn { margin: 0; }
.p-waiver-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-strong); scroll-margin-top: 140px; }
.p-waiver-title { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: 1.2rem; line-height: 1.1; }
.p-waiver-text {
  max-height: 320px;
  overflow-y: auto;
  padding: 14px;
  margin: 8px 0 4px;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--bone-dim);
}
.p-waiver-text:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.p-waiver-read { margin: 0 20px 20px; padding-top: 12px; }
.p-waiver-file { margin: 10px 0 4px; }
.p-waiver-file[aria-disabled="true"] { opacity: 0.5; cursor: wait; }
.p-drop-sm { min-height: 110px; padding: 16px; }
.p-drop-sm .p-drop-ico { width: 30px; height: 30px; }
.p-drop-sm .p-drop-title { font-size: 1.1rem; overflow-wrap: anywhere; }
.p-form > label.p-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-family: var(--f-body);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bone);
  cursor: pointer;
}
.p-check input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; accent-color: var(--gold); }
.p-missing { margin: 0 0 6px; padding-left: 1.2em; columns: 2; }
.p-missing li { padding: 2px 0; break-inside: avoid; }
.p-missing li::marker { color: var(--gold); }
@media (max-width: 520px) { .p-missing { columns: 1; } }
.p-tag.is-ok { background: transparent; border: 1px solid rgba(250, 216, 20, 0.5); color: var(--gold); }
.p-tag.is-warn { background: var(--ink-4); color: var(--bone); border: 1px dashed var(--bone-dim); }

/* ---------- Coaches tab ---------- */
.p-subnav-team a { flex: 1 1 0; min-width: 0; padding: 10px 4px; }
@media (max-width: 420px) { .p-subnav-team a { font-size: 0.68rem; letter-spacing: 0.04em; } }
.p-section-first { margin-top: 4px; }
.p-section-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.p-section-bar .p-h2 { margin-bottom: 0; }
.p-h3-first { margin-top: 0; }
.p-toggles-3 { grid-template-columns: repeat(3, 1fr); }
.p-foot-actions { display: inline-flex; gap: 6px; }

.p-coachnote.is-important { border-left: 3px solid var(--bone-dim); }
.p-coachnote.is-urgent { border-color: var(--gold); border-left: 4px solid var(--gold); }
.p-urgency {
  margin-left: 10px;
  padding: 2px 7px;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  border: 1px solid var(--bone-dim);
  color: var(--bone);
}
.p-urgency.is-urgent { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.p-boxers { display: grid; gap: 10px; }
.p-boxer { margin-bottom: 0; padding: 16px; }
.p-boxer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.p-boxer-head h3 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: 1.35rem; line-height: 1.05; }
.p-record { font-family: var(--f-display); font-size: 1.5rem; color: var(--gold); white-space: nowrap; }
.p-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0 0; }
.p-facts dt { font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); }
.p-facts dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.p-facts dd small { font-weight: 400; color: var(--smoke); }
.p-facts dd.is-ok { color: var(--gold); }
.p-facts dd.is-missing { color: var(--bone); text-decoration: underline wavy var(--gold); text-underline-offset: 4px; }
@media (max-width: 560px) { .p-facts { grid-template-columns: 1fr 1fr; } }

/* ---------- Petty cash ---------- */
.p-cash-head { margin-bottom: 14px; }
.p-month { min-height: 38px; padding: 6px 10px; background: var(--ink); border: 1px solid var(--line-strong); color: var(--bone); font-size: 0.95rem; }
.p-cash-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.p-cash-totals > div { padding: 12px; background: var(--ink-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.p-cash-totals span { font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); }
.p-cash-totals strong { font-family: var(--f-display); font-weight: 400; font-size: 1.4rem; line-height: 1; overflow-wrap: anywhere; }
.p-cash-totals .is-in { color: var(--gold); }
.p-cash-totals .is-total { border-color: var(--gold); background: var(--gold-glow); }
@media (max-width: 560px) { .p-cash-totals { grid-template-columns: 1fr 1fr; } }
.p-ledger { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.p-ledger li { display: grid; grid-template-columns: 62px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.p-ledger-date { font-family: var(--f-label); font-size: 0.8rem; color: var(--smoke); }
.p-ledger-what { min-width: 0; overflow-wrap: anywhere; }
.p-ledger-what small, .p-ledger-amt small { display: block; font-size: 0.75rem; color: var(--smoke); font-weight: 400; }
.p-ledger-amt { text-align: right; font-weight: 700; white-space: nowrap; }
.p-ledger-amt.is-in { color: var(--gold); }
@media (max-width: 420px) {
  .p-ledger li { grid-template-columns: 1fr auto auto; }
  .p-ledger-date { grid-column: 1 / -1; }
}
.p-addclass h4 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: 1.2rem; }

/* Youth → adult */
.p-born-label { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.p-born { width: 6.5em; padding: 4px 8px; font-size: 0.85rem; }
.p-make-adult { margin: 10px 0; }
.p-make-adult ul { padding-left: 1.2em; margin: 8px 0 12px; }
