/* ==========================================================================
   Threshold: membership management
   MiniBytez product demonstration

   Visual language: warm off-white paper, deep burgundy, soft neutral surfaces.
   Left navigation rail, day-shaped home screen, human scale typography.
   Nothing here is shared with any other demo in this suite.
   ========================================================================== */

:root {
  --paper:     #f8f5f3;
  --panel:     #ffffff;
  --sand:      #f0eae6;
  --sand-deep: #e6ddd7;
  --ink:       #241d1c;
  --ink-2:     #4b3f3d;
  --muted:     #7d6f6c;
  --faint:     #a2938f;
  --line:      #e6ddd7;
  --line-soft: #efe8e4;

  --wine:      #7a1f2b;
  --wine-deep: #5c141e;
  --wine-soft: #f6ecec;
  --wine-line: #e6cfd1;

  --olive:     #4f6b4a;
  --olive-soft:#eef2ec;
  --amber:     #a86a12;
  --amber-soft:#fbf1e0;
  --red:       #a5322b;
  --red-soft:  #fbecea;

  --rail: 226px;
  --r: 6px;
  --ff: "Segoe UI", -apple-system, BlinkMacSystemFont, Inter, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 14.5px/1.55 var(--ff);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--wine); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; border-radius: 3px; }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: -9999px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* --- Frame ---------------------------------------------------------------- */

.frame { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }

/* Left rail: labels first, people-oriented, never an icon strip. */
.rail {
  background: var(--sand);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}

.rail__brand { padding: 20px 20px 16px; }
.rail__brand b { display: block; font-size: 19px; font-weight: 650; letter-spacing: -0.02em; color: var(--wine); }
.rail__brand span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.rail__site { padding: 0 14px 14px; }
.rail__site select {
  width: 100%; height: 34px; padding: 0 9px; font: inherit; font-size: 13.5px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink);
}

.rail__nav { padding: 4px 10px 14px; display: flex; flex-direction: column; gap: 1px; }
.rail__group {
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint); padding: 15px 10px 6px;
}
.rail__nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r);
  font-size: 14px; color: var(--ink-2); text-decoration: none;
}
.rail__nav a:hover { background: var(--panel); text-decoration: none; color: var(--ink); }
.rail__nav a[aria-current="page"] { background: var(--wine); color: #fff; font-weight: 550; }
.rail__nav a[aria-current="page"] .pill { background: rgba(255,255,255,.24); color: #fff; }
.rail__nav .pill {
  margin-left: auto; font-size: 11.5px; background: var(--sand-deep); color: var(--ink-2);
  border-radius: 10px; padding: 1px 7px; font-variant-numeric: tabular-nums;
}
.rail__nav .pill--alert { background: var(--red-soft); color: var(--red); }
.rail__nav a[aria-current="page"] .pill--alert { background: rgba(255,255,255,.26); color: #fff; }

.rail__foot { margin-top: auto; padding: 14px; border-top: 1px solid var(--line); }
.rail__who { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; cursor: pointer; padding: 6px; border-radius: var(--r); text-align: left; }
.rail__who:hover { background: var(--panel); }
.rail__who strong { display: block; font-size: 13px; font-weight: 600; }
.rail__who small { font-size: 11.5px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }

/* --- Demo banner ---------------------------------------------------------- */

.demobar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 7px 26px; background: var(--sand-deep);
  font-size: 11.5px; color: var(--ink-2); border-bottom: 1px solid var(--line);
}
.demobar strong { font-weight: 650; }
.demobar .spacer { flex: 1; }
.demobar button, .demobar a {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  padding: 2px 9px; font-size: 11.5px; color: var(--ink-2); cursor: pointer; text-decoration: none;
}
.demobar button:hover, .demobar a:hover { border-color: var(--wine-line); text-decoration: none; }

/* --- Page ----------------------------------------------------------------- */

.page { padding: 26px; max-width: 1440px; width: 100%; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; flex-wrap: wrap; margin-bottom: 20px; }
.page__title { font-size: 27px; font-weight: 640; letter-spacing: -0.03em; margin: 0; line-height: 1.14; }
.page__sub { color: var(--muted); font-size: 14px; margin: 5px 0 0; }
.page__actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* --- Controls ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--sand-deep); background: #fffdfc; color: var(--ink); }
.btn--primary { background: var(--wine); border-color: var(--wine); color: #fff; font-weight: 550; }
.btn--primary:hover { background: var(--wine-deep); border-color: var(--wine-deep); color: #fff; }
.btn--sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn--quiet { background: none; border-color: transparent; }
.btn--quiet:hover { background: var(--sand); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--wine-soft); border-color: var(--wine-line); color: var(--wine-deep); font-weight: 550; }

.field {
  height: 36px; padding: 0 10px; font: inherit; font-size: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink);
}
textarea.field { height: auto; padding: 9px 10px; resize: vertical; }
.field:focus { border-color: var(--wine); outline: none; }
label.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }

/* --- Panels --------------------------------------------------------------- */

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  min-width: 0;
}
.panel__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
}
.panel__head h2 { margin: 0; font-size: 15px; font-weight: 640; letter-spacing: -0.01em; }
.panel__head .note { font-size: 12.5px; color: var(--muted); }
.panel__body { padding: 14px 16px; }
.panel__body--flush { padding: 0; }

/* --- Today: the front desk day view --------------------------------------- */

.today { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 22px; align-items: start; }

.daystrip {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding: 0 0 18px; border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.daystrip h1 { font-size: 27px; font-weight: 640; letter-spacing: -0.03em; margin: 0; }
.daystrip .clock { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.daystrip .counts { margin-left: auto; display: flex; gap: 24px; }
.daystrip .counts div { text-align: right; }
.daystrip .counts b { display: block; font-size: 21px; font-weight: 640; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.daystrip .counts span { font-size: 12px; color: var(--muted); }

/* An hour-by-hour spine, not a chart. */
.timeline-day { position: relative; }
.hour {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px;
  border-top: 1px solid var(--line-soft); padding: 9px 0 11px;
}
.hour--now { border-top: 2px solid var(--wine); }
.hour__label { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 2px; }
.hour--now .hour__label { color: var(--wine); font-weight: 650; }
.hour__items { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.event {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 11px; border-radius: var(--r); background: var(--sand);
  border-left: 3px solid var(--sand-deep); font-size: 13.5px;
}
.event--class { background: var(--wine-soft); border-left-color: var(--wine); }
.event--refused { background: var(--red-soft); border-left-color: var(--red); }
.event__who { font-weight: 600; }
.event__meta { color: var(--muted); font-size: 12.5px; }
.event .right { margin-left: auto; text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.event a { color: inherit; }

.hour__empty { font-size: 12.5px; color: var(--faint); padding: 2px 0; }

/* Desk queues on the right of the day view. */
.queue { list-style: none; margin: 0; padding: 0; }
.queue li { display: flex; gap: 11px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); }
.queue li:last-child { border-bottom: 0; }
.queue .grow { flex: 1; min-width: 0; }
.queue .nm { font-size: 14px; font-weight: 600; display: block; }
.queue .nm a { color: inherit; }
.queue .sub { font-size: 12.5px; color: var(--muted); }
.queue .amt { font-variant-numeric: tabular-nums; font-size: 13.5px; white-space: nowrap; }

/* --- Member identity ------------------------------------------------------ */

.face {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: 50%; background: var(--sand-deep); color: var(--ink-2);
  width: 34px; height: 34px; font-size: 12.5px; font-weight: 650;
}
.face--sm { width: 26px; height: 26px; font-size: 10.5px; }
.face--xl { width: 78px; height: 78px; font-size: 27px; font-weight: 600; }

/* The status ribbon: three independent signals, never collapsed into one badge. */
.ribbon { display: flex; flex-wrap: wrap; gap: 1px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.ribbon__seg { flex: 1 1 150px; padding: 10px 14px; background: var(--panel); min-width: 0; }
.ribbon__seg dt { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 0 0 3px; }
.ribbon__seg dd { margin: 0; font-size: 15px; font-weight: 620; letter-spacing: -0.01em; display: flex; align-items: center; gap: 7px; }
.ribbon__seg dd small { font-weight: 400; font-size: 12.5px; color: var(--muted); letter-spacing: 0; }
.ribbon__seg--good { background: var(--olive-soft); } .ribbon__seg--good dd { color: #3c5638; }
.ribbon__seg--warn { background: var(--amber-soft); } .ribbon__seg--warn dd { color: #85530c; }
.ribbon__seg--bad  { background: var(--red-soft); }   .ribbon__seg--bad dd  { color: var(--red); }

.dotmark { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }

/* --- Attendance heat strip ------------------------------------------------ */

.heat { display: flex; flex-direction: column; gap: 7px; }
.heat__row { display: flex; gap: 3px; }
.heat__cell { width: 100%; height: 26px; border-radius: 2px; background: var(--sand); flex: 1 1 0; }
.heat__cell[data-level="1"] { background: #e2d0d2; }
.heat__cell[data-level="2"] { background: #cba7ab; }
.heat__cell[data-level="3"] { background: #a86571; }
.heat__cell[data-level="4"] { background: var(--wine); }
.heat__scale { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.heat__scale i { width: 13px; height: 13px; border-radius: 2px; display: inline-block; }
.heat__axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); }

/* --- Ledger --------------------------------------------------------------- */

.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li {
  display: grid; grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline;
}
.ledger li:last-child { border-bottom: 0; }
.ledger .when { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ledger .what { font-size: 14px; }
.ledger .what small { display: block; font-size: 12.5px; color: var(--muted); }
.ledger .amt { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 550; text-align: right; white-space: nowrap; }
.ledger li.failed .amt { color: var(--red); }
.ledger li.failed .what small { color: var(--red); }

/* --- Tables --------------------------------------------------------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
table.roster { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.roster th {
  text-align: left; font-size: 12px; font-weight: 650; color: var(--muted);
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--panel);
  position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
table.roster th button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
table.roster td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.roster tbody tr:last-child td { border-bottom: 0; }
table.roster tbody tr:hover { background: #fffcfb; }
table.roster .right { text-align: right; font-variant-numeric: tabular-nums; }
table.roster .who { display: flex; align-items: center; gap: 10px; }
table.roster .who strong { font-weight: 600; }
table.roster .who a { color: inherit; }
table.roster .sub { display: block; font-size: 12.5px; color: var(--muted); }

.state { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.state--good::before { background: var(--olive); }
.state--warn::before { background: var(--amber); }
.state--bad::before { background: var(--red); }

.tag { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 12px; background: var(--sand); color: var(--ink-2); }
.tag--plan { background: var(--wine-soft); color: var(--wine-deep); }

/* --- Member record -------------------------------------------------------- */

.member__head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.member__head h1 { font-size: 31px; font-weight: 640; letter-spacing: -0.035em; margin: 0 0 4px; line-height: 1.1; }
.member__meta { display: flex; flex-wrap: wrap; gap: 5px 16px; font-size: 13.5px; color: var(--muted); }
.member__meta b { color: var(--ink-2); font-weight: 550; }
.member__actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); margin: 22px 0 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 9px 13px; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--wine); border-bottom-color: var(--wine); font-weight: 620; }

.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 20px; align-items: start; }

.facts { display: grid; gap: 11px; }
.facts .row { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; font-size: 14px; align-items: baseline; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.notes li:last-child { border-bottom: 0; }
.notes .body { font-size: 14px; }
.notes .by { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* --- Plans ---------------------------------------------------------------- */

.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.plan { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.plan__bar { height: 5px; }
.plan__body { padding: 16px 18px 18px; }
.plan h3 { margin: 0 0 3px; font-size: 17px; font-weight: 640; letter-spacing: -0.02em; }
.plan .price { font-size: 25px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan .price span { font-size: 13.5px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.plan ul { margin: 13px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.plan li { font-size: 13.5px; color: var(--ink-2); padding-left: 17px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--sand-deep); }
.plan__foot { border-top: 1px solid var(--line-soft); padding: 11px 18px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }

/* --- Schedule ------------------------------------------------------------- */

.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; min-width: 86px; padding: 9px 12px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel); cursor: pointer; text-align: left;
}
.day[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: #fff; }
.day b { display: block; font-size: 15px; font-weight: 620; }
.day span { font-size: 11.5px; color: var(--muted); }
.day[aria-pressed="true"] span { color: rgba(255,255,255,.8); }

.classlist { list-style: none; margin: 0; padding: 0; }
.classitem {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) 150px auto;
  gap: 16px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
}
.classitem:last-child { border-bottom: 0; }
.classitem .time { font-size: 15px; font-weight: 620; font-variant-numeric: tabular-nums; }
.classitem .time small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.classitem .nm { font-size: 15px; font-weight: 600; }
.classitem .sub { font-size: 12.5px; color: var(--muted); }
.capacity { display: flex; flex-direction: column; gap: 5px; }
.capacity__bar { height: 7px; border-radius: 4px; background: var(--sand); overflow: hidden; }
.capacity__bar i { display: block; height: 100%; background: var(--olive); }
.capacity__bar i.full { background: var(--wine); }
.capacity__txt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* --- Empty states --------------------------------------------------------- */

.empty {
  padding: 44px 24px; text-align: center; color: var(--muted);
  background: var(--panel); border: 1px dashed var(--sand-deep); border-radius: var(--r);
}
.empty strong { display: block; color: var(--ink); font-size: 15.5px; font-weight: 620; margin-bottom: 6px; }
.empty p { margin: 0 auto; max-width: 46ch; font-size: 13.5px; }

/* --- Reports -------------------------------------------------------------- */

/* min() so the 340px floor never exceeds the viewport on a small phone. */
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; }
.figure h3 { margin: 0 0 2px; font-size: 15px; font-weight: 620; }
.figure p.q { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.figure svg { display: block; width: 100%; height: auto; overflow: visible; }
.figure .ax { font-size: 11px; fill: var(--faint); }
.figure .gl { stroke: var(--line-soft); }
.figure .b1 { fill: var(--wine); }
.figure .b2 { fill: #cba7ab; }

/* --- Overlay -------------------------------------------------------------- */

.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(36,29,28,.4); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 20px 20px; overflow-y: auto; }
.overlay[hidden] { display: none; }
.modal { background: var(--panel); border-radius: 8px; width: 100%; max-width: 520px; box-shadow: 0 20px 56px rgba(36,29,28,.26); }
.modal__head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.modal__head h2 { margin: 0; font-size: 18px; font-weight: 640; letter-spacing: -0.02em; }
.modal__head p { margin: 5px 0 0; font-size: 13.5px; color: var(--muted); }
.modal__body { padding: 18px 22px; display: grid; gap: 14px; }
.modal__foot { padding: 14px 22px 18px; display: flex; gap: 9px; justify-content: flex-end; border-top: 1px solid var(--line-soft); }
.modal .field { width: 100%; }

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; font-size: 13.5px; padding: 10px 16px; border-radius: 6px; box-shadow: 0 8px 24px rgba(36,29,28,.3); display: flex; gap: 14px; align-items: center; }
.toast button { background: none; border: 0; color: #e6a8ae; cursor: pointer; font-size: 13px; }

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1180px) {
  .today { grid-template-columns: minmax(0, 1fr); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  /* The rail becomes a horizontal scroller across the top: a real phone front-desk view. */
  .frame { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: sticky; top: 0; height: auto; z-index: 40;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .rail__brand { padding: 13px 16px 9px; }
  .rail__brand b { font-size: 17px; }
  .rail__site { padding: 0 16px 10px; }
  .rail__nav { flex-direction: row; overflow-x: auto; padding: 0 10px 10px; gap: 4px; scrollbar-width: none; }
  .rail__nav::-webkit-scrollbar { display: none; }
  .rail__group { display: none; }
  .rail__nav a { white-space: nowrap; }
  .rail__foot { display: none; }
  .page { padding: 18px 16px 60px; }
  .page__title, .daystrip h1 { font-size: 23px; }
  .member__head h1 { font-size: 26px; }
  /* The right-hand time column is nowrap, so on a 320px phone it had nowhere
     to go and pushed the page sideways. Let the row wrap instead. */
  .event { flex-wrap: wrap; }
  .event__meta { min-width: 0; }
  .daystrip .counts { margin-left: 0; width: 100%; gap: 20px; }
  .daystrip .counts div { text-align: left; }
  .classitem { grid-template-columns: 68px minmax(0, 1fr); }
  .classitem .capacity, .classitem > :last-child { grid-column: 2; }
  .ledger li { grid-template-columns: 78px minmax(0, 1fr); }
  .ledger .amt { grid-column: 2; text-align: left; }
  .demobar { padding: 7px 16px; }
}

@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
@media print { .rail, .demobar, .member__actions, .toasts { display: none !important; } .frame { display: block; } body { background: #fff; } }
