/* ============================================================
   USC App — iOS "Liquid Glass" design system
   Mobile-first; used mainly as an iPhone home-screen web app.

   Rules (same as BuddySmash):
   - Glass (blur + saturation) only on the navigation layer: top bar,
     floating capsule tab bar, toasts. Content sits on solid white
     inset-grouped cards — blur on long scrolling lists is costly on iPhone.
   - 44px tap targets, pill buttons, iOS filled text fields.
   - Form controls stay at 16px on phones so iOS Safari doesn't zoom in.
   ============================================================ */

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  /* Brand — sky blue × navy (full scale: tints, rings, gradients) */
  --brand-50:  #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-200: #bae6fd;
  --brand-300: #7dd3fc;
  --brand-400: #38bdf8;
  --brand-500: #0ea5e9;
  --brand-600: #0284c7;
  --brand-700: #0369a1;
  --brand-800: #075985;
  --brand-900: #0c4a6e;
  --navy:      #1b3a6b;

  /* iOS grouped-background grey, used for the page and inset fills */
  --canvas: #f2f2f7;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --separator: rgba(60, 60, 67, 0.12);
  --fill: rgba(17, 24, 39, 0.05);       /* iOS tertiary fill */
  --fill-strong: rgba(17, 24, 39, 0.08);

  --green-600: #16a34a; --green-700: #15803d;
  --amber-500: #f59e0b; --amber-700: #b45309;
  --red-500:   #ef4444; --red-600:   #dc2626;

  --radius-card: 22px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px -14px rgba(15, 23, 42, 0.14);
  --shadow-lift: 0 2px 4px rgba(15, 23, 42, 0.06), 0 18px 40px -16px rgba(15, 23, 42, 0.22);

  --ease: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --topbar-h: 52px;
  /* Space the floating tab bar takes at the bottom of the screen */
  --tabbar-clear: calc(5.5rem + max(env(safe-area-inset-bottom, 0px), 0.75rem));
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--gray-900);
  min-height: 100dvh;
  padding-bottom: var(--tabbar-clear);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Soft colour behind everything, so the glass bars have something to refract.
   The body stays transparent: a body background would paint over this layer. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 45% at 0% 0%, rgba(14, 165, 233, 0.18), transparent 70%),
    radial-gradient(55% 40% at 100% 8%, rgba(99, 102, 241, 0.13), transparent 70%),
    radial-gradient(70% 45% at 60% 100%, rgba(45, 212, 191, 0.10), transparent 70%);
}

* { -webkit-tap-highlight-color: transparent; }
button, a, [role="button"], input, select, textarea, label { touch-action: manipulation; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
strong, b { font-weight: 700; }

/* ── Navigation layer: glass ───────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 30px -12px rgba(15, 23, 42, 0.22);
}

/* Glass for use on top of colour (inside the hero card) */
.glass-tint {
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  border: 0.5px solid rgba(255, 255, 255, 0.35);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, 0.95); }
  .glass-tint { background: rgba(255, 255, 255, 0.25); }
}

/* Top bar */
.usc-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  border-width: 0 0 0.5px 0;
  border-radius: 0;
}
.usc-topbar__inner {
  max-width: 64rem;
  height: var(--topbar-h);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.usc-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-900);
  transition: opacity var(--ease);
}
.usc-brand:hover { opacity: 0.8; color: var(--gray-900); }
.usc-brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  background: linear-gradient(135deg, var(--brand-400), var(--navy));
  box-shadow: 0 4px 10px -4px rgba(2, 132, 199, 0.8);
}
.usc-brand__name { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }

.usc-desknav { display: none; list-style: none; align-items: center; gap: 4px; }
.usc-desknav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: background var(--ease), color var(--ease);
}
.usc-desknav__link i { font-size: 13px; }
.usc-desknav__link:hover { background: rgba(17, 24, 39, 0.05); color: var(--gray-900); }
.usc-desknav__link.is-active { background: rgba(14, 165, 233, 0.13); color: var(--brand-700); }

.usc-topbar__actions { display: flex; align-items: center; gap: 8px; }
.usc-topbar__user {
  display: none;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
}
.usc-iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.05);
  color: var(--gray-600);
  font-size: 16px;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), transform var(--ease);
}
.usc-iconbtn:hover { background: rgba(17, 24, 39, 0.09); color: var(--gray-900); }
.usc-iconbtn:active { transform: scale(0.95); }
.usc-iconbtn--logout:hover { background: #fef2f2; color: var(--red-600); }
.usc-iconbtn--desk { display: none; }

/* Floating capsule tab bar (phones) */
.usc-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(env(safe-area-inset-bottom, 0px), 0.75rem);
  z-index: 50;
  padding: 0 12px;
}
.usc-tabbar__inner {
  max-width: 28rem;
  height: 64px;
  margin: 0 auto;
  padding: 6px;
  border-radius: 999px;
  display: flex;
  align-items: stretch;
  gap: 2px;
}
.usc-tab {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 999px;
  color: var(--gray-500);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  transition: background 200ms, color 200ms, transform 150ms;
}
.usc-tab:hover { color: var(--gray-700); }
.usc-tab:active { transform: scale(0.95); }
.usc-tab i { font-size: 19px; transition: transform 200ms; }
.usc-tab span { white-space: nowrap; }
.usc-tab.is-active { background: rgba(14, 165, 233, 0.13); color: var(--brand-700); }
.usc-tab.is-active i { transform: scale(1.05); }

/* Six tabs on a 320–359px phone: tighter bar and labels so they don't touch */
@media (max-width: 359px) {
  .usc-tabbar { padding: 0 8px; }
  .usc-tabbar__inner { padding: 5px; gap: 0; }
  .usc-tab { font-size: 9px; letter-spacing: -0.01em; }
  .usc-tab i { font-size: 18px; }
}

/* Unread badge on the Alerts tab */
.usc-notif-wrap { position: relative; display: inline-flex; }
.usc-notif-badge {
  position: absolute;
  top: -6px;
  left: 12px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red-500);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}
.usc-notif-badge[hidden] { display: none; }

@media (min-width: 769px) {
  body { padding-bottom: 40px; }
  .usc-desknav { display: flex; }
  .usc-tabbar { display: none; }
  .usc-topbar__user, .usc-iconbtn--desk { display: inline-flex; }
}
/* Narrow desktops / tablets: text-only links and no username, so the bar fits */
@media (min-width: 769px) and (max-width: 1023px) {
  .usc-desknav__link { padding: 6px 10px; }
  .usc-desknav__link i { display: none; }
  .usc-topbar__user { display: none; }
}

/* ── Page layout ───────────────────────────────────────────── */
.body { min-height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top, 0px)); }

.usc-page,
.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 8px;
}
.usc-page--wide { max-width: 1000px; }
.usc-stack > * + * { margin-top: 24px; }
.usc-stack-sm > * + * { margin-top: 12px; }

/* Page header: eyebrow + iOS Large Title, optional trailing action */
.usc-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  animation: fadeUp 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.usc-header > div { min-width: 0; }
.usc-page-lead { margin: -6px 4px 20px; font-size: 15px; line-height: 1.5; color: var(--gray-500); }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}
.large-title {
  font-size: 34px;
  line-height: 41px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--gray-900);
  overflow-wrap: anywhere;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}
.section-label__action {
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--brand-600);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px 0;
}
.section-footnote { margin-top: 8px; padding: 0 4px; font-size: 13px; color: var(--gray-500); line-height: 1.5; }

.usc-muted { color: var(--gray-500); }
.usc-note { margin-top: 12px; font-size: 13px; color: var(--gray-500); line-height: 1.5; }

/* ── Content surfaces: solid, like iOS inset-grouped lists ─── */
.usc-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 16px;
}
.usc-card + .usc-card { margin-top: 12px; }
.usc-card--flush { padding: 0; overflow: hidden; }

.pressable { transition: transform var(--ease); }
.pressable:active { transform: scale(0.98); }

/* Inset-grouped rows inside a card */
.usc-list { list-style: none; }
.usc-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 11px 16px;
  color: var(--gray-900);
}
.usc-row + .usc-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 16px;
  height: 0.5px;
  background: var(--separator);
}
.usc-row--icon + .usc-row::before,
.usc-row--icon + .usc-row--icon::before { left: 57px; }
a.usc-row { transition: background var(--ease); }
a.usc-row:hover { background: rgba(17, 24, 39, 0.025); color: var(--gray-900); }
a.usc-row:active { background: rgba(17, 24, 39, 0.05); }
.usc-row__icon {
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  background: var(--brand-500);
}
.usc-row__icon--green  { background: #22c55e; }
.usc-row__icon--indigo { background: #6366f1; }
.usc-row__icon--amber  { background: var(--amber-500); }
.usc-row__icon--gray   { background: #8e8e93; }
.usc-row__icon--red    { background: var(--red-500); }
.usc-row__icon--navy   { background: var(--navy); }
.usc-row__body { flex: 1 1 auto; min-width: 0; }
.usc-row__title { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.usc-row__sub { margin-top: 1px; font-size: 13px; color: var(--gray-500); overflow-wrap: anywhere; }
.usc-row__value { flex: 0 1 auto; font-size: 16px; color: var(--gray-500); text-align: right; overflow-wrap: anywhere; }
.usc-row__chev { flex: 0 0 auto; color: var(--gray-300); font-size: 13px; }
.usc-row--danger { color: var(--red-600); justify-content: center; font-weight: 500; font-size: 16px; }
a.usc-row--danger:hover { color: var(--red-600); }

/* ── Buttons — 44px tall by default, pill shaped ───────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  background: rgba(17, 24, 39, 0.06);
  color: var(--gray-700);
  transition: background var(--ease), color var(--ease), box-shadow var(--ease),
              transform var(--ease), opacity var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible,
.usc-cardbtn:focus-visible,
.usc-iconbtn:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.btn:disabled, .btn[disabled] { opacity: 0.5; pointer-events: none; }

.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(2, 132, 199, 0.7);
}
.btn-primary:hover { background: var(--brand-700); color: #fff; }

.btn-tinted { background: rgba(14, 165, 233, 0.12); color: var(--brand-700); }
.btn-tinted:hover { background: rgba(14, 165, 233, 0.2); color: var(--brand-700); }

.btn-secondary, .btn-gray { background: rgba(17, 24, 39, 0.06); color: var(--gray-700); }
.btn-secondary:hover, .btn-gray:hover { background: rgba(17, 24, 39, 0.1); color: var(--gray-900); }

.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--red-600); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.17); color: var(--red-600); }

/* Size modifiers — declared after the variants */
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-icon-only { width: 36px; padding: 0; }
.btn-action { /* legacy hook kept for JS/templates */ }

/* Compact capsule actions on cards (Schedule / Autobook / Book / Remove …) */
.usc-cardbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  background: rgba(17, 24, 39, 0.06);
  color: var(--gray-700);
  transition: background var(--ease), color var(--ease), transform var(--ease);
}
.usc-cardbtn i { font-size: 12px; }
.usc-cardbtn:hover { background: rgba(17, 24, 39, 0.1); color: var(--gray-900); }
.usc-cardbtn:active { transform: scale(0.96); }
.usc-cardbtn[disabled] { opacity: 0.6; cursor: default; }
.usc-cardbtn--primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 6px 14px -7px rgba(2, 132, 199, 0.7);
}
.usc-cardbtn--primary:hover { background: var(--brand-700); color: #fff; }
.usc-cardbtn--tinted { background: rgba(14, 165, 233, 0.12); color: var(--brand-700); }
.usc-cardbtn--tinted:hover { background: rgba(14, 165, 233, 0.2); color: var(--brand-700); }
.usc-cardbtn--danger { background: rgba(239, 68, 68, 0.1); color: var(--red-600); }
.usc-cardbtn--danger:hover { background: rgba(239, 68, 68, 0.17); color: var(--red-600); }
.usc-cardbtn--icon { width: 36px; padding: 0; }
.usc-cardbtn.is-done,
.usc-cardbtn.is-done:hover { background: rgba(34, 197, 94, 0.13); color: var(--green-700); box-shadow: none; }
a.usc-cardbtn { text-decoration: none; }

/* ── Forms ──────────────────────────────────────────────────── */
/* iOS-style filled text field */
.field,
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="search"],
textarea,
select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--fill);
  color: var(--gray-900);
  font-size: 16px;
  line-height: 1.3;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: background var(--ease), box-shadow var(--ease);
}
textarea { resize: vertical; min-height: 96px; }
.field:focus,
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.4);
}
::placeholder { color: var(--gray-400); opacity: 1; }

select:not([multiple]),
.select-capsule {
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

/* Native <select> dressed as a capsule; iOS still opens its own wheel picker */
.select-capsule {
  display: inline-block;
  width: auto;
  min-height: 0;
  height: 36px;
  padding: 0 36px 0 16px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.05);
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-700);
  background-position: right 10px center;
}
.select-capsule:focus { background-color: #fff; box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.4); }

.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  margin: 0 0 6px 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
}
.usc-inline-form { display: flex; gap: 8px; align-items: center; }
.usc-inline-form > :first-child { flex: 1 1 auto; min-width: 0; }

/* iOS Safari zooms into any field under 16px — and doesn't zoom back out */
@media (max-width: 639px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea { font-size: 16px !important; }
}

/* ── Pills & banners ────────────────────────────────────────── */
.usc-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  background: rgba(17, 24, 39, 0.06);
  color: var(--gray-600);
}
.usc-pill--on, .usc-pill--green { background: rgba(34, 197, 94, 0.13); color: var(--green-700); }
.usc-pill--off, .usc-pill--gray { background: rgba(17, 24, 39, 0.06); color: var(--gray-600); }
.usc-pill--brand { background: rgba(14, 165, 233, 0.12); color: var(--brand-700); }
.usc-pill--amber { background: rgba(251, 191, 36, 0.2); color: var(--amber-700); }
.usc-pill--red   { background: rgba(239, 68, 68, 0.1); color: var(--red-600); }
.usc-pill__dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

.alert, .usc-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 16px;
  text-align: left;
}
.alert i { margin-top: 2px; }
.alert-danger  { background: rgba(239, 68, 68, 0.1);  color: #b91c1c; }
.alert-info    { background: rgba(14, 165, 233, 0.1); color: var(--brand-800); }
.alert-warning { background: rgba(251, 191, 36, 0.18); color: #92400e; }
.alert-success, .usc-banner--ok { background: rgba(34, 197, 94, 0.12); color: var(--green-700); }
.usc-banner { margin: 0 0 12px; }

/* ── Toast (glass, top of screen) ───────────────────────────── */
.usc-toast {
  position: fixed;
  top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  z-index: 9999;
  width: max-content;
  max-width: min(380px, calc(100vw - 32px));
  padding: 11px 18px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--gray-900);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 34px -12px rgba(15, 23, 42, 0.3);
  opacity: 0;
  transform: translateX(-50%) translateY(-12px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  overflow-wrap: anywhere;
}
.usc-toast::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--brand-500);
  vertical-align: 1px;
}
.usc-toast.usc-toast--error { color: #b91c1c; }
.usc-toast.usc-toast--error::before { background: var(--red-500); }
.usc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

/* ── Empty / logged-out states ──────────────────────────────── */
.usc-empty,
.no-courses,
#login_prompt {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 44px 24px;
  text-align: center;
  color: var(--gray-500);
}
.usc-empty__emoji { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.usc-empty > i { font-size: 34px; color: var(--gray-300); margin-bottom: 12px; display: block; }
.usc-empty p, .no-courses p { margin: 4px 0; }
.usc-empty p:first-of-type,
.no-courses p:first-of-type { font-size: 17px; font-weight: 600; color: var(--gray-700); }
.usc-empty .btn, .usc-empty .usc-cardbtn { margin-top: 16px; }
#login_prompt { margin: 24px 16px; font-size: 16px; }

/* Shown by schedule.js when the last course is removed */
.no-courses-message {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 44px 24px;
  text-align: center;
}
.no-courses-message h4 { font-size: 17px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.no-courses-message p { color: var(--gray-500); }
.no-courses-message a { font-weight: 600; }

/* ── Auth & landing (glass card on the soft gradient) ───────── */
.usc-auth {
  min-height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top, 0px) - var(--tabbar-clear));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
}
.usc-auth__card {
  width: 100%;
  max-width: 400px;
  padding: 28px;
  border-radius: 32px;
  animation: fadeUp 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.usc-auth__head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 24px; }
.usc-appicon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  background: linear-gradient(135deg, var(--brand-400), var(--navy));
  box-shadow: 0 12px 28px -10px rgba(2, 132, 199, 0.8);
}
.usc-auth__title { font-size: 28px; font-weight: 800; letter-spacing: -0.025em; color: var(--gray-900); }
.usc-auth__lead { margin-top: 4px; font-size: 15px; color: var(--gray-500); line-height: 1.5; }
.usc-auth__foot { margin-top: 20px; text-align: center; font-size: 14px; color: var(--gray-500); }
.usc-auth__foot a { font-weight: 600; }
.usc-auth .btn-block { margin-top: 8px; }
.usc-auth__note {
  width: 100%;
  max-width: 400px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: #92400e;
  background: rgba(255, 251, 235, 0.85);
  box-shadow: 0 0 0 0.5px rgba(245, 158, 11, 0.35);
}
.usc-auth__note i { margin-top: 2px; }
.usc-auth__features { list-style: none; margin: 0 0 22px; display: grid; gap: 10px; }
.usc-auth__features li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--gray-700); }
.usc-auth__features .usc-row__icon { width: 30px; height: 30px; }

/* ── Day strip (Courses) ────────────────────────────────────── */
.usc-daystrip {
  position: relative; /* tiles' offsetLeft is measured from the strip when centring the active day */
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding: 0 16px; /* snap tiles to the 16px gutter, not the screen edge */
  margin: 0 -16px 20px;
  padding: 2px 16px 6px;
  scrollbar-width: none;
}
.usc-daystrip::-webkit-scrollbar { display: none; }
.usc-day {
  flex: 0 0 auto;
  width: 52px;
  height: 62px;
  border: 0;
  border-radius: 16px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: #fff;
  color: var(--gray-900);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--ease), background var(--ease);
}
.usc-day:active { transform: scale(0.95); }
.usc-day__dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--brand-600); line-height: 1; }
.usc-day__num { font-size: 21px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.usc-day.is-active { background: var(--brand-600); color: #fff; box-shadow: 0 10px 20px -10px rgba(2, 132, 199, 0.9); }
.usc-day.is-active .usc-day__dow { color: rgba(255, 255, 255, 0.85); }

/* ── Courses page ───────────────────────────────────────────── */
.usc-filter-row { padding-top: 8px; padding-bottom: 8px; }
.usc-filter-row__label { flex: 0 0 auto; font-size: 16px; font-weight: 500; }
.usc-filter-row__control { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }
.usc-filter-row__control select,
.usc-filter-row__control .select2-container { max-width: 230px; }
.usc-filter-row__control select {
  min-height: 36px;
  height: 36px;
  padding: 0 34px 0 14px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--gray-700);
  background-position: right 10px center;
  text-align: right;
  text-align-last: right;
}

/* Favourite venues */
.venues-favorites { display: block; }
.favorite-venue-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px 8px 16px;
}
.favorite-venue-item + .favorite-venue-item::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 57px;
  height: 0.5px;
  background: var(--separator);
}
.favorite-venue-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}
.remove-favorite-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  color: var(--red-600);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), transform var(--ease);
}
.remove-favorite-btn:hover { background: var(--red-500); color: #fff; }
.remove-favorite-btn:active { transform: scale(0.92); }
.venues-empty { padding: 16px; font-size: 15px; color: var(--gray-500); }

.venues-manage { margin-top: 12px; }
.venues-manage-card { display: grid; gap: 12px; }
.venues-manage-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.venues-manage-title { font-size: 17px; font-weight: 600; }
.venues-manage-bottom { display: grid; gap: 10px; }
.venues-manage-hint { font-size: 13px; color: var(--gray-500); text-align: center; }
#venue-selector { min-height: 100px; }

/* Course listing: one card per venue, one row per class */
.venues-courses > * + * { margin-top: 24px; }
.venue-section .section-label { text-transform: none; letter-spacing: -0.01em; font-size: 15px; color: var(--gray-700); }
.venue-section .section-label i { color: var(--brand-500); font-size: 13px; }
.venue-course-list { background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }

.course-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
}
.course-item + .course-item::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 80px;
  height: 0.5px;
  background: var(--separator);
}
.course-item__main { flex: 1 1 auto; min-width: 0; }
.course-item__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.course-item .course-title { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.course-item .course-sport { margin-top: 2px; font-size: 13px; color: var(--gray-500); }
.course-item .course-card-actions { margin-top: 10px; }

/* Calendar-style time tile (start big, end small) */
.usc-timetile {
  flex: 0 0 auto;
  width: 52px;
  min-height: 52px;
  padding: 7px 0;
  border-radius: 14px;
  background: var(--canvas);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.usc-timetile__start { font-size: 15px; font-weight: 700; line-height: 1.1; color: var(--gray-900); }
.usc-timetile__end { margin-top: 2px; font-size: 11px; font-weight: 500; line-height: 1; color: var(--gray-500); }

/* ── Next-class hero (Schedule) ─────────────────────────────── */
.usc-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 55%, var(--navy) 100%);
  box-shadow: var(--shadow-lift);
  animation: fadeUp 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.usc-hero__blob { position: absolute; border-radius: 999px; filter: blur(32px); pointer-events: none; }
.usc-hero__blob--a { right: -40px; top: -64px; width: 208px; height: 208px; background: rgba(255, 255, 255, 0.2); }
.usc-hero__blob--b { left: -40px; bottom: -80px; width: 192px; height: 192px; background: rgba(125, 211, 252, 0.3); }
.usc-hero__mark { position: absolute; right: 6px; bottom: -14px; font-size: 120px; opacity: 0.1; transform: rotate(-8deg); pointer-events: none; }
.usc-hero__body { position: relative; }
.usc-hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.usc-hero__label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.82); }
.usc-hero__when { margin-top: 4px; line-height: 1; font-variant-numeric: tabular-nums; }
.usc-hero__lead { margin-right: 6px; font-size: 22px; font-weight: 600; color: rgba(255, 255, 255, 0.8); }
.usc-hero__main { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; }
.usc-hero__title { margin-top: 12px; font-size: 20px; font-weight: 700; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.usc-hero__meta { margin-top: 2px; font-size: 15px; color: rgba(255, 255, 255, 0.85); }
.usc-hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* ── Schedule ───────────────────────────────────────────────── */
/* Day heading: "Today  23 Oct" (schedule, friends' schedules, friends feed) */
.usc-dayhead { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; padding: 0 4px; }
.usc-dayhead__name { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; color: var(--gray-900); }
.usc-dayhead__date { font-size: 13px; font-weight: 500; color: var(--gray-500); }
.courses-grid + .usc-dayhead { margin-top: 28px; }

/* The list container sits inside .usc-page; don't double the page padding */
.usc-page > .container { max-width: none; padding: 0; }

.courses-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .courses-grid { grid-template-columns: 1fr 1fr; } }

.course-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--ease), transform var(--ease);
}
.course-header { display: flex; gap: 12px; align-items: flex-start; }
.course-header__text { flex: 1 1 auto; min-width: 0; }
.course-card .course-title { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.course-location { margin-top: 2px; font-size: 13px; color: var(--gray-500); overflow-wrap: anywhere; }
.course-location i { margin-right: 3px; font-size: 11px; color: var(--gray-400); }
.course-body { margin-top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

/* Status pill — colour follows the card's status-* class (schedule.js swaps it) */
.course-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 11px 5px 9px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  background: rgba(17, 24, 39, 0.05);
  color: var(--gray-600);
}
.course-status__icon { font-size: 14px; line-height: 1; flex: 0 0 auto; }
.course-status__label { overflow-wrap: anywhere; }

.course-card.status-booked  { box-shadow: var(--shadow-card), 0 0 0 2px rgba(34, 197, 94, 0.45); }
.course-card.status-booked  .course-status { background: rgba(34, 197, 94, 0.13); color: var(--green-700); }
.course-card.status-waitlist .course-status,
.course-card.status-booking  .course-status { background: rgba(14, 165, 233, 0.12); color: var(--brand-700); }
.course-card.status-full     .course-status,
.course-card.status-limit    .course-status { background: rgba(251, 191, 36, 0.2); color: var(--amber-700); }
.course-card.status-not_open .course-status { background: rgba(17, 24, 39, 0.05); color: var(--gray-600); }
.course-card.status-auth_required .course-status,
.course-card.status-error    .course-status { background: rgba(239, 68, 68, 0.1); color: var(--red-600); }
.course-card.status-waitlist,
.course-card.status-booking  { box-shadow: var(--shadow-card), 0 0 0 1.5px rgba(14, 165, 233, 0.3); }

/* Gentle pulse while the worker is actively on it, so it reads as "live" */
.course-card.status-waitlist .course-status__icon,
.course-card.status-booking .course-status__icon,
.course-card.status-full .course-status__icon { animation: statusPulse 1.6s ease-in-out infinite; }

/* Friends' read-only schedule uses the DB status keys */
.course-card.status-planned .course-status { background: rgba(14, 165, 233, 0.12); color: var(--brand-700); }

.usc-autobook-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.1);
}
.usc-autobook-tag i { font-size: 11px; }

.course-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Status legend */
.usc-legend { margin-top: 28px; }
.usc-legend summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--brand-600);
}
.usc-legend summary::-webkit-details-marker { display: none; }
.usc-legend summary i { font-size: 12px; transition: transform var(--ease); }
.usc-legend[open] summary i { transform: rotate(90deg); }
.usc-legend .usc-card { margin-top: 10px; }

/* ── Autobook ───────────────────────────────────────────────── */
.usc-autobook-list > * + * { margin-top: 12px; }
.usc-autobook-card { display: block; }
.usc-autobook-card.is-paused .usc-autobook-main { opacity: 0.6; }
.usc-autobook-main { display: flex; gap: 12px; align-items: flex-start; transition: opacity var(--ease); }
.usc-autobook-info { flex: 1 1 auto; min-width: 0; }
.usc-autobook-title { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.usc-autobook-meta { margin-top: 2px; font-size: 13px; color: var(--gray-500); overflow-wrap: anywhere; }
.usc-autobook-meta i { margin-right: 3px; font-size: 11px; color: var(--gray-400); }
.usc-autobook-status {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--canvas);
  font-size: 13px;
  line-height: 1.45;
}
.usc-autobook-status .usc-ab-statustext { font-weight: 600; color: var(--gray-700); }
.usc-autobook-status .usc-ab-checked { color: var(--gray-500); }
.usc-autobook-stats { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-500); }
.usc-autobook-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Weekday tile (Autobook) — the DateTile from BuddySmash, with a time */
.usc-weektile {
  flex: 0 0 auto;
  width: 52px;
  height: 58px;
  border-radius: 16px;
  background: var(--canvas);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.usc-weektile__dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--brand-600); line-height: 1; }
.usc-weektile__time { font-size: 15px; font-weight: 700; line-height: 1; }

.usc-explainer { display: flex; gap: 12px; align-items: flex-start; }
.usc-explainer p { font-size: 14px; color: var(--gray-600); line-height: 1.5; }
.usc-explainer p + p { margin-top: 6px; }

/* ── Notifications ──────────────────────────────────────────── */
.usc-stat-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.usc-stat-hero__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: linear-gradient(135deg, #dcfce7, #e0f2fe);
}
.usc-stat-hero__num { font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.usc-stat-hero__label { margin-top: 3px; font-size: 13px; color: var(--gray-500); }

.usc-notif-item { align-items: flex-start; padding-top: 13px; padding-bottom: 13px; }
.usc-notif-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--canvas);
}
.usc-notif--success .usc-notif-icon { background: rgba(34, 197, 94, 0.14); }
.usc-notif--error .usc-notif-icon { background: rgba(239, 68, 68, 0.11); }
.usc-notif--broadcast .usc-notif-icon { background: rgba(14, 165, 233, 0.13); }
.usc-notif--share_request .usc-notif-icon,
.usc-notif--share_accepted .usc-notif-icon { background: rgba(99, 102, 241, 0.12); }
.usc-notif-body { flex: 1 1 auto; min-width: 0; }
.usc-notif-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.usc-notif-text { margin-top: 2px; font-size: 14px; color: var(--gray-600); overflow-wrap: anywhere; }
.usc-notif-text a { font-weight: 600; }
.usc-notif-time { margin-top: 4px; font-size: 12px; color: var(--gray-400); }
.usc-notif-list .usc-row + .usc-row::before { left: 62px; }

/* ── Friends feed ───────────────────────────────────────────── */
.usc-feed-list + .usc-dayhead { margin-top: 28px; }
.usc-feed-list .usc-row + .usc-row::before { left: 66px; }
.usc-feed-item { align-items: center; padding-top: 12px; padding-bottom: 12px; }
.usc-feed-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-400), #6366f1);
}
.usc-feed-main { flex: 1 1 auto; min-width: 0; }
.usc-feed-title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usc-feed-meta { margin-top: 1px; font-size: 13px; color: var(--gray-600); }
.usc-feed-friend { font-weight: 600; }
.usc-feed-venue { margin-top: 1px; font-size: 13px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usc-feed-venue i { margin-right: 3px; font-size: 11px; color: var(--gray-400); }
.usc-feed-chip { flex: 0 0 auto; }

/* ── Sharing ────────────────────────────────────────────────── */
.usc-share-row { flex-wrap: wrap; }
.usc-share-name { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; color: var(--gray-900); }
a.usc-share-name:hover { color: var(--gray-900); }
.usc-share-avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-400), #6366f1);
}
.usc-share-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.usc-share-list .usc-row + .usc-row::before { left: 60px; }
.usc-share-empty { padding: 14px 16px; font-size: 15px; color: var(--gray-500); }

/* ── Profile ────────────────────────────────────────────────── */
.usc-profile-head { display: flex; align-items: center; gap: 14px; }
.usc-avatar {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-400), var(--navy));
  box-shadow: 0 10px 22px -10px rgba(2, 132, 199, 0.8);
}
.usc-profile-head__name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.usc-profile-head__sub { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; }

.usc-plan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.usc-plan-row select { flex: 1 1 160px; min-width: 0; }

/* Subscription tiers */
.usc-tier-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 600px) { .usc-tier-grid { grid-template-columns: repeat(3, 1fr); } }
.usc-tier {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--canvas);
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow var(--ease), background var(--ease);
}
.usc-tier.is-selected { background: rgba(14, 165, 233, 0.07); box-shadow: inset 0 0 0 2px var(--brand-500); }
.usc-tier__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.usc-tier__name { font-size: 17px; font-weight: 700; }
.usc-tier__badge { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(17, 24, 39, 0.07); color: var(--gray-600); }
.usc-tier__badge--pro { background: rgba(14, 165, 233, 0.14); color: var(--brand-700); }
.usc-tier__pitch { margin-bottom: 6px; font-size: 13px; color: var(--gray-600); }
.usc-tier__list { padding-left: 18px; font-size: 13px; color: var(--gray-600); }
.usc-tier__list li + li { margin-top: 3px; }

/* ── Admin ──────────────────────────────────────────────────── */
.usc-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
@media (min-width: 600px) { .usc-stat-grid { grid-template-columns: repeat(4, 1fr); } }
.usc-stat { padding: 14px 16px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-card); }
.usc-stat-num { font-size: 26px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.usc-stat-label { margin-top: 4px; font-size: 13px; color: var(--gray-500); }
.usc-bcast-row { align-items: flex-start; }
.usc-bcast-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.usc-bcast-body { margin-top: 2px; font-size: 14px; color: var(--gray-600); overflow-wrap: anywhere; }
.usc-bcast-time { margin-top: 3px; font-size: 12px; color: var(--gray-400); }
.usc-form-stack > * + * { margin-top: 10px; }
.usc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.usc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.usc-table th, .usc-table td { padding: 10px 16px; text-align: left; white-space: nowrap; }
.usc-table thead th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); background: rgba(17, 24, 39, 0.02); }
.usc-table tbody tr + tr td { border-top: 0.5px solid var(--separator); }
.usc-table td.num { font-variant-numeric: tabular-nums; }

/* ── How-to & legal ─────────────────────────────────────────── */
.howto-steps .usc-row { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.howto-steps .usc-row + .usc-row::before { left: 60px; }
.howto-step-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  background: var(--brand-500);
}
.howto-step-icon--emoji { background: var(--canvas); font-size: 17px; }
.howto-step-icon--indigo { background: #6366f1; }
.howto-step-icon--red { background: var(--red-500); }
.howto-step-icon--amber { background: var(--amber-500); }
.howto-step-title { font-size: 16px; font-weight: 600; }
.howto-step-text { margin-top: 3px; font-size: 14px; line-height: 1.5; color: var(--gray-600); }
.howto-footer { display: flex; gap: 10px; flex-wrap: wrap; }
.howto-footer .btn { flex: 1 1 160px; }

.impressum-card h3 { margin: 18px 0 6px; font-size: 16px; }
.impressum-card p { font-size: 14px; line-height: 1.6; color: var(--gray-600); }

footer.usc-footer { padding: 24px 16px 8px; text-align: center; font-size: 13px; color: var(--gray-400); }
footer.usc-footer a { color: var(--gray-500); }
footer.usc-footer a:hover { color: var(--brand-600); }

/* ── Select2 — dressed as iOS fields ────────────────────────── */
.select2-container { max-width: 100%; }
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--fill) !important;
  color: var(--gray-900) !important;
}
.select2-container .select2-selection:focus { outline: none; }
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  background: #fff !important;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.4);
}
.select2-container--default .select2-selection--single { height: 48px !important; display: flex !important; align-items: center !important; }
.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 16px !important;
  padding-right: 36px !important;
  color: var(--gray-900) !important;
  font-size: 16px;
  line-height: 1.3 !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 48px !important; right: 8px !important; }

/* City picker inside a filter row: capsule, right-aligned */
.usc-filter-row .select2-container--default .select2-selection--single { height: 36px !important; border-radius: 999px !important; }
.usc-filter-row .select2-container--default .select2-selection--single .select2-selection__rendered { flex: 1 1 auto; font-size: 15px; font-weight: 500; color: var(--gray-700) !important; text-align: right; padding-left: 14px !important; padding-right: 34px !important; }
.usc-filter-row .select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px !important; right: 6px !important; }

/* Same chevron as the native selects instead of Select2's triangle */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  width: 24px !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center / 18px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b { display: none; }

.select2-container--default .select2-selection--multiple { min-height: 100px !important; padding: 6px 8px !important; }
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  margin-top: 6px !important;
  padding: 3px 8px 3px 22px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(14, 165, 233, 0.12) !important;
  color: var(--brand-800) !important;
  font-size: 13px;
  font-weight: 600;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  border: 0 !important;
  top: 50% !important;
  transform: translateY(-50%);
  left: 6px !important;
  color: var(--brand-700) !important;
  background: none !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__clear {
  margin: 8px 6px 0 0 !important;
  font-size: 18px;
  font-weight: 400;
  color: var(--gray-400);
}
.select2-container--default .select2-search--inline .select2-search__field {
  margin-top: 8px !important;
  height: 24px !important;
  min-height: 0 !important;
  padding: 0 6px !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 16px !important;
  color: var(--gray-900) !important;
  -webkit-text-fill-color: var(--gray-900) !important;
}
.select2-dropdown {
  overflow: hidden;
  border: 0 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), var(--shadow-lift) !important;
}
.select2-container--open .select2-dropdown--below { margin-top: 6px; }
.select2-container--open .select2-dropdown--above { margin-top: -6px; }
.select2-search--dropdown { padding: 8px !important; }
.select2-container--default .select2-search--dropdown .select2-search__field {
  min-height: 40px;
  padding: 8px 12px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--fill) !important;
}
.select2-container--default .select2-results__option { padding: 10px 14px !important; font-size: 15px; color: var(--gray-900); }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: rgba(14, 165, 233, 0.1) !important;
  color: var(--brand-800) !important;
}
.select2-container--default .select2-results__option--selected,
.select2-container--default .select2-results__option[aria-selected="true"] { background: var(--canvas) !important; }
.select2-container--default .select2-results__option--disabled { color: var(--gray-400) !important; }

/* "Course not shown? Refresh" under the Courses class list */
.usc-list-refresh { display: flex; justify-content: center; }
.venues-courses > .usc-list-refresh { margin-top: 18px; }

/* ── Loading states ──────────────────────────────────────────── */
/* Skeleton shown while the Courses class list loads */
.usc-skel {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.06) 25%, rgba(17, 24, 39, 0.11) 37%, rgba(17, 24, 39, 0.06) 63%);
  background-size: 400% 100%;
  animation: uscShimmer 1.4s ease infinite;
}
.usc-skel--label { width: 150px; height: 14px; }
.usc-skel--tile  { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; }
.usc-skel--title { width: 62%; height: 16px; margin-top: 3px; }
.usc-skel--sub   { width: 34%; height: 12px; margin-top: 8px; }
.usc-skel--btns  { width: 190px; max-width: 100%; height: 36px; margin-top: 12px; border-radius: 999px; }
.usc-loading-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--gray-500);
  text-align: center;
}
.usc-spinner {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(14, 165, 233, 0.25);
  border-top-color: var(--brand-600);
  animation: uscSpin 0.8s linear infinite;
}

/* Navigation feedback: a thin bar under the top bar from the tap until the next
   page arrives (layout.html sets body.is-navigating) */
.usc-navprogress {
  position: fixed;
  top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  z-index: 45;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.usc-navprogress::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--brand-500), transparent);
  animation: uscNavProgress 1.1s ease-in-out infinite;
}
body.is-navigating .usc-navprogress { opacity: 1; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes uscShimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@keyframes uscSpin { to { transform: rotate(360deg); } }
@keyframes uscNavProgress { to { left: 100%; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Utilities ───────────────────────────────────────────────── */
.text-muted  { color: var(--gray-500) !important; }
.text-center { text-align: center; }
.small, small { font-size: 0.85em; }
.mt-4 { margin-top: 0; } /* page containers carry their own spacing */
.mb-3 { margin-bottom: 14px; }
.p-5 { padding: 40px 24px; }
.fa-fw { width: 1.25em; text-align: center; }
/* !important: must beat the field styles when applied to an <input> */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
