:root {
  color-scheme: dark;
  --bg: #090806;
  --surface: #17110c;
  --surface-strong: #24170d;
  --border: #4a2d15;
  --text: #fffaf0;
  --muted: #d5c3a9;
  --brand: #ffca0a;
  --brand-strong: #ff8a00;
  --accent-red: #ef1b24;
  --warning: #ffca0a;
  --success: #68e0a0;
  --content: 1080px;
  font-family: "CLB Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -8%, rgba(255, 202, 10, 0.2), transparent 31rem),
    radial-gradient(circle at 93% 2%, rgba(239, 27, 36, 0.17), transparent 29rem),
    radial-gradient(circle at 54% 115%, rgba(255, 138, 0, 0.1), transparent 35rem),
    var(--bg);
  line-height: 1.65;
}

a { color: var(--brand); }
a:hover { color: #fff1a8; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 45%), rgba(9, 7, 5, 0.56);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}

.nav {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  margin-right: 0.65rem;
  flex-shrink: 0;
  object-fit: contain;
}
.brand-picture { display: block; flex: 0 0 auto; }

.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; }
.nav-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  font-size: 1.55rem;
  cursor: pointer;
}
.nav-toggle:hover, .nav-toggle[aria-expanded="true"] { color: var(--brand); background: rgba(255, 138, 0, 0.1); }
.nav-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.nav-links a, .nav-group summary { color: var(--muted); text-decoration: none; font-weight: 650; }
.nav-links > a, .nav-group summary { display: flex; align-items: center; min-height: 40px; padding: 0.4rem 0.7rem; border-radius: 9px; }
.nav-links a[aria-current="page"], .nav-group.is-current summary { color: var(--brand); }
.nav-group { position: relative; }
.nav-group[hidden] { display: none; }
.nav-group summary { gap: 0.4rem; cursor: pointer; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary i { font-size: 0.75rem; transition: transform 150ms ease; }
.nav-group[open] summary { color: var(--brand); background: rgba(255, 138, 0, 0.08); }
.nav-group[open] summary i { transform: rotate(180deg); }
.nav-group summary:focus-visible, .nav-links > a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.nav-submenu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 205px;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(18, 13, 9, 0.76);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
}
.nav-submenu a { padding: 0.55rem 0.7rem; border-radius: 8px; white-space: nowrap; }
.nav-submenu a:hover, .nav-submenu a[aria-current="page"] { color: var(--brand); background: rgba(255, 138, 0, 0.09); }
.nav-group[open] .nav-submenu { animation: nav-submenu-in 180ms ease-out both; }

@keyframes nav-submenu-in {
  from { opacity: 0; transform: translateY(-7px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mode-banner {
  border-bottom: 1px solid rgba(255, 138, 0, 0.35);
  background: linear-gradient(90deg, rgba(239, 27, 36, 0.1), rgba(255, 202, 10, 0.12), rgba(255, 138, 0, 0.1));
  color: #ffe7a0;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

main {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: clamp(1.5rem, 5svh, 4.75rem) 0 clamp(2rem, 6svh, 6rem);
}

.hero { max-width: 820px; margin-bottom: 3.5rem; }
.eyebrow { color: var(--brand); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 800; }
h1 { margin: 0.6rem 0 1rem; font-size: clamp(2.4rem, 6vw, 5.2rem); line-height: 0.98; letter-spacing: -0.055em; }
h2 { margin: 3rem 0 0.8rem; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -0.025em; }
h3 { margin: 0 0 0.45rem; font-size: 1.05rem; }
p { color: var(--muted); }
.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 720px; }
.meta { color: #ac9679; font-size: 0.92rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.65rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 12px;
  gap: 0.55rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #090a0e;
  text-decoration: none;
  font-weight: 850;
}
.button:hover { color: #090806; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 138, 0, 0.2); }
.button.secondary { color: var(--text); background: linear-gradient(135deg, #22130d, #180d0d); border-color: rgba(239, 27, 36, 0.72); }
.button.secondary:hover { color: #fff4df; border-color: #ff4b32; box-shadow: 0 12px 30px rgba(239, 27, 36, 0.16); }
.button { transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.icon-terms { -webkit-mask-image: url("/assets/icon-terms.svg"); mask-image: url("/assets/icon-terms.svg"); }
.icon-privacy { -webkit-mask-image: url("/assets/icon-privacy.svg"); mask-image: url("/assets/icon-privacy.svg"); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.explore-grid { grid-template-columns: repeat(3, 1fr); }
.home-section + .home-section { margin-top: 3rem; }
.home-staff-link[hidden], .home-application-callout[hidden], .application-nav-link[hidden], [data-application-closing][hidden] { display: none !important; }
.home-staff-link { margin-top: 1rem; }
.home-application-callout { display: flex; align-items: center; gap: 1.5rem; padding: 1.8rem; border: 1px solid #77591c; border-radius: 20px; background: linear-gradient(120deg, rgba(255, 202, 10, .08), transparent), var(--surface); }
.home-application-icon { display: grid; place-items: center; width: 64px; height: 64px; flex-shrink: 0; border-radius: 18px; color: var(--brand); background: rgba(255, 202, 10, .08); font-size: 1.8rem; }
.home-application-copy { flex: 1; min-width: 0; }
.home-application-copy h2 { margin: .35rem 0 .55rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.home-application-copy p { margin: 0; max-width: 620px; font-size: .92rem; }
.home-application-copy small { display: block; color: var(--muted); margin-top: .7rem; }
.home-application-callout > .studio-button { flex-shrink: 0; }
@media (max-width: 760px) {
  .home-application-callout { flex-wrap: wrap; gap: 1rem; padding: 1.3rem; }
  .home-application-icon { width: 46px; height: 46px; font-size: 1.4rem; border-radius: 12px; }
  .home-application-copy { flex-basis: calc(100% - 62px); }
  .home-application-copy .eyebrow { font-size: .7rem; }
  .home-application-callout > .studio-button { width: 100%; justify-content: center; }
}
.home-about-section { margin-top: 3.75rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.home-about-grid { grid-template-columns: 1fr; }
.home-about-grid .card { min-height: 180px; }
.home-page {
  --home-logo-size: clamp(80px, 18vw, 240px);
  --home-card-fill: linear-gradient(145deg, #2b1c10, #17100b);
  --home-card-hover: linear-gradient(145deg, #362211, #21150d);
  background: radial-gradient(ellipse at 100% 8%, rgba(255, 115, 0, 0.15), transparent clamp(30rem, 65vw, 64rem)), radial-gradient(ellipse at 0 0, rgba(255, 202, 10, 0.08), transparent clamp(25rem, 55vw, 55rem)), var(--bg);
}
.home-page main { width: min(calc(100% - 2rem), var(--content)); padding: min(clamp(2rem, 5.9vw, 4.75rem), 5svh) 0 min(clamp(3rem, 6.25vw, 6rem), 6svh); }
.home-page .home-hero { display: grid; grid-template-columns: minmax(0, 1fr) var(--home-logo-size); column-gap: clamp(0.75rem, 2.5vw, 2rem); row-gap: 0; margin-bottom: clamp(2rem, 4.4vw, 3.5rem); }
.home-page .home-hero .about-hero-copy { display: contents; }
.home-page .home-hero .eyebrow { grid-column: 1 / -1; grid-row: 1; }
.home-page .home-hero h1 { grid-column: 1; grid-row: 2; max-width: 720px; padding: 0; margin: 0.7rem 0 0.85rem; font-size: clamp(1.75rem, 6vw, 5.2rem); line-height: 1.06; letter-spacing: -0.045em; text-wrap: balance; }
.home-page .home-hero .lede { grid-column: 1 / -1; grid-row: 3; margin: 0; }
.home-page .home-hero .home-staff-link { grid-column: 1 / -1; grid-row: 4; justify-self: start; }
.home-page .home-hero .about-hero-logo { display: block; position: static; grid-column: 2; grid-row: 2; align-self: center; width: 100%; height: auto; opacity: 0.58; filter: none; }
.home-page .home-section .card { border-color: rgba(255, 153, 46, 0.24); background: var(--home-card-fill); }
.home-page .home-section .card-link:hover .card { border-color: rgba(255, 153, 46, 0.48); background: var(--home-card-hover); }
@media (max-width: 800px) {
  .home-page .home-hero .eyebrow { font-size: 0.65rem; letter-spacing: 0.16em; }
  .home-page .home-hero .lede { max-width: 430px; color: #b8b0a2; font-size: 0.875rem; line-height: 1.65; }
  .home-page .home-section + .home-section { margin-top: 1.75rem; }
  .home-page .home-section .section-title { margin: 0 0 0.7rem; color: #b8b0a2; font-size: 0.75rem; font-weight: 650; text-transform: none; letter-spacing: 0.025em; }
  .home-page .home-section .grid { gap: 0.6rem; }
  .home-page .home-section .card-link { min-width: 0; border-radius: 14px; }
  .home-page .home-section .card-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
  .home-page .home-section .card { display: flex; align-items: center; min-height: 64px; height: 100%; padding: 0.8rem 0.9rem; border: 1px solid rgba(255, 153, 46, 0.24); border-radius: 14px; background: var(--home-card-fill); box-shadow: none; }
  .home-page .home-section .card::after { display: none; }
  .home-page .home-section .card-heading { flex: 1; min-width: 0; gap: 0.75rem; flex-wrap: nowrap; }
  .home-page .home-section .card-heading h2 { min-width: 0; margin: 0; font-size: 0.9rem; font-weight: 650; line-height: 1.3; letter-spacing: -0.015em; }
  .home-page .home-section .card-icon { width: clamp(34px, 7vw, 38px); height: clamp(34px, 7vw, 38px); flex: 0 0 clamp(34px, 7vw, 38px); border-radius: 10px; color: #ffcf74; background: linear-gradient(145deg, rgba(255, 163, 32, 0.2), rgba(255, 115, 0, 0.1)); box-shadow: none; font-size: clamp(1.05rem, 3.5vw, 1.2rem); line-height: 1; }
  .home-page .home-section .card-icon .bi { display: grid; place-items: center; width: 1em; height: 1em; line-height: 1; }
  .home-page .home-section .card-icon .bi::before { display: block; line-height: 1; vertical-align: 0; }
  .home-page .home-section .card p, .home-page .home-section .card-action { display: none; }
  .home-page .home-section .card-link:hover .card { border-color: rgba(255, 153, 46, 0.48); background: var(--home-card-hover); transform: none; box-shadow: none; }
  .home-page .home-section .card-link:active .card { background: #302011; }
  .home-page .home-section .explore-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-page .home-section .explore-grid .card { justify-content: center; min-height: 104px; padding: 1rem 0.25rem; border-color: rgba(255, 153, 46, 0.24); background: var(--home-card-fill); }
  .home-page .home-section .explore-grid .card-heading { flex-direction: column; gap: 0.65rem; text-align: center; }
  .home-page .home-section .explore-grid .card-heading h2 { font-size: clamp(0.72rem, 2.8vw, 0.875rem); }
  .home-page .home-section .explore-grid .card-icon { width: clamp(36px, 9vw, 44px); height: clamp(36px, 9vw, 44px); flex-basis: clamp(36px, 9vw, 44px); color: var(--brand); background: transparent; font-size: clamp(1.5rem, 6vw, 1.85rem); }
  .home-page .home-section .explore-grid .bi-link-45deg { font-size: 1.25em; }
  .home-page .home-section .explore-grid .bi-trophy-fill { font-size: 0.92em; }
  .home-page .home-section .community-grid { grid-template-columns: 1fr; gap: 0; overflow: hidden; border: 1px solid rgba(255, 153, 46, 0.24); border-radius: 14px; background: var(--home-card-fill); }
  .home-page .home-section .community-grid .card-link { border-radius: 0; }
  .home-page .home-section .community-grid .card-link:focus-visible { outline-offset: -3px; }
  .home-page .home-section .community-grid .card { border: 0; border-radius: 0; background: transparent; }
  .home-page .home-section .community-grid .card-link + .card-link { border-top: 1px solid rgba(255, 153, 46, 0.12); }
  .home-page .home-section .community-grid .card::before, .home-page .home-about-grid .card::before { content: ""; order: 1; width: 6px; height: 6px; margin: 0 0.25rem 0 1rem; border-top: 1.5px solid #bb8a58; border-right: 1.5px solid #bb8a58; transform: rotate(45deg); }
  .home-page .home-section .policies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-page .home-section .policies-grid .card { min-height: 60px; padding: 0.65rem 0.75rem; }
  .home-page .home-section .policies-grid .card-heading { gap: 0.5rem; }
  .home-page .home-about-section { padding-top: 0; border-top: 0; }
}
@media (max-width: 500px) {
  .home-page .home-hero .lede { padding-right: 1rem; }
}
.section-title { margin: 0 0 1rem; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand); }
.card, .policy-section, .callout {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(37, 23, 12, 0.97), rgba(17, 13, 10, 0.98));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.card { position: relative; overflow: hidden; min-height: 220px; padding: 1.55rem; }
.card::after { content: ""; position: absolute; right: -3rem; bottom: -4rem; width: 10rem; height: 10rem; border-radius: 50%; background: rgba(255, 138, 0, 0.08); filter: blur(2px); }
.card-heading { display: flex; align-items: center; gap: 0.9rem; }
.card h2 { margin: 0; }
.card-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; color: #120c05; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 8px 24px rgba(255, 138, 0, 0.2); font-size: 1.3rem; }
.card-icon.privacy { color: #120c05; background: linear-gradient(135deg, #ffd52a, #ff8a00); box-shadow: 0 8px 24px rgba(255, 138, 0, 0.2); }
.card-icon.rules { background: linear-gradient(135deg, #ffca0a, #ff7b00); }
.card-icon.support { color: #120c05; background: linear-gradient(135deg, #ffd52a, #ff8a00); box-shadow: 0 8px 24px rgba(255, 138, 0, 0.2); }
.card-icon.team { background: linear-gradient(135deg, #ffd52a, #ff8a00); }
.card p { margin-bottom: 0; }
.card-action { display: inline-flex; gap: 0.45rem; align-items: center; margin-top: 1.35rem; color: var(--brand); font-weight: 800; }
.card-link { color: var(--text); text-decoration: none; }
.card-link:hover .card { border-color: var(--brand-strong); transform: translateY(-4px); box-shadow: 0 24px 70px rgba(255, 95, 0, 0.14); }
.card { transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }

.policy { max-width: 850px; }
.policy-section {
  padding: 0;
  margin: 0.85rem 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.policy-section summary {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 72px;
  padding: 0.9rem 1.15rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-size: 1.08rem;
  font-weight: 820;
}
.policy-section summary::-webkit-details-marker { display: none; }
.policy-section summary::after {
  content: "+";
  display: inline-block;
  margin-left: auto;
  color: var(--brand);
  background: transparent;
  border: 0;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 160ms ease, color 160ms ease;
}
.policy-section[open] summary::after { transform: rotate(45deg); color: var(--accent-red); }
.policy-section summary:hover { background: transparent; color: #fff1bd; }
.policy-summary-icon { display: grid; place-items: center; width: clamp(34px, 7vw, 38px); height: clamp(34px, 7vw, 38px); flex: 0 0 clamp(34px, 7vw, 38px); border-radius: 10px; color: #ffcf74; background: linear-gradient(145deg, rgba(255, 163, 32, 0.2), rgba(255, 115, 0, 0.1)); box-shadow: none; font-size: clamp(1.05rem, 3.5vw, 1.2rem); line-height: 1; }
.policy-summary-icon .bi { display: grid; place-items: center; width: 1em; height: 1em; line-height: 1; }
.policy-summary-icon .bi::before { display: block; line-height: 1; vertical-align: 0; }
.policy-content { padding: 0.25rem 1.5rem 1.35rem 4.45rem; border: 0; }
.policy-content p:first-child, .policy-content ul:first-child { margin-top: 1rem; }
.policy-section li { color: var(--muted); margin: 0.55rem 0; }
.policy-section strong { color: var(--text); }

.callout { padding: 1rem 1.2rem; border-color: rgba(255, 138, 0, 0.4); }
.callout.warning { border-color: rgba(255, 209, 102, 0.45); }
.callout p { margin: 0.25rem 0; }

code { padding: 0.15rem 0.35rem; border-radius: 6px; background: #26170d; color: #ffe1a0; }

.site-footer { margin-top: auto; border-top: 1px solid var(--border); color: var(--muted); }
.footer-inner { width: min(calc(100% - 2rem), var(--content)); margin: 0 auto; padding: 1rem 0 1.2rem; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.45rem 2rem; }
.footer-contact { font-size: 0.82rem; color: #ac9679; }
.footer-team { color: #ac9679; font-size: 0.86rem; }
.footer-team a, .footer-team-link { color: inherit; font-weight: inherit; text-decoration: none; }
.footer-team a:hover, .footer-team-link:hover { color: var(--brand); }
.footer-links { grid-column: 3; grid-row: 1; display: flex; align-items: center; justify-self: end; gap: 0.8rem; }
.footer-links a { color: var(--muted); font-size: 0.76rem; font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--brand); }
.footer-links a[aria-current="page"] { color: var(--brand); }
.footer-links.footer-links-full { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: center; flex-wrap: wrap; margin-top: 0.6rem; }
.footer-updated { grid-column: 3; justify-self: end; color: #8d7b65; font-size: 0.74rem; }
.footer-fan-policy { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: 640px; text-align: center; color: #ac9679; font-size: 0.65rem; line-height: 1.45; }
.footer-fan-policy a { color: inherit; text-underline-offset: 0.18em; }
.footer-fan-policy a:hover { color: var(--brand); }
@media (max-width: 980px) {
  .site-footer .footer-fan-policy { justify-self: start; text-align: left; font-size: 0.55rem; }
}
@media (max-width: 425px) {
  .footer-fan-policy .footer-policy-break { display: none; }
}

.rules-page { max-width: 900px; }
.rules-hero { margin-bottom: 2.5rem; }
.rules-panel {
  margin-top: 1.25rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 138, 0, 0.28);
  border-left: 4px solid var(--brand-strong);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(35, 21, 11, 0.95), rgba(14, 11, 8, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}
.rules-panel-appeal { border-color: rgba(239, 27, 36, 0.3); border-left-color: var(--accent-red); }
.rules-panel-heading { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.rules-panel-heading h2 { margin: 0; }
.rules-kicker { display: block; color: var(--brand); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.discord-emoji { width: 1.25em; height: 1.25em; vertical-align: -0.24em; object-fit: contain; }
.discord-emoji-large { width: 52px; height: 52px; flex: 0 0 52px; }
.rules-intro { color: var(--muted); font-size: 1.03rem; }
.community-rules-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; padding: 0; list-style: none; }
.community-rules-list li { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.75rem 0.8rem; border-radius: 12px; background: rgba(255, 255, 255, 0.035); }
.community-rules-list i { margin-top: 0.22rem; color: var(--brand); }
.rules-warning, .staff-note { display: flex; align-items: center; justify-content: center; gap: 0.65rem; margin: 1.35rem 0; padding: 0.9rem 1rem; border-left: 3px solid var(--accent-red); border-radius: 0 12px 12px 0; background: rgba(239, 27, 36, 0.08); text-align: center; }
.rules-warning p { margin: 0; }
.staff-note { margin-bottom: 0; }
.rules-subsection { margin-top: 1.75rem; }
.rules-subsection h3, .appeal-important h3 { margin-bottom: 0.85rem; }
.strike-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.strike-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.72rem 0.85rem; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.strike-list strong { color: var(--brand); }
.strike-final { border: 1px solid rgba(239, 27, 36, 0.38); }
.strike-final strong, .strike-final span { color: #ff796f; font-weight: 800; }
.rules-thanks { display: flex; align-items: center; justify-content: center; gap: 0.35rem; margin: 1.5rem 0 0; text-align: center; color: var(--muted); }
.appeal-thresholds { display: grid; gap: 0.55rem; margin: 1.25rem 0; }
.appeal-thresholds p { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.threshold-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; }
.threshold-dot.green { background: #39d98a; }
.threshold-dot.yellow { background: #ffca0a; }
.threshold-dot.red { background: #ef1b24; }
.appeal-steps, .appeal-important ul { padding-left: 1.25rem; }
.appeal-steps li, .appeal-important li { margin: 0.55rem 0; }
.appeal-important { margin-top: 1.5rem; padding: 1rem 1.1rem; border-radius: 14px; background: rgba(239, 27, 36, 0.08); }
.appeal-important h3 { display: flex; align-items: center; gap: 0.55rem; }

.team-page { max-width: 980px; }
.team-hero { margin-bottom: 2.5rem; }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.team-card {
  --role-color: var(--brand);
  padding: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--role-color) 42%, transparent);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(34, 22, 13, 0.94), rgba(15, 12, 9, 0.98));
}
.team-card header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.team-card h2 { margin: 0; font-size: 1.25rem; }
.team-card header div > span { color: var(--muted); font-size: 0.75rem; }
.team-role-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; }
.team-role-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.team-card ul { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.team-card li { padding: 0; color: var(--text); }
.team-member { display: flex; align-items: center; gap: 0.75rem; min-width: 0; padding: 0.6rem 0.7rem; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.team-member-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; overflow: hidden; border-radius: 50%; color: #120b03; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); }
.team-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-member-identity { display: flex; flex-direction: column; min-width: 0; }
.team-member-identity strong, .team-member-identity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-member-identity span { color: var(--muted); font-size: 0.76rem; font-weight: 500; }
.team-status { display: flex; align-items: center; justify-content: center; gap: 0.65rem; min-height: clamp(64px, 16svh, 160px); color: var(--muted); }
.team-status[hidden] { display: none; }
.team-status.is-error { color: #ff9c7d; }
.team-owners { --role-color: #ef1b24; }
.team-coowners { --role-color: #ff5738; }
.team-admins { --role-color: #ff7b22; }
.team-headmods { --role-color: #ffb000; }
.team-mods { --role-color: #ffe76a; }
.team-clbteam { --role-color: #ff0000; }
.team-language { --role-color: #a83bda; }
.team-trial { --role-color: #79d51c; }
.team-roster-date { margin: 1.25rem 0 0; color: var(--muted); font-size: 0.78rem; text-align: right; }

.support-page { max-width: 900px; }
.support-hero { margin-bottom: 2.5rem; }
.support-panel {
  margin-top: 1rem;
  padding: clamp(1.15rem, 3vw, 1.8rem);
  border: 1px solid rgba(255, 138, 0, 0.3);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(35, 21, 11, 0.95), rgba(14, 11, 8, 0.98));
}
.support-heading { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.support-heading h2 { margin: 0; }
.support-contact-grid { display: grid; gap: 0.75rem; }
.support-contact-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}
.support-contact-card:hover { border-color: var(--brand-strong); color: var(--text); background: rgba(255, 138, 0, 0.08); transform: translateY(-2px); }
.support-contact-card > i:first-child { color: var(--brand); font-size: 1.4rem; text-align: center; }
.support-contact-card > i:last-child { color: var(--muted); }
.support-contact-card span { display: flex; flex-direction: column; min-width: 0; }
.support-contact-card strong { font-size: 1rem; }
.support-contact-card small { color: var(--muted); line-height: 1.45; }
.support-guidelines ul { margin: 0; padding-left: 1.3rem; }
.support-guidelines li { margin: 0.55rem 0; color: var(--muted); }
.support-warning { display: flex; align-items: center; justify-content: center; gap: 0.65rem; margin: 1.25rem 0 0; padding: 0.85rem 1rem; border-left: 3px solid var(--accent-red); border-radius: 0 12px 12px 0; background: rgba(239, 27, 36, 0.08); text-align: center; }
.support-warning i { color: var(--accent-red); }

.about-page { max-width: 980px; }
.about-hero { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) clamp(160px, 19vw, 220px); align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.about-hero-copy { min-width: 0; }
.about-hero-copy h1 { max-width: 720px; }
.about-hero-logo { display: block; width: 100%; height: auto; opacity: 0.22; filter: drop-shadow(0 18px 38px rgba(255, 145, 0, 0.12)); pointer-events: none; user-select: none; }
.about-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.about-grid .card { min-height: 250px; }
.community-card .card-heading { gap: 0.75rem; }
.community-card .card-heading h2 { min-width: 0; font-size: clamp(1.5rem, 1.9vw, 2rem); line-height: 1.1; letter-spacing: -0.02em; white-space: normal; overflow-wrap: anywhere; }
.about-note { margin-top: 1.5rem; text-align: center; }

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: max(1.25rem, var(--footer-clearance, 0px));
  z-index: 20;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #120b03;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 12px 34px rgba(255, 138, 0, 0.28);
  font-size: 1.25rem;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { color: #120b03; background: linear-gradient(135deg, #ffc400, #ff6a00); }
.back-to-top:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.profile-page { flex: 1; display: grid; place-items: center; align-content: center; gap: 1.5rem; }
.coming-soon { text-align: center; }
.profile-page.is-loading > :not(.profile-loading) { display: none; }
.profile-loading { display: flex; align-items: center; justify-content: center; gap: 0.8rem; color: var(--muted); }
.profile-loading[hidden] { display: none; }
.profile-loading-spinner { width: 2rem; height: 2rem; border: 3px solid #ffffff20; border-top-color: var(--brand); border-radius: 50%; animation: data-spin 0.8s linear infinite; }
body:has(.profile-page.is-loading) .data-loading { display: none; }
@media (prefers-reduced-motion: reduce) { .profile-loading-spinner { animation: none; } }
.coming-soon .studio-actions { justify-content: center; }
#profile-actions:has(#discord-login) { margin-top: 1.5rem; }
#profile-auth:has(#discord-login) #profile-message { margin-bottom: 0; }
.coming-soon-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 1.35rem;
  border-radius: 50%;
  color: #100a03;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 20px 55px rgba(255, 138, 0, 0.25);
  font-size: 2.25rem;
}
.coming-soon h1 { margin-bottom: 0; }

.profile-dashboard { width: min(1040px, 100%); display: grid; gap: 1rem; }
.profile-dashboard[hidden] { display: none; }
@font-face { font-family: "CLB Rank"; src: url("/assets/fonts/LilitaOne-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.profile-stats[hidden], .profile-level-progress[hidden] { display: none; }
.profile-stats article, .profile-level-progress, .profile-rank-editor { border: 1px solid rgba(255, 184, 49, 0.16); border-radius: 14px; background: rgba(24, 18, 11, 0.82); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2); }
.profile-stats article { display: grid; gap: 0.25rem; padding: 1rem; text-align: center; }
.profile-stats span, .profile-level-progress span, .profile-background-upload span { color: var(--muted); }
.profile-stats strong { color: var(--text); font-size: 1.6rem; }
.profile-level-progress { padding: 1rem; }
.profile-level-progress > div:first-child { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.65rem; }
.profile-progress-track, .profile-preview-track { overflow: hidden; border-radius: 999px; background: #444; }
.profile-progress-track { height: 12px; }
.profile-progress-track span, .profile-preview-track span { display: block; width: 0; height: 100%; background: var(--brand); transition: width 180ms ease; }
.profile-rank-editor { display: grid; gap: 1rem; padding: 1.2rem; }
.profile-customization { grid-column: 1 / -1; }
.profile-customization[hidden] { display: none; }
.profile-card-panel .profile-rank-layout { grid-template-columns: minmax(0, 1fr); }
.profile-card-panel.is-placeholder .profile-preview-column { width: min(100%, 600px); justify-self: center; }
.profile-dashboard .profile-customization .profile-color-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.profile-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.profile-section-heading h2 { margin: 0.2rem 0 0; }
#rank-save-status { min-height: 1.25rem; color: var(--muted); font-size: 0.88rem; font-weight: 700; }
#rank-save-status.is-dirty { color: #ffca4f; }
#rank-save-status.is-success { color: #73d69c; }
#rank-save-status.is-error { color: #ff9699; }
.profile-rank-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr); gap: 1rem; }
.profile-preview-column { display: grid; align-content: start; gap: 0.45rem; }
.profile-preview-open { position: relative; min-width: 0; }
.profile-rank-enlarge { position: absolute; inset: 0; z-index: 2; width: 100%; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: zoom-in; }
.profile-rank-enlarge:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.profile-preview-hint { color: var(--muted); font-size: 0.7rem; line-height: 1.4; }
.profile-rank-dialog { width: calc(100% - 1rem); max-width: none; max-height: calc(100dvh - 1rem); padding: clamp(0.65rem, 2vw, 1.2rem); border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: #17110c; }
.profile-rank-dialog::backdrop { background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px); }
.profile-rank-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 0.65rem; }
.profile-rank-dialog-heading h2 { margin: 0; font-size: 1.1rem; }
.profile-rank-dialog-scroll { overflow: hidden; }
.profile-rank-dialog-scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.profile-rank-dialog-preview { width: min(100%, calc((100dvh - 7.5rem) * 4)); min-width: 0; margin-inline: auto; container-type: inline-size; }
body:has(.profile-rank-dialog[open]) { overflow: hidden; }
.profile-preview-feedback { display: flex; min-height: 1.25rem; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.35rem 1rem; }
.profile-rank-preview { position: relative; aspect-ratio: 4 / 1; display: grid; grid-template-columns: 17% minmax(0, 1fr) 24%; align-items: center; gap: 2%; overflow: hidden; padding: 2.5% 3%; border-radius: 12px; background: #2f3136 center / cover no-repeat; color: #fff; font-family: "CLB Rank", Impact, sans-serif; }
.profile-rank-preview::after { position: absolute; inset: 0; z-index: 0; content: ""; background: rgba(0, 0, 0, 0); pointer-events: none; }
.profile-rank-preview > * { position: relative; z-index: 1; }
.profile-preview-avatar { width: 100%; aspect-ratio: 1; overflow: hidden; border: clamp(3px, 0.45vw, 7px) solid #fff; border-radius: 50%; background: rgba(0, 0, 0, 0.22); }
.profile-preview-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-preview-copy { align-self: end; display: grid; gap: clamp(3px, 0.65vw, 10px); min-width: 0; padding-bottom: 1%; }
.profile-preview-copy > strong { overflow: hidden; font-size: clamp(1rem, 2.2vw, 2rem); line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.profile-preview-copy > span { font-size: clamp(0.62rem, 1.15vw, 1rem); line-height: 1; }
.profile-preview-track { width: 100%; height: clamp(8px, 1.2vw, 18px); }
.profile-preview-rank { align-self: start; display: grid; justify-items: end; gap: 0; white-space: nowrap; text-align: right; }
.profile-preview-rank strong { font-size: clamp(1rem, 2.2vw, 2rem); line-height: 1; }
.profile-preview-rank span { font-size: clamp(0.75rem, 1.55vw, 1.4rem); line-height: 1.15; }
.profile-color-grid { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 0.45rem 0.65rem; }
.profile-color-grid label, .profile-background-upload label { display: grid; gap: 0.35rem; color: var(--muted); font-weight: 700; }
.profile-color-grid label { gap: 0.2rem; font-size: 0.86rem; }
.profile-color-grid input[type="color"] { width: 100%; height: 36px; min-height: 36px; padding: 2px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; background: #15110d; cursor: pointer; }
.profile-background-upload { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; }
.profile-background-upload small { font-weight: 400; }
.profile-background-upload input { color: var(--muted); }
.profile-background-upload input[type="file"] { max-width: 100%; font: inherit; font-size: 0.86rem; }
.profile-background-upload input[type="file"]::file-selector-button { margin-right: 0.65rem; padding: 0.5rem 0.75rem; border: 1px solid rgba(255, 184, 49, 0.35); border-radius: 8px; color: #0b0906; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); font: inherit; font-weight: 800; cursor: pointer; }
.profile-background-upload input[type="file"]::file-selector-button:hover { filter: brightness(1.06); }
.profile-background-upload input[type="file"]:disabled { color: #756d63; cursor: not-allowed; opacity: 0.72; }
.profile-background-upload input[type="file"]:disabled::file-selector-button { border-color: rgba(255, 255, 255, 0.12); color: #a49d93; background: #35312d; cursor: not-allowed; filter: none; }
#background-requirement.is-locked { color: #ff6268; font-weight: 800; }
.profile-editor-actions { justify-content: center; }
.profile-rank-editor.is-logged-out .profile-rank-layout { grid-template-columns: minmax(0, 820px); justify-content: center; }
.profile-rank-editor.is-logged-out .profile-color-grid,
.profile-rank-editor.is-logged-out .profile-background-upload,
.profile-rank-editor.is-logged-out .profile-editor-actions { display: none; }

@media (max-width: 720px) {
  .profile-stats { grid-template-columns: 1fr; }
  .profile-rank-layout { grid-template-columns: 1fr; }
  .profile-rank-preview { grid-template-columns: 17% minmax(0, 1fr) 25%; padding: 2.5% 3%; }
  .profile-color-grid { grid-template-columns: 1fr; }
}
.mode-banner[hidden] { display: none; }
#nearby-ranks { min-width: 0; padding: 0.85rem 1rem; }
#nearby-ranks h2 { margin: 0 0 0.4rem; font-size: 1.05rem; line-height: 1.3; }
#nearby-ranks p { margin: 0.3rem 0 0.5rem; font-size: 0.8rem; }
.nearby-player-scroll { min-width: 0; overflow-x: auto; padding: 2px; margin: -2px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.nearby-player-list { display: grid; min-width: fit-content; grid-template-columns: calc(24px + 0.45rem) max-content minmax(3rem, 1fr) max-content max-content max-content; gap: 0.25rem 0.3rem; }
.nearby-player-heading, .nearby-player { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; padding: 0.25rem 0.45rem; }
.nearby-player-heading { color: var(--muted); font-size: 0.65rem; white-space: nowrap; }
.nearby-player-heading > :nth-child(n+4) { text-align: right; }
.nearby-player { border-radius: 6px; color: var(--text); font-size: 0.7rem; line-height: 1.35; text-decoration: none; }
.nearby-avatar { position: relative; display: grid; place-items: center; grid-column: 1; width: 24px; height: 24px; overflow: hidden; border-radius: 50%; background: #343434; font-size: 0.75rem; }
.nearby-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nearby-player-position { grid-column: 2; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nearby-player-identity { display: flex; grid-column: 3; align-items: baseline; gap: 0.25rem; min-width: 0; }
.nearby-player-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby-player-you { flex-shrink: 0; font-size: 0.65rem; font-weight: 700; white-space: nowrap; }
.nearby-player-level, .nearby-player-xp, .nearby-xp-gap, .nearby-player-gap-empty { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nearby-player-level { grid-column: 4; }
.nearby-player-xp { grid-column: 5; }
.nearby-xp-gap, .nearby-player-gap-empty { grid-column: 6; }
.nearby-player-gap-empty { color: var(--muted); }
#nearby-ranks .nearby-xp-gap { font-weight: 600; }
#nearby-ranks .nearby-xp-gap.is-positive { color: #73d69c; }
#nearby-ranks .nearby-xp-gap.is-negative { color: #ff9699; }
#nearby-ranks .nearby-xp-gap.is-even { color: var(--muted); }
.leaderboard-identity a, .leaderboard-identity a:hover { text-decoration: none; }
.leaderboard-identity > a { font-weight: 700; overflow-wrap: anywhere; }
.leaderboard-identity a:hover { color: var(--text); }
#member-info { margin: 0; font-size: 0.75rem; color: var(--muted); line-height: 1.5; text-align: left; }
#member-info span { display: inline; }
#member-info .member-info-compact { display: none; }
@container (max-width: 550px) {
  #member-info { font-size: 0.65rem; line-height: 1.35; }
  #member-info .member-info-full { display: none; }
  #member-info .member-info-compact { display: inline; }
}
.profile-preview-feedback { flex-wrap: wrap; align-items: flex-start; }
.profile-preview-feedback #rank-save-status:empty { display: none; }
.profile-preview-feedback #rank-save-status:not(:empty) { flex-basis: 100%; order: 1; }
@media (min-width: 768px) {
  .profile-dashboard:has(#nearby-ranks) { width: min(1280px, 100%); grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  #nearby-ranks { min-width: 0; align-self: stretch; }
  .nearby-player-list { grid-template-columns: calc(24px + 0.45rem) max-content minmax(max-content, 1fr) max-content max-content max-content; }
  .profile-dashboard:has(#nearby-ranks) .profile-rank-editor { min-width: 0; }
  .profile-dashboard:has(#nearby-ranks) .profile-rank-layout { grid-template-columns: minmax(0, 1fr); }
  .profile-dashboard:has(#nearby-ranks) .profile-color-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .profile-dashboard:has(#nearby-ranks) { grid-template-columns: minmax(380px, 0.95fr) minmax(0, 1.6fr); }
  .nearby-player-list { min-width: 0; grid-template-columns: calc(24px + 0.45rem) max-content minmax(3rem, 1fr) max-content max-content max-content; column-gap: 0.2rem; }
  .nearby-player-heading, .nearby-player { padding-inline: 0.35rem; }
  .nearby-player { font-size: 0.68rem; }
}
.profile-card-panel { align-self: stretch; grid-template-rows: auto 1fr; }
.profile-card-panel .profile-rank-layout { align-content: center; }
.profile-card-panel .profile-section-heading h2 { font-size: 1.4rem; }
.profile-giveaways { grid-column: 1 / -1; min-width: 0; padding: 0.85rem 1rem; gap: 0.75rem; }
.profile-giveaways[hidden], #profile-giveaways-list[hidden] { display: none; }
.profile-giveaways-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.profile-giveaways-heading h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 0; font-size: 1.05rem; line-height: 1.3; }
#profile-giveaways-count { padding: 0.15rem 0.45rem; border-radius: 999px; background: #ffca0a12; color: var(--brand); font-size: 0.72rem; font-weight: 700; }
.profile-giveaways-controls { display: flex; gap: 0.4rem; flex-shrink: 0; }
.profile-giveaways-controls .studio-icon-button { width: 34px; height: 34px; min-height: 34px; }
.profile-giveaways-status, .profile-giveaways-empty { margin: 0; font-size: 0.8rem; color: var(--muted); }
.profile-giveaways-status:empty { display: none; }
.profile-giveaways-status.is-error { color: #ffb7b8; }
#profile-giveaways-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0.65rem; }
.profile-giveaway-row { display: flex; align-items: flex-start; gap: 0.65rem; min-width: 0; padding: 0.75rem; border: 1px solid #ffffff20; border-left: 3px solid #ffffff20; border-radius: 8px; background: #17130d; }
.profile-giveaway-summary { display: grid; grid-template-columns: minmax(2rem, 1fr) minmax(0, max-content); align-items: baseline; gap: 0.4rem; margin-top: 0.3rem; }
.profile-giveaway-channel { min-width: 0; margin: 0; overflow: hidden; color: var(--muted); font-size: 0.73rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
a.profile-giveaway-channel:hover { color: var(--brand); }
.profile-giveaway-row .profile-giveaway-summary .giveaway-ongoing-meta { min-width: 0; margin: 0; font-size: 0.7rem; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.profile-giveaway-timing { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0.4rem; margin-top: 0.2rem; }
.profile-giveaway-timing time { min-width: 0; color: var(--muted); font-size: 0.7rem; line-height: 1.4; }
.profile-giveaway-lock { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.6rem; color: #b5b0a7; font-size: 0.78rem; }
.profile-giveaway-row.is-locked { border-color: #ffffff16; border-left-color: #77716a !important; background: #151410; }
.profile-giveaway-row.is-locked .giveaway-ongoing-thumbnail { filter: grayscale(0.85); opacity: 0.65; }
.profile-giveaway-row.is-locked .giveaway-ongoing-content > strong { color: #b5b0a7; }
.profile-giveaway-row.is-locked .profile-giveaway-channel, .profile-giveaway-row.is-locked .giveaway-ongoing-meta, .profile-giveaway-row.is-locked time { color: #a7a097; }
.profile-giveaway-link { display: inline-flex; justify-self: end; align-items: center; gap: 0.3rem; font-size: 0.73rem; line-height: 1.4; white-space: nowrap; }
.profile-giveaway-row {
  --giveaway-accent: var(--brand);
  padding: 1rem; border-radius: 12px;
  background: radial-gradient(ellipse at top left, color-mix(in srgb, var(--giveaway-accent) 9%, transparent), transparent 70%), #17130d;
  box-shadow: 0 3px 14px #00000018;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.profile-giveaway-row:hover { border-top-color: #ffffff35; border-right-color: #ffffff35; border-bottom-color: #ffffff35; box-shadow: 0 5px 20px #00000030; }
.profile-giveaway-row .giveaway-ongoing-thumbnail { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 3px 5px #00000045); }
.profile-giveaway-row .giveaway-ongoing-content > strong { display: block; font-size: 0.95rem; line-height: 1.4; }
.profile-giveaway-enter {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 38px; margin-top: 0.8rem; padding: 0.5rem 0.9rem;
  border: 1px solid #ffdb6680; border-radius: 9px;
  background: linear-gradient(135deg, #ffda55, #f5b900); color: #241b06;
  font: inherit; font-size: 0.8rem; font-weight: 750; line-height: 1.25;
  box-shadow: 0 2px 8px #ffca0a18; cursor: pointer;
  transition: filter 160ms ease, box-shadow 160ms ease;
}
.profile-giveaway-enter:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 3px 14px #ffca0a35; }
.profile-giveaway-enter:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.profile-giveaway-enter:disabled { cursor: default; opacity: 0.75; }
.profile-giveaway-enter.is-entered { background: #35d59a12; border-color: #35d59a50; color: #78e9bd; box-shadow: none; opacity: 1; }
.profile-giveaway-entry-feedback { margin: 0.5rem 0 0; color: #78e9bd; font-size: 0.75rem; line-height: 1.5; overflow-wrap: anywhere; }
.profile-giveaway-entry-feedback:empty { display: none; }
.profile-giveaway-entry-feedback.is-error { color: #ffb7b8; }
@media (prefers-reduced-motion: reduce) { .profile-giveaway-row, .profile-giveaway-enter { transition: none; } }
.profile-giveaway-channel:focus-visible, .profile-giveaway-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.profile-color-field { display: grid; align-content: start; gap: 0.3rem; min-width: 0; color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.profile-color-trigger { display: grid; grid-template-columns: 20px minmax(0, 1fr) 10px; align-items: center; gap: 0.4rem; width: 100%; min-height: 40px; padding: 0.45rem 0.5rem; border: 1px solid #ffffff30; border-radius: 7px; color: var(--text); background: #17130d; font: inherit; text-align: left; cursor: pointer; }
.profile-color-trigger:hover, .profile-color-trigger[aria-expanded="true"] { border-color: #f6c744; background: #23190e; }
.profile-color-trigger:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.profile-color-chip { width: 20px; height: 20px; border: 1px solid #ffffff30; border-radius: 5px; }
.profile-color-value { min-width: 0; font-family: ui-monospace, monospace; font-size: 0.72rem; font-weight: 500; }
.profile-color-trigger > i { color: var(--muted); font-size: 0.65rem; }
.profile-color-picker .profile-color-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.profile-color-picker .profile-color-close { display: grid; place-items: center; width: 32px; min-height: 32px; padding: 0; border-color: transparent; background: transparent; }
.profile-color-presets { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.profile-color-palette-label { margin: 0; color: var(--muted); font-size: 0.75rem; }
.profile-color-picker .profile-color-presets button { min-height: 36px; padding: 0; border: 2px solid #ffffff25; border-radius: 6px; color: #fff; background: var(--preset-color); text-shadow: 0 1px 4px #000; }
.profile-color-presets button i { opacity: 0; }
.profile-color-presets button[aria-pressed="true"] i { opacity: 1; }
.profile-color-picker .profile-color-presets button:hover, .profile-color-picker .profile-color-presets button[aria-pressed="true"] { border-color: var(--brand); }
.profile-color-custom { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 0.75rem; align-items: end; }
.profile-color-picker .profile-color-custom input { height: 40px; font-family: ui-monospace, monospace; }
.profile-color-picker .profile-color-custom input[type="color"] { padding: 3px; cursor: pointer; }
.profile-color-picker-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.profile-color-picker .studio-button { padding: 0.45rem 0.85rem; color: #0b0906; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); }
.profile-color-picker .studio-button.secondary { color: var(--text); background: #23190e; }
@media (max-width: 767px) {
  .profile-dashboard .profile-customization .profile-color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.nearby-player:hover { background: rgba(255, 202, 10, 0.08); }
.profile-dashboard .profile-customization { padding: 0.9rem 1.1rem; gap: 0.7rem; }
.profile-customization .profile-section-heading h2 { font-size: 1.15rem; line-height: 1.3; margin: 0; }
.profile-dashboard:has(#nearby-ranks) .profile-customization .profile-color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-customization .profile-color-grid label,
.profile-customization .profile-background-upload label { font-size: 0.8rem; }
.profile-customization .profile-color-grid input[type="color"] { height: 30px; min-height: 30px; }
.profile-customization .profile-editor-actions { margin: 0; gap: 0.5rem; justify-content: flex-start; padding: 0; }
.profile-customization .studio-button { min-height: 40px; padding: 0.45rem 0.75rem; font-size: 0.8rem; }
.profile-customization .profile-editor-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem 1rem; min-width: 0; }
.profile-customization .profile-background-upload { justify-content: flex-start; align-items: center; gap: 0.6rem; min-width: 0; }
.profile-customization #choose-rank-background .profile-action-label { color: inherit; }
.profile-background-details { display: grid; gap: 0.15rem; color: var(--muted); font-size: 0.75rem; min-width: 0; }
.profile-background-details #background-name { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-background-details small { font-size: 0.7rem; }
.profile-customization .profile-editor-actions { margin-left: auto; }
@media (max-width: 899px) {
  .profile-customization .profile-editor-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 0.6rem; }
  .profile-customization .profile-background-upload { display: contents; }
  .profile-customization #choose-rank-background { justify-self: start; }
  .profile-customization .profile-background-details { display: flex; grid-column: 1 / -1; grid-row: 2; justify-self: start; max-width: 100%; align-items: baseline; gap: 0.35rem; font-size: clamp(0.6rem, 1.9vw, 0.7rem); white-space: nowrap; }
  .profile-customization .profile-background-details #background-name { flex: 0 1 auto; min-width: 0; max-width: 22ch; }
  .profile-customization .profile-background-details small { flex: 0 0 auto; font-size: inherit; }
}
@media (max-width: 599px) {
  .profile-customization .profile-editor-toolbar { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 0.35rem; }
  .profile-customization .profile-editor-actions { grid-column: 2; grid-row: 1; justify-self: start; margin-left: 0; flex-wrap: nowrap; gap: 0.35rem; }
  .profile-customization .profile-editor-actions .studio-button { flex: 0 0 auto; min-width: 0; min-height: 40px; padding: 0.45rem 0.5rem; gap: 0.25rem; font-size: clamp(0.625rem, 2.8vw, 0.8rem); white-space: nowrap; }
  .profile-customization .profile-editor-toolbar .secondary .profile-action-label { display: none; }
  .profile-customization .profile-editor-toolbar .secondary { flex: 0 0 40px; width: 40px; min-height: 40px; padding: 0; font-size: 1rem; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .profile-customization .profile-editor-toolbar { grid-template-columns: auto minmax(0, 1fr); gap: 0.35rem 0.75rem; }
  .profile-customization .profile-editor-actions { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 0.4rem; }
  .profile-customization .profile-editor-toolbar .studio-button { padding: 0.45rem 0.55rem; gap: 0.35rem; font-size: 0.75rem; white-space: nowrap; }
}
@media (min-width: 900px) {
  .profile-dashboard .profile-customization { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
  .profile-customization > .profile-section-heading { margin-bottom: 0; }
  .profile-dashboard:has(#nearby-ranks) .profile-customization .profile-color-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.nearby-player.is-current, .leaderboard-entry.is-current { outline: 2px solid var(--brand); background-color: rgba(255, 202, 10, 0.08); }
.viewer-rank { display: block; margin: 1rem 0; padding: 0; border: 0; text-decoration: none; }
.viewer-rank:hover { text-decoration: none; }
@media (max-width: 720px) {
  .leaderboard-list .leaderboard-entry { grid-template-columns: 30px 32px minmax(0, 1fr) auto; gap: 0.45rem; padding: 0.75rem 0.6rem; align-items: center; }
  .leaderboard-list .leaderboard-avatar { width: 32px; height: 32px; }
  .leaderboard-list .leaderboard-identity > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
  .leaderboard-list .leaderboard-identity span { font-size: 0.7rem; }
  .leaderboard-list .leaderboard-stats { grid-column: 4; grid-row: 1; flex-direction: row; align-items: center; gap: 0.35rem; padding-left: 0; white-space: nowrap; }
  .leaderboard-list .leaderboard-stats strong, .leaderboard-list .leaderboard-stats span { font-size: 0.68rem; }
}
.leaderboard-hero .viewer-rank { margin: 0.45rem 0 0; }

/* Scale the 1600 × 400 Discord card against its actual preview width. */
.profile-preview-column { min-width: 0; container-type: inline-size; }
.profile-rank-preview { display: block; width: 100%; padding: 0; aspect-ratio: 4 / 1; font-synthesis: none; }
.profile-rank-preview > * { position: absolute; }
.profile-preview-avatar { left: 2.8125%; top: 17.5%; width: 16.25%; border-width: 0.625cqw; }
.profile-preview-copy { left: 21.875%; top: 40%; width: 62.5%; padding: 0; display: block; }
.profile-preview-copy > strong { display: block; max-width: 100%; font-weight: 400; font-size: 5.625cqw; line-height: 1; }
.profile-preview-copy > span { display: block; margin-top: 1.25cqw; font-size: 2.5cqw; line-height: 1; white-space: nowrap; }
.profile-preview-track { margin-top: 1.25cqw; height: 2.5cqw; }
.profile-preview-rank { top: 12.5%; right: 3.125%; max-width: 75%; }
.profile-preview-rank strong { font-weight: 400; font-size: 5.625cqw; line-height: 1; }
.profile-preview-rank span { margin-top: 0.625cqw; font-size: 3.75cqw; line-height: 1; }

.embed-workflow { gap: 0.3rem; margin-top: 0; margin-bottom: 1.2rem; padding-top: 0.65rem; }
.embed-mode-actions { margin: 0.1rem 0 0.25rem; }
.embed-workflow #create-embed-settings,
.embed-workflow #edit-embed-settings { display: grid; gap: 0.35rem; }
.embed-workflow #create-embed-settings[hidden],
.embed-workflow #edit-embed-settings[hidden] { display: none; }
.embed-mode-actions .studio-button.is-active { color: #12100c; background: var(--brand); border-color: var(--brand); }
.studio-link-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.65rem; align-items: end; }
.studio-link-input input { width: 100%; }
@media (max-width: 720px) { .studio-link-input { grid-template-columns: 1fr; } }

.recent-actions-page { width: min(calc(100% - 2rem), 1040px); padding-top: 3rem; }
.recent-actions-hero { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.recent-actions-hero h1 { margin-bottom: 0.35rem; }
.recent-actions-hero .lede { margin: 0; }
.recent-actions-list { display: grid; gap: 0.8rem; }
.recent-actions-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.recent-actions-filters .studio-button[aria-pressed="true"] { color: #fff; background: var(--interactive, #5865f2); border-color: var(--interactive, #5865f2); }
.recent-action-card { padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(145deg, rgba(40, 25, 14, 0.94), rgba(16, 12, 9, 0.98)); }
.recent-action-card > header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.recent-action-card h2 { margin: 0; font-size: 1.08rem; }
.action-source { flex: 0 0 auto; padding: 0.15rem 0.55rem; border-radius: 999px; color: #130d06; background: var(--brand); font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; }
.action-source.is-giveaway-studio { color: #071a12; background: #4ade80; }
.action-source.is-discord { color: #fff; background: #5865f2; }
.recent-action-meta, .recent-action-identifiers { margin: 0.35rem 0 0; font-size: 0.82rem; }
.recent-action-identifiers { color: var(--muted); }
.recent-action-note { margin: 0.7rem 0 0; color: var(--muted); }
.recent-action-card > div { margin-top: 0.75rem; }
.recent-action-card > div > strong { display: block; margin-bottom: 0.25rem; color: var(--brand); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; }
.recent-action-summary { display: grid; gap: 0.28rem; margin: 0; padding: 0.7rem 0.8rem 0.7rem 1.8rem; border-radius: 8px; color: var(--text); background: var(--field, var(--bg)); font-size: 0.84rem; }
.recent-action-link { display: inline-block; margin-top: 0.75rem; font-weight: 800; }
@media (max-width: 650px) { .recent-actions-hero { align-items: stretch; flex-direction: column; } .recent-actions-hero .studio-button { align-self: start; } }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.leaderboard-page { max-width: 900px; }
.leaderboard-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.25rem;
}
.leaderboard-hero h1 { font-size: clamp(3rem, 8vw, 5.2rem); }
.leaderboard-hero .lede { margin-bottom: 0; }
.leaderboard-total {
  display: flex;
  flex-direction: column;
  min-width: 145px;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(35, 21, 11, 0.72);
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.leaderboard-total strong {
  color: var(--brand);
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.leaderboard-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.leaderboard-entry {
  position: relative;
  display: grid;
  grid-template-columns: 64px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 76px;
  padding: 0.8rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(115deg, rgba(35, 22, 12, 0.9), rgba(16, 12, 9, 0.96));
}
.leaderboard-entry[data-podium="1"] { border-color: rgba(255, 202, 10, 0.55); }
.leaderboard-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.leaderboard-entry:has(.leaderboard-card-link:hover) { border-color: var(--brand); }
.leaderboard-card-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.leaderboard-entry .leaderboard-identity strong, .leaderboard-entry .leaderboard-identity > span { color: var(--brand); }
@media (max-width: 720px) {
  .leaderboard-list .leaderboard-identity > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
}
.leaderboard-entry[data-podium="2"] { border-color: rgba(221, 224, 230, 0.4); }
.leaderboard-entry[data-podium="3"] { border-color: rgba(205, 127, 50, 0.48); }
.leaderboard-position {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 850;
  text-align: center;
}
.leaderboard-entry[data-podium="1"] .leaderboard-position { color: var(--brand); }
.leaderboard-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 50%;
  color: #120b03;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  font-size: 1.2rem;
}
.leaderboard-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leaderboard-identity, .leaderboard-stats { display: flex; flex-direction: column; min-width: 0; }
.leaderboard-identity strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard-identity span, .leaderboard-stats span { color: #9f8b71; font-size: 0.78rem; }
.leaderboard-stats { align-items: end; padding-left: 1rem; }
.leaderboard-stats strong { color: var(--brand); }
.leaderboard-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: clamp(64px, 16svh, 180px);
  color: var(--muted);
  text-align: center;
}
.leaderboard-status[hidden] { display: none; }
.leaderboard-status.is-error { color: #ff9c7d; }
.leaderboard-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.leaderboard-pagination[hidden] { display: none; }
.leaderboard-page-picker { display: flex; align-items: center; justify-content: center; gap: 0.4rem; white-space: nowrap; }
.leaderboard-page-picker select { min-width: 3.5rem; padding: 0.46rem 1.8rem 0.46rem 0.65rem; border: 1px solid var(--border); border-radius: 9px; background: #17100a; color: var(--text); font: inherit; font-weight: 750; cursor: pointer; }
.leaderboard-page-picker select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.leaderboard-page-picker select:disabled { opacity: 0.55; cursor: not-allowed; }
.leaderboard-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: rgba(35, 21, 11, 0.72);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.leaderboard-page-button:first-child { justify-self: start; }
.leaderboard-page-button:last-child { justify-self: end; }
.leaderboard-page-button:hover:not(:disabled) { border-color: var(--brand-strong); color: var(--brand); }
.leaderboard-page-button:disabled { opacity: 0.42; cursor: not-allowed; }

@media (max-width: 760px) {
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(12, 9, 6, 0.98); }
  .about-hero { position: relative; grid-template-columns: 1fr; gap: 0; isolation: isolate; }
  .about-hero-copy { position: relative; z-index: 1; }
  .about-hero-copy h1 { padding-right: min(25vw, 110px); }
  .about-hero-logo { position: absolute; top: 2.35rem; right: 0; bottom: auto; z-index: 0; width: min(24vw, 104px); opacity: 0.12; }
  .nav { min-height: 62px; align-items: center; flex-direction: row; flex-wrap: wrap; padding: 0.55rem 0; gap: 0.45rem; }
  .brand { white-space: nowrap; font-size: 1rem; }
  .brand-mark { width: 30px; height: 30px; margin-right: 0.5rem; }
  .nav-toggle { display: grid; margin-left: auto; }
  .nav-links { display: none; width: 100%; flex-direction: column; gap: 0.15rem; overflow: hidden; margin-top: 0; padding: 0 0.6rem; border: 1px solid transparent; border-radius: 15px; background: transparent; }
  .nav-links.is-open { display: flex; margin-top: 0.15rem; padding: 0.5rem 0.6rem 0.7rem; border-color: rgba(255, 184, 49, 0.13); background: rgba(18, 13, 9, 0.92); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22); }
  .nav-links > a, .nav-group { width: 100%; }
  .nav-links > a, .nav-group summary { width: 100%; padding: 0.55rem 0.4rem; border-radius: 8px; font-size: 0.9rem; }
  .nav-links > a:hover, .nav-links > a[aria-current="page"], .nav-group.is-current summary { background: rgba(255, 138, 0, 0.08); }
  .nav-group summary { justify-content: space-between; }
  .nav-submenu { position: static; display: grid; min-width: 0; max-height: 0; overflow: hidden; margin: 0 0 0 0.65rem; padding: 0 0 0 0.65rem; border: 0; border-left: 1px solid var(--border); border-radius: 0; background: transparent; box-shadow: none; opacity: 0; visibility: hidden; transform: translateY(-5px); transition: none; }
  .nav-submenu a { width: 100%; padding: 0.48rem 0.55rem; font-size: 0.86rem; }
  .nav-group[open] > .nav-submenu { max-height: 20rem; margin: 0.15rem 0 0.35rem 0.65rem; padding: 0.2rem 0 0.2rem 0.65rem; opacity: 1; visibility: visible; transform: translateY(0); animation: none; transition-delay: 0s; }
  .mode-banner { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
  .grid, .explore-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .card { min-height: auto; }
  main { width: min(calc(100% - 1.5rem), var(--content)); padding: clamp(1.5rem, 5svh, 2.35rem) 0 clamp(2rem, 6svh, 4rem); }
  .hero { margin-bottom: 2.35rem; }
  .hero h1 { font-size: clamp(2.3rem, 10.5vw, 3rem); line-height: 1.02; }
  .hero h1 br { display: none; }
  .lede { font-size: 1rem; line-height: 1.55; }
  .card { min-height: auto; padding: 1.2rem; }
  .card-heading { gap: 0.75rem; }
  .card h2 { font-size: 1.4rem; }
  .card-icon { width: 40px; height: 40px; flex-basis: 40px; border-radius: 11px; }
  .card p { font-size: 0.95rem; }
  .policy .hero { margin-bottom: 1.8rem; }
  .policy-section { margin: 0.45rem 0; }
  .policy-section summary { min-height: 60px; padding: 0.65rem 0.15rem; gap: 0.7rem; font-size: 0.98rem; }
  .policy-section summary::after { font-size: 1.25rem; }
  .policy-content { padding: 0.1rem 0.15rem 1rem 2.95rem; }
  .policy-content ul { padding-left: 1.15rem; }
  .footer-inner { padding: 0.85rem 0 1rem; grid-template-columns: auto minmax(0, 1fr); gap: 0.55rem 0.5rem; font-size: 0.82rem; }
  .footer-links { grid-column: 2; grid-row: 1; justify-self: end; flex-wrap: nowrap; justify-content: flex-end; gap: clamp(0.35rem, 1.6vw, 0.7rem); }
  .footer-links a { font-size: 0.68rem; white-space: nowrap; }
  .footer-team { grid-column: 1; grid-row: 1; justify-self: start; text-align: left; font-size: 0.7rem; white-space: nowrap; }
  .footer-updated { grid-column: 1; grid-row: 3; justify-self: center; text-align: center; }
  .footer-fan-policy { grid-column: 1 / -1; grid-row: 2; justify-self: center; text-align: center; font-size: 0.62rem; margin-top: 0.15rem; }
  .back-to-top { right: 0.8rem; bottom: max(0.8rem, var(--footer-clearance, 0px)); width: 44px; height: 44px; }
  .profile-page { padding-top: clamp(1.5rem, 5svh, 3rem); padding-bottom: clamp(2rem, 6svh, 3rem); }
  .coming-soon-icon { width: 72px; height: 72px; font-size: 1.85rem; }
  .coming-soon h1 { font-size: 2.45rem; }
  .leaderboard-hero { align-items: start; flex-direction: column; gap: 1.2rem; margin-bottom: 1.5rem; }
  .leaderboard-hero h1 { margin-bottom: 0.7rem; font-size: 3rem; }
  .leaderboard-total { width: 100%; min-width: 0; }
  .leaderboard-entry { grid-template-columns: 48px 42px minmax(0, 1fr); gap: 0.75rem; padding: 0.7rem 0.75rem; }
  .leaderboard-position { font-size: 0.95rem; }
  .leaderboard-avatar { width: 42px; height: 42px; }
  .leaderboard-stats { grid-column: 3; align-items: start; flex-direction: row; gap: 0.65rem; padding-left: 0; }
  .leaderboard-stats strong, .leaderboard-stats span { font-size: 0.76rem; }
  .leaderboard-pagination { grid-template-columns: 1fr 1fr; gap: 0.55rem; }
  .leaderboard-page-picker { grid-column: 1 / -1; grid-row: 1; }
  .leaderboard-page-button { grid-row: 2; padding: 0.5rem 0.65rem; font-size: 0.82rem; }
  .community-rules-list, .strike-list { grid-template-columns: 1fr; }
  .rules-panel { padding: 1rem; border-radius: 16px; }
  .rules-panel-heading { gap: 0.75rem; }
  .discord-emoji-large { width: 42px; height: 42px; flex-basis: 42px; }
  .strike-list > div { font-size: 0.88rem; }
  .team-grid { grid-template-columns: 1fr; }
  .team-card { padding: 1rem; }
  .support-panel { padding: 1rem; border-radius: 16px; }
  .support-heading { gap: 0.75rem; }
  .support-contact-card { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 0.8rem 0.7rem; gap: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top, .nav-links, .nav-submenu, .nav-group summary i { transition: none; }
  .nav-group[open] .nav-submenu { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 390px) {
  .nav { gap: 0.5rem; }
  .brand { font-size: 0.94rem; }
  .nav-links { gap: 0.1rem; }
  .nav-links a { font-size: 0.84rem; }
  .hero h1 { font-size: 2.2rem; }
  .community-card .card-heading h2 { font-size: 1.4rem; white-space: normal; }
}

.roles-page { max-width: 920px; }
.roles-hero { margin-bottom: 2.5rem; }
.role-embed {
  --embed-accent: var(--brand-strong);
  position: relative;
  margin: 1.15rem 0;
  padding: clamp(1.15rem, 3vw, 1.75rem);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--embed-accent) 38%, var(--border));
  border-left: 5px solid var(--embed-accent);
  border-radius: 5px 20px 20px 5px;
  background: linear-gradient(145deg, rgba(32, 24, 18, 0.98), rgba(14, 12, 10, 0.99));
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.2);
}
.role-embed-staff { --embed-accent: #ff4a43; }
.role-embed-obtainable { --embed-accent: #ffbe20; }
.role-embed-level { --embed-accent: #ffd065; }
.role-embed-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.4rem; }
.role-embed-title { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.role-embed-title > img { width: 42px; height: 42px; flex: 0 0 42px; object-fit: contain; }
.role-embed-title h2 { margin: 0; color: var(--text); font-size: clamp(1.45rem, 3vw, 2rem); }
.role-thumbnail { width: 116px; height: 116px; flex: 0 0 116px; border-radius: 18px; object-fit: cover; }
.obtainable-thumbnail { width: 92px; height: 92px; flex-basis: 92px; }
.role-group + .role-group { margin-top: 1.35rem; }
.role-group h3 { margin: 0 0 0.65rem; color: var(--embed-accent); font-size: 0.76rem; letter-spacing: 0.11em; text-transform: uppercase; }
.role-list { display: grid; gap: 0.5rem; margin: 0; padding: 0 0 0 0.8rem; border-left: 3px solid rgba(255, 255, 255, 0.12); list-style: none; }
.role-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem; border-radius: 10px; background: rgba(255, 255, 255, 0.035); }
.role-list li > img, .role-pair-icons img { width: 32px; height: 32px; object-fit: contain; }
.role-list li > div { min-width: 0; }
.role-list p { margin: 0.22rem 0 0; padding-left: 0.38rem; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.role-pill[data-role-color="006dff"] { --role-pill: #006dff; }
.role-pill[data-role-color="00f7fe"] { --role-pill: #00f7fe; }
.role-pill[data-role-color="369f36"] { --role-pill: #369f36; }
.role-pill[data-role-color="4c6eff"] { --role-pill: #4c6eff; }
.role-pill[data-role-color="5db0e4"] { --role-pill: #5db0e4; }
.role-pill[data-role-color="733beb"] { --role-pill: #733beb; }
.role-pill[data-role-color="834b90"] { --role-pill: #834b90; }
.role-pill[data-role-color="8eff9a"] { --role-pill: #8eff9a; }
.role-pill[data-role-color="a7b1f0"] { --role-pill: #a7b1f0; }
.role-pill[data-role-color="b7b7b7"] { --role-pill: #b7b7b7; }
.role-pill[data-role-color="c6d43d"] { --role-pill: #c6d43d; }
.role-pill[data-role-color="c7ffd0"] { --role-pill: #c7ffd0; }
.role-pill[data-role-color="ce7bb6"] { --role-pill: #ce7bb6; }
.role-pill[data-role-color="d633f0"] { --role-pill: #d633f0; }
.role-pill[data-role-color="ecc83f"] { --role-pill: #ecc83f; }
.role-pill[data-role-color="f19700"] { --role-pill: #f19700; }
.role-pill[data-role-color="f80000"] { --role-pill: #f80000; }
.role-pill[data-role-color="ff0000"] { --role-pill: #ff0000; }
.role-pill[data-role-color="ff2f40"] { --role-pill: #ff2f40; }
.role-pill[data-role-color="ff5b56"] { --role-pill: #ff5b56; }
.role-pill[data-role-color="ff7700"] { --role-pill: #ff7700; }
.role-pill[data-role-color="ffca0a"] { --role-pill: #ffca0a; }
.role-pill[data-role-color="ffe2a8"] { --role-pill: #ffe2a8; }
.role-pill { display: inline-block; max-width: 100%; padding: 0.08rem 0.38rem; border-radius: 5px; color: var(--role-pill); background: color-mix(in srgb, var(--role-pill) 16%, transparent); line-height: 1.35; }
.role-pair { grid-template-columns: 34px minmax(0, 1fr) !important; }
.role-pair-icons { display: flex; width: 34px; align-items: center; justify-content: center; }
.role-pair-icons img { width: 26px; height: 26px; }
.role-pair-icons img + img { margin-left: -10px; }
.role-pair-labels { display: inline-flex; align-items: center; gap: 0; }
.role-pair-labels .role-pill { padding-inline: 0.18rem; }
.role-pair-separator { color: var(--text); font-weight: 800; }
.role-note, .role-warning { margin: 1rem 0 0; padding: 0.75rem 0.85rem; border-radius: 10px; background: rgba(255, 190, 32, 0.08); }
.role-note { display: flex; align-items: center; gap: 0.55rem; }
.role-note a { color: var(--brand); font-weight: 800; text-decoration: none; }
.role-note a:hover { color: var(--brand-strong); }
.role-warning { display: flex; align-items: center; justify-content: center; gap: 0.55rem; color: #ffe09a; text-align: center; }
.role-warning img { width: 28px; height: 28px; object-fit: contain; }


@media (max-width: 600px) {
  .role-embed { padding: 1rem; border-radius: 4px 16px 16px 4px; }
  .role-embed-header { flex-direction: row; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.8rem; }
  .role-thumbnail, .obtainable-thumbnail { width: 70px; height: 70px; flex: 0 0 70px; order: initial; align-self: flex-start; margin-bottom: 0; object-fit: contain; }
  .role-embed-title { padding-right: 0; }
  .role-list { padding-left: 0.55rem; }
  .role-list li { grid-template-columns: 30px minmax(0, 1fr); padding: 0.55rem; }
  .role-list li > img, .role-pair-icons img { width: 28px; height: 28px; }
  .role-pair { grid-template-columns: 30px minmax(0, 1fr) !important; }
  .role-pair-icons { width: 30px; }
  .role-pair-icons img { width: 24px; height: 24px; }
}
/* Leaderboard podium */
.leaderboard-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 0.8rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}
.leaderboard-podium[hidden] { display: none; }
.leaderboard-podium[data-count="1"] { grid-template-columns: minmax(0, 280px); justify-content: center; }
.leaderboard-podium[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 260px)); justify-content: center; }
.leaderboard-podium:not([data-count="3"]) .leaderboard-podium-entry { order: initial; }
.leaderboard-podium-entry {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 1rem 0.7rem 1.15rem;
  overflow: hidden;
  text-align: center;
}
.leaderboard-podium-entry[data-podium="1"] {
  order: 2;
  min-height: 250px;
  border-color: rgba(255, 202, 10, 0.72);
  background: linear-gradient(180deg, rgba(255, 202, 10, 0.13), transparent 55%), linear-gradient(115deg, rgba(35, 22, 12, 0.96), rgba(16, 12, 9, 0.98));
}
.leaderboard-podium-entry[data-podium="2"] { order: 1; min-height: 220px; border-color: rgba(221, 224, 230, 0.55); }
.leaderboard-podium-entry[data-podium="3"] { order: 3; min-height: 200px; border-color: rgba(205, 127, 50, 0.62); }
.leaderboard-podium-entry .leaderboard-position { order: -2; color: var(--text); font-size: 2rem; line-height: 1; }
.leaderboard-podium-entry .leaderboard-avatar { order: -1; width: 68px; height: 68px; border: 3px solid rgba(255, 255, 255, 0.12); }
.leaderboard-podium-entry[data-podium="1"] .leaderboard-avatar { width: 78px; height: 78px; border-color: rgba(255, 202, 10, 0.7); }
.leaderboard-podium-entry .leaderboard-identity { width: 100%; align-items: center; }
.leaderboard-podium-entry .leaderboard-identity strong { max-width: 100%; font-size: 1.05rem; }
.leaderboard-podium-entry .leaderboard-identity span { display: none; }
.leaderboard-podium-entry .leaderboard-stats { grid-column: auto; align-items: center; gap: 0.1rem; padding-left: 0; }
.leaderboard-podium-entry .leaderboard-stats strong { font-size: 0.9rem; }
.leaderboard-podium-entry .leaderboard-stats span { font-size: 0.75rem; }

@media (max-width: 600px) {
  .leaderboard-podium { gap: 0.4rem; margin-bottom: 1rem; }
  .leaderboard-podium-entry { gap: 0.3rem; padding: 0.7rem 0.35rem 0.85rem; border-radius: 14px; }
  .leaderboard-podium-entry[data-podium="1"] { min-height: 205px; }
  .leaderboard-podium-entry[data-podium="2"] { min-height: 185px; }
  .leaderboard-podium-entry[data-podium="3"] { min-height: 170px; }
  .leaderboard-podium-entry .leaderboard-position { font-size: 1.5rem; }
  .leaderboard-podium-entry .leaderboard-avatar { width: 50px; height: 50px; }
  .leaderboard-podium-entry[data-podium="1"] .leaderboard-avatar { width: 58px; height: 58px; }
  .leaderboard-podium-entry .leaderboard-identity strong { font-size: 0.78rem; }
  .leaderboard-podium-entry .leaderboard-stats { flex-direction: column; gap: 0.05rem; }
  .leaderboard-podium-entry .leaderboard-stats strong,
  .leaderboard-podium-entry .leaderboard-stats span { font-size: 0.68rem; }
}
/* Desktop glass submenus */
@media (min-width: 761px) {
  .nav-submenu {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 45%), rgba(9, 7, 5, 0.56);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    backdrop-filter: blur(22px) saturate(140%);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  }
  .nav-submenu a:hover,
  .nav-submenu a[aria-current="page"] {
    color: var(--brand);
    background: rgba(255, 138, 0, 0.09);
  }
}

/* CLB links hub */
.link-hub-page { max-width: 650px; padding-top: 3rem; }
.link-hub-profile { margin-bottom: 2rem; text-align: center; }
.link-hub-avatar {
  width: 112px;
  height: 112px;
  margin-bottom: 1rem;
  border: 3px solid rgba(255, 202, 10, 0.72);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32), 0 0 34px rgba(255, 138, 0, 0.16);
}
.link-hub-profile .eyebrow { margin-bottom: 0.5rem; }
.link-hub-profile h1 { margin: 0; color: var(--text); font-size: clamp(2rem, 6vw, 3.1rem); letter-spacing: -0.04em; }
.link-hub-profile > p:last-child { max-width: 520px; margin: 0.65rem auto 0; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.link-hub-list { display: grid; gap: 0.75rem; }
.link-hub-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  min-height: 68px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 184, 49, 0.24);
  border-radius: 14px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(45, 29, 16, 0.92), rgba(18, 13, 9, 0.94));
  box-shadow: 0 13px 34px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 232, 166, 0.06);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.link-hub-item:hover {
  border-color: rgba(255, 202, 10, 0.72);
  color: #fff7df;
  background: linear-gradient(135deg, rgba(60, 37, 17, 0.96), rgba(23, 15, 9, 0.96));
  box-shadow: 0 18px 42px rgba(255, 106, 0, 0.13), inset 0 1px 0 rgba(255, 232, 166, 0.1);
  transform: translateY(-2px);
}
.link-hub-item:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.link-hub-item > span:nth-child(2) { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-width: 0; font-weight: 800; text-align: center; }
.link-hub-item > i:last-child { justify-self: center; color: #a99478; font-size: 0.95rem; }
.link-hub-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  color: #120c05;
  background: linear-gradient(135deg, #ffd52a, #ff8a00);
  font-size: 1.25rem;
  box-shadow: 0 7px 20px rgba(255, 138, 0, 0.18);
}
.link-hub-item small { padding: 0.15rem 0.35rem; border-radius: 999px; color: #1a1005; background: var(--brand); font-size: 0.58rem; font-weight: 900; letter-spacing: 0.08em; }

@media (max-width: 600px) {
  .link-hub-page { padding-top: 2.35rem; }
  .link-hub-avatar { width: 92px; height: 92px; }
  .link-hub-profile h1 { font-size: 2.15rem; }
  .link-hub-item { grid-template-columns: 42px minmax(0, 1fr) 34px; min-height: 62px; padding: 0.55rem 0.65rem; border-radius: 13px; }
  .link-hub-icon { width: 38px; height: 38px; border-radius: 10px; font-size: 1.1rem; }
  .link-hub-item > span:nth-child(2) { font-size: 0.95rem; }
}
/* Homepage links panel */
.home-links-section { margin: 0 0 3rem; }
.home-links-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.15rem;
  padding: 1.15rem 1.3rem;
  border: 1px solid rgba(255, 184, 49, 0.28);
  border-radius: 18px;
  color: var(--text);
  background: linear-gradient(120deg, rgba(46, 29, 15, 0.9), rgba(17, 12, 8, 0.94));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 228, 150, 0.07);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.home-links-card:hover { border-color: rgba(255, 202, 10, 0.72); color: var(--text); box-shadow: 0 22px 56px rgba(255, 106, 0, 0.12); transform: translateY(-3px); }
.home-links-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.home-links-card > img { width: 68px; height: 68px; border: 2px solid rgba(255, 202, 10, 0.58); border-radius: 50%; object-fit: cover; }
.home-links-copy { display: flex; min-width: 0; flex-direction: column; }
.home-links-copy .eyebrow { margin-bottom: 0.1rem; font-size: 0.68rem; }
.home-links-copy strong { color: var(--text); font-size: 1.25rem; }
.home-links-copy > span:last-child { margin-top: 0.18rem; color: var(--muted); font-size: 0.9rem; }
.home-links-action { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--brand); font-weight: 800; white-space: nowrap; }

@media (max-width: 600px) {
  .home-links-section { margin-bottom: 2.35rem; }
  .home-links-card { grid-template-columns: 56px minmax(0, 1fr); gap: 0.85rem; padding: 1rem; border-radius: 16px; }
  .home-links-card > img { width: 56px; height: 56px; }
  .home-links-copy strong { font-size: 1.08rem; }
  .home-links-copy > span:last-child { font-size: 0.82rem; line-height: 1.4; }
  .home-links-action { grid-column: 2; font-size: 0.86rem; }
}
/* Error pages and protected media */
img,
picture,
video,
.card-icon,
.policy-summary-icon,
.role-icon,
.discord-emoji {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}
.error-body { display: flex; flex-direction: column; }
.error-main {
  width: min(calc(100% - 2rem), 780px);
  margin: auto;
  padding: clamp(1rem, 3svh, 4rem) 0;
}
.error-card {
  position: relative;
  padding: clamp(1.5rem, 4svh, 4.5rem);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  text-align: center;
  background:
    radial-gradient(circle at 85% 15%, rgba(239, 27, 36, 0.16), transparent 20rem),
    radial-gradient(circle at 10% 90%, rgba(255, 202, 10, 0.16), transparent 22rem),
    linear-gradient(145deg, rgba(42, 27, 17, 0.94), rgba(13, 10, 7, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}
.error-icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 1rem;
  place-items: center;
  border-radius: 20px;
  color: #160e05;
  background: linear-gradient(145deg, var(--brand), var(--brand-strong));
  box-shadow: 0 14px 32px rgba(255, 138, 0, 0.18);
  font-size: 1.8rem;
}
.error-code { color: var(--brand); font-size: clamp(4rem, 13vw, 7.5rem); font-weight: 950; letter-spacing: -0.06em; line-height: 0.9; }
.error-card h1 { margin: 1rem 0 0.55rem; font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.1; }
.error-card p { max-width: 540px; margin: 0 auto; color: var(--muted); font-size: 1.02rem; }
.error-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.8rem; margin-top: clamp(1rem, 2svh, 1.8rem); }
.error-actions .button { min-width: 150px; }
@media (max-width: 520px) {
  .error-main { width: min(calc(100% - 1.25rem), 780px); }
  .error-card { padding: 2rem 1.15rem; border-radius: 20px; }
  .error-icon { width: 56px; height: 56px; border-radius: 17px; font-size: 1.5rem; }
  .error-actions { display: grid; }
  .error-actions .button { width: 100%; }
}

/* Message Studio */
.message-studio-page .studio-fieldset legend { width: 100%; display: flex; align-items: center; gap: 0.5rem; }
.message-studio-page .studio-fieldset legend .studio-icon-button { margin-left: auto; }
.message-section-fields { display: grid; gap: 1rem; min-width: 0; }
.message-section-fields[hidden] { display: none; }
.discord-embed.is-components-v2 { border: 1px solid #ffffff20; border-left-width: 4px; border-radius: 8px; }
.discord-embed.is-components-v2 > .discord-buttons { grid-column: 1 / -1; margin-top: 0.5rem; }
.discord-embed.is-components-v2 .discord-embed-title { font-size: 1.25rem; }
.discord-v2-text + .discord-buttons, .discord-buttons + .discord-v2-text { margin-top: 0.5rem; }
.studio-page { width: min(calc(100% - 2rem), 1480px); padding-top: 3rem; }
.studio-hero { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.studio-hero h1 { font-size: clamp(2.5rem, 5vw, 4.6rem); }
.studio-hero .lede { margin-bottom: 0; }
.studio-connection { display: flex; flex: 0 0 auto; align-items: center; gap: 0.7rem; padding: 0.7rem; border: 1px solid var(--border); border-radius: 14px; background: rgba(20, 14, 10, 0.86); }
.studio-connection-state { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.84rem; font-weight: 750; }
.studio-status { position: sticky; top: 78px; z-index: 9; margin-bottom: 1rem; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: #1b130c; font-weight: 700; }
.studio-status.is-success { border-color: rgba(87, 242, 135, 0.5); color: #a9f8c1; }
.studio-status.is-error { border-color: rgba(237, 66, 69, 0.65); color: #ffb7b8; }
.studio-workspace { display: grid; grid-template-columns: minmax(190px, 0.65fr) minmax(500px, 1.65fr) minmax(310px, 1fr); align-items: start; gap: 1rem; }
.studio-workspace.is-library-collapsed { grid-template-columns: 76px minmax(500px, 1.8fr) minmax(380px, 1.25fr); }
.studio-library, .studio-editor, .studio-preview, .studio-dialog > form { border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(155deg, rgba(37, 23, 12, 0.97), rgba(17, 13, 10, 0.98)); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2); }
.studio-library, .studio-preview { position: sticky; top: 86px; padding: 1rem; }
.studio-editor { padding: 1.2rem; }
.studio-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 1rem; }
.studio-panel-heading h2 { margin: 0.15rem 0 0; font-size: 1.25rem; }
.studio-library-actions { display: flex; align-items: center; gap: 0.4rem; }
.studio-workspace.is-library-collapsed .studio-library { padding: 0.7rem; }
.studio-workspace.is-library-collapsed .studio-library-title, .studio-workspace.is-library-collapsed .studio-message-list, .studio-workspace.is-library-collapsed .studio-empty { display: none; }
.studio-workspace.is-library-collapsed .studio-library .studio-panel-heading { justify-content: center; margin-bottom: 0.55rem; }
.studio-workspace.is-library-collapsed .studio-library-actions { flex-direction: column; }
.studio-workspace.is-library-collapsed .studio-tabs { grid-template-columns: 1fr; }
.studio-workspace.is-library-collapsed .studio-tab-label { display: none; }
.studio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; }
.studio-button, .studio-icon-button, .studio-tabs button, .studio-message-item { border: 1px solid transparent; color: #0b0906; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); font: inherit; font-weight: 800; cursor: pointer; }
.studio-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.5rem 0.8rem; border-radius: 10px; text-decoration: none; }
.studio-button:hover, .studio-button:focus-visible { text-decoration: none; }
.studio-button.secondary, .studio-icon-button.secondary { border-color: rgba(255, 184, 49, 0.25); color: var(--text); background: #21150d; }
.studio-button.danger, .studio-icon-button.danger { border-color: rgba(237, 66, 69, 0.45); color: #ffb6b8; background: rgba(237, 66, 69, 0.1); }
.studio-button:disabled { opacity: 0.45; cursor: not-allowed; }
.studio-icon-button { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; padding: 0; border-radius: 9px; }
.studio-icon-button .bi { display: block; line-height: 1; }
.studio-icon-button .bi::before { display: block; vertical-align: 0; }
.studio-editor label.studio-icon-button { display: grid; align-content: center; justify-content: center; }
.studio-panel-heading > .studio-actions { align-self: center; }
.studio-header-actions { justify-content: flex-end; }
.studio-autosave-top { min-height: 36px; padding: 0.35rem 0.55rem; white-space: nowrap; }
.studio-header-actions > .studio-button { min-height: 36px; padding: 0.35rem 0.65rem; font-size: 0.78rem; }
.studio-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.studio-file-button { position: relative; overflow: hidden; }
.studio-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.studio-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; margin-bottom: 0.65rem; padding: 0.25rem; border-radius: 10px; background: rgba(0, 0, 0, 0.22); }
.studio-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.45rem; border-radius: 8px; color: var(--muted); background: transparent; font-size: 0.76rem; }
.studio-tabs button > span[aria-hidden="true"] { font-size: 1rem; line-height: 1; }
.studio-tabs button.is-active { color: #120c05; background: var(--brand); }
.studio-message-list { display: grid; gap: 0.4rem; max-height: 60vh; overflow: auto; }
.studio-message-item { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; padding: 0.65rem; border-color: transparent; border-radius: 10px; color: var(--text); background: rgba(255, 255, 255, 0.035); text-align: left; }
.studio-message-item:hover, .studio-message-item.is-selected { border-color: rgba(255, 202, 10, 0.55); background: rgba(255, 138, 0, 0.1); }
.studio-message-item.is-locked, .studio-message-item.is-locked:hover { border-color: transparent; color: #81786d; background: rgba(255, 255, 255, 0.018); cursor: not-allowed; opacity: 0.48; }
.studio-message-item strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-message-item span { color: #a9967e; font-size: 0.72rem; }
.studio-empty { margin: 0.8rem 0 0; color: #9f8c73; font-size: 0.8rem; }
.studio-fieldset { display: grid; gap: 0.8rem; margin: 0 0 1rem; padding: 1rem; border: 1px solid rgba(255, 184, 49, 0.18); border-radius: 13px; }
.studio-fieldset legend { padding: 0 0.4rem; color: var(--brand); font-size: 0.86rem; font-weight: 850; }
.studio-fieldset legend span { color: #a9967e; font-size: 0.72rem; }
.studio-form-grid { display: grid; gap: 0.75rem; }
.studio-form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.studio-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.studio-editor label, .studio-dialog label, .studio-row label { display: grid; align-content: start; gap: 0.3rem; color: #e9ddca; font-size: 0.78rem; font-weight: 750; }
.studio-editor input, .studio-editor textarea, .studio-editor select, .studio-dialog input { width: 100%; min-width: 0; padding: 0.6rem 0.68rem; border: 1px solid #51341d; border-radius: 9px; outline: 0; color: var(--text); background: #0d0b09; font: inherit; font-weight: 500; }
.studio-editor textarea { resize: vertical; line-height: 1.4; }
.studio-editor input:focus, .studio-editor textarea:focus, .studio-editor select:focus, .studio-dialog input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 202, 10, 0.1); }
.studio-editor input[type="color"] { height: 42px; padding: 0.25rem; }
.studio-check { display: flex !important; align-items: center !important; grid-template-columns: auto 1fr; justify-content: start; }
.studio-check input { width: auto; accent-color: var(--brand-strong); }
.studio-check-box { min-height: 65px; align-self: end; }
.studio-counter { justify-self: end; margin-top: -1.35rem; color: #99866e; font-size: 0.7rem; font-weight: 500; }
.studio-help { margin: 0; color: #a9967e; font-size: 0.78rem; }
.studio-sticky-inline { display: grid; gap: 0.65rem; margin-top: 0.25rem; padding-top: 0.85rem; border-top: 1px solid rgba(255, 184, 49, 0.18); }
.studio-sticky-inline[hidden] { display: none; }
.studio-inline-action { align-self: end; min-height: 48px; }
.studio-inline-heading { color: var(--brand); font-size: 0.86rem; font-weight: 850; }
.studio-rows { display: grid; gap: 0.65rem; }
.studio-row { display: grid; align-items: end; gap: 0.5rem; padding: 0.65rem; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 10px; background: rgba(0, 0, 0, 0.15); }
.studio-field-row { grid-template-columns: minmax(100px, 0.7fr) minmax(160px, 1.3fr) auto 36px; }
.studio-button-row { display: grid; gap: 0.75rem; }
.studio-button-main { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); align-items: end; gap: 0.65rem; }
.studio-button-action { display: grid; grid-template-columns: minmax(150px, 0.7fr) minmax(180px, 1.3fr) auto auto; align-items: end; gap: 0.65rem; }
.studio-action-value[hidden], .studio-embed-settings[hidden], .studio-fieldset[hidden] { display: none !important; }
#timestamp-value-label[hidden], [data-button="reply-timestamp-label"][hidden] { display: none !important; }
.studio-button-order { display: flex; align-items: center; gap: 0.35rem; }
.studio-button-order [hidden] { display: none; }
.studio-button-reply { display: grid; gap: 0.65rem; padding: 0.8rem; border: 1px solid rgba(88, 101, 242, 0.28); border-radius: 9px; background: rgba(88, 101, 242, 0.055); transition: opacity 0.15s ease, border-color 0.15s ease; }
.studio-button-reply[hidden] { display: none; }
.studio-button-reply.is-disabled { border-color: rgba(255, 255, 255, 0.07); opacity: 0.58; background: rgba(255, 255, 255, 0.018); }
.studio-button-reply-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.35rem 0.8rem; }
.studio-button-reply-heading strong { color: #e9ddca; font-size: 0.82rem; }
.studio-button-reply-heading span { color: #a9967e; font-size: 0.72rem; }
.studio-button-reply-grid { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.35fr); gap: 0.65rem; }
.studio-button-reply-description { grid-column: 1 / -1; }
.studio-reply-fields-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.studio-reply-fields-heading strong { color: #e9ddca; font-size: 0.8rem; }
.studio-reply-fields-heading strong span { color: #a9967e; font-size: 0.7rem; }
.studio-reply-fields-heading .studio-button { min-height: 34px; padding: 0.35rem 0.65rem; font-size: 0.75rem; }
.studio-editor-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.7rem; }
.studio-editor-footer label.studio-button { display: inline-flex; align-content: normal; align-items: center; justify-content: center; font-size: inherit; line-height: normal; }
.studio-editor-footer .studio-actions > .studio-button { height: 44px; }
.emoji-input-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 0.35rem; }
.emoji-picker-button { display: grid; width: 40px; padding: 0; place-items: center; border: 1px solid #51341d; border-radius: 9px; color: var(--text); background: #21150d; font-size: 1.15rem; cursor: pointer; }
.emoji-categories { display: flex; gap: 0.35rem; padding: 0.4rem 0; overflow-x: auto; scrollbar-width: none; }
.emoji-categories::-webkit-scrollbar { display: none; }
.emoji-category { display: grid; min-width: 38px; height: 36px; place-items: center; border: 1px solid transparent; border-radius: 8px; color: var(--text); background: transparent; font-size: 1.05rem; cursor: pointer; }
.emoji-category:hover, .emoji-category.is-active { border-color: rgba(255, 202, 10, 0.5); background: rgba(255, 202, 10, 0.12); }
.studio-feature-toggle, .studio-autosave { padding: 0.55rem 0.7rem; border: 1px solid rgba(255, 184, 49, 0.16); border-radius: 10px; background: rgba(0, 0, 0, 0.12); }
.studio-add-embed { width: 100%; }
.studio-embed-settings { display: grid; gap: 0.75rem; }
.studio-required { color: #ffb6b8; font-size: 0.68rem; font-weight: 650; }
.studio-required-note { margin: 0; color: #a9967e; font-size: 0.72rem; }
.studio-required-note span { color: #ffb6b8; font-weight: 800; }
.studio-editor select option:disabled { color: #756b61; background: #17130f; }

.discord-message { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 0.65rem; color: #dbdee1; font-family: "gg sans", Arial, sans-serif; }
.studio-preview { max-height: calc(100vh - 102px); overflow: hidden; }
.studio-preview > .studio-panel-heading { margin-bottom: 0.75rem; }
.studio-preview > .discord-message { max-height: calc(100vh - 150px); padding-right: 0.35rem; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
.studio-preview > .discord-message::-webkit-scrollbar { width: 0; height: 0; }
.studio-page ~ .back-to-top { right: auto; left: 1.25rem; }
.discord-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.discord-author { margin-bottom: 0.25rem; color: #f2f3f5; font-weight: 700; }
.discord-author span { margin-left: 0.25rem; padding: 0.1rem 0.28rem; border-radius: 3px; color: #fff; background: #5865f2; font-size: 0.62rem; }
.discord-author small { margin-left: 0.3rem; color: #949ba4; font-weight: 400; }
.discord-silent-indicator { margin-left: 0.32rem; color: #949ba4; font-size: 0.78rem; vertical-align: -0.05em; }
.discord-silent-indicator[hidden] { display: none; }
.discord-content { margin-bottom: 0.35rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.discord-content a, .discord-embed a:not(.discord-embed-title) { color: #00a8fc; }
.discord-content code, .discord-embed code { padding: 0.08em 0.28em; border-radius: 3px; color: #dbdee1; background: #1e1f22; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.9em; }
.discord-spoiler { padding: 0 0.15em; border-radius: 3px; color: transparent; background: #1e1f22; cursor: pointer; }
.discord-spoiler:hover, .discord-spoiler:focus { color: inherit; background: #4e5058; outline: none; }
.discord-embed { position: relative; display: grid; max-width: 520px; grid-template-columns: minmax(0, 1fr) auto; padding: 0.8rem 0.8rem 0.65rem; overflow: hidden; border-left: 4px solid #5865f2; border-radius: 4px; background: #2b2d31; }
.discord-embed[hidden] { display: none; }
.discord-embed-body { min-width: 0; }
.discord-embed-title { display: block; margin: 0 0 0.4rem; color: #f2f3f5; font-size: 0.95rem; font-weight: 700; overflow-wrap: anywhere; text-decoration: none; }
.discord-embed .discord-embed-title.is-linked { color: #00a8fc; cursor: pointer; }
.discord-embed .discord-embed-title.is-linked:hover { color: #00a8fc; text-decoration: underline; }
.discord-embed p { margin: 0 0 0.6rem; color: #dbdee1; font-size: 0.82rem; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.discord-thumbnail { grid-column: 2; grid-row: 1; width: auto; height: auto; max-width: 80px; max-height: 80px; margin-left: 0.7rem; border-radius: 4px; object-fit: contain; }
.discord-fields { display: flex; flex-wrap: wrap; gap: 0 0.7rem; }
.discord-field { flex: 1 0 100%; min-width: 0; }
.discord-field.is-inline { flex: 1 0 60px; }
.discord-field strong { font-size: 0.77rem; }
.discord-field p { font-size: 0.77rem; }
.discord-image { display: block; width: auto; height: auto; max-width: 100%; margin-top: 0.55rem; border-radius: 4px; object-fit: contain; }
.discord-footer { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.65rem; color: #b5bac1; font-size: 0.68rem; font-weight: 650; }
.discord-footer img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.discord-footer img[hidden] { display: none; }
.discord-buttons { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.5rem; }
.discord-reply-previews { display: grid; gap: 0.75rem; margin-top: 1rem; }
.discord-reply-previews[hidden] { display: none; }
.discord-reply-preview { display: grid; gap: 0.35rem; }
.discord-reply-preview-heading { color: #b5bac1; font-size: 0.7rem; font-weight: 650; }
.discord-reply-embed { width: 100%; box-sizing: border-box; }
.discord-button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.35rem 0.75rem; border: 0; border-radius: 3px; color: #fff; font: inherit; font-size: 0.78rem; font-weight: 600; opacity: 1; }
.discord-button-link-icon { font-size: 0.9em; line-height: 1; }
.discord-button.is-disabled { opacity: 0.5; }
.discord-button.is-blue { background: #5865f2; }.discord-button.is-grey,.discord-button.is-gray,.discord-button.is-secondary { background: #4e5058; }.discord-button.is-green { background: #248046; }.discord-button.is-red { background: #da373c; }.discord-button.is-link { background: #4e5058; }
.studio-dialog { width: min(calc(100% - 2rem), 480px); padding: 0; border: 0; color: var(--text); background: transparent; }
.studio-dialog::backdrop { background: rgba(0, 0, 0, 0.76); backdrop-filter: blur(5px); }
.studio-dialog > form, .studio-dialog > .emoji-dialog-card { position: relative; display: grid; gap: 1rem; padding: 1.5rem; }
.studio-dialog h2 { margin: 0; }.studio-dialog p { margin: 0; }.studio-dialog-close { position: absolute; top: 0.7rem; right: 0.7rem; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.emoji-dialog { width: min(calc(100% - 2rem), 560px); }
.emoji-dialog-card { border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(155deg, rgba(37, 23, 12, 0.99), rgba(17, 13, 10, 0.99)); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.35rem; max-height: 320px; overflow: auto; }
.emoji-choice { display: grid; min-height: 44px; place-items: center; border: 1px solid rgba(255, 184, 49, 0.12); border-radius: 8px; color: var(--text); background: rgba(255, 255, 255, 0.035); font-size: 1.35rem; cursor: pointer; }
.emoji-choice:hover, .emoji-choice:focus-visible { border-color: var(--brand); background: rgba(255, 184, 49, 0.12); }

@media (max-width: 1180px) {
  .studio-workspace { grid-template-columns: 220px minmax(480px, 1fr); }
  .studio-workspace.is-library-collapsed { grid-template-columns: 76px minmax(480px, 1fr); }
  .studio-preview { position: static; grid-column: 1 / -1; max-height: none; }
  .studio-preview > .discord-message { max-height: 70vh; }
}
@media (max-width: 780px) {
  .studio-page { width: min(calc(100% - 1rem), 1480px); padding-top: 2rem; }
  .studio-hero { align-items: stretch; flex-direction: column; }.studio-connection { justify-content: space-between; }
  .studio-workspace { display: block; }.studio-library, .studio-editor, .studio-preview { position: static; margin-bottom: 0.8rem; }
  .studio-message-list { max-height: 220px; }.studio-form-grid.two,.studio-form-grid.three { grid-template-columns: 1fr; }
  .studio-field-row { grid-template-columns: 1fr 1fr; }.studio-field-row .studio-icon-button,.studio-button-action .studio-icon-button { justify-self: end; }
  .studio-button-main { grid-template-columns: 1fr 1fr; }
  .studio-button-action { grid-template-columns: 1fr 1fr auto auto; }
  .studio-page ~ .back-to-top { display: none; }
}
@media (max-width: 480px) {
  .studio-panel-heading { align-items: flex-start; flex-direction: column; }.studio-panel-heading > .studio-icon-button { position: absolute; align-self: end; }
  .studio-field-row,.studio-button-main,.studio-button-action,.studio-button-reply-grid { grid-template-columns: 1fr; }.studio-editor-footer { align-items: stretch; flex-direction: column; }
  .studio-button-action .studio-icon-button { justify-self: end; }
  .studio-button-reply-description { grid-column: auto; }
  .emoji-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.message-studio-body .mode-banner { color: #c8bb9b; border-color: rgba(255, 184, 49, 0.12); background: #14120e; }
.message-studio-page { width: min(calc(100% - 2rem), var(--content)); max-width: 1280px; }
.message-studio-page .studio-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.message-studio-page .studio-hero .lede { max-width: 760px; color: var(--muted); font-size: 1rem; }
.message-studio-page .eyebrow { color: #c5b590; }
.message-studio-page .studio-library, .message-studio-page .studio-editor, .message-studio-page .studio-preview, .message-studio-page .emoji-dialog-card { border-color: rgba(255, 184, 49, 0.16); border-radius: 14px; background: rgba(24, 18, 11, 0.82); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2); }
.message-studio-page .studio-fieldset { border-color: rgba(255, 250, 240, 0.1); border-radius: 10px; }
.message-studio-page .studio-fieldset legend, .message-studio-page .studio-inline-heading { color: var(--muted); font-weight: 700; }
.message-studio-page .studio-editor label, .message-studio-page .studio-dialog label, .message-studio-page .studio-row label { color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.message-studio-page .studio-editor label.studio-icon-button { font-size: 1rem; }
.message-studio-page .studio-panel-heading h2 { font-size: 1.2rem; }
.message-studio-page .studio-editor input, .message-studio-page .studio-editor textarea, .message-studio-page .studio-editor select, .message-studio-page .studio-dialog input { border-color: #ffffff30; border-radius: 6px; background: #17130d; }
.message-studio-page .studio-editor input:focus, .message-studio-page .studio-editor textarea:focus, .message-studio-page .studio-editor select:focus, .message-studio-page .studio-dialog input:focus { border-color: var(--brand); }
.message-studio-page .studio-check input { accent-color: var(--brand); }
.message-studio-page .studio-sticky-inline { border-top-color: rgba(255, 250, 240, 0.1); }
.message-studio-page .studio-button.secondary, .message-studio-page .studio-icon-button.secondary { color: var(--muted); border-color: rgba(255, 250, 240, 0.16); background: #1b1711; }
.message-studio-page .studio-button.secondary:hover, .message-studio-page .studio-icon-button.secondary:hover { color: var(--text); border-color: rgba(255, 250, 240, 0.3); background: #231e17; }
.message-studio-page .embed-mode-actions .studio-button.is-active { color: #efdab0; border-color: rgba(255, 202, 10, 0.3); background: rgba(255, 202, 10, 0.08); }
.message-studio-page .studio-tabs button { color: var(--muted); border-color: rgba(255, 250, 240, 0.16); background: #1b1711; }
.message-studio-page .studio-tabs button.is-active { color: #efdab0; border-color: rgba(255, 202, 10, 0.3); background: rgba(255, 202, 10, 0.08); }
.message-studio-page .studio-message-item:not(.is-locked):hover { border-color: rgba(255, 250, 240, 0.22); background: rgba(255, 250, 240, 0.04); }
.message-studio-page .studio-message-item.is-selected { border-color: rgba(255, 202, 10, 0.3); background: rgba(255, 202, 10, 0.04); }
.message-studio-page .studio-button-reply { border-color: rgba(255, 250, 240, 0.12); background: rgba(255, 250, 240, 0.02); }
.message-studio-page .emoji-picker-button { border-color: #ffffff30; background: #17130d; }
.message-studio-workspace, .message-studio-workspace.is-library-collapsed { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-areas: "editor sidebar"; }
.message-studio-sidebar { grid-area: sidebar; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 1rem; position: sticky; top: 86px; min-width: 0; max-height: calc(100vh - 102px); overflow-y: auto; scrollbar-width: thin; }
.message-studio-sidebar > .studio-library, .message-studio-workspace.is-library-collapsed .message-studio-sidebar > .studio-library { position: static; padding: 0.8rem 1.2rem; }
.message-studio-workspace > .studio-editor { grid-area: editor; min-width: 0; container: message-editor / inline-size; }
.message-studio-workspace .studio-fieldset, .message-studio-workspace .studio-editor label, .message-studio-sidebar .discord-message-body { min-width: 0; }
.message-studio-sidebar > .studio-preview { position: static; max-height: none; overflow: visible; }
.message-studio-sidebar > .studio-preview > .discord-message { max-height: none; }
.message-studio-sidebar .discord-message:has(> .discord-avatar[hidden]) { grid-template-columns: minmax(0, 1fr); }
.message-studio-workspace .studio-library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.message-studio-workspace .studio-tabs, .message-studio-workspace.is-library-collapsed .studio-tabs { display: flex; gap: 0.55rem; margin: 0; padding: 0; background: transparent; }
.message-studio-workspace .studio-tabs button { width: 36px; height: 36px; padding: 0; font-size: 1rem; }
.message-studio-workspace .studio-tabs .bi, .message-studio-workspace .studio-tabs .bi::before { display: block; line-height: 1; vertical-align: 0; }
.message-studio-workspace .studio-message-list { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); max-height: 180px; margin-top: 0.65rem; }
.message-studio-workspace .studio-message-list:empty { margin-top: 0; }
.message-studio-workspace .studio-empty { margin-top: 0.4rem; font-size: 1.1rem; }
.message-studio-workspace.is-library-collapsed #message-library-content { display: none; }
.message-studio-page .message-editor-heading { flex-direction: column; align-items: flex-start; }
.message-studio-page .message-template-actions { display: flex; width: 100%; align-items: center; justify-content: space-between; flex-direction: row; flex-wrap: wrap; gap: 0.65rem; }
.message-template-actions > .studio-actions { flex-wrap: nowrap; }
.message-template-save { margin-left: auto; }
.message-studio-page .studio-icon-button { font-size: 1rem; line-height: 1; }
.message-studio-page .studio-icon-button[hidden], .message-studio-page .studio-empty[hidden] { display: none; }
.message-studio-page .message-autosave-icon { position: relative; }
.message-studio-page .message-autosave-icon input { width: 1px; padding: 0; }
.message-studio-page .message-autosave-icon:has(input:checked) { color: #efdab0; border-color: rgba(255, 202, 10, 0.3); background: rgba(255, 202, 10, 0.08); }
.message-studio-page .studio-icon-button:focus-visible, .message-studio-page .message-autosave-icon:focus-within, .message-studio-workspace .studio-tabs button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.message-studio-page .studio-icon-button:disabled { opacity: 0.45; cursor: not-allowed; }
.message-studio-page ~ .back-to-top { right: 1.25rem; left: auto; }
@container message-editor (max-width: 600px) {
  .studio-field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-field-row .studio-icon-button { justify-self: end; }
  .studio-button-main, .studio-button-action, .studio-button-reply-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-button-order { justify-self: end; }
  .studio-form-grid.three { grid-template-columns: minmax(0, 1fr); }
}
@container message-editor (max-width: 400px) {
  .studio-form-grid.two, .studio-field-row, .studio-button-main, .studio-button-action, .studio-button-reply-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-button-reply-description { grid-column: auto; }
  .studio-link-input { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
  .message-studio-workspace, .message-studio-workspace.is-library-collapsed { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "sidebar" "editor"; gap: 0.8rem; }
  .message-studio-sidebar { position: static; max-height: none; overflow: visible; gap: 0.8rem; }
  .message-studio-sidebar > .studio-library, .message-studio-workspace > .studio-editor, .message-studio-sidebar > .studio-preview { margin-bottom: 0; }
}
@media (max-width: 760px) {
  .message-studio-page { width: min(calc(100% - 1.5rem), var(--content)); }
}
.data-loading { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem 1.1rem; border: 1px solid rgba(255, 184, 49, 0.35); border-radius: 12px; background: #211a10; color: #fff8eb; box-shadow: 0 4px 20px #0006; font-size: 0.9rem; pointer-events: none; }
.data-loading[hidden] { display: none; }
.data-loading::before { content: ""; width: 1rem; height: 1rem; border: 2px solid #ffffff30; border-top-color: #ffca0a; border-radius: 50%; animation: data-spin 0.8s linear infinite; }
.team-status .bi-arrow-repeat, .leaderboard-status .bi-arrow-repeat { display: inline-block; animation: data-spin 0.8s linear infinite; }
@keyframes data-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .data-loading::before, .team-status .bi-arrow-repeat, .leaderboard-status .bi-arrow-repeat { animation: none; } }
.giveaway-page { max-width: 1280px; }
.giveaway-sign-in { max-width: 520px; margin: clamp(0rem, 1svh, 1rem) auto; padding: clamp(1.25rem, 3svh, 3.5rem) clamp(1.25rem, 4vw, 3rem); text-align: center; border: 1px solid rgba(255, 202, 10, 0.18); border-radius: 24px; background: radial-gradient(ellipse at 50% 0%, rgba(255, 186, 0, 0.09), transparent 65%), #14110d; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25); }
.giveaway-sign-in[hidden] { display: none; }
.giveaway-sign-in-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto clamp(0.75rem, 2svh, 1.75rem); border: 1px solid rgba(255, 202, 10, 0.25); border-radius: 20px; background: rgba(255, 202, 10, 0.08); color: var(--brand); font-size: 1.8rem; }
.giveaway-page .giveaway-sign-in h1 { margin: 0.65rem 0 1rem; font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.15; letter-spacing: -0.035em; }
.giveaway-sign-in-description { margin: 0; font-size: 1rem; line-height: 1.75; }
.giveaway-page .giveaway-sign-in-button { display: flex; align-items: center; justify-content: center; gap: 0.7rem; width: 100%; min-height: 52px; margin: clamp(1rem, 3svh, 2rem) 0 clamp(0.65rem, 1.5svh, 1.1rem); padding: 0.85rem 1rem; border-radius: 12px; font-size: 0.95rem; text-decoration: none; }
.giveaway-sign-in-button .bi-arrow-right { margin-left: auto; }
.giveaway-sign-in-button:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.giveaway-sign-in-note { display: flex; align-items: center; justify-content: center; gap: 0.45rem; margin: 0; color: var(--muted); font-size: 0.75rem; }
.giveaway-page h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.giveaway-page h2 { margin: 0; font-size: 1.2rem; }
.giveaway-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; margin: 1rem 0; align-items: start; }
.giveaway-sidebar { display: grid; gap: 1rem; min-width: 0; }
.giveaway-sidebar > section, .giveaway-sidebar > aside { min-width: 0; margin: 0; }
.giveaway-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 0.8rem; align-items: start; }
.giveaway-fields > label { align-content: start; min-width: 0; }
.giveaway-fields > [data-field="extra_entries"] { grid-column: 1 / -1; }
.giveaway-fields > [data-field="title"], .giveaway-timing-row { grid-column: 1 / -1; }
.giveaway-fields > [data-field="blacklisted_roles"] { grid-column: 1; }
.giveaway-timing-row { display: grid; gap: 0.5rem 0.8rem; align-items: start; min-width: 0; }
.giveaway-start-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.giveaway-end-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(4.5rem, 0.45fr); }
.giveaway-timing-row > label { min-width: 0; align-content: start; }
.giveaway-timing-row > small { grid-column: 1 / -1; color: var(--muted); font-size: 0.72rem; font-weight: 400; line-height: 1.5; }
#giveaway-form { container-type: inline-size; }
@container (max-width: 540px) {
  .giveaway-end-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .giveaway-end-row > [data-field="winner_count"] { grid-column: 1 / -1; }
}
@container (max-width: 400px) {
  .giveaway-fields, .giveaway-start-row, .giveaway-end-row { grid-template-columns: minmax(0, 1fr); }
}
.giveaway-fields > [data-field="extra_entries"] .giveaway-selected-roles { grid-template-columns: minmax(0, 1fr); }
.giveaway-fields > [data-field="extra_entries"] .giveaway-selected-role { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; }
.giveaway-page label.giveaway-entry-count { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.giveaway-fields > [data-field="extra_entries"] .giveaway-selected-role .giveaway-entry-count input { width: 58px; }
.giveaway-fields > [data-field="extra_entries"] .giveaway-selected-role input { width: 100%; height: 36px; box-sizing: border-box; padding: 0.3rem 0.4rem; }
.giveaway-fields > [data-field="extra_entries"] .giveaway-selected-role .studio-button { min-height: 36px; padding: 0.3rem 0.5rem; }
.giveaway-preview [hidden] { display: none !important; }
#giveaway-preview-status { display: flex; flex-wrap: wrap; gap: 0.6rem; font-size: 0.85rem; }
.giveaway-fields .giveaway-selected-roles { max-height: 240px; overflow-y: auto; }
.giveaway-role-picker { display: grid; align-content: start; gap: 0.4rem; min-width: 0; font-size: 0.8rem; color: var(--muted); }
.giveaway-selected-roles { display: grid; gap: 0.4rem; }
.giveaway-selected-role { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.5rem; border: 1px solid #ffffff20; border-radius: 6px; }
.giveaway-selected-role > span { flex: 1; overflow-wrap: anywhere; min-width: 0; }
.giveaway-selected-role input { width: 5rem; }
.giveaway-selected-role .studio-button { padding: 0.35rem 0.5rem; }
.giveaway-page label { display: grid; gap: 0.3rem; font-size: 0.8rem; color: var(--muted); }
.giveaway-page input, .giveaway-page textarea, .giveaway-page select { min-width: 0; max-width: 100%; padding: 0.5rem; color: var(--text); background: #17130d; border: 1px solid #ffffff30; border-radius: 6px; font: inherit; }
.giveaway-page label.has-error { color: #ffb7b8; }
.giveaway-page input.is-invalid, .giveaway-page textarea.is-invalid, .giveaway-page select.is-invalid { border-color: #ed4245; box-shadow: 0 0 0 3px rgba(237, 66, 69, 0.12); }
.giveaway-field-error { color: #ffb7b8; font-size: 0.72rem; line-height: 1.35; }
.giveaway-page input[type="checkbox"] { justify-self: start; }
.giveaway-color-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.giveaway-color-controls { display: flex; align-items: center; gap: 0.7rem; }
.giveaway-color-controls input[type="color"] { width: 60px; height: 40px; padding: 0.2rem; cursor: pointer; }
.giveaway-color-value { font-family: monospace; font-size: 0.8rem; }
.giveaway-page .giveaway-color-default { display: flex; align-items: center; gap: 0.4rem; }
@container (max-width: 320px) {
  .giveaway-color-controls { gap: 0.4rem; }
  .giveaway-color-controls input[type="color"] { width: 44px; flex-shrink: 0; }
  .giveaway-color-value { font-size: 0.7rem; }
  .giveaway-page .giveaway-color-default { gap: 0.25rem; font-size: 0.68rem; }
}
.giveaway-message-fields { grid-column: 1 / -1; display: grid; gap: 0.45rem; min-width: 0; }
.giveaway-message-field { min-width: 0; }
.giveaway-message-button { display: grid; grid-template-columns: 10rem minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; width: 100%; padding: 0.7rem 0.8rem; border: 1px solid #ffffff30; border-radius: 6px; color: var(--text); background: #17130d; text-align: left; font: inherit; font-size: 0.8rem; cursor: pointer; }
.giveaway-message-summary { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.giveaway-message-button:hover { border-color: var(--brand); }
.giveaway-message-button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.giveaway-page .giveaway-dm-toggle { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.5rem; }
.giveaway-message-dialog { width: min(calc(100% - 2rem), 640px); max-height: calc(100dvh - 2rem); }
.giveaway-message-dialog-card { display: grid; gap: 0.8rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(155deg, #25170c, #110d0a); }
.giveaway-message-dialog h2 { padding-right: 1.5rem; }
.giveaway-message-dialog p, #giveaway-message-count { color: var(--muted); font-size: 0.8rem; }
#giveaway-message-text { width: 100%; box-sizing: border-box; min-height: 180px; max-height: 50dvh; resize: vertical; }
#giveaway-message-count { text-align: right; }
@media (max-width: 480px) { .giveaway-message-button { grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem 0.75rem; } .giveaway-message-summary { grid-row: 2; } .giveaway-message-button > i { grid-column: 2; grid-row: 1 / 3; } .giveaway-message-dialog-card { padding: 1rem; } }
.giveaway-page input[type="datetime-local"] { color-scheme: dark; width: 100%; }
.giveaway-page > div > section { margin-top: 1rem; }
.giveaway-page .studio-button { font-size: 0.8rem; }
.giveaway-page label.studio-icon-button { display: grid; align-content: center; justify-content: center; color: var(--text); }
.giveaway-toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 1000; width: min(560px, calc(100% - 2rem)); box-sizing: border-box; margin: 0; display: flex; align-items: start; gap: 1rem; box-shadow: 0 12px 36px #0009; overflow-wrap: anywhere; }
.giveaway-toast[hidden] { display: none; }
.giveaway-toast > div { flex: 1; min-width: 0; }
.giveaway-toast a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.giveaway-toast-close { flex: none; border: 0; background: transparent; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0.2rem; }
.giveaway-page .studio-panel-heading { flex-direction: column; align-items: flex-start; }
.giveaway-page .studio-panel-heading > .studio-header-actions { align-self: flex-start; justify-content: flex-start; }
.giveaway-page .studio-panel-heading > .giveaway-template-actions { width: 100%; justify-content: space-between; }
.giveaway-template-actions > .studio-actions { flex-wrap: nowrap; }
.giveaway-template-save { margin-left: auto; }
.giveaway-template-actions .studio-icon-button { font-size: 1rem; line-height: 1; }
.giveaway-page .giveaway-autosave-icon { position: relative; }
.giveaway-page .giveaway-autosave-icon input { width: 1px; padding: 0; }
.giveaway-page .giveaway-autosave-icon:has(input:checked) { color: #120c05; border-color: var(--brand); background: var(--brand); }
.giveaway-template-actions .studio-icon-button:focus-visible, .giveaway-page .giveaway-autosave-icon:focus-within { outline: 2px solid var(--brand); outline-offset: 3px; }
#giveaway-end { color: #ffb7b8; border-color: #ed4245; }
#giveaway-end[hidden] { display: none; }
#giveaway-cancel[hidden] { display: none; }
#giveaway-status:not(:empty) { padding: 0.8rem; border: 1px solid var(--brand); border-radius: 8px; }
#giveaway-bot { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; }
#giveaway-bot img { border-radius: 50%; }
#giveaway-preview-embed { display: flex; flex-direction: column; gap: 0.75rem; background: #2b2d31; padding: 1rem; border-left: 4px solid var(--brand); border-radius: 5px; overflow-wrap: anywhere; }
#giveaway-preview-buttons { gap: 0.5rem; margin-top: -0.5rem; }
#giveaway-preview-buttons .discord-button { border-radius: 6px; opacity: 1; cursor: default; }
#giveaway-preview-buttons .discord-button.is-secondary { background: #1e1f22; color: #dbdee1; }
#giveaway-preview-buttons .giveaway-preview-button-emoji { font-size: 1rem; line-height: 1; }
.giveaway-embed-body { display: flex; align-items: flex-start; gap: 1rem; }
.giveaway-embed-content { flex: 1; min-width: 0; }
.giveaway-embed-content h3 { margin: 0; }
#giveaway-preview-embed .giveaway-embed-content p { margin: 0.5rem 0 0; }
.giveaway-page .giveaway-editor-sections { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.giveaway-editor-section { display: grid; gap: 0.8rem; min-width: 0; margin: 0; padding: 1rem; border: 1px solid rgba(255, 250, 240, 0.1); border-radius: 10px; }
.giveaway-section-heading { width: 100%; display: flex; align-items: center; gap: 0.5rem; }
.giveaway-section-heading .studio-icon-button { margin-left: auto; }
.giveaway-section-heading > span { color: var(--muted); font-size: 0.86rem; font-weight: 700; }
.giveaway-section-fields[hidden] { display: none; }
.giveaway-section-heading h3 { margin: 0; font-size: 1rem; }
.giveaway-section-heading .studio-icon-button:focus-visible, .giveaway-page #giveaway-drafts-minimize:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.giveaway-page #giveaway-drafts[hidden] { display: none; }
.giveaway-overview { container-type: inline-size; }
.giveaway-overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-width: 0; }
.giveaway-overview-heading h2 { flex: 0 0 auto; }
.giveaway-overview-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 0 1 auto; min-width: 0; gap: 0.35rem; padding: 0.25rem; border: 1px solid #ffffff20; border-radius: 10px; background: #17130d; }
.giveaway-overview-switch button { display: flex; align-items: center; justify-content: center; gap: 0.3rem; min-width: 0; padding: 0.5rem 0.65rem; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 0.8rem; white-space: nowrap; cursor: pointer; }
.giveaway-overview-switch .bi { flex: 0 0 auto; font-size: 0.9em; }
@container (max-width: 340px) {
  .giveaway-overview-heading { gap: 0.4rem; }
  .giveaway-overview-heading h2 { font-size: 1rem; }
  .giveaway-overview-switch { gap: 0.15rem; padding: 0.15rem; }
  .giveaway-overview-switch button { gap: 0.2rem; padding: 0.4rem 0.3rem; font-size: 0.68rem; }
}
.giveaway-overview-switch button[aria-selected="true"] { color: var(--text); border-color: rgba(255, 184, 49, 0.25); background: #21150d; }
.giveaway-overview-switch button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.giveaway-overview-panel { display: grid; gap: 0.7rem; min-width: 0; }
.giveaway-overview-panel[hidden] { display: none; }
.giveaway-overview .giveaway-list-heading h3 { margin: 0; font-size: 1rem; }
#giveaway-drafts .giveaway-ongoing-actions .studio-icon-button { margin: 0; }
.giveaway-role-mention { display: inline; padding: 0.05rem 0.25rem; border: 0; border-radius: 3px; color: #c9cdfb; background: rgba(88, 101, 242, 0.3); font: inherit; cursor: pointer; vertical-align: baseline; }
.giveaway-role-mention:hover { background: rgba(88, 101, 242, 0.5); }
.giveaway-role-mention:focus-visible { outline: 2px solid #b7bfff; outline-offset: 2px; }
#giveaway-preview-embed p, #giveaway-preview-messages p { white-space: pre-wrap; font-size: 0.85rem; }
.giveaway-image { max-width: 100%; max-height: 260px; object-fit: contain; }
.giveaway-thumbnail { flex-shrink: 0; width: 70px; height: 70px; object-fit: contain; }
.giveaway-list-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.5rem; }
.giveaway-list-heading h2 { margin: 0; }
.giveaway-list { display: grid; gap: 0.6rem; }
.giveaway-list[hidden] { display: none; }
.giveaway-fields [hidden] { display: none !important; }
.giveaway-list .giveaway-ongoing-row { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.65rem; border: 1px solid #ffffff20; border-left: 3px solid #ffffff20; border-radius: 8px; }
.giveaway-ongoing-thumbnail { width: 48px; height: 48px; flex: 0 0 48px; object-fit: contain; border-radius: 5px; }
.giveaway-ongoing-content { min-width: 0; flex: 1; }
.giveaway-ongoing-content > strong { display: block; font-size: 0.9rem; line-height: 1.3; overflow-wrap: anywhere; }
.giveaway-ongoing-content .giveaway-ongoing-meta { margin: 0.2rem 0 0; font-size: 0.75rem; line-height: 1.4; }
.giveaway-ongoing-content > time { display: block; color: var(--muted); font-size: 0.75rem; line-height: 1.4; }
.giveaway-ongoing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.45rem; }
.giveaway-list .giveaway-ongoing-actions .studio-button { min-height: 32px; margin: 0; padding: 0.25rem 0.5rem; font-size: 0.7rem; }
.giveaway-list .giveaway-ongoing-actions { flex-wrap: nowrap; gap: 0.2rem; }
.giveaway-list .giveaway-ongoing-actions .studio-icon-button { width: 32px; height: 32px; min-width: 24px; flex: 0 1 32px; margin: 0; font-size: 0.9rem; text-decoration: none; }
.giveaway-list .giveaway-ongoing-actions .studio-icon-button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.giveaway-list .giveaway-ongoing-actions .studio-icon-button:disabled { opacity: 0.45; cursor: not-allowed; }
.giveaway-ongoing-actions > a { font-size: 0.75rem; margin-right: 0.15rem; }
#giveaway-drafts button { margin: 0.3rem; }
@media(max-width: 800px) { .giveaway-layout { grid-template-columns: 1fr; } .giveaway-layout > .giveaway-sidebar { grid-row: 1; } }
@media(max-width: 480px) { .giveaway-fields { grid-template-columns: 1fr; } }

/* Keep the studio layout visible while each section loads. */
.giveaway-skeleton { height: 4rem; border-radius: 8px; background: linear-gradient(100deg, #ffffff08 20%, #ffffff18 45%, #ffffff08 70%); background-size: 220% 100%; animation: giveaway-loading 1.6s ease-in-out infinite; }
.giveaway-skeleton-field { height: 4.5rem; }
.giveaway-loading-copy { color: var(--muted); font-size: 0.85rem; }
#giveaway-form[inert] .studio-actions, .giveaway-preview[inert] select { opacity: 0.45; }
@keyframes giveaway-loading { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .giveaway-skeleton { animation: none; } }
.date-time-controls { position: relative; display: grid; min-width: 0; }
.date-time-controls[hidden], .date-time-picker[hidden] { display: none !important; }
.date-time-controls > input[data-date-time] { width: 100%; padding-right: 2.5rem; box-sizing: border-box; }
.date-time-trigger { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: .3rem; color: var(--muted); background: transparent; font: inherit; cursor: pointer; }
.date-time-trigger:hover, .date-time-trigger[aria-expanded="true"] { color: var(--brand); background: #ffca0a12; }
.date-time-trigger:disabled { opacity: .5; cursor: default; }
.date-time-trigger:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.date-time-picker { position: fixed; inset: auto; z-index: 1100; display: grid; gap: .75rem; width: min(22rem, calc(100vw - 1rem)); max-height: calc(100dvh - 1rem); overflow: auto; margin: 0; box-sizing: border-box; padding: .75rem; border: 1px solid var(--border, #4e3b1d); border-radius: .75rem; color: var(--text); background: var(--surface, #17120d); box-shadow: 0 12px 36px #0009; font-size: .8rem; }
.date-time-picker[popover]:not(:popover-open) { display: none !important; }
.date-time-picker label { display: grid; gap: .3rem; color: var(--muted); }
.date-time-picker input { width: 100%; min-width: 0; padding: .5rem; border: 1px solid #ffffff30; border-radius: 6px; color: var(--text); background: #17130d; font: inherit; }
.date-time-calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.date-time-calendar-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .5rem; }
.date-time-calendar-footer input { height: 3rem; box-sizing: border-box; }
.date-time-calendar-actions { display: flex; align-items: center; justify-content: flex-end; gap: .25rem; }
.date-time-picker .date-time-calendar-actions button { display: grid; place-items: center; gap: .15rem; min-width: 2.5rem; min-height: 3rem; padding: .3rem .2rem; font: inherit; line-height: 1.15; }

.date-time-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .2rem; text-align: center; }
.date-time-calendar-grid span { font-size: .8rem; }
.date-time-picker button { min-height: 2.5rem; border: 1px solid var(--border, #4e3b1d); border-radius: .4rem; background: #23190e; color: inherit; cursor: pointer; }
.date-time-calendar-heading button { padding: .4rem .6rem; }
.date-time-picker button:hover, .date-time-picker button[aria-pressed="true"] { border-color: #f6c744; background: #624616; }
.date-time-picker button:focus-visible { outline: 2px solid #f6c744; outline-offset: 2px; }

.staff-hub-page .staff-hub-hero { margin-bottom: clamp(1rem, 2svh, 2rem); }
.staff-hub-page .staff-hub-hero .lede { margin-bottom: 0; }
.staff-hub-page #staff-hub-grid .card { height: 100%; }
@media (min-width: 801px) and (max-height: 900px) {
  .staff-hub-page #staff-hub-grid .card { min-height: 180px; }
}
@media (min-width: 801px) and (max-height: 800px) {
  .staff-hub-page #staff-hub-grid { gap: 0.75rem; }
  .staff-hub-page #staff-hub-grid .card { min-height: 148px; padding: 0.875rem; }
  .staff-hub-page #staff-hub-grid .card p { margin-top: 0.5rem; }
  .staff-hub-page #staff-hub-grid .card-action { margin-top: 0.5rem; }
}
@media (max-width: 800px) and (max-height: 667px) {
  .staff-hub-page .staff-hub-hero { margin-bottom: 0.75rem; }
  .staff-hub-page .staff-hub-hero h1 { margin: 0.4rem 0 0.7rem; }
  .staff-hub-page #staff-hub-grid .card { min-height: 48px; padding-block: 0.4rem; }
}

/* Administrator action filters and read-only giveaway previews. */
.recent-actions-selects { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin-bottom: .5rem; }
.recent-actions-selects > label { display: grid; flex: 1 1 220px; min-width: 0; max-width: 430px; gap: .35rem; font-size: .85rem; }
.recent-actions-selects select { width: 100%; min-width: 0; padding: .55rem .65rem; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--field, var(--bg)); font: inherit; }
.recent-actions-selects > label[hidden], .recent-action-preview-dialog [hidden] { display: none; }
.recent-actions-filter-hint, .recent-actions-count, .recent-action-state { color: var(--muted); font-size: .75rem; }
.recent-actions-filter-hint { margin: .5rem 0; }
.recent-actions-count { margin: .5rem 0 1rem; }
.recent-action-state { margin: .35rem 0 0; }
.recent-action-preview-open { margin-top: .75rem; margin-right: .75rem; }
.recent-action-card > header { flex-wrap: wrap; }
.recent-action-card h2 { overflow-wrap: anywhere; }
.recent-action-preview-dialog { width: min(680px, calc(100vw - 2rem)); max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem); box-sizing: border-box; overflow-y: auto; padding: 1rem; border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: var(--surface); }
.recent-action-preview-dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.recent-action-preview-dialog > header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.recent-action-preview-dialog h2 { margin: .2rem 0 0; font-size: 1.25rem; }
.recent-action-preview-dialog .studio-icon-button { flex-shrink: 0; }
.recent-action-preview-notice, .recent-action-preview-hint { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.recent-action-preview-bot { display: flex; gap: .5rem; align-items: center; margin: 1rem 0 .65rem; }
.recent-action-preview-bot img { border-radius: 50%; }
.recent-action-preview-bot .discord-bot-tag { padding: .05rem .25rem; border-radius: 3px; color: #fff; background: #5865f2; font-size: .65rem; font-weight: 700; }
.recent-action-preview-embed { display: flex; flex-direction: column; gap: .75rem; padding: .85rem; border-left: 4px solid #5865f2; border-radius: 5px; background: #2b2d31; overflow-wrap: anywhere; }
.recent-action-preview-embed h3 { font-size: 1rem; }
.recent-action-preview-embed p, #action-preview-messages p { margin: .5rem 0 0; white-space: pre-wrap; font-size: .85rem; }
.recent-action-preview-embed small { color: #b5bac1; font-size: .7rem; }
.recent-action-preview-mention { border-radius: 3px; color: #c9cdfb; background: rgba(88, 101, 242, .3); }
#action-preview-buttons { gap: .5rem; margin-top: .5rem; }
#action-preview-buttons .discord-button { opacity: 1; cursor: default; border-radius: 6px; }
#action-preview-buttons .is-secondary { color: #dbdee1; background: #1e1f22; }
#action-preview-messages { display: grid; gap: .5rem; }
#action-preview-messages details { min-width: 0; }
#action-preview-messages summary { font-size: .85rem; }
@media (max-width: 420px) {
  .recent-action-preview-dialog { padding: .75rem; }
  .recent-action-preview-dialog .giveaway-embed-body { gap: .5rem; }
  .recent-action-preview-dialog .giveaway-thumbnail { width: 48px; height: 48px; }
}

/* Message Studio Discord text preview. */
.message-studio-page .discord-preview-line { display: block; white-space: normal; overflow-wrap: anywhere; }
.message-studio-page .discord-preview-h1 { font-size: 1.5em; font-weight: 700; line-height: 1.3; }
.message-studio-page .discord-preview-h2 { font-size: 1.25em; font-weight: 700; line-height: 1.3; }
.message-studio-page .discord-preview-h3 { font-size: 1.1em; font-weight: 700; line-height: 1.3; }
.message-studio-page .discord-preview-subtext { font-size: .8em; color: #b5bac1; }
.message-studio-page .discord-preview-list { padding-left: 1.3em; position: relative; }
.message-studio-page .discord-preview-marker { position: absolute; left: 0; }
.message-studio-page .discord-preview-emoji { display: inline-block; width: 1.375em; height: 1.375em; object-fit: contain; vertical-align: -.3em; }
.message-studio-page .discord-preview-timestamp { background: rgba(255,255,255,.1); border-radius: 3px; padding: 0 2px; }
.message-studio-page .studio-channel-state { display: grid; gap: .45rem; }
.message-studio-page .studio-channel-state[hidden] { display: none; }
.message-studio-page .discord-preview-line a { color: #00a8fc; text-decoration: none; }
.message-studio-page .discord-preview-line a:hover { text-decoration: underline; }

.message-studio-page .studio-channel-send-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .65rem; }
.message-studio-page .studio-channel-send-row label { min-width: 0; }
.message-studio-page .studio-channel-send-row .studio-button { white-space: nowrap; }
@media (max-width: 480px) { .message-studio-page .studio-channel-send-row { gap: .45rem; } .message-studio-page .studio-channel-send-row .studio-button { padding: .5rem .55rem; font-size: .8rem; } }

.message-studio-page .studio-emoji-warning { margin: .65rem 0 1rem; padding: .5rem .65rem; border-left: 2px solid var(--brand); color: var(--muted); font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.message-studio-page .studio-emoji-warning[hidden] { display: none; }

.recent-action-preview-toggle { display: flex; align-items: center; gap: .5rem; margin-top: .85rem; color: var(--muted); font-size: .8rem; }

.profile-giveaway-enter.is-unavailable { background: #ffffff08; border-color: #ffffff20; color: #a7a097; box-shadow: none; opacity: 1; }
.profile-giveaway-entry-feedback.is-unavailable { color: var(--muted); }

/* Keep touch and wheel scrolling inside the open phone navigation. */
@media (max-width: 760px) {
  html:has(#primary-menu.is-open),
  body:has(#primary-menu.is-open) {
    overflow: hidden;
    overscroll-behavior-y: none;
  }
  #primary-menu.is-open {
    overflow-y: auto;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
  }
}
