:root { --surface: #171619; --edge: #383339; --signal: #ff3457; }
.navbar { background: #111013f5; border-bottom-color: var(--edge); }
html:not(.dashboard-page):not(.pricing-page):not(.commands-page) .brand-hero {
  display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: clamp(2rem,5vw,5rem);
  padding: clamp(2.8rem,6vw,6rem) max(1.2rem,2vw); max-width: 1240px;
}
.brand-intro { display: block; padding: 0; }
.brand-intro h1 { font-size: clamp(2.9rem,5.4vw,5.5rem); line-height: .99; letter-spacing: -.065em; }
.brand-intro p { margin: 1.3rem 0 1.5rem; max-width: 35ch; color: #c9c6cb; line-height: 1.6; }
.home-page .brand-intro h1 {
  text-shadow: 0 1px #cda7af, 0 2px #ae7683, 0 3px #855262, 0 4px #683346, 0 5px #502331, 0 9px 18px #10060b99;
  transform-origin: left center;
}
.home-page .brand-intro h1 span { text-shadow: 0 2px #ad143b, 0 4px #770c2e, 0 6px 16px #ff335c44; }
@media (min-width:701px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .home-page .headline-stage h1 {
    transform-origin: center;
    transition: transform 160ms ease-out;
  }
  .home-page .headline-stage[data-lit] h1 {
    transform: perspective(750px) rotateX(var(--aim-x,0deg)) rotateY(var(--aim-y,0deg));
    background: radial-gradient(ellipse 3em 1.8em at var(--light-x) var(--light-y), #fff 5%, #fff0f4 33%, #f5bccb 68%, #eee2e6);
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 -1px 0 #ffadbf) drop-shadow(var(--cast-x) 2px 0 #a94c66) drop-shadow(var(--cast-x) 3px 0 #542234);
  }
  .home-page .headline-stage[data-lit] h1 span { color: var(--signal); text-shadow: none; }
}
@media (forced-colors:active) {
  .home-page .headline-stage[data-lit] h1 { color: CanvasText; background: none; filter: none; }
}
.feedback-panel { margin: 1rem 0; padding: 1rem; border: 1px solid var(--edge); border-radius: 12px; background: #1e171e; }
.feedback-panel summary { cursor: pointer; }
.feedback-toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: .8rem; }
.feedback-toolbar[hidden] { display:none; }
#feedback-items article { padding: .8rem 0; border-top: 1px solid var(--edge); overflow-wrap: anywhere; }
#feedback-items p { white-space: pre-wrap; margin: .5rem 0; }
#feedback-items small { display: block; color: #cdbfc7; }
.wl-role-section { margin-top:1.25rem; padding-top:1rem; border-top:1px solid var(--edge); }
.wl-role-section summary { cursor:pointer; }
.wl-role-section > summary { font-weight:750; }
#whitelist-role-count { margin-left:.3rem; padding:.1rem .5rem; background:#38212b; color:#ffbbca; border-radius:1rem; font-size:.77rem; }
#whitelist-role-list { margin-top:.85rem; display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,310px),1fr)); gap:.85rem; align-items:start; }
.wl-role-card { --role-color:#ff526f; min-width:0; padding:1rem; border:1px solid #44323b; border-radius:12px; background:linear-gradient(120deg,#22191e,#151115 75%); }
.wl-role-identity,.wl-role-id { display:flex; align-items:center; gap:.65rem; }
.wl-role-identity > div { min-width:0; }
.wl-role-avatar { flex:none; display:grid; place-items:center; width:44px; height:44px; border-radius:50%; border:2px solid color-mix(in srgb,var(--role-color) 65%,white); background:color-mix(in srgb,var(--role-color) 16%,#151115); color:#fff1f4; font:bold 1.25rem monospace; }
.wl-role-name { color:#fff; overflow-wrap:anywhere; }
.wl-role-id { gap:.45rem; flex-wrap:wrap; margin-top:.12rem; }
.wl-role-id code { font-size:.75rem; color:#afc8ee; overflow-wrap:anywhere; }
.wl-role-copy { cursor:pointer; padding:.2rem .35rem; border:0; border-radius:4px; background:transparent; color:#dac3ce; font:inherit; font-size:.73rem; }
.wl-role-copy:hover { background:#3c2933; }
.wl-role-permissions { border-top:1px solid #392a32; margin-top:.8rem; padding-top:.65rem; }
.wl-role-permissions summary { display:inline-flex; align-items:center; gap:.55rem; background:#301620; color:#ffbdcd; border:1px solid #743347; border-radius:2rem; padding:.45rem .75rem; font-size:.8rem; font-weight:650; }
.wl-role-permissions summary::-webkit-details-marker { display:none; }
.wl-role-permissions summary::after { content:''; width:.38rem; height:.38rem; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
.wl-role-permissions[open] summary::after { transform:rotate(225deg); }
.wl-role-permissions ul { display:flex; flex-wrap:wrap; gap:.35rem; padding:0; margin:.7rem 0 0; list-style:none; }
.wl-role-permissions li { padding:.2rem .5rem; border-radius:6px; background:#30262e; color:#efdee6; font-size:.76rem; }
.wl-role-section :is(button,summary):focus-visible { outline:2px solid #ff9fb5; outline-offset:3px; }
.brand-intro .hero-actions { justify-content: flex-start; }
.challenge-link { display: inline-block; margin-top: 1rem; font-size: .85rem; color: #d5c8ce; text-underline-offset: 4px; }
.brand-stage { min-width: 0; margin: 0; text-align: left; }
body { background-color: #100f12; }
.brand-stage .brand-plate { width: min(100%, 21rem); margin: 0 auto; aspect-ratio: 1; overflow: hidden; background: #080709; border: 2px solid #642337; border-radius: 18%; box-shadow: 0 4px 0 #290f17, 0 20px 52px #0008; transform: none; }
@media (min-width:701px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .brand-stage .brand-plate[data-lit] {
    border-color: transparent;
    background: linear-gradient(#080709,#080709) padding-box,
      conic-gradient(from calc(var(--light-angle) - 45deg),#642337,#ff3457 32deg,#ffb6c0 45deg,#ff3457 58deg,#642337 90deg) border-box;
  }
}
.brand-plate img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-page .brand-stage .brand-plate {
  position:relative;
  box-shadow:0 2px 0 #703046,0 5px 0 #421524,0 8px 0 #240e16,0 20px 38px #0008;
}
.home-page .brand-plate::after {
  content:''; position:absolute; inset:0; pointer-events:none; border-radius:inherit;
  background:linear-gradient(135deg,#ffffff0c,transparent 38%,transparent 68%,#9e344512);
  box-shadow:inset 0 1px 1px #ffffff24;
}
.brand-orbit { width:min(100%,21rem); margin-inline:auto; }
.home-page .brand-hero[data-scroll-scene] { margin-bottom:var(--scene-space); }
.home-page .brand-hero[data-scroll-scene] .brand-stage { perspective:none; pointer-events:none; }
.home-page .brand-hero[data-scroll-scene] .brand-orbit {
  position:relative; transform-style:preserve-3d; pointer-events:auto;
}
.home-page .brand-hero[data-scroll-scene] .brand-orbit::before {
  content:''; position:absolute; inset:0; border-radius:18%;
  background:linear-gradient(120deg,#9c4056,#431524 58%,#77293c);
  transform:translateZ(-9px); box-shadow:0 12px 28px #0006; pointer-events:none;
}
@media (min-width:701px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .home-page .brand-stage .brand-plate[data-lit] {
    transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
  }
}
@media (prefers-reduced-motion:no-preference) {
  .home-page #features .feature-card-v2.fc-visible {
    animation:home-card-arrival .42s cubic-bezier(.2,.75,.25,1);
  }
  @keyframes home-card-arrival {
    from { translate:0 .65rem; opacity:.85; }
    to { translate:0 0; opacity:1; }
  }
  @supports (animation-timeline:scroll()) {
    .home-page .navbar::after {
      content:''; position:absolute; inset:auto 0 -1px; height:2px; pointer-events:none;
      background:var(--signal); transform-origin:left; animation:home-scroll-progress linear both;
      animation-timeline:scroll(root block);
    }
    @keyframes home-scroll-progress { from { transform:scaleX(0); } to { transform:scaleX(1); } }
  }
}
#dashboard-management-panel .server-identity {
  background: #161518 !important;
  border-color: var(--edge) !important;
}
.identity-body { position: relative; padding: .85rem 1rem; }
.identity-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .75rem; margin-bottom: .65rem; }
.identity-profile,.identity-access,.identity-title { display: flex; align-items: center; }
.identity-profile { min-width: 0; gap: .7rem; }
.identity-profile > :first-child,.identity-plan { flex: none; }
.identity-profile > :last-child { min-width: 0; }
.identity-title,.identity-access { flex-wrap: wrap; gap: .2rem .55rem; }
.identity-access { margin-bottom: .2rem; }
.identity-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .45rem; }
.identity-metrics .guild-stat-card { padding: .35rem .7rem !important; line-height: 1.35; }
.identity-row .custom-guild-switcher-container { padding: .2rem .35rem; min-width: 0; max-width: 100%; }
.identity-row .cgs-trigger-btn { transition-property: background-color,border-color,box-shadow,transform; }
#selected-guild-name { overflow-wrap: anywhere; line-height: 1.25; }
.identity-banner { position: absolute; inset: 0 0 auto; height: 4rem; pointer-events: none; opacity: .55; border-radius: 15px 15px 0 0; background: linear-gradient(0deg,#161518,transparent),var(--server-banner,linear-gradient(110deg,#662036,#251d25 65%,#3a1925)) center 44%/cover; }
#selected-guild-icon { display: block; object-fit: cover; border: 3px solid #19171a; border-radius: 50%; background: #19171a; }
.identity-plan:not([hidden]) { display: inline-block; color: #eed1d9; border: 1px solid #64444f; border-radius: 1rem; padding: .12rem .5rem; font-size: .75rem; }
.server-destinations { background: #161518; border-color: var(--edge); }
.server-destinations button { background: var(--surface); border-color: var(--edge); }
.server-destinations button[aria-current=page] { border-color: var(--signal); box-shadow: inset 0 -2px var(--signal); }
#all-server-tools { color: #f6f4f5; background: #171619; border: 1px solid #51434a; padding: 1.4rem; border-radius: 16px; width: min(52rem,94vw); max-height: 90dvh; margin: auto; }
#all-server-tools::backdrop { background: #080709be; }
.tools-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.tools-heading button,.plan-controls select,#plan-server { font: inherit; background: #211f23; border: 1px solid #51484e; color: #fff; border-radius: .55rem; padding: .5rem .75rem; }
.tool-groups { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.tool-groups h4 { color: #ffa2af; margin: .3rem 0 .6rem; }
@media(min-width:701px) {
  #all-server-tools { position: static; width: 100%; max-width: none; max-height: none; border: 0; border-radius: 0; margin: 0; background: #161518; }
  .tools-heading { display: none; }
}
#dashboard .tool-groups .dash-tab-btn { text-align: left; display: block; width: 100%; margin: .35rem 0; background: #211f23; border-color: var(--edge); }
#dashboard .tool-groups [hidden] { display: none; }
.feature-card-v2 { background: linear-gradient(140deg,#201e22,#151417); border-color: var(--edge); box-shadow: inset 0 1px #ffffff12,0 5px 14px #0003; }
.feature-card-v2 .fc-expand-btn { width: 100%; min-height: 44px; justify-content: space-between; border-color: #494148; background: #ffffff06; color: #f7f4f6; }
.feature-card-v2.fc-expanded { border-color: #9c4154; }
.tier-grid { grid-template-columns: repeat(4,minmax(0,1fr)); align-items: stretch; }
.tier-card { min-width: 0; background: linear-gradient(145deg,#221e23,#141316); padding: clamp(1rem,1.5vw,1.5rem); }
.tier-card[data-tier=free] { border-top-color: #959198; }
.tier-card[data-tier=plus] { border-top-color: #d2a285; }
.tier-card[data-tier=pro] { border-top-color: #ff4162; }
.tier-card[data-tier=ultra] { border: 1px solid #bc924e; background: linear-gradient(150deg,#28221b,#161518 55%); }
.tier-card.current-tier { outline: 2px solid var(--signal); outline-offset: -2px; }
.tier-card { display: flex; flex-direction: column; align-items: stretch; }
.tier-card .tier-highlights { min-height: 0; }
.tier-card .tier-buy,.tier-card > a.btn { margin-top: auto; align-self: stretch; text-align: center; }
.tier-card .plan-extra { margin-bottom: .8rem; }
.plan-full-list { padding-left: 1.2rem; color: #d0c9cd; font-size: .88rem; }
.plan-full-list li { margin: .4rem 0; }
.current-plan { display: inline-block; color: #ffb3c0; font-size: .72rem; }
.current-plan::before { content: '✓ '; }
.tier-heading { flex-wrap: wrap; gap: .4rem; }
.tier-heading .current-plan { border-radius: 1rem; background: #391b25; padding: .25rem .5rem; }
@supports (grid-template-rows: subgrid) {
  @media(min-width:501px) {
    .tier-grid > .tier-card { display: grid; grid-row: span 9; grid-template-rows: subgrid; row-gap: .45rem; }
    .tier-card .tier-highlights { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: .25rem; }
    .tier-card :is(.tier-buy,a.btn) { grid-row: 8; margin-top: 0; }
    .tier-card .tier-commands { grid-row: 9; }
  }
}
.feature-sample { margin: 1rem 0; padding: .85rem; background: #111014; border: 1px solid #40373e; border-radius: .8rem; color: #f5eff2; }
.feature-sample figcaption { margin-bottom: .75rem; color: #beb4bc; font-size: .75rem; }
.incident-track { list-style: none; padding: 0; margin: 0; display: flex; }
.incident-track li { position: relative; flex: 1; padding-top: 1.1rem; color: #e7dce0; font-size: .74rem; }
.incident-track li::before { content: ''; position: absolute; top: .25rem; left: 0; right: 0; height: 1px; background: #78384a; }
.incident-track li:last-child::before { display: none; }
.incident-track li::after { content: ''; position: absolute; top: 0; left: 0; width: .55rem; height: .55rem; border-radius: 50%; background: #ff738d; }
.invite-tag,.restore-stack { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; justify-content: space-between; }
.invite-tag,.restore-stack { border: 1px dashed #59515d; padding: .55rem; border-radius: .45rem; }
.invite-tag span,.restore-stack .ready { color: #8de5bd; }
.restore-stack { margin-bottom: .6rem; }
.restore-stack span,.invite-tag span { font-size: .76rem; }
.sample-button { padding: .5rem .15rem; border: 0; background: transparent; color: #ff9caf; font: inherit; font-size: .85rem; cursor: pointer; }
.sample-button:hover { text-decoration: underline; }
.feature-card-v2 .fc-glow,.feature-card-v2 .fc-shimmer { display: none; }
@media(prefers-reduced-motion:reduce),(hover:none) {
  #features .feature-card-v2,#features .fc-icon,#pricing .tier-card { transform: none; transition: none; }
  #features .fc-border-gradient { animation: none; }
}
#plan-server-label:not([hidden]),.plan-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin: .75rem 0 1rem; }
.plan-controls label { display: flex; align-items: center; gap: .5rem; }
.plan-controls .plan-picker { display: none; }
.tier-comparison [hidden] { display: none !important; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .feature-card-v2:hover { transform: translateY(-3px); box-shadow: inset 0 1px #ffffff24,0 10px 22px #0005; }
}
@media(max-width:960px) { .tier-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:800px) {
  .identity-row { grid-template-columns: minmax(0,1fr); gap: .5rem; }
  .identity-body { padding: .65rem; }
  .identity-row .custom-guild-switcher-container { width: 100%; }
  .identity-row .cgs-trigger-btn { flex: 1; min-width: 0; max-width: none; }
}
@media(max-width:600px) {
  .identity-profile { gap: .5rem; }
  #selected-guild-icon { width: 44px; height: 44px; }
  .identity-row .cgs-trigger-label { font-size: .65rem; }
  .identity-row .cgs-trigger-btn { padding: .25rem .55rem; min-height: 44px; }
  .identity-row .cgs-trigger-meta { flex-wrap: wrap; column-gap: .3rem; }
  .identity-metrics { grid-template-columns: repeat(6,minmax(0,1fr)); gap: .3rem; }
  .identity-metrics > div { grid-column: span 2; }
  .identity-metrics > div:nth-last-child(-n+2) { grid-column: span 3; }
}
@media(max-width:700px) {
  html:not(.dashboard-page):not(.pricing-page):not(.commands-page) .brand-hero { grid-template-columns: 1fr; gap: 1.7rem; }
  .brand-intro h1 { font-size: clamp(2.7rem,11vw,4rem); }
  #all-server-tools { width: min(88vw,25rem); max-width: none; max-height: 100dvh; height: 100dvh; margin: 0 0 0 auto; border-radius: 15px 0 0 15px; }
  .tool-groups { grid-template-columns: 1fr; }
  #dashboard-management-panel .server-identity { position: relative !important; }
  .server-destinations { position: sticky; top: 0; z-index: 12; }
  .server-destinations[data-server]::before { content: attr(data-server); grid-column: 1/-1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .2rem .4rem; font-weight: 700; font-size: .8rem; }
  .server-destinations button { padding: .45rem .2rem; font-size: .82rem; }
  .plan-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .plan-controls > label:first-child { grid-column: 1/-1; }
  .plan-controls .plan-picker { display: grid; gap: .25rem; font-size: .8rem; }
  .tier-comparison:has(.plan-controls) table { min-width: 0; table-layout: fixed; }
  .tier-comparison:has(.plan-controls) :is(th,td) { overflow-wrap: anywhere; font-size: .78rem; padding: .6rem .35rem; }
  .tier-comparison th[scope=row] .matrix-note { display: block; font-size: .7rem; }
}
@media(max-width:500px) { .tier-grid { grid-template-columns: 1fr; } }

/* Server switcher */
#cgs-popover {
  width: min(28rem,94vw); background: #161317; color: #f6edf1;
  border: 1px solid #68404d; border-radius: 1rem;
  box-shadow: 0 18px 48px #0009; backdrop-filter: none;
}
#cgs-popover .cgs-header { gap: .6rem; padding: .8rem 1rem; background: linear-gradient(105deg,#35212a,#1a171b); }
#cgs-heading { margin: 0 auto 0 0; color: #fff; font-size: 1.08rem; letter-spacing: -.025em; }
#cgs-header-count { color: #eedde4; font-family: inherit; font-size: .75rem; font-weight: 600; }
.cgs-close { border: 0; background: transparent; color: #f4dce5; font-size: 1.3rem; width: 2rem; height: 2rem; border-radius: .4rem; cursor: pointer; }
.cgs-close:hover { background: #49303b; }
#cgs-popover .cgs-search-box { background: #0e0d10; border-color: #443740; border-radius: .65rem; min-height: 2.65rem; }
#cgs-popover .cgs-search-box:focus-within { border-color: #ed6e8a; box-shadow: 0 0 0 2px #d5476b28; }
.cgs-search-symbol { display: block; position: relative; width: 13px; height: 13px; flex: none; border: 1.5px solid #d9b6c1; border-radius: 50%; margin-right: 3px; }
.cgs-search-symbol::after { content: ''; position: absolute; width: 6px; height: 1.5px; background: #d9b6c1; right: -5px; bottom: -2px; transform: rotate(45deg); }
#cgs-popover .cgs-filter-chips { flex-wrap: wrap; overflow: visible; gap: .35rem; }
#cgs-popover .cgs-chip { border-radius: 2rem; padding: .35rem .6rem; color: #dbd0d5; background: #211d22; }
#cgs-popover .cgs-chip.active { background: #482332; border-color: #b54c68; color: #ffe1e8; box-shadow: none; }
.cgs-sort { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem 1rem; border-block: 1px solid #382e34; color: #cbbbc3; font-size: .76rem; }
.cgs-sort select { color-scheme: dark; color: #eee4e9; background: #231f24; border: 1px solid #493a43; border-radius: .4rem; padding: .25rem .4rem; font: inherit; }
#cgs-guild-list { gap: .2rem; padding: .4rem; max-height: min(21rem,42dvh); scrollbar-color: #694350 #171419; }
#cgs-guild-list .cgs-item { width: 100%; flex: none; text-align: left; font: inherit; padding: .55rem .65rem; min-height: 3.45rem; color: inherit; background: transparent; border-color: transparent; }
#cgs-guild-list .cgs-item:hover { transform: none; background: #272127; border-color: #493844; }
#cgs-guild-list .cgs-item.active { background: linear-gradient(90deg,#38202a,#231c21); border-color: #643044; box-shadow: inset 3px 0 #ff547c; }
#cgs-guild-list .cgs-item-right { flex-direction: column; align-items: flex-end; gap: .15rem; }
.cgs-current-label { font-size: .7rem; font-weight: 700; color: #ffabc0; }
#cgs-popover .cgs-item-meta { flex-wrap: wrap; }
#cgs-popover .cgs-item-fallback { background: #36232d; border-color: #613c4b; color: #ffc2d3; }
#cgs-popover .cgs-footer { background: #19151a; border-top: 1px solid #3f3038; }
#cgs-popover .cgs-add-link { color: #ff9bb4; }
#cgs-popover :is(button,select):focus-visible { outline: 2px solid #ffa7bf; outline-offset: -2px; }
@media(max-width:720px) {
  #custom-guild-switcher-wrapper:has(#cgs-popover.open) { flex-wrap: wrap; }
  #cgs-popover { position: static; width: 100%; flex-basis: 100%; max-height: none; box-shadow: none; }
  #cgs-search-input { font-size: 16px; }
}
@media(prefers-reduced-motion:reduce) {
  #cgs-popover,#cgs-popover * { animation: none; transition: none; }
}
