/* ClubWallet. One family (Archivo, variable width): condensed bold for times, counts and credits — the printed
   class timetable — and normal width for everything you read. The pass is a dark punch card; it's the one loud thing. */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..800&display=swap");

:root {
  --ink: #172033; --ink-2: #4A5468; --ink-3: #7A8396;
  --floor: #F3F5F9; --paper: #FFFFFF; --ridge: #DCE1EA; --ridge-2: #EBEEF3;
  --pass: #232057; --pass-2: #2F2B72; --punch: #4B3FD1; --punch-soft: #ECEAFD;
  --check: #12A150; --check-soft: #E3F5EA; --low: #B7791F; --low-soft: #FCF1DE; --late: #C2364F; --late-soft: #FBE6EA;
  --f: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --narrow: "wdth" 72; --wide: "wdth" 100;
  --r: 10px; --r-s: 6px;
  --focus: 0 0 0 3px rgba(75, 63, 209, .35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f); font-variation-settings: var(--wide); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--floor); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--punch); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-s); }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 700; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .6em; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.small { font-size: .85rem; }
.num { font-variation-settings: var(--narrow); font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r-s);
  border: 1px solid var(--ridge); background: var(--paper); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: #C5CCD8; }
.btn.primary { background: var(--punch); border-color: var(--punch); color: #fff; }
.btn.primary:hover { background: #3F34B8; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: var(--ridge-2); }
.btn.danger { color: var(--late); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: default; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--ink-3); }
.input, select.input, textarea.input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--ridge); border-radius: var(--r-s); background: var(--paper); }
textarea.input { min-height: 72px; resize: vertical; }
.input:focus { outline: none; border-color: var(--punch); box-shadow: var(--focus); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.seg { display: inline-flex; border: 1px solid var(--ridge); border-radius: var(--r-s); overflow: hidden; background: var(--paper); }
.seg button { border: 0; background: none; padding: 7px 12px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.check { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--punch); width: 16px; height: 16px; }

/* Status words: colour plus a word, never colour alone. */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: var(--ridge-2); color: var(--ink-2); white-space: nowrap; }
.tag.in { background: var(--check-soft); color: #0B7A3B; }
.tag.low { background: var(--low-soft); color: #8A5A12; }
.tag.late { background: var(--late-soft); color: #9F2840; }
.tag.new { background: var(--punch-soft); color: #3A30A8; }

/* ---------- The pass: a punch card ---------- */
.pass { position: relative; background: var(--pass); color: #fff; border-radius: 14px; padding: 16px 18px 18px; overflow: hidden; isolation: isolate; }
.pass::after { /* the die-cut notch on the edge of a paper class card */
  content: ""; position: absolute; right: -11px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--floor); }
.pass.on-paper::after { background: var(--paper); }
.pass .pass-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pass .pass-name { font-weight: 650; font-size: .95rem; opacity: .92; }
.pass .pass-studio { font-size: .78rem; opacity: .65; }
.pass .pass-count { font-variation-settings: "wdth" 62; font-weight: 800; font-size: 3.1rem; line-height: .95; letter-spacing: -.02em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.pass .pass-count small { font-size: .9rem; font-variation-settings: var(--wide); font-weight: 600; opacity: .75; letter-spacing: 0; margin-left: 6px; }
.pass .pass-foot { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; opacity: .8; margin-top: 10px; }
.holes { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; max-width: 100%; }
.hole { width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.hole.full { background: #fff; box-shadow: none; }
.hole.just { animation: punch .5s ease-out; }
@keyframes punch { 0% { transform: scale(1.5); background: #fff; } 100% { transform: scale(1); } }
.pass .unl { margin-top: 12px; height: 15px; border-radius: 8px; background: repeating-linear-gradient(90deg, #fff 0 15px, transparent 15px 22px); opacity: .9; }
.pass.frozen { background: #3A4256; }
.pass.dim { background: #5B6272; }
/* small inline version for lists */
.mini-holes { display: inline-flex; gap: 3px; vertical-align: middle; }
.mini-holes i { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.2px var(--pass); }
.mini-holes i.full { background: var(--pass); box-shadow: none; }

/* ---------- Toasts and sheets ---------- */
.toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; width: min(560px, calc(100vw - 24px)); }
.toast { background: var(--ink); color: #fff; padding: 11px 14px; border-radius: var(--r); font-size: .92rem; box-shadow: 0 8px 24px rgba(23, 32, 51, .25); animation: rise .2s ease-out; }
.toast.err { background: var(--late); }
.toast.sms { background: var(--paper); color: var(--ink); border: 1px solid var(--ridge); }
.toast.sms b { display: block; font-size: .78rem; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.scrim { position: fixed; inset: 0; background: rgba(23, 32, 51, .42); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--paper); width: min(560px, 100vw); max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 20px 20px 24px; animation: up .2s ease-out; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 16px; } }
@keyframes up { from { transform: translateY(24px); opacity: .4; } }
.sheet h2 { margin-bottom: 4px; }
.sheet .sheet-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.empty { padding: 28px 16px; text-align: center; color: var(--ink-2); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }
.demo-bar { background: var(--pass); color: #fff; font-size: .85rem; padding: 7px 16px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.demo-bar a { color: #fff; font-weight: 650; }
