
:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --green: #4ade80;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
.page-shell { position: relative; min-height: 100vh; }
.page-container { max-width: 1200px; margin: 0 auto; padding: 32px 16px 72px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding: 28px; border-radius: var(--radius-xl); background: linear-gradient(135deg, var(--dark), #334155); color: white; box-shadow: var(--shadow); margin-bottom: 28px; }
.hero-copy h1 { margin: 0 0 10px; font-size: 2.25rem; line-height: 1.1; }
.hero-text { max-width: 760px; color: #dbeafe; line-height: 1.5; margin: 0; }
.hero-badge, .hero-date, .admin-label { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 12px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.hero-badge, .hero-date { background: rgba(255,255,255,0.12); color: white; }
.hero-badge { margin-bottom: 12px; }
.hero-date { margin-top: 14px; letter-spacing: 0; text-transform: none; font-size: 14px; }
.admin-label { background: #e2e8f0; color: #475569; margin-bottom: 12px; }
.hero-nav, .mode-row, .button-row, .lookup-row, .section-header { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-nav { align-items: flex-start; }
.section-header { justify-content: space-between; align-items: center; margin-bottom: 16px; }
button { cursor: pointer; font-family: inherit; }
.nav-btn, .generate-btn, .primary-btn, .secondary-btn, .mode-btn { border: 0; border-radius: 16px; padding: 12px 16px; font-weight: 700; transition: 0.18s ease; }
.nav-btn { background: rgba(255,255,255,0.12); color: white; }
.nav-btn.active { background: white; color: var(--dark); }
.generate-btn { background: var(--green); color: #052e16; }
.primary-btn { background: var(--dark); color: white; }
.secondary-btn { background: #e2e8f0; color: #334155; }
.mode-btn { background: #f1f5f9; color: #334155; }
.mode-btn.active { background: var(--dark); color: white; }
.stats-grid, .content-grid { display: grid; gap: 16px; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 24px; }
.content-grid { grid-template-columns: 1.1fr 0.9fr; }
.card { background: var(--card); border-radius: var(--radius-xl); padding: 24px; box-shadow: var(--shadow); border: 1px solid rgba(15, 23, 42, 0.05); }
.narrow-card { max-width: 760px; margin: 0 auto; }
.stack { display: grid; gap: 16px; }
.small-gap { gap: 12px; }
.rules-grid { display: grid; gap: 12px; margin-top: 16px; }
.rule-item, .member-card, .assignment-card, .team-card, .person-card, .match-card { border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.member-card { background: #f8fafc; padding: 10px 12px; }
label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
input { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; font-size: 16px; outline: none; }
input:focus { border-color: #94a3b8; }
.help-text, .subtle { color: var(--muted); font-size: 13px; line-height: 1.45; }
.panel { border: 1px solid var(--line); background: #f8fafc; border-radius: 20px; padding: 16px; }
.panel-title { font-weight: 700; margin-bottom: 12px; }
.potluck-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.potluck-btn { border: 1px solid var(--line); background: white; color: #334155; border-radius: 16px; padding: 12px 14px; font-weight: 700; }
.potluck-btn.active { background: var(--dark); color: white; border-color: var(--dark); }
.potluck-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.spacer-top { margin-top: 16px; }
.message { border-radius: 18px; padding: 14px 16px; margin-bottom: 18px; font-size: 14px; }
.message.error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.message.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.lookup-row input { flex: 1; }
.lookup-result { margin-top: 18px; border: 1px solid var(--line); background: #f8fafc; border-radius: 18px; padding: 18px; }
.result-row { margin-bottom: 10px; }
.result-row:last-child { margin-bottom: 0; }
.team-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.remove-btn { border: 0; background: #e2e8f0; color: #334155; border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.stat-card { background: white; border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow); }
.stat-label { color: var(--muted); font-size: 14px; }
.stat-value { font-size: 32px; font-weight: 700; margin-top: 6px; }
.stat-subtext { color: var(--muted); font-size: 12px; margin-top: 6px; }
.bracket-grid { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 8px; }
.round-col { min-width: 260px; }
.round-title { background: var(--dark); color: white; border-radius: 14px; padding: 10px 14px; font-weight: 700; margin-bottom: 12px; }
.match-num { color: var(--muted); text-transform: uppercase; font-size: 12px; margin-bottom: 10px; }
.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }
.admin-gear { position: absolute; left: 20px; bottom: 20px; z-index: 50; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 0; border-radius: 999px; background: var(--dark); color: white; font-size: 20px; box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .button-row, .lookup-row, .section-header { flex-direction: column; align-items: stretch; }
}
