/* ============================================================
   raid.rsvp — custom theme
   Themes: fantasy (default) | terminal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Fantasy theme tokens ── */
[data-theme="fantasy"] {
  --rr-accent:       #7c5cbf;
  --rr-accent-light: #a07ed4;
  --rr-accent-dark:  #5e3f9e;
  --rr-gold:         #c9a227;
  --rr-gold-light:   #e8bc40;
  --rr-bg-base:      #0d1117;
  --rr-bg-surface:   #161b22;
  --rr-bg-elevated:  #21262d;
  --rr-border:       #30363d;
  --rr-text:         #e6edf3;
  --rr-text-muted:   #8b949e;
  --rr-brand-color:  #c9a227;
  --rr-font:         'Inter', system-ui, sans-serif;

  /* Toned danger — wine/burgundy instead of Bootstrap's harsh red */
  --bs-danger:               #9b3454;
  --bs-danger-rgb:           155, 52, 84;
  --bs-danger-text-emphasis: #d4849e;
  --bs-danger-bg-subtle:     #1a0d14;
  --bs-danger-border-subtle: #4d1a2a;
}

/* ── Terminal theme tokens ── */
[data-theme="terminal"] {
  --rr-accent:       #00ff41;
  --rr-accent-light: #39ff14;
  --rr-accent-dark:  #00cc33;
  --rr-gold:         #00ff41;
  --rr-gold-light:   #39ff14;
  --rr-bg-base:      #050505;
  --rr-bg-surface:   #0a0a0a;
  --rr-bg-elevated:  #111;
  --rr-border:       rgba(0, 255, 65, 0.2);
  --rr-text:         #c0ffc0;
  --rr-text-muted:   #4a8a4a;
  --rr-brand-color:  #00ff41;
  --rr-font:         'JetBrains Mono', 'Courier New', monospace;
}

/* ── Base ── */
body {
  font-family: var(--rr-font);
  background-color: var(--rr-bg-base);
  color: var(--rr-text);
}

/* ── Bootstrap primary overrides ── */
.btn-primary {
  --bs-btn-bg:                    var(--rr-accent);
  --bs-btn-border-color:          var(--rr-accent);
  --bs-btn-hover-bg:              var(--rr-accent-light);
  --bs-btn-hover-border-color:    var(--rr-accent-light);
  --bs-btn-active-bg:             var(--rr-accent-dark);
  --bs-btn-active-border-color:   var(--rr-accent-dark);
  --bs-btn-disabled-bg:           var(--rr-accent);
  --bs-btn-disabled-border-color: var(--rr-accent);
  --bs-btn-color: #fff;
}

[data-theme="terminal"] .btn-primary {
  --bs-btn-color: #050505;
}

.btn-outline-primary {
  --bs-btn-color:              var(--rr-accent-light);
  --bs-btn-border-color:       var(--rr-accent);
  --bs-btn-hover-color:        #fff;
  --bs-btn-hover-bg:           var(--rr-accent);
  --bs-btn-hover-border-color: var(--rr-accent);
  --bs-btn-active-bg:          var(--rr-accent-dark);
  --bs-btn-active-border-color: var(--rr-accent-dark);
}

[data-theme="terminal"] .btn-outline-primary {
  --bs-btn-hover-color: #050505;
}

/* ── Discord button ── */
.btn-discord {
  --bs-btn-color:              #fff;
  --bs-btn-bg:                 #5865F2;
  --bs-btn-border-color:       #5865F2;
  --bs-btn-hover-color:        #fff;
  --bs-btn-hover-bg:           #4752C4;
  --bs-btn-hover-border-color: #4752C4;
}
.btn-discord:hover,
.btn-discord:focus {
  color: #fff;
}

/* ── Link colors ── */
[data-bs-theme="dark"] {
  --bs-link-color:       var(--rr-accent-light);
  --bs-link-hover-color: var(--rr-gold-light);
}

/* ── Navbar ── */
.navbar {
  background-color: var(--rr-bg-base) !important;
  border-bottom: 1px solid var(--rr-border);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--rr-brand-color) !important;
}

.navbar-brand:hover {
  color: var(--rr-gold-light) !important;
}

[data-theme="terminal"] .navbar-brand {
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.5);
  letter-spacing: 0.08em;
}

/* ── Cards ── */
.card {
  background-color: var(--rr-bg-surface) !important;
  border-color: var(--rr-border) !important;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--rr-accent) !important;
  transform: translateY(-2px);
}

[data-theme="fantasy"] .card:hover {
  box-shadow: 0 4px 24px rgba(124, 92, 191, 0.15);
}

[data-theme="terminal"] .card:hover {
  box-shadow: 0 4px 24px rgba(0, 255, 65, 0.08);
}

/* ── Auth card ── */
.auth-card {
  background-color: var(--rr-bg-surface);
  border: 1px solid var(--rr-border);
  border-radius: 12px;
  padding: 2rem;
}

/* ── Form controls ── */
[data-bs-theme="dark"] .form-control {
  background-color: var(--rr-bg-elevated);
  border-color: var(--rr-border);
  color: var(--rr-text);
}

[data-bs-theme="dark"] .form-control:focus {
  background-color: var(--rr-bg-elevated);
  border-color: var(--rr-accent);
  color: var(--rr-text);
  box-shadow: 0 0 0 0.2rem rgba(124, 92, 191, 0.2);
}

[data-theme="terminal"] .form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 255, 65, 0.15);
}

/* ── Hero section ── */
.hero {
  padding: 5rem 1rem 4.5rem;
  border-bottom: 1px solid var(--rr-border);
  text-align: center;
}

[data-theme="fantasy"] .hero {
  background: linear-gradient(135deg, #0d1117 0%, #14102a 45%, #0d1117 100%);
}

[data-theme="terminal"] .hero {
  background: radial-gradient(ellipse at 50% -10%, #001a00 0%, #050505 65%);
}

/* ── Hero title ── */
.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

[data-theme="fantasy"] .hero-title {
  background: linear-gradient(120deg, #c9a227 0%, #e8bc40 30%, #fff 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="terminal"] .hero-title {
  color: var(--rr-accent);
  text-shadow: 0 0 40px rgba(0, 255, 65, 0.4), 0 0 80px rgba(0, 255, 65, 0.15);
  letter-spacing: 0.04em;
  font-weight: 700;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--rr-text-muted);
  margin-top: 1rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Feature icons ── */
.feature-icon {
  font-size: 2.25rem;
  color: var(--rr-accent);
  display: block;
  margin-bottom: 0.75rem;
}

[data-theme="terminal"] .feature-icon {
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.5);
}

[data-theme="fantasy"] .feature-icon {
  color: var(--rr-accent-light);
}

/* ── Role badges ── */
.badge-leader  { background-color: #c0392b !important; }
.badge-officer { background-color: var(--rr-gold) !important; color: #0d1117 !important; }
.badge-member  {
  background-color: var(--rr-bg-elevated) !important;
  color: var(--rr-text-muted) !important;
  border: 1px solid var(--rr-border);
}

[data-theme="terminal"] .badge-officer { color: #050505 !important; }

/* ── Divider with text ── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--rr-text-muted);
  font-size: 0.8rem;
  margin: 1.25rem 0;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rr-border);
}

/* ── Theme toggle button ── */
#theme-toggle {
  background: none;
  border: 1px solid var(--rr-border);
  color: var(--rr-text-muted);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

#theme-toggle:hover {
  border-color: var(--rr-accent);
  color: var(--rr-accent);
}

[data-theme="terminal"] #theme-toggle:hover {
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--rr-text-muted);
}

.empty-state .empty-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.4;
}

/* ── Page header ── */
.page-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--rr-border);
  margin-bottom: 2rem;
}

/* ── Schedule poll grid ── */
.schedule-grid {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.78rem;
  user-select: none;
}
.schedule-grid th, .schedule-grid td {
  border: 1px solid var(--rr-border);
  padding: 0;
  text-align: center;
  vertical-align: middle;
}
.schedule-grid thead th {
  padding: 0.35rem 0.5rem;
  background: var(--rr-bg-elev);
  font-weight: 500;
  white-space: nowrap;
}
.schedule-grid .time-col {
  width: 60px;
  min-width: 60px;
  padding: 0 0.4rem;
  text-align: right;
  background: transparent;
  font-weight: 400;
}
.schedule-grid .slot-cell {
  height: 22px;
  min-width: 70px;
  cursor: default;
}
.schedule-grid .slot-cell-empty {
  background: transparent;
  border: none;
}
.schedule-grid-pick {
  touch-action: none;
  user-select: none;
}
.schedule-grid-pick .slot-cell-pick {
  cursor: pointer;
  transition: background-color 80ms ease;
}
.schedule-grid-pick .slot-cell-pick:hover {
  outline: 1px solid var(--rr-accent);
}
.schedule-grid-pick .slot-cell-pick:focus-visible {
  outline: 2px solid var(--rr-accent-light);
  outline-offset: -1px;
  position: relative; z-index: 1;
}
.schedule-grid-pick .slot-selected {
  background-color: var(--rr-accent);
  opacity: 0.85;
}

/* Heatmap empty state */
#heatmap-wrap {
  position: relative;
}
.heatmap-empty-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(1px);
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
}

/* Best-times feature */
.slot-rank-badge {
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
}
.slot-ranked {
  outline: 1px solid var(--rr-accent);
}
.slot-best-hover {
  outline: 2px solid var(--rr-accent) !important;
}
.slot-dimmed {
  opacity: 0.22;
  transition: opacity 120ms ease;
}
.best-time-row {
  cursor: pointer;
  transition: background-color 120ms ease;
}
.best-time-row:focus-visible {
  outline: 2px solid var(--rr-accent-light);
  outline-offset: -2px;
  position: relative; z-index: 1;
}
.best-time-row:hover,
.best-time-active {
  background-color: color-mix(in srgb, var(--rr-accent) 12%, transparent);
}
.best-time-pinned {
  background-color: color-mix(in srgb, var(--rr-accent) 20%, transparent) !important;
  outline: 1px solid var(--rr-accent);
}
.best-time-copy-group {
  opacity: 0.55;
  transition: opacity 120ms ease;
}
.best-time-row:hover .best-time-copy-group,
.best-time-pinned .best-time-copy-group {
  opacity: 1;
}

/* Shared toast for copy actions */
.copy-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  z-index: 2000;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--rr-bg-elev);
  color: var(--rr-text);
  border: 1px solid var(--rr-accent);
  font-size: 0.85rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.best-time-rank {
  font-size: 1.3rem;
  line-height: 1.2;
  min-width: 1.8rem;
  text-align: center;
}
.best-time-bar {
  height: 8px;
  background: var(--rr-bg-elevated, #2a2a2a);
  border-radius: 4px;
  overflow: hidden;
}
.best-time-bar-fill {
  height: 100%;
  background: var(--rr-accent);
  border-radius: 4px;
  transition: width 400ms ease;
}

/* Utility: opt a card out of the hover lift (for filter bars, tool rows) */
.card-flat:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--rr-border) !important;
}

/* Suppress ranked outlines while a combo is pinned (they become noise). */
#heatmap-wrap.has-pin .slot-ranked {
  outline: none;
}

/* ── Wizard: preset grid ── */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  background: var(--rr-bg-elevated);
  border: 2px solid var(--rr-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: left;
  color: var(--rr-text);
  position: relative;
  width: 100%;
}
.preset-btn:hover {
  border-color: var(--rr-accent-light);
  background: color-mix(in srgb, var(--rr-accent) 8%, var(--rr-bg-elevated));
}
.preset-btn.selected {
  border-color: var(--rr-accent);
  background: color-mix(in srgb, var(--rr-accent) 14%, var(--rr-bg-elevated));
  box-shadow: 0 0 0 3px rgba(124, 92, 191, 0.18);
}
.preset-btn.selected::after {
  content: '✓';
  position: absolute;
  top: 0.6rem; right: 0.75rem;
  font-size: 0.8rem;
  color: var(--rr-accent-light);
  font-weight: 700;
}
.preset-btn-name  { font-weight: 600; font-size: 0.9rem; line-height: 1.2; }
.preset-btn-roles { font-size: 0.75rem; color: var(--rr-text-muted); line-height: 1.4; }

/* ── Wizard: role tags ── */
.role-tag {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--rr-border);
  background: var(--rr-bg-elevated);
  color: var(--rr-text-muted);
}
.role-tag-tank   { background: rgba(30,100,200,0.2); border-color: rgba(80,140,255,0.4); color: #6eb0ff; }
.role-tag-healer { background: rgba(40,160,80,0.2);  border-color: rgba(60,200,100,0.4); color: #6be09a; }
.role-tag-dps    { background: rgba(180,50,50,0.2);  border-color: rgba(220,100,80,0.4); color: #f08080; }

/* ── Role picker (edit page): pills ── */
.role-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem; border-radius: 6px;
  border: 2px solid var(--rr-border);
  background: var(--rr-bg-elevated);
  color: var(--rr-text-muted);
  font-size: .82rem; font-weight: 600;
  cursor: pointer; user-select: none;
  transition: border-color .12s, background .12s, color .12s, transform .12s, box-shadow .12s;
  white-space: nowrap; touch-action: none;
}
.role-pill:hover:not(.selected) {
  border-color: var(--rr-accent-light);
  color: var(--rr-text);
}
.role-pill.tank    { --pill-color:#6eb0ff; --pill-bg:rgba(30,100,200,0.15);  --pill-border:rgba(80,140,255,0.45); }
.role-pill.healer  { --pill-color:#6be09a; --pill-bg:rgba(40,160,80,0.15);   --pill-border:rgba(60,200,100,0.45); }
.role-pill.dps     { --pill-color:#f08080; --pill-bg:rgba(180,50,50,0.15);   --pill-border:rgba(220,100,80,0.45); }
.role-pill.generic { --pill-color:var(--rr-accent-light); --pill-bg:rgba(124,92,191,0.15); --pill-border:rgba(160,126,212,0.45); }
.role-pill.selected {
  border-color: var(--pill-border);
  background: var(--pill-bg);
  color: var(--pill-color);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.role-pill.dragging { opacity: .35; transform: scale(.97); }
.role-pill.drag-over { transform: translateX(4px); box-shadow: -3px 0 0 var(--rr-accent); }

/* ── Role picker: rank badge inside selected pills ── */
.pill-rank {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--pill-color, var(--rr-accent-light));
  color: #0d1117; font-size: .65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
}

/* ── Role picker: zones ── */
.selected-zone {
  min-height: 44px;
  border: 1.5px dashed var(--rr-border);
  border-radius: 8px; padding: .5rem .6rem;
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  transition: border-color .15s, background .15s;
  position: relative;
}
.selected-zone.has-items {
  border-style: solid;
  border-color: color-mix(in srgb, var(--rr-accent) 30%, var(--rr-border));
  background: color-mix(in srgb, var(--rr-accent) 4%, var(--rr-bg-elevated));
}
.selected-zone.drag-active {
  border-color: var(--rr-accent);
  background: color-mix(in srgb, var(--rr-accent) 8%, var(--rr-bg-elevated));
}
.zone-hint {
  font-size: .75rem; color: var(--rr-text-muted); font-style: italic;
  pointer-events: none; position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  white-space: nowrap;
}
.unselected-zone {
  display: flex; flex-wrap: wrap; gap: .4rem;
  align-items: center; min-height: 36px;
}
.zone-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--rr-text-muted); margin-bottom: .4rem;
}
.role-hint {
  font-size: .72rem; color: var(--rr-text-muted);
  margin-top: .5rem; line-height: 1.5;
}

/* ── Wizard: role summary bar ── */
.role-summary-bar {
  background: var(--rr-bg-elevated);
  border: 1px solid var(--rr-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

/* ── Wizard: day toggles ── */
.day-toggle {
  width: 44px; height: 44px;
  border-radius: 8px;
  border: 2px solid var(--rr-border);
  background: var(--rr-bg-elevated);
  color: var(--rr-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.day-toggle:hover { border-color: var(--rr-accent-light); color: var(--rr-text); }
.day-toggle.selected {
  border-color: var(--rr-accent);
  background: color-mix(in srgb, var(--rr-accent) 18%, var(--rr-bg-elevated));
  color: #fff;
}

/* ── Wizard: toggle switch ── */
.toggle-switch {
  width: 36px; height: 20px;
  border-radius: 10px;
  background: var(--rr-border);
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-block;
}
.toggle-switch.on { background: var(--rr-accent); }
.toggle-knob {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px; left: 3px;
  transition: transform 0.15s;
  pointer-events: none;
}
.toggle-switch.on .toggle-knob { transform: translateX(16px); }

/* ── Wizard: step indicator ── */
.wizard-step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}
.wizard-step-pip {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.8rem; font-weight: 600;
  color: var(--rr-text-muted);
  letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}
.wizard-step-pip.active { color: var(--rr-text); }
.wizard-step-pip.done   { color: var(--rr-accent-light); }
.wizard-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--rr-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; flex-shrink: 0;
}
.wizard-step-pip.active .wizard-step-num { border-color: var(--rr-accent); background: var(--rr-accent); color: #fff; }
.wizard-step-pip.done   .wizard-step-num { border-color: var(--rr-accent-light); color: var(--rr-accent-light); }
.wizard-step-connector {
  flex: 1; height: 1px; background: var(--rr-border); margin: 0 0.75rem;
}

/* ── Tooltip ── */
.help-tooltip {
  position: relative;
  display: inline-flex; align-items: center;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.help-icon {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--rr-text-muted);
  color: var(--rr-text-muted);
  font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: default; line-height: 1;
  transition: border-color 0.12s, color 0.12s;
  user-select: none;
}
.help-tooltip:hover .help-icon { border-color: var(--rr-accent-light); color: var(--rr-accent-light); }
.help-bubble {
  position: absolute;
  bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: var(--rr-bg-elevated);
  border: 1px solid var(--rr-border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.775rem; color: var(--rr-text); line-height: 1.5;
  width: 240px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  pointer-events: none; opacity: 0;
  transition: opacity 0.12s;
  z-index: 100;
  font-weight: 400; text-transform: none; letter-spacing: normal;
}
.help-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--rr-border);
}
.help-bubble::before {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--rr-bg-elevated); z-index: 1;
}
.help-tooltip:hover .help-bubble { opacity: 1; }

/* ── Show page: outline-rr button ── */
.btn-outline-rr {
  --bs-btn-color:               var(--rr-accent-light);
  --bs-btn-border-color:        var(--rr-accent);
  --bs-btn-hover-color:         #fff;
  --bs-btn-hover-bg:            var(--rr-accent);
  --bs-btn-hover-border-color:  var(--rr-accent);
  --bs-btn-active-bg:           var(--rr-accent-dark);
  --bs-btn-active-border-color: var(--rr-accent-dark);
}
[data-theme="terminal"] .btn-outline-rr { --bs-btn-hover-color: #050505; }

/* ── Show page: day dashboard ── */
.day-grid { display: flex; gap: .5rem; flex-wrap: wrap; }
.day-tile {
  flex: 1;
  min-width: 80px;
  max-width: 140px;
  background: var(--rr-bg-elevated);
  border: 2px solid var(--rr-border);
  border-radius: 10px;
  padding: .7rem .75rem;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  text-align: left;
}
.day-tile:hover { border-color: var(--rr-accent-light); }
.day-tile.selected {
  border-color: var(--rr-accent);
  background: color-mix(in srgb, var(--rr-accent) 14%, var(--rr-bg-elevated));
  box-shadow: 0 0 0 3px rgba(124, 92, 191, 0.18);
}
.day-tile.empty { opacity: .45; cursor: default; pointer-events: none; }
.day-tile-name  { font-weight: 700; font-size: .95rem; margin-bottom: .25rem; }
.day-tile-count { font-size: .72rem; color: var(--rr-text-muted); margin-bottom: .35rem; }
.day-tile-bar   { height: 4px; background: var(--rr-border); border-radius: 2px; overflow: hidden; margin-bottom: .35rem; }
.day-tile-bar-fill { height: 100%; border-radius: 2px; transition: width .3s ease; }
.day-tile-time  { font-size: .7rem; color: var(--rr-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-tile-flex  { font-size: .7rem; color: var(--rr-gold); margin-top: .1rem; }
.day-tile-roles { display: flex; gap: .2rem; margin-top: .3rem; flex-wrap: wrap; }
.day-role-dot   { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ── Show page: Best Windows list ── */
.bw-list { overflow-y: auto; max-height: 380px; }
.bw-flex { font-size: .68rem; color: var(--rr-gold); font-weight: 600; white-space: nowrap; }
.bw-bench {
  font-size: .68rem; font-weight: 600; white-space: nowrap;
  color: var(--rr-text-muted);
  padding: .15rem .45rem; border-radius: 4px;
  background: color-mix(in srgb, var(--rr-text-muted) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--rr-text-muted) 25%, transparent);
  cursor: help;
}

/* Tiny "Sub" tag next to a participant's name when they're in the combo
   but benched (greedy role assignment left them over the roster need). */
.pr-sub-tag {
  display: inline-flex; align-items: center;
  padding: .05rem .4rem; border-radius: 4px;
  font-size: .6rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  background: color-mix(in srgb, var(--rr-text-muted) 18%, transparent);
  color: var(--rr-text-muted);
  border: 1px solid color-mix(in srgb, var(--rr-text-muted) 35%, transparent);
  vertical-align: middle;
}

.bw-role-badge { cursor: help; }
.bw-role-badge:focus-visible { outline: 2px solid var(--rr-accent); outline-offset: 1px; }

/* Declared role pills on participant rows (inside Participants list).
   Default: colored by role type. When a Best Windows role-coverage
   badge is hovered, non-matching pills get .p-role-muted → desaturated. */
.p-role-pill {
  display: inline-flex; align-items: center;
  padding: .1rem .6rem; border-radius: 999px;
  font-size: .7rem; font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  transition: background .12s, color .12s, border-color .12s, opacity .12s;
}
.p-role-pill.tank    { background: rgba(30,100,200,.15);  color: #6eb0ff; border-color: rgba(80,140,255,.4); }
.p-role-pill.healer  { background: rgba(40,160,80,.15);   color: #6be09a; border-color: rgba(60,200,100,.4); }
.p-role-pill.dps     { background: rgba(180,50,50,.15);   color: #f08080; border-color: rgba(220,100,80,.4); }
.p-role-pill.generic { background: rgba(124,92,191,.15);  color: var(--rr-accent-light); border-color: rgba(160,126,212,.4); }
/* Primary (their #1 preference) gets a subtle bump */
.p-role-pill.p-role-primary { box-shadow: 0 0 0 1px currentColor inset; }
/* Muted when a reverse-hover role filter is active */
.p-role-pill.p-role-muted {
  background: color-mix(in srgb, var(--rr-text-muted) 12%, transparent);
  color: var(--rr-text-muted);
  border-color: var(--rr-border);
  box-shadow: none;
  opacity: .55;
}

.bw-medal-num {
  font-size: .8rem; font-weight: 700; color: var(--rr-text-muted);
  min-width: 1.6rem; text-align: center; flex-shrink: 0; line-height: 1.2;
}

/* ── Show page: convert-to-static CTA ── */
.convert-cta {
  padding: .85rem 1rem;
  background: color-mix(in srgb, var(--rr-gold) 6%, var(--rr-bg-elevated));
  border-top: 2px solid color-mix(in srgb, var(--rr-gold) 35%, var(--rr-border));
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.convert-cta-text { font-size: .82rem; }
.convert-cta-text strong { color: var(--rr-gold-light); }
.convert-cta-text p { margin: .15rem 0 0; font-size: .75rem; color: var(--rr-text-muted); }

/* ── Show page: CTA banner ── */
.cta-banner {
  background: color-mix(in srgb, var(--rr-accent) 12%, var(--rr-bg-surface));
  border: 1px solid color-mix(in srgb, var(--rr-accent) 40%, var(--rr-border));
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.cta-banner h6 { margin: 0; font-weight: 700; font-size: .95rem; }
.cta-banner p  { margin: 0; font-size: .8rem; color: var(--rr-text-muted); }
.cta-name-row  { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .75rem; }

/* ── Wizard: fade-in ── */
.wizard-fade-in {
  animation: wizardFadeIn 0.18s ease;
}
@keyframes wizardFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Save Schedule (Iteration #2) ───────────────────────────── */

/* Sticky save-static footer (poll show page). Visible when a combo is
   pinned. Slides up from the bottom of the viewport. */
.save-static-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 1040;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.25rem;
  background: color-mix(in srgb, var(--rr-accent) 14%, var(--rr-bg-surface));
  border-top: 1px solid color-mix(in srgb, var(--rr-accent) 40%, var(--rr-border));
  backdrop-filter: blur(8px);
  transform: translateY(110%);
  transition: transform 200ms ease-out;
}
.save-static-footer.is-visible { transform: translateY(0); }
.save-static-footer-summary { min-width: 0; }
.save-static-footer-line {
  font-weight: 700; font-size: .88rem;
  display: flex; align-items: center; gap: .35rem;
  color: var(--rr-text);
}
.save-static-footer-line i { color: var(--rr-accent-light); }
.save-static-footer-meta {
  font-size: .72rem; color: var(--rr-text-muted); margin-top: .1rem;
}
@media (max-width: 768px) {
  .save-static-footer { flex-direction: column; align-items: stretch; gap: .5rem; padding: .75rem; }
  .save-static-footer .btn-rr-gold { width: 100%; justify-content: center; }
}

/* Gold pill button used by save footer + locked banner CTA. */
.btn-rr-gold {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--rr-gold); color: #0d1117;
  border: 1px solid var(--rr-gold);
  font-weight: 700;
  border-radius: 8px;
  padding: .5rem 1rem;
  white-space: nowrap;
  transition: filter 120ms ease, transform 120ms ease;
}
.btn-rr-gold:hover { filter: brightness(1.06); color: #0d1117; }
.btn-rr-gold:active { transform: translateY(1px); }
.btn-rr-gold:disabled,
.btn-rr-gold[aria-disabled="true"] {
  filter: grayscale(0.5) brightness(0.85);
  cursor: not-allowed; pointer-events: none;
}

/* ── Banner family ─────────────────────────────────────────────
 * Three sibling banners share a visual lineage and gate the user
 * through the save / re-poll lifecycle. When adjusting one, consider
 * the family:
 *   .locked-static-banner    — gold gradient on a locked poll's show
 *   .repoll-banner           — accent tone on a child poll's show
 *   .static-success-banner   — green tone on /my/events/:id?from=save
 * Shared base reduces duplicate radius/padding/border declarations.
 */
.locked-static-banner,
.repoll-banner,
.static-success-banner {
  border-radius: 10px;
  border: 1px solid var(--rr-border);
}

/* Locked-poll banner above show page when poll.locked_at is set. */
.locked-static-banner {
  position: relative;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--rr-gold) 10%, var(--rr-bg-surface)),
    color-mix(in srgb, var(--rr-accent) 8%, var(--rr-bg-surface)));
  border-color: color-mix(in srgb, var(--rr-gold) 40%, var(--rr-border));
  padding: 1rem 1.25rem;
  overflow: hidden;
}
.locked-static-banner-shimmer {
  position: absolute; top: 0; right: 0; width: 120px; height: 100%;
  background: linear-gradient(90deg, transparent,
    color-mix(in srgb, var(--rr-gold) 6%, transparent));
  pointer-events: none;
}
.locked-static-banner-row {
  display: flex; align-items: flex-start; gap: .75rem; flex-wrap: nowrap;
  position: relative; /* sit above shimmer */
}
.locked-static-banner-icon {
  font-size: 1.6rem; line-height: 1; flex-shrink: 0;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--rr-gold) 18%, var(--rr-bg-elevated));
  border: 1px solid color-mix(in srgb, var(--rr-gold) 35%, var(--rr-border));
}
.locked-static-banner-title {
  font-weight: 800; font-size: 1rem;
  color: var(--rr-gold-light, var(--rr-gold));
  letter-spacing: -.01em;
}
.locked-static-banner-subtitle {
  font-size: .78rem; color: var(--rr-text-muted);
  margin-top: .2rem; line-height: 1.5;
}
.locked-static-banner-link {
  color: var(--rr-accent-light); text-decoration: none; font-weight: 600;
}
.locked-static-banner-link:hover { text-decoration: underline; }
.locked-static-banner-tags {
  display: flex; gap: .35rem; margin-top: .45rem; flex-wrap: wrap;
}
.locked-static-banner-cta { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 768px) {
  .locked-static-banner-row { flex-wrap: wrap; }
  .locked-static-banner-cta { width: 100%; justify-content: center; margin-top: .5rem; }
}

/* "This poll was re-run" footer inside the locked banner. */
.superseded-footer {
  margin-top: .75rem;
  padding: .5rem .75rem;
  font-size: .78rem;
  color: var(--rr-text-muted);
  background: color-mix(in srgb, var(--rr-accent) 6%, var(--rr-bg-elevated));
  border: 1px solid color-mix(in srgb, var(--rr-accent) 25%, var(--rr-border));
  border-radius: 8px;
}
.superseded-footer a {
  color: var(--rr-accent-light);
  font-weight: 600;
  text-decoration: none;
}
.superseded-footer a:hover { text-decoration: underline; }

/* Owner-only seeded-roster card on a re-poll. */
.seeded-roster-card .seeded-roster-list {
  list-style: none; margin: 0; padding: 0;
}
.seeded-roster-row {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .85rem;
  border-top: 1px solid var(--rr-border);
}
.seeded-roster-row:first-child { border-top: 0; }
.seeded-roster-avatar {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--rr-accent) 22%, var(--rr-bg-elevated));
  border: 1px solid var(--rr-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem;
  color: var(--rr-accent-light);
}
.seeded-roster-name { font-weight: 600; font-size: .9rem; }
.seeded-roster-role { font-size: .72rem; color: var(--rr-text-muted); }
.seeded-copy-one { font-size: .75rem; }

/* Quiet decline + block row beneath the gold claim button. */
.invite-aside {
  margin-top: .65rem;
  text-align: center;
  font-size: .8rem;
}
.invite-aside .btn-link { font-size: .8rem; padding: .15rem .35rem; }

/* Hint shown above the role picker on a seeded /p/<token> page. */
.reseed-role-note {
  font-size: .75rem;
  line-height: 1.45;
  color: var(--rr-text-muted);
  background: color-mix(in srgb, var(--rr-accent) 8%, var(--rr-bg-elevated));
  border: 1px solid color-mix(in srgb, var(--rr-accent) 25%, var(--rr-border));
  border-radius: 8px;
  padding: .5rem .65rem;
  margin-bottom: .55rem;
}

/* "Re-poll for X" banner shown on a child poll's show page. */
.repoll-banner {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem;
  background: color-mix(in srgb, var(--rr-accent) 10%, var(--rr-bg-surface));
  border-color: color-mix(in srgb, var(--rr-accent) 35%, var(--rr-border));
}
.repoll-banner-icon {
  font-size: 1.4rem; line-height: 1; color: var(--rr-accent-light);
  flex-shrink: 0;
}
.repoll-banner-title {
  font-weight: 700; color: var(--rr-text);
  letter-spacing: -.01em;
}
.repoll-banner-subtitle {
  font-size: .8rem; color: var(--rr-text-muted); margin-top: .1rem;
}
@media (max-width: 768px) {
  .repoll-banner { flex-wrap: wrap; }
  .repoll-banner > a { width: 100%; justify-content: center; }
}

/* Footer note inside Best Windows card when poll is locked. */
.locked-bw-footer {
  padding: .75rem 1rem;
  background: var(--rr-bg-elevated);
  border-top: 1px solid var(--rr-border);
  font-size: .72rem; color: var(--rr-text-muted);
  display: flex; align-items: center; gap: .3rem;
}

.locked-dimmed { opacity: .6; pointer-events: none; }

/* Generic chip-style tag, used by locked banner + locked Best Windows
   card header. */
.tag {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .7rem; font-weight: 600;
  padding: .15rem .55rem; border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag i { font-size: .85em; }
.tag-gold {
  background: color-mix(in srgb, var(--rr-gold) 14%, transparent);
  color: var(--rr-gold-light, var(--rr-gold));
  border-color: color-mix(in srgb, var(--rr-gold) 35%, transparent);
}
.tag-green {
  background: color-mix(in srgb, var(--rr-green, #28a745) 14%, transparent);
  color: var(--rr-green-lt, #6be09a);
  border-color: color-mix(in srgb, var(--rr-green, #28a745) 35%, transparent);
}
.tag-muted {
  background: color-mix(in srgb, var(--rr-text-muted) 14%, transparent);
  color: var(--rr-text-muted);
  border-color: color-mix(in srgb, var(--rr-text-muted) 30%, transparent);
}

/* Login modal — overlay shown when an anonymous viewer clicks Save. */
.login-modal-overlay {
  position: fixed; inset: 0; z-index: 1050;
  background: rgba(13, 17, 23, .75);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.login-modal-overlay[hidden] { display: none; }
body.login-modal-open { overflow: hidden; }
.login-modal {
  background: var(--rr-bg-surface);
  border: 1px solid var(--rr-border);
  border-radius: 12px;
  width: 100%; max-width: 380px;
  padding: 1.5rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}
.login-modal-handle { display: none; }
.login-modal-header { text-align: center; margin-bottom: 1.25rem; }
.login-modal-icon { font-size: 1.5rem; margin-bottom: .35rem; }
.login-modal-title { font-weight: 800; font-size: 1rem; margin-bottom: .25rem; }
.login-modal-subtitle { font-size: .78rem; color: var(--rr-text-muted); line-height: 1.5; }
.login-modal-buttons { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.btn-login-modal {
  display: flex; align-items: center; justify-content: center;
  gap: .6rem;
  padding: .65rem 1rem;
  border-radius: 8px;
  font-weight: 600; font-size: .85rem;
  text-decoration: none;
  border: 1px solid var(--rr-border);
  transition: filter 120ms ease;
}
.btn-login-modal:hover { filter: brightness(1.08); }
.btn-login-discord { background: #5865F2; color: #fff; border-color: #5865F2; }
.btn-login-discord:hover { color: #fff; }
.btn-login-email { background: var(--rr-bg-elevated); color: var(--rr-text); }
.btn-login-email:hover { color: var(--rr-text); }
.login-modal-footer {
  font-size: .68rem; color: var(--rr-text-muted);
  text-align: center; margin-bottom: .75rem;
}
.login-modal-cancel {
  display: block; margin: 0 auto;
  background: transparent; border: 0;
  color: var(--rr-text-muted); font-size: .8rem;
  cursor: pointer;
}
.login-modal-cancel:hover { color: var(--rr-text); }
@media (max-width: 768px) {
  .login-modal-overlay { align-items: flex-end; padding: 0; }
  .login-modal { max-width: 100%; border-radius: 14px 14px 0 0; }
  .login-modal-handle {
    display: block;
    width: 36px; height: 4px; border-radius: 2px;
    background: var(--rr-border);
    margin: -.5rem auto .75rem;
  }
}

/* ── Roster interstitial (steps 1 + 2) ───────────────────────── */
.roster-shell {
  max-width: 560px; margin: 2.5rem auto; padding: 0 1rem;
}
.roster-shell-wide { max-width: 720px; }
.roster-card {
  background: var(--rr-bg-surface);
  border: 1px solid var(--rr-border);
  border-radius: 12px;
  padding: 1.25rem;
}
.roster-steps {
  display: flex; align-items: center; gap: .35rem;
  font-size: .68rem; color: var(--rr-text-muted);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 1rem;
}
.roster-step.is-active { color: var(--rr-accent-light); font-weight: 700; }
.roster-step-sep { color: var(--rr-border); }
.roster-h2 { font-weight: 700; font-size: 1.05rem; margin-bottom: .35rem; }
.roster-sub { font-size: .78rem; color: var(--rr-text-muted); margin-bottom: 1.1rem; }

.roster-option {
  display: flex; align-items: center; gap: .85rem;
  border-radius: 10px;
  border: 1.5px solid var(--rr-border);
  padding: .75rem 1rem;
  cursor: pointer;
  margin-bottom: .5rem;
  transition: border-color 120ms ease, background 120ms ease;
}
.roster-option input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--rr-border);
  position: relative; flex-shrink: 0;
  margin: 0;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.roster-option input[type="radio"]:checked {
  border-color: var(--rr-accent);
  background: var(--rr-accent);
  box-shadow: inset 0 0 0 3px var(--rr-bg-surface);
}
.roster-option:has(input:checked) {
  border-color: var(--rr-accent);
  background: color-mix(in srgb, var(--rr-accent) 12%, var(--rr-bg-surface));
}
.roster-option-icon {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  color: var(--rr-accent-light);
  flex-shrink: 0;
}
.roster-option-body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.roster-option-label { font-weight: 600; font-size: .88rem; }
.roster-option-sub { font-size: .72rem; color: var(--rr-text-muted); }

.tag-accent {
  background: color-mix(in srgb, var(--rr-accent) 14%, transparent);
  color: var(--rr-accent-light);
  border: 1px solid color-mix(in srgb, var(--rr-accent) 40%, transparent);
  font-size: .6rem; padding: .08rem .4rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
  vertical-align: middle;
}

.btn-rr-accent {
  background: var(--rr-accent); color: #fff;
  border: 1px solid var(--rr-accent);
  font-weight: 600;
  border-radius: 8px;
  padding: .5rem 1rem;
}
.btn-rr-accent:hover { background: var(--rr-accent-light); border-color: var(--rr-accent-light); color: #fff; }

.roster-actions {
  display: flex; gap: .5rem; margin-top: 1rem;
}
.roster-back { flex: 1; }
.roster-actions .btn-rr-accent,
.roster-actions .btn-rr-gold { flex: 2; }

/* Step 2 — buckets */
.roster-bucket {
  border: 1px solid var(--rr-border);
  border-radius: 10px;
  padding: .85rem 1rem;
  margin-bottom: .75rem;
  background: var(--rr-bg-elevated);
}
.roster-bucket-header {
  display: flex; align-items: center; gap: .35rem;
  font-size: .82rem; margin-bottom: .5rem;
}
.roster-bucket-header i { font-size: 1rem; }
.roster-bucket-header strong { font-weight: 700; }
.roster-bucket-header .bucket-count { font-size: .75rem; color: var(--rr-text-muted); }
.roster-bucket[data-bucket="noinvite"] .roster-list:empty + * ,
.roster-bucket[data-bucket="noinvite"]:has(.roster-list:empty) { opacity: .55; }

.roster-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.roster-row {
  display: flex; align-items: center; gap: .65rem;
  padding: .35rem .5rem;
  border-radius: 6px;
  background: var(--rr-bg-surface);
}
.roster-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: color-mix(in srgb, var(--rr-accent) 25%, var(--rr-bg-elevated));
  color: var(--rr-text);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700;
  flex-shrink: 0;
}
.roster-name { font-size: .82rem; font-weight: 600; }
.roster-role-hint { font-size: .68rem; color: var(--rr-text-muted); }
.roster-actions-inline { display: flex; gap: .35rem; flex-wrap: wrap; }
.btn-roster-action {
  background: transparent;
  border: 1px solid var(--rr-border);
  border-radius: 6px;
  padding: .15rem .55rem;
  font-size: .68rem;
  color: var(--rr-text-muted);
  cursor: pointer;
}
.btn-roster-action:hover { border-color: var(--rr-accent); color: var(--rr-text); }
.btn-roster-action.is-accent { color: var(--rr-accent-light); border-color: color-mix(in srgb, var(--rr-accent) 35%, var(--rr-border)); }
.btn-roster-action.is-danger { color: #f08080; border-color: color-mix(in srgb, #f08080 35%, var(--rr-border)); }

/* Event landing — success banner + next-session card.
 * Member of the .locked-static-banner / .repoll-banner family. */
.static-success-banner {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  background: color-mix(in srgb, var(--rr-green, #28a745) 12%, var(--rr-bg-surface));
  border-color: color-mix(in srgb, var(--rr-green, #28a745) 40%, var(--rr-border));
}
.static-success-emoji { font-size: 1.4rem; line-height: 1; }
.static-success-title { font-weight: 800; font-size: .95rem; color: var(--rr-green-lt, #6be09a); }
.static-success-sub { font-size: .78rem; color: var(--rr-text-muted); margin-top: .15rem; }

.next-session-tile {
  width: 64px; height: 64px;
  border-radius: 10px;
  background: var(--rr-bg-elevated);
  border: 1px solid var(--rr-border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.next-session-tile-day {
  font-size: .65rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--rr-text-muted);
}
.next-session-tile-num { font-weight: 800; font-size: 1.6rem; line-height: 1; }
.next-session-tile-month { font-size: .65rem; color: var(--rr-text-muted); }

/* Invite claim flow (/invite/:token) */
.invite-shell {
  max-width: 360px; margin: 4rem auto; padding: 0 1rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.invite-card {
  background: var(--rr-bg-surface);
  border: 1px solid var(--rr-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}
.invite-card-icon { font-size: 2rem; margin-bottom: .35rem; }
.invite-card-title { font-weight: 800; font-size: 1.05rem; margin-bottom: .35rem; }
.invite-card-sub { font-size: .8rem; color: var(--rr-text-muted); line-height: 1.55; margin-bottom: 1rem; }
.invite-schedule-block {
  text-align: left;
  background: var(--rr-bg-elevated);
  border: 1px solid var(--rr-border);
  border-radius: 8px;
  padding: .75rem 1rem;
  margin-bottom: .85rem;
}
.invite-schedule-line { font-weight: 600; font-size: .85rem; }
.invite-schedule-sub { font-size: .72rem; color: var(--rr-text-muted); margin-top: .15rem; }
.invite-role-line {
  text-align: left;
  font-size: .78rem; color: var(--rr-text);
  margin-bottom: .85rem;
}
.invite-role-line strong { margin: 0 .25rem; }

.invite-nudge-card {
  border-radius: 10px;
  padding: 1rem;
  background: color-mix(in srgb, var(--rr-accent) 8%, var(--rr-bg-surface));
  border: 1px solid color-mix(in srgb, var(--rr-accent) 25%, var(--rr-border));
}
.invite-nudge-body { font-size: .73rem; color: var(--rr-text-muted); margin-bottom: .85rem; }
.invite-nudge-buttons { display: flex; gap: .5rem; margin-bottom: .65rem; }
.invite-nudge-buttons .btn-login-modal { flex: 1; }
.invite-skip-link {
  display: block; margin: 0 auto;
  background: transparent; border: 0;
  color: var(--rr-text-muted); font-size: .72rem;
  cursor: pointer;
}
.invite-skip-link:hover { color: var(--rr-text); }

/* ── Inline-style consolidation ────────────────────────────────
   Utility classes to replace style="..." attrs across views, so
   we can drop 'unsafe-inline' from CSP style-src.
   Bootstrap utilities used directly where they exist (d-none,
   w-auto, fw-semibold). Custom rr-* classes here for the rest. */

/* Container widths */
.rr-mw-1100 { max-width: 1100px; }
.rr-mw-960  { max-width: 960px; }
.rr-mw-800  { max-width: 800px; }
.rr-mw-720  { max-width: 720px; }
.rr-mw-680  { max-width: 680px; }
.rr-mw-520  { max-width: 520px; }
.rr-mw-300  { max-width: 300px; }
.rr-mw-280  { max-width: 280px; }
.rr-mw-240  { max-width: 240px; }
.rr-mw-220  { max-width: 220px; }
.rr-mw-200  { max-width: 200px; }
.rr-mw-160  { max-width: 160px; }
.rr-mw-110  { max-width: 110px; }
.rr-mw-flex-220 { max-width: 220px; flex: 0 0 220px; }
.rr-mw-flex-200 { max-width: 200px; flex: 0 0 200px; }
.rr-w-170 { width: 170px; }
.rr-w-110 { width: 110px; }
.rr-w-65  { width: 65px; }
.rr-min-w-170 { min-width: 170px; }
.rr-min-w-60  { min-width: 60px; }

/* Page-narrow shell (claim/auth pages) */
.rr-page-narrow {
  max-width: 600px;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

/* Type scale */
.rr-fs-65   { font-size: 0.65rem; }
.rr-fs-65em { font-size: 0.65em;  }
.rr-fs-7    { font-size: 0.7rem;  }
.rr-fs-7em  { font-size: 0.7em;   }
.rr-fs-72   { font-size: 0.72rem; }
.rr-fs-75   { font-size: 0.75rem; }
.rr-fs-75em { font-size: 0.75em;  }
.rr-fs-78   { font-size: 0.78rem; }
.rr-fs-8    { font-size: 0.8rem;  }
.rr-fs-82   { font-size: 0.82rem; }
.rr-fs-875  { font-size: 0.875rem; }
.rr-fs-95   { font-size: 0.95rem; }
.rr-fs-1    { font-size: 1rem;    }
.rr-fs-11   { font-size: 1.1rem;  }
.rr-fs-125  { font-size: 1.25rem; }

.rr-cursor-pointer { cursor: pointer; }
.rr-fw-semibold    { font-weight: 600; }
.rr-fw-tight {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.rr-letter-07      { letter-spacing: .07em; }
.rr-letter-15-caps {
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.rr-mt-12      { margin-top: 0.75rem; }
.rr-mt-65      { margin-top: 0.65rem; }
.rr-pre-wrap   { white-space: pre-wrap; }
.rr-nowrap     { white-space: nowrap; }
.rr-grid-full  { grid-column: 1 / -1; }
.rr-resize-vertical    { resize: vertical; }
.rr-form-resize-vertical { font-size: 0.875rem; resize: vertical; }
.rr-overflow-flex { overflow-y: auto; flex: 1; }

/* Color helpers tied to design tokens */
.rr-text-accent      { color: var(--rr-accent-light); }
.rr-text-accent-1    { color: var(--rr-accent-light); font-size: 1rem; }
.rr-text-gold        { color: var(--rr-gold-light); }
.rr-text-muted-11    { color: var(--rr-text-muted); font-size: 1.1rem; line-height: 1; }
.rr-text-muted-78    { font-size: 0.78rem; color: var(--rr-text-muted); }
.rr-text-muted-82    { font-size: 0.82rem; color: var(--rr-text-muted); }
.rr-error-text       { color: #f08080; }

/* Borders + dividers */
.rr-divider {
  border-color: var(--rr-border);
  margin: 1.5rem 0;
}
.rr-border-dashed { border-style: dashed; }
.rr-border-bottom { border-bottom: 1px solid var(--rr-border); }
.rr-border-top    { border-top:    1px solid var(--rr-border); }

/* Token / share-link display */
.rr-token-display { word-break: break-all; font-size: 0.75rem; }

/* Caps mini-label (form-section heading) */
.rr-caps-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rr-text-muted);
}

/* Underlined accent link */
.rr-link-underline {
  color: var(--rr-accent-light);
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rr-link-underline-nowrap {
  color: var(--rr-accent-light);
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* Collapsible scroller */
.rr-scroller-240 { max-height: 240px; overflow-y: auto; }

/* Elevated card (used in CTAs, etc.) */
.rr-elevated-card {
  background: var(--rr-bg-elevated);
  border: 1px solid var(--rr-border);
  border-radius: 10px;
}

/* Generic modal-overlay (admin reports, etc.) */
.rr-modal-overlay {
  display: flex;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1050;
  align-items: center;
  justify-content: center;
}
.rr-modal-card {
  background: var(--rr-bg-surface);
  border: 1px solid var(--rr-border);
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

/* Day-tile role-coverage dots (state via class, not inline color) */
.day-role-dot.is-met   { background: #28a745; }
.day-role-dot.is-unmet { background: #9b3454; }

/* Best-Windows medal emoji span */
.bw-medal-emoji {
  font-size: 1.25rem;
  line-height: 1.2;
  min-width: 1.8rem;
  text-align: center;
  flex-shrink: 0;
}

/* List item with explicit no-bullet (drag rows etc.) */
.rr-list-none { list-style: none; }

/* ── Site footer ─────────────────────────────────────────────── */
.site-footer {
  margin-top: 3rem;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--rr-border);
}
.site-footer a { color: var(--rr-text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--rr-text); text-decoration: underline; }

/* ── Microsoft button ─────────────────────────────────────────
   Microsoft brand guidelines suggest solid black or white tile
   with the 4-color logo glyph. We use bi-microsoft (single glyph)
   so neutral dark-gray + white text is the closest acceptable
   match without the logo asset. */
.btn-microsoft {
  --bs-btn-color:              #fff;
  --bs-btn-bg:                 #2f2f2f;
  --bs-btn-border-color:       #2f2f2f;
  --bs-btn-hover-color:        #fff;
  --bs-btn-hover-bg:           #1f1f1f;
  --bs-btn-hover-border-color: #1f1f1f;
}
.btn-microsoft:hover,
.btn-microsoft:focus { color: #fff; }

/* ── Google button ────────────────────────────────────────────
   Google brand allows a solid color or white-card variant. Solid
   #4285F4 with white text is acceptable; the strict variant needs
   the multi-color G logo asset. Use this for now; revisit once we
   add SVG-asset infrastructure. */
.btn-google {
  --bs-btn-color:              #fff;
  --bs-btn-bg:                 #4285F4;
  --bs-btn-border-color:       #4285F4;
  --bs-btn-hover-color:        #fff;
  --bs-btn-hover-bg:           #357ae8;
  --bs-btn-hover-border-color: #357ae8;
}
.btn-google:hover,
.btn-google:focus { color: #fff; }
