/* ============================
   CSS Custom Properties
   ============================ */
:root {
  /* Accent: warm gold on near-black */
  --amber: #d97706;
  --amber-light: #f59e0b;
  --amber-pale: #fff7ed;
  --amber-muted: #ffedd5;
  /* Surfaces: ink-first, not brown stone */
  --ink: #0a0a0a;
  --charcoal: #0a0a0a;
  --charcoal-mid: #141414;
  --porter: #0f0f0f;
  /* Neutrals (cool gray, not warm brown) */
  --warm-gray: #525252;
  --warm-gray-light: #a3a3a3;
  --stone: #f4f4f5;
  --stone-border: #e4e4e7;
  --cream: #fafafa;
  --white: #ffffff;
  --green: #047857;
  --green-light: #d1fae5;
  --red: #b91c1c;
  --red-light: #fee2e2;
  --blue: #1d4ed8;
  --blue-light: #dbeafe;

  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --radius: 12px;
  --radius-sm: 7px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 12px rgba(0,0,0,.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-light); }
/* Primary button links: base `a` is amber; must not render amber/grey on orange fill. */
a.btn:not(.btn-outline):not(.btn-ghost) {
  color: #fff;
}
a.btn:not(.btn-outline):not(.btn-ghost):visited,
a.btn:not(.btn-outline):not(.btn-ghost):hover,
a.btn:not(.btn-outline):not(.btn-ghost):active,
a.btn:not(.btn-outline):not(.btn-ghost):focus,
a.btn:not(.btn-outline):not(.btn-ghost):focus-visible {
  color: #fff;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; line-height: 1.2; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

p { line-height: 1.6; color: var(--warm-gray); }

ul { list-style: none; }

/* ============================
   Layout
   ============================ */
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.site-main { flex: 1; padding: 32px 0 48px; }

.two-col { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.two-col-main {}
.two-col-side {}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

/* League ingredient pool: CSV bulk UI hidden on small screens; short note only */
.league-bulk-csv-hint {
  display: none;
}

@media (max-width: 640px) {
  .league-bulk-csv-desk { display: none !important; }
  .league-bulk-csv-hint {
    display: block;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid var(--stone-border);
    border-radius: var(--radius-sm);
    background: var(--stone);
    font-size: 0.88rem;
    color: var(--warm-gray);
    line-height: 1.45;
  }
  .league-bulk-csv-hint p {
    margin: 0;
  }
  .league-pool-bulk-mention { display: none; }
}

/* ============================
   Header
   ============================ */
.site-header {
  background: var(--charcoal);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 var(--amber);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  position: relative;
  gap: 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: #f5f5f5;
  letter-spacing: 0.02em;
}
.site-logo:hover { color: #ffffff; }
.site-logo-icon {
  width: 22px;
  height: 22px;
  color: var(--amber-light);
  flex-shrink: 0;
}

/* Hamburger: hidden on desktop */
.site-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: 0;
  margin-left: auto;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.site-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}
.site-nav-toggle:focus {
  outline: none;
}
.site-nav-toggle:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.site-nav-toggle-box {
  position: relative;
  display: block;
  width: 22px;
  height: 16px;
}
.site-nav-toggle-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #f5f5f5;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}
.site-nav-toggle-bar:nth-child(1) { top: 0; }
.site-nav-toggle-bar:nth-child(2) { top: 7px; }
.site-nav-toggle-bar:nth-child(3) { top: 14px; }
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bar:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bar:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav-link {
  color: var(--warm-gray-light);
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  text-decoration: none;
}
.site-nav-link:hover { color: var(--white); background: rgba(255,255,255,.07); }
.site-nav-link--active { color: var(--white) !important; background: rgba(255,255,255,.1); }
.site-nav-cta { flex-shrink: 0; }

/* User menu (avatar + dropdown) */
.nav-user {
  position: relative;
  margin-left: 8px;
}
.nav-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 2px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: background 0.15s;
}
.nav-user-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
}
.nav-user-trigger:focus {
  outline: none;
}
.nav-user-trigger:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.nav-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-serif);
}
.nav-user-chevron {
  display: block;
  width: 0;
  height: 0;
  margin-right: 2px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--warm-gray-light);
  transition: transform 0.15s;
}
.nav-user-trigger[aria-expanded="true"] .nav-user-chevron {
  transform: rotate(180deg);
}
.nav-user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  padding: 8px 0;
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
  text-align: left;
}
.nav-user-head {
  padding: 8px 14px 10px;
  border-bottom: 1px solid var(--stone-border);
  margin-bottom: 4px;
}
.nav-user-head-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--charcoal);
  line-height: 1.3;
}
.nav-user-head-email {
  font-size: 0.75rem;
  color: var(--warm-gray);
  margin-top: 2px;
  word-break: break-all;
}
a.nav-user-link,
.nav-user-link {
  display: block;
  width: 100%;
  padding: 8px 14px;
  font-size: 0.88rem;
  color: var(--charcoal);
  text-align: left;
  text-decoration: none;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  box-sizing: border-box;
}
a.nav-user-link:hover,
.nav-user-link:hover {
  background: var(--stone);
  color: var(--charcoal);
}
.nav-user-divider {
  height: 1px;
  background: var(--stone-border);
  margin: 6px 0;
}
form.nav-user-logout {
  margin: 0;
  padding: 0;
}
.nav-user-link--signout {
  color: var(--red);
  font-weight: 500;
}
.nav-user-link--signout:hover {
  background: var(--red-light);
  color: var(--red);
}

@media (max-width: 768px) {
  body.site-nav-menu-open {
    overflow: hidden;
  }

  .site-header-inner {
    padding-bottom: 0;
  }

  .site-nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 4px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-nav.site-nav--open {
    display: flex;
  }

  .site-nav-link {
    display: block;
    padding: 12px 4px;
    font-size: 1rem;
  }

  .site-nav-cta {
    margin-top: 10px;
    text-align: center;
    display: block;
  }

  .nav-user {
    margin-left: 0;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-user-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 12px 4px 12px 2px;
  }

  .nav-user-menu {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 6px;
    box-shadow: var(--shadow);
  }
}

/* ============================
   Footer
   ============================ */
.site-footer {
  background: var(--porter);
  color: var(--warm-gray);
  padding: 22px 0;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.site-footer .container { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-footer a { color: var(--warm-gray-light); }
.site-footer a:hover { color: var(--white); }
.footer-sep { color: var(--warm-gray); }
.footer-club-link { font-style: italic; }

/* ============================
   Flash Messages
   ============================ */
.flash-messages { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.flash--out {
  opacity: 0;
  pointer-events: none;
}
.flash--error { background: var(--red-light); color: var(--red); border-left: 3px solid var(--red); }
.flash--success { background: var(--green-light); color: var(--green); border-left: 3px solid var(--green); }
.flash-text { flex: 1; }
.flash-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
  color: inherit;
  opacity: 0.6;
  transition: opacity 0.12s;
}
.flash-dismiss:hover { opacity: 1; }

/* ============================
   Buttons
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--amber);
  color: #fff;
  border: 2px solid var(--amber);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
  text-decoration: none;
  font-family: var(--font-sans);
  line-height: 1;
}
.btn:hover { background: var(--amber-light); border-color: var(--amber-light); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn-xs { padding: 3px 8px; font-size: 0.75rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }

.btn-outline { background: transparent; color: var(--amber); }
.btn-outline:hover { background: #f3f3f3; color: #b45309; border-color: #d1d1d1; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--warm-gray); }
.btn-ghost:hover { background: #e4e4e7; color: var(--ink); border-color: transparent; }
.btn-ghost.btn-ghost--danger { color: #991B1B; }
.btn-ghost.btn-ghost--danger:hover { background: #FEE2E2; color: #7F1D1D; }

.btn-icon { padding: 6px; line-height: 0; }
.btn-icon svg { width: 18px; height: 18px; display: block; }
.btn-icon .sound-icon-off { display: none; }
.btn-icon.is-muted .sound-icon-on { display: none; }
.btn-icon.is-muted .sound-icon-off { display: block; }

/* Wrap so native title tooltip works on disabled Leave League (button has pointer-events: none). */
.leave-league-disabled-wrap {
  display: inline-block;
  cursor: not-allowed;
}

.btn-full { width: 100%; justify-content: center; }

/* ============================
   Cards
   ============================ */
.card {
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 14px; }

/* ============================
   Forms
   ============================ */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 6px;
}
.label-opt { font-weight: 400; color: var(--warm-gray-light); margin-left: 4px; font-size: 0.82rem; }

.input {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--charcoal);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(180,83,9,.12);
}
textarea.input { resize: vertical; }

.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

/* Centered form column (Start a draft, new league, etc.) */
.form-page {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.form-sub { color: var(--warm-gray); }

.card--form {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px 32px 32px;
  margin-bottom: 0;
}
.card--form h1 {
  font-size: 1.75rem;
  margin-bottom: 6px;
  text-align: center;
}
.card--form .form-sub {
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.55;
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}
.card--form > form { margin: 0; }

/* List/index pages: centered column, better use of wide viewports */
.page-narrow {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

/* ============================
   Auth Pages
   ============================ */
.auth-card {
  max-width: 400px;
  margin: 24px auto 0;
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.auth-card h2 { margin-bottom: 6px; font-size: 1.6rem; }
.auth-sub { margin-bottom: 20px; }
.auth-card .field { margin-bottom: 16px; }
.auth-card .btn-full { margin-top: 4px; }

.auth-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
}
.auth-links a { color: var(--amber); }

/* ============================
   Page Header
   ============================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.page-header h1 { margin-bottom: 0; }
.page-header-left {}
.page-desc { margin-top: 4px; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Full width below the title row, centered (league show). */
.league-page-desc {
  flex: 0 0 100%;
  text-align: center;
  margin-top: 8px;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--warm-gray);
  margin: 20px 0 12px;
}
.section-title:first-child { margin-top: 0; }

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--stone-border);
  color: var(--warm-gray);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 8px;
  font-family: var(--font-sans);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--warm-gray);
}
.empty-state p { margin-bottom: 16px; }

/* ============================
   Badges
   ============================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-sans);
}

/* Draft status: slightly larger (~12%) + aligned with app surfaces / accents */
.badge.badge-status-pending,
.badge.badge-status-live,
.badge.badge-status-complete {
  font-size: 0.84rem;
  padding: 3px 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: capitalize;
  line-height: 1.2;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.badge-status-pending {
  background: var(--white);
  color: var(--warm-gray);
  border-color: var(--stone-border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.badge-status-live {
  background: linear-gradient(180deg, #ecfdf5 0%, var(--green-light) 100%);
  color: var(--green);
  border-color: rgba(4, 120, 87, 0.22);
  box-shadow: 0 1px 0 rgba(4, 120, 87, 0.08);
}
.badge-status-complete {
  background: linear-gradient(180deg, #eff6ff 0%, var(--blue-light) 100%);
  color: var(--blue);
  border-color: rgba(29, 78, 216, 0.2);
  box-shadow: 0 1px 0 rgba(29, 78, 216, 0.06);
}
.badge-amber { background: var(--amber-pale); color: var(--amber); }
.badge-green { background: var(--green-light); color: var(--green); }

/* ============================
   Card Grid (Leagues list)
   ============================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.league-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-left: 3px solid var(--stone-border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, border-color .15s, transform .1s;
  color: var(--charcoal);
}
.league-card:hover { box-shadow: var(--shadow-md); border-color: var(--stone-border); border-left-color: var(--amber); transform: translateY(-2px); color: var(--charcoal); }
.league-card--member { border-color: var(--amber-muted); }

.league-card-name { font-weight: 700; font-size: 1rem; margin-bottom: 6px; font-family: var(--font-serif); }
.league-card-meta { font-size: 0.82rem; color: var(--warm-gray); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ============================
   List Items (Drafts, etc.)
   ============================ */
.card-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-left: 3px solid var(--stone-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, border-color .15s, transform .1s;
  color: var(--charcoal);
  gap: 12px;
}
.list-item:hover { box-shadow: var(--shadow-md); border-color: var(--stone-border); border-left-color: var(--amber); transform: translateX(2px); color: var(--charcoal); }

.list-item-name { font-weight: 600; font-size: 0.95rem; }
.list-item-meta { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--warm-gray); flex-wrap: wrap; }
.draft-list-date { color: var(--warm-gray); }
.draft-list-date__label { color: var(--warm-gray-light); font-weight: 500; }
.separator { color: var(--stone-border); }

/* Draft cards on league page */
.draft-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-left: 3px solid var(--stone-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, border-color .15s, transform .1s;
  color: var(--charcoal);
  text-decoration: none;
}
.draft-card:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--amber);
  transform: translateX(2px);
  color: var(--charcoal);
}
.draft-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.draft-card-name {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  font-family: var(--font-serif);
}
.draft-card-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.draft-card-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.draft-card-stat__label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--warm-gray-light);
  font-family: var(--font-sans);
}
.draft-card-stat__value {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--warm-gray);
  font-family: var(--font-sans);
}

/* ============================
   League Detail
   ============================ */
.member-list { display: flex; flex-direction: column; gap: 8px; }
.member-item { display: flex; align-items: center; gap: 10px; }
.member-actions { margin-left: auto; }
.member-actions form { margin: 0; }
.member-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--amber-pale);
  color: var(--amber);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.member-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.member-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-sub { font-size: 0.78rem; color: var(--warm-gray); }

/* Member kebab menu */
.member-menu {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}
.member-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--warm-gray);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.member-menu-trigger:hover {
  background: var(--stone);
  color: var(--charcoal);
}
.member-menu-trigger:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.member-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 200;
  padding: 4px 0;
}
.member-menu-form { margin: 0; padding: 0; }
.member-menu-item {
  display: block;
  width: 100%;
  padding: 8px 14px;
  font-size: 0.875rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--charcoal);
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}
.member-menu-item:hover {
  background: var(--stone);
  color: var(--charcoal);
}

.code-card { text-align: center; }
.join-code {
  font-family: 'Courier New', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--amber);
  background: var(--amber-pale);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin: 10px 0;
  display: inline-block;
}
.code-hint { font-size: 0.82rem; margin-bottom: 10px; }
.invite-link-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  text-align: left;
}
.invite-link-input {
  font-size: 0.78rem;
  flex: 1;
  min-width: 0;
  background: var(--stone);
  color: var(--warm-gray);
  cursor: text;
}

/* ============================
   Invite landing & auth banner
   ============================ */
.invite-landing {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}
.invite-card {
  max-width: 420px;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 32px 36px;
  text-align: center;
}
.invite-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 16px;
}
.invite-title {
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.invite-league-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.invite-body {
  font-size: 0.95rem;
  color: var(--warm-gray);
  margin-bottom: 28px;
  line-height: 1.55;
}
.invite-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.invite-confirm-desc {
  font-size: 0.9rem;
  color: var(--warm-gray);
  text-align: center;
  margin: 0 0 16px;
  line-height: 1.5;
  max-height: 9em;
  overflow-y: auto;
}
.invite-confirm-form {
  flex-direction: column;
  align-items: stretch;
}
.invite-confirm-form .btn {
  width: 100%;
  justify-content: center;
}
.invite-code-hint {
  font-size: 0.82rem;
  color: var(--warm-gray);
}

/* Invite context banner on login/register pages */
.invite-auth-banner {
  max-width: 400px;
  margin: 0 auto 16px;
  background: var(--amber-pale);
  border: 1px solid var(--amber-muted);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.invite-auth-icon { font-size: 1.1rem; }

/* ============================
   Profile
   ============================ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-serif);
}
.profile-info h1 { margin-bottom: 2px; }
.profile-email { font-size: 0.88rem; }
.profile-role { margin-top: 8px; }
.account-card-desc { margin-bottom: 12px; }

/* ============================
   Hero
   ============================ */
.hero {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 80px 20px 72px;
  text-align: center;
  background: #050505;
  background-image: radial-gradient(ellipse 80% 55% at 50% -10%, rgba(245, 158, 11, 0.14) 0%, transparent 55%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 -1px 0 rgba(217, 119, 6, 0.5);
  margin-bottom: 40px;
  overflow: hidden;
}
.hero-title {
  font-size: 3.2rem;
  color: #fafafa;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hero-body {
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 32px;
  color: #a1a1aa;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn-outline {
  border-color: rgba(255,255,255,.35);
  color: var(--white);
}
.hero .btn-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.6);
  color: var(--white);
}

/* ============================
   Pitch Card
   ============================ */
.pitch-card {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: var(--charcoal-mid);
  border-top: 3px solid var(--amber);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 56px 20px 52px;
  margin-bottom: 56px;
}
.pitch-card-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.pitch-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}
.pitch-headline {
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.pitch-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #a1a1aa;
  margin: 0;
}

/* ============================
   Preview Screens
   ============================ */
.previews-section {
  margin-bottom: 64px;
}
.previews-heading {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--warm-gray);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  margin-bottom: 32px;
}
.previews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) {
  .previews { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}
.preview-card {
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.preview-chrome {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px 9px;
  background: var(--charcoal);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.preview-chrome-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
.preview-chrome-dot:nth-child(1) { background: #ff5f57; }
.preview-chrome-dot:nth-child(2) { background: #febc2e; }
.preview-chrome-dot:nth-child(3) { background: #28c840; }
.preview-stripe {
  height: 3px;
}
.preview-stripe--amber { background: var(--amber); }
.preview-stripe--green  { background: var(--green); }
.preview-stripe--blue   { background: var(--blue); }
.preview-body {
  padding: 16px;
}
.preview-label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--warm-gray-light);
  font-family: var(--font-sans);
  margin-top: 14px;
}

/* Mock: Draft Room */
.mock-clock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--charcoal);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
  font-family: var(--font-sans);
}
.mock-clock-name { color: var(--amber); }
.mock-clock-timer {
  background: rgba(217,119,6,0.18);
  color: var(--amber-light);
  border-radius: 4px;
  padding: 2px 7px;
  font-variant-numeric: tabular-nums;
}
.mock-ingredient-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.mock-chip {
  background: var(--stone);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--charcoal);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-chip--picked {
  background: var(--stone-border);
  color: var(--warm-gray-light);
  text-decoration: line-through;
  border-color: transparent;
}
.mock-chip--active {
  background: var(--amber);
  color: var(--white);
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(217,119,6,0.3);
  font-weight: 700;
}
.mock-cat-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--warm-gray-light);
  margin-bottom: 4px;
  font-family: var(--font-sans);
}

/* Mock: Draft Board */
.mock-board {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.66rem;
  font-family: var(--font-sans);
}
.mock-board th {
  background: var(--charcoal);
  color: rgba(255,255,255,0.65);
  padding: 4px 6px;
  font-weight: 600;
  text-align: center;
}
.mock-board td {
  border: 1px solid var(--stone-border);
  padding: 5px 4px;
  text-align: center;
  vertical-align: middle;
  color: var(--warm-gray);
  font-size: 0.62rem;
}
.mock-board-cell-fill {
  background: var(--stone);
  color: var(--charcoal);
  font-weight: 600;
  font-size: 0.6rem;
  padding: 2px 4px;
  border-radius: 4px;
  display: inline-block;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mock-board-cell-active {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.mock-board-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  opacity: 0.9;
}

/* Mock: Recipe */
.mock-recipe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mock-recipe-title {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--charcoal);
}
.mock-recipe-brewer {
  font-size: 0.65rem;
  color: var(--warm-gray-light);
  font-family: var(--font-sans);
}
.mock-recipe-section {
  margin-bottom: 10px;
}
.mock-recipe-cat {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--warm-gray-light);
  font-family: var(--font-sans);
  border-bottom: 1px solid var(--stone-border);
  padding-bottom: 3px;
  margin-bottom: 5px;
}
.mock-recipe-ingredient {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 0.68rem;
  font-family: var(--font-sans);
  color: var(--charcoal);
}
.mock-recipe-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mock-recipe-dot--amber { background: var(--amber); }
.mock-recipe-dot--green { background: var(--green); }
.mock-recipe-dot--blue  { background: var(--blue); }

/* ============================
   Ingredients Browse
   ============================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.filter-pill {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--stone-border);
  background: var(--white);
  color: var(--warm-gray);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  text-decoration: none;
}
.filter-pill:hover, .filter-pill.active {
  background: var(--amber);
  color: var(--white);
  border-color: var(--amber);
}

.ingredient-section { margin-bottom: 28px; }
.cat-heading { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; color: var(--warm-gray); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.cat-limit-badge { font-size: 0.72rem; font-weight: 700; background: var(--stone); border: 1px solid var(--stone-border); border-radius: 20px; padding: 1px 7px; color: var(--warm-gray); font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; }
.cat-limit-badge--full { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }

.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.ingredient-card {
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--stone-border);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.ingredient-card-body { flex: 1 1 auto; min-height: 0; }
.ingredient-card.cat-grain_base { border-left-color: #B45309; }
.ingredient-card.cat-grain_specialty { border-left-color: #D97706; }
.ingredient-card.cat-hop_bittering { border-left-color: #15803D; }
.ingredient-card.cat-hop_other { border-left-color: #16A34A; }
.ingredient-card.cat-yeast { border-left-color: #7C3AED; }
.ingredient-card.cat-adjunct { border-left-color: #0369A1; }

.ingredient-name { font-weight: 600; font-size: 0.9rem; }
.ingredient-details { font-size: 0.78rem; color: var(--warm-gray); margin-top: 4px; }

/* Master list cards: admin footer (policy vs destructive actions) */
.ingredient-card__admin {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--stone-border);
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 0 0 auto;
}
.ingredient-card__admin-block { margin-top: 10px; }
.ingredient-card__admin-block:first-child { margin-top: 0; }
.ingredient-card__admin-block--actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--stone-border);
  margin-top: 10px;
}
.ingredient-card__admin-heading {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin: 0 0 6px 0;
}
.ingredient-card__default-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ingredient-card__default-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--stone-border);
  background: var(--stone);
  color: var(--warm-gray);
  min-width: 2.25rem;
  text-align: center;
}
.ingredient-card__default-pill--on {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #92400E;
}
.ingredient-card__default-pill--off {
  background: #F4F4F5;
  color: var(--warm-gray);
}
.ingredient-card__form-inline {
  display: inline-flex;
  margin: 0;
  vertical-align: middle;
}
.ingredient-card__form-inline .btn { flex-shrink: 0; }
.ingredient-card__admin-block--actions form { margin: 0; display: inline; }
.ingredient-card__admin-block--actions .btn-sm { min-height: 32px; }

.category-list { font-size: 0.85rem; padding-left: 0; margin: 8px 0; }
.category-list li { padding: 3px 0; color: var(--warm-gray); }
.category-list code { background: var(--stone); padding: 1px 5px; border-radius: 3px; font-size: 0.8rem; color: var(--charcoal); }

/* ============================
   Draft Room
   ============================ */
.draft-room {}

.draft-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.draft-title h1 { margin-bottom: 2px; }
.draft-league { font-size: 0.85rem; color: var(--warm-gray); }
.draft-status { display: flex; align-items: center; gap: 10px; }

.draft-join-cta {
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  padding: 0;
  overflow: hidden;
  border-left: 5px solid var(--amber);
}
.draft-join-cta-inner {
  padding: 24px 28px 28px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.draft-join-cta-text {
  font-size: 1.05rem;
  color: var(--charcoal);
  margin: 0 0 16px;
  line-height: 1.5;
}
.draft-join-cta form {
  display: flex;
  justify-content: center;
  margin: 0;
}
.draft-join-cta .draft-join-cta-btn {
  min-width: 220px;
  font-size: 1.05rem;
  padding: 12px 28px;
}

/* Clock Banner */
.clock-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--charcoal);
  color: var(--white);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 5px solid var(--warm-gray);
}
.clock-banner--yours {
  background: var(--amber);
  border-left-color: var(--charcoal);
}
.clock-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: .75; }
.clock-name { font-size: 1.2rem; font-weight: 700; font-family: var(--font-serif); }
.clock-timer { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-left: auto; }
.clock-timer--urgent { color: #FCA5A5; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* Scheduled start banner */
.scheduled-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--stone); border: 1px solid var(--stone-border);
  border-radius: var(--radius); padding: 12px 20px; margin-bottom: 16px;
}
.scheduled-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--warm-gray); }
.scheduled-countdown { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--charcoal); }

/* Draft settings card (inline/sidebar, kept for legacy) */
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.radio-label { display: flex; align-items: center; font-size: 0.88rem; cursor: pointer; }
.settings-subhead { font-size: 0.85rem; font-weight: 700; margin: 16px 0 4px; color: var(--charcoal); }
.pick-limits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.pick-limit-row { display: flex; align-items: center; gap: 8px; }
.pick-limit-row .form-label { flex: 1; font-size: 0.82rem; margin: 0; }
.input-sm { width: 56px; padding: 4px 8px; font-size: 0.85rem; text-align: center; }

/* Draft settings page */
.settings-page { max-width: 680px; margin: 0 auto; }
.settings-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.settings-page-header h1 { margin: 0 0 2px; font-size: 1.5rem; }
.settings-draft-name { margin: 0; font-size: 0.88rem; color: var(--warm-gray); }
.settings-section { margin-bottom: 20px; }
.settings-section-title { font-size: 1rem; font-weight: 700; margin: 0 0 14px; color: var(--charcoal); }
.settings-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.settings-section--add-members { margin-top: 2rem; }
.settings-ajax-notice { font-size: 0.9rem; min-height: 0; }
.settings-ajax-notice--visible { min-height: 1.2em; margin-bottom: 12px; }
.settings-ajax-notice--ok { color: #166534; }
.settings-ajax-notice--err { color: var(--red); }
.settings-form .form-hint { font-size: 0.78rem; color: var(--warm-gray); margin-top: 4px; }

/* Sortable participant list */
.sortable-list {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sortable-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius);
  cursor: default;
  user-select: none;
  transition: background 0.1s, opacity 0.15s;
}
.sortable-item--dragging { opacity: 0.4; }
.sortable-item--over {
  background: var(--amber-pale);
  border-color: var(--amber);
}
.drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  background: none;
  border: none;
  color: var(--warm-gray);
  cursor: grab;
  flex-shrink: 0;
  border-radius: 3px;
}
.drag-handle:active { cursor: grabbing; }
.drag-handle:hover { color: var(--charcoal); background: var(--stone); }
.sortable-item-pos {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--warm-gray);
  min-width: 24px;
  flex-shrink: 0;
}
.sortable-item-name { font-size: 0.9rem; font-weight: 600; }
.sort-save-indicator {
  font-size: 0.78rem;
  color: var(--warm-gray);
  display: inline-block;
  height: 18px;
  margin-bottom: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}
.sort-save-indicator--visible { opacity: 1; }
.sort-save-indicator--error { color: var(--red); }

/* Admin: add league members to a pending draft */
.admin-add-to-draft-card h3 {
  margin-bottom: 6px;
}
.admin-add-to-draft-card > .form-hint {
  margin: 0 0 16px;
  line-height: 1.45;
}
.admin-add-to-draft-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}
.admin-add-to-draft-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.admin-add-to-draft-form .form-label {
  margin: 0;
}
.admin-add-to-draft-form .btn {
  align-self: flex-start;
}

.draft-moderator-live-actions {
  margin: 0 0 18px;
}
.draft-moderator-live-actions .btn {
  width: 100%;
}
@media (min-width: 600px) {
  .draft-moderator-live-actions .btn {
    width: auto;
  }
}

.draft-remove-form {
  margin-left: auto;
  flex-shrink: 0;
}
.draft-remove-form .draft-remove-btn {
  padding: 4px 10px;
  font-size: 0.72rem;
  color: var(--red);
}
.draft-remove-form .draft-remove-btn:hover {
  background: var(--red-light);
  color: var(--red);
}

/* Draft Board */
.draft-board-wrap { margin-bottom: 24px; position: relative; }
.draft-board-scroll { overflow-x: auto; cursor: grab; }
.draft-board { border-collapse: collapse; width: 100%; font-size: 0.82rem; }
.draft-board th, .draft-board td {
  padding: 7px 10px;
  border: 1px solid var(--stone-border);
  text-align: left;
  white-space: nowrap;
}
.draft-board th { background: var(--charcoal); color: var(--amber-pale); font-weight: 600; }
.round-cell { background: var(--stone); color: var(--warm-gray); font-weight: 700; width: 36px; text-align: center; }
.pick-cell { background: var(--white); min-width: 130px; vertical-align: top; }
.pick-cell--filled { background: var(--amber-pale); }
.pick-ingredient { font-weight: 600; color: var(--charcoal); }
.pick-category { font-size: 0.72rem; color: var(--warm-gray); text-transform: capitalize; }
.pick-cell--current { background: #fef9ec; outline: 2px solid var(--amber); outline-offset: -2px; }
/* display:flex on <td> breaks cell stretch; absolute centering keeps the highlight full height */
.pick-cell--current:has(.pick-current) {
  position: relative;
  text-align: center;
  vertical-align: middle;
}
.pick-current {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1em;
  font-size: 1.2em;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--warm-gray);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.pick-current-dot {
  display: inline-block;
  animation: pick-current-wave 1.15s ease-in-out infinite;
}
.pick-current-dot:nth-child(1) { animation-delay: 0s; }
.pick-current-dot:nth-child(2) { animation-delay: 0.12s; }
.pick-current-dot:nth-child(3) { animation-delay: 0.24s; }
@keyframes pick-current-wave {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .pick-current-dot { animation: none; opacity: 0.85; }
}

/* Draft Main Layout */
.draft-main {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .draft-main { grid-template-columns: 1fr; }
}

/* Mobile draft: FABs, tray, collapsible category rows */
#draft-side-slot:empty { min-height: 0; }

.draft-mobile-fabs {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 350;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
@media (max-width: 900px) {
  .draft-mobile-fabs { display: flex; }
}

.draft-fab {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  background: var(--charcoal);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.12s, transform 0.12s;
}
.draft-fab:hover {
  background: #3d3a36;
  transform: scale(1.04);
}
.draft-fab:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.draft-fab svg {
  width: 24px;
  height: 24px;
}
.draft-fab-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  pointer-events: none;
}
.draft-fab-badge[hidden] { display: none; }

.draft-mobile-tray {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}
.draft-mobile-tray.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}
@media (min-width: 901px) {
  .draft-mobile-tray { display: none; opacity: 0 !important; visibility: hidden !important; }
}
@media (max-width: 900px) {
  .draft-mobile-tray { display: block; }
}
.draft-mobile-tray-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: default;
  display: block;
}
.draft-mobile-tray-surface {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 0.22s ease;
}
.draft-mobile-tray.is-open .draft-mobile-tray-surface {
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .draft-mobile-tray-surface { transition: none; }
  .draft-mobile-tray { transition: none; }
}
.draft-mobile-tray-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--stone-border);
  flex-shrink: 0;
}
.draft-mobile-tray-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--charcoal);
}
.draft-mobile-tray-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--warm-gray);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  margin: -4px 0 0 0;
}
.draft-mobile-tray-close:hover { color: var(--charcoal); }
.draft-mobile-tray-close svg { width: 20px; height: 20px; }
.draft-mobile-tray-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 20px;
  -webkit-overflow-scrolling: touch;
}
.draft-mobile-tray .draft-side {
  padding: 0 16px 12px;
}
/* Tray header already says Chat / Participants — hide duplicate card titles */
.draft-mobile-tray .draft-side .card > h3 {
  display: none;
}
/* Mobile tray: one panel at a time (JS sets .draft-side--view-chat or .draft-side--view-participants) */
@media (max-width: 900px) {
  .draft-mobile-tray.is-open .draft-side.draft-side--view-chat #draft-participants-card {
    display: none !important;
  }
  .draft-mobile-tray.is-open .draft-side.draft-side--view-participants #draft-chat-card {
    display: none !important;
  }
}
.draft-mobile-tray .chat-log {
  height: min(300px, 40vh);
}
@media (min-width: 901px) {
  .draft-mobile-fabs { display: none !important; }
}

html.draft-mobile-tray-open,
body.draft-mobile-tray-open {
  overflow: hidden;
}

/* Category heading: button (draft room) */
button.cat-heading {
  font: inherit;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  color: inherit;
  margin: 0 0 10px 0;
  letter-spacing: inherit;
  text-transform: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
  cursor: default;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  button.cat-heading {
    cursor: pointer;
    padding: 4px 0 6px;
    margin-bottom: 8px;
  }
  button.cat-heading::after {
    content: "";
    display: block;
    width: 0.4em;
    height: 0.4em;
    margin-left: auto;
    flex-shrink: 0;
    border-right: 2px solid var(--warm-gray);
    border-bottom: 2px solid var(--warm-gray);
    transform: rotate(45deg);
    transition: transform 0.12s;
  }
  .ingredient-section--collapsed button.cat-heading::after {
    transform: rotate(225deg) translate(1px, -1px);
  }
  .ingredient-section--collapsed .ingredient-pick-grid { display: none; }
  .ingredient-section--collapsed button.cat-heading { margin-bottom: 4px; }
}
@media (min-width: 901px) {
  .ingredient-section--collapsed .ingredient-pick-grid {
    display: grid !important;
  }
}

/* Ingredient Pick Grid */
.ingredient-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.ingredient-pick-btn {
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--stone-border);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: background .1s, border-color .1s, opacity .15s;
  font-family: var(--font-sans);
  width: 100%;
  position: relative;
}
.pick-confirm-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--white);
  border: 2px solid var(--amber);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 6px;
  z-index: 2;
  text-align: center;
}
.pick-confirm-text {
  font-size: 0.78rem;
  color: var(--charcoal);
  line-height: 1.3;
}
.pick-confirm-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pick-confirm-yes, .pick-confirm-no {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
}
.pick-confirm-yes {
  background: var(--amber);
  color: #fff;
}
.pick-confirm-yes:hover { background: #b45309; }
.pick-confirm-no {
  color: var(--warm-gray);
  text-decoration: underline;
}
.ingredient-pick-btn[data-cat="grain_base"] { border-left-color: #B45309; }
.ingredient-pick-btn[data-cat="grain_specialty"] { border-left-color: #D97706; }
.ingredient-pick-btn[data-cat="hop_bittering"] { border-left-color: #15803D; }
.ingredient-pick-btn[data-cat="hop_other"] { border-left-color: #16A34A; }
.ingredient-pick-btn[data-cat="yeast"] { border-left-color: #7C3AED; }
.ingredient-pick-btn[data-cat="adjunct"] { border-left-color: #0369A1; }

.ingredient-pick-btn:not(.picked):not(.disabled-pick):not(.ingredient-pick-btn--no-pick):hover {
  background: var(--amber-pale);
  border-color: var(--amber);
}
.ingredient-pick-btn.my-turn:not(.picked) {
  box-shadow: 0 0 0 2px var(--amber);
}
.ingredient-pick-btn.picked {
  opacity: 0.42;
  cursor: default;
  background: var(--stone);
  position: relative;
}
.ingredient-pick-btn.disabled-pick { cursor: not-allowed; opacity: 0.65; }
/* Live draft: can't pick (someone else on the clock, or at your category limit) */
.ingredient-pick-btn.ingredient-pick-btn--no-pick:not(.picked) {
  cursor: not-allowed;
}

.ingredient-btn-name { font-size: 0.85rem; font-weight: 600; color: var(--charcoal); }
.ingredient-btn-detail { font-size: 0.73rem; color: var(--warm-gray); margin-top: 2px; }
.ingredient-btn-by {
  font-size: 0.72rem;
  color: var(--amber);
  font-weight: 600;
  margin-top: 3px;
}
.picked .ingredient-btn-name { text-decoration: line-through; color: var(--warm-gray); }

/* Draft Side Panel */
.draft-side { display: flex; flex-direction: column; gap: 16px; }
.draft-side .card { margin-bottom: 0; }

.participant-list { display: flex; flex-direction: column; gap: 6px; }
.participant-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background .1s;
}
.participant-item.on-clock { background: var(--amber-pale); }
.participant-item.is-you { font-style: italic; }
.participant-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--stone);
  color: var(--warm-gray);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.on-clock .participant-avatar { background: var(--amber); color: var(--white); }
.participant-name { font-size: 0.88rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.you-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--amber);
  font-style: normal;
  border: 1px solid var(--amber);
  padding: 1px 5px;
  border-radius: 999px;
}
.clock-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
  margin-left: auto;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(0.85); }
}

/* Online presence indicator */
.participant-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.participant-status { display: flex; align-items: center; gap: 4px; height: 14px; }
.online-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--stone);
  flex-shrink: 0;
  transition: background .2s;
}
.online-label {
  font-size: 0.7rem;
  color: var(--warm-gray);
  transition: color .2s;
}
.online-label::after { content: 'Offline'; }
.participant-item.is-online .online-dot { background: #22c55e; }
.participant-item.is-online .online-label { color: #16a34a; }
.participant-item.is-online .online-label::after { content: 'Online'; }

/* Chat */
.chat-card {}
.chat-log {
  height: 380px;
  overflow-y: auto;
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--stone);
}
.chat-msg { font-size: 0.82rem; line-height: 1.4; }
.chat-who { font-weight: 700; color: var(--charcoal); margin-right: 4px; }
.chat-time { color: var(--warm-gray-light); margin-right: 6px; font-size: 0.73rem; }
.chat-form { display: flex; gap: 6px; }
.chat-form .input { flex: 1; }

/* ============================
   Toast Notifications
   ============================ */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--charcoal);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  max-width: 360px;
  text-align: center;
}
.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--error { background: var(--red); }
.toast--info { background: var(--charcoal-mid); }

/* ============================
   League Ingredient Pool
   ============================ */
.pool-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 10px;
  flex-wrap: wrap;
}
.pool-toolbar--bottom { margin-top: 24px; margin-bottom: 0; }
.pool-bulk-actions { display: flex; gap: 8px; }

.bulk-upload-error-list {
  margin: 12px 0 0 1.1em;
  padding: 0;
  color: var(--ink);
  line-height: 1.55;
  font-size: 0.95rem;
}
.bulk-upload-error-list li { margin-bottom: 6px; }

.pool-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.pool-cat-header .cat-heading { margin-bottom: 0; }

.ingredient-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}

.ingredient-check-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--white);
  border: 2px solid var(--stone-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
  user-select: none;
}
/* display:none on the checkbox breaks label → checkbox activation in some browsers; keep it present but not visible */
.ingredient-check-card input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  opacity: 0;
}
.ingredient-check-card:hover { border-color: var(--amber-light); }
.ingredient-check-card.is-checked {
  border-color: var(--amber);
  background: var(--amber-pale);
}
.ingredient-check-card[data-cat="grain_base"] { border-left: 4px solid #B45309; }
.ingredient-check-card[data-cat="grain_specialty"] { border-left: 4px solid #D97706; }
.ingredient-check-card[data-cat="hop_bittering"] { border-left: 4px solid #15803D; }
.ingredient-check-card[data-cat="hop_other"] { border-left: 4px solid #16A34A; }
.ingredient-check-card[data-cat="yeast"] { border-left: 4px solid #7C3AED; }
.ingredient-check-card[data-cat="adjunct"] { border-left: 4px solid #0369A1; }

.ingredient-check-name { font-size: 0.88rem; font-weight: 600; color: var(--charcoal); }
.ingredient-check-detail { font-size: 0.75rem; color: var(--warm-gray); }

/* ============================
   Utilities
   ============================ */
.text-muted { color: var(--warm-gray); font-size: 0.88rem; }

/* ============================
   Recipe Page
   ============================ */
.recipe-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 4px;
}

.recipe-header {
  margin-bottom: 24px;
}

.recipe-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
  flex-wrap: wrap;
}

.recipe-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.recipe-draft-name {
  margin-bottom: 0;
  font-size: 1.75rem;
}

.recipe-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--warm-gray);
  flex-wrap: wrap;
}

.recipe-league {
  font-weight: 500;
}

.recipe-meta-sep {
  color: var(--stone-border);
}

/* Multi-drafter: master–detail + mobile sticky + narrow select */
.recipe-multi {
  margin-top: 8px;
}

.recipe-sticky-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0 0 12px 0;
  padding: 10px 12px 12px;
  background: var(--cream);
  border-bottom: 1px solid var(--stone-border);
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  padding-left: max(12px, env(safe-area-inset-left, 12px));
  padding-right: max(12px, env(safe-area-inset-right, 12px));
}

.recipe-sticky-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  max-width: 1040px;
  margin: 0 auto;
}

.recipe-sticky-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--warm-gray);
}

.recipe-sticky-name {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--charcoal);
  flex: 1;
  min-width: 0;
}

.recipe-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.recipe-main {
  min-width: 0;
}

.recipe-main--single {
  display: block;
  margin-top: 8px;
}

/* Sidebar member list (desktop + tablet) */
.recipe-member-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 1rem;
}

.recipe-member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px 8px 10px;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
}

.recipe-member-item:hover {
  border-color: var(--amber-light);
  background: var(--amber-pale);
}

.recipe-member-item--active {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber);
  background: #fff8f0;
}

.recipe-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--stone);
  color: var(--charcoal);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-serif);
}

.recipe-member-item--active .recipe-member-avatar {
  background: var(--amber);
  color: #fff;
}

.recipe-member-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.recipe-member-name {
  line-height: 1.25;
}

/* Narrow phones: select inside main — same width as recipe card, card-like chrome */
.recipe-main .recipe-member-select-wrap {
  display: none;
  width: 100%;
  margin: 0 0 20px 0;
  box-sizing: border-box;
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: var(--white);
  overflow: hidden;
}

.recipe-drafter-select-label {
  display: block;
  margin: 0;
  padding: 14px 18px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--warm-gray);
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.recipe-drafter-select-inner {
  position: relative;
  background: var(--white);
  padding: 0;
}

.recipe-drafter-select-inner::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--warm-gray);
  margin-top: -3px;
  pointer-events: none;
}

.recipe-member-select {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 0;
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 14px 44px 14px 18px;
  border: 0;
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  line-height: 1.3;
  box-sizing: border-box;
}

.recipe-member-select:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--amber);
}

.recipe-drafter-select-inner:focus-within {
  background: #fffdfb;
}

/* Mid + narrow: sticky context bar */
@media (max-width: 700px) {
  .recipe-sticky-bar {
    display: block;
  }
  .recipe-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .recipe-member-nav {
    position: static;
  }
}

@media (max-width: 480px) {
  .recipe-member-nav {
    display: none;
  }
  .recipe-main .recipe-member-select-wrap {
    display: block;
  }
}

/* Desktop: two columns, no sticky top bar, no select */
@media (min-width: 701px) {
  .recipe-sticky-bar {
    display: none !important;
  }
  .recipe-main .recipe-member-select-wrap {
    display: none !important;
  }
}

.recipe-you-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--amber);
  border: 1px solid var(--amber);
  padding: 1px 5px;
  border-radius: 999px;
  font-style: normal;
  font-family: var(--font-sans);
}

/* Recipe card */
.recipe-card {
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.recipe-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: var(--charcoal);
  color: var(--white);
}

.recipe-card-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-serif);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recipe-card-name {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-serif);
  display: flex;
  align-items: center;
  gap: 8px;
}

.recipe-card-name .recipe-you-badge {
  color: var(--amber-light);
  border-color: var(--amber-light);
}

.recipe-card-header .recipe-print-btn {
  margin-left: auto;
  flex-shrink: 0;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}
.recipe-card-header .recipe-print-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.recipe-categories {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.recipe-cat-section {}

.recipe-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.recipe-cat-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--warm-gray);
}

.recipe-cat-limit {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--stone);
  border: 1px solid var(--stone-border);
  border-radius: 20px;
  padding: 1px 7px;
  color: var(--warm-gray);
  font-variant-numeric: tabular-nums;
}

/* Ingredient chips */
.recipe-ingredient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--stone);
  border: 1px solid var(--stone-border);
  border-left: 4px solid var(--stone-border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  min-width: 120px;
  max-width: 220px;
}

.recipe-chip[data-cat="grain_base"]      { border-left-color: #B45309; background: #fef9f0; }
.recipe-chip[data-cat="grain_specialty"] { border-left-color: #D97706; background: #fefbf0; }
.recipe-chip[data-cat="hop_bittering"]   { border-left-color: #15803D; background: #f0fdf4; }
.recipe-chip[data-cat="hop_other"]        { border-left-color: #16A34A; background: #f0fdf4; }
.recipe-chip[data-cat="yeast"]           { border-left-color: #7C3AED; background: #faf5ff; }
.recipe-chip[data-cat="adjunct"]         { border-left-color: #0369A1; background: #eff6ff; }

.recipe-chip-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
}

.recipe-chip-detail {
  font-size: 0.72rem;
  color: var(--warm-gray);
  line-height: 1.3;
}

.recipe-empty {
  padding: 20px 24px;
  color: var(--warm-gray);
  font-size: 0.9rem;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .recipe-categories {
    padding: 16px;
  }
  .recipe-card-header {
    padding: 16px;
  }
  .recipe-drafter-select-label {
    padding: 12px 16px 6px;
  }
  .recipe-member-select {
    padding: 12px 40px 12px 16px;
  }
  .recipe-drafter-select-inner::after {
    right: 14px;
  }
  .recipe-ingredient-chips {
    gap: 6px;
  }
  .recipe-chip {
    min-width: 100px;
    padding: 8px 10px;
  }
}

/* ============================
   Recipe Print Styles
   ============================ */
@media print {
  .site-header,
  .site-footer,
  .recipe-header-top,
  .recipe-sticky-bar,
  .recipe-member-nav,
  .recipe-member-select-wrap,
  .recipe-print-btn,
  .flash-messages {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .site-main {
    padding: 0;
  }

  .recipe-page {
    max-width: 100%;
  }

  .recipe-title-row {
    margin-bottom: 12px;
  }

  .recipe-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

  .recipe-card-header {
    background: #222 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .recipe-chip {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    break-inside: avoid;
  }

  .recipe-cat-section {
    break-inside: avoid;
  }
}

/* ============================
   Admin User Table
   ============================ */
.admin-user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.admin-user-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--warm-gray);
  border-bottom: 2px solid var(--stone-border);
  font-family: var(--font-sans);
}
.admin-user-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--stone-border);
  vertical-align: middle;
}
.admin-user-table tbody tr:last-child td { border-bottom: none; }
.admin-user-row--locked td { opacity: 0.6; }
.admin-user-name { font-weight: 600; }
.admin-user-email { color: var(--warm-gray); font-size: 0.82rem; }
.admin-user-actions { white-space: nowrap; }
.badge-locked {
  background: var(--red-light);
  color: var(--red);
}
@media (max-width: 700px) {
  .admin-user-table thead { display: none; }
  .admin-user-table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--stone-border); }
  .admin-user-table td { display: block; padding: 2px 12px; border: none; }
  .admin-user-actions { padding-top: 8px; }
}

/* Bootstrap modals: above in-app toasts (z-index 9999) and sticky header */
.modal {
  z-index: 10050;
}
.modal-backdrop {
  z-index: 10040;
}

/* Draft info modal */
.draft-info-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0;
}
.draft-info-dl dt {
  font-weight: 600;
  color: var(--warm-gray);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 2px;
  white-space: nowrap;
}
.draft-info-dl dd {
  margin: 0;
  font-size: 0.95rem;
}
.draft-info-limits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.draft-info-limit-cat {
  font-weight: 500;
  margin-right: 6px;
}

/* ============================
   Dashboard Stats
   ============================ */
.dashboard-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.dashboard-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius);
  padding: 14px 24px;
  box-shadow: var(--shadow);
  min-width: 90px;
}
.dashboard-stat-value {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1;
}
.dashboard-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--warm-gray);
  font-family: var(--font-sans);
}
.dashboard-stat--live {
  border-color: rgba(4, 120, 87, 0.3);
  background: var(--green-light);
}
.dashboard-stat--live .dashboard-stat-value { color: var(--green); }
.dashboard-stat--live .dashboard-stat-label { color: var(--green); }

/* ============================
   Password Toggle
   ============================ */
.password-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-field-wrap .input {
  padding-right: 42px;
}
.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--warm-gray);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
  line-height: 0;
}
.password-toggle-btn:hover { color: var(--charcoal); }
.password-toggle-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ============================
   Draft Topbar (regrouped)
   ============================ */
.draft-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.draft-topbar-form {
  display: inline-flex;
  margin: 0;
}
.draft-topbar-separator {
  width: 1px;
  height: 24px;
  background: var(--stone-border);
  flex-shrink: 0;
  margin: 0 4px;
}

/* ============================
   Page Header Danger Separator
   ============================ */
.page-header-danger-sep {
  width: 1px;
  height: 24px;
  background: var(--stone-border);
  flex-shrink: 0;
  margin: 0 4px;
  align-self: center;
}

/* ============================
   Breadcrumb
   ============================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.breadcrumb-link {
  color: var(--amber);
  text-decoration: none;
}
.breadcrumb-link:hover { color: var(--amber-light); text-decoration: underline; }
.breadcrumb-sep {
  color: var(--stone-border);
}
.breadcrumb-current {
  color: var(--warm-gray);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

/* ============================
   Card narrow (edit forms)
   ============================ */
.card--narrow {
  max-width: 520px;
}

/* ============================
   Bulk Upload Error Pages
   ============================ */
.bulk-error-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--red-light);
  border: 1px solid rgba(185, 28, 28, 0.2);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.bulk-error-icon {
  flex-shrink: 0;
  color: var(--red);
  width: 24px;
  height: 24px;
  margin-top: 1px;
}
.bulk-error-icon svg { display: block; }
.bulk-error-body { flex: 1; min-width: 0; }
.bulk-error-headline {
  font-weight: 700;
  color: var(--red);
  margin-bottom: 6px;
  line-height: 1.4;
}
.bulk-error-detail {
  font-size: 0.9rem;
  color: #7f1d1d;
  margin-bottom: 0;
  line-height: 1.5;
}
.bulk-error-note {
  font-size: 0.82rem;
  color: #991b1b;
  margin-top: 6px;
  margin-bottom: 0;
}
.bulk-error-footer {
  margin-top: 20px;
}

/* ============================
   Inline utility classes (replacing scattered inline styles)
   ============================ */
.form-inline {
  display: inline;
}
.form-inline--gap {
  margin-left: 6px;
}
.member-list--spaced { margin-bottom: 16px; }
.member-item--spread { justify-content: space-between; }
.member-actions--inline { display: flex; gap: 8px; align-items: center; }
.text-sm { font-size: 0.9rem; }
.text-mb-sm { margin-bottom: 8px; }
.text-mb { margin-bottom: 12px; }
.subhead-sm { font-size: 1rem !important; font-weight: 700; }
.subhead-mt { margin-top: 16px; }
.subhead-mt-lg { margin-top: 20px; }
.section-divider { border: none; border-top: 1px solid var(--stone-border); margin: 24px 0; }
.field-hint { font-size: 0.85rem; margin-top: 4px; }

/* ============================
   Draft Board Scroll Affordance
   ============================ */
.draft-board-wrap::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48px;
  background: linear-gradient(to right, transparent, var(--cream));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 1;
}
.draft-board-wrap--overflowing::after {
  opacity: 1;
}

/* ============================
   Timezone hint
   ============================ */
.tz-hint {
  font-size: 0.75rem;
  color: var(--warm-gray-light);
  font-style: italic;
}
