:root {
  --cream-50: #fffdf8;
  --cream-100: #faf4e9;
  --cream-200: #f2e7d7;
  --pink-50: #fff1f6;
  --pink-100: #fce1ec;
  --pink-300: #ec91b4;
  --pink-500: #d85f8b;
  --pink-700: #b83f73;
  --pink-900: #7b294e;
  --green-50: #eef6f0;
  --green-100: #deece2;
  --green-500: #557e64;
  --green-700: #3d624b;
  --green-900: #294535;
  --gold-100: #faefd2;
  --gold-500: #d7a640;
  --gold-800: #845d16;
  --ink: #2e2a27;
  --muted: #756d65;
  --white: #ffffff;
  --border: #e9dfd1;
  --danger: #ad4d55;
  --shadow-soft: 0 12px 30px rgba(72, 49, 30, .08);
  --shadow-card: 0 18px 46px rgba(72, 49, 30, .11);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream-100);
  font-family: "Inter", sans-serif;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

.eyebrow,
.card-kicker {
  margin: 0 0 8px;
  color: var(--pink-700);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin-top: 0;
  color: var(--green-900);
  font-family: "Baloo 2", sans-serif;
}
h1 { font-size: clamp(48px, 7vw, 86px); line-height: .93; letter-spacing: -.035em; }
h2 { margin-bottom: 8px; font-size: 29px; line-height: 1.05; }
h3 { margin-bottom: 6px; font-size: 21px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 11px 17px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary {
  color: var(--white);
  background: linear-gradient(145deg, var(--pink-500), var(--pink-700));
  box-shadow: 0 10px 22px rgba(184, 63, 115, .22);
}
.button-secondary {
  color: var(--green-900);
  border-color: var(--border);
  background: rgba(255,255,255,.82);
}
.button-large { padding: 14px 21px; }
.button-full { width: 100%; margin-top: 14px; }

/* LANDING */
.landing {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 9%, rgba(236,145,180,.24), transparent 26%),
    radial-gradient(circle at 8% 32%, rgba(85,126,100,.12), transparent 27%),
    linear-gradient(165deg, #fffdf8 0%, #f7efe2 58%, #fbeaf1 100%);
}

.landing-header {
  position: relative;
  z-index: 10;
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px clamp(18px, 4vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-brand,
.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.landing-brand img { width: 68px; height: 68px; border-radius: 18px; object-fit: cover; box-shadow: var(--shadow-soft); }
.landing-brand strong,
.landing-brand small,
.portal-brand strong,
.portal-brand small { display: block; }
.landing-brand strong,
.portal-brand strong { color: var(--pink-900); font: 800 25px/1 "Baloo 2"; }
.landing-brand small,
.portal-brand small { margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: .19em; }

.landing-nav { display: flex; align-items: center; gap: 24px; }
.landing-nav a { color: var(--green-900); font-weight: 700; font-size: 14px; }

.hero {
  position: relative;
  max-width: 1320px;
  min-height: 680px;
  margin: 0 auto;
  padding: clamp(55px, 8vw, 110px) clamp(18px, 4vw, 52px);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 70px;
  align-items: center;
}

.hero h1 { margin-bottom: 25px; color: var(--green-900); }
.hero-lead { max-width: 650px; margin: 0 0 30px; color: var(--muted); font-size: clamp(18px, 2vw, 22px); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.hero-notes span { padding: 8px 11px; border: 1px solid rgba(184,63,115,.16); border-radius: 999px; color: var(--pink-900); background: rgba(255,255,255,.65); font-size: 12px; font-weight: 700; }

.hero-visual { position: relative; min-height: 510px; display: grid; place-items: center; }
.logo-stage { position: relative; width: min(460px, 92%); }
.logo-stage img {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 42px;
  box-shadow: 0 35px 80px rgba(79, 49, 27, .22);
  transform: rotate(1.5deg);
}
.logo-glow { position: absolute; inset: -30px; z-index: 1; border-radius: 50%; background: radial-gradient(circle, rgba(236,145,180,.42), transparent 68%); filter: blur(15px); }

.floating-card {
  position: absolute;
  z-index: 3;
  width: 175px;
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  background: rgba(255,253,248,.91);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}
.floating-card strong, .floating-card span { display: block; }
.floating-card strong { color: var(--pink-900); font: 800 22px/1 "Baloo 2"; }
.floating-card span { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.floating-card-one { left: 0; top: 85px; }
.floating-card-two { right: -5px; bottom: 75px; }

.public-section { padding: 95px clamp(18px, 6vw, 90px); }
.public-section-tint { background: rgba(216,95,139,.07); border-top: 1px solid rgba(184,63,115,.08); border-bottom: 1px solid rgba(184,63,115,.08); }
.section-heading { max-width: 830px; margin: 0 auto 42px; text-align: center; }
.section-heading h2 { font-size: clamp(38px, 5vw, 62px); }
.section-heading > p:last-child { color: var(--muted); font-size: 17px; line-height: 1.7; }

.public-card-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.public-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,253,248,.88);
  box-shadow: var(--shadow-soft);
}
.public-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--white); background: var(--pink-500); font-weight: 800; }
.public-card h3 { margin-top: 18px; }
.public-card p { margin-bottom: 0; color: var(--muted); line-height: 1.65; }

.rules-panel {
  max-width: 1080px;
  margin: 0 auto;
  padding: 35px;
  display: grid;
  grid-template-columns: auto 1fr .7fr;
  gap: 28px;
  align-items: center;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.rule-number { color: var(--pink-700); font: 800 72px/1 "Baloo 2"; }
.rule-copy p { margin: 0; color: var(--muted); line-height: 1.7; }
.rule-note { padding: 20px; border-radius: 18px; color: var(--green-900); background: var(--green-50); }
.rule-note strong, .rule-note span { display: block; }
.rule-note span { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.5; }

.join-panel {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 56px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 35px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  box-shadow: var(--shadow-card);
}
.join-panel h2 { color: var(--white); font-size: clamp(38px, 5vw, 58px); }
.join-panel p { max-width: 690px; margin-bottom: 0; color: rgba(255,255,255,.72); line-height: 1.7; }

.public-footer {
  padding: 35px clamp(18px, 6vw, 90px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 35px;
  align-items: center;
  color: rgba(255,255,255,.7);
  background: #223b2d;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 55px; height: 55px; border-radius: 14px; object-fit: cover; }
.footer-brand strong, .footer-brand span { display: block; }
.footer-brand strong { color: var(--white); }
.footer-brand span { margin-top: 4px; font-size: 11px; }
.public-footer p { margin: 0; font-size: 11px; line-height: 1.6; }

/* PORTAL */
.portal { min-height: 100vh; background: linear-gradient(160deg, #faf6ee, #f2eadf); }
.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 78px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,253,248,.96);
  backdrop-filter: blur(15px);
}
.portal-brand img { width: 57px; height: 57px; border-radius: 16px; object-fit: cover; box-shadow: var(--shadow-soft); }
.portal-actions { display: flex; align-items: center; gap: 9px; }
.role-switch, .profile-chip, .icon-button {
  border: 1px solid var(--border);
  background: var(--white);
}
.role-switch { padding: 10px 13px; border-radius: 13px; color: var(--green-900); font-weight: 800; }
.profile-chip { display: flex; align-items: center; gap: 9px; padding: 7px 11px; border-radius: 14px; }
.profile-copy strong, .profile-copy small { display: block; text-align: left; }
.profile-copy strong { font-size: 12px; }
.profile-copy small { color: var(--muted); font-size: 10px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--white); background: var(--pink-700); font-weight: 800; }

.icon-button { width: 42px; height: 42px; border-radius: 13px; color: var(--green-900); font-size: 22px; }
.menu-toggle { display: none; padding: 11px; }
.menu-toggle span { display: block; width: 18px; height: 2px; margin: 3px auto; border-radius: 99px; background: var(--green-900); }
.close-portal { font-size: 28px; line-height: 1; }

.portal-shell { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 78px); }
.sidebar {
  position: sticky;
  top: 78px;
  height: calc(100vh - 78px);
  padding: 22px 15px;
  display: flex;
  flex-direction: column;
  color: var(--white);
  background:
    radial-gradient(circle at 45% 92%, rgba(216,95,139,.22), transparent 26%),
    linear-gradient(165deg, #456f56, #294535);
}
.main-nav { display: grid; gap: 6px; }
.main-nav a {
  min-height: 46px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 13px;
  color: rgba(255,255,255,.74);
  font-size: 13px;
  font-weight: 700;
}
.main-nav a:hover,
.main-nav a.active { color: var(--white); background: rgba(255,255,255,.13); }
.nav-symbol { width: 23px; color: var(--pink-300); text-align: center; font-weight: 800; }
.main-nav em { margin-left: auto; padding: 2px 7px; border-radius: 999px; color: var(--white); background: var(--pink-500); font-size: 10px; font-style: normal; }

.rooster-tip {
  margin-top: auto;
  padding: 13px;
  display: flex;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
}
.rooster-tip img { width: 47px; height: 47px; border-radius: 13px; object-fit: cover; }
.rooster-tip strong, .rooster-tip span { display: block; }
.rooster-tip strong { color: var(--pink-300); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.rooster-tip span { margin-top: 5px; color: rgba(255,255,255,.72); font-size: 10px; line-height: 1.5; }
.sidebar-version { padding: 14px 12px 0; }
.sidebar-version strong, .sidebar-version span { display: block; }
.sidebar-version strong { font-size: 11px; }
.sidebar-version span { margin-top: 3px; color: rgba(255,255,255,.46); font-size: 10px; }

.portal-main { min-width: 0; padding: 38px clamp(17px, 4vw, 54px) 55px; }
.page { display: none; }
.page.active { display: block; }

.page-heading { margin-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-heading h1 { margin-bottom: 12px; font-size: clamp(46px, 6vw, 72px); }
.page-heading > div > p:last-child { margin: 0; color: var(--muted); line-height: 1.6; }
.compact-heading h2 { font-size: 38px; }
.demo-label { padding: 8px 11px; border-radius: 999px; color: var(--pink-900); background: var(--pink-100); font-size: 10px; font-weight: 800; }

.action-banner {
  margin-bottom: 17px;
  padding: 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 17px;
  align-items: center;
  border: 1px solid #f0c8d7;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fffafc, #fce5ee);
  box-shadow: var(--shadow-soft);
}
.action-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; color: var(--white); background: var(--pink-500); font-size: 21px; font-weight: 800; }
.action-banner h2 { margin-bottom: 4px; }
.action-banner p:not(.card-kicker) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.portal-card,
.discussion-card,
.wiki-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,253,248,.96);
  box-shadow: var(--shadow-soft);
}
.portal-card { padding: 21px; }
.card-wide { grid-column: span 2; }
.card-header { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.badge { padding: 7px 10px; border-radius: 999px; white-space: nowrap; font-size: 10px; font-weight: 800; }
.badge-gold { color: var(--gold-800); background: var(--gold-100); }
.badge-pink { color: var(--pink-900); background: var(--pink-100); }
.badge-green { color: var(--green-900); background: var(--green-100); }
.badge-neutral { color: var(--muted); background: var(--cream-200); }

.countdown { display: flex; gap: 10px; margin: 22px 0; }
.countdown div { flex: 0 1 88px; padding: 13px; border-radius: 15px; text-align: center; background: var(--green-50); }
.countdown strong, .countdown span { display: block; }
.countdown strong { color: var(--green-900); font: 800 30px/1 "Baloo 2"; }
.countdown span { margin-top: 5px; color: var(--muted); font-size: 10px; }

.detail-grid,
.derby-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.detail-grid div,
.derby-facts div { padding: 13px; border: 1px solid var(--border); border-radius: 13px; }
.detail-grid span, .detail-grid strong, .derby-facts span, .derby-facts strong { display: block; }
.detail-grid span, .derby-facts span { color: var(--muted); font-size: 10px; }
.detail-grid strong, .derby-facts strong { margin-top: 4px; font-size: 12px; }

.health-card p { color: var(--muted); line-height: 1.6; }
.health-indicator { width: 13px; height: 13px; border-radius: 50%; background: #65a876; box-shadow: 0 0 0 7px rgba(101,168,118,.13); }
.health-bar { height: 11px; margin: 20px 0 8px; overflow: hidden; border-radius: 999px; background: var(--green-100); }
.health-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-500), #82aa8d); }
.health-card small { color: var(--muted); }

.large-number { display: flex; align-items: baseline; gap: 8px; }
.large-number strong { color: var(--pink-700); font: 800 56px/1 "Baloo 2"; }
.large-number span { color: var(--muted); font-size: 14px; font-weight: 600; }
.progress-track { height: 11px; margin: 15px 0; overflow: hidden; border-radius: 999px; background: var(--cream-200); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink-500), var(--pink-700)); transition: width .2s; }
.progress-large { height: 14px; }

.stat-grid,
.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 15px; }
.stat-grid div,
.admin-stats article { padding: 13px; border-radius: 14px; background: var(--cream-100); }
.stat-grid strong, .stat-grid span, .admin-stats strong, .admin-stats span { display: block; }
.stat-grid strong, .admin-stats strong { color: var(--pink-700); font: 800 29px/1 "Baloo 2"; }
.stat-grid span, .admin-stats span { margin-top: 4px; color: var(--muted); font-size: 10px; }

.announcement-card { display: flex; align-items: center; gap: 18px; }
.announcement-mark { flex: 0 0 auto; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; color: var(--white); background: linear-gradient(145deg, var(--pink-500), var(--pink-900)); font: 800 20px "Baloo 2"; }
.announcement-card p:not(.card-kicker) { margin: 0; color: var(--muted); line-height: 1.6; }

.split-layout { display: grid; grid-template-columns: 1.35fr .8fr; gap: 15px; }
.derby-facts { grid-template-columns: repeat(4, 1fr); margin: 22px 0; }
.strategy-panel { padding: 17px; border-radius: 17px; background: var(--green-50); }
.strategy-panel ul { margin: 8px 0 0; padding-left: 20px; color: var(--green-900); line-height: 1.7; }
.participation-panel { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.choice-button { min-height: 42px; padding: 9px 13px; border: 1px solid var(--border); border-radius: 13px; color: var(--green-900); background: var(--white); font-weight: 800; }
.choice-button.selected { color: var(--pink-900); border-color: var(--pink-300); background: var(--pink-50); }

input[type="range"] { width: 100%; accent-color: var(--pink-700); }
.field { display: block; margin-top: 14px; }
.field > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; padding: 11px; border: 1px solid var(--border); border-radius: 12px; color: var(--ink); background: var(--white); }
.inline-status { min-height: 20px; color: var(--green-700); font-size: 12px; font-weight: 800; }

.admin-section { margin-top: 28px; }
.admin-only { display: none !important; }
body.admin-mode .admin-only { display: block !important; }
body.admin-mode .admin-link.admin-only { display: flex !important; }
.admin-stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 15px; }

.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 18px; background: var(--white); box-shadow: var(--shadow-soft); }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--border); text-align: left; font-size: 12px; }
th { color: var(--muted); background: var(--cream-100); }
tbody tr:last-child td { border-bottom: 0; }
.table-action { padding: 7px 9px; border: 0; border-radius: 9px; color: var(--pink-900); background: var(--pink-100); font-size: 10px; font-weight: 800; }

.filter-bar { margin-bottom: 16px; display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.filter-bar input, .filter-bar select { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--white); }

.member-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.member-card { padding: 17px; border: 1px solid var(--border); border-radius: 20px; background: var(--white); box-shadow: var(--shadow-soft); }
.member-head { display: flex; justify-content: space-between; gap: 10px; }
.member-identity { display: flex; align-items: center; gap: 10px; }
.member-identity .avatar { background: var(--green-700); }
.member-identity h3 { margin-bottom: 0; font-size: 20px; }
.member-role { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.member-status { padding: 6px 8px; border-radius: 999px; white-space: nowrap; font-size: 9px; font-weight: 800; }
.status-joined, .status-finished { color: var(--green-900); background: var(--green-100); }
.status-pause { color: var(--pink-900); background: var(--pink-100); }
.status-waiting { color: var(--gold-800); background: var(--gold-100); }
.member-info { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 14px 0; }
.member-info div { padding: 9px; border-radius: 11px; background: var(--cream-100); }
.member-info span, .member-info strong { display: block; }
.member-info span { color: var(--muted); font-size: 9px; }
.member-info strong { margin-top: 3px; font-size: 11px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.task-tag { padding: 5px 7px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.task-tag.like { color: var(--green-900); background: var(--green-100); }
.task-tag.dislike { color: var(--danger); background: #f9e5e7; }

.preference-list { display: grid; gap: 10px; }
.preference-row { padding: 13px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 14px; }
.preference-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.preference-actions button { padding: 6px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); font-size: 10px; font-weight: 800; }
.preference-actions button.selected { color: var(--pink-900); border-color: var(--pink-300); background: var(--pink-50); }
.helper-text { color: var(--muted); font-size: 12px; }

.discussion-grid { display: grid; gap: 12px; }
.discussion-card { padding: 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 15px; align-items: center; }
.discussion-code { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 14px; color: var(--white); background: var(--green-700); font-weight: 800; }
.discussion-card h2 { font-size: 23px; }
.discussion-card p:not(.card-kicker) { margin: 0; color: var(--muted); font-size: 12px; }

.wiki-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.wiki-card { min-height: 190px; padding: 23px; }
.wiki-card > span { color: var(--pink-700); font: 800 34px/1 "Baloo 2"; }
.wiki-card h2 { margin-top: 25px; }
.wiki-card p { margin-bottom: 0; color: var(--muted); line-height: 1.6; }

.admin-module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.admin-module-grid p:not(.card-kicker) { color: var(--muted); line-height: 1.6; }

.portal-footer { margin-top: 55px; padding: 23px 0 0; border-top: 1px solid var(--border); color: var(--muted); }
.portal-footer strong, .portal-footer span { display: block; }
.portal-footer strong { color: var(--green-900); }
.portal-footer span { margin-top: 5px; font-size: 11px; }
.portal-footer p { max-width: 700px; margin: 10px 0 0; font-size: 10px; line-height: 1.5; }

.bottom-nav { display: none; }

dialog { width: min(560px, calc(100% - 22px)); padding: 23px; border: 0; border-radius: 24px; background: var(--cream-50); box-shadow: 0 30px 80px rgba(24,31,26,.35); }
dialog::backdrop { background: rgba(28,36,30,.64); backdrop-filter: blur(5px); }
.dialog-header { display: flex; justify-content: space-between; gap: 15px; }
.dialog-header button { border: 0; color: var(--muted); background: transparent; font-size: 30px; }

/* RESPONSIVE */
@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 30px; }
  .split-layout { grid-template-columns: 1fr; }
  .derby-facts { grid-template-columns: repeat(2, 1fr); }
  .member-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 850px) {
  .landing-nav a { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 45px; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-notes { justify-content: center; }
  .hero-visual { min-height: 430px; }
  .logo-stage { width: min(400px, 82%); }
  .floating-card-one { left: 5%; }
  .floating-card-two { right: 5%; }
  .public-card-grid { grid-template-columns: 1fr; }
  .rules-panel { grid-template-columns: 1fr; text-align: center; }
  .rule-note { text-align: left; }
  .join-panel { flex-direction: column; align-items: flex-start; }
  .public-footer { grid-template-columns: 1fr; }

  .portal-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 78px;
    z-index: 50;
    width: 250px;
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: block; }
  .action-banner { grid-template-columns: auto 1fr; }
  .action-banner .button { grid-column: 1 / -1; width: 100%; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .card-wide { grid-column: span 1; }
}

@media (max-width: 620px) {
  body { padding-bottom: 72px; }
  .landing-header { padding: 12px 14px; }
  .landing-brand img { width: 54px; height: 54px; border-radius: 15px; }
  .landing-brand small { display: none; }
  .landing-nav .button { padding: 9px 12px; font-size: 12px; }
  .hero { min-height: auto; padding: 50px 15px 35px; }
  .hero h1 { font-size: 54px; }
  .hero-actions > * { width: 100%; }
  .hero-visual { min-height: 385px; }
  .logo-stage { width: 82%; }
  .logo-stage img { border-radius: 28px; }
  .floating-card { width: 145px; padding: 12px; }
  .floating-card strong { font-size: 18px; }
  .floating-card-one { left: 0; top: 55px; }
  .floating-card-two { right: 0; bottom: 55px; }
  .public-section { padding: 68px 15px; }
  .section-heading { text-align: left; }
  .section-heading h2 { font-size: 42px; }
  .rules-panel { padding: 25px 20px; }
  .rule-number { font-size: 62px; }
  .join-panel { padding: 28px 22px; }
  .public-footer { padding: 28px 16px; }

  .portal-topbar { height: 70px; padding: 0 11px; }
  .portal-brand img { width: 49px; height: 49px; border-radius: 14px; }
  .portal-brand small, .role-switch, .profile-copy { display: none; }
  .portal-actions { gap: 6px; }
  .profile-chip { padding: 5px; border: 0; background: transparent; }
  .close-portal { width: 36px; height: 36px; }
  .sidebar { top: 70px; height: calc(100vh - 70px); }
  .portal-main { padding: 25px 13px 35px; }
  .page-heading { display: block; }
  .page-heading h1 { font-size: 44px; }
  .demo-label { display: inline-block; margin-top: 10px; }
  .detail-grid,
  .filter-bar,
  .member-grid,
  .wiki-grid,
  .admin-module-grid { grid-template-columns: 1fr; }
  .derby-facts,
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .preference-row { grid-template-columns: 1fr; }
  .discussion-card { grid-template-columns: auto 1fr; }
  .discussion-card .badge { grid-column: 2; justify-self: start; }
  .announcement-card { align-items: flex-start; }
  .large-number strong { font-size: 50px; }

  .bottom-nav {
    position: fixed;
    z-index: 70;
    left: 7px;
    right: 7px;
    bottom: 7px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border);
    border-radius: 19px;
    background: rgba(255,253,248,.96);
    box-shadow: 0 15px 38px rgba(44,42,39,.18);
    backdrop-filter: blur(13px);
  }
  .bottom-nav a { display: grid; justify-items: center; gap: 2px; color: var(--muted); }
  .bottom-nav a.active { color: var(--pink-700); }
  .bottom-nav span { font-size: 18px; font-weight: 800; }
  .bottom-nav small { font-size: 9px; font-weight: 800; }
}
