:root {
  --ink: #24162d;
  --ink-soft: #5d5165;
  --plum: #5d2a78;
  --plum-deep: #341342;
  --plum-dark: #1f0f29;
  --lavender: #b999dc;
  --lavender-soft: #e7dcf7;
  --lavender-pale: #f5f0fb;
  --lilac: #faf7ff;
  --white: #ffffff;
  --gold: #b8872d;
  --gold-soft: #ead29a;
  --green: #296348;
  --red: #9c3f4d;
  --blue: #37688c;
  --border: rgba(67, 34, 83, 0.13);
  --border-strong: rgba(67, 34, 83, 0.24);
  --shadow-sm: 0 8px 24px rgba(58, 29, 72, 0.07);
  --shadow: 0 22px 60px rgba(54, 27, 67, 0.11);
  --shadow-dark: 0 28px 70px rgba(18, 7, 25, 0.3);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --shell: 1180px;
  --header-height: 82px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--lilac);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 4%, rgba(185, 153, 220, .2), transparent 25rem),
    radial-gradient(circle at 92% 18%, rgba(226, 209, 246, .35), transparent 24rem),
    linear-gradient(180deg, #fbf9ff 0%, #f8f4fd 100%);
}

img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

h1, h2, h3, h4, p, blockquote, dl, dd { margin-top: 0; }
h1, h2, h3, h4 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
h1 { font-size: clamp(2.65rem, 6vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: 1.35rem; }
p { color: var(--ink-soft); }

.shell {
  width: min(var(--shell), calc(100% - 40px));
  margin-inline: auto;
}

.narrow { max-width: 760px; }
.centre { text-align: center; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--plum-deep);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.eyebrow {
  margin-bottom: 8px;
  color: var(--plum);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(70, 31, 87, .08);
  background: rgba(251, 249, 255, .88);
  backdrop-filter: blur(20px);
}
.header-inner {
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  line-height: 1;
}
.brand img {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(184, 135, 45, .45);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 5px 16px rgba(55, 23, 69, .12);
}
.brand span { display: grid; gap: 4px; }
.brand strong {
  color: var(--plum-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.13rem;
  font-weight: 500;
}
.brand small {
  color: var(--gold);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  padding: 9px 10px;
  border-radius: 9px;
  color: #55455d;
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: .2s ease;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--plum-deep);
  background: var(--lavender-pale);
}
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.menu-button span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 9px;
  background: var(--plum-deep);
}

.button,
.text-button,
.icon-button,
.chat-launcher,
.chat-form button,
.chat-quick button {
  cursor: pointer;
}
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 19px;
  border: 1px solid var(--plum);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #6a3583 0%, #4f2068 100%);
  box-shadow: 0 10px 24px rgba(79, 32, 104, .17);
  font-size: .92rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(79, 32, 104, .23); }
.button:focus-visible,
.text-button:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(105, 55, 129, .28);
  outline-offset: 3px;
}
.button--ghost {
  color: var(--plum-deep);
  border-color: rgba(78, 31, 103, .22);
  background: rgba(255, 255, 255, .72);
  box-shadow: none;
}
.button--ghost:hover { background: #fff; box-shadow: var(--shadow-sm); }
.button--small { min-height: 39px; padding: 8px 15px; font-size: .82rem; }
.button--full { width: 100%; }
.button--danger-ghost { color: var(--red); border-color: rgba(156, 63, 77, .3); background: transparent; box-shadow: none; }
.text-button {
  padding: 7px 2px;
  border: 0;
  color: var(--plum);
  background: transparent;
  font-size: .86rem;
  font-weight: 750;
  text-decoration: none;
}
.text-button:hover { color: var(--plum-deep); }
.text-button--danger { color: var(--red); }
.text-link {
  color: var(--plum);
  font-weight: 750;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.inline-form { display: inline-flex; margin: 0; }
.button-row, .hero-actions, .badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.member-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: .82rem;
  font-weight: 750;
  text-decoration: none;
}

.page-notices { position: relative; z-index: 5; }
.notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(55, 104, 76, .18);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #f4fbf6;
  box-shadow: var(--shadow-sm);
  font-size: .9rem;
}
.notice--error { border-color: rgba(156, 63, 77, .2); background: #fff4f6; }
.notice--success span { color: var(--green); font-weight: 900; }
.notice--error span { color: var(--red); }

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(68px, 9vw, 118px) 0 clamp(80px, 10vw, 132px);
}
.hero::before {
  position: absolute;
  width: 560px;
  height: 560px;
  top: -240px;
  right: -160px;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(203, 178, 232, .35), transparent 66%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(370px, .77fr);
  align-items: center;
  gap: clamp(45px, 8vw, 110px);
}
.hero-copy h1 { max-width: 760px; margin-bottom: 25px; }
.hero-copy h1 em { color: var(--plum); font-weight: 500; }
.hero-lead { max-width: 670px; margin-bottom: 30px; font-size: clamp(1rem, 2vw, 1.18rem); }
.hero-actions { margin-bottom: 25px; }
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 22px;
  color: #776c7d;
  font-size: .78rem;
  font-weight: 650;
}
.hero-art {
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 1;
  margin-inline: auto;
  display: grid;
  place-items: center;
}
.hero-art::before {
  position: absolute;
  inset: 7%;
  content: "";
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(232, 219, 248, .6));
  box-shadow: 0 30px 80px rgba(73, 34, 91, .2);
}
.hero-logo {
  position: relative;
  z-index: 2;
  width: 73%;
  aspect-ratio: 1;
  border: 2px solid rgba(191, 143, 45, .55);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 24px 55px rgba(36, 14, 45, .26);
}
.hero-orbit {
  position: absolute;
  z-index: 1;
  inset: 2%;
  border: 1px solid rgba(95, 42, 120, .18);
  border-radius: 50%;
}
.hero-orbit--one::after,
.hero-orbit--two::after {
  position: absolute;
  width: 10px;
  height: 10px;
  content: "";
  border: 3px solid #f8f4fd;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 3px 12px rgba(107, 70, 15, .3);
}
.hero-orbit--one::after { top: 16%; right: 6%; }
.hero-orbit--two { inset: 15%; border-style: dashed; transform: rotate(18deg); }
.hero-orbit--two::after { bottom: 5%; left: 18%; }
.hero-note {
  position: absolute;
  z-index: 3;
  right: -4%;
  bottom: 8%;
  min-width: 190px;
  padding: 13px 16px;
  border: 1px solid rgba(184, 135, 45, .28);
  border-radius: 15px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
}
.hero-note span, .hero-note strong { display: block; }
.hero-note span { color: var(--gold); font-size: .65rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero-note strong { margin-top: 4px; color: var(--plum-deep); font-size: .86rem; }

.daily-message-section { position: relative; margin-top: -45px; padding-bottom: 32px; }
.daily-message {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 23px 26px;
  border: 1px solid rgba(184, 135, 45, .23);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .93);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.daily-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--lavender-pale);
  font-size: 1.4rem;
}
.daily-message blockquote {
  margin-bottom: 4px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  line-height: 1.25;
}
.daily-message p:last-child { margin-bottom: 0; font-size: .9rem; }
.daily-date { color: #8a7e90; font-size: .75rem; white-space: nowrap; }

.section { padding: clamp(70px, 9vw, 112px) 0; }
.section--tint { background: rgba(231, 220, 247, .34); }
.section--dark {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 10% 0%, rgba(141, 84, 169, .42), transparent 30rem),
    radial-gradient(circle at 95% 85%, rgba(184, 135, 45, .17), transparent 25rem),
    #24102e;
}
.section--dark h2,
.section--dark h3 { color: #fff; }
.section--dark .section-heading p { color: #c9b9d0; }
.section--dark .eyebrow { color: var(--gold-soft); }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 38px;
}
.section-heading h2 { margin-bottom: 9px; }
.section-heading p { max-width: 630px; margin-bottom: 0; }
.section-heading.compact { margin-bottom: 18px; }
.section-heading.compact h2 { font-size: clamp(1.65rem, 3vw, 2.2rem); }

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .92fr);
  gap: 24px;
}
.announcement-stack { display: grid; gap: 14px; }
.announcement-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .75);
  box-shadow: var(--shadow-sm);
}
.announcement-card > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: var(--lavender-pale);
  font-size: 1.25rem;
}
.announcement-card h3 { margin-bottom: 7px; }
.announcement-card p { margin-bottom: 10px; }
.announcement-card small { color: #8c8290; }
.card-label {
  margin-bottom: 5px !important;
  color: var(--gold) !important;
  font-size: .68rem !important;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.news-feature {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid rgba(89, 45, 109, .12);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #f0e6fb, #fff);
  box-shadow: var(--shadow);
}
.news-feature img { width: 100%; height: 250px; object-fit: cover; }
.news-feature > div { padding: 28px; }
.news-feature h3 { font-size: 2rem; }

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.event-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.event-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.event-card__visual {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: var(--lavender-pale);
}
.event-card__visual img { width: 100%; height: 100%; object-fit: cover; }
.event-card__visual > span {
  position: absolute;
  left: 16px;
  bottom: 14px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  color: #fff;
  background: rgba(37, 16, 47, .68);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.event-card__body { padding: 22px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; color: #8a7d8f; font-size: .72rem; font-weight: 700; }
.event-card h3 { margin-bottom: 9px; font-size: 1.65rem; }
.event-card p { margin-bottom: 17px; font-size: .91rem; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-footer a { color: var(--plum); font-size: .79rem; font-weight: 800; text-decoration: none; }

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.member-rank {
  position: relative;
  padding: 32px 24px 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.member-rank::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  content: "";
  background: var(--lavender);
}
.member-rank.rank-1::before { background: linear-gradient(90deg, #e7c875, #b8872d); }
.member-rank h3 { margin: 14px 0 3px; }
.member-rank p { margin-bottom: 12px; font-weight: 750; }
.rank-number {
  position: absolute;
  top: 16px;
  right: 18px;
  color: rgba(77, 35, 97, .18);
  font-family: Georgia, serif;
  font-size: 2.4rem;
}

.trophy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.trophy-card {
  padding: 26px;
  border: 1px solid rgba(234, 210, 154, .17);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(12px);
}
.trophy-emoji { display: block; margin-bottom: 18px; font-size: 2rem; }
.trophy-card h3 { margin-bottom: 8px; }
.trophy-card p { margin-bottom: 0; color: #cfc2d4; }

.staff-social-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr);
  gap: 28px;
}
.staff-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-content: start; }
.staff-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.staff-card h3 { margin-bottom: 7px; }
.social-card {
  padding: 30px;
  border: 1px solid rgba(183, 136, 46, .24);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, #fff 0%, #f1e9fb 100%);
  box-shadow: var(--shadow);
}
.social-icon { display: grid; width: 48px; height: 48px; margin-bottom: 25px; place-items: center; border-radius: 14px; color: #fff; background: var(--plum); font-size: 1.5rem; }
.social-card h3 { font-size: 2rem; }
.social-stat { display: flex; align-items: baseline; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.social-stat strong { color: var(--plum); font-family: Georgia, serif; font-size: 2.2rem; }
.social-stat span { color: var(--ink-soft); font-size: .78rem; }

.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rule-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .76);
}
.rule-card > span { color: var(--gold); font-family: Georgia, serif; font-size: 1.55rem; }
.rule-card h3 { margin-bottom: 6px; }
.rule-card p { margin-bottom: 0; }

.history-preview {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(40px, 7vw, 90px);
}
.history-preview img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.history-preview h2 { margin-bottom: 18px; }
.history-preview p:not(.eyebrow) { margin-bottom: 25px; font-size: 1.04rem; }

.challenge-banner { padding-top: 0; }
.challenge-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(34px, 6vw, 58px);
  overflow: hidden;
  border: 1px solid rgba(184, 135, 45, .26);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 0%, rgba(213, 190, 237, .55), transparent 18rem),
    linear-gradient(135deg, #f2eafa, #fff);
  box-shadow: var(--shadow);
}
.challenge-inner h2 { margin-bottom: 12px; }
.challenge-inner p:last-child { max-width: 700px; margin-bottom: 0; }

.page-hero,
.staff-hero,
.member-hero,
.event-hero,
.simple-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(68px, 9vw, 110px) 0;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 90% 0%, rgba(185, 153, 220, .36), transparent 27rem),
    linear-gradient(145deg, rgba(255, 255, 255, .8), rgba(237, 226, 249, .48));
}
.page-hero h1,
.staff-hero h1,
.member-hero h1,
.event-hero h1,
.simple-hero h1 { max-width: 900px; margin-bottom: 20px; font-size: clamp(2.7rem, 6vw, 5rem); }
.page-hero p:not(.eyebrow),
.staff-hero p:not(.eyebrow),
.simple-hero p:not(.eyebrow) { max-width: 760px; font-size: 1.05rem; }
.page-hero .button { margin-top: 12px; }
.simple-hero { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.simple-hero p { margin-inline: auto; }
.large-emoji { display: block; margin-bottom: 16px; font-size: 3rem; }

.membership-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.membership-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.membership-card::before { position: absolute; inset: 0 0 auto; height: 6px; content: ""; background: var(--lavender); }
.membership-card--diamond::before { background: linear-gradient(90deg, #8bd4ec, #b58ce0); }
.membership-card--gold::before { background: linear-gradient(90deg, #f0d17d, #b8872d); }
.membership-card--silver::before { background: linear-gradient(90deg, #e9edf0, #9babb5); }
.membership-card--bronze::before { background: linear-gradient(90deg, #d59a6a, #995f35); }
.membership-card--none { grid-column: 1 / -1; }
.membership-card__top { display: flex; align-items: center; gap: 17px; margin-bottom: 25px; }
.membership-card__top h2 { margin-bottom: 0; }
.membership-gem { display: grid; width: 60px; height: 60px; place-items: center; border-radius: 17px; background: var(--lavender-pale); font-size: 1.8rem; }
.benefit-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-bottom: 25px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.benefit-list > div { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.benefit-list > div:nth-child(odd) { border-right: 1px solid var(--border); }
.benefit-list > div:last-child { border-bottom: 0; }
.benefit-list dt { color: #827587; font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.benefit-list dd { margin: 4px 0 0; color: var(--ink); font-weight: 750; }
.membership-members { padding-top: 20px; border-top: 1px solid var(--border); }
.membership-members > strong { display: block; margin-bottom: 10px; }
.member-pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.member-pill-list > span { padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--plum-deep); background: var(--lavender-pale); font-size: .76rem; font-weight: 750; }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--soft { color: #67596d; border-color: var(--border); background: #f6f2f9; }
.badge--purple { color: #5c2774; background: #efe2f8; }
.badge--gold, .badge--gold { color: #795815; background: #f8edcf; }
.badge--green { color: #245b42; background: #e5f4ea; }
.badge--red { color: #8a3341; background: #f9e6e9; }
.badge--blue { color: #315e7d; background: #e5f0f7; }
.badge--diamond { color: #356a82; background: #e2f4fb; }
.badge--silver { color: #5b6770; background: #edf1f3; }
.badge--bronze { color: #805030; background: #f5e7dc; }

.avatar {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(62, 29, 76, .16);
}
.avatar--initials {
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #80519a, #4b1c61);
  font-family: Georgia, serif;
  font-size: 1rem;
}
.avatar--tiny { width: 30px; height: 30px; border-width: 1px; font-size: .65rem; }
.avatar--small { width: 38px; height: 38px; font-size: .75rem; }
.avatar--large { width: 76px; height: 76px; font-size: 1.35rem; }
.avatar--xl { width: 94px; height: 94px; font-size: 1.7rem; }
.avatar--hero { width: 112px; height: 112px; font-size: 2rem; }
.avatar--profile { width: 150px; height: 150px; font-size: 2.7rem; }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 20px; margin-bottom: 38px; }
.podium-card {
  position: relative;
  padding: 32px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.podium-card--1 { order: 2; padding-block: 45px; border-color: rgba(184, 135, 45, .35); box-shadow: var(--shadow); }
.podium-card--2 { order: 1; }
.podium-card--3 { order: 3; }
.podium-card h2 { margin: 15px 0 6px; font-size: 1.75rem; }
.podium-card > strong { display: block; margin-bottom: 12px; color: var(--plum); font-size: 1.12rem; }
.podium-place { position: absolute; top: 18px; right: 20px; color: var(--gold); font-family: Georgia, serif; font-size: 2rem; }

.table-card,
.form-card,
.side-card,
.profile-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.table-card { padding: 24px; }
.table-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.table-title h2 { margin-bottom: 0; font-size: 2rem; }
.table-title > span { color: var(--ink-soft); font-size: .82rem; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { padding: 14px 13px; border-bottom: 1px solid var(--border); text-align: left; }
th { color: #827587; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
td { font-size: .88rem; }
tbody tr:last-child td { border-bottom: 0; }
.table-member { display: flex; align-items: center; gap: 10px; font-weight: 750; }

.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.calendar-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.calendar-toolbar h2 { margin-bottom: 0; font-size: 2rem; }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--border); border-radius: 12px; color: var(--plum); background: #fff; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays span { padding: 9px; color: #8a7f8f; font-size: .68rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.calendar-day {
  position: relative;
  min-height: 104px;
  padding: 10px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: background .18s ease;
}
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:hover, .calendar-day.is-selected { background: var(--lavender-pale); }
.calendar-day.is-outside { color: #b7aebc; background: #fbfafc; }
.calendar-day.is-today .calendar-number { color: #fff; background: var(--plum); }
.calendar-number { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; font-size: .75rem; font-weight: 800; }
.calendar-dots { display: grid; gap: 4px; margin-top: 8px; }
.calendar-event-dot { overflow: hidden; padding: 3px 5px; border-radius: 5px; color: var(--plum-deep); background: #eadcf6; font-size: .62rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-dot.public { color: #285f45; background: #e0f2e7; }
.calendar-agenda { position: sticky; top: calc(var(--header-height) + 22px); padding: 25px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.calendar-agenda h2 { margin-bottom: 18px; font-size: 1.8rem; }
.agenda-item { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.agenda-item:last-child { border-bottom: 0; }
.agenda-item strong, .agenda-item small { display: block; }
.agenda-item strong { color: var(--ink); }
.agenda-item small { margin-top: 3px; color: var(--ink-soft); }

.timeline { position: relative; max-width: 950px; }
.timeline::before { position: absolute; top: 15px; bottom: 15px; left: 104px; width: 1px; content: ""; background: linear-gradient(var(--gold-soft), var(--lavender)); }
.timeline-item { position: relative; display: grid; grid-template-columns: 80px 58px 1fr; gap: 22px; align-items: start; margin-bottom: 38px; }
.timeline-date { padding-top: 11px; color: #827588; font-size: .72rem; font-weight: 750; text-align: right; }
.timeline-marker { position: relative; z-index: 1; display: grid; width: 58px; height: 58px; place-items: center; border: 5px solid var(--lilac); border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); }
.timeline-card { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.timeline-card h2 { margin-bottom: 12px; font-size: 2rem; }
.timeline-card p:last-child { margin-bottom: 0; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .75fr); gap: 28px; align-items: start; }
.form-card { padding: clamp(24px, 5vw, 36px); }
.form-card > h2 { margin-bottom: 24px; }
.form-card__head { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; }
.form-card__head > span { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 15px; background: var(--lavender-pale); font-size: 1.5rem; }
.form-card__head h2 { margin-bottom: 0; }
.side-card { padding: 28px; }
.side-card img { margin: -8px auto 24px; width: min(100%, 330px); border-radius: var(--radius); }
.side-card h2 { font-size: 2rem; }
.side-card ol { padding-left: 20px; color: var(--ink-soft); }
.side-card li { margin-bottom: 9px; }
.form-stack { display: grid; gap: 18px; }
.form-stack--compact { gap: 11px; margin-top: 15px; }
.form-stack label { display: grid; gap: 7px; color: var(--ink); font-size: .82rem; font-weight: 750; }
.form-stack label small { color: #887d8d; font-size: .71rem; font-weight: 500; line-height: 1.45; }
input, select, textarea {
  width: 100%;
  min-height: 47px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  transition: border .18s ease, box-shadow .18s ease;
}
textarea { min-height: 110px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: rgba(94, 42, 120, .42); }
input:focus, select:focus, textarea:focus { border-color: var(--plum); box-shadow: 0 0 0 4px rgba(105, 55, 129, .1); outline: none; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.check-row { display: grid !important; grid-template-columns: auto 1fr; align-items: start; gap: 10px !important; color: var(--ink-soft) !important; font-weight: 500 !important; }
.check-row input { width: 18px; min-height: 18px; height: 18px; margin-top: 3px; }
.file-drop { min-height: 140px; padding: 22px; place-items: center; align-content: center; border: 1px dashed rgba(93, 42, 120, .34); border-radius: var(--radius); text-align: center; background: var(--lavender-pale); cursor: pointer; }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop > span { font-size: 1.6rem; }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 5px; border-radius: 13px; background: var(--lavender-pale); }
.segmented label { display: block; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 9px; border-radius: 9px; text-align: center; cursor: pointer; }
.segmented input:checked + span { color: var(--plum-deep); background: #fff; box-shadow: var(--shadow-sm); }
.clean-list { display: grid; gap: 11px; padding: 0; list-style: none; color: var(--ink-soft); }

.auth-section { min-height: calc(100vh - var(--header-height)); padding: 65px 0 90px; }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(390px, .72fr); gap: 40px; align-items: stretch; }
.auth-art { position: relative; overflow: hidden; display: grid; grid-template-rows: 280px 1fr; border-radius: var(--radius-lg); color: #fff; background: var(--plum-dark); box-shadow: var(--shadow-dark); }
.auth-art img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.auth-art > div { padding: clamp(30px, 5vw, 52px); }
.auth-art h1 { color: #fff; font-size: clamp(2.6rem, 5vw, 4.5rem); }
.auth-art p, .auth-art li { color: #d9cddd; }
.auth-art .eyebrow { color: var(--gold-soft); }
.auth-card { padding: clamp(26px, 5vw, 44px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.auth-card__head { display: flex; align-items: center; gap: 15px; margin-bottom: 26px; }
.auth-card__head img { border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); }
.auth-card__head h2 { margin-bottom: 0; font-size: 2.1rem; }
.auth-switch { margin: 23px 0 0; color: var(--ink-soft); font-size: .83rem; text-align: center; }
.auth-switch a { color: var(--plum); font-weight: 800; }

.member-hero__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.member-identity { display: flex; align-items: center; gap: 23px; }
.member-hero h1 { margin-bottom: 14px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat-card { min-height: 190px; display: flex; flex-direction: column; padding: 23px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.stat-card > span { font-size: 1.45rem; }
.stat-card p { margin: 18px 0 3px; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stat-card > strong { color: var(--plum-deep); font-family: Georgia, serif; font-size: 1.85rem; font-weight: 500; line-height: 1.15; }
.stat-card a, .stat-card small { margin-top: auto; padding-top: 15px; color: var(--plum); font-size: .73rem; font-weight: 750; text-decoration: none; }
.stat-card small { color: var(--ink-soft); font-weight: 500; }
.dashboard-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.list-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.list-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 72px; padding: 13px 16px; border-bottom: 1px solid var(--border); text-decoration: none; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--lavender-pale); }
.list-row span:nth-child(2) { min-width: 0; }
.list-row strong, .list-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row strong { color: var(--ink); font-size: .88rem; }
.list-row small { margin-top: 3px; color: var(--ink-soft); font-size: .69rem; }
.date-tile { display: grid; width: 44px; height: 48px; place-items: center; align-content: center; border-radius: 11px; color: var(--plum); background: var(--lavender-pale); line-height: 1; }
.date-tile strong { font-family: Georgia, serif; font-size: 1.2rem; }
.date-tile small { margin-top: 4px; font-size: .57rem; text-transform: uppercase; }
.round-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--lavender-pale); }
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.action-card { display: block; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); text-decoration: none; transition: .2s ease; }
.action-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.action-card > span { font-size: 1.6rem; }
.action-card h2 { margin: 17px 0 10px; font-size: 1.8rem; }
.action-card strong { color: var(--plum); font-size: .82rem; }

.profile-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; align-items: start; }
.profile-preview { position: sticky; top: calc(var(--header-height) + 24px); padding: 34px; text-align: center; }
.profile-preview .avatar { margin-inline: auto; }
.profile-preview h2 { margin: 18px 0 12px; }
.profile-preview .badge-row { justify-content: center; }
.profile-preview > p { margin: 20px 0; }
.profile-preview dl { border-top: 1px solid var(--border); }
.profile-preview dl > div { padding: 13px 0; border-bottom: 1px solid var(--border); }
.profile-preview dt { color: var(--ink-soft); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.profile-preview dd { margin-top: 3px; font-weight: 750; }
.form-stack-group { display: grid; gap: 22px; }
.ticket-list { display: grid; gap: 14px; }
.ticket-card { padding: 19px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); }
.ticket-card > div:first-child { display: flex; align-items: center; gap: 10px; }
.ticket-card > div:first-child > span { font-size: 1.25rem; }
.ticket-card h3 { margin-bottom: 3px; }
.ticket-card > .badge { float: right; margin-top: -34px; }
.ticket-card > p { margin: 15px 0; font-size: .88rem; }
.ticket-card > a, .attachment-link { color: var(--plum); font-size: .77rem; font-weight: 800; text-decoration: none; }
.staff-response { padding: 13px; border-left: 3px solid var(--lavender); background: var(--lavender-pale); }
.staff-response strong { font-size: .75rem; }
.staff-response p { margin: 4px 0 0; font-size: .82rem; }

.event-list-large { display: grid; gap: 20px; }
.event-detail-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.event-detail-card > img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; }
.event-detail-card__main { padding: 31px; }
.event-detail-card__main h2 { margin: 15px 0 12px; }
.event-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 22px 0; border-block: 1px solid var(--border); }
.event-facts > div { padding: 13px; border-right: 1px solid var(--border); }
.event-facts > div:last-child { border-right: 0; }
.event-facts dt { color: var(--ink-soft); font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.event-facts dd { margin-top: 3px; font-weight: 750; }
.event-hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .55fr); align-items: center; gap: 60px; }
.event-hero__grid > img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.event-hero h1 { margin-top: 12px; }
.event-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.detail-list > div { display: grid; grid-template-columns: 140px 1fr; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.detail-list dt { color: var(--ink-soft); }
.detail-list dd { font-weight: 750; }
.bracket { display: flex; gap: 22px; overflow-x: auto; padding: 5px 3px 20px; }
.bracket-round { min-width: 230px; display: grid; align-content: center; gap: 13px; }
.bracket-round h3 { font-size: 1rem; text-align: center; }
.bracket-match { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.bracket-match span { display: block; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: .76rem; font-weight: 750; }
.bracket-match span:last-child { border-bottom: 0; }

.staff-hero { padding-bottom: 0; }
.staff-hero .shell > p:not(.eyebrow) { margin-bottom: 30px; }
.staff-nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 1px; }
.staff-nav a { padding: 12px 15px; border-bottom: 3px solid transparent; color: var(--ink-soft); font-size: .82rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.staff-nav a:hover, .staff-nav a.is-active { color: var(--plum-deep); border-bottom-color: var(--plum); }
.member-admin-list { display: grid; gap: 16px; }
.member-admin-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.member-admin-summary { display: flex; align-items: center; gap: 18px; min-width: 0; }
.member-admin-summary h2 { margin: 10px 0 2px; font-size: 1.65rem; }
.member-admin-summary p { margin-bottom: 2px; }
.member-admin-summary small { display: block; color: var(--ink-soft); }
.ip-line { margin-top: 7px; }
.ip-line code { padding: 2px 5px; border-radius: 5px; background: var(--lavender-pale); }
.member-admin-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
details { position: relative; }
summary { color: var(--plum); cursor: pointer; font-size: .8rem; font-weight: 800; list-style: none; }
summary::-webkit-details-marker { display: none; }
.member-admin-actions details[open] { width: min(600px, 90vw); }
.member-admin-actions details[open] > form { position: absolute; z-index: 10; right: 0; width: min(560px, 88vw); padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.content-admin-list, .event-admin-list, .audit-list { display: grid; gap: 12px; }
.content-admin-card, .event-admin-card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); }
.content-admin-card > div:first-child { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.content-admin-card > div:first-child > span { font-size: 1.3rem; }
.content-admin-card h3, .event-admin-card h3 { margin: 8px 0 5px; }
.content-admin-card p, .event-admin-card p { margin-bottom: 5px; font-size: .84rem; }
.content-admin-card .button-row, .event-admin-card .button-row { justify-content: flex-end; margin-top: 12px; }
.event-admin-card details[open] form { padding-top: 12px; }
.button-split { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.button-split h2 { margin-bottom: 0; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.review-card { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.review-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.review-card__head > div { display: flex; gap: 10px; }
.review-card__head > div > span { font-size: 1.3rem; }
.review-card h3 { margin-bottom: 3px; }
.review-card p { font-size: .87rem; }
.muted { color: #9b929f; }
.audit-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 11px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: .74rem; }
.audit-row > span { color: var(--plum); font-weight: 800; }
.audit-row strong, .audit-row small { display: block; }
.audit-row small { color: var(--ink-soft); }
.audit-row time { color: #8f8593; white-space: nowrap; }

.security-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.security-grid article { padding: 27px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.security-grid article > span { font-size: 1.6rem; }
.security-grid h2 { margin: 18px 0 10px; font-size: 1.65rem; }
.security-grid p { margin-bottom: 0; font-size: .9rem; }
.prose p { font-size: 1.02rem; }

.empty-state { grid-column: 1 / -1; padding: 42px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius); text-align: center; background: rgba(255, 255, 255, .55); }
.empty-state.small { padding: 24px; border: 0; background: transparent; }
.empty-state > span { display: block; margin-bottom: 12px; font-size: 2rem; }
.empty-state h2, .empty-state h3 { margin-bottom: 8px; }
.empty-state p { margin-bottom: 0; }

.site-footer { padding: 60px 0 24px; color: #d5cad9; background: #1d0d25; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .75fr .9fr 1fr; gap: 35px; }
.footer-grid > div { display: grid; align-content: start; gap: 8px; }
.footer-grid strong { color: #fff; }
.footer-grid a { color: #cdbed2; font-size: .82rem; text-decoration: none; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { margin-bottom: 0; color: #ad9eb3; font-size: .82rem; }
.footer-brand { display: flex !important; flex-direction: row; gap: 15px !important; }
.footer-brand img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; }
.footer-brand strong { font-family: Georgia, serif; font-size: 1.25rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); color: #8f8095; font-size: .72rem; }

.chat-launcher {
  position: fixed;
  z-index: 130;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(234, 210, 154, .45);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #6d3585, #351543);
  box-shadow: 0 18px 45px rgba(49, 19, 62, .35);
  font-size: 1.3rem;
}
.chat-panel {
  position: fixed;
  z-index: 140;
  right: max(22px, env(safe-area-inset-right));
  bottom: calc(max(22px, env(safe-area-inset-bottom)) + 72px);
  width: min(390px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(103, 55, 127, .22);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(38, 15, 48, .35);
}
.chat-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; color: #fff; background: linear-gradient(135deg, #4a1c5d, #6f3a86); }
.chat-panel > header > div { display: flex; align-items: center; gap: 10px; }
.chat-panel header strong, .chat-panel header small { display: block; }
.chat-panel header small { color: #ddcee3; font-size: .65rem; }
.chat-panel header button { border: 0; color: #fff; background: transparent; font-size: 1.5rem; cursor: pointer; }
.concierge-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; font-family: Georgia, serif; }
.chat-messages { height: 310px; overflow-y: auto; padding: 16px; background: #fbf9fd; }
.chat-message { width: fit-content; max-width: 88%; margin-bottom: 10px; padding: 9px 11px; border-radius: 13px 13px 13px 4px; color: var(--ink); background: #eee4f6; font-size: .79rem; }
.chat-message--user { margin-left: auto; border-radius: 13px 13px 4px 13px; color: #fff; background: var(--plum); }
.chat-message a { display: block; margin-top: 7px; color: var(--plum); font-weight: 800; }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; border-top: 1px solid var(--border); }
.chat-quick button { flex: 0 0 auto; padding: 6px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--plum); background: #fff; font-size: .68rem; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 7px; padding: 11px; border-top: 1px solid var(--border); }
.chat-form input { min-height: 41px; }
.chat-form button { width: 42px; height: 42px; border: 0; border-radius: 50%; color: #fff; background: var(--plum); }

.secret-modal { position: fixed; z-index: 300; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(21, 8, 27, .72); backdrop-filter: blur(12px); }
.secret-card { position: relative; max-width: 530px; padding: 45px; border: 1px solid rgba(234, 210, 154, .45); border-radius: var(--radius-lg); text-align: center; background: #211029; box-shadow: var(--shadow-dark); }
.secret-card h2 { color: #fff; }
.secret-card p:not(.eyebrow) { color: #cabdce; }
.secret-card .eyebrow { color: var(--gold-soft); }
.secret-card > button { position: absolute; top: 12px; right: 16px; border: 0; color: #fff; background: transparent; font-size: 1.5rem; cursor: pointer; }
.secret-symbol { display: block; margin-top: 22px; font-size: 2rem; }
[hidden] { display: none !important; }

@media (max-width: 1100px) {
  .header-inner { grid-template-columns: auto auto 1fr; }
  .menu-button { display: block; order: 2; }
  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 20px;
    right: 20px;
    display: none;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: grid; }
  .site-nav a { padding: 11px 12px; }
  .header-actions { order: 3; }
  .hero-grid { grid-template-columns: 1fr 400px; gap: 45px; }
  .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-grid .event-card:last-child { grid-column: 1 / -1; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .security-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --header-height: 72px; }
  .shell { width: min(var(--shell), calc(100% - 28px)); }
  .header-inner { min-height: var(--header-height); gap: 10px; }
  .brand img { width: 44px; height: 44px; }
  .brand strong { font-size: 1rem; }
  .brand small { font-size: .54rem; }
  .header-actions .member-chip span, .header-actions > .text-button { display: none; }
  .header-actions { gap: 6px; }
  .hero-grid, .news-layout, .staff-social-grid, .history-preview, .form-layout, .auth-grid,
  .profile-layout, .event-hero__grid, .calendar-layout { grid-template-columns: 1fr; }
  .hero { padding-top: 62px; }
  .hero-copy { text-align: center; }
  .hero-copy .eyebrow, .hero-copy .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .hero-art { width: min(90%, 430px); }
  .daily-message { grid-template-columns: auto 1fr; }
  .daily-date { grid-column: 2; }
  .event-grid, .ranking-grid, .trophy-grid, .rules-grid, .membership-grid, .podium,
  .dashboard-columns, .action-grid, .review-grid, .security-grid, .event-info-grid { grid-template-columns: 1fr; }
  .event-grid .event-card:last-child, .membership-card--none { grid-column: auto; }
  .podium-card--1, .podium-card--2, .podium-card--3 { order: initial; padding-block: 32px; }
  .staff-list { grid-template-columns: 1fr; }
  .calendar-agenda, .profile-preview { position: static; }
  .calendar-day { min-height: 85px; padding: 7px; }
  .calendar-event-dot { font-size: 0; width: 7px; height: 7px; padding: 0; border-radius: 50%; }
  .calendar-dots { display: flex; flex-wrap: wrap; }
  .timeline::before { left: 29px; }
  .timeline-item { grid-template-columns: 58px 1fr; gap: 15px; }
  .timeline-date { grid-column: 2; grid-row: 1; text-align: left; padding-top: 0; }
  .timeline-marker { grid-column: 1; grid-row: 1 / span 2; }
  .timeline-card { grid-column: 2; }
  .auth-art { grid-template-rows: 220px 1fr; }
  .member-hero__inner { align-items: flex-start; }
  .member-identity { align-items: flex-start; }
  .event-detail-card { grid-template-columns: 1fr; }
  .event-detail-card > img { min-height: 220px; max-height: 300px; }
  .member-admin-card { grid-template-columns: 1fr; }
  .member-admin-actions { justify-content: flex-start; }
  .member-admin-actions details[open] > form { left: 0; right: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .brand span { display: none; }
  .header-actions .button { padding-inline: 12px; }
  .section { padding-block: 66px; }
  .hero h1 { font-size: clamp(2.7rem, 14vw, 4.1rem); }
  .hero-note { right: 0; bottom: 0; min-width: 160px; }
  .daily-message { padding: 18px; gap: 14px; }
  .daily-icon { width: 42px; height: 42px; }
  .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 27px; }
  .challenge-inner { align-items: flex-start; flex-direction: column; }
  .field-row, .benefit-list, .dashboard-grid { grid-template-columns: 1fr; }
  .benefit-list > div:nth-child(odd) { border-right: 0; }
  .benefit-list > div:last-child { border-bottom: 0; }
  .calendar-card { padding: 12px; }
  .calendar-day { min-height: 64px; }
  .calendar-weekdays span { padding-inline: 2px; font-size: .56rem; }
  .timeline-card { padding: 19px; }
  .form-card, .side-card { padding: 22px; }
  .auth-section { padding-top: 26px; }
  .auth-card { padding: 23px; }
  .auth-art { display: none; }
  .member-hero__inner, .member-identity { flex-direction: column; }
  .member-hero__inner > .button { width: 100%; }
  .event-facts { grid-template-columns: 1fr; }
  .event-facts > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .event-facts > div:last-child { border-bottom: 0; }
  .detail-list > div { grid-template-columns: 1fr; gap: 3px; }
  .member-admin-summary { align-items: flex-start; }
  .member-admin-summary .avatar { width: 54px; height: 54px; }
  .button-split { align-items: flex-start; flex-direction: column; }
  .audit-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .chat-panel { right: 10px; bottom: 82px; width: calc(100vw - 20px); }
  .chat-launcher { right: 14px; bottom: 14px; }
  .secret-card { padding: 38px 23px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Production account, setup and security controls */
.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
button:disabled,
.button[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  filter: grayscale(.15);
}
.password-meter {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  margin-top: -9px;
  color: var(--ink-soft);
  font-size: .71rem;
}
.password-meter::before {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 999px;
  content: "";
  background: linear-gradient(90deg, var(--plum) var(--password-strength, 0%), var(--lavender-soft) var(--password-strength, 0%));
  transition: background .2s ease;
}
.password-meter[data-score="0"] { --password-strength: 0%; }
.password-meter[data-score="1"] { --password-strength: 20%; }
.password-meter[data-score="2"] { --password-strength: 40%; }
.password-meter[data-score="3"] { --password-strength: 60%; }
.password-meter[data-score="4"] { --password-strength: 80%; }
.password-meter[data-score="5"] { --password-strength: 100%; }
.password-meter small { grid-column: 1 / -1; }
.password-meter strong { color: var(--plum-deep); font-size: .72rem; }
.password-guidance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--lavender-pale);
  color: var(--ink-soft);
  font-size: .72rem;
}
.password-guidance strong { width: 100%; color: var(--ink); }
.password-guidance span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(58, 29, 72, .05);
}
.avatar-upload-preview {
  width: 116px;
  height: 116px;
  margin: 0 auto 12px;
  border: 2px solid rgba(184, 135, 45, .45);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.setup-hero {
  padding: 78px 0 48px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(185, 153, 220, .35), transparent 33rem),
    linear-gradient(180deg, #fcfaff 0%, var(--lavender-pale) 100%);
}
.setup-hero p:not(.eyebrow) { max-width: 760px; margin-inline: auto; }
.setup-hero h1 { margin-bottom: 20px; font-size: clamp(2.8rem, 6vw, 5rem); }
.setup-shell { max-width: 1280px; }
.setup-form { display: grid; gap: 25px; }
.setup-token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr);
  gap: 20px;
  align-items: end;
  padding: 20px;
  border: 1px solid rgba(184, 135, 45, .25);
  border-radius: var(--radius);
  background: #fffaf0;
}
.setup-token-row label { display: grid; gap: 7px; color: var(--ink); font-size: .82rem; font-weight: 750; }
.setup-token-row p { margin: 0; font-size: .78rem; }
.owner-setup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.owner-setup-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.owner-setup-card legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  color: var(--plum-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}
.owner-setup-card legend span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--plum);
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: .72rem;
  font-weight: 800;
}
.owner-setup-card label { display: grid; gap: 7px; color: var(--ink); font-size: .79rem; font-weight: 750; }

.mfa-card { display: grid; gap: 28px; }
.mfa-steps { display: grid; gap: 12px; padding: 0; list-style: none; counter-reset: none; }
.mfa-steps > li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--lavender-pale);
}
.mfa-steps > li > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--plum);
  font-weight: 850;
}
.mfa-steps strong { display: block; color: var(--ink); }
.mfa-steps p { margin: 4px 0 0; font-size: .8rem; }
.secret-value,
.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  margin-top: 10px;
}
.secret-value {
  padding: 10px 12px;
  border: 1px dashed rgba(93, 42, 120, .35);
  border-radius: 10px;
  background: #fff;
}
.secret-value code,
.sensitive-value code {
  overflow-wrap: anywhere;
  color: var(--plum-deep);
  font-size: .8rem;
  font-weight: 800;
}
.copy-field input { min-width: 0; }
.sensitive-card { text-align: center; }
.sensitive-value {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid rgba(156, 63, 77, .2);
  border-radius: var(--radius-sm);
  background: #fff4f6;
}
.security-list,
.plain-steps { color: var(--ink-soft); }
.security-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.security-list li { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.security-list li > span { color: var(--red); font-weight: 900; }
.plain-steps { display: grid; gap: 9px; padding-left: 23px; }

.capacity-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.capacity-strip > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.capacity-strip span { color: var(--ink-soft); font-size: .75rem; font-weight: 750; }
.capacity-strip strong { color: var(--plum-deep); font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.risk-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin-top: 9px;
}
.risk-line > span:first-child { width: 100%; color: var(--ink-soft); font-size: .72rem; }
.risk-line code { padding: 2px 5px; border-radius: 5px; background: var(--lavender-pale); }
.member-admin-actions details[open] > div,
.member-admin-actions details[open] > form {
  position: absolute;
  z-index: 10;
  right: 0;
  width: min(560px, 88vw);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.member-admin-actions details[open] > div form + form { margin-top: 8px; }

.champion-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid rgba(184, 135, 45, .35);
  border-radius: 999px;
  color: #77541d;
  background: #fff9e9;
  font-size: .78rem;
  font-weight: 850;
}
.bracket-match > div { display: grid; }
.bracket-match span.is-winner { color: #22543c; background: #e7f5ec; }
.bracket-match.is-complete { border-color: rgba(41, 99, 72, .24); }
.bracket-match > small { display: block; padding: 7px 11px; color: var(--ink-soft); background: #fbfafc; font-size: .66rem; }
.bracket-winner-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 8px; border-top: 1px solid var(--border); }
.bracket-winner-form select { min-height: 38px; padding-block: 6px; font-size: .72rem; }
.waitlist-label { margin-top: 18px; }
.section-action { margin-top: 16px; }

@media (max-width: 980px) {
  .owner-setup-grid { grid-template-columns: 1fr; }
  .capacity-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .setup-token-row { grid-template-columns: 1fr; align-items: start; }
  .member-admin-actions details[open] > div,
  .member-admin-actions details[open] > form { left: 0; right: auto; }
}

@media (max-width: 560px) {
  .capacity-strip { grid-template-columns: 1fr; }
  .copy-field,
  .secret-value,
  .bracket-winner-form { grid-template-columns: 1fr; }
  .secret-value .text-button { justify-self: start; }
  .mfa-steps > li { grid-template-columns: 34px minmax(0, 1fr); padding: 13px; }
  .mfa-steps > li > span { width: 32px; height: 32px; }
  .owner-setup-card { padding: 17px; }
}

.privacy-summary {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(112, 77, 148, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(247, 241, 252, 0.72);
}
.privacy-summary strong { display: block; margin-bottom: .35rem; }
.privacy-summary p { margin: 0 0 .45rem; font-size: .9rem; color: var(--ink-soft); }
.privacy-summary a { font-size: .88rem; font-weight: 700; }

/* Published post media and owner-delegated staff permissions */
.content-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 16px 0;
}
.content-media-grid:has(.content-media:only-child) { grid-template-columns: minmax(0, 1fr); }
.content-media {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbf8ff;
  box-shadow: var(--shadow-sm);
}
.content-media img,
.content-media video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #21152d;
}
.content-media video { object-fit: contain; }
.content-media figcaption {
  padding: 9px 11px 0;
  color: var(--ink-soft);
  font-size: .74rem;
  line-height: 1.45;
}
.content-media > form {
  display: flex;
  justify-content: flex-end;
  padding: 8px 11px 11px;
}
.content-media-grid--manage .content-media { background: #fff; }
.announcement-card .content-media-grid,
.news-feature .content-media-grid,
.history-preview .content-media-grid,
.timeline-card .content-media-grid { margin-bottom: 10px; }
.announcement-card .content-media img,
.announcement-card .content-media video { aspect-ratio: 4 / 3; }
.news-feature { min-width: 0; }
.news-feature > div { min-width: 0; }
.history-preview > div { min-width: 0; }

.content-admin-card { min-width: 0; }
.content-admin-card__copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
}
.content-admin-card__copy > span { font-size: 1.3rem; }
.content-admin-card__copy p { overflow-wrap: anywhere; }
.content-admin-card__actions { flex-wrap: wrap; }
.media-create-fieldset,
.permission-group {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(247, 241, 252, .7);
}
.media-create-fieldset legend,
.permission-group legend {
  padding: 0 6px;
  color: var(--plum-deep);
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
}
.media-upload-panel {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px dashed rgba(112, 77, 148, .34);
  border-radius: var(--radius-sm);
  background: rgba(247, 241, 252, .55);
}
.media-upload-panel > summary { color: var(--plum-deep); font-weight: 800; cursor: pointer; }
.media-upload-panel[open] > summary { margin-bottom: 12px; }
.media-upload-panel[data-full="true"] { opacity: .78; }

.permission-grid {
  display: grid;
  gap: 24px;
  margin-top: 22px;
}
.permission-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.permission-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #fbf8ff, #f5edff);
}
.permission-card__header h2 { margin: 8px 0 3px; }
.permission-card__header p { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.permission-card__header > strong {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--plum-deep);
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: .76rem;
}
.permission-form { display: grid; gap: 18px; padding: 22px; }
.permission-group > p { margin: 0 0 13px; color: var(--ink-soft); font-size: .82rem; }
.permission-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.permission-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(112, 77, 148, .14);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
}
.permission-item:hover { border-color: rgba(112, 77, 148, .36); background: #fcfaff; }
.permission-item input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--purple); }
.permission-item span { min-width: 0; }
.permission-item strong { display: block; color: var(--ink); font-size: .82rem; }
.permission-item small { display: block; margin-top: 4px; color: var(--ink-soft); font-size: .7rem; line-height: 1.45; }
.permission-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 4px;
}
.permission-form__footer p { margin: 0; color: var(--ink-soft); font-size: .78rem; }

@media (max-width: 760px) {
  .content-media-grid,
  .permission-list { grid-template-columns: 1fr; }
  .permission-card__header,
  .permission-form__footer { align-items: stretch; flex-direction: column; }
  .permission-card__header > strong { align-self: flex-start; }
  .permission-form__footer .button { width: 100%; }
}

@media (max-width: 480px) {
  .content-media img,
  .content-media video { aspect-ratio: 4 / 3; }
  .permission-card__header,
  .permission-form { padding: 17px; }
  .media-create-fieldset,
  .permission-group { padding: 13px; }
}

/* ========================================================================
   Lucifer's Lounge v3 · cinematic, responsive and theme-aware experience
   ======================================================================== */

:root {
  --surface: #f8f4fb;
  --surface-soft: #f1e9f6;
  --surface-raised: #ffffff;
  --surface-glass: rgba(255, 255, 255, .78);
  --surface-strong: #211028;
  --text: #23152b;
  --text-soft: #66596d;
  --accent: #6f367f;
  --accent-strong: #4d1f5d;
  --accent-soft: #eadcf2;
  --line: rgba(64, 30, 75, .14);
  --line-strong: rgba(64, 30, 75, .28);
  --luxury-gold: #c9a04d;
  --luxury-gold-soft: #f1dfaa;
  --success: #28714f;
  --danger: #a13f50;
  --info: #356f98;
  --card-shadow: 0 24px 70px rgba(45, 20, 55, .11);
  --card-shadow-hover: 0 30px 90px rgba(45, 20, 55, .17);
  --glass-blur: blur(22px) saturate(145%);
  --profile-bubble: var(--surface-raised);
  --profile-text: var(--text);
  --nickname-color: var(--text);
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f5edf8;
  --ink-soft: #c8b9ce;
  --plum: #c88cde;
  --plum-deep: #ead2f2;
  --plum-dark: #110815;
  --lavender: #9b6eaa;
  --lavender-soft: #3a2542;
  --lavender-pale: #24152b;
  --lilac: #100a13;
  --white: #1d1321;
  --gold: #dbb75f;
  --gold-soft: #f0daa1;
  --green: #72c59d;
  --red: #ee8597;
  --blue: #8bbde3;
  --border: rgba(239, 222, 246, .13);
  --border-strong: rgba(239, 222, 246, .26);
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, .22);
  --shadow: 0 28px 75px rgba(0, 0, 0, .34);
  --surface: #100a13;
  --surface-soft: #17101b;
  --surface-raised: #1d1422;
  --surface-glass: rgba(24, 15, 29, .82);
  --surface-strong: #09060b;
  --text: #f5edf8;
  --text-soft: #c8b9ce;
  --accent: #c88cde;
  --accent-strong: #e6baf5;
  --accent-soft: #302039;
  --line: rgba(239, 222, 246, .13);
  --line-strong: rgba(239, 222, 246, .28);
  --luxury-gold: #dbb75f;
  --luxury-gold-soft: #f0daa1;
  --success: #72c59d;
  --danger: #ee8597;
  --info: #8bbde3;
  --card-shadow: 0 26px 78px rgba(0, 0, 0, .34);
  --card-shadow-hover: 0 34px 95px rgba(0, 0, 0, .48);
  --profile-bubble: var(--surface-raised);
  --profile-text: var(--text);
  --nickname-color: var(--text);
}

html[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at 6% 3%, rgba(120, 47, 143, .26), transparent 32rem),
    radial-gradient(circle at 92% 12%, rgba(157, 106, 72, .17), transparent 30rem),
    linear-gradient(180deg, #100a13 0%, #0c080e 100%);
}

body {
  color: var(--text);
  background: var(--surface);
  transition: color .25s ease, background-color .25s ease;
}
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { color: var(--text); }
p { color: var(--text-soft); }

:is(button, a, input, select, textarea, summary) { touch-action: manipulation; }
button:not(.calendar-day),
.button,
.text-button,
.icon-button,
summary,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
select {
  min-height: 44px;
}
.button--small { min-height: 44px; }
.check-row,
.permission-item,
.segmented label { min-height: 44px; }

.site-header {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  transition: min-height .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 12px 40px rgba(31, 14, 38, .1);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
html[data-theme="dark"] .site-header.is-scrolled { box-shadow: 0 14px 46px rgba(0, 0, 0, .34); }
.brand-mark { position: relative; display: grid !important; place-items: center; }
.brand-mark::after {
  position: absolute;
  inset: -4px;
  content: "";
  border: 1px solid rgba(201, 160, 77, .38);
  border-radius: 50%;
  pointer-events: none;
}
.site-nav a,
.nav-more > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: 12px;
  color: var(--text-soft);
  font-size: .84rem;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}
.site-nav a:hover,
.site-nav a.is-active,
.nav-more > summary:hover,
.nav-more[open] > summary {
  color: var(--text);
  background: var(--accent-soft);
}
.nav-more { position: relative; }
.nav-more > summary { list-style: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary span { margin-left: 7px; transition: transform .2s ease; }
.nav-more[open] > summary span { transform: rotate(180deg); }
.nav-mega {
  position: absolute;
  top: calc(100% + 12px);
  right: -150px;
  z-index: 120;
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 10px;
  width: min(690px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-glass);
  box-shadow: var(--card-shadow);
  backdrop-filter: var(--glass-blur);
}
.nav-mega > div { display: grid; align-content: start; gap: 3px; min-width: 0; }
.nav-mega strong {
  padding: 5px 10px 8px;
  color: var(--luxury-gold);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.nav-mega a { justify-content: flex-start; width: 100%; }

.header-actions { min-width: max-content; }
.theme-toggle {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-glass);
  cursor: pointer;
  box-shadow: 0 7px 22px rgba(39, 19, 46, .06);
  backdrop-filter: blur(12px);
}
.theme-toggle:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.theme-toggle [data-theme-icon] { font-size: 1rem; line-height: 1; }
.theme-toggle__label { font-size: .73rem; font-weight: 800; }
.header-signin { display: inline-flex !important; align-items: center; white-space: nowrap; }
.member-chip {
  min-height: 44px;
  border-color: var(--line);
  color: var(--text);
  background: var(--surface-glass);
}
.menu-button { min-width: 44px; min-height: 44px; border-color: var(--line); background: var(--surface-raised); }
.menu-button span:not(.sr-only) { background: var(--text); }

/* Buttons */
.button {
  border-color: color-mix(in srgb, var(--accent) 75%, transparent);
  background: linear-gradient(135deg, #7b3e8d 0%, #4b1e5b 100%);
  box-shadow: 0 13px 30px rgba(78, 31, 99, .2);
}
html[data-theme="dark"] .button { background: linear-gradient(135deg, #9954ae 0%, #6e307f 100%); }
.button--luminous {
  border-color: rgba(241, 217, 157, .72);
  color: #281421;
  background: linear-gradient(135deg, #f5e5b7 0%, #cfa44e 100%);
  box-shadow: 0 16px 38px rgba(206, 164, 78, .25), inset 0 1px 0 rgba(255,255,255,.55);
}
.button--luminous:hover { box-shadow: 0 22px 48px rgba(206, 164, 78, .36); }
.button--glass {
  border-color: rgba(255, 255, 255, .33);
  color: #fff;
  background: rgba(255, 255, 255, .11);
  box-shadow: none;
  backdrop-filter: blur(14px);
}
.button--glass:hover { background: rgba(255, 255, 255, .19); }
.button--wide { min-width: min(100%, 240px); }
.button[disabled], button[disabled] { cursor: not-allowed; opacity: .56; transform: none !important; }
.text-button { display: inline-flex; align-items: center; justify-content: center; color: var(--accent); }
.icon-button { display: inline-grid; min-width: 44px; min-height: 44px; place-items: center; }
.icon-button--small { min-width: 44px; min-height: 44px; }

/* Cinematic home banner */
.cinematic-hero {
  position: relative;
  min-height: min(780px, calc(100svh - var(--header-height)));
  overflow: hidden;
  display: grid;
  align-items: center;
  isolation: isolate;
  background:
    radial-gradient(circle at 72% 34%, rgba(175, 99, 198, .34), transparent 30%),
    radial-gradient(circle at 20% 70%, rgba(198, 151, 69, .16), transparent 34%),
    #120918;
}
.cinematic-hero__video {
  position: absolute;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.9) contrast(1.08) brightness(.78);
}
.cinematic-hero__veil {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(15, 6, 20, .94) 0%, rgba(18, 8, 24, .75) 46%, rgba(18, 8, 24, .34) 74%, rgba(18, 8, 24, .6) 100%),
    linear-gradient(180deg, rgba(11, 5, 14, .2), rgba(11, 5, 14, .76));
}
.cinematic-hero__aurora {
  position: absolute;
  z-index: -2;
  width: 48vw;
  height: 48vw;
  right: -11vw;
  top: -18vw;
  border-radius: 50%;
  background: conic-gradient(from 140deg, rgba(203, 166, 89, .18), rgba(144, 70, 165, .34), rgba(83, 32, 104, .05), rgba(203, 166, 89, .18));
  filter: blur(45px);
  animation: loungeAurora 16s ease-in-out infinite alternate;
}
@keyframes loungeAurora {
  from { transform: rotate(-8deg) scale(.92); opacity: .66; }
  to { transform: rotate(18deg) scale(1.08); opacity: 1; }
}
.cinematic-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  align-items: center;
  gap: clamp(42px, 7vw, 100px);
  padding-block: clamp(90px, 13vh, 150px);
}
.cinematic-hero__copy { max-width: 760px; }
.cinematic-hero__copy .eyebrow { color: var(--luxury-gold-soft); }
.cinematic-hero__copy h1 {
  max-width: 880px;
  margin-bottom: 22px;
  color: #fff;
  font-size: clamp(4rem, 9vw, 8.5rem);
  letter-spacing: -.055em;
  text-wrap: balance;
  text-shadow: 0 12px 45px rgba(0, 0, 0, .34);
}
.cinematic-hero__copy > p:not(.eyebrow) {
  max-width: 650px;
  margin-bottom: 32px;
  color: #ded1e3;
  font-size: clamp(1rem, 1.65vw, 1.25rem);
}
.cinematic-hero .hero-actions { justify-content: flex-start; gap: 12px; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 20px;
  margin-top: 30px;
  color: #d6c8db;
  font-size: .77rem;
  font-weight: 700;
}
.hero-facts span { display: inline-flex; align-items: center; gap: 7px; }
.hero-facts span::before { width: 5px; height: 5px; content: ""; border-radius: 50%; background: var(--luxury-gold); box-shadow: 0 0 0 5px rgba(201,160,77,.12); }
.hero-facts strong { color: #fff; }
.cinematic-hero__emblem {
  position: relative;
  display: grid;
  width: min(32vw, 360px);
  aspect-ratio: 1;
  place-items: center;
  justify-self: end;
  border: 1px solid rgba(238, 217, 159, .26);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.11), rgba(255,255,255,.015) 65%);
  box-shadow: inset 0 0 80px rgba(255,255,255,.045), 0 45px 90px rgba(0,0,0,.34);
  backdrop-filter: blur(8px);
}
.cinematic-hero__emblem img {
  width: 58%;
  aspect-ratio: 1;
  border: 2px solid rgba(240, 218, 161, .5);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 14px rgba(255,255,255,.035), 0 25px 50px rgba(0,0,0,.42);
}
.cinematic-hero__emblem small {
  position: absolute;
  bottom: 12%;
  color: #eadcb9;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.emblem-ring {
  position: absolute;
  inset: 8%;
  border: 1px dashed rgba(239, 219, 162, .34);
  border-radius: 50%;
  animation: emblemSpin 28s linear infinite;
}
.emblem-ring::before,
.emblem-ring::after { position: absolute; width: 9px; height: 9px; content: ""; border-radius: 50%; background: var(--luxury-gold); box-shadow: 0 0 18px var(--luxury-gold); }
.emblem-ring::before { top: -5px; left: 50%; }
.emblem-ring::after { bottom: -5px; left: 50%; }
@keyframes emblemSpin { to { transform: rotate(360deg); } }

/* Page banners */
.page-hero,
.staff-hero,
.page-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(74px, 10vw, 128px);
  border-bottom: 1px solid rgba(235, 213, 243, .11);
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(16, 7, 21, .95), rgba(31, 11, 40, .72) 58%, rgba(31, 11, 40, .45)),
    var(--page-image, none),
    radial-gradient(circle at 83% 25%, #7a378d, #27112f 58%, #120917);
  background-position: center;
  background-size: cover;
}
.page-hero::after,
.staff-hero::after,
.page-banner::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(115deg, transparent 58%, rgba(224, 184, 93, .09));
  pointer-events: none;
}
.page-hero .shell,
.staff-hero .shell,
.page-banner__inner { position: relative; z-index: 2; }
.page-hero h1,
.staff-hero h1,
.page-banner h1 { max-width: 940px; margin-bottom: 18px; color: #fff; text-wrap: balance; }
.page-hero p:not(.eyebrow),
.staff-hero p:not(.eyebrow),
.page-banner p:not(.eyebrow) { max-width: 740px; margin-bottom: 0; color: #d9cadf; }
.page-hero .eyebrow,
.staff-hero .eyebrow,
.page-banner .eyebrow { color: var(--luxury-gold-soft); }
.page-banner__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 40px; }
.page-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.page-banner__mark {
  display: grid;
  width: clamp(110px, 16vw, 190px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(241, 220, 162, .34);
  border-radius: 50%;
  color: rgba(255, 255, 255, .68);
  background: rgba(255, 255, 255, .045);
  font-family: Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -.08em;
  box-shadow: inset 0 0 42px rgba(255,255,255,.035);
  backdrop-filter: blur(10px);
}
.page-banner__glow { position: absolute; z-index: 0; width: 360px; height: 360px; right: 7%; top: -50%; border-radius: 50%; background: rgba(145, 69, 168, .32); filter: blur(70px); }
.page-banner--founder { --page-image: url('/site-assets/page-founder'); }
.page-banner--rules { --page-image: url('/site-assets/page-rules'); }
.page-banner--submit-tab { --page-image: url('/site-assets/page-submit-tab'); }
.page-banner--memberships { --page-image: url('/site-assets/page-memberships'); }
.page-banner--leaderboard { --page-image: url('/site-assets/page-leaderboard'); }
.page-banner--calendar { --page-image: url('/site-assets/page-calendar'); }
.page-banner--announcements { --page-image: url('/site-assets/page-announcements'); }
.page-banner--trophies { --page-image: url('/site-assets/page-trophies'); }
.page-banner--tournaments { --page-image: url('/site-assets/page-tournaments'); }
.page-banner--history { --page-image: url('/site-assets/page-history'); }
.page-banner--birthdays { --page-image: url('/site-assets/page-birthdays'); }
.page-banner--contest { --page-image: url('/site-assets/page-contest'); }
.page-banner--challenge { --page-image: url('/site-assets/page-challenge'); }
.page-banner--registration { --page-image: url('/site-assets/page-registration'); }
.page-banner--staff { --page-image: url('/site-assets/page-staff'); }
.page-banner--security { --page-image: url('/site-assets/page-security'); }
.page-banner--contact { --page-image: url('/site-assets/page-contact'); }
.page-banner--members { --page-image: url('/site-assets/page-memberships'); }
.page-hero--history { --page-image: url('/site-assets/page-history'); }
.page-hero--memberships { --page-image: url('/site-assets/page-memberships'); }

/* Shared modern surfaces */
.section { position: relative; }
.section--tint { background: var(--surface-soft); }
.section--messages { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%); }
:is(
  .message-card, .game-day-card, .editorial-card, .social-post, .founder-profile,
  .house-rule, .archive-event, .mvp-archive__item, .birthday-card, .contact-card,
  .full-profile-card, .contest-head, .contest-history article, .contest-review-card,
  .design-asset, .content-admin-card, .form-card, .side-card, .security-grid article,
  .profile-preview, .member-directory-card, .membership-card, .event-timeline__item,
  .submission-list article, .owner-transfer-card, .permission-card
) {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: var(--card-shadow);
}
:is(.message-card, .editorial-card, .contact-card, .member-directory-card, .staff-card--interactive, .birthday-card, .event-timeline__item) {
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
:is(.message-card, .editorial-card, .contact-card, .member-directory-card, .staff-card--interactive, .birthday-card, .event-timeline__item):hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--card-shadow-hover);
}

.message-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.message-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; min-width: 0; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-radius: 24px; }
.message-card__icon { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid rgba(201,160,77,.28); border-radius: 18px; color: var(--luxury-gold); background: linear-gradient(145deg, rgba(241,223,170,.3), rgba(111,54,127,.08)); font-size: 1.45rem; }
.message-card h3 { margin-bottom: 9px; }
.message-card p:last-child { margin-bottom: 0; }
.game-day-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 36px; padding: clamp(28px, 5vw, 52px); border: 1px solid var(--line); border-radius: 30px; overflow: hidden; }
.game-day-card::before { position: absolute; width: 260px; height: 260px; right: -80px; bottom: -140px; content: ""; border-radius: 50%; background: rgba(118,55,137,.13); filter: blur(20px); }
.game-day-card h2 { margin-bottom: 10px; }
.game-day-card p { max-width: 680px; margin-bottom: 0; }
.game-day-card__action { position: relative; display: grid; justify-items: end; gap: 13px; }
.live-indicator,
.system-closed { display: inline-flex; min-height: 34px; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: .73rem; font-weight: 820; }
.live-indicator { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.live-indicator i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 16%, transparent); animation: livePulse 1.8s ease-in-out infinite; }
@keyframes livePulse { 50% { box-shadow: 0 0 0 9px transparent; } }
.system-closed { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

.editorial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.editorial-list { display: grid; gap: 24px; }
.editorial-card { min-width: 0; padding: clamp(22px, 3vw, 31px); border: 1px solid var(--line); border-radius: 24px; }
.editorial-card--full { padding: clamp(25px, 4vw, 42px); }
.editorial-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; color: var(--text-soft); font-size: .72rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.editorial-card__meta span { color: var(--accent); }
.editorial-card h2, .editorial-card h3 { overflow-wrap: anywhere; }

/* Rich post typography */
.content-style { overflow-wrap: anywhere; }
.content-font-serif { font-family: Georgia, "Times New Roman", serif; }
.content-font-sans { font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.content-font-display { font-family: Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: -.015em; }
.content-size-small { font-size: .86rem; }
.content-size-normal { font-size: 1rem; }
.content-size-large { font-size: clamp(1.06rem, 2vw, 1.24rem); }
.content-size-xl { font-size: clamp(1.25rem, 3vw, 1.7rem); line-height: 1.45; }
.content-align-left { text-align: left; }
.content-align-center { text-align: center; }
.content-align-right { text-align: right; }
.content-color-default { color: var(--text-soft); }
.content-color-purple { color: var(--accent); }
.content-color-gold { color: var(--luxury-gold); }
.content-color-red { color: var(--danger); }
.content-color-blue { color: var(--info); }
.content-color-green { color: var(--success); }
.content-color-light { color: #f8f1fa; }
.rich-style-controls { display: grid; gap: 12px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.rich-style-controls legend { padding-inline: 7px; color: var(--accent); font-size: .75rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.style-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.content-composer { min-width: 0; }

/* Media carousel */
.content-media-single,
.media-carousel { width: 100%; margin-top: 20px; }
.media-carousel { position: relative; min-width: 0; }
.media-carousel__viewport { width: 100%; overflow: auto hidden; border-radius: 20px; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-inline: contain; }
.media-carousel__viewport::-webkit-scrollbar { display: none; }
.media-carousel__track { display: flex; width: 100%; }
.carousel-slide { flex: 0 0 100%; min-width: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.content-media { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #0d0910; box-shadow: var(--shadow-sm); }
.content-media img,
.content-media video,
.content-media-single img,
.content-media-single video { display: block; width: 100%; max-height: min(72vh, 760px); aspect-ratio: 16 / 10; object-fit: cover; object-position: center; background: #0d0910; }
.social-post .content-media img,
.social-post .content-media video { aspect-ratio: 1 / 1; }
.content-media figcaption { padding: 10px 14px; color: #ddd0e2; background: #170d1b; font-size: .75rem; }
.carousel-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 8, 18, .62);
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  cursor: pointer;
}
.carousel-control--prev { left: 14px; }
.carousel-control--next { right: 14px; }
.carousel-control:disabled { opacity: .32; }
.carousel-status { position: absolute; z-index: 5; right: 14px; bottom: 14px; min-width: 54px; padding: 6px 10px; border-radius: 999px; color: #fff; background: rgba(15,8,18,.68); text-align: center; font-size: .7rem; font-weight: 800; backdrop-filter: blur(10px); }
.media-manage-row { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px; background: var(--surface-raised); }
.media-manage-row form { margin: 0; }

/* Founder, rules, history and celebrations */
.founder-layout { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: clamp(28px, 5vw, 70px); align-items: start; }
.founder-profile { position: sticky; top: calc(var(--header-height) + 24px); display: grid; justify-items: center; gap: 18px; padding: clamp(26px, 4vw, 40px); border: 1px solid var(--line); border-radius: 28px; text-align: center; }
.founder-profile.profile-trigger { width: 100%; }
.founder-profile h2 { margin-bottom: 10px; }
.founder-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 15px; }
.social-feed { display: grid; gap: 25px; min-width: 0; }
.social-post { min-width: 0; padding: clamp(22px, 4vw, 38px); border: 1px solid var(--line); border-radius: 26px; }
.social-post > header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 18px; }
.social-post > header > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 16px; color: var(--luxury-gold); background: var(--surface-soft); font-size: 1.35rem; }
.social-post h2 { margin-bottom: 0; }
.house-rules { display: grid; gap: 17px; counter-reset: lounge-rule; }
.house-rule { display: grid; grid-template-columns: 68px minmax(0, 1fr) minmax(110px, 180px); gap: 22px; align-items: center; min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 23px; }
.house-rule__number { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid rgba(201,160,77,.32); border-radius: 18px; color: var(--luxury-gold); background: linear-gradient(145deg, rgba(241,223,170,.22), transparent); font-family: Georgia, serif; font-size: 1.45rem; }
.house-rule__copy h2 { margin-bottom: 7px; font-size: clamp(1.35rem, 2.4vw, 2rem); }
.house-rule__copy p { margin: 0; }
.house-rule__media { overflow: hidden; border-radius: 16px; }
.house-rule__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.house-rule__symbol { display: grid; width: 100%; aspect-ratio: 4 / 3; place-items: center; border-radius: 16px; color: var(--accent); background: var(--surface-soft); font-size: 2rem; }
.archive-event-list { display: grid; gap: 13px; }
.archive-event { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: 20px; }
.archive-event h2 { margin-bottom: 7px; font-size: clamp(1.4rem, 2.4vw, 2rem); }
.archive-event p { margin: 0; }
.archive-event > div:last-child { display: grid; justify-items: end; gap: 9px; }
.birthday-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 15px; }
.birthday-card { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 14px; width: 100%; min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 20px; text-align: left; }
.birthday-card h3 { margin-bottom: 4px; font-size: 1.15rem; }
.birthday-card p { margin-bottom: 7px; }

/* Trophy Cabinet */
.mvp-spotlight { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 5vw, 60px); align-items: center; min-height: 340px; padding: clamp(34px, 6vw, 70px); border: 1px solid rgba(235,209,141,.2); border-radius: 34px; overflow: hidden; background: radial-gradient(circle at 15% 20%, rgba(217,183,95,.18), transparent 34%), linear-gradient(135deg, #27122f, #130918); box-shadow: var(--shadow-dark); }
.mvp-spotlight::after { position: absolute; width: 340px; height: 340px; right: -140px; top: -130px; content: ""; border: 1px solid rgba(235,209,141,.18); border-radius: 50%; box-shadow: 0 0 0 30px rgba(235,209,141,.03), 0 0 0 60px rgba(235,209,141,.025); }
.mvp-spotlight h1, .mvp-spotlight h2 { color: #fff; }
.mvp-spotlight p, .mvp-spotlight .content-style { color: #d7c8dc; }
.mvp-crown { position: absolute; top: 24px; right: 30px; color: var(--luxury-gold); font-size: 2.7rem; }
.mvp-avatar { position: relative; z-index: 1; border: 0; background: transparent; }
.mvp-archive { display: grid; gap: 18px; }
.mvp-archive__item { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(220px, .65fr); gap: 22px; align-items: center; padding: 24px; border: 1px solid var(--line); border-radius: 22px; }
.mvp-archive__item > span { color: var(--luxury-gold); font-size: 2rem; }
.trophy-grid--modern { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trophy-grid--modern .trophy-card { color: #fff; background: linear-gradient(145deg, #2a1432, #150b19); }
.trophy-grid--modern .trophy-card h2 { color: #fff; font-size: 1.65rem; }
.trophy-grid--modern .trophy-card .content-style { color: #d2c4d7; }

/* Memberships */
.membership-grid--modern { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.membership-grid--modern .membership-card { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 28px; }
.membership-banner { position: relative; min-height: 158px; overflow: hidden; background: linear-gradient(135deg, #30163a, #6d337e); }
.membership-banner img { width: 100%; height: 100%; min-height: 158px; max-height: 230px; object-fit: cover; }
.membership-banner::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg, transparent, rgba(15,7,19,.42)); }
.membership-grid--modern .membership-card > :not(.membership-banner) { margin-inline: 26px; }
.membership-grid--modern .membership-card > :last-child { margin-bottom: 28px; }
.membership-benefits-locked { display: grid; place-items: center; min-height: 110px; margin-block: 20px 26px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: 17px; text-align: center; background: var(--surface-soft); }
.membership-benefits-locked span { display: block; margin-bottom: 8px; font-size: 1.5rem; }

/* Events and home timeline */
.home-timeline,
.event-timeline { display: grid; gap: 13px; }
.home-event { display: grid; grid-template-columns: 64px 165px minmax(0, 1fr); gap: 20px; min-width: 0; padding: 22px 24px; border: 1px solid rgba(255,255,255,.11); border-radius: 22px; background: rgba(255,255,255,.045); backdrop-filter: blur(12px); }
.home-event__rail { display: grid; place-items: start center; }
.home-event__rail span { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(231,202,132,.28); border-radius: 15px; color: var(--luxury-gold-soft); font-family: Georgia, serif; font-size: 1.2rem; }
.home-event__time { display: grid; align-content: center; gap: 4px; color: #fff; }
.home-event__time strong { font-size: .9rem; }
.home-event__time small { color: #bdaec3; }
.home-event__copy h3 { margin: 8px 0 6px; color: #fff; }
.home-event__copy p { margin-bottom: 8px; color: #cbbdd0; }
.home-event__copy .text-link { color: var(--luxury-gold-soft); }
.event-timeline__item { display: grid; grid-template-columns: 54px 175px minmax(0,1fr) auto; gap: 18px; align-items: center; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 21px; text-decoration: none; }
.event-timeline__item > span:first-child { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; color: var(--accent); background: var(--surface-soft); font-family: Georgia, serif; }
.event-timeline__item time { color: var(--text-soft); font-size: .78rem; font-weight: 750; }
.event-timeline__item h3 { margin-bottom: 5px; font-size: 1.25rem; }
.event-timeline__item p { margin: 0; }

/* Profiles and directory */
.profile-trigger {
  appearance: none;
  border: 1px solid var(--line);
  color: var(--profile-text, var(--text));
  background: var(--profile-bubble, var(--surface-raised));
  font: inherit;
  cursor: pointer;
}
.profile-trigger :is(h2, h3, strong) { color: var(--nickname-color, var(--text)); }
.profile-trigger p { color: color-mix(in srgb, var(--profile-text, var(--text)) 72%, transparent); }
.staff-list--home,
.staff-list--contact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.staff-card--interactive { width: 100%; min-width: 0; text-align: left; }
.member-search { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 25px; padding: 11px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-raised); box-shadow: var(--shadow-sm); }
.member-search label { flex: 1; margin: 0; }
.member-search input { width: 100%; border: 0; background: transparent; box-shadow: none; }
.member-search > span { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: .75rem; font-weight: 800; }
.members-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.member-directory-card { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 15px; width: 100%; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 21px; text-align: left; }
.member-directory-card h3 { margin-bottom: 7px; font-size: 1.15rem; overflow-wrap: anywhere; }
.member-directory-card p { margin: 7px 0 0; }
.full-profile-card { display: grid; grid-template-columns: auto minmax(0,1fr); gap: clamp(22px, 4vw, 42px); align-items: start; padding: clamp(28px, 5vw, 52px); border: 1px solid var(--line); border-radius: 30px; color: var(--profile-text, var(--text)); background: var(--profile-bubble, var(--surface-raised)); }
.full-profile-card h2 { color: var(--nickname-color, var(--text)); }
.full-profile-card p { color: color-mix(in srgb, var(--profile-text, var(--text)) 75%, transparent); }
.full-profile-card dl,
.profile-popover dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 22px 0; }
.full-profile-card dl > div,
.profile-popover dl > div { padding: 13px; border-radius: 14px; background: color-mix(in srgb, var(--profile-text, var(--text)) 6%, transparent); }
.full-profile-card dt,
.profile-popover dt { color: color-mix(in srgb, var(--profile-text, var(--text)) 62%, transparent); font-size: .69rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.full-profile-card dd,
.profile-popover dd { margin-top: 3px; color: var(--profile-text, var(--text)); font-weight: 750; }
.profile-preview { color: var(--profile-text, var(--text)); background: var(--profile-bubble, var(--surface-raised)); }
.profile-preview h2 { color: var(--nickname-color, var(--text)); }
.profile-preview p { color: color-mix(in srgb, var(--profile-text, var(--text)) 72%, transparent); }

/* Profile modal */
.profile-modal { position: fixed; z-index: 500; inset: 0; display: grid; place-items: center; padding: 18px; }
.profile-modal__backdrop { position: absolute; inset: 0; background: rgba(8,4,10,.72); backdrop-filter: blur(14px); }
.profile-modal__card { position: relative; z-index: 1; width: min(680px, 100%); max-height: min(86svh, 760px); overflow: auto; border: 1px solid rgba(255,255,255,.18); border-radius: 30px; color: var(--profile-text, var(--text)); background: var(--profile-bubble, var(--surface-raised)); box-shadow: 0 38px 110px rgba(0,0,0,.48); }
.profile-modal__close { position: sticky; z-index: 3; top: 13px; float: right; display: grid; width: 48px; height: 48px; margin: 13px 13px -61px 0; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--profile-text, var(--text)); background: color-mix(in srgb, var(--profile-bubble, var(--surface-raised)) 87%, transparent); font-size: 1.65rem; cursor: pointer; backdrop-filter: blur(12px); }
.profile-modal__content { min-height: 260px; }
.profile-modal__loading { display: grid; min-height: 280px; place-items: center; align-content: center; gap: 13px; color: var(--text-soft); }
.profile-modal__loading span { width: 40px; height: 40px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: modalSpin .8s linear infinite; }
@keyframes modalSpin { to { transform: rotate(360deg); } }
.profile-popover { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 30px; align-items: start; padding: 58px 34px 34px; }
.profile-popover__avatar { display: grid; place-items: center; }
.profile-popover__copy h2 { margin-bottom: 12px; color: var(--nickname-color, var(--profile-text, var(--text))); font-size: clamp(2rem, 5vw, 3.1rem); overflow-wrap: anywhere; }
.profile-popover__bio { margin-top: 18px; color: color-mix(in srgb, var(--profile-text, var(--text)) 74%, transparent); }

/* Badges with owner-customised colours and emoji */
.badge--role,
.badge--membership { display: inline-flex; align-items: center; gap: 6px; border: 0; }
.badge--role::before,
.badge--membership::before { font-size: .9em; }
.badge--role-owner { color: var(--role-owner-text, #39220a); background: var(--role-owner-bg, #f0d58a); }
.badge--role-owner::before { content: var(--role-owner-emoji, "♛"); }
.badge--role-admin { color: var(--role-admin-text, #4a1d67); background: var(--role-admin-bg, #e9d8ff); }
.badge--role-admin::before { content: var(--role-admin-emoji, "✦"); }
.badge--role-moderator { color: var(--role-moderator-text, #173f63); background: var(--role-moderator-bg, #d8ecff); }
.badge--role-moderator::before { content: var(--role-moderator-emoji, "◆"); }
.badge--role-member { color: var(--role-member-text, #382d40); background: var(--role-member-bg, #eeeaf3); }
.badge--role-member::before { content: var(--role-member-emoji, "•"); }
.badge--membership-diamond { color: var(--tier-diamond-text, #183b46); background: var(--tier-diamond-bg, #dff7ff); }
.badge--membership-diamond::before { content: var(--tier-diamond-emoji, "💎"); }
.badge--membership-gold { color: var(--tier-gold-text, #4c3508); background: var(--tier-gold-bg, #f5dda0); }
.badge--membership-gold::before { content: var(--tier-gold-emoji, "✦"); }
.badge--membership-silver { color: var(--tier-silver-text, #29323a); background: var(--tier-silver-bg, #e4e9ed); }
.badge--membership-silver::before { content: var(--tier-silver-emoji, "◈"); }
.badge--membership-bronze { color: var(--tier-bronze-text, #4b2a16); background: var(--tier-bronze-bg, #e5bf9d); }
.badge--membership-bronze::before { content: var(--tier-bronze-emoji, "◆"); }

/* Contest */
.contest-head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 30px; align-items: center; padding: clamp(25px, 4vw, 42px); border: 1px solid var(--line); border-radius: 26px; margin-bottom: 24px; }
.contest-head h2 { margin: 8px 0 12px; }
.contest-head__counts { display: grid; grid-template-columns: repeat(2, minmax(110px,1fr)); gap: 10px; }
.contest-head__counts span { display: grid; gap: 3px; min-width: 120px; padding: 16px; border-radius: 17px; color: var(--text-soft); background: var(--surface-soft); text-align: center; font-size: .74rem; }
.contest-head__counts strong { color: var(--accent); font-family: Georgia, serif; font-size: 1.8rem; }
.contest-carousel { max-width: 860px; margin-inline: auto; }
.contest-entry { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(260px, .82fr); min-height: 480px; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: var(--surface-raised); }
.contest-entry__image { position: relative; min-height: 480px; overflow: hidden; background: #100916; }
.contest-entry__image img { width: 100%; height: 100%; min-height: 480px; object-fit: contain; object-position: center; }
.contest-entry__image > span { position: absolute; left: 15px; top: 15px; display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: #fff; background: rgba(15,8,18,.67); font-family: Georgia, serif; backdrop-filter: blur(10px); }
.contest-entry__copy { display: grid; align-content: center; gap: 15px; padding: clamp(24px, 4vw, 40px); }
.contest-entry__copy .profile-trigger--heading { width: fit-content; min-height: 44px; padding: 0; border: 0; background: transparent; text-align: left; }
.contest-entry__copy h3 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.7rem); }
.contest-votes { display: flex; flex-wrap: wrap; gap: 8px; }
.contest-votes span { padding: 7px 10px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: .73rem; font-weight: 800; }
.vote-confirmed { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 9px 13px; border-radius: 14px; color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); font-weight: 820; }
.contest-note { margin: 18px 0 0; text-align: center; }
.contest-history { display: grid; gap: 13px; }
.contest-history article { display: grid; grid-template-columns: minmax(190px,.4fr) minmax(0,1fr); gap: 20px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 19px; }
.contest-history h3 { margin: 5px 0 0; font-size: 1.25rem; }
.contest-history__winners { display: flex; flex-wrap: wrap; gap: 8px; }
.contest-history__winners span { padding: 7px 10px; border-radius: 999px; background: var(--surface-soft); font-size: .76rem; }
.contest-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.contest-review-card { display: grid; grid-template-columns: minmax(150px,.55fr) minmax(0,1fr); gap: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 21px; }
.contest-review-card > img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; }
.contest-review-card > div { padding: 20px 20px 20px 0; }
.contest-admin-list { display: grid; gap: 12px; }
.contest-admin-list > article { padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-raised); }
.contest-admin-list h3 { margin: 8px 0 5px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.contact-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 15px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 21px; text-decoration: none; }
.contact-card > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 16px; color: var(--accent); background: var(--accent-soft); font-size: 1.2rem; }
.contact-card h3 { margin-bottom: 4px; font-size: 1.15rem; }
.contact-card p { margin: 0; overflow-wrap: anywhere; }
.contact-card i { color: var(--luxury-gold); font-style: normal; font-size: 1.2rem; }

/* Staff design centre */
.design-assets-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.design-asset { display: grid; grid-template-columns: minmax(170px,.75fr) minmax(0,1.25fr); gap: 20px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 22px; }
.design-asset__preview { min-height: 180px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(135deg, #2d1435, #140a18); }
.design-asset__preview img,
.design-asset__preview video { width: 100%; height: 100%; min-height: 180px; max-height: 270px; object-fit: cover; }
.design-asset__empty { display: grid; min-height: 180px; place-items: center; padding: 18px; color: #c9b7cf; text-align: center; }
.design-asset h3 { margin-bottom: 4px; }
.design-asset > div:last-child > p { margin-bottom: 14px; font-size: .72rem; }
.profile-style-fields { margin: 18px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.profile-style-fields legend { padding-inline: 7px; color: var(--accent); font-weight: 800; }
.owner-transfer-card { padding: 22px; border: 1px solid var(--line); border-radius: 20px; }

/* Forms, validation, cropper and progress */
input,
select,
textarea {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-raised);
}
input::placeholder,
textarea::placeholder { color: color-mix(in srgb, var(--text-soft) 72%, transparent); }
input:hover,
select:hover,
textarea:hover { border-color: var(--line-strong); }
input:focus,
select:focus,
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
label.has-error > input,
label.has-error > select,
label.has-error > textarea,
.file-drop.has-error { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 12%, transparent); }
.field-error { display: block; margin-top: 7px; color: var(--danger) !important; font-size: .75rem !important; font-weight: 720; line-height: 1.45; }
.character-counter { display: block; margin-top: 6px; color: var(--text-soft); text-align: right; font-size: .7rem; }
.form-errors { margin-bottom: 12px; padding: 11px 13px; border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); border-radius: 12px; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.fine-print { color: var(--text-soft); font-size: .73rem; line-height: 1.5; }
.notice--warning { border-color: rgba(202,151,56,.32); color: #795510; background: #fff5d9; }
html[data-theme="dark"] .notice--warning { color: #f3d78e; background: #2d2413; }
.password-meter { display: grid; gap: 6px; margin-top: 8px; }
.password-meter > span { height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); }
.password-meter > span i { display: block; width: calc(var(--password-score, 0) * 20%); height: 100%; border-radius: inherit; background: var(--danger); transition: width .2s ease, background .2s ease; }
.password-meter[data-score="1"] > span i { width: 20%; }
.password-meter[data-score="2"] > span i { width: 40%; background: #bd7337; }
.password-meter[data-score="3"] > span i { width: 60%; background: #b08f35; }
.password-meter[data-score="4"] > span i { width: 80%; background: var(--success); }
.password-meter[data-score="5"] > span i { width: 100%; background: var(--success); }
.password-meter small { color: var(--text-soft); }
.file-drop { border-color: var(--line-strong); background: var(--surface-soft); }
.file-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.avatar-cropper { display: grid; gap: 17px; padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-soft); }
.avatar-cropper__stage { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin-inline: auto; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 50%; background: #100a13; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.avatar-cropper__stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.avatar-cropper__stage canvas.is-dragging { cursor: grabbing; }
.avatar-cropper__stage > span { position: absolute; inset: 0; border: 10px solid rgba(255,255,255,.08); border-radius: 50%; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.avatar-cropper__controls { display: grid; gap: 13px; }
.avatar-cropper__controls label { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; }
.avatar-cropper__controls input[type="range"] { width: 100%; accent-color: var(--accent); }
.crop-nudge { display: grid; grid-template-columns: repeat(5, minmax(44px, auto)); justify-content: center; gap: 7px; }
.crop-nudge button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface-raised); cursor: pointer; }
.crop-nudge button:hover { border-color: var(--accent); color: var(--accent); }
.upload-progress { position: relative; min-height: 50px; overflow: hidden; padding: 22px 13px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.upload-progress::before { position: absolute; top: 0; left: 0; right: 0; height: 8px; content: ""; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.upload-progress > span { position: absolute; top: 0; left: 0; width: 0; height: 8px; border-radius: 0 999px 999px 0; background: linear-gradient(90deg, var(--accent), var(--luxury-gold)); transition: width .18s ease; }
.upload-progress small { color: var(--text-soft); }
.upload-progress.has-error { border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 8%, var(--surface-raised)); }
.upload-progress.has-error > span { background: var(--danger); }

/* Authentication */
.auth-highlights { display: grid; gap: 10px; margin-top: 20px; }
.auth-highlights > div { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 10px; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.055); }
.auth-highlights span { color: var(--luxury-gold-soft); }
.auth-highlights p { margin: 0; color: #d4c5d9; font-size: .8rem; }

/* Chat refinements */
.chat-panel { border-color: var(--line); background: var(--surface-raised); box-shadow: 0 28px 80px rgba(0,0,0,.26); }
.chat-messages { background: var(--surface-soft); }
.chat-message { color: var(--text); background: var(--accent-soft); }
.chat-message > span { display: block; }
.chat-message--bot.chat-message--loading { opacity: .7; }
.chat-message--user { color: #fff; background: var(--accent); }
.chat-quick button { min-height: 40px; color: var(--accent); border-color: var(--line); background: var(--surface-raised); }
.chat-form input { min-height: 46px; }
.chat-form button { width: 46px; height: 46px; }
.chat-launcher { width: 58px; height: 58px; }

/* Dark mode overrides for legacy surfaces */
html[data-theme="dark"] :is(
  .form-card, .side-card, .calendar-card, .calendar-agenda, .list-card, .stat-card,
  .action-card, .event-card, .membership-card, .ranking-card, .podium-card,
  .review-card, .ticket-card, .member-admin-card, .permission-card,
  .content-admin-card, .privacy-summary, .media-create-fieldset, .permission-group,
  .media-upload-panel, .owner-setup-card, .mfa-step, .bracket-match,
  .profile-preview, .profile-form, .auth-card, .contact-card
) { background: var(--surface-raised); border-color: var(--line); }
html[data-theme="dark"] :is(.permission-card__header, .member-admin-summary, .privacy-summary, .media-create-fieldset, .permission-group, .media-upload-panel) { background: var(--surface-soft); }
html[data-theme="dark"] :is(.site-nav, .member-admin-actions details[open] > div, .member-admin-actions details[open] > form) { background: var(--surface-raised); }
html[data-theme="dark"] .chat-panel header { background: linear-gradient(135deg, #4d205a, #24102b); }
html[data-theme="dark"] .calendar-day { color: var(--text); background: var(--surface-raised); }
html[data-theme="dark"] .calendar-day.is-outside { opacity: .45; }
html[data-theme="dark"] .calendar-day.is-selected { background: var(--accent-soft); }
html[data-theme="dark"] .secret-card { background: #170b1c; }

/* System messages and submissions */
.system-message { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-soft); }
.system-message > span { font-size: 1.4rem; }
.system-message p { margin: 0; }
.submission-list { display: grid; gap: 11px; }
.submission-list article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 14px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 16px; }
.submission-list h3 { margin-bottom: 4px; font-size: 1.05rem; }
.submission-list p, .submission-list small { margin: 0; }

/* Security policy */
.prose--policy { padding: clamp(25px, 4vw, 45px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface-raised); box-shadow: var(--card-shadow); white-space: normal; }

/* Responsive layout */
@media (max-width: 1180px) {
  .nav-mega { right: -80px; }
  .cinematic-hero__inner { grid-template-columns: minmax(0, 1fr) 300px; }
  .editorial-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .members-directory { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .design-assets-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .site-nav { background: var(--surface-glass); backdrop-filter: var(--glass-blur); }
  .nav-more { width: 100%; }
  .nav-more > summary { width: 100%; justify-content: space-between; }
  .nav-mega { position: static; width: 100%; margin-top: 8px; grid-template-columns: repeat(3, minmax(0,1fr)); box-shadow: none; background: var(--surface-soft); }
}

@media (max-width: 900px) {
  .cinematic-hero { min-height: auto; }
  .cinematic-hero__inner { grid-template-columns: 1fr; padding-block: 90px; }
  .cinematic-hero__copy { text-align: center; margin-inline: auto; }
  .cinematic-hero__copy > p { margin-inline: auto; }
  .cinematic-hero .hero-actions, .hero-facts { justify-content: center; }
  .cinematic-hero__emblem { display: none; }
  .message-grid { grid-template-columns: 1fr; }
  .game-day-card { grid-template-columns: 1fr; }
  .game-day-card__action { justify-items: start; }
  .founder-layout { grid-template-columns: 1fr; }
  .founder-profile { position: static; }
  .membership-grid--modern { grid-template-columns: 1fr; }
  .trophy-grid--modern { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .contact-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .contest-entry { grid-template-columns: 1fr; }
  .contest-entry__image { min-height: 400px; max-height: 600px; }
  .contest-entry__image img { min-height: 400px; max-height: 600px; }
  .contest-review-grid { grid-template-columns: 1fr; }
  .mvp-archive__item { grid-template-columns: auto minmax(0,1fr); }
  .mvp-archive__item > .media-carousel,
  .mvp-archive__item > .content-media-single { grid-column: 1 / -1; }
  .design-asset { grid-template-columns: 1fr; }
  .page-banner__mark { display: none; }
}

@media (max-width: 820px) {
  .header-actions > .header-signin { display: inline-flex !important; }
  .theme-toggle__label { display: none; }
  .theme-toggle { padding-inline: 0; width: 44px; }
  .header-actions .member-chip { min-width: 44px; padding: 4px; }
  .header-actions .member-chip span { display: none; }
  .signout-form { display: none; }
  .home-event { grid-template-columns: 54px minmax(0,1fr); }
  .home-event__time { grid-column: 2; }
  .home-event__copy { grid-column: 2; }
  .event-timeline__item { grid-template-columns: 52px minmax(0,1fr) auto; }
  .event-timeline__item time { grid-column: 2; }
  .event-timeline__item > div { grid-column: 2 / -1; }
  .house-rule { grid-template-columns: 58px minmax(0,1fr); }
  .house-rule__media, .house-rule__symbol { grid-column: 2; width: min(100%, 320px); }
  .archive-event { grid-template-columns: 1fr; }
  .archive-event > div:last-child { justify-items: start; }
  .full-profile-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .full-profile-card dl { text-align: left; }
  .profile-popover { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .profile-popover dl { text-align: left; }
  .profile-popover__copy .badge-row { justify-content: center; }
  .profile-popover__copy .button { margin-inline: auto; }
  .mvp-spotlight { grid-template-columns: 1fr; text-align: center; }
  .mvp-spotlight .mvp-avatar { justify-self: center; }
  .contest-head { grid-template-columns: 1fr; }
  .contest-head__counts { justify-self: stretch; }
  .style-field-row { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .header-register { display: none; }
  .site-nav { left: 10px; right: 10px; max-height: calc(100svh - var(--header-height) - 20px); overflow: auto; }
  .nav-mega { grid-template-columns: 1fr; }
  .nav-mega > div { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .nav-mega > div:last-child { border-bottom: 0; }
  .cinematic-hero__copy h1 { font-size: clamp(3.2rem, 17vw, 5.2rem); }
  .cinematic-hero__copy > p:not(.eyebrow) { font-size: 1rem; }
  .cinematic-hero .hero-actions { flex-direction: column; align-items: stretch; }
  .cinematic-hero .hero-actions .button { width: 100%; }
  .hero-facts { display: grid; justify-content: center; text-align: left; }
  .page-hero, .staff-hero, .page-banner { padding-block: 70px; }
  .editorial-grid,
  .members-directory,
  .trophy-grid--modern,
  .contact-grid { grid-template-columns: 1fr; }
  .member-search { align-items: stretch; flex-direction: column; }
  .member-search > span { align-self: flex-start; }
  .event-timeline__item { grid-template-columns: 48px minmax(0,1fr); }
  .event-timeline__item > .badge { grid-column: 2; justify-self: start; }
  .contest-entry__image, .contest-entry__image img { min-height: 330px; }
  .contest-history article { grid-template-columns: 1fr; }
  .contest-review-card { grid-template-columns: 1fr; }
  .contest-review-card > img { max-height: 360px; }
  .contest-review-card > div { padding: 0 18px 20px; }
  .mvp-archive__item { grid-template-columns: 1fr; text-align: center; }
  .mvp-archive__item > span { justify-self: center; }
  .full-profile-card dl,
  .profile-popover dl { grid-template-columns: 1fr; }
  .profile-modal { padding: 8px; }
  .profile-modal__card { border-radius: 23px; }
  .profile-popover { padding: 62px 20px 25px; }
  .carousel-control { top: auto; bottom: 12px; transform: none; }
  .carousel-control--prev { left: 12px; }
  .carousel-control--next { left: 68px; right: auto; }
  .carousel-status { right: 12px; }
  .content-media img,
  .content-media video,
  .content-media-single img,
  .content-media-single video { aspect-ratio: 4 / 3; }
  .crop-nudge { grid-template-columns: repeat(3, 44px); }
  .crop-nudge [data-crop-move="up"] { grid-column: 2; }
  .crop-nudge [data-crop-move="left"] { grid-column: 1; grid-row: 2; }
  .crop-nudge [data-crop-reset] { grid-column: 2; grid-row: 2; }
  .crop-nudge [data-crop-move="right"] { grid-column: 3; grid-row: 2; }
  .crop-nudge [data-crop-move="down"] { grid-column: 2; grid-row: 3; }
}

@media (max-width: 430px) {
  .header-inner { gap: 6px; }
  .brand img { width: 42px; height: 42px; }
  .header-actions { gap: 4px; }
  .header-signin { padding-inline: 7px; font-size: .74rem; }
  .cinematic-hero__inner { padding-block: 70px; }
  .message-card { grid-template-columns: 1fr; }
  .game-day-card { padding: 24px; }
  .home-event { grid-template-columns: 44px minmax(0,1fr); padding: 16px; gap: 12px; }
  .home-event__rail span { width: 42px; height: 42px; }
  .house-rule { grid-template-columns: 1fr; }
  .house-rule__number { width: 50px; height: 50px; }
  .house-rule__media, .house-rule__symbol { grid-column: 1; }
  .birthday-card,
  .member-directory-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .contest-head__counts { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: auto minmax(0,1fr); }
  .contact-card i { display: none; }
  .form-card, .side-card { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .cinematic-hero__video { display: none; }
  .cinematic-hero__aurora,
  .emblem-ring,
  .live-indicator i,
  .profile-modal__loading span { animation: none !important; }
}

/* ========================================================================
   Lucifer's Lounge v3.1 · unified responsive interface
   Final overrides deliberately replace the mixed legacy layout rules above.
   ======================================================================== */

:root {
  --shell: 1220px;
  --header-height: 124px;
  --focus-ring: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
  --panel-radius: 26px;
  --panel-border: 1px solid var(--line);
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background:
    radial-gradient(circle at 4% 1%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 34rem),
    radial-gradient(circle at 98% 13%, color-mix(in srgb, var(--luxury-gold) 8%, transparent), transparent 30rem),
    var(--surface);
}

main,
main > *,
section,
article,
aside,
header,
footer,
nav,
form,
fieldset,
table,
.shell,
.header-main-row,
.header-nav-row,
.header-actions,
.site-nav,
.form-layout,
.profile-layout,
.calendar-layout,
.event-timeline__item,
.home-event,
.editorial-card,
.membership-card,
.contest-entry,
.full-profile-card {
  min-width: 0;
}

[hidden] { display: none !important; }
img,
video,
canvas,
svg { max-width: 100%; }
video { background: #0b060d; }

.shell {
  width: min(var(--shell), calc(100% - 48px));
  max-width: 100%;
}

.section {
  padding-block: clamp(62px, 7vw, 104px);
}

.section-heading {
  align-items: end;
  margin-bottom: clamp(24px, 4vw, 42px);
}
.section-heading > * { min-width: 0; }
.section-heading h2 { text-wrap: balance; }
.text-link { color: var(--accent); font-weight: 800; text-underline-offset: 4px; }

/* Header: one flat navigation list and permanently visible authentication. */
.site-header {
  min-height: 0;
  border-bottom: var(--panel-border);
  background: color-mix(in srgb, var(--surface-raised) 90%, transparent);
  box-shadow: 0 10px 34px rgba(36, 14, 43, .07);
  backdrop-filter: blur(24px) saturate(150%);
}
html[data-theme="dark"] .site-header {
  background: color-mix(in srgb, var(--surface-raised) 91%, transparent);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .3);
}
.header-main-row {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 9px;
}
.brand {
  flex: 0 1 auto;
  min-width: 0;
  gap: 12px;
}
.brand-mark {
  flex: 0 0 auto;
}
.brand img,
.brand-mark img {
  width: 54px;
  height: 54px;
  border: 1px solid color-mix(in srgb, var(--luxury-gold) 58%, transparent);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(60, 25, 70, .17);
}
.brand-copy {
  display: grid !important;
  min-width: 0;
  gap: 4px;
}
.brand-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: clamp(.96rem, 1.5vw, 1.18rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-copy small {
  overflow: hidden;
  color: var(--luxury-gold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-actions {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  align-items: center;
  gap: 9px;
}
.inline-form,
.signout-form { margin: 0; }
.auth-button {
  display: inline-flex !important;
  min-width: max-content;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: 0 8px 22px rgba(38, 17, 46, .07);
  font-size: .8rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.auth-button:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-1px);
}
.auth-button--signout { color: var(--danger); }
.member-chip {
  display: inline-flex;
  min-width: 44px;
  max-width: 190px;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
}
.member-chip > span:last-child {
  overflow: hidden;
  font-size: .78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-nav-row {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 76%, transparent);
}
.header-nav-row > .shell { overflow: hidden; }
.site-nav {
  position: static;
  display: flex;
  width: 100%;
  max-width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  padding-block: 6px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 28%, transparent) transparent;
  background: transparent !important;
  box-shadow: none;
  backdrop-filter: none;
}
.site-nav a {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-soft);
  font-size: .77rem;
  font-weight: 780;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-raised);
  box-shadow: 0 6px 18px rgba(36, 15, 44, .06);
}
.nav-more,
.nav-mega { display: none !important; }
.menu-button { display: none; }

/* Unified surfaces and text contrast. */
:is(
  .form-card, .side-card, .profile-preview, .calendar-card, .calendar-agenda,
  .table-card, .list-card, .stat-card, .action-card, .event-card, .ranking-card,
  .podium-card, .review-card, .ticket-card, .member-admin-card, .permission-card,
  .content-admin-card, .privacy-summary, .media-create-fieldset, .permission-group,
  .media-upload-panel, .owner-setup-card, .mfa-step, .bracket-match, .contact-card,
  .membership-card, .editorial-card, .social-post, .house-rule, .archive-event,
  .mvp-archive__item, .birthday-card, .full-profile-card, .member-directory-card,
  .contest-head, .contest-history article, .contest-review-card, .design-asset,
  .submission-list article, .owner-transfer-card, .security-grid article
) {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-raised);
}
:is(
  .form-card, .side-card, .profile-preview, .calendar-card, .calendar-agenda,
  .table-card, .membership-card, .editorial-card, .social-post, .house-rule,
  .birthday-card, .full-profile-card, .member-directory-card, .contest-head,
  .design-asset, .security-grid article
) {
  box-shadow: var(--card-shadow);
}
:is(
  .form-card, .side-card, .profile-preview, .calendar-card, .calendar-agenda,
  .table-card, .membership-card, .editorial-card, .social-post, .house-rule,
  .birthday-card, .full-profile-card, .member-directory-card, .contest-head,
  .design-asset, .security-grid article
) :is(h1, h2, h3, h4, strong, dt, dd) { color: var(--text); }
:is(
  .form-card, .side-card, .profile-preview, .calendar-card, .calendar-agenda,
  .table-card, .membership-card, .editorial-card, .social-post, .house-rule,
  .birthday-card, .full-profile-card, .member-directory-card, .contest-head,
  .design-asset, .security-grid article
) p { color: var(--text-soft); }

.section--tint {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 88%, transparent), color-mix(in srgb, var(--surface) 96%, transparent));
}
.section--dark {
  background:
    radial-gradient(circle at 7% 0%, rgba(151, 72, 173, .35), transparent 34rem),
    radial-gradient(circle at 94% 90%, rgba(201, 160, 77, .15), transparent 28rem),
    #180b1e;
}
.section--dark :is(.empty-state, .feature-paused) {
  color: #f7effa;
  border-color: rgba(255,255,255,.13);
  background: rgba(255,255,255,.055);
}
.section--dark :is(.empty-state, .feature-paused) p { color: #cdbfd2; }

/* Home page. */
.cinematic-hero {
  min-height: min(840px, calc(100svh - 76px));
  padding-bottom: 28px;
}
.cinematic-hero__inner {
  min-height: 610px;
  padding-block: clamp(76px, 11vh, 126px) clamp(48px, 7vh, 82px);
}
.cinematic-hero__copy h1 { line-height: .9; }
.cinematic-hero__copy > p:not(.eyebrow) { line-height: 1.7; }
.hero-stat-bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 24px;
  background: rgba(255,255,255,.08);
  box-shadow: 0 22px 62px rgba(0,0,0,.26);
  backdrop-filter: blur(20px) saturate(135%);
}
.hero-stat-bar article {
  display: grid;
  min-height: 96px;
  align-content: center;
  gap: 4px;
  padding: 20px clamp(18px, 3vw, 32px);
  background: rgba(17, 7, 22, .45);
}
.hero-stat-bar span {
  color: #cfc0d4;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.hero-stat-bar strong {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 500;
}
.birthday-today {
  position: relative;
  overflow: hidden;
  padding-block: 30px;
  border-bottom: 1px solid color-mix(in srgb, var(--luxury-gold) 25%, transparent);
  background:
    radial-gradient(circle at 12% 50%, rgba(255,255,255,.26), transparent 18rem),
    linear-gradient(115deg, #f6df9b, #d3a84f 48%, #8a4b98 120%);
}
.birthday-today .shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}
.birthday-today__sparkles { color: #4b2c0c; font-size: clamp(1.8rem, 5vw, 3.5rem); white-space: nowrap; }
.birthday-today :is(h2, p, .eyebrow) { color: #2e1d0b; }
.birthday-today h2 { margin-bottom: 6px; }
.birthday-today p:last-child { margin: 0; }
.message-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.message-showcase .message-card {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  align-content: start;
  padding: clamp(24px, 3vw, 34px);
}
.message-showcase .message-card::after {
  position: absolute;
  width: 150px;
  height: 150px;
  right: -70px;
  bottom: -85px;
  content: "";
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.message-card__body { position: relative; z-index: 1; color: var(--text-soft); }
.message-card__body > :last-child { margin-bottom: 0; }
.page-directory {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.page-directory__item {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  min-height: 82px;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 19px;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: 0 10px 28px rgba(38, 17, 46, .06);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.page-directory__item:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--card-shadow);
}
.page-directory__item > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 1.2rem;
}
.page-directory__item strong { overflow-wrap: anywhere; }
.page-directory__item i { color: var(--luxury-gold); font-style: normal; }
.feature-paused {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 18px;
  align-items: center;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-raised);
  box-shadow: var(--card-shadow);
}
.feature-paused > span { font-size: 2rem; }
.feature-paused h2 { margin-bottom: 8px; }
.feature-paused p:last-child { margin: 0; }

/* Profiles and avatars retain the original media while applying positioning. */
.avatar {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--surface-raised) 90%, transparent);
  border-radius: 50%;
  background: var(--surface-soft);
}
.avatar-frame__image {
  position: absolute;
  left: calc(50% + var(--avatar-x, 0%));
  top: calc(50% + var(--avatar-y, 0%));
  width: auto;
  height: auto;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  transform: translate(-50%, -50%) scale(var(--avatar-zoom, 1));
  transform-origin: center;
}
.avatar--tiny { width: 34px; height: 34px; }
.avatar--small { width: 48px; height: 48px; }
.avatar--large { width: 94px; height: 94px; }
.avatar--xl { width: 122px; height: 122px; }
.avatar--hero { width: 150px; height: 150px; }
.avatar--profile,
.avatar--founder { width: clamp(180px, 24vw, 250px); height: clamp(180px, 24vw, 250px); font-size: 3rem; }
.avatar--membership { width: clamp(150px, 20vw, 210px); height: clamp(150px, 20vw, 210px); font-size: 2.8rem; }
.member-chip .avatar { width: 34px; height: 34px; border-width: 1px; }
.profile-preview { text-align: center; }
.profile-preview > .avatar { margin-inline: auto; }
.full-profile-card { align-items: center; }
.profile-popover { grid-template-columns: minmax(180px, 240px) minmax(0,1fr); }

/* Membership members are complete, large, swipeable profile slides. */
.membership-card__top { padding-top: 24px; }
.membership-banner { min-height: 190px; }
.membership-banner img { min-height: 190px; max-height: 260px; }
.membership-banner > span {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 16px;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 17px;
  color: #fff;
  background: rgba(15,7,19,.48);
  font-size: 1.5rem;
  backdrop-filter: blur(12px);
}
.membership-members { min-width: 0; }
.membership-carousel { margin-top: 14px; }
.membership-member {
  flex: 0 0 100%;
  width: 100%;
  padding: 3px;
}
.membership-member__button {
  display: grid;
  grid-template-columns: minmax(150px, .48fr) minmax(0, .52fr);
  width: 100%;
  min-height: 300px;
  align-items: center;
  gap: clamp(20px, 4vw, 34px);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 22px;
  text-align: left;
  background:
    radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 17rem),
    var(--surface-soft);
}
.membership-member__button > .avatar { justify-self: center; }
.membership-member__button h3 { margin-bottom: 10px; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.membership-member__button p { margin: 16px 0 10px; }

/* Read-more and full-screen media. */
.expandable-copy {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}
.expandable-copy.is-expanded {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}
.read-more-button {
  min-height: 42px;
  margin: 10px 0 4px;
  padding: 7px 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}
.media-image-button {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0 !important;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  color: #fff;
  background: #0d0710;
  cursor: zoom-in;
}
.media-image-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .3s ease;
}
.media-image-button:hover img { transform: scale(1.018); }
.media-image-button > span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(9,4,11,.63);
  font-size: .68rem;
  font-weight: 820;
  backdrop-filter: blur(10px);
}
.video-frame { position: relative; overflow: hidden; border-radius: inherit; background: #09050b; }
.video-frame > video { display: block; width: 100%; height: 100%; object-fit: contain; }
.media-expand {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  display: grid;
  width: 46px;
  height: 46px;
  min-height: 46px !important;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  color: #fff;
  background: rgba(8,4,10,.62);
  font-size: 1.15rem;
  cursor: zoom-in;
  backdrop-filter: blur(12px);
}
.content-media,
.content-media-single { overflow: hidden; border-radius: 18px; background: #0d0710; }
.content-media :is(img, video),
.content-media-single :is(img, video) {
  width: 100%;
  height: 100%;
  max-height: min(72svh, 760px);
  object-fit: contain;
}
.media-lightbox {
  position: fixed;
  z-index: 650;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vw, 28px);
}
.media-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 2, 7, .91);
  backdrop-filter: blur(18px);
}
.media-lightbox__stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  width: min(1440px, 100%);
  max-height: 94svh;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 25px;
  background: #09050b;
  box-shadow: 0 42px 130px rgba(0,0,0,.68);
}
.media-lightbox__content {
  display: grid;
  min-height: 220px;
  place-items: center;
  overflow: hidden;
}
.media-lightbox__content :is(img, video) {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(94svh - 76px);
  object-fit: contain;
}
.media-lightbox__stage > p {
  min-height: 54px;
  margin: 0;
  padding: 15px 72px 15px 20px;
  color: #ded1e3;
  background: #130a17;
}
.media-lightbox__close {
  position: absolute;
  z-index: 4;
  right: 14px;
  top: 14px;
  display: grid;
  width: 50px;
  height: 50px;
  min-height: 50px !important;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  color: #fff;
  background: rgba(9,4,11,.72);
  font-size: 1.8rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

/* Contest voting feedback. */
form[data-contest-vote] { display: grid; gap: 7px; }
form[data-contest-vote].is-voted .button {
  color: #103b27;
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
  background: color-mix(in srgb, var(--success) 24%, #fff);
  opacity: 1;
}
.form-status { min-height: 1.25em; margin: 0; color: var(--text-soft); font-size: .75rem; text-align: center; }
form[data-contest-vote].is-voted .form-status { color: var(--success); font-weight: 800; }
.contest-entry__image .media-image-button { height: 100%; border-radius: 0; }
.contest-entry__image .media-image-button > span {
  left: 15px;
  right: auto;
  top: 15px;
  bottom: auto;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 1rem;
}

/* Avatar adjustment supports direct dragging plus visible move and zoom controls. */
.avatar-cropper { padding: clamp(14px, 3vw, 22px); }
.avatar-cropper__stage { width: min(100%, 520px); }
.avatar-zoom-control {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 16px;
  width: min(100%, 520px);
  margin-inline: auto;
}
.avatar-zoom-control > span { color: var(--text); font-size: .8rem; font-weight: 850; }
.avatar-zoom-control input[type="range"] { width: 100%; accent-color: var(--accent); }

/* Forms and controls. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: var(--surface-raised);
}
input[type="file"] { overflow: hidden; }
input:focus,
select:focus,
textarea:focus { outline: 0; box-shadow: var(--focus-ring); }
fieldset { max-width: 100%; }
.field-row { min-width: 0; }
.file-drop { min-width: 0; overflow: hidden; }
.file-drop strong,
.file-drop small { max-width: 100%; overflow-wrap: anywhere; }
.form-card,
.side-card { max-width: 100%; }
.check-row { align-items: start; }
.check-row input { flex: 0 0 auto; }

/* Tables remain usable without forcing the whole page wider. */
.responsive-table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
table { width: 100%; min-width: 620px; border-collapse: collapse; }
th,
td { color: var(--text); border-color: var(--line); }
th { color: var(--text-soft); background: var(--surface-soft); }
tbody tr { background: var(--surface-raised); }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-soft) 65%, var(--surface-raised)); }
.table-member { min-width: 0; }

/* Calendar: all events fit the screen, with a controlled table-like grid. */
.calendar-layout { grid-template-columns: minmax(0, 1fr) minmax(270px, 330px); }
.calendar-card { overflow: hidden; }
.calendar-grid,
.calendar-weekdays { width: 100%; max-width: 100%; }
.calendar-day {
  width: 100%;
  min-width: 0;
  min-height: 98px;
  padding: 8px;
  overflow: hidden;
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-raised);
}
.calendar-day.is-outside { color: var(--text-soft); background: var(--surface-soft); opacity: .68; }
.calendar-day:hover,
.calendar-day.is-selected { background: var(--accent-soft); }
.calendar-event-dot {
  max-width: 100%;
  color: var(--accent-strong);
  background: var(--accent-soft);
}
.calendar-agenda { top: calc(var(--header-height) + 16px); }
.agenda-item {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface-soft);
  text-decoration: none;
}
.agenda-item + .agenda-item { margin-top: 9px; }
.agenda-item small { color: var(--text-soft); }

/* Carousels and cards never exceed their containing column. */
.media-carousel,
.media-carousel__viewport,
.media-carousel__track,
.carousel-slide { max-width: 100%; min-width: 0; }
.media-carousel__viewport { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.media-carousel__viewport::-webkit-scrollbar { display: none; }
.media-carousel__track { display: flex; width: 100%; }
.carousel-slide { flex: 0 0 100%; width: 100%; scroll-snap-align: start; }
.carousel-control { z-index: 5; }

/* Dark mode: eliminate remaining light-only legacy surfaces. */
html[data-theme="dark"] :is(
  .site-footer, .footer-bottom, .footer-feature, .page-notices, .member-search,
  .system-message, .feature-paused, .empty-state, .table-title, .filter-tabs,
  .rich-style-controls, .profile-style-fields, .avatar-cropper, .upload-progress,
  .submission-list article, .event-timeline__item, .page-directory__item,
  .membership-member__button, .agenda-item
) {
  color: var(--text);
  border-color: var(--line);
  background-color: var(--surface-raised);
}
html[data-theme="dark"] :is(.badge--soft, .badge--purple, .badge--gold, .badge--green, .badge--red, .badge--blue, .badge--diamond, .badge--silver, .badge--bronze) {
  border-color: var(--line);
}
html[data-theme="dark"] .badge--soft { color: #ded1e3; background: #302438; }
html[data-theme="dark"] .badge--purple { color: #ebc9f5; background: #43264d; }
html[data-theme="dark"] .badge--gold { color: #f2d791; background: #463619; }
html[data-theme="dark"] .badge--green { color: #9de1bd; background: #18382a; }
html[data-theme="dark"] .badge--red { color: #ffb0bd; background: #44212a; }
html[data-theme="dark"] .badge--blue { color: #aed9f7; background: #183348; }
html[data-theme="dark"] .badge--diamond { color: #b8eafa; background: #183641; }
html[data-theme="dark"] .badge--silver { color: #e4e9ed; background: #30363a; }
html[data-theme="dark"] .badge--bronze { color: #f0c7a6; background: #472d1e; }
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(1); }

/* Tablet navigation and layout. */
@media (max-width: 1000px) {
  :root { --header-height: 76px; }
  .menu-button {
    display: inline-block;
    flex: 0 0 44px;
  }
  .header-nav-row {
    position: static;
    border: 0;
    background: transparent;
  }
  .header-nav-row > .shell { width: 100%; overflow: visible; }
  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 14px;
    right: 14px;
    z-index: 140;
    display: none;
    width: auto;
    max-height: calc(100svh - 94px);
    padding: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: color-mix(in srgb, var(--surface-raised) 96%, transparent) !important;
    box-shadow: 0 30px 90px rgba(22, 8, 28, .26);
    backdrop-filter: blur(24px) saturate(150%);
  }
  .site-nav.is-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .site-nav a {
    width: 100%;
    min-height: 48px;
    justify-content: flex-start;
    white-space: normal;
  }
  .header-register { display: none; }
  .cinematic-hero__inner { grid-template-columns: 1fr; min-height: 580px; }
  .cinematic-hero__copy { margin-inline: auto; text-align: center; }
  .cinematic-hero__copy > p { margin-inline: auto; }
  .cinematic-hero .hero-actions { justify-content: center; }
  .cinematic-hero__emblem { display: none; }
  .message-showcase { grid-template-columns: 1fr; }
  .message-showcase .message-card { min-height: 0; }
  .page-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calendar-layout { grid-template-columns: 1fr; }
  .calendar-agenda { position: static; }
  .membership-grid--modern { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, var(--shell)); }
  .header-main-row { gap: 10px; }
  .header-actions { gap: 6px; }
  .theme-toggle__label,
  .member-chip > span:last-child { display: none; }
  .theme-toggle { width: 44px; padding: 0; }
  .member-chip { width: 44px; padding: 4px; }
  .signout-form { display: block !important; }
  .auth-button { min-height: 44px; padding-inline: 11px; font-size: .73rem; }
  .section-heading { align-items: start; flex-direction: column; }
  .cinematic-hero { min-height: auto; }
  .cinematic-hero__inner { min-height: 0; padding-block: 82px 54px; }
  .cinematic-hero__copy h1 { font-size: clamp(3.25rem, 17vw, 5.4rem); }
  .hero-stat-bar { grid-template-columns: 1fr; }
  .hero-stat-bar article { min-height: 78px; }
  .birthday-today .shell { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .page-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-day-card { grid-template-columns: 1fr; }
  .game-day-card__action { justify-items: start; }
  .ranking-grid,
  .podium,
  .editorial-grid,
  .contact-grid,
  .members-directory,
  .trophy-grid--modern,
  .security-grid { grid-template-columns: 1fr; }
  .podium-card--1,
  .podium-card--2,
  .podium-card--3 { order: initial; padding-block: 28px; }
  .home-event { grid-template-columns: 48px minmax(0,1fr); gap: 13px; padding: 17px; }
  .home-event__time,
  .home-event__copy { grid-column: 2; }
  .event-timeline__item { grid-template-columns: 48px minmax(0,1fr); }
  .event-timeline__item time,
  .event-timeline__item > div,
  .event-timeline__item > .badge { grid-column: 2; justify-self: start; }
  .membership-member__button { grid-template-columns: 1fr; text-align: center; }
  .membership-member__button .badge-row { justify-content: center; }
  .profile-popover,
  .full-profile-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .profile-popover__copy .badge-row,
  .full-profile-card .badge-row { justify-content: center; }
  .profile-popover dl,
  .full-profile-card dl { width: 100%; text-align: left; }
  .calendar-card { padding: 14px; }
  .calendar-toolbar { margin-bottom: 12px; }
  .calendar-toolbar h2 { font-size: clamp(1.35rem, 6vw, 1.8rem); }
  .calendar-weekdays span { padding: 6px 2px; font-size: .58rem; }
  .calendar-day { min-height: 76px; padding: 5px; }
  .calendar-number { width: 25px; height: 25px; }
  .calendar-event-dot { width: 7px; height: 7px; padding: 0; font-size: 0; }
  .calendar-dots { display: flex; flex-wrap: wrap; gap: 3px; }
  .contest-head { grid-template-columns: 1fr; }
  .contest-entry { grid-template-columns: 1fr; }
  .contest-entry__image,
  .contest-entry__image img { min-height: 330px; max-height: 560px; }
  .field-row { grid-template-columns: 1fr; }
  .responsive-table { margin-inline: 0; }
  .footer-feature { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .shell { width: min(100% - 20px, var(--shell)); }
  .brand-copy { display: none !important; }
  .brand img,
  .brand-mark img { width: 46px; height: 46px; }
  .header-main-row { min-height: 68px; padding-block: 7px; }
  .header-actions { margin-left: auto; }
  .auth-button { padding-inline: 9px; }
  .site-nav { left: 8px; right: 8px; top: calc(100% + 5px); }
  .site-nav.is-open { grid-template-columns: 1fr; }
  .cinematic-hero__inner { padding-block: 68px 44px; }
  .cinematic-hero .hero-actions { flex-direction: column; align-items: stretch; }
  .cinematic-hero .hero-actions .button { width: 100%; }
  .hero-stat-bar { border-radius: 19px; }
  .page-directory { grid-template-columns: 1fr; }
  .page-directory__item { min-height: 68px; }
  .message-card { grid-template-columns: 1fr; }
  .feature-paused { grid-template-columns: 1fr; }
  .page-hero,
  .staff-hero,
  .page-banner { padding-block: 62px; }
  .page-banner__inner { grid-template-columns: 1fr; }
  .form-card,
  .side-card,
  .calendar-card,
  .calendar-agenda { padding: 18px; }
  .calendar-card { padding: 8px; border-radius: 18px; }
  .calendar-toolbar { padding: 4px; }
  .calendar-day { min-height: 62px; border-radius: 0; }
  .calendar-weekdays span { font-size: .5rem; }
  .avatar--large { width: 84px; height: 84px; }
  .avatar--xl { width: 108px; height: 108px; }
  .avatar--profile,
  .avatar--founder { width: 180px; height: 180px; }
  .avatar--membership { width: 160px; height: 160px; }
  .profile-modal { padding: 6px; }
  .profile-modal__card { max-height: 96svh; border-radius: 20px; }
  .profile-popover { padding: 64px 18px 24px; }
  .media-lightbox { padding: 4px; }
  .media-lightbox__stage { max-height: 99svh; border-radius: 16px; }
  .media-lightbox__content :is(img, video) { max-height: calc(99svh - 68px); }
  .media-lightbox__stage > p { min-height: 48px; padding: 12px 64px 12px 14px; font-size: .78rem; }
  .media-lightbox__close { right: 9px; top: 9px; width: 46px; height: 46px; }
  .chat-panel { left: 8px; right: 8px; bottom: 78px; width: auto; max-width: none; }
  .chat-launcher { right: 12px; bottom: 12px; }
}

@media (max-width: 350px) {
  .theme-toggle { display: none; }
  .auth-button { font-size: .68rem; }
  .header-actions { gap: 4px; }
  .calendar-day { min-height: 56px; padding: 3px; }
  .calendar-number { width: 22px; height: 22px; font-size: .65rem; }
}

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

/* Version 3.1 final viewport and accessibility hardening. */
@media (min-width: 1001px) {
  .header-nav-row > .shell { overflow: visible; }
  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    row-gap: 4px;
    padding-block: 7px;
  }
}

.cinematic-hero__aurora {
  right: 0;
  width: min(43vw, 660px);
  height: min(43vw, 660px);
  transform-origin: 100% 0;
}

.text-link,
.footer-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-block: 8px;
}

.footer-links {
  align-items: center;
  gap: 0 4px;
}
.footer-links a { padding-inline: 8px; }

.check-row {
  min-height: 44px;
  align-items: center !important;
  cursor: pointer;
}
.check-row input[type="checkbox"] {
  appearance: none;
  display: grid;
  width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  place-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 6px var(--surface-raised);
  cursor: pointer;
}
.check-row input[type="checkbox"]::before {
  width: 12px;
  height: 7px;
  content: "";
  border-bottom: 3px solid #fff;
  border-left: 3px solid #fff;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform .15s ease;
}
.check-row input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 6px var(--accent);
}
.check-row input[type="checkbox"]:checked::before { transform: translateY(-1px) rotate(-45deg) scale(1); }
.check-row input[type="checkbox"]:focus-visible { outline: none; box-shadow: var(--focus-ring), inset 0 0 0 6px var(--surface-raised); }
.check-row input[type="checkbox"]:checked:focus-visible { box-shadow: var(--focus-ring), inset 0 0 0 6px var(--accent); }

@media (max-width: 1000px) {
  .site-nav {
    background: var(--surface-raised) !important;
    backdrop-filter: none;
  }
  .signout-form { display: block !important; }
  .header-actions .member-chip > .avatar { display: inline-grid !important; }
}

/* Preserve modifier colours and initials contrast in both themes. */
.avatar--initials {
  color: #fff;
  background: linear-gradient(145deg, #9255a8 0%, #4c1d61 100%);
  text-shadow: 0 1px 2px rgba(0,0,0,.24);
}
html[data-theme="dark"] .avatar--initials {
  color: #fff;
  background: linear-gradient(145deg, #a861bd 0%, #58206d 100%);
}
html[data-theme="dark"] .button--luminous {
  color: #281421;
  border-color: rgba(241, 217, 157, .72);
  background: linear-gradient(135deg, #f5e5b7 0%, #cfa44e 100%);
}
html[data-theme="dark"] .button--glass {
  color: #fff;
  border-color: rgba(255,255,255,.33);
  background: rgba(255,255,255,.11);
}
html[data-theme="dark"] .button--ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-raised);
}
html[data-theme="dark"] .button--danger-ghost {
  color: #ffb0bd;
  border-color: rgba(255,126,148,.34);
  background: transparent;
}

/* ========================================================================
   Lucifer's Lounge v3.2 · refinement, consistency and richer controls
   ======================================================================== */

/* Profile media uses the saved crop once. The previous auto-sized image was
   enlarged by its intrinsic dimensions before zoom was applied. */
.avatar-frame__image {
  position: absolute;
  left: calc(50% + var(--avatar-x, 0%));
  top: calc(50% + var(--avatar-y, 0%));
  inset-inline-end: auto;
  inset-block-end: auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translate(-50%, -50%) scale(var(--avatar-zoom, 1));
  transform-origin: center;
}

/* Classy live homepage counters with owner-managed icon artwork. */
.hero-stat-bar {
  isolation: isolate;
  gap: 10px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.hero-stat-bar article {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 110px;
  align-items: center;
  align-content: center;
  gap: 15px;
  overflow: hidden;
  padding: 19px clamp(16px, 2.4vw, 28px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.035)),
    rgba(13, 5, 17, .62);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 22px 55px rgba(0,0,0,.26);
  backdrop-filter: blur(22px) saturate(145%);
}
.hero-stat-bar article::after {
  position: absolute;
  width: 110px;
  height: 110px;
  right: -45px;
  bottom: -55px;
  z-index: -1;
  content: "";
  border-radius: 50%;
  background: color-mix(in srgb, var(--stat-glow, #b875cc) 32%, transparent);
  filter: blur(15px);
}
.hero-stat--members { --stat-glow: #b47ac7; }
.hero-stat--events { --stat-glow: #ddbd68; }
.hero-stat--coins { --stat-glow: #cf8f45; }
.hero-stat-bar article > div { min-width: 0; }
.hero-stat-bar span:not(.stat-art) {
  display: block;
  margin-bottom: 4px;
  color: #d8cadd;
  line-height: 1.3;
}
.hero-stat-bar strong {
  display: block;
  overflow: hidden;
  color: #fff;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-art {
  position: relative;
  display: grid;
  width: clamp(50px, 5vw, 62px);
  height: clamp(50px, 5vw, 62px);
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 18px;
  color: #f7e7b6;
  background: rgba(255,255,255,.1);
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 10px 28px rgba(0,0,0,.2);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
}
.stat-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes loungeCountReveal {
  from { opacity: .25; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.hero-stat-bar [data-count-up] { animation: loungeCountReveal .7s cubic-bezier(.2,.8,.2,1) both; }
.hero-stat-bar article:nth-child(2) [data-count-up] { animation-delay: .08s; }
.hero-stat-bar article:nth-child(3) [data-count-up] { animation-delay: .16s; }

/* Sixteen main destinations: 4 × 4 on full layouts, compact and image-ready. */
.section--directory { padding-top: clamp(34px, 5vw, 58px); }
.page-directory { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.page-directory__item {
  min-width: 0;
  min-height: 74px;
  gap: 10px;
  padding: 12px;
  border-radius: 17px;
}
.page-directory__item > span,
.directory-art {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
}
.directory-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-directory__item strong {
  min-width: 0;
  font-size: clamp(.77rem, 1.1vw, .9rem);
  line-height: 1.25;
}

/* Complete sixteen-link footer directory. */
.footer-feature {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.55fr);
  align-items: start;
  gap: clamp(28px, 5vw, 70px);
  padding-block: clamp(42px, 6vw, 72px);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-brand img {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.footer-brand strong { display: block; margin-bottom: 5px; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; }
.footer-brand p { margin: 0; color: var(--text-soft); }
.footer-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.footer-quick-grid a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--surface-raised) 72%, transparent);
  font-size: .72rem;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
}
.footer-quick-grid a:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-raised); }
.footer-quick-grid .directory-art { width: 32px; height: 32px; border-radius: 9px; font-size: .88rem; }
.footer-quick-grid a span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* Post media uses a restrained Instagram Story proportion instead of filling
   the entire article. The full-screen viewer always retains the source size. */
.content-media-single,
.media-carousel:not(.membership-carousel) {
  width: min(100%, 390px);
  margin: 20px auto 0;
}
.content-media,
.content-media-single,
.media-carousel:not(.membership-carousel) .media-carousel__viewport {
  border-radius: 22px;
}
.content-media :is(img, video),
.content-media-single :is(img, video),
.media-carousel:not(.membership-carousel) .content-media :is(img, video) {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center;
  background: #0b0710;
}
.content-media figcaption { min-height: 42px; }
.social-post .content-media :is(img, video) { aspect-ratio: 9 / 16; }
.media-lightbox__content :is(img, video) { aspect-ratio: auto; object-fit: contain; }

/* Contest screenshots always fit in full, regardless of source ratio. */
.contest-entry { min-height: 0; }
.contest-entry__image {
  width: min(100%, 430px);
  min-height: 0;
  aspect-ratio: 9 / 16;
  justify-self: center;
  background: linear-gradient(145deg, #170b1d, #070409);
}
.contest-entry__image img,
.contest-entry__image .media-image-button img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  object-position: center;
}
.contest-entry__image .media-image-button { width: 100%; height: 100%; }

/* Event and tournament artwork. */
.event-detail-card__art,
.event-hero__art,
.event-admin-card__artwork {
  position: relative;
  width: min(100%, 520px);
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #0c0710;
  box-shadow: var(--card-shadow);
}
.event-detail-card__art,
.event-hero__art { aspect-ratio: 4 / 5; }
.event-admin-card__artwork { aspect-ratio: 16 / 9; }
.event-detail-card__art :is(img, video),
.event-hero__art :is(img, video),
.event-admin-card__artwork img,
.event-detail-card__art .media-image-button,
.event-hero__art .media-image-button {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Membership profile theatre: manual swipe plus automatic progression. */
.membership-carousel {
  width: 100%;
  margin-top: 18px;
}
.membership-carousel .media-carousel__viewport {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-soft);
}
.membership-carousel .membership-member {
  display: grid;
  min-height: 390px;
  place-items: center;
  padding: clamp(22px, 4vw, 38px);
}
.membership-member__button {
  display: grid;
  width: 100%;
  max-width: 560px;
  min-height: 44px;
  justify-items: center;
  gap: 16px;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: center;
  cursor: pointer;
}
.membership-member__button > div { display: grid; justify-items: center; gap: 7px; }
.membership-member__button p { max-width: 44ch; margin: 0; color: var(--text-soft); }
.membership-carousel .carousel-status {
  color: var(--text);
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
}

/* Current-birthday celebration on the dedicated page. */
.birthday-current { padding-block: clamp(24px, 4vw, 44px); }
.birthday-current .birthday-today {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(90,55,12,.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 20%, rgba(255,255,255,.38), transparent 15rem),
    linear-gradient(115deg, #f8e6aa 0%, #d8ad54 50%, #9a58a7 125%);
  box-shadow: 0 26px 70px rgba(87,54,13,.18);
}
.birthday-current .birthday-today :is(h2, p, .eyebrow) { color: #2e1d0b; }
.birthday-current .birthday-today h2 { margin-bottom: 6px; }
.birthday-current .birthday-today p:last-child { margin: 0; }
.birthday-today__spark,
.birthday-today__confetti { font-size: clamp(2rem, 5vw, 3.7rem); white-space: nowrap; }

/* High-contrast, mode-aware staff navigation. */
.staff-nav {
  display: flex;
  max-width: 100%;
  gap: 7px;
  margin-top: 24px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 18px;
  background: rgba(10, 5, 13, .48);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 14px 38px rgba(0,0,0,.2);
  scrollbar-width: thin;
  backdrop-filter: blur(17px) saturate(140%);
}
.staff-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #e8ddea;
  font-size: .78rem;
  font-weight: 820;
  text-decoration: none;
  white-space: nowrap;
}
.staff-nav a:hover { color: #fff; border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.11); }
.staff-nav a.is-active {
  color: #251126;
  border-color: #f0d992;
  background: linear-gradient(135deg, #f7e9bb, #d5ac57);
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
}
html[data-theme="light"] .staff-hero .staff-nav { border-color: rgba(255,255,255,.24); }
html[data-theme="dark"] .staff-nav { background: rgba(5,2,7,.66); }

/* Word-processor-style post presentation choices. */
.content-style {
  --content-custom-color: var(--text);
  --content-custom-bg: var(--surface-soft);
  position: relative;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.content-font-serif { font-family: Georgia, "Times New Roman", Times, serif; }
.content-font-sans { font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif; }
.content-font-display { font-family: Didot, Bodoni MT, Georgia, serif; letter-spacing: -.02em; }
.content-font-rounded { font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", sans-serif; }
.content-font-classic { font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; }
.content-font-mono { font-family: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.content-font-handwritten { font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; }
.content-align-justify { text-align: justify; text-justify: inter-word; }
.content-color-dark { color: #261629; }
.content-color-custom { color: var(--content-custom-color); }
.content-background-default { background: transparent; }
.content-background-soft,
.content-background-plum,
.content-background-gold,
.content-background-midnight,
.content-background-rose,
.content-background-blue,
.content-background-green,
.content-background-paper,
.content-background-custom {
  padding: clamp(15px, 2.4vw, 24px);
  border-radius: 18px;
}
.content-background-soft { background: var(--surface-soft); }
.content-background-plum { color: #fff5ff; background: linear-gradient(145deg, #7b3d8d, #4b2058); }
.content-background-gold { color: #2d1d08; background: linear-gradient(145deg, #f7e8b5, #d9b25d); }
.content-background-midnight { color: #f6eef8; background: linear-gradient(145deg, #201228, #08050b); }
.content-background-rose { color: #3b1623; background: linear-gradient(145deg, #f8dbe4, #e9aabd); }
.content-background-blue { color: #0f2f43; background: linear-gradient(145deg, #d9eef9, #9fcce4); }
.content-background-green { color: #123526; background: linear-gradient(145deg, #ddf4e8, #9dd3b7); }
.content-background-paper { color: #312a22; background: #f7f0df; box-shadow: inset 0 0 0 1px rgba(79,59,33,.12); }
.content-background-custom { background: var(--content-custom-bg); }
.content-background-plum :is(p, li, strong, em, a),
.content-background-midnight :is(p, li, strong, em, a) { color: inherit; }
.content-border-none { border: 0; }
.content-border-subtle { border: 1px solid var(--line); }
.content-border-accent { border: 2px solid color-mix(in srgb, var(--accent) 68%, transparent); }
.content-border-gold { border: 2px solid color-mix(in srgb, var(--luxury-gold) 78%, transparent); }
.content-spacing-compact { line-height: 1.35; }
.content-spacing-normal { line-height: 1.65; }
.content-spacing-relaxed { line-height: 1.9; }
.content-style.content-background-default.content-border-subtle { padding: 14px 16px; border-radius: 15px; }
.rich-style-controls {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 45%, var(--surface-raised)), var(--surface-soft));
}
.style-field-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Member statistics and editable points/tabs. */
.member-card-points,
.member-admin-statline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--text-soft);
  font-size: .74rem;
}
.member-card-points span,
.member-admin-statline span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}
.member-achievements { margin-top: 26px; }
.member-stat-grid,
.profile-popover__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
.member-stat-grid article,
.profile-popover__stats > span {
  display: grid;
  min-width: 0;
  min-height: 112px;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 15px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-raised);
  box-shadow: 0 9px 26px rgba(38,17,46,.06);
  text-align: center;
}
.member-stat-grid article > span { font-size: 1.3rem; }
.member-stat-grid strong,
.profile-popover__stats strong { color: var(--accent); font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; }
.member-stat-grid small,
.profile-popover__stats small { color: var(--text-soft); line-height: 1.25; }
.achievement-note,
.profile-popover__achievement-note {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 12px;
  margin-top: 13px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--luxury-gold) 40%, var(--line));
  border-radius: 17px;
  background: color-mix(in srgb, var(--luxury-gold-soft) 22%, var(--surface-raised));
}
.achievement-note p,
.profile-popover__achievement-note { color: var(--text); }
.manual-points-list,
.review-grid--activity { display: grid; gap: 12px; }
.manual-point-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
}
.manual-point-edit { display: grid; grid-template-columns: minmax(92px,.5fr) minmax(160px,1.5fr) auto; gap: 8px; align-items: end; }

/* Stable small-screen logo animation. */
@media (max-width: 1000px) {
  .cinematic-hero__inner {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .cinematic-hero__emblem {
    display: grid !important;
    order: -1;
    width: clamp(132px, 26vw, 190px);
    justify-self: center;
    margin-bottom: -12px;
  }
  .cinematic-hero__copy { width: 100%; }
  .footer-feature { grid-template-columns: 1fr; }
  .footer-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .style-field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .cinematic-hero__inner { padding-top: 58px; }
  .cinematic-hero__emblem { width: clamp(118px, 34vw, 150px); margin-bottom: -4px; }
  .cinematic-hero__emblem small { bottom: 8%; font-size: .52rem; }
  .hero-stat-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .hero-stat-bar article {
    grid-template-columns: 1fr;
    min-height: 122px;
    justify-items: center;
    gap: 8px;
    padding: 12px 6px;
    border-radius: 18px;
    text-align: center;
  }
  .stat-art { width: 42px; height: 42px; border-radius: 13px; font-size: 1.1rem; }
  .hero-stat-bar span:not(.stat-art) { min-height: 2.5em; margin: 0; font-size: .55rem; }
  .hero-stat-bar strong { font-size: clamp(1.35rem, 7vw, 1.9rem); }
  .page-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .page-directory__item { min-height: 66px; padding: 9px; }
  .page-directory__item > span,
  .directory-art { width: 40px; height: 40px; border-radius: 12px; }
  .page-directory__item strong { font-size: .73rem; }
  .page-directory__item i { display: none; }
  .footer-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .birthday-current .birthday-today { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .membership-carousel .membership-member { min-height: 340px; }
  .contest-entry__image { max-width: 390px; }
  .member-stat-grid,
  .profile-popover__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-point-row,
  .manual-point-edit { grid-template-columns: 1fr; }
  .style-field-row { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .hero-stat-bar { width: calc(100% - 20px); }
  .hero-stat-bar article { min-height: 116px; }
  .page-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-directory__item { grid-template-columns: auto minmax(0,1fr); }
  .footer-brand { align-items: flex-start; }
  .footer-brand img { width: 64px; height: 64px; }
  .content-media-single,
  .media-carousel:not(.membership-carousel) { width: min(100%, 350px); }
  .staff-nav { margin-inline: -3px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stat-bar [data-count-up],
  .emblem-ring { animation: none !important; }
}

/* Version 3.2 mobile Concierge placement: keep important content and vote controls unobstructed. */
.site-nav__concierge {
  display: none;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 13px;
  color: var(--text);
  background: color-mix(in srgb, var(--accent-soft) 54%, var(--surface-raised));
  font: inherit;
  font-size: .79rem;
  font-weight: 850;
  letter-spacing: .01em;
  cursor: pointer;
}
.site-nav__concierge > span:first-child {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 24%, transparent);
}
.site-nav__concierge:hover,
.site-nav__concierge:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 78%, var(--surface-raised));
}

@media (max-width: 1000px) {
  .chat-launcher { display: none !important; }
  .site-nav__concierge {
    display: flex;
    grid-column: 1 / -1;
    width: 100%;
  }
  .chat-panel {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: auto;
    width: min(390px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
  }
}

@media (max-width: 500px) {
  .chat-panel {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    max-width: none;
  }
}


/* ========================================================================
   Lucifer's Lounge v3.3 · final consistency, audit corrections and tools
   ======================================================================== */

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

main,
section,
.shell,
[class*="grid"],
[class*="layout"],
[class*="card"],
form,
fieldset,
table {
  min-width: 0;
}

/* Every member surface follows the selected theme. Nickname colour remains
   decorative, but no member can override the card/background palette. */
.profile-surface,
.profile-preview,
.full-profile-card,
.member-full-profile,
.profile-trigger,
.profile-popover,
.profile-modal__card,
.member-rank,
.podium-card,
.staff-card,
.membership-member,
.birthday-person,
.birthday-card,
.leaderboard-table tr,
.member-admin-card {
  --profile-bubble: var(--surface-raised) !important;
  --profile-text: var(--text) !important;
  color: var(--text) !important;
}

.profile-surface,
.profile-preview,
.full-profile-card,
.member-full-profile,
.profile-popover,
.profile-modal__card,
.member-rank,
.podium-card,
.staff-card,
.membership-member,
.birthday-person,
.birthday-card,
.member-admin-card {
  background: var(--surface-raised) !important;
  border-color: var(--line) !important;
}

.profile-trigger {
  background: var(--surface-raised) !important;
  border-color: var(--line) !important;
}

.profile-trigger p,
.profile-preview p,
.full-profile-card p,
.member-full-profile p,
.profile-popover p,
.member-admin-card p,
.profile-trigger small {
  color: var(--text-soft) !important;
}

/* One predictable avatar crop model. The image always starts fitted to the
   frame; saved movement and zoom are then applied exactly once. */
.avatar-frame {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
}

.avatar-frame__image {
  position: absolute !important;
  left: calc(50% + var(--avatar-x, 0%)) !important;
  top: calc(50% + var(--avatar-y, 0%)) !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: translate(-50%, -50%) scale(var(--avatar-zoom, 1)) !important;
  transform-origin: center !important;
}

.avatar--tiny { width: 38px; height: 38px; }
.avatar--small { width: 52px; height: 52px; }
.avatar--large { width: 88px; height: 88px; }
.avatar--xl { width: 112px; height: 112px; }
.avatar--profile,
.avatar--founder,
.avatar--member-full { width: clamp(168px, 24vw, 238px); height: clamp(168px, 24vw, 238px); }
.avatar--membership { width: clamp(138px, 20vw, 192px); height: clamp(138px, 20vw, 192px); }

.birthday-today .avatar,
.birthday-current .avatar,
.birthday-person .avatar {
  width: clamp(78px, 14vw, 116px);
  height: clamp(78px, 14vw, 116px);
}

.leaderboard-table .avatar,
.leaderboard-row .avatar,
.member-chip .avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
}

/* Hero activity signal and private visitor figures. */
.hero-activity-line {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(100%, 720px);
  margin-top: 18px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 16px;
  color: #fff;
  background: rgba(12, 6, 17, .38);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .18);
  text-decoration: none;
  backdrop-filter: blur(15px);
}

.hero-activity-line:hover,
.hero-activity-line:focus-visible {
  border-color: rgba(255, 255, 255, .5);
  background: rgba(12, 6, 17, .56);
  transform: translateY(-1px);
}

.hero-activity-line span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-visitor-strip {
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-raised) 90%, var(--accent-soft));
}

.owner-visitor-strip > .shell {
  display: grid;
  grid-template-columns: minmax(180px, .75fr) minmax(0, 1.6fr);
  gap: 22px;
  align-items: center;
  padding-block: 17px;
}

.owner-visitor-strip p,
.owner-visitor-strip dl { margin: 0; }
.owner-visitor-strip p { display: grid; gap: 2px; }
.owner-visitor-strip p strong { color: var(--text); }
.owner-visitor-strip p span { color: var(--text-soft); font-size: .78rem; }
.owner-visitor-strip dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.owner-visitor-strip dl > div { padding: 9px 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-raised); }
.owner-visitor-strip dt { color: var(--text-soft); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.owner-visitor-strip dd { margin: 2px 0 0; color: var(--text); font-size: 1.16rem; font-weight: 850; }

/* Footer is a clean text directory, not a second button wall. */
.footer-text-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 17px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-text-links a {
  display: inline-block;
  padding-block: 4px;
  color: var(--text-soft);
  font-size: .84rem;
  font-weight: 680;
  line-height: 1.35;
  text-decoration: none;
}

.footer-text-links a:hover,
.footer-text-links a:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

/* Daily game and two-proof member submission workflow. */
.daily-game-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface-raised));
}

.daily-game-heading img,
.daily-game-heading__fallback {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 20px;
  object-fit: cover;
  background: var(--surface-soft);
  font-size: 2rem;
}

.daily-game-heading h2,
.daily-game-heading p:last-child { margin-bottom: 0; }

.proof-upload-grid,
.proof-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.proof-upload-card,
.proof-review-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.proof-upload-card label { margin: 0; }
.proof-review-card { display: grid; gap: 10px; }
.proof-review-card > a,
.proof-review-card > button { display: block; min-height: 0; padding: 0; border: 0; background: transparent; }
.proof-review-card img,
.proof-review-card video,
.proof-review-card object {
  width: 100%;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #09070b;
  object-fit: contain;
}

.points-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px 12px;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--luxury-gold) 38%, var(--line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--luxury-gold-soft) 24%, var(--surface-raised));
}
.points-preview strong { color: var(--text); font-size: 1.35rem; }
.points-preview span { color: var(--text-soft); }

.submission-grid,
.activity-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.submission-card,
.activity-review-card {
  display: grid;
  gap: 16px;
  padding: clamp(17px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}
.activity-review-card__head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.activity-review-card__head h3 { margin-bottom: 0; }

/* Profile Contest: all entries remain present, fitted and swipeable. */
.contest-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}
.contest-toolbar h2 { margin-bottom: 0; }
.contest-unvote { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }

.profile-contest-carousel {
  position: relative;
  min-width: 0;
  padding-inline: clamp(0px, 3vw, 26px);
  outline: none;
}
.profile-contest-carousel .media-carousel__viewport { overflow: hidden; border-radius: 28px; }
.profile-contest-carousel .media-carousel__track { display: flex; align-items: stretch; transition: transform .36s ease; }

.contest-entry-card {
  display: grid;
  grid-template-columns: minmax(240px, .9fr) minmax(260px, 1.1fr);
  flex: 0 0 100%;
  min-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface-raised);
  box-shadow: var(--card-shadow);
}
.contest-entry-card.is-voted { border-color: color-mix(in srgb, var(--luxury-gold) 70%, var(--line)); }
.contest-entry-card__image { display: grid; min-height: clamp(430px, 66vw, 690px); place-items: center; padding: 14px; background: #0d0910; }
.contest-entry-card__image .media-image-button { width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; background: transparent; }
.contest-entry-card__image img {
  width: 100%;
  height: 100%;
  max-height: 690px;
  object-fit: contain !important;
  object-position: center;
}
.contest-entry-card__copy { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: clamp(22px, 4vw, 42px); }
.contest-entry-card__copy h3 { font-size: clamp(1.8rem, 4vw, 3rem); overflow-wrap: anywhere; }
.contest-votes { display: flex; flex-wrap: wrap; gap: 8px; }
.contest-votes span { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-soft); background: var(--surface-soft); font-size: .78rem; }
.contest-votes strong { color: var(--text); }
.profile-contest-carousel .carousel-control { z-index: 4; }
.past-contest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.past-contest-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-raised); }

/* Points guidelines. */
.guidelines-list { display: grid; gap: 24px; }
.guideline-card { padding: clamp(20px, 4vw, 38px); border: 1px solid var(--line); border-radius: 27px; background: var(--surface-raised); box-shadow: var(--shadow-sm); }
.guideline-card h2 { margin-bottom: 16px; }
.guideline-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 22px; }
.guideline-media > * { min-width: 0; }
.guideline-media img,
.guideline-media video { width: 100%; max-height: 580px; border: 1px solid var(--line); border-radius: 18px; background: #09070b; object-fit: contain; }

/* Staff content, events, contest, games and safety tools. */
.content-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-end;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.typed-confirm-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.typed-confirm-form label { max-width: 160px; margin: 0; }
.typed-confirm-form input { min-height: 40px !important; }

.event-admin-grid,
.contest-review-grid,
.design-upload-grid,
.game-admin-grid,
.flag-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.event-admin-card,
.contest-review-card,
.design-upload-card,
.game-admin-card,
.flag-card {
  display: grid;
  align-content: start;
  gap: 15px;
  min-width: 0;
  padding: clamp(17px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.event-admin-card__art,
.contest-review-card > .media-image-button {
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}
.event-admin-card__art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.contest-review-card > .media-image-button img { width: 100%; aspect-ratio: 9 / 16; max-height: 560px; object-fit: contain; background: #0b080d; }

.contest-admin-layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(220px, .55fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.contest-admin-months { display: grid; gap: 9px; }
.contest-admin-months a { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); text-decoration: none; }
.contest-admin-months a.is-active { border-color: var(--accent); background: var(--accent-soft); }

.design-upload-card { grid-template-columns: minmax(0, 1fr); }
.design-upload-preview { display: grid; min-height: 150px; place-items: center; overflow: hidden; border: 1px dashed var(--line-strong); border-radius: 18px; background: var(--surface-soft); }
.design-upload-preview img,
.design-upload-preview video { width: 100%; max-height: 270px; object-fit: contain; }

.game-admin-card { grid-template-columns: minmax(96px, 130px) minmax(0, 1fr); }
.game-admin-card > form,
.game-admin-card > .text-button { grid-column: 1 / -1; }
.game-admin-card > img,
.game-admin-card__placeholder { display: grid; width: 100%; aspect-ratio: 1; place-items: center; border-radius: 20px; object-fit: cover; background: var(--surface-soft); font-size: 2.2rem; }

.flag-card { border-left: 4px solid var(--line-strong); }
.flag-card.is-active { border-left-color: var(--danger); }
.flag-card.is-resolved { opacity: .82; }
.flag-card h3 { overflow-wrap: anywhere; }

/* Better visibility for the staff navigation in both modes. */
.staff-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 80%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-raised) 93%, transparent);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .08);
}
.staff-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text) !important;
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
  font-weight: 800;
  text-decoration: none;
}
.staff-nav a:hover,
.staff-nav a:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.staff-nav a.is-active { border-color: color-mix(in srgb, var(--accent) 65%, var(--line)); color: #fff !important; background: linear-gradient(145deg, var(--accent), var(--accent-strong)); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 25%, transparent); }

/* Consistent form surfaces and readable controls in light/dark modes. */
.form-card,
.side-card,
.list-card,
.inbox-card,
.content-admin-card,
.permission-card {
  color: var(--text);
  background: var(--surface-raised);
  border-color: var(--line);
}
input,
select,
textarea {
  max-width: 100%;
  color: var(--text);
  background: var(--surface-raised);
  border-color: var(--line-strong);
}
input::placeholder,
textarea::placeholder { color: color-mix(in srgb, var(--text-soft) 72%, transparent); }
fieldset { max-width: 100%; }

/* Tables never force the page wider than the viewport. */
.table-scroll,
.table-wrap,
.leaderboard-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
table { width: 100%; }
th,
td { overflow-wrap: anywhere; }

@media (max-width: 1000px) {
  .contest-admin-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contest-admin-layout > :last-child { grid-column: 1 / -1; }
  .owner-visitor-strip > .shell { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .proof-upload-grid,
  .proof-review-grid,
  .submission-grid,
  .activity-review-grid,
  .event-admin-grid,
  .contest-review-grid,
  .design-upload-grid,
  .game-admin-grid,
  .flag-grid,
  .past-contest-grid,
  .contest-admin-layout { grid-template-columns: 1fr; }

  .contest-admin-layout > :last-child { grid-column: auto; }
  .contest-entry-card { grid-template-columns: 1fr; }
  .contest-entry-card__image { min-height: min(128vw, 580px); }
  .contest-entry-card__copy { padding: 20px; }
  .contest-toolbar { align-items: flex-start; flex-direction: column; }
  .owner-visitor-strip dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-review-card__head { flex-direction: column; }
  .typed-confirm-form { width: 100%; }
  .typed-confirm-form label { max-width: none; flex: 1 1 180px; }
  .game-admin-card { grid-template-columns: 92px minmax(0, 1fr); }
  .hero-activity-line span:nth-child(2) { white-space: normal; }
}

@media (max-width: 480px) {
  .shell { width: min(100% - 24px, var(--shell)); }
  .owner-visitor-strip dl { gap: 6px; }
  .owner-visitor-strip dl > div { padding: 8px; }
  .daily-game-heading { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding: 13px; }
  .daily-game-heading img,
  .daily-game-heading__fallback { width: 58px; height: 58px; border-radius: 15px; }
  .contest-entry-card__image { min-height: min(142vw, 520px); padding: 8px; }
  .event-admin-card,
  .contest-review-card,
  .design-upload-card,
  .game-admin-card,
  .flag-card,
  .submission-card,
  .activity-review-card { padding: 14px; border-radius: 19px; }
  .staff-nav { gap: 5px; padding: 7px; }
  .staff-nav a { flex: 1 1 calc(50% - 5px); justify-content: center; padding-inline: 8px; font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-contest-carousel .media-carousel__track,
  .hero-activity-line { transition: none !important; }
}

/* ========================================================================
   Lucifer's Lounge v3.3.1 · deploy, local-time and media-reliability hotfix
   ======================================================================== */

/* Larger artwork without the former grey icon tile. */
.stat-art {
  width: clamp(76px, 7vw, 96px) !important;
  height: clamp(76px, 7vw, 96px) !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: clamp(2rem, 4vw, 3rem) !important;
}
.stat-art img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .24));
}

.page-directory__item > .directory-art,
.directory-art {
  width: clamp(58px, 5vw, 72px) !important;
  height: clamp(58px, 5vw, 72px) !important;
  border-radius: 17px !important;
}
.directory-art img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}
.page-directory__item { min-height: 94px; }

/* The footer remains a quiet text directory rather than a second button wall. */
.footer-text-links a {
  min-height: 0 !important;
  padding: 2px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

/* Every non-avatar artwork frame preserves the full media without distortion. */
.design-upload-preview img,
.design-upload-preview video,
.membership-banner img,
.content-media img,
.content-media video,
.content-admin-media img,
.content-admin-media video,
.media-gallery img,
.media-gallery video,
.social-post img,
.social-post video,
.editorial-card img,
.editorial-card video,
.event-admin-card__art img,
.event-hero__art img,
.game-admin-card > img,
.daily-game-heading img,
.game-day-card__image,
.proof-review-grid img,
.proof-review-grid video,
.contest-entry-card__image img,
.contest-review-card img,
.guideline-media img,
.guideline-media video,
.house-rule__media img,
.house-rule__media video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

.membership-banner {
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--surface-soft) 82%, var(--accent-soft));
}
.membership-banner img { max-height: 280px !important; }
.membership-banner--fallback > span {
  position: static !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #fff !important;
  background: transparent !important;
  font-size: clamp(1.45rem, 4vw, 2.35rem) !important;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: none !important;
}

/* Compact lists show the full member picture; the editable profile itself keeps
   its intentional crop and zoom. */
.birthday-today .avatar-frame__image,
.birthday-current .avatar-frame__image,
.birthday-person .avatar-frame__image,
.leaderboard-table .avatar-frame__image,
.leaderboard-row .avatar-frame__image,
.table-member .avatar-frame__image,
.member-chip .avatar-frame__image {
  object-fit: contain !important;
  object-position: center !important;
  transform: translate(-50%, -50%) !important;
}

/* Rebuilt Design Centre: predictable cards, full previews and readable status. */
.design-centre-groups { display: grid; gap: clamp(28px, 5vw, 52px); }
.design-asset-group {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}
.design-asset-group > header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.design-asset-group > header p,
.design-asset-group > header h2 { margin: 0; }
.design-asset-group > header > span {
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 800;
}
.design-upload-card { overflow: hidden; }
.design-upload-preview {
  width: 100%;
  min-height: 180px;
  aspect-ratio: 16 / 9;
  border-style: solid;
}
.design-upload-preview > img,
.design-upload-preview > video,
.design-upload-preview__empty {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 180px;
  place-items: center;
}
.design-upload-preview__empty {
  color: var(--text-soft);
  font-size: 2.4rem;
}
.design-current-file,
[data-design-file-status] {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--text-soft);
}

.date-tile--local {
  width: min(132px, 34vw);
  min-height: 52px;
  padding: 7px 9px;
  line-height: 1.25;
  text-align: center;
}
.date-tile--local .local-datetime { white-space: normal; }

@media (max-width: 760px) {
  .stat-art {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.8rem !important;
  }
  .hero-stat-bar article { min-height: 150px; }
  .page-directory__item > .directory-art,
  .directory-art {
    width: 54px !important;
    height: 54px !important;
  }
  .page-directory__item { min-height: 82px; }
  .design-asset-group { padding: 14px; border-radius: 22px; }
}

@media (max-width: 430px) {
  .stat-art { width: 56px !important; height: 56px !important; }
  .hero-stat-bar article { min-height: 146px; }
  .page-directory__item > .directory-art,
  .directory-art { width: 50px !important; height: 50px !important; }
  .page-directory__item { min-height: 78px; }
}



/* Images begin fully visible. A member may still apply an intentional saved
   zoom from the profile editor, but no intrinsic image dimension can enlarge
   the source beyond its frame. */
img, video { max-width: 100%; }
.avatar-frame__image {
  object-fit: contain !important;
  object-position: center !important;
  background: color-mix(in srgb, var(--surface-soft) 86%, transparent);
}

/* ========================================================================
   Lucifer's Lounge v3.4 · responsive systems, modern profile surfaces
   ======================================================================== */

:root {
  --profile-surface: color-mix(in srgb, var(--surface-raised) 94%, var(--accent-soft));
  --profile-surface-strong: color-mix(in srgb, var(--surface-raised) 84%, var(--accent-soft));
  --profile-border: color-mix(in srgb, var(--line-strong) 76%, var(--accent));
  --profile-glow: 0 20px 60px color-mix(in srgb, var(--accent) 13%, transparent);
  --media-backdrop: color-mix(in srgb, var(--surface-strong) 90%, #000);
}

html[data-theme="dark"] {
  --profile-surface: color-mix(in srgb, var(--surface-raised) 90%, var(--accent-soft));
  --profile-surface-strong: color-mix(in srgb, var(--surface-raised) 77%, var(--accent-soft));
  --profile-border: color-mix(in srgb, var(--line-strong) 74%, var(--accent));
  --profile-glow: 0 22px 68px rgba(0, 0, 0, .34);
  --media-backdrop: #09060b;
}

/* Theme-consistent member cards. Custom nickname colours never become card colours. */
:is(
  .profile-surface, .profile-preview, .member-full-profile, .full-profile-card,
  .profile-popover, .profile-modal__card, .member-rank, .podium-card,
  .staff-card, .membership-member, .birthday-person, .birthday-card,
  .member-admin-card, .member-directory-card, .table-member, .contest-entry-card
) {
  --profile-bubble: var(--profile-surface) !important;
  --profile-text: var(--text) !important;
  color: var(--text) !important;
  border-color: var(--profile-border) !important;
  background: var(--profile-surface) !important;
}

:is(
  .profile-surface, .profile-preview, .member-full-profile, .full-profile-card,
  .profile-popover, .profile-modal__card, .member-rank, .podium-card,
  .staff-card, .membership-member, .birthday-person, .birthday-card,
  .member-admin-card, .member-directory-card, .contest-entry-card
) {
  box-shadow: var(--profile-glow);
}

.profile-trigger {
  color: inherit !important;
  border-color: transparent !important;
  background: transparent !important;
}

.profile-trigger:hover,
.profile-trigger:focus-visible {
  background: color-mix(in srgb, var(--profile-surface-strong) 76%, transparent) !important;
}

:is(.profile-surface, .profile-preview, .member-full-profile, .full-profile-card,
.profile-popover, .profile-modal__card, .member-rank, .podium-card, .staff-card,
.membership-member, .birthday-person, .birthday-card, .member-admin-card,
.member-directory-card, .table-member) :is(p, small, dt) {
  color: var(--text-soft) !important;
}

/* Profile pictures always honour the member's crop. Other media remains contained. */
.avatar-frame {
  position: relative !important;
  overflow: hidden !important;
  border: 2px solid color-mix(in srgb, var(--profile-border) 74%, transparent);
  background: var(--profile-surface-strong) !important;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 15%, transparent);
}

.avatar-frame__image,
.birthday-today .avatar-frame__image,
.birthday-current .avatar-frame__image,
.birthday-person .avatar-frame__image,
.leaderboard-table .avatar-frame__image,
.leaderboard-row .avatar-frame__image,
.table-member .avatar-frame__image,
.member-chip .avatar-frame__image {
  position: absolute !important;
  left: calc(50% + var(--avatar-x, 0%)) !important;
  top: calc(50% + var(--avatar-y, 0%)) !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: translate(-50%, -50%) scale(var(--avatar-zoom, 1)) !important;
  transform-origin: center !important;
  background: transparent !important;
}

.avatar-cropper[hidden] { display: none !important; }
.avatar-cropper:not([hidden]) {
  display: grid !important;
  gap: 16px;
  padding: clamp(14px, 3vw, 22px);
  border: 1px solid var(--profile-border);
  border-radius: 24px;
  background: var(--profile-surface);
}
.avatar-cropper__stage {
  position: relative;
  width: min(100%, 520px);
  margin-inline: auto;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(45deg, color-mix(in srgb, var(--surface-soft) 86%, transparent) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(-45deg, color-mix(in srgb, var(--surface-soft) 86%, transparent) 25%, transparent 25%) 0 12px / 24px 24px,
    var(--media-backdrop);
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 48px rgba(0,0,0,.18);
  touch-action: none;
}
.avatar-cropper__stage canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  cursor: grab;
  outline: none;
}
.avatar-cropper__stage canvas:active { cursor: grabbing; }
.avatar-cropper__stage canvas:focus-visible { box-shadow: inset 0 0 0 4px var(--accent); }
.avatar-cropper__guide {
  position: absolute;
  inset: 7%;
  z-index: 2;
  pointer-events: none;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0,0,0,.34), 0 0 0 1px rgba(0,0,0,.4);
}
.avatar-cropper__controls {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}
.avatar-cropper__controls label {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.avatar-cropper__controls output {
  min-width: 3.5rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.avatar-cropper > p { margin: 0; text-align: center; }

.sensitive-password-field {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.sensitive-password-field:has(input:required) {
  border-color: var(--profile-border);
  background: var(--profile-surface-strong);
}

/* Responsive image systems: keep originals visible without stretching. */
:is(
  .design-upload-preview, .design-asset__preview, .content-media,
  .content-admin-media, .media-gallery, .editorial-card, .event-admin-card__art,
  .event-hero__art, .game-admin-card, .daily-game-heading, .game-day-card__image,
  .proof-review-grid, .guideline-media, .house-rule__media,
  .contest-entry-card__image, .contest-review-media, .contest-review-media-grid
) :is(img, video),
:is(.design-upload-preview, .design-asset__preview, .guideline-media, .proof-review-grid) > :is(img, video) {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: min(72svh, 760px);
  object-fit: contain !important;
  object-position: center !important;
}

.media-image-button,
.video-frame { max-width: 100%; min-width: 0; }
.media-image-button > img,
.video-frame > video { margin-inline: auto; }

.design-asset-group,
.design-upload-card,
.design-asset,
.design-upload-preview,
.design-asset__preview {
  min-width: 0;
}
.design-upload-preview,
.design-asset__preview {
  aspect-ratio: 16 / 9;
  min-height: clamp(170px, 28vw, 320px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--media-backdrop);
}
.design-upload-grid,
.design-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(16px, 3vw, 26px);
}

.is-media-unavailable {
  opacity: .45;
  filter: grayscale(1);
}
.media-unavailable-note {
  display: block;
  margin-top: 8px;
  color: var(--danger);
  font-size: .78rem;
}

/* Birthday profiles scale as complete cards instead of detached avatars. */
.birthday-people,
.birthday-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: clamp(14px, 2.5vw, 22px);
}
.birthday-person,
.birthday-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--profile-border);
  border-radius: 24px;
}
.birthday-person__profile,
.birthday-card.profile-trigger {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  width: 100%;
  min-height: 132px;
  padding: clamp(15px, 2.5vw, 21px) !important;
  text-align: left;
}
.birthday-person :is(h3, p, small),
.birthday-card :is(h3, p, small) {
  max-width: 100%;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

/* Modern, no-horizontal-scroll standings on phones. */
.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}
.leaderboard-tabs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 800;
  text-decoration: none;
}
.leaderboard-tabs a:is(:hover, :focus-visible, .is-active) {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}
.leaderboard-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface-raised);
  box-shadow: var(--card-shadow);
}
.leaderboard-responsive-table { width: 100%; overflow: visible; }
.leaderboard-standings { width: 100%; border-collapse: separate; border-spacing: 0; }
.leaderboard-standings th,
.leaderboard-standings td { padding: 16px clamp(13px, 2.5vw, 24px); vertical-align: middle; }
.leaderboard-standings tbody tr {
  color: var(--text);
  background: var(--profile-surface) !important;
}
.leaderboard-standings tbody tr:nth-child(even) {
  background: var(--profile-surface-strong) !important;
}
.leaderboard-standings tbody tr + tr td { border-top: 1px solid var(--line); }
.leaderboard-standings .table-member {
  display: inline-grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 5px 7px !important;
  text-align: left;
}
.leaderboard-standings .table-member > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.standing-rank,
.standing-points { font-variant-numeric: tabular-nums; }
.standing-rank {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: var(--accent-strong);
  background: var(--accent-soft);
}
.standing-points { font-size: 1.15rem; }
.leaderboard-guidelines-link {
  display: flex;
  justify-content: center;
  padding: 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

/* Public contest: stable aspect ratio, usable controls, and multiple profiles. */
.profile-contest-carousel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(22px, 4vw, 34px);
  background: var(--surface-raised);
  box-shadow: var(--card-shadow);
}
.profile-contest-carousel .media-carousel__viewport { min-width: 0; overflow: hidden; }
.profile-contest-carousel .media-carousel__track { align-items: stretch; }
.contest-entry-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  width: 100%;
  min-width: 100%;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none;
}
.contest-entry-card__image {
  display: grid;
  min-height: clamp(430px, 62vw, 700px);
  place-items: center;
  padding: clamp(8px, 2vw, 18px);
  background: var(--media-backdrop);
}
.contest-entry-card__image .media-image-button {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  place-items: center;
  border: 0;
  background: transparent;
}
.contest-entry-card__image img { max-height: min(78svh, 780px) !important; }
.contest-entry-card__copy {
  min-width: 0;
  padding: clamp(20px, 4vw, 42px);
}
.contest-entry-card__copy h3 { overflow-wrap: anywhere; }
.contest-entry-card form[data-contest-vote] { display: grid; gap: 8px; }
.contest-unvote { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.contest-submit-shell,
.activity-submit-shell { width: min(100%, 900px); }
.contest-submit-shell > *,
.activity-submit-shell > * { width: 100%; }

/* Staff contest review shows current and replacement together without overflow. */
.contest-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr));
  gap: clamp(18px, 3vw, 28px);
}
.contest-review-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}
.contest-review-card__copy { display: grid; gap: 16px; padding: clamp(16px, 3vw, 24px); }
.contest-review-card__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.contest-review-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  padding: 12px;
  background: var(--media-backdrop);
}
.contest-review-media {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  background: rgba(255,255,255,.05);
}
.contest-review-media > :is(span, figcaption) { color: #fff; font-size: .75rem; font-weight: 850; }
.contest-review-media .media-image-button { display: grid; place-items: center; }
.contest-review-media img { aspect-ratio: 9 / 16; max-height: 500px; }
.contest-replacement-panel {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--profile-border);
  border-radius: 18px;
  background: var(--profile-surface);
}
.contest-review-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.guidelines-list { display: grid; gap: clamp(18px, 3vw, 30px); }
.guideline-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
  margin-top: 18px;
}
.guideline-media > * {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--media-backdrop);
}

/* Larger home figures and accessible touch targets. */
.stat-art {
  width: clamp(82px, 8vw, 108px) !important;
  height: clamp(82px, 8vw, 108px) !important;
}
.hero-stat-bar article {
  min-height: 176px;
  border: 1px solid color-mix(in srgb, rgba(255,255,255,.32) 70%, transparent);
  backdrop-filter: blur(16px);
}
:is(.button, .text-button, .icon-button, .carousel-control, .theme-toggle, .menu-button) {
  min-height: 44px;
}

@media (max-width: 760px) {
  .avatar-cropper__controls { grid-template-columns: 1fr; }
  .avatar-cropper__controls label { grid-template-columns: 1fr auto; }
  .avatar-cropper__controls label input { grid-column: 1 / -1; }

  .leaderboard-table-card { border-radius: 22px; background: transparent; box-shadow: none; }
  .leaderboard-table-card .table-title { padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-raised); }
  .leaderboard-responsive-table { margin-top: 12px; }
  .leaderboard-standings,
  .leaderboard-standings tbody { display: block; width: 100%; }
  .leaderboard-standings thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .leaderboard-standings tbody { display: grid; gap: 12px; }
  .leaderboard-standings tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--profile-border);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
  }
  .leaderboard-standings tbody td {
    display: grid;
    grid-template-columns: minmax(82px, .7fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 13px 14px;
    border-top: 1px solid var(--line);
  }
  .leaderboard-standings tbody td:nth-child(-n + 2) { border-top: 0; }
  .leaderboard-standings tbody td:nth-child(odd) { border-right: 1px solid var(--line); }
  .leaderboard-standings tbody td::before {
    content: attr(data-label);
    color: var(--text-soft);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  .leaderboard-standings tbody td[data-label="Member"] {
    grid-column: 1 / -1;
    grid-template-columns: 82px minmax(0, 1fr);
    border-top: 1px solid var(--line);
    border-right: 0;
    order: -1;
  }
  .leaderboard-standings tbody td[data-label="Member"]::before { align-self: start; padding-top: 13px; }
  .leaderboard-standings tbody td[data-label="Member"] + td { border-top: 0; }
  .leaderboard-standings .table-member { width: 100%; }
  .leaderboard-empty-row { display: block !important; }
  .leaderboard-empty-row td { display: block !important; border: 0 !important; text-align: center; }
  .leaderboard-empty-row td::before { content: none !important; }
  .leaderboard-guidelines-link { margin-top: 12px; border: 1px solid var(--line); border-radius: 18px; }

  .contest-entry-card { grid-template-columns: 1fr; }
  .contest-entry-card__image { min-height: min(126vw, 590px); }
  .contest-entry-card__copy { gap: 18px; }
  .contest-toolbar { align-items: stretch; flex-direction: column; }
  .contest-toolbar .contest-unvote { justify-content: flex-start; }

  .birthday-person__profile,
  .birthday-card.profile-trigger { min-height: 112px; }
  .birthday-person .avatar,
  .birthday-card .avatar { width: 72px; height: 72px; }

  .stat-art {
    width: 72px !important;
    height: 72px !important;
    font-size: 2rem !important;
  }
  .hero-stat-bar article { min-height: 154px; }
}

@media (max-width: 480px) {
  .leaderboard-tabs { display: grid; grid-template-columns: 1fr; border-radius: 20px; }
  .leaderboard-tabs a { width: 100%; }
  .leaderboard-standings tbody tr { grid-template-columns: 1fr; }
  .leaderboard-standings tbody td,
  .leaderboard-standings tbody td[data-label="Member"] {
    grid-column: auto;
    grid-template-columns: 78px minmax(0, 1fr);
    border-top: 1px solid var(--line) !important;
    border-right: 0 !important;
  }
  .leaderboard-standings tbody td:first-child { border-top: 0 !important; }
  .leaderboard-standings tbody td[data-label="Member"] { order: -1; border-top: 0 !important; }
  .contest-entry-card__image { min-height: min(136vw, 530px); }
  .contest-entry-card__copy { padding: 18px 15px; }
  .contest-votes { align-items: stretch; flex-direction: column; }
  .contest-votes span { width: 100%; justify-content: space-between; }
  .birthday-people,
  .birthday-strip { grid-template-columns: 1fr; }
  .contest-review-actions .button,
  .contest-review-actions .text-button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-trigger,
  .contest-entry-card,
  .avatar-frame__image { transition: none !important; }
}

/* ========================================================================
   Lucifer's Lounge v3.4.2 · identity, mobile standings, crop and review UX
   ======================================================================== */

/* Staff positions and memberships never render placeholder text. */
.badge-row:empty { display: none !important; }
.badge--role-founder {
  color: var(--role-founder-text, #39220a);
  background: var(--role-founder-bg, #f0d58a);
  box-shadow: inset 0 0 0 1px rgba(91, 57, 8, .14);
}
.badge--role-founder::before { content: var(--role-founder-emoji, "♛") !important; }
.badge--role-owner::before { content: var(--role-owner-emoji, "👑") !important; }
.badge--role-admin::before { content: var(--role-admin-emoji, "⭐") !important; }
.badge--role-moderator::before { content: var(--role-moderator-emoji, "🛡️") !important; }
.badge--membership::before {
  display: inline-block !important;
  flex: 0 0 auto;
  font-size: .95em;
  line-height: 1;
}
.badge--membership-diamond::before { content: var(--tier-diamond-emoji, "💎") !important; }
.badge--membership-gold::before { content: var(--tier-gold-emoji, "🥇") !important; }
.badge--membership-silver::before { content: var(--tier-silver-emoji, "🥈") !important; }
.badge--membership-bronze::before { content: var(--tier-bronze-emoji, "🥉") !important; }

/* Uploaded header artwork has an independent opacity layer. */
.page-banner--home { --page-image: url('/site-assets/page-home'); }
.page-banner--members { --page-image: url('/site-assets/page-members'); }
.page-banner--profile { --page-image: url('/site-assets/page-profile'); }
.cinematic-hero::before {
  position: absolute;
  inset: 0;
  z-index: -5;
  content: "";
  pointer-events: none;
  background-image: var(--page-image, none);
  background-position: center;
  background-size: cover;
  opacity: var(--page-image-opacity, .55);
  transition: opacity .2s ease;
}
.cinematic-hero__video { opacity: var(--hero-video-opacity, 1); transition: opacity .2s ease; }

.page-hero,
.staff-hero,
.page-banner {
  background-image: radial-gradient(circle at 83% 25%, #7a378d, #27112f 58%, #120917) !important;
  background-position: center;
  background-size: cover;
}
.page-hero::before,
.staff-hero::before,
.page-banner::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background-image: var(--page-image, none);
  background-position: center;
  background-size: cover;
  opacity: var(--page-image-opacity, .55);
  transition: opacity .2s ease;
}
.page-hero::after,
.staff-hero::after,
.page-banner::after {
  z-index: 1 !important;
  background:
    linear-gradient(90deg, rgba(16, 7, 21, .95), rgba(31, 11, 40, .72) 58%, rgba(31, 11, 40, .45)),
    linear-gradient(115deg, transparent 58%, rgba(224, 184, 93, .09)) !important;
}
.page-banner__glow { z-index: 1; }
.page-hero .shell,
.staff-hero .shell,
.page-banner__inner { z-index: 2; }

/* Staff can see and operate every crop control before uploading. */
.avatar-cropper__controls {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
}
.crop-nudge {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(46px, auto));
  justify-content: center;
  gap: 8px;
}
.crop-nudge button {
  min-width: 46px;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface-raised);
  font-weight: 850;
  box-shadow: var(--shadow-sm);
}
.crop-nudge button:is(:hover, :focus-visible) {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

/* Design-centre opacity control. */
.design-opacity-form {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-soft);
}
.design-opacity-form label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 12px;
  margin: 0;
}
.design-opacity-form label > span { color: var(--text); font-weight: 800; }
.design-opacity-form output { color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.design-opacity-form input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 32px;
  accent-color: var(--accent);
}
.design-opacity-form small { margin: 0; }
.design-upload-preview :is(img, video) { transition: opacity .16s ease; }

/* Ten-row pages and purpose-built cards replace the cramped mobile table. */
.leaderboard-mobile-list { display: none; }
.leaderboard-pagination {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px clamp(15px, 3vw, 24px);
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}
.leaderboard-pagination > div:last-child { text-align: right; }
.leaderboard-pagination a,
.leaderboard-pagination .is-disabled,
.leaderboard-pagination__gap {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  background: var(--surface-raised);
  font-weight: 800;
  text-decoration: none;
}
.leaderboard-pagination a:is(:hover, :focus-visible),
.leaderboard-pagination a.is-current,
.leaderboard-pagination a[aria-current="page"] {
  border-color: var(--accent);
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}
.leaderboard-pagination .is-disabled { opacity: .45; }
.leaderboard-pagination__numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.leaderboard-pagination__gap { min-width: 24px; padding-inline: 4px; border-color: transparent; background: transparent; }

.leaderboard-mobile-card {
  display: grid;
  gap: 15px;
  min-width: 0;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--profile-border);
  border-radius: 23px;
  color: var(--text);
  background: var(--profile-surface);
  box-shadow: var(--profile-glow);
}
.leaderboard-mobile-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.leaderboard-mobile-card__rank {
  display: inline-grid;
  min-width: 48px;
  min-height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 900;
}
.leaderboard-mobile-card__member {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 8px !important;
  border-radius: 17px;
  text-align: left;
}
.leaderboard-mobile-card__member > span:last-child { min-width: 0; }
.leaderboard-mobile-card__member b,
.leaderboard-mobile-card__member small { display: block; overflow-wrap: anywhere; }
.leaderboard-mobile-card__identity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.leaderboard-mobile-card__identity > div {
  min-width: 0;
  min-height: 78px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
}
.leaderboard-mobile-card__identity small {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Submission review clearly binds the result to the submitting member. */
.activity-review-member {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
}
.activity-review-member > div { min-width: 0; }
.activity-review-member small { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.activity-points-editor {
  display: grid;
  grid-template-columns: minmax(180px, .65fr) minmax(220px, 1.35fr);
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 17px;
  background: var(--profile-surface);
}
.activity-points-editor > div { display: grid; gap: 6px; align-content: end; }
.activity-points-editor small { color: var(--text-soft); }
.activity-review-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.activity-review-actions .button { flex: 1 1 180px; }

/* New inline vote-removal controls remain available on the selected entry. */
.contest-entry-unvote,
.contest-unvote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.contest-entry-card.is-voted {
  box-shadow: inset 0 0 0 2px var(--accent), var(--profile-glow) !important;
}

@media (max-width: 760px) {
  .avatar-cropper__controls { grid-template-columns: 1fr; }
  .crop-nudge {
    grid-template-columns: repeat(3, 48px);
    grid-template-rows: repeat(3, 48px);
  }
  .crop-nudge [data-crop-move="up"] { grid-column: 2; grid-row: 1; }
  .crop-nudge [data-crop-move="left"] { grid-column: 1; grid-row: 2; }
  .crop-nudge [data-crop-reset] { grid-column: 2; grid-row: 2; }
  .crop-nudge [data-crop-move="right"] { grid-column: 3; grid-row: 2; }
  .crop-nudge [data-crop-move="down"] { grid-column: 2; grid-row: 3; }

  .leaderboard-desktop-table { display: none !important; }
  .leaderboard-mobile-list {
    display: grid;
    gap: 13px;
    margin-top: 13px;
  }
  .leaderboard-pagination {
    grid-template-columns: 1fr 1fr;
    margin-top: 13px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
  }
  .leaderboard-pagination__numbers { grid-column: 1 / -1; grid-row: 1; }
  .leaderboard-pagination > div:first-child { grid-column: 1; grid-row: 2; }
  .leaderboard-pagination > div:last-child { grid-column: 2; grid-row: 2; }
  .leaderboard-pagination > div:first-child :is(a, span),
  .leaderboard-pagination > div:last-child :is(a, span) { width: 100%; }
  .leaderboard-guidelines-link { margin-top: 13px; }

  .activity-review-grid { grid-template-columns: 1fr; }
  .activity-points-editor { grid-template-columns: 1fr; }
  .activity-review-card__head { align-items: stretch; flex-direction: column; }
  .activity-review-actions .button { flex-basis: 100%; }
}

@media (max-width: 430px) {
  .leaderboard-mobile-card__identity { grid-template-columns: 1fr; }
  .leaderboard-pagination a,
  .leaderboard-pagination .is-disabled { padding-inline: 8px; font-size: .77rem; }
  .design-opacity-form { padding: 12px; }
}

/* v3.4.2 identity and review finishing details. */
.event-member-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 10px;
}
.event-member-chip {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  min-width: 0;
  padding: 11px !important;
  border: 1px solid var(--profile-border) !important;
  border-radius: 17px !important;
  color: var(--text) !important;
  background: var(--profile-surface) !important;
  text-align: left;
}
.event-member-chip__copy { display: grid; min-width: 0; gap: 5px; }
.event-member-chip__copy strong { overflow-wrap: anywhere; }

.activity-fixed-recipient {
  display: grid;
  grid-template-columns: minmax(120px, .5fr) minmax(0, 1fr);
  gap: 5px 13px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--success) 38%, var(--line));
  border-radius: 17px;
  background: color-mix(in srgb, var(--success-soft) 72%, var(--surface-raised));
}
.activity-fixed-recipient > span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--text-soft);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.activity-fixed-recipient strong { min-width: 0; overflow-wrap: anywhere; }
.activity-fixed-recipient small { color: var(--text-soft); overflow-wrap: anywhere; }

.mvp-avatar {
  display: grid !important;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px !important;
  text-align: center;
}
.mvp-avatar__identity,
.mvp-archive__member > span:last-child {
  display: grid;
  min-width: 0;
  gap: 6px;
}
.mvp-avatar__identity strong,
.mvp-archive__member strong { overflow-wrap: anywhere; }
.mvp-archive__member {
  display: inline-grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-block: 10px;
  padding: 8px !important;
  border: 1px solid var(--profile-border) !important;
  border-radius: 16px !important;
  color: var(--text) !important;
  background: var(--profile-surface) !important;
  text-align: left;
}

.design-transparency-pending {
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
  color: var(--accent-strong) !important;
  font-weight: 750;
}

.member-chip__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  line-height: 1.05;
}
.member-chip__copy > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-chip__identity {
  display: flex;
  flex-wrap: nowrap;
  max-width: min(32vw, 250px);
  overflow: hidden;
  gap: 4px;
}
.member-chip__identity .badge {
  min-width: 0;
  padding: 3px 6px;
  font-size: .56rem;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .activity-fixed-recipient { grid-template-columns: 1fr; }
  .activity-fixed-recipient > span { grid-row: auto; }
  .event-member-list { grid-template-columns: 1fr; }
}

/* ========================================================================
   Lucifer's Lounge v3.4.3 · dark member area, awards, crop studio and review
   ======================================================================== */

/* The signed-in member hero now follows the selected theme instead of keeping
   the legacy light lavender background in dark mode. */
.member-hero {
  isolation: isolate;
  color: var(--text) !important;
  background:
    radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 34rem),
    linear-gradient(145deg, var(--surface-raised), var(--surface-soft)) !important;
  border-bottom-color: var(--line) !important;
}
.member-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-raised) 92%, transparent), transparent 68%),
    radial-gradient(circle at 12% 100%, color-mix(in srgb, var(--luxury-gold) 10%, transparent), transparent 28rem);
}
.member-hero h1,
.member-hero .member-identity,
.member-hero .member-identity > div { color: var(--text) !important; }
.member-hero .eyebrow { color: var(--accent-strong) !important; }
.member-hero .button--ghost {
  color: var(--text) !important;
  border-color: var(--line-strong) !important;
  background: color-mix(in srgb, var(--surface-raised) 82%, transparent) !important;
  backdrop-filter: blur(18px);
}
html[data-theme="dark"] .member-hero {
  color: #fff !important;
  background:
    radial-gradient(circle at 82% 7%, rgba(151, 72, 177, .33), transparent 32rem),
    radial-gradient(circle at 8% 100%, rgba(218, 177, 84, .11), transparent 28rem),
    linear-gradient(145deg, #211027 0%, #120917 58%, #0b070d 100%) !important;
  border-bottom-color: rgba(226, 205, 235, .15) !important;
}
html[data-theme="dark"] .member-hero::before {
  background: linear-gradient(90deg, rgba(10, 5, 13, .28), rgba(35, 15, 44, .04));
}
html[data-theme="dark"] .member-hero :is(h1, .member-identity, .member-identity > div) { color: #fff !important; }
html[data-theme="dark"] .member-hero .eyebrow { color: #e5b8f2 !important; }
html[data-theme="dark"] .member-hero .button--ghost {
  color: #fff !important;
  border-color: rgba(255,255,255,.22) !important;
  background: rgba(255,255,255,.08) !important;
}

/* Multiple named member awards. */
.section-heading--light :is(h2, p:not(.eyebrow)) { color: #fff; }
.section-heading--light .eyebrow { color: var(--luxury-gold-soft); }
.mvp-awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: clamp(16px, 3vw, 26px);
}
.mvp-award-card {
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
  padding: clamp(20px, 3vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(235, 209, 141, .2);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(177, 80, 202, .24), transparent 18rem),
    linear-gradient(145deg, rgba(51, 25, 60, .96), rgba(18, 9, 23, .98));
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
}
.mvp-award-card > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}
.mvp-award-card h2 {
  margin: 3px 0 7px;
  color: #fff;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  overflow-wrap: anywhere;
}
.mvp-award-card time,
.mvp-award-card__story,
.mvp-award-card__story p { color: #d9ccde; }
.mvp-award-card__medal {
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(240, 213, 138, .3);
  border-radius: 17px;
  background: rgba(240, 213, 138, .1);
  font-size: 1.65rem;
}
.mvp-award-card__winner {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 13px !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 20px !important;
  color: #fff !important;
  background: rgba(255,255,255,.07) !important;
  text-align: left;
}
.mvp-award-card__winner-copy { display: grid; min-width: 0; gap: 5px; }
.mvp-award-card__winner :is(strong, small) { color: #fff; overflow-wrap: anywhere; }
.mvp-award-card__winner small { color: #cdbed3; font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.mvp-award-card__winner--empty { opacity: .82; }
.mvp-award-card__story { min-width: 0; }
.mvp-award-card__story .media-carousel,
.mvp-award-card__story .content-media-single { margin-top: 16px; }
.member-award-guidance {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--luxury-gold) 34%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--luxury-gold-soft) 17%, var(--surface-soft));
}
.member-award-guidance > span { font-size: 1.65rem; }
.member-award-guidance p { margin: 4px 0 0; color: var(--text-soft); }

/* Exact profile-picture crop studio. */
.avatar-editor-card { overflow: hidden; }
.avatar-editor-card__heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.avatar-editor-card__heading h2 { margin-bottom: 6px; }
.avatar-editor-card__heading p:not(.eyebrow) { margin: 0; }
.avatar-editor-card__heading > span {
  display: inline-grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 1.4rem;
}
.avatar-file-picker {
  padding: 15px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: var(--surface-soft);
}
.avatar-file-picker input { margin-top: 9px; }
.avatar-cropper[hidden] { display: none !important; }
.avatar-cropper:not([hidden]) {
  display: grid !important;
  gap: 18px;
  padding: clamp(15px, 3vw, 24px) !important;
  border: 1px solid var(--profile-border) !important;
  border-radius: 26px !important;
  background: var(--profile-surface) !important;
  box-shadow: var(--profile-glow);
}
.avatar-cropper__intro {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.avatar-cropper__intro > div { display: grid; gap: 3px; }
.avatar-cropper__intro small { color: var(--text-soft); }
.avatar-cropper__ready {
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--success) 35%, var(--line));
  border-radius: 999px;
  color: var(--success);
  background: var(--success-soft);
  font-size: .72rem;
  font-weight: 850;
  white-space: nowrap;
}
.avatar-cropper__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
}
.avatar-cropper__stage {
  position: relative !important;
  width: min(100%, 560px) !important;
  aspect-ratio: 1 !important;
  margin-inline: auto;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.2) !important;
  border-radius: 50% !important;
  background: #120b16 !important;
  box-shadow: 0 24px 64px rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.12) !important;
}
.avatar-cropper__stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.avatar-cropper__stage canvas.is-dragging { cursor: grabbing; }
.avatar-cropper__stage canvas:focus-visible { outline: 0; box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--accent) 78%, transparent); }
.avatar-cropper__guide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: clamp(7px, 1.5vw, 12px) solid rgba(255,255,255,.11);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.38), inset 0 0 48px rgba(0,0,0,.18);
}
.avatar-cropper__centre {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: .58;
  transform: translate(-50%, -50%);
}
.avatar-cropper__centre::before,
.avatar-cropper__centre::after {
  position: absolute;
  content: "";
  background: rgba(255,255,255,.8);
}
.avatar-cropper__centre::before { left: 8px; top: 0; width: 2px; height: 18px; }
.avatar-cropper__centre::after { left: 0; top: 8px; width: 18px; height: 2px; }
.avatar-cropper__preview-panel {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-raised);
  text-align: center;
}
.avatar-cropper__preview-panel p { margin: 0; }
.avatar-cropper__preview-panel small { color: var(--text-soft); }
.avatar-cropper__live-preview {
  width: min(100%, 178px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 5px solid color-mix(in srgb, var(--accent) 44%, var(--line));
  border-radius: 50%;
  background: #120b16;
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
}
.avatar-cropper__live-preview canvas { display: block; width: 100%; height: 100%; }
.avatar-cropper__controls {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px;
}
.avatar-zoom-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.avatar-zoom-control > button,
.crop-nudge button {
  min-width: 46px;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface-raised);
  font-weight: 850;
  box-shadow: var(--shadow-sm);
}
.avatar-zoom-control > button { font-size: 1.25rem; }
.avatar-zoom-control > button:is(:hover, :focus-visible),
.crop-nudge button:is(:hover, :focus-visible) {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}
.avatar-zoom-control label {
  display: grid !important;
  grid-template-columns: auto auto !important;
  align-items: center;
  gap: 7px 12px;
  margin: 0;
}
.avatar-zoom-control label > span { font-weight: 800; }
.avatar-zoom-control input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.avatar-zoom-control output { text-align: right; font-variant-numeric: tabular-nums; }
.crop-nudge {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(46px, auto));
  justify-content: center;
  gap: 8px;
}
.avatar-cropper__readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.avatar-cropper__readout span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: .72rem;
  text-align: center;
}
.avatar-cropper__readout strong { color: var(--text); font-variant-numeric: tabular-nums; }
.avatar-cropper > p { margin: 0; color: var(--text-soft); text-align: center; }
[data-avatar-crop-status][data-error] { color: var(--danger); font-weight: 750; }

/* Contest navigation is a normal row directly below the active card and its
   vote action; it no longer floats over the profile content. */
.profile-contest-carousel { padding: 0 !important; overflow: hidden; }
.profile-contest-carousel .media-carousel__viewport { border-radius: 0 !important; }
.contest-carousel-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px clamp(14px, 3vw, 24px);
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}
.profile-contest-carousel .contest-carousel-navigation .carousel-control {
  position: static !important;
  inset: auto !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: 0;
  height: auto !important;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  transform: none !important;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}
.profile-contest-carousel .contest-carousel-navigation .carousel-control--prev { justify-self: start; }
.profile-contest-carousel .contest-carousel-navigation .carousel-control--next { justify-self: end; }
.profile-contest-carousel .contest-carousel-navigation .carousel-status {
  position: static !important;
  inset: auto !important;
  min-width: 68px;
  padding: 8px 12px;
  transform: none !important;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-raised);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

@media (max-width: 760px) {
  .member-hero { padding-block: clamp(52px, 14vw, 82px); }
  .avatar-cropper__workspace { grid-template-columns: 1fr; }
  .avatar-cropper__preview-panel {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    text-align: left;
  }
  .avatar-cropper__preview-panel .eyebrow { grid-column: 1 / -1; }
  .avatar-cropper__live-preview { grid-row: 2 / 4; width: 112px; }
  .avatar-cropper__readout { grid-template-columns: 1fr; }
  .mvp-awards-grid { grid-template-columns: 1fr; }
  .contest-carousel-navigation { grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 12px; }
  .profile-contest-carousel .contest-carousel-navigation .carousel-control { padding-inline: 12px; }
}

@media (max-width: 480px) {
  .avatar-cropper:not([hidden]) { padding: 12px !important; border-radius: 20px !important; }
  .avatar-cropper__intro { align-items: flex-start; }
  .avatar-cropper__ready { white-space: normal; text-align: center; }
  .crop-nudge { grid-template-columns: repeat(5, minmax(42px, 1fr)); gap: 5px; }
  .crop-nudge button,
  .avatar-zoom-control > button { min-width: 42px; min-height: 42px; padding: 7px; }
  .avatar-zoom-control { gap: 6px; }
  .avatar-cropper__preview-panel { grid-template-columns: 86px minmax(0, 1fr); padding: 12px; }
  .avatar-cropper__live-preview { width: 86px; }
  .contest-carousel-navigation strong { display: none; }
  .profile-contest-carousel .contest-carousel-navigation .carousel-control { min-width: 48px; padding: 10px; font-size: 1.1rem; }
}

/* v3.4.3 media optimization audit states */
.design-compression-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--success, #2f9b69) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--success, #2f9b69) 10%, var(--surface));
  color: var(--text);
  font-size: .72rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}
.design-compression-badge::before { content: '✓'; margin-right: 5px; }
.design-compression-badge.is-legacy {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--text-soft);
}
.design-compression-badge.is-legacy::before { content: '◷'; }
.design-file-warning {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, #c27a20 48%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, #c27a20 10%, var(--surface));
  color: var(--text);
  font-size: .78rem;
  line-height: 1.55;
}

/* ========================================================================
   Lucifer's Lounge v3.4.4 · dedicated staff studios and mobile avatar crop
   ======================================================================== */

/* Membership profiles use the same below-card navigation pattern as the
   Profile Contest instead of floating controls over member information. */
.membership-carousel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}
.membership-carousel .media-carousel__viewport {
  border: 0 !important;
  border-radius: 0 !important;
}
.membership-carousel-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px clamp(14px, 3vw, 24px);
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}
.membership-carousel .membership-carousel-navigation .carousel-control {
  position: static !important;
  inset: auto !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: 0;
  height: auto !important;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  transform: none !important;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}
.membership-carousel .membership-carousel-navigation .carousel-control--prev { justify-self: start; }
.membership-carousel .membership-carousel-navigation .carousel-control--next { justify-self: end; }
.membership-carousel .membership-carousel-navigation .carousel-status {
  position: static !important;
  inset: auto !important;
  min-width: 68px;
  padding: 8px 12px;
  transform: none !important;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-raised);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Dedicated staff Leaderboard, tab review and awards pages. */
.staff-submission-search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(170px, .7fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: clamp(14px, 2.5vw, 20px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
}
.staff-submission-search label { margin: 0; }
.staff-review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
}
.staff-review-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-raised);
  font-size: .78rem;
}
.staff-review-summary strong { color: var(--text); font-size: 1rem; }
.staff-pagination {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr) minmax(110px, auto);
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}
.staff-pagination > a,
.staff-pagination__numbers a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  background: var(--surface-raised);
  font-weight: 800;
  text-decoration: none;
}
.staff-pagination > a:last-child { justify-self: end; }
.staff-pagination__numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}
.staff-pagination__numbers a { min-width: 44px; padding-inline: 9px; }
.staff-pagination a.is-current {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}
.staff-pagination a.is-disabled { pointer-events: none; opacity: .45; }
.staff-pagination__gap { align-self: center; color: var(--text-soft); }
.staff-standing-mobile { display: none; }
.staff-standing-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-raised);
}
.staff-standing-card__rank {
  display: inline-grid;
  min-width: 48px;
  min-height: 48px;
  place-items: center;
  border-radius: 15px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 900;
}
.staff-standing-card__member {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0 !important;
  text-align: left;
}
.staff-standing-card__member span:last-child { min-width: 0; }
.staff-standing-card__member strong,
.staff-standing-card__member small { display: block; overflow-wrap: anywhere; }
.staff-awards-list { display: grid; gap: 18px; }
.staff-award-card { overflow: visible; }
.staff-award-winner {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: 14px 0;
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 18px !important;
  text-align: left;
  background: var(--surface-soft) !important;
}
.staff-award-winner > span:last-child { display: grid; gap: 3px; min-width: 0; }
.staff-award-winner .badge-row { margin-top: 5px; }
.staff-award-winner--missing { color: var(--text-soft); }

/* Phone profile-picture studio. The crop opens as a reliable full-screen
   workspace, locks page scrolling and keeps all controls above safe areas. */
.avatar-cropper__studio-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.avatar-cropper__studio-actions .button { flex: 1 1 190px; }
.avatar-studio-reopen { width: fit-content; }
body.avatar-studio-open {
  position: fixed;
  inset: 0;
  width: 100%;
  overflow: hidden !important;
  overscroll-behavior: none;
}

@media (max-width: 900px) {
  .staff-submission-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-submission-search .button { width: 100%; }
}

@media (max-width: 760px) {
  .membership-carousel-navigation { grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 12px; }
  .membership-carousel .membership-carousel-navigation .carousel-control { padding-inline: 12px; }

  .staff-standing-desktop { display: none !important; }
  .staff-standing-mobile { display: grid; gap: 10px; padding: 12px; }
  .staff-leaderboard-table { overflow: hidden; }
  .staff-pagination { grid-template-columns: 1fr 1fr; }
  .staff-pagination__numbers { grid-column: 1 / -1; grid-row: 1; }
  .staff-pagination > a:first-child { grid-column: 1; }
  .staff-pagination > a:last-child { grid-column: 2; }

  .avatar-cropper.is-mobile-studio {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000 !important;
    display: grid !important;
    grid-template-rows: auto auto auto auto auto;
    align-content: start;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding:
      max(14px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--surface) !important;
    box-shadow: none !important;
    -webkit-overflow-scrolling: touch;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__intro {
    position: sticky;
    top: calc(-1 * max(14px, env(safe-area-inset-top)));
    z-index: 4;
    padding: 8px 0 12px;
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    backdrop-filter: blur(18px);
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__workspace {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__stage {
    width: min(calc(100vw - 28px), 62dvh) !important;
    max-width: 560px !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__preview-panel {
    grid-template-columns: 78px minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__preview-panel .eyebrow { grid-column: 1 / -1; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__live-preview { grid-row: 2 / 4; width: 78px; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__controls { gap: 11px; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__studio-actions {
    position: sticky;
    bottom: calc(-1 * max(16px, env(safe-area-inset-bottom)));
    z-index: 5;
    margin-inline: calc(-1 * max(14px, env(safe-area-inset-left)));
    padding:
      12px max(14px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    box-shadow: 0 -16px 34px rgba(0, 0, 0, .12);
    backdrop-filter: blur(18px);
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__studio-actions .button { min-width: 0; flex-basis: calc(50% - 5px); }
}

@media (max-width: 560px) {
  .staff-submission-search { grid-template-columns: 1fr; }
  .staff-standing-card { grid-template-columns: auto minmax(0, 1fr); }
  .staff-standing-card > strong,
  .staff-standing-card > .badge-row { grid-column: 2; justify-self: start; }
  .staff-pagination__numbers a:not(.is-current) { display: none; }
  .staff-pagination__numbers .staff-pagination__gap { display: none; }
  .staff-pagination__numbers a.is-current::before { content: 'Page '; }
  .membership-carousel-navigation strong { display: none; }
  .membership-carousel .membership-carousel-navigation .carousel-control { min-width: 48px; padding: 10px; font-size: 1.1rem; }
  .avatar-cropper.is-mobile-studio .crop-nudge { grid-template-columns: repeat(5, minmax(42px, 1fr)); }
}

/* ========================================================================
   Lucifer's Lounge v3.4.5 · reliable mobile header avatar and crop studio
   ======================================================================== */

/* The signed-in profile control has one explicit size model. Earlier generic
   member-chip rules made a 46px avatar overflow a 44px phone control. */
.member-chip--profile {
  display: inline-flex !important;
  flex: 0 0 auto;
  min-width: 0;
  max-width: min(310px, 32vw);
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.member-chip--profile > .avatar--header,
.member-chip--profile > .avatar--header.avatar-frame {
  display: inline-grid !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  flex: 0 0 40px !important;
  margin: 0 !important;
  place-items: center;
  overflow: hidden !important;
  border-radius: 50% !important;
  aspect-ratio: 1;
}
.member-chip--profile > .avatar--header .avatar-frame__image {
  display: block !important;
  border-radius: inherit;
}

/* The studio is portalled to <body> while open, so no profile-card overflow,
   transformed ancestor or mobile browser toolbar can clip the workspace. */
.avatar-editor-card { overflow: visible !important; }
html.avatar-studio-open,
body.avatar-studio-open {
  overscroll-behavior: none !important;
}
[data-avatar-cropper][hidden] { display: none !important; }
.avatar-cropper:not([hidden]) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100svh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  max-height: none !important;
  place-items: center;
  margin: 0 !important;
  padding: clamp(12px, 2.2vw, 28px) !important;
  overflow: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(8, 4, 11, .78) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.avatar-cropper__scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 5%, rgba(137, 68, 160, .24), transparent 34rem),
    rgba(8, 4, 11, .32);
}
.avatar-cropper__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 980px);
  max-height: calc(100dvh - clamp(24px, 4.4vw, 56px));
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: 0 36px 100px rgba(0, 0, 0, .42);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.avatar-cropper__dialog > * { min-width: 0; }
.avatar-cropper__intro {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-raised) 94%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.avatar-cropper__intro > div:first-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.avatar-cropper__intro .eyebrow { margin: 0; }
.avatar-cropper__intro strong {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.12;
}
.avatar-cropper__intro small {
  max-width: 62ch;
  color: var(--text-soft);
  line-height: 1.5;
}
.avatar-cropper__intro-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}
.avatar-cropper__ready {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
}
.avatar-studio-close {
  display: inline-grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}
.avatar-studio-close:is(:hover, :focus-visible) {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}
.avatar-cropper__workspace {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px) !important;
  gap: clamp(18px, 3vw, 30px) !important;
  align-items: center;
  padding: clamp(18px, 3vw, 30px);
}
.avatar-cropper__workbench {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 10px;
}
.avatar-cropper__stage {
  position: relative !important;
  display: block !important;
  width: min(100%, 560px) !important;
  max-width: 560px !important;
  height: auto !important;
  aspect-ratio: 1 !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  isolation: isolate;
  border: clamp(5px, 1vw, 9px) solid color-mix(in srgb, var(--accent) 50%, rgba(255,255,255,.25)) !important;
  border-radius: 50% !important;
  outline: 1px solid rgba(255,255,255,.22);
  outline-offset: -1px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25% 75%, rgba(255,255,255,.035) 75%),
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, #0b0710 25% 75%, rgba(255,255,255,.035) 75%);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
  box-shadow: 0 26px 72px rgba(0,0,0,.36), inset 0 0 0 1px rgba(255,255,255,.13) !important;
  cursor: grab;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  overscroll-behavior: contain;
}
.avatar-cropper__stage.is-dragging { cursor: grabbing; }
.avatar-cropper__stage:focus-visible {
  outline: 4px solid color-mix(in srgb, var(--accent) 72%, transparent) !important;
  outline-offset: 4px;
}
.avatar-cropper__guide,
.avatar-cropper__centre,
.avatar-cropper__gesture-hint { z-index: 2; pointer-events: none !important; }
.avatar-cropper__gesture-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 28px);
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(8,4,11,.62);
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}
.avatar-cropper__gesture-hint b { font-size: 1.1rem; }
.avatar-cropper__workbench > small {
  max-width: 58ch;
  color: var(--text-soft);
  text-align: center;
}
.avatar-cropper__preview-panel {
  align-self: center;
  min-width: 0;
}
.avatar-cropper__live-preview { width: min(100%, 184px); }
.avatar-cropper__controls {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  padding: 0 clamp(18px, 3vw, 30px) clamp(18px, 3vw, 28px);
}
.avatar-zoom-control label {
  min-width: 0;
}
.avatar-zoom-control input[type="range"] {
  min-height: 34px;
  touch-action: pan-x;
}
.avatar-cropper .crop-nudge {
  grid-template-columns: repeat(5, minmax(48px, 1fr)) !important;
  width: min(100%, 520px);
  margin-inline: auto;
}
.avatar-cropper .crop-nudge button {
  min-width: 48px;
  min-height: 48px;
  touch-action: manipulation;
}
.avatar-cropper__readout {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.avatar-cropper__source-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: .76rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-align: center;
}
.avatar-cropper__studio-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px clamp(18px, 3vw, 30px) max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-raised) 94%, transparent);
  box-shadow: 0 -16px 34px rgba(0,0,0,.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.avatar-cropper__studio-actions .button {
  flex: 1 1 210px;
  min-width: 0;
}
.avatar-studio-reopen { width: fit-content; }

@media (max-width: 760px) {
  .member-chip--profile {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    padding: 4px !important;
    gap: 0 !important;
    border-radius: 50% !important;
  }
  .member-chip--profile .member-chip__copy { display: none !important; }
  .member-chip--profile > .avatar--header,
  .member-chip--profile > .avatar--header.avatar-frame {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    flex: 0 0 38px !important;
    border-width: 1px !important;
  }

  .avatar-cropper:not([hidden]) {
    place-items: stretch;
    padding: 0 !important;
  }
  .avatar-cropper__dialog {
    width: 100% !important;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100svh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .avatar-cropper__intro {
    padding:
      max(12px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      12px
      max(14px, env(safe-area-inset-left));
  }
  .avatar-cropper__ready { display: none; }
  .avatar-studio-close {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
  .avatar-cropper__workspace {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 14px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  }
  .avatar-cropper__stage {
    width: min(calc(100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)), 54dvh, 560px) !important;
  }
  .avatar-cropper__gesture-hint { bottom: 12px; }
  .avatar-cropper__preview-panel {
    grid-template-columns: 78px minmax(0, 1fr) !important;
    justify-items: start !important;
    align-items: center;
    gap: 8px 12px;
    width: 100%;
    padding: 10px 12px;
    text-align: left !important;
  }
  .avatar-cropper__preview-panel .eyebrow { grid-column: 1 / -1; }
  .avatar-cropper__live-preview {
    grid-row: 2 / 4;
    width: 78px !important;
  }
  .avatar-cropper__controls {
    padding: 4px max(14px, env(safe-area-inset-right)) 16px max(14px, env(safe-area-inset-left));
  }
  .avatar-cropper__readout {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .avatar-cropper__studio-actions {
    padding:
      12px max(14px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }
  .avatar-cropper__studio-actions .button { flex-basis: calc(50% - 5px); }
}

@media (max-width: 430px) {
  .member-chip--profile {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
    padding: 3px !important;
  }
  .member-chip--profile > .avatar--header,
  .member-chip--profile > .avatar--header.avatar-frame {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    flex-basis: 36px !important;
  }
  .avatar-cropper__intro strong { font-size: 1.28rem; }
  .avatar-cropper__intro small { font-size: .72rem; }
  .avatar-cropper__stage {
    width: min(calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)), 51dvh, 520px) !important;
  }
  .avatar-cropper .crop-nudge {
    grid-template-columns: repeat(5, minmax(42px, 1fr)) !important;
    gap: 5px;
  }
  .avatar-cropper .crop-nudge button,
  .avatar-zoom-control > button {
    min-width: 42px;
    min-height: 44px;
  }
  .avatar-cropper__readout { gap: 5px; }
  .avatar-cropper__readout span { padding: 8px 5px; font-size: .66rem; }
  .avatar-cropper__studio-actions .button { flex-basis: 100%; }
}


/* ========================================================================
   Lucifer's Lounge v3.4.5 · reliable mobile avatar display and crop studio
   ======================================================================== */

/* The signed-in member picture is an exact, self-contained circle in the
   header. It cannot inherit the larger list-avatar dimensions or overflow the
   compact phone action bar. */
.header-actions .member-chip--profile {
  display: inline-flex !important;
  flex: 0 0 auto;
  min-width: 0;
  max-width: min(220px, 28vw);
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  overflow: hidden;
  border-radius: 999px;
  line-height: 1;
  isolation: isolate;
}
.header-actions .member-chip--profile .avatar--header {
  position: relative !important;
  display: inline-grid !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  flex: 0 0 42px !important;
  place-items: center;
  overflow: hidden !important;
  border: 2px solid color-mix(in srgb, var(--accent) 36%, var(--surface-raised)) !important;
  border-radius: 50% !important;
  background: var(--profile-surface-strong) !important;
  box-shadow: 0 5px 16px color-mix(in srgb, var(--accent) 17%, transparent);
}
.header-actions .member-chip--profile .avatar--header .avatar-frame__image {
  position: absolute !important;
  left: calc(50% + var(--avatar-x, 0%)) !important;
  top: calc(50% + var(--avatar-y, 0%)) !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: translate(-50%, -50%) scale(var(--avatar-zoom, 1)) !important;
  transform-origin: center center !important;
  background: transparent !important;
}

/* Canvas-based cropper. The canvas shown to the member and the exported
   1024px square use the same transform model. */
.avatar-cropper[hidden] { display: none !important; }
.avatar-cropper:not([hidden]) {
  position: relative;
  display: grid !important;
  gap: 16px;
  min-width: 0;
  padding: clamp(14px, 2.7vw, 24px) !important;
  border: 1px solid var(--profile-border) !important;
  border-radius: 26px !important;
  color: var(--text);
  background: var(--profile-surface) !important;
  box-shadow: 0 24px 70px rgba(26, 11, 31, .18) !important;
}
.avatar-cropper__intro {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}
.avatar-cropper__intro > div:first-child { display: grid; min-width: 0; gap: 3px; }
.avatar-cropper__intro .eyebrow { margin: 0; }
.avatar-cropper__intro-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}
.avatar-cropper__ready {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--success, #2f9b69) 42%, var(--line));
  border-radius: 999px;
  color: var(--success, #2f9b69);
  background: color-mix(in srgb, var(--success, #2f9b69) 10%, var(--surface-raised));
  font-size: .72rem;
  font-weight: 850;
  white-space: nowrap;
}
.avatar-cropper__ready.has-error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
  background: color-mix(in srgb, var(--danger) 10%, var(--surface-raised));
}
.avatar-studio-close {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  font-size: 1.55rem;
  line-height: 1;
}
.avatar-cropper__workspace {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(170px, .36fr) !important;
  gap: clamp(14px, 2.5vw, 22px);
  align-items: center;
  min-width: 0;
}
.avatar-cropper__stage {
  position: relative !important;
  width: min(100%, 560px) !important;
  aspect-ratio: 1 !important;
  margin-inline: auto;
  overflow: hidden !important;
  border: 2px solid color-mix(in srgb, var(--accent) 48%, var(--line-strong)) !important;
  border-radius: 50% !important;
  background: #120b16 !important;
  box-shadow: 0 20px 56px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255,255,255,.12) !important;
  isolation: isolate;
  touch-action: none !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: contain;
}
.avatar-cropper__stage canvas[data-avatar-canvas] {
  position: absolute;
  inset: 0;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  cursor: grab;
  outline: 0;
  touch-action: none !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.avatar-cropper__stage canvas[data-avatar-canvas].is-dragging { cursor: grabbing; }
.avatar-cropper__stage canvas[data-avatar-canvas]:focus-visible {
  box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--accent) 82%, transparent) !important;
}
.avatar-cropper__guide,
.avatar-cropper__centre,
.avatar-cropper__gesture-hint { pointer-events: none; }
.avatar-cropper__guide {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: clamp(7px, 1.5vw, 12px) solid rgba(255,255,255,.09) !important;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.46), inset 0 0 52px rgba(0,0,0,.14);
}
.avatar-cropper__centre { z-index: 3; }
.avatar-cropper__gesture-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px;
  color: #fff;
  background: rgba(20, 10, 25, .76);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  font-size: .74rem;
  font-weight: 750;
  line-height: 1.35;
  opacity: 0;
  transform: translate(-50%, -42%) scale(.96);
  transition: opacity .22s ease, transform .22s ease;
  backdrop-filter: blur(12px);
}
.avatar-cropper__gesture-hint b { font-size: 1.3rem; }
.avatar-cropper__gesture-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.avatar-cropper__preview-panel {
  min-width: 0;
  padding: clamp(13px, 2.5vw, 18px) !important;
}
.avatar-cropper__live-preview {
  width: min(100%, 180px) !important;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
}
.avatar-cropper__live-preview canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
}
.avatar-cropper__controls { display: grid !important; gap: 13px !important; }
.avatar-zoom-control { min-width: 0; }
.avatar-zoom-control label { min-width: 0; }
.avatar-zoom-control input[type="range"] {
  min-height: 32px;
  touch-action: pan-x;
}
.avatar-cropper__tool-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.avatar-cropper__tool-row button,
.crop-nudge button {
  display: inline-flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  font-size: .78rem;
  font-weight: 850;
}
.avatar-cropper__tool-row button:is(:hover, :focus-visible),
.crop-nudge button:is(:hover, :focus-visible) {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.crop-nudge {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(48px, 72px)) !important;
  justify-content: center;
  gap: 8px !important;
}
.crop-nudge button { font-size: 1.1rem; }
.avatar-cropper__readout {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px;
}
.avatar-cropper__studio-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.avatar-cropper__studio-actions .button { flex: 1 1 210px; }
.avatar-studio-reopen { width: fit-content; }
body.avatar-studio-open {
  position: fixed;
  inset-inline: 0;
  width: 100%;
  overflow: hidden !important;
  overscroll-behavior: none;
}

@media (max-width: 820px) {
  .header-actions .member-chip--profile {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    padding: 3px !important;
    border-radius: 50% !important;
  }
  .header-actions .member-chip--profile .member-chip__copy { display: none !important; }
  .header-actions .member-chip--profile .avatar--header {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    flex-basis: 40px !important;
  }
}

@media (max-width: 900px) {
  .avatar-cropper.is-mobile-studio {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000 !important;
    display: grid !important;
    grid-template-rows: auto auto auto auto auto;
    align-content: start;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--text) !important;
    background: var(--surface) !important;
    box-shadow: none !important;
    -webkit-overflow-scrolling: touch;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__intro {
    position: sticky;
    top: calc(-1 * max(12px, env(safe-area-inset-top)));
    z-index: 10;
    margin-inline: calc(-1 * max(12px, env(safe-area-inset-left)));
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      12px
      max(12px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(20px) saturate(150%);
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__intro > div:first-child small { font-size: .72rem; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__ready { display: none; }
  .avatar-cropper.is-mobile-studio .avatar-studio-close { display: grid; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__workspace {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__stage {
    width: min(calc(100vw - 24px), 54dvh, 560px) !important;
    max-width: 100% !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__preview-panel {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    justify-items: start;
    align-items: center;
    gap: 4px 12px;
    padding: 11px 13px !important;
    text-align: left;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__preview-panel .eyebrow {
    grid-column: 1 / -1;
    margin: 0;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__live-preview {
    grid-row: 2 / 4;
    width: 76px !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__preview-panel strong { align-self: end; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__preview-panel small { align-self: start; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__controls { gap: 10px !important; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__readout {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .avatar-cropper.is-mobile-studio > p { font-size: .72rem; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__studio-actions {
    position: sticky;
    bottom: calc(-1 * max(16px, env(safe-area-inset-bottom)));
    z-index: 10;
    margin:
      0 calc(-1 * max(12px, env(safe-area-inset-right)))
      calc(-1 * max(16px, env(safe-area-inset-bottom)))
      calc(-1 * max(12px, env(safe-area-inset-left)));
    padding:
      12px max(12px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    box-shadow: 0 -14px 36px rgba(0,0,0,.14);
    backdrop-filter: blur(20px) saturate(150%);
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__studio-actions .button {
    min-width: 0;
    flex: 1 1 calc(50% - 5px);
  }
}

@media (max-width: 430px) {
  .header-actions .member-chip--profile {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
  }
  .header-actions .member-chip--profile .avatar--header {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    flex-basis: 38px !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__stage {
    width: min(calc(100vw - 20px), 48dvh, 480px) !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__tool-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__tool-row button {
    min-height: 44px;
    padding: 7px 5px;
    font-size: .68rem;
  }
  .avatar-cropper.is-mobile-studio .crop-nudge {
    grid-template-columns: repeat(4, minmax(44px, 1fr)) !important;
    gap: 5px !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-zoom-control { gap: 6px; }
  .avatar-cropper.is-mobile-studio .avatar-zoom-control > button {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 360px) {
  .header-actions .member-chip--profile {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    padding: 3px !important;
  }
  .header-actions .member-chip--profile .avatar--header {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    flex-basis: 34px !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__intro strong { font-size: .92rem; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__intro > div:first-child small { display: none; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__studio-actions { flex-direction: column; }
  .avatar-cropper.is-mobile-studio .avatar-cropper__studio-actions .button { width: 100%; flex-basis: auto; }
}

/* ========================================================================
   Lucifer's Lounge v3.4.5 · final mobile avatar crop authority
   This block intentionally comes last: it removes legacy inline-crop layout
   conflicts and makes the phone studio a true edge-to-edge modal.
   ======================================================================== */

.header-actions .member-chip--profile,
.header-actions .member-chip--profile .avatar--header {
  box-sizing: border-box !important;
}
.header-actions .member-chip--profile .avatar--header {
  contain: strict;
  clip-path: circle(50% at 50% 50%);
}
.header-actions .member-chip--profile .avatar--header .avatar-frame__image {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.avatar-cropper:not([hidden]) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: grid !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: none !important;
  place-items: center !important;
  margin: 0 !important;
  padding: clamp(12px, 2.2vw, 28px) !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(8, 4, 11, .82) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}
.avatar-cropper:not([hidden]) > .avatar-cropper__dialog {
  width: min(100%, 980px) !important;
  max-height: calc(100dvh - clamp(24px, 4.4vw, 56px)) !important;
}
.avatar-cropper__stage > canvas[data-avatar-canvas] {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}

@media (max-width: 900px) {
  .avatar-cropper.is-mobile-studio {
    display: block !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--surface-raised) !important;
    box-shadow: none !important;
  }
  .avatar-cropper.is-mobile-studio > .avatar-cropper__scrim {
    display: none !important;
  }
  .avatar-cropper.is-mobile-studio > .avatar-cropper__dialog {
    display: block !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--surface-raised) !important;
    box-shadow: none !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__intro {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__workspace {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__stage {
    width: min(calc(100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)), 52dvh, 540px) !important;
    max-width: 540px !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__preview-panel {
    grid-template-columns: 76px minmax(0, 1fr) !important;
    width: 100% !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__live-preview {
    width: 76px !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__studio-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 20 !important;
  }
}

@media (max-width: 430px) {
  .header-actions .member-chip--profile {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    padding: 3px !important;
  }
  .header-actions .member-chip--profile .avatar--header {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    flex: 0 0 36px !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__stage {
    width: min(calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)), 49dvh, 500px) !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__readout {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .avatar-cropper.is-mobile-studio .avatar-cropper__studio-actions .button {
    flex-basis: 100% !important;
  }
}

/* ========================================================================
   Lucifer's Lounge v3.4.7 · dark content contrast, centred member profile,
   and a clearly visible homepage video layer
   ======================================================================== */

/* Dark mode must never reuse the light paper surface behind light text. */
html[data-theme="dark"] {
  --dark-content-surface: #1b1120;
  --dark-content-surface-soft: #25162b;
  --dark-content-surface-raised: #2c1b33;
  --dark-content-border: rgba(239, 222, 246, .17);
  --dark-content-border-strong: rgba(239, 222, 246, .27);
  --dark-content-shadow: 0 24px 68px rgba(0, 0, 0, .38);
}

html[data-theme="dark"] :is(
  .event-card,
  .event-detail-card,
  .event-info-grid .table-card,
  .event-timeline__item,
  .home-event,
  .editorial-card,
  .social-post,
  .archive-event,
  .birthday-person,
  .birthday-card,
  .message-card
) {
  color: var(--text) !important;
  border-color: var(--dark-content-border) !important;
  background:
    linear-gradient(145deg, var(--dark-content-surface-raised), var(--dark-content-surface)) !important;
  box-shadow: var(--dark-content-shadow) !important;
}

html[data-theme="dark"] :is(
  .event-card,
  .event-detail-card,
  .event-info-grid .table-card,
  .event-timeline__item,
  .home-event,
  .editorial-card,
  .social-post,
  .archive-event,
  .birthday-person,
  .birthday-card,
  .message-card
) :is(h1, h2, h3, h4, strong, dd) {
  color: var(--text) !important;
}

html[data-theme="dark"] :is(
  .event-card,
  .event-detail-card,
  .event-info-grid .table-card,
  .event-timeline__item,
  .home-event,
  .editorial-card,
  .social-post,
  .archive-event,
  .birthday-person,
  .birthday-card,
  .message-card
) :is(p, small, time, dt, .card-meta, .editorial-card__meta, figcaption) {
  color: var(--text-soft) !important;
}

html[data-theme="dark"] :is(.event-facts, .detail-list > div) {
  border-color: var(--dark-content-border) !important;
}

html[data-theme="dark"] .event-facts > div {
  border-color: var(--dark-content-border) !important;
}

html[data-theme="dark"] .event-detail-card__main {
  background: transparent !important;
}

/* Default post styles follow the active theme. Explicit decorative colour
   combinations selected by staff remain intact. */
html[data-theme="dark"] .content-style.content-background-default,
html[data-theme="dark"] .content-style.content-background-soft {
  color: var(--text) !important;
}

html[data-theme="dark"] .content-style.content-background-soft {
  border-color: var(--dark-content-border) !important;
  background: var(--dark-content-surface-soft) !important;
}

html[data-theme="dark"] .content-style.content-background-default:is(
  .content-color-default,
  .content-color-dark
),
html[data-theme="dark"] .content-style.content-background-soft:is(
  .content-color-default,
  .content-color-dark
) {
  color: var(--text) !important;
}

html[data-theme="dark"] .content-style.content-background-default:is(
  .content-color-default,
  .content-color-dark
) :is(p, li, strong, em, a),
html[data-theme="dark"] .content-style.content-background-soft:is(
  .content-color-default,
  .content-color-dark
) :is(p, li, strong, em, a) {
  color: inherit !important;
}

/* Event details use their own genuinely dark hero. This fixes events,
   tournaments and birthday events without changing the approved light mode. */
html[data-theme="dark"] .event-hero {
  color: #fff8ff !important;
  border-bottom-color: var(--dark-content-border) !important;
  background:
    radial-gradient(circle at 82% 13%, rgba(178, 92, 204, .32), transparent 31rem),
    radial-gradient(circle at 11% 90%, rgba(201, 160, 77, .13), transparent 28rem),
    linear-gradient(145deg, #2a1432 0%, #190d1f 54%, #0c070f 100%) !important;
}

html[data-theme="dark"] .event-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(100deg, rgba(5, 2, 7, .18), transparent 52%),
    repeating-linear-gradient(125deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 8px);
}

html[data-theme="dark"] .event-hero__grid {
  position: relative;
  z-index: 1;
}

html[data-theme="dark"] .event-hero :is(h1, h2, h3) {
  color: #fff8ff !important;
  text-shadow: 0 3px 24px rgba(0, 0, 0, .42);
}

html[data-theme="dark"] .event-hero p:not(.eyebrow) {
  color: #d9cadd !important;
}

html[data-theme="dark"] .event-hero .eyebrow {
  color: #dda8ee !important;
}

html[data-theme="dark"] .event-hero__art {
  border-color: var(--dark-content-border-strong) !important;
  background: #09060b !important;
  box-shadow: 0 24px 65px rgba(0, 0, 0, .46) !important;
}

html[data-theme="dark"] .event-hero .button--ghost {
  color: #fff8ff !important;
  border-color: rgba(255, 255, 255, .28) !important;
  background: rgba(11, 5, 14, .56) !important;
}

html[data-theme="dark"] .event-hero .button--ghost:is(:hover, :focus-visible) {
  border-color: rgba(255, 255, 255, .48) !important;
  background: rgba(255, 255, 255, .12) !important;
}

/* A public member profile is a centred identity card, not an unformatted
   definition list. */
.member-full-profile {
  display: grid !important;
  width: 100%;
  justify-items: center !important;
  align-items: start !important;
  gap: clamp(20px, 4vw, 34px) !important;
  padding: clamp(24px, 5vw, 52px) !important;
  border: 1px solid var(--profile-border) !important;
  border-radius: clamp(25px, 4vw, 38px) !important;
  text-align: center !important;
}

.member-full-profile > .avatar,
.member-full-profile > .avatar-frame {
  margin-inline: auto !important;
}

.member-full-profile__copy {
  display: grid !important;
  width: 100%;
  min-width: 0;
  justify-items: center !important;
  gap: clamp(14px, 2.6vw, 22px);
  text-align: center !important;
}

.member-full-profile__copy > .badge-row {
  justify-content: center !important;
  margin-inline: auto;
}

.member-full-profile__copy > .prose,
.member-full-profile__copy > .achievement-note {
  width: min(100%, 720px);
  margin-inline: auto !important;
  text-align: center !important;
}

.profile-stat-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  width: 100%;
  gap: clamp(10px, 2vw, 16px);
  margin: 4px 0 0;
}

.profile-stat-grid > div {
  display: grid;
  min-width: 0;
  min-height: 128px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: clamp(16px, 2.5vw, 24px) 12px;
  border: 1px solid var(--profile-border);
  border-radius: 20px;
  background:
    linear-gradient(145deg, var(--profile-surface-strong), var(--profile-surface));
  box-shadow: inset 0 1px rgba(255, 255, 255, .04);
  text-align: center;
}

.profile-stat-grid dt {
  max-width: 18ch;
  color: var(--text-soft) !important;
  font-size: clamp(.68rem, 1.6vw, .78rem);
  font-weight: 850;
  letter-spacing: .075em;
  line-height: 1.35;
  text-transform: uppercase;
}

.profile-stat-grid dd {
  margin: 0 !important;
  color: var(--accent-strong) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 5vw, 2.55rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

/* Let the uploaded homepage video read as a video instead of disappearing
   beneath an almost-opaque veil. Staff opacity still applies independently. */
.cinematic-hero__video {
  opacity: var(--hero-video-opacity, 1);
  filter: saturate(1.08) contrast(1.05) brightness(.98) !important;
  transform: translateZ(0);
}

.cinematic-hero__veil {
  background:
    linear-gradient(90deg, rgba(13, 5, 17, .76) 0%, rgba(16, 7, 21, .54) 43%, rgba(16, 7, 21, .18) 75%, rgba(16, 7, 21, .27) 100%),
    linear-gradient(180deg, rgba(9, 4, 12, .08), rgba(9, 4, 12, .46)) !important;
}

.cinematic-hero__aurora {
  opacity: .64;
  mix-blend-mode: screen;
}

@media (max-width: 760px) {
  html[data-theme="dark"] .event-hero {
    padding-block: clamp(52px, 13vw, 78px);
  }

  html[data-theme="dark"] .event-hero h1 {
    font-size: clamp(2.55rem, 12.5vw, 4.5rem);
    line-height: .98;
  }

  .member-full-profile {
    padding: 22px 16px 24px !important;
    border-radius: 26px !important;
  }

  .member-full-profile__copy {
    gap: 15px;
  }

  .profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .profile-stat-grid > div {
    min-height: 112px;
    padding: 16px 9px;
    border-radius: 17px;
  }

  .cinematic-hero__video {
    filter: saturate(1.1) contrast(1.04) brightness(1.02) !important;
  }

  .cinematic-hero__veil {
    background:
      linear-gradient(180deg, rgba(11, 5, 15, .17) 0%, rgba(11, 5, 15, .31) 48%, rgba(11, 5, 15, .58) 100%),
      linear-gradient(90deg, rgba(12, 5, 16, .42), rgba(12, 5, 16, .19)) !important;
  }
}

@media (max-width: 360px) {
  .profile-stat-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ========================================================================
   Lucifer's Lounge v3.4.8 · destructive controls and defect remediation
   ======================================================================== */

.form-card-stack {
  display: grid;
  align-content: start;
  gap: clamp(14px, 2vw, 20px);
  min-width: 0;
}

.inbox-card {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.inbox-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.inbox-card__head > div {
  min-width: 0;
}

.inbox-card__head h3,
.inbox-details dd {
  overflow-wrap: anywhere;
}

.inbox-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}

.inbox-details > div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface-soft);
}

.inbox-details dt {
  color: var(--text-soft);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.inbox-details dd {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.inbox-delete-form,
.contest-danger-zone {
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--danger, #a43b50) 48%, var(--line));
  border-radius: 17px;
  background: color-mix(in srgb, var(--danger, #a43b50) 7%, var(--surface-raised));
}

.inbox-delete-form > p,
.contest-danger-zone > p {
  margin: 0;
}

.inbox-delete-form label {
  min-width: min(100%, 220px);
}

.design-file-warning.is-critical {
  border-color: color-mix(in srgb, var(--danger, #a43b50) 58%, var(--line));
  background: color-mix(in srgb, var(--danger, #a43b50) 11%, var(--surface-raised));
  color: var(--text);
  font-weight: 700;
}

.staff-mfa-warning {
  margin-bottom: clamp(18px, 3vw, 28px);
}

.staff-mfa-warning p {
  margin: 4px 0 0;
}

html[data-theme="dark"] :is(.inbox-delete-form, .contest-danger-zone) {
  background: color-mix(in srgb, var(--danger, #d26a7d) 11%, var(--surface-raised));
}

html[data-theme="dark"] .inbox-details {
  border-color: var(--line);
  background: var(--line);
}

html[data-theme="dark"] .inbox-details > div {
  background: color-mix(in srgb, var(--surface-soft) 92%, #000);
}

@media (max-width: 760px) {
  .inbox-card__head {
    align-items: flex-start;
  }

  .inbox-details {
    grid-template-columns: 1fr;
  }

  .inbox-delete-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .inbox-delete-form label,
  .inbox-delete-form button {
    width: 100%;
  }

  .contest-danger-zone {
    padding: 15px;
  }
}

/* ========================================================================
   Lucifer's Lounge v3.4.9 · dark identity badges and resilient hero figures
   ======================================================================== */

/* Staff-selected identity colours now remain recognisable in dark mode.
   The server derives accessible dark companions from every saved light colour,
   so custom Founder, staff-position and membership designs are not replaced by
   the generic dark-mode badge palette. */
html[data-theme="dark"] .badge--role-founder {
  --identity-dark-bg: var(--role-founder-dark-bg, #57472f);
  --identity-dark-text: var(--role-founder-dark-text, #d8d0c7);
  --identity-dark-border: var(--role-founder-dark-border, #f5e2ad);
}
html[data-theme="dark"] .badge--role-owner {
  --identity-dark-bg: var(--role-owner-dark-bg, #4e4558);
  --identity-dark-text: var(--role-owner-dark-text, #d2c8db);
  --identity-dark-border: var(--role-owner-dark-border, #f0e7f8);
}
html[data-theme="dark"] .badge--role-admin {
  --identity-dark-bg: var(--role-admin-dark-bg, #48515a);
  --identity-dark-text: var(--role-admin-dark-text, #c7d1db);
  --identity-dark-border: var(--role-admin-dark-border, #e4f1fb);
}
html[data-theme="dark"] .badge--role-moderator {
  --identity-dark-bg: var(--role-moderator-dark-bg, #49534d);
  --identity-dark-text: var(--role-moderator-dark-text, #c6d3ca);
  --identity-dark-border: var(--role-moderator-dark-border, #e6f5eb);
}
html[data-theme="dark"] .badge--membership-diamond {
  --identity-dark-bg: var(--tier-diamond-dark-bg, #4a5358);
  --identity-dark-text: var(--tier-diamond-dark-text, #c6d2d6);
  --identity-dark-border: var(--tier-diamond-dark-border, #e7f8fd);
}
html[data-theme="dark"] .badge--membership-gold {
  --identity-dark-bg: var(--tier-gold-dark-bg, #584d35);
  --identity-dark-text: var(--tier-gold-dark-text, #d8d1c2);
  --identity-dark-border: var(--tier-gold-dark-border, #fff6db);
}
html[data-theme="dark"] .badge--membership-silver {
  --identity-dark-bg: var(--tier-silver-dark-bg, #505055);
  --identity-dark-text: var(--tier-silver-dark-text, #d0d1d4);
  --identity-dark-border: var(--tier-silver-dark-border, #f3f5f7);
}
html[data-theme="dark"] .badge--membership-bronze {
  --identity-dark-bg: var(--tier-bronze-dark-bg, #55483f);
  --identity-dark-text: var(--tier-bronze-dark-text, #d4cbc5);
  --identity-dark-border: var(--tier-bronze-dark-border, #f7e8df);
}

html[data-theme="dark"] :is(
  .badge--role-founder,
  .badge--role-owner,
  .badge--role-admin,
  .badge--role-moderator,
  .badge--membership-diamond,
  .badge--membership-gold,
  .badge--membership-silver,
  .badge--membership-bronze
) {
  color: var(--identity-dark-text) !important;
  border: 1px solid var(--identity-dark-border) !important;
  border: 1px solid color-mix(in srgb, var(--identity-dark-border) 58%, transparent) !important;
  background: var(--identity-dark-bg) !important;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--identity-dark-border) 13%, transparent), transparent 58%),
    var(--identity-dark-bg) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .11),
    0 8px 20px rgba(0, 0, 0, .28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .11),
    0 8px 20px color-mix(in srgb, var(--identity-dark-bg) 44%, transparent) !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] :is(
  .badge--role-founder,
  .badge--role-owner,
  .badge--role-admin,
  .badge--role-moderator,
  .badge--membership-diamond,
  .badge--membership-gold,
  .badge--membership-silver,
  .badge--membership-bronze
)::before {
  filter: saturate(1.08) brightness(1.08);
}

/* The three homepage benchmarks stay aligned and fully readable from a
   320-pixel phone through large desktop screens. Large coin totals use a
   digit-aware class instead of being clipped or replaced by an ellipsis. */
.hero-stat-bar .hero-stat__label {
  display: flex !important;
  min-width: 0;
  min-height: 3.1em;
  margin: 0 !important;
  flex-direction: column;
  justify-content: flex-end;
  overflow-wrap: anywhere;
  line-height: 1.28;
}

.hero-stat__label small {
  display: block;
  margin-top: 2px;
  color: #f0d48d;
  font-size: .88em;
  font-weight: 850;
  letter-spacing: .045em;
  line-height: 1.2;
}

.hero-stat-bar .hero-stat__value {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  color: #fff;
  font-size: clamp(1.75rem, 3.7vw, 2.7rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.04;
  text-overflow: clip;
  white-space: nowrap;
}

.hero-stat-bar .hero-stat__value--long {
  font-size: clamp(1.48rem, 3.15vw, 2.3rem);
}

.hero-stat-bar .hero-stat__value--xlong {
  font-size: clamp(1.18rem, 2.55vw, 1.9rem);
  letter-spacing: -.045em;
}

.hero-stat-bar .hero-stat__value--xxlong {
  font-size: clamp(.98rem, 2.05vw, 1.55rem);
  letter-spacing: -.055em;
}

@media (max-width: 760px) {
  .hero-stat-bar {
    width: min(100%, 690px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .hero-stat-bar article {
    min-width: 0;
    min-height: 166px;
    padding: 12px 5px 14px;
  }

  .hero-stat-bar article > div {
    width: 100%;
    min-width: 0;
  }

  .hero-stat-bar .stat-art {
    width: 50px !important;
    height: 50px !important;
    border-radius: 15px;
    font-size: 1.45rem !important;
  }

  .hero-stat-bar .hero-stat__label {
    min-height: 5.35em;
    justify-content: center;
    padding-inline: 1px;
    font-size: clamp(.49rem, 1.72vw, .59rem);
    letter-spacing: .075em;
    line-height: 1.25;
  }

  .hero-stat__label small {
    font-size: .9em;
    letter-spacing: .02em;
  }

  .hero-stat-bar .hero-stat__value {
    font-size: clamp(1.25rem, 5.7vw, 1.7rem);
  }

  .hero-stat-bar .hero-stat__value--long {
    font-size: clamp(1.02rem, 4.7vw, 1.4rem);
  }

  .hero-stat-bar .hero-stat__value--xlong {
    font-size: clamp(.82rem, 3.75vw, 1.12rem);
  }

  .hero-stat-bar .hero-stat__value--xxlong {
    font-size: clamp(.68rem, 3.05vw, .92rem);
    letter-spacing: -.06em;
  }
}

@media (max-width: 380px) {
  .hero-stat-bar {
    width: 100%;
    gap: 4px;
  }

  .hero-stat-bar article {
    min-height: 158px;
    padding-inline: 3px;
    border-radius: 16px;
  }

  .hero-stat-bar .stat-art {
    width: 46px !important;
    height: 46px !important;
  }

  .hero-stat-bar .hero-stat__label {
    min-height: 5.65em;
    font-size: .46rem;
  }

  .hero-stat-bar .hero-stat__value--xxlong {
    font-size: .64rem;
  }
}

/* ========================================================================
   Lucifer's Lounge v3.4.10 · bubble-free Lounge Directory artwork
   ======================================================================== */

/* Directory artwork is already supplied as a finished circular medallion.
   The former accent-coloured rounded-square wrapper created the lavender
   background bubble visible behind each icon. Keep the wrapper only for
   sizing and alignment, but make it visually transparent in both themes. */
.section--directory .page-directory__item > .directory-art {
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.section--directory .directory-art img {
  display: block;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* ========================================================================
   Lucifer's Lounge v3.4.11 · resilient media, rule icons and larger metrics
   ======================================================================== */

/* Lounge Rules now use compact owner-supplied icons rather than post-image
   galleries. The artwork remains clear without turning each rule into a large
   picture card. */
.house-rule__icon {
  display: grid;
  width: clamp(92px, 10vw, 132px);
  aspect-ratio: 1;
  place-items: center;
  justify-self: end;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--luxury-gold) 30%, var(--line));
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent), 0 14px 32px color-mix(in srgb, var(--ink) 12%, transparent);
}
.house-rule__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.house-rule__icon--fallback {
  color: var(--luxury-gold);
  font-size: clamp(2rem, 4vw, 3rem);
}
html[data-theme="dark"] .house-rule__icon {
  border-color: rgba(240, 205, 121, .28);
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 16px 36px rgba(0, 0, 0, .32);
}

/* Captions are optional. A lightbox with no staff-written description has no
   filename/footer row at all. */
.media-lightbox__stage > p[hidden] { display: none !important; }
.media-lightbox__stage:has(> p[hidden]) { grid-template-rows: minmax(0, 1fr); }

/* Make the three benchmark icons noticeably larger while retaining all three
   cards on one phone row. */
.hero-stat-bar .stat-art {
  width: clamp(68px, 6.8vw, 84px) !important;
  height: clamp(68px, 6.8vw, 84px) !important;
  border-radius: 22px;
  font-size: clamp(1.75rem, 3.4vw, 2.35rem) !important;
}
.hero-stat-bar article {
  min-height: 138px;
  gap: clamp(13px, 1.7vw, 21px);
}

@media (max-width: 760px) {
  .house-rule { grid-template-columns: 54px minmax(0, 1fr) 78px; gap: 12px; }
  .house-rule__icon { width: 76px; border-radius: 21px; }
  .house-rule__icon img { padding: 5px; }
  .hero-stat-bar .stat-art {
    width: clamp(58px, 16vw, 66px) !important;
    height: clamp(58px, 16vw, 66px) !important;
    border-radius: 18px;
    font-size: 1.75rem !important;
  }
  .hero-stat-bar article { min-height: 178px; padding-top: 13px; }
}

@media (max-width: 480px) {
  .house-rule { grid-template-columns: 48px minmax(0, 1fr); }
  .house-rule__icon { grid-column: 2; width: min(88px, 34vw); justify-self: start; }
}

@media (max-width: 380px) {
  .hero-stat-bar .stat-art {
    width: 54px !important;
    height: 54px !important;
  }
  .hero-stat-bar article { min-height: 170px; }
}


/* Retry controls stay available without asking the member to refresh the
   entire page. They are real buttons for keyboard and touch accessibility. */
button.media-unavailable-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48em;
  max-width: 100%;
  margin: 9px auto 0;
  padding: .58rem .82rem;
  border: 1px solid color-mix(in srgb, var(--danger) 34%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, var(--danger) 8%);
  color: var(--danger);
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}
button.media-unavailable-note:hover,
button.media-unavailable-note:focus-visible {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent);
}
html[data-theme="dark"] button.media-unavailable-note {
  background: color-mix(in srgb, var(--surface-strong) 90%, var(--danger) 10%);
}

/* Final v3.4.11 authority: larger homepage benchmark artwork while all three
   cards remain on the same compact phone row. */
.hero-stat-bar .stat-art {
  width: clamp(82px, 8vw, 104px) !important;
  height: clamp(82px, 8vw, 104px) !important;
  border-radius: 26px;
  font-size: clamp(2rem, 4vw, 2.75rem) !important;
}
@media (max-width: 760px) {
  .hero-stat-bar .stat-art {
    width: clamp(64px, 18vw, 72px) !important;
    height: clamp(64px, 18vw, 72px) !important;
    border-radius: 20px;
    font-size: 1.95rem !important;
  }
}
@media (max-width: 380px) {
  .hero-stat-bar .stat-art {
    width: 60px !important;
    height: 60px !important;
    border-radius: 18px;
  }
}

/* ========================================================================
   Lucifer's Lounge v3.4.12 · organised mobile House Code and footer privacy
   ======================================================================== */

/* Rule artwork is already supplied as finished transparent icon art. Keep the
   wrapper only for layout; remove the rounded tile/bubble in both themes. */
.house-rule__icon,
html[data-theme="dark"] .house-rule__icon {
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.house-rule__icon img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0 !important;
  object-fit: contain;
  background: transparent !important;
  box-shadow: none !important;
}

/* The default rule text should read as one clean card rather than a card
   inside another card. Decorative backgrounds explicitly selected by staff
   remain available. */
.house-rule__body.content-background-default.content-border-subtle {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* Desktop/tablet House Code alignment. */
.house-rule {
  grid-template-columns: 64px minmax(0, 1fr) clamp(84px, 9vw, 116px);
  gap: clamp(18px, 2.5vw, 30px);
  align-items: center;
  padding: clamp(20px, 3vw, 30px);
}
.house-rule__copy { min-width: 0; }
.house-rule__copy h2 {
  margin: 0 0 9px;
  line-height: 1.12;
}
.house-rule__body { min-width: 0; }
.house-rule__body > :last-child { margin-bottom: 0; }
.house-rule__icon {
  width: clamp(84px, 9vw, 116px);
  justify-self: end;
}

/* Phone layout: compact number and icon rail on the left, with a readable
   title and rule copy on the right. This prevents the title, description and
   artwork from stacking as unrelated full-width blocks. */
@media (max-width: 760px) {
  .house-rules { gap: 14px; }
  .house-rule {
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-areas:
      "number title"
      "icon body";
    gap: 12px 14px;
    align-items: start;
    padding: 18px;
    border-radius: 22px;
  }
  .house-rule__number {
    grid-area: number;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.08rem;
  }
  .house-rule__copy { display: contents; }
  .house-rule__copy h2 {
    grid-area: title;
    align-self: center;
    margin: 0;
    font-size: clamp(1.28rem, 5.8vw, 1.72rem);
    line-height: 1.08;
    text-align: left;
    text-wrap: balance;
  }
  .house-rule__body {
    grid-area: body;
    align-self: start;
    min-width: 0;
    font-size: clamp(.94rem, 3.75vw, 1.06rem);
    line-height: 1.58;
    text-align: left;
  }
  .house-rule__body.content-size-large,
  .house-rule__body.content-size-xl {
    font-size: clamp(1rem, 4.1vw, 1.12rem);
    line-height: 1.55;
  }
  .house-rule__icon {
    grid-area: icon;
    grid-column: auto;
    width: 46px;
    align-self: start;
    justify-self: center;
  }
  .house-rule__icon--fallback {
    font-size: 2rem;
  }
}

@media (max-width: 380px) {
  .house-rule {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px 12px;
    padding: 16px;
  }
  .house-rule__number {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
  .house-rule__icon { width: 42px; }
  .house-rule__copy h2 { font-size: clamp(1.18rem, 6vw, 1.46rem); }
}

/* Security & Privacy is always available in the final footer row. */
.footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px 16px;
}
.footer-bottom__links a {
  color: inherit;
  font-weight: 760;
  text-decoration: none;
}
.footer-bottom__links a:hover,
.footer-bottom__links a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 520px) {
  .footer-bottom { align-items: flex-start; }
  .footer-bottom__links {
    justify-content: flex-start;
    gap: 7px 14px;
  }
}

/* ========================================================================
   Lucifer's Lounge v3.4.13 · complete dark-surface audit and larger rule art
   ======================================================================== */

/* Final dark-theme tokens. The earlier stylesheet contains several legacy
   light-paper declarations; these tokens and the authority rules below make
   every reusable surface use the same dark visual system without changing
   the approved light-mode presentation. */
html[data-theme="dark"] {
  --dark-audit-canvas: #0d0810;
  --dark-audit-surface: #1a101f;
  --dark-audit-surface-soft: #211428;
  --dark-audit-surface-raised: #2a1931;
  --dark-audit-line: rgba(246, 230, 251, .16);
  --dark-audit-line-strong: rgba(246, 230, 251, .27);
  --dark-audit-text: #fff7ff;
  --dark-audit-text-soft: #d4c3da;
  --dark-audit-text-muted: #b8a5c0;
  --dark-audit-shadow: 0 24px 68px rgba(0, 0, 0, .4);
}

/* Consistent card surfaces across public, member and staff pages. This list
   intentionally covers both current components and older reusable classes so
   a later page cannot fall back to a white card while the text is in dark
   mode. */
html[data-theme="dark"] :is(
  .timeline-card,
  .calendar-card,
  .calendar-agenda,
  .table-card,
  .form-card,
  .side-card,
  .profile-preview,
  .stat-card,
  .list-card,
  .action-card,
  .ticket-card,
  .review-card,
  .content-admin-card,
  .event-admin-card,
  .audit-row,
  .security-grid article,
  .auth-card,
  .owner-setup-card,
  .permission-card,
  .privacy-summary,
  .media-create-fieldset,
  .media-upload-panel,
  .inbox-card,
  .activity-review-card,
  .submission-card,
  .guideline-card,
  .contest-review-card,
  .design-upload-card,
  .design-asset,
  .game-admin-card,
  .flag-card,
  .staff-standing-card,
  .past-contest-grid article,
  .mvp-archive__item,
  .membership-card,
  .event-card,
  .event-detail-card,
  .editorial-card,
  .social-post,
  .archive-event,
  .birthday-person,
  .birthday-card,
  .message-card
) {
  color: var(--dark-audit-text) !important;
  border-color: var(--dark-audit-line) !important;
  background:
    linear-gradient(145deg, var(--dark-audit-surface-raised), var(--dark-audit-surface)) !important;
  box-shadow: var(--dark-audit-shadow) !important;
}

/* Compact controls and secondary panels use the same surface hierarchy. */
html[data-theme="dark"] :is(
  .menu-button,
  .member-chip,
  .icon-button,
  .chat-quick button,
  .segmented input:checked + span,
  .password-guidance span,
  .permission-card__header > strong,
  .secret-value,
  .capacity-strip > div,
  .member-admin-actions details[open] > div,
  .member-admin-actions details[open] > form,
  .leaderboard-mobile-card__identity > div
) {
  color: var(--dark-audit-text) !important;
  border-color: var(--dark-audit-line) !important;
  background: var(--dark-audit-surface-soft) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .27) !important;
}

/* Dark-mode notices remain recognisable without introducing bright paper
   rectangles into otherwise dark pages. */
html[data-theme="dark"] .notice--success {
  color: #a9e4c4 !important;
  border-color: rgba(114, 197, 157, .32) !important;
  background: #13291f !important;
}
html[data-theme="dark"] .notice--error,
html[data-theme="dark"] .sensitive-value {
  color: #ffb6c2 !important;
  border-color: rgba(238, 133, 151, .34) !important;
  background: #351820 !important;
}
html[data-theme="dark"] .notice--warning {
  color: #f3d78e !important;
  border-color: rgba(219, 183, 95, .36) !important;
  background: #30240f !important;
}

/* Lounge History is a dedicated contrast target because the legacy timeline
   card used an absolute white background. The marker, date, rail and story
   card now read as one intentional dark timeline. */
html[data-theme="dark"] .timeline::before {
  background: linear-gradient(var(--luxury-gold), color-mix(in srgb, var(--accent) 66%, transparent));
  opacity: .82;
}
html[data-theme="dark"] .timeline-date {
  color: var(--dark-audit-text-muted) !important;
}
html[data-theme="dark"] .timeline-marker {
  color: var(--luxury-gold-soft) !important;
  border-color: var(--dark-audit-canvas) !important;
  background:
    radial-gradient(circle at 35% 30%, rgba(219, 183, 95, .2), transparent 48%),
    var(--dark-audit-surface-raised) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .42) !important;
}
html[data-theme="dark"] .timeline-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
html[data-theme="dark"] .timeline-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 100% 0%, rgba(200, 140, 222, .12), transparent 24rem),
    linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 48%);
}
html[data-theme="dark"] .timeline-card > .eyebrow {
  color: #dda7ed !important;
}
html[data-theme="dark"] .timeline-card > h2 {
  color: var(--dark-audit-text) !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .28);
}
html[data-theme="dark"] .timeline-card > .read-more-button {
  color: #dfa8ee !important;
}

/* Staff-configurable text palettes receive true dark counterparts. This keeps
   posts, rules, history entries, birthday messages and event copy consistent
   while preserving the intended purple/gold/rose/blue/green identity. */
html[data-theme="dark"] .content-style.content-background-default {
  color: var(--dark-audit-text-soft) !important;
}
html[data-theme="dark"] .content-style.content-background-soft {
  color: var(--dark-audit-text-soft) !important;
  border-color: var(--dark-audit-line) !important;
  background: var(--dark-audit-surface-soft) !important;
}
html[data-theme="dark"] .content-style.content-background-plum {
  color: #fff4ff !important;
  background: linear-gradient(145deg, #572764, #27112e) !important;
}
html[data-theme="dark"] .content-style.content-background-gold {
  color: #f8df9d !important;
  background: linear-gradient(145deg, #493716, #241a0a) !important;
}
html[data-theme="dark"] .content-style.content-background-midnight {
  color: #f8effb !important;
  background: linear-gradient(145deg, #211228, #08050b) !important;
}
html[data-theme="dark"] .content-style.content-background-rose {
  color: #ffc9d6 !important;
  background: linear-gradient(145deg, #4a202d, #241018) !important;
}
html[data-theme="dark"] .content-style.content-background-blue {
  color: #c9e9fb !important;
  background: linear-gradient(145deg, #173b51, #0b202d) !important;
}
html[data-theme="dark"] .content-style.content-background-green {
  color: #bcebd1 !important;
  background: linear-gradient(145deg, #183f2e, #0b2419) !important;
}
html[data-theme="dark"] .content-style.content-background-paper {
  color: #eadfc9 !important;
  background: linear-gradient(145deg, #342d23, #1e1913) !important;
  box-shadow: inset 0 0 0 1px rgba(235, 213, 166, .15) !important;
}
html[data-theme="dark"] :is(
  .content-background-plum,
  .content-background-gold,
  .content-background-midnight,
  .content-background-rose,
  .content-background-blue,
  .content-background-green,
  .content-background-paper
) :is(p, li, strong, em, a) {
  color: inherit !important;
}
html[data-theme="dark"] :is(
  .content-background-default,
  .content-background-soft
).content-color-dark {
  color: var(--dark-audit-text-soft) !important;
}

/* Media wells should remain neutral black rather than a white legacy frame. */
html[data-theme="dark"] :is(.content-media, .content-media-grid--manage .content-media) {
  border-color: var(--dark-audit-line) !important;
  background: #09070b !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .34) !important;
}
html[data-theme="dark"] .media-manage-row {
  border-color: var(--dark-audit-line) !important;
  background: var(--dark-audit-surface-soft) !important;
}

/* Larger Lounge Rule artwork. The uploaded icon remains bubble-free, but it
   now has enough visual weight on desktop, tablets and phones. */
.house-rule {
  grid-template-columns: 64px minmax(0, 1fr) clamp(118px, 12vw, 156px);
}
.house-rule__icon {
  width: clamp(118px, 12vw, 156px);
  max-width: 100%;
}

@media (max-width: 760px) {
  .house-rule {
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-areas:
      "number title"
      "icon body";
    gap: 14px 15px;
  }
  .house-rule__number {
    justify-self: center;
  }
  .house-rule__icon {
    width: clamp(76px, 22vw, 88px);
    align-self: start;
    justify-self: center;
  }
  .house-rule__icon--fallback {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }
}

@media (max-width: 380px) {
  .house-rule {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }
  .house-rule__icon {
    width: clamp(66px, 21vw, 76px);
  }
}
