/* ============================================================
   Pawtalk - public pages (home, client center)
   ============================================================ */

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ───────────────────────────────────────────────── */

.sitenav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 1.5rem;
  background: rgba(19, 16, 16, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand-sm { font-size: 1rem; }

.brand-mark {
  width: 24px;
  height: 24px;
  background: url('../img/mark.png') center / contain no-repeat;
}
/* The three bars were the old drawn mark. Kept in the markup so no
   template has to change, but they no longer paint anything. */
.brand-mark i { display: none; }

.sitenav-links {
  display: flex;
  gap: 0.35rem;
  margin-right: auto;
}
.sitenav-links a {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--fg-mid);
  font-size: 0.9rem;
  font-weight: 600;
}
.sitenav-links a:hover { background: var(--bg-2); color: var(--fg); text-decoration: none; }
.sitenav-links a.is-current { color: var(--fg); background: var(--bg-2); }

.sitenav-actions { display: flex; gap: 0.5rem; }

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(920px 520px at 18% -12%, rgba(229, 129, 58, 0.20), transparent 60%),
    radial-gradient(760px 460px at 88% 4%,   rgba(240, 161, 101, 0.11), transparent 58%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(2.1rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, var(--accent), var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 0 1.6rem;
  max-width: 46ch;
  color: var(--fg-mid);
  font-size: 1.03rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.65rem; }

/* ── Preview panel ────────────────────────────────────────── */
/* A drawn stand-in for the app, so the page has something to look at
   without shipping a screenshot that goes stale on every redesign. */

.peek {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.peek-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.peek-bar span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg-4);
}
.peek-bar span:first-child { background: var(--accent); }

.peek-body { display: grid; grid-template-columns: 128px 1fr; min-height: 292px; }

.peek-rail {
  padding: 0.75rem 0.55rem;
  background: var(--bg-0);
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 0.3rem;
}
.peek-rail b {
  padding: 0.25rem 0.4rem;
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.peek-rail i {
  padding: 0.32rem 0.45rem;
  border-radius: var(--radius-sm);
  font-style: normal;
  font-size: 0.8rem;
  color: var(--fg-dim);
}
.peek-rail i.on { background: var(--bg-3); color: var(--fg); }

.peek-feed { padding: 0.9rem; display: grid; align-content: start; gap: 0.85rem; }
.peek-msg { display: flex; gap: 0.6rem; }
.peek-av {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-4);
}
.peek-msg:nth-child(1) .peek-av { background: var(--accent); }
.peek-msg:nth-child(2) .peek-av { background: #4f8ecb; }
.peek-msg:nth-child(3) .peek-av { background: var(--ok); }
.peek-lines { flex: 1; display: grid; gap: 0.34rem; }
.peek-lines u {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: var(--bg-3);
  text-decoration: none;
}
.peek-lines u:first-child { width: 34%; background: var(--bg-4); }
.peek-lines u:nth-child(2) { width: 88%; }
.peek-lines u:nth-child(3) { width: 61%; }

/* ── Feature grid ─────────────────────────────────────────── */

.section { padding: 3.5rem 0; }
.section-head { max-width: 54ch; margin-bottom: 2rem; }
.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 780;
  letter-spacing: -0.028em;
}
.section-head p { margin: 0; color: var(--fg-mid); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.25rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.16s, transform 0.16s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card h3 { margin: 0.7rem 0 0.35rem; font-size: 1rem; font-weight: 700; }
.card p  { margin: 0; font-size: 0.89rem; color: var(--fg-mid); }

.card-icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(229, 129, 58, 0.14);
  color: var(--accent);
  font-size: 1.05rem;
}

/* ── Closing call to action ───────────────────────────────── */

.cta {
  margin: 1rem 0 4rem;
  padding: 2.4rem 1.5rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(620px 220px at 50% 0%, rgba(229, 129, 58, 0.16), transparent 70%),
    var(--bg-1);
}
.cta h2 { margin: 0 0 0.45rem; font-size: 1.6rem; letter-spacing: -0.025em; }
.cta p  { margin: 0 0 1.35rem; color: var(--fg-mid); }

/* ── PawTalk landing page ─────────────────────────────────── */

.landing-page { overflow: hidden; background: var(--bg-0); }
.landing-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(3.8rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5.5rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 600px at 8% -8%, rgba(229,129,58,.2), transparent 68%),
    radial-gradient(680px 500px at 95% 13%, rgba(148,77,223,.17), transparent 68%),
    linear-gradient(180deg, rgba(44,28,21,.6), transparent 70%);
}
.landing-glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(10px); pointer-events: none; }
.landing-glow-left { width: 210px; height: 210px; left: -100px; bottom: 5%; background: rgba(234,99,55,.16); }
.landing-glow-right { width: 220px; height: 220px; right: -120px; top: 15%; background: rgba(110,78,225,.18); }
.landing-hero-grid { display: grid; grid-template-columns: minmax(0,.86fr) minmax(440px,1.14fr); gap: clamp(2rem,6vw,6rem); align-items: center; }
.landing-copy { position: relative; z-index: 2; }
.landing-kicker { display: inline-flex; align-items: center; gap: .48rem; margin-bottom: 1rem; color: var(--accent-soft); font-size: .71rem; font-weight: 850; letter-spacing: .085em; text-transform: uppercase; }
.landing-kicker i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 5px rgba(108,201,139,.1); }
.landing-copy h1 { max-width: 10ch; margin: 0; color: var(--fg); font-size: clamp(3rem,6vw,5.25rem); font-weight: 900; letter-spacing: -.065em; line-height: .96; }
.landing-copy h1 em,
.landing-section-head h2 em { font-style: normal; background: linear-gradient(100deg, #f7904a 12%, #f6bf64 43%, #a775e6 88%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-lede { max-width: 48ch; margin: 1.35rem 0 1.65rem; color: var(--fg-mid); font-size: 1.08rem; line-height: 1.65; }
.landing-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.landing-primary { gap: .56rem; font-weight: 800; }
.landing-primary > span { font-size: 1.12em; transition: transform .18s; }
.landing-primary:hover > span { transform: translateX(3px); }
.landing-signal-row { display: flex; flex-wrap: wrap; gap: .52rem; margin-top: 1.65rem; }
.landing-signal-row span { display: inline-flex; align-items: center; gap: .38rem; padding: .42rem .58rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(29,21,18,.55); color: var(--fg-dim); font-size: .72rem; font-weight: 650; }
.landing-signal-row .app-icon { width: 1rem; height: 1rem; object-fit: contain; }
.landing-page .app-icon[data-icon-animated][data-icon-playing] { object-fit: fill; transform: scale(var(--app-icon-hover-scale, 1)); transform-origin: center; }

.landing-visual { position: relative; min-height: 470px; }
.landing-crest-wrap { position: absolute; width: 300px; right: -5%; top: -15%; opacity: .3; filter: saturate(1.15) drop-shadow(0 22px 30px rgba(0,0,0,.48)); transform: rotate(7deg); pointer-events: none; }
.landing-crest-wrap img { display: block; width: 100%; height: auto; }
.landing-window { position: absolute; z-index: 2; left: 0; right: 1rem; top: 1.2rem; overflow: hidden; border: 1px solid rgba(233,189,145,.27); border-radius: 1.35rem; background: rgba(35,25,22,.94); box-shadow: 0 30px 80px rgba(0,0,0,.52); backdrop-filter: blur(18px); transform: rotate(-1.8deg); }
.landing-window-bar { display: flex; align-items: center; min-height: 2.55rem; gap: .35rem; padding: 0 .78rem; border-bottom: 1px solid var(--line); background: rgba(49,34,28,.9); }
.landing-window-bar span { width: .52rem; height: .52rem; border-radius: 50%; background: #684f44; }
.landing-window-bar span:first-child { background: var(--accent); }
.landing-window-bar b { margin-left: .45rem; color: var(--fg-mid); font-size: .68rem; }
.landing-window-bar i { margin-left: auto; color: var(--fg-dim); font-style: normal; }
.landing-window-body { display: grid; grid-template-columns: 67px 1fr; min-height: 350px; }
.landing-mini-rail { display: grid; align-content: start; justify-items: center; gap: .58rem; padding: .75rem .45rem; border-right: 1px solid var(--line); background: rgba(21,16,15,.82); }
.landing-mini-home, .landing-mini-avatar, .landing-mini-add { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; }
.landing-mini-home { background: linear-gradient(145deg,#ee8344,#d65a52); color: #261310; font-size: .85rem; }
.landing-mini-avatar { overflow: hidden; border: 2px solid rgba(255,255,255,.1); }
.landing-mini-add { border: 1px dashed var(--line-2); color: var(--fg-dim); font-size: 1rem; }
.a-orange { background: linear-gradient(140deg,#e27239,#ffca6a); }
.a-purple { background: linear-gradient(140deg,#7c5ae3,#e69ae6); }
.a-blue { background: linear-gradient(140deg,#388dc7,#75dfdb); }
.landing-chat { display: grid; grid-template-rows: 50px 1fr auto; min-width: 0; }
.landing-chat-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .82rem; border-bottom: 1px solid var(--line); }
.landing-chat-person { display: grid; grid-template-columns: 24px auto; column-gap: .42rem; align-items: center; min-width: 0; }
.landing-chat-person .landing-mini-avatar { width: 24px; height: 24px; grid-row: span 2; }
.landing-chat-person b { overflow: hidden; color: var(--fg); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.landing-chat-person small { color: var(--ok); font-size: .59rem; }
.landing-head-icons { display: flex; align-items: center; gap: .7rem; color: var(--fg-dim); }
.landing-head-icons .app-icon { width: .9rem; height: .9rem; object-fit: contain; }
.landing-message-list { display: grid; align-content: start; gap: .82rem; padding: 1rem .92rem .7rem; }
.landing-message { display: flex; align-items: flex-start; gap: .48rem; color: var(--fg-mid); }
.landing-message .landing-mini-avatar { width: 25px; height: 25px; flex: none; }
.landing-message p { margin: 0; font-size: .72rem; line-height: 1.5; }
.landing-message p b { color: var(--fg); font-size: .69rem; }
.landing-message p small { color: var(--fg-dim); font-size: .58rem; }
.landing-message.is-me { padding-left: 2rem; }
.landing-heart { color: #f06f95; }
.landing-expression { display: flex; gap: .24rem; padding: .35rem .42rem; border: 1px solid rgba(165,118,227,.28); border-radius: .7rem; background: linear-gradient(135deg,rgba(110,80,203,.22),rgba(237,117,159,.18)); color: #f7bf69; }
.landing-expression span { font-size: .9rem; }
.landing-composer { display: flex; align-items: center; gap: .55rem; min-height: 39px; margin: .35rem .7rem .7rem; padding: 0 .65rem; border: 1px solid var(--line-2); border-radius: .8rem; background: rgba(69,48,39,.8); }
.landing-composer > span { color: var(--fg-dim); font-size: 1rem; }.landing-composer i { min-width: 0; flex: 1; overflow: hidden; color: var(--fg-dim); font-size: .64rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }.landing-composer b { display: flex; gap: .32rem; }.landing-composer .app-icon { width: .8rem; height: .8rem; object-fit: contain; }.landing-composer strong { display: grid; place-items: center; width: 22px; height: 22px; border-radius: .45rem; background: var(--accent); color: #28150d; font-size: .65rem; }
.landing-call-card, .landing-expression-card { position: absolute; z-index: 4; display: flex; align-items: center; gap: .55rem; border: 1px solid rgba(255,255,255,.14); border-radius: .9rem; background: rgba(47,35,31,.9); box-shadow: 0 15px 32px rgba(0,0,0,.36); backdrop-filter: blur(16px); }
.landing-call-card { right: -1rem; top: 3rem; width: 185px; padding: .62rem .72rem; }.landing-call-dot { width: .52rem; height: .52rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(108,201,139,.12); }.landing-call-card div { min-width: 0; }.landing-call-card b,.landing-call-card small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.landing-call-card b { font-size:.68rem; }.landing-call-card small { margin-top:.12rem; color:var(--fg-dim); font-size:.58rem; }.landing-call-card i { display:grid; place-items:center; margin-left:auto; color:var(--ok); font-style:normal; }.landing-call-card .app-icon { width:1.15rem; height:1.15rem; object-fit:contain; }
.landing-expression-card { left: -1.6rem; bottom: 1.5rem; padding: .72rem .8rem; }.landing-expression-star { display:grid; place-items:center; width:2rem; height:2rem; border-radius:.7rem; background:linear-gradient(135deg,#dc6b83,#9a68e4); color:#fff2d6; }.landing-expression-card b,.landing-expression-card small { display:block; }.landing-expression-card b { font-size:.7rem; }.landing-expression-card small { max-width:132px; margin-top:.12rem; color:var(--fg-dim); font-size:.58rem; line-height:1.3; }

.landing-proof { border-bottom: 1px solid var(--line); background: rgba(32,24,20,.65); }.landing-proof-grid { display:grid; grid-template-columns:repeat(3,1fr); }.landing-proof-grid > div { min-height:120px; padding:1.45rem 1.55rem; border-right:1px solid var(--line); }.landing-proof-grid > div:first-child { border-left:1px solid var(--line); }.landing-proof-grid b,.landing-proof-grid span { display:block; }.landing-proof-grid b { margin-bottom:.4rem; font-size:.9rem; }.landing-proof-grid span { color:var(--fg-dim); font-size:.78rem; line-height:1.5; }

.landing-features { padding-top: clamp(4rem,8vw,7rem); padding-bottom: clamp(3.5rem,7vw,6.5rem); }.landing-section-head { max-width:660px; margin-bottom:2.4rem; }.landing-section-head h2 { margin:0; font-size:clamp(2rem,4vw,3.35rem); letter-spacing:-.055em; line-height:1.05; }.landing-section-head p { max-width:57ch; margin:1rem 0 0; color:var(--fg-mid); font-size:1rem; line-height:1.65; }
.landing-feature-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }.landing-feature { position:relative; display:flex; min-height:395px; overflow:hidden; border:1px solid var(--line); border-radius:1.3rem; background:linear-gradient(145deg,rgba(55,39,32,.94),rgba(30,23,20,.96)); }.landing-feature-copy { position:relative; z-index:2; width:53%; padding:1.6rem; }.landing-feature-copy h3 { margin:.95rem 0 .6rem; font-size:1.3rem; letter-spacing:-.03em; line-height:1.12; }.landing-feature-copy p { margin:0; color:var(--fg-mid); font-size:.85rem; line-height:1.6; }.landing-feature-copy a { display:inline-flex; align-items:center; gap:.35rem; margin-top:1rem; color:var(--accent-soft); font-size:.78rem; font-weight:760; text-decoration:none; }.landing-feature-copy a:hover { color:var(--accent); }.landing-feature-icon { display:grid; place-items:center; width:2.3rem; height:2.3rem; border-radius:.72rem; background:var(--accent-wash); color:var(--accent-soft); }.landing-feature-icon .app-icon { width:1.2rem; height:1.2rem; object-fit:contain; }
.landing-feature-server { grid-column:span 2; min-height:345px; }.landing-feature-server .landing-feature-copy { width:40%; }.landing-server-preview { position:absolute; right:1.4rem; bottom:-.35rem; width:48%; max-width:445px; overflow:hidden; border:1px solid rgba(255,255,255,.13); border-radius:1rem 1rem 0 0; background:#211817; box-shadow:0 22px 40px rgba(0,0,0,.38); transform:rotate(-2deg); }.landing-server-cover { position:relative; height:94px; overflow:hidden; background:linear-gradient(135deg,#6e321d,#351d43); }.landing-server-cover::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,rgba(20,11,9,.15),rgba(20,11,9,.7)); }.landing-server-cover img { position:absolute; right:-20px; top:-90px; width:245px; opacity:.84; }.landing-server-cover span { position:absolute; z-index:1; right:.65rem; bottom:.48rem; padding:.26rem .45rem; border-radius:999px; background:rgba(19,13,12,.72); color:#f6c386; font-size:.58rem; font-weight:800; }.landing-server-name { display:grid; grid-template-columns:32px auto; column-gap:.5rem; align-items:center; padding:.65rem .75rem; border-bottom:1px solid var(--line); }.landing-server-name i { display:grid; place-items:center; grid-row:span 2; width:29px; height:29px; border-radius:.55rem; color:#382015; font-size:.7rem; font-style:normal; font-weight:900; }.landing-server-name b { font-size:.7rem; }.landing-server-name small { color:var(--fg-dim); font-size:.56rem; }.landing-server-channels { display:grid; gap:.34rem; padding:.68rem .75rem .85rem; }.landing-server-channels b { margin-top:.16rem; color:var(--fg-dim); font-size:.53rem; letter-spacing:.08em; }.landing-server-channels b small { padding:.1rem .26rem; border-radius:999px; background:var(--bg-4); font-size:.5rem; }.landing-server-channels span { padding:.3rem .42rem; border-radius:.4rem; color:var(--fg-dim); font-size:.63rem; }.landing-server-channels span.is-on { background:rgba(229,129,58,.16); color:var(--fg); box-shadow:inset 2px 0 var(--accent); }
.landing-feature-profile { align-items:center; justify-content:flex-end; }.landing-feature-profile .landing-feature-copy { width:50%; }.landing-profile-preview { position:absolute; left:1rem; bottom:0; width:43%; min-width:206px; padding:0 1rem 1rem; border:1px solid rgba(255,255,255,.13); border-bottom:0; border-radius:1rem 1rem 0 0; background:#332726; box-shadow:0 18px 34px rgba(0,0,0,.28); transform:rotate(2.5deg); }.landing-profile-banner { height:72px; margin:0 -1rem; border-radius:1rem 1rem 0 0; background:linear-gradient(125deg,#8839a9,#f68a61 55%,#f3c56e); }.landing-profile-avatar { position:relative; display:grid; place-items:center; width:48px; height:48px; margin:-25px 0 0; border:3px solid #332726; border-radius:50%; background:linear-gradient(135deg,#7e44ce,#e985bd); color:#fff; font-weight:900; }.landing-profile-avatar i { position:absolute; right:-1px; bottom:0; width:12px; height:12px; border:2px solid #332726; border-radius:50%; background:var(--ok); }.landing-profile-status { margin:.55rem 0 .45rem; padding:.36rem .48rem; border:1px solid rgba(255,255,255,.12); border-radius:.55rem; background:rgba(28,20,20,.58); color:#f1e8dd; font-size:.57rem; }.landing-profile-preview h4 { margin:.38rem 0 .15rem; font-size:.86rem; }.landing-profile-preview p { margin:0; color:var(--fg-mid); font-size:.58rem; }.landing-badges { display:flex; gap:.25rem; margin:.5rem 0; color:#f6b45f; }.landing-badges span { display:grid; place-items:center; width:18px; height:18px; border-radius:50%; background:rgba(255,255,255,.08); font-size:.6rem; }.landing-profile-preview > small { display:block; padding-top:.55rem; border-top:1px solid rgba(255,255,255,.09); color:var(--fg-dim); font-size:.57rem; }
.landing-feature-expression { align-items:center; }.landing-expression-preview { position:absolute; right:1.3rem; bottom:1.2rem; width:44%; overflow:hidden; border:1px solid rgba(255,255,255,.14); border-radius:.9rem; background:#2e2524; box-shadow:0 20px 35px rgba(0,0,0,.26); transform:rotate(-2deg); }.landing-expression-preview header,.landing-expression-preview footer { display:flex; align-items:center; justify-content:space-between; padding:.6rem .7rem; border-bottom:1px solid var(--line); font-size:.59rem; }.landing-expression-preview header span { color:var(--fg-dim); }.landing-expression-preview > div { display:grid; grid-template-columns:repeat(3,1fr); gap:.35rem; padding:.6rem; }.landing-expression-preview i { display:grid; place-items:center; aspect-ratio:1; border-radius:.65rem; background:linear-gradient(135deg,rgba(229,129,58,.35),rgba(146,94,219,.3)); color:#f8d28a; font-size:1.1rem; font-style:normal; }.landing-expression-preview footer { border:0; color:var(--fg-dim); }.landing-expression-preview footer b { color:var(--accent-soft); }
.landing-close-wrap { padding-bottom:4.5rem; }.landing-close { display:flex; align-items:center; justify-content:space-between; gap:2rem; padding:clamp(1.65rem,4vw,3rem); overflow:hidden; border:1px solid rgba(229,129,58,.28); border-radius:1.35rem; background:radial-gradient(520px 240px at 15% 0,rgba(229,129,58,.22),transparent 72%),radial-gradient(430px 260px at 94% 100%,rgba(146,94,219,.2),transparent 72%),var(--bg-1); }.landing-close .landing-kicker { margin-bottom:.65rem; }.landing-close h2 { max-width:650px; margin:0; font-size:clamp(1.65rem,3.5vw,2.7rem); letter-spacing:-.05em; line-height:1.04; }.landing-close p { max-width:55ch; margin:.8rem 0 0; color:var(--fg-mid); line-height:1.55; }

@media (max-width: 980px) { .landing-hero-grid { grid-template-columns:1fr; gap:2.5rem; }.landing-copy h1 { max-width:12ch; }.landing-visual { max-width:650px; width:94%; min-height:430px; margin:0 auto; }.landing-window { right:1rem; }.landing-feature-grid { grid-template-columns:1fr; }.landing-feature-server { grid-column:auto; }.landing-feature-server .landing-feature-copy,.landing-feature-copy { width:48%; }.landing-server-preview { width:49%; }.landing-feature-profile .landing-feature-copy { width:47%; } }
@media (max-width: 700px) { .landing-hero { padding-top:3.25rem; }.landing-copy h1 { font-size:clamp(2.8rem,12vw,4.4rem); }.landing-lede { font-size:1rem; }.landing-signal-row { display:grid; }.landing-signal-row span { width:max-content; max-width:100%; }.landing-visual { min-height:355px; width:100%; }.landing-crest-wrap { width:220px; right:-1rem; top:-3rem; }.landing-window { top:1rem; left:0; right:.2rem; border-radius:1rem; }.landing-window-body { min-height:285px; grid-template-columns:48px 1fr; }.landing-mini-rail { gap:.38rem; padding:.55rem .25rem; }.landing-mini-home,.landing-mini-avatar,.landing-mini-add { width:25px; height:25px; }.landing-chat { grid-template-rows:43px 1fr auto; }.landing-message-list { gap:.52rem; padding:.72rem .6rem .45rem; }.landing-message p { font-size:.64rem; }.landing-message-list .landing-mini-avatar { width:21px; height:21px; }.landing-call-card { right:.2rem; top:.2rem; transform:scale(.83); transform-origin:top right; }.landing-expression-card { left:-.45rem; bottom:-.15rem; transform:scale(.84); transform-origin:bottom left; }.landing-proof-grid { grid-template-columns:1fr; }.landing-proof-grid > div,.landing-proof-grid > div:first-child { min-height:auto; padding:1rem 1.1rem; border:0; border-bottom:1px solid var(--line); }.landing-proof-grid > div:last-child { border-bottom:0; }.landing-features { padding-top:3.6rem; }.landing-feature { min-height:355px; }.landing-feature-copy,.landing-feature-server .landing-feature-copy,.landing-feature-profile .landing-feature-copy { width:55%; padding:1.25rem; }.landing-feature-copy h3 { font-size:1.12rem; }.landing-feature-copy p { font-size:.78rem; }.landing-server-preview { right:-.7rem; width:50%; transform:rotate(-1.2deg) scale(.92); transform-origin:bottom right; }.landing-profile-preview { left:-.6rem; transform:rotate(2deg) scale(.9); transform-origin:bottom left; }.landing-expression-preview { right:-.55rem; width:48%; transform:rotate(-1deg) scale(.9); transform-origin:bottom right; }.landing-close { align-items:flex-start; flex-direction:column; gap:1.2rem; } }
@media (max-width: 450px) { .landing-actions .btn { width:100%; justify-content:center; }.landing-signal-row span { white-space:nowrap; font-size:.65rem; }.landing-visual { min-height:305px; }.landing-window-body { min-height:242px; }.landing-head-icons { gap:.4rem; }.landing-message.is-me { padding-left:1.4rem; }.landing-expression-card { display:none; }.landing-feature { min-height:365px; }.landing-feature-copy,.landing-feature-server .landing-feature-copy,.landing-feature-profile .landing-feature-copy { width:60%; }.landing-server-preview { right:-1.55rem; width:52%; }.landing-profile-preview { left:-1.65rem; }.landing-expression-preview { right:-1.3rem; width:53%; }.landing-close-wrap { padding-bottom:2.8rem; } }

/* ── Downloads ───────────────────────────────────────────── */

.downloads-page { overflow:hidden; background:var(--bg-0); }
.downloads-hero { position:relative; isolation:isolate; overflow:hidden; padding:clamp(4rem,8vw,7.4rem) 0 clamp(3.5rem,7vw,6rem); border-bottom:1px solid var(--line); background:radial-gradient(760px 520px at 7% 0,rgba(229,129,58,.23),transparent 68%),radial-gradient(700px 520px at 92% 23%,rgba(119,85,226,.19),transparent 68%),linear-gradient(180deg,rgba(60,38,28,.6),transparent 78%); }
.downloads-hero::before,.downloads-hero::after { content:''; position:absolute; z-index:-1; width:24rem; height:24rem; border:1px solid rgba(246,190,112,.1); border-radius:50%; pointer-events:none; }
.downloads-hero::before { right:-12rem; top:-8rem; box-shadow:0 0 0 3.5rem rgba(246,190,112,.025),0 0 0 7rem rgba(246,190,112,.018); }
.downloads-hero::after { left:-18rem; bottom:-18rem; box-shadow:0 0 0 4rem rgba(147,101,221,.035); }
.downloads-hero-inner { display:grid; grid-template-columns:minmax(0,.9fr) minmax(440px,1.1fr); align-items:center; gap:clamp(2rem,7vw,6.5rem); }
.downloads-copy { position:relative; z-index:2; }
.downloads-copy h1 { max-width:9.6ch; margin:0; color:var(--fg); font-size:clamp(3.05rem,6.25vw,5.55rem); font-weight:900; letter-spacing:-.068em; line-height:.93; }
.downloads-copy h1 em,.downloads-section-head h2 em,.downloads-browser h2 em { font-style:normal; background:linear-gradient(100deg,#f7904a 8%,#f5c867 45%,#a779e4 91%); -webkit-background-clip:text; background-clip:text; color:transparent; }
.downloads-lede { max-width:49ch; margin:1.4rem 0 1.7rem; color:var(--fg-mid); font-size:1.05rem; line-height:1.7; }
.downloads-actions { display:flex; flex-wrap:wrap; gap:.65rem; }
.downloads-actions .btn { align-items:center; gap:.45rem; }
.downloads-manage { display:inline-flex; gap:.35rem; margin-top:1.15rem; color:var(--fg-dim); font-size:.8rem; font-weight:700; text-decoration:none; }
.downloads-manage:hover { color:var(--accent-soft); }

.downloads-device { position:relative; min-height:454px; overflow:visible; border:1px solid rgba(235,197,156,.27); border-radius:1.35rem; background:rgba(34,24,21,.94); box-shadow:0 35px 88px rgba(0,0,0,.52); transform:rotate(1.5deg); }
.downloads-device::before { content:''; position:absolute; z-index:-1; inset:1.2rem -1.5rem -1.5rem 1.5rem; border:1px solid rgba(147,101,221,.22); border-radius:1.55rem; background:linear-gradient(135deg,rgba(147,101,221,.1),rgba(229,129,58,.07)); transform:rotate(-3deg); }
.downloads-device-top { display:flex; align-items:center; gap:.35rem; height:2.75rem; padding:0 .9rem; border-bottom:1px solid var(--line); border-radius:1.35rem 1.35rem 0 0; background:rgba(63,42,33,.82); }
.downloads-device-top span { width:.55rem; height:.55rem; border-radius:50%; background:#6d5145; }.downloads-device-top span:first-child { background:var(--accent); }.downloads-device-top b { margin-left:.45rem; color:var(--fg-mid); font-size:.68rem; }
.downloads-device-body { display:grid; grid-template-columns:66px 1fr; min-height:405px; }
.downloads-device-rail { display:grid; align-content:start; justify-items:center; gap:.7rem; padding:.9rem .45rem; border-right:1px solid var(--line); background:rgba(20,15,14,.68); }
.downloads-device-rail img { width:31px; height:31px; object-fit:contain; border-radius:.7rem; }.downloads-device-rail i { width:29px; height:29px; border:1px solid rgba(255,255,255,.08); border-radius:50%; background:linear-gradient(145deg,#694da5,#d676a4); }.downloads-device-rail i:nth-of-type(2) { background:linear-gradient(145deg,#dc8a54,#f6c166); }.downloads-device-rail i:nth-of-type(3) { background:linear-gradient(145deg,#438eb7,#7cdad0); }
.downloads-device-chat { display:grid; grid-template-rows:51px 1fr auto; min-width:0; }.downloads-device-bar { display:flex; align-items:center; gap:.75rem; padding:0 .88rem; border-bottom:1px solid var(--line); }.downloads-device-bar b { color:var(--fg); font-size:.76rem; }.downloads-device-bar span { margin-left:auto; color:var(--fg-dim); font-size:.75rem; }.downloads-device-bar span + span { margin-left:0; }
.downloads-device-message { display:flex; align-items:flex-start; gap:.5rem; padding:1rem .9rem 0; color:var(--fg-mid); }.downloads-device-message img { width:28px; height:28px; flex:none; border-radius:50%; object-fit:cover; }.downloads-device-message p { margin:0; font-size:.72rem; line-height:1.55; }.downloads-device-message p b { color:var(--fg); font-size:.71rem; }.downloads-device-message p small { margin-left:.35rem; color:var(--fg-dim); font-size:.57rem; }.downloads-device-message.is-reply { margin-left:1.65rem; padding-top:.8rem; }
.downloads-device-composer { display:flex; align-items:center; gap:.55rem; min-height:39px; margin:.65rem .7rem .72rem; padding:0 .75rem; border:1px solid var(--line-2); border-radius:.78rem; background:rgba(71,50,40,.78); color:var(--fg-dim); font-size:.65rem; }.downloads-device-composer span { margin-left:auto; color:var(--accent-soft); font-size:.61rem; font-weight:800; }.downloads-device-composer b { display:grid; place-items:center; width:23px; height:23px; border-radius:.48rem; background:var(--accent); color:#2c170e; font-size:.64rem; }
.downloads-device-float { position:absolute; right:-1.15rem; bottom:2.8rem; display:grid; grid-template-columns:auto 1fr; column-gap:.45rem; padding:.65rem .8rem; border:1px solid rgba(255,255,255,.14); border-radius:.8rem; background:rgba(45,33,29,.93); box-shadow:0 16px 32px rgba(0,0,0,.35); backdrop-filter:blur(14px); }.download-available-dot { grid-row:span 2; width:.55rem; height:.55rem; margin-top:.23rem; border-radius:50%; background:var(--ok); box-shadow:0 0 0 4px rgba(108,201,139,.11); }.downloads-device-float b { color:var(--fg); font-size:.68rem; }.downloads-device-float small { color:var(--fg-dim); font-size:.58rem; }

.downloads-benefits { display:grid; grid-template-columns:repeat(3,1fr); margin-top:0; border:1px solid var(--line); border-top:0; background:rgba(37,27,23,.58); }.downloads-benefits > div { min-height:132px; padding:1.25rem 1.5rem; border-right:1px solid var(--line); }.downloads-benefits > div:last-child { border-right:0; }.downloads-benefits span,.downloads-benefits b { display:block; }.downloads-benefits span { margin-bottom:.45rem; color:var(--accent); font-size:.66rem; font-weight:850; letter-spacing:.1em; }.downloads-benefits b { margin-bottom:.35rem; color:var(--fg); font-size:.89rem; }.downloads-benefits p { max-width:27ch; margin:0; color:var(--fg-dim); font-size:.77rem; line-height:1.5; }

.downloads-builds { padding-top:clamp(4rem,8vw,7.4rem); padding-bottom:clamp(4rem,7vw,6.5rem); }.downloads-section-head { display:flex; align-items:end; justify-content:space-between; gap:2rem; margin-bottom:2.25rem; }.downloads-section-head h2 { margin:0; font-size:clamp(2.1rem,4.2vw,3.45rem); letter-spacing:-.06em; line-height:1.04; }.downloads-section-head > p { max-width:42ch; margin:0 0 .3rem; color:var(--fg-mid); font-size:.94rem; line-height:1.62; }
.downloads-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }.download-card { position:relative; display:flex; flex-direction:column; min-height:525px; overflow:hidden; padding:1.25rem; border:1px solid var(--line); border-radius:1.2rem; background:linear-gradient(145deg,rgba(57,40,32,.92),rgba(28,22,20,.98)); }.download-card::after { content:''; position:absolute; right:-2.5rem; bottom:-4rem; width:12rem; height:12rem; border-radius:50%; background:rgba(229,129,58,.065); filter:blur(12px); pointer-events:none; }.download-card-android::after { background:rgba(110,183,121,.09); }.download-card header { position:relative; z-index:1; display:flex; align-items:center; gap:.68rem; }.download-platform-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:.76rem; background:var(--accent-wash); color:var(--accent-soft); font-size:1.05rem; }.download-card header p { margin:0 0 .1rem; color:var(--fg-dim); font-size:.63rem; font-weight:800; letter-spacing:.075em; text-transform:uppercase; }.download-card header h3 { margin:0; color:var(--fg); font-size:1.12rem; letter-spacing:-.03em; }.download-staff { display:inline-flex; margin-left:auto; padding:.2rem .42rem; border-radius:999px; background:rgba(103,197,139,.12); color:var(--ok); font-size:.62rem; font-weight:850; letter-spacing:.06em; text-transform:uppercase; }
.download-card-art { position:relative; height:135px; margin:1.25rem 0 1rem; overflow:hidden; border:1px solid rgba(255,255,255,.09); border-radius:.9rem; background:radial-gradient(circle at 50% 46%,rgba(248,193,101,.28),transparent 19%),linear-gradient(135deg,rgba(229,129,58,.3),rgba(128,80,206,.25)); }.download-card-android .download-card-art { background:radial-gradient(circle at 50% 46%,rgba(126,215,139,.25),transparent 19%),linear-gradient(135deg,rgba(77,159,105,.31),rgba(90,121,213,.24)); }.download-card-art span { position:absolute; z-index:1; left:50%; top:50%; display:grid; place-items:center; width:64px; height:64px; border:1px solid rgba(255,255,255,.19); border-radius:1.25rem; background:rgba(35,25,23,.52); box-shadow:0 12px 28px rgba(0,0,0,.25); color:#f8d18b; font-size:2rem; transform:translate(-50%,-50%) rotate(-8deg); }.download-card-art i { position:absolute; width:94px; height:94px; border:1px solid rgba(255,255,255,.12); border-radius:50%; }.download-card-art i:nth-of-type(1) { left:13%; top:-47px; }.download-card-art i:nth-of-type(2) { right:11%; bottom:-62px; }.download-card-art i:nth-of-type(3) { right:34%; top:-67px; width:160px; height:160px; border-color:rgba(255,255,255,.06); }
.download-summary { min-height:2.7em; margin:0 0 1rem; color:var(--fg-mid); font-size:.85rem; line-height:1.55; }.download-meta { display:grid; grid-template-columns:repeat(3,1fr); gap:.5rem; margin:0 0 .85rem; padding:.68rem .7rem; border:1px solid var(--line); border-radius:.72rem; background:rgba(18,15,14,.3); }.download-meta dt { color:var(--fg-dim); font-size:.59rem; font-weight:750; letter-spacing:.055em; text-transform:uppercase; }.download-meta dd { margin:.2rem 0 0; color:var(--fg); font-size:.72rem; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.download-notes { margin:0 0 .9rem; font-size:.77rem; }.download-notes summary { display:flex; align-items:center; justify-content:space-between; cursor:pointer; color:var(--fg-mid); font-weight:750; list-style:none; }.download-notes summary::-webkit-details-marker { display:none; }.download-notes summary span { color:var(--accent); font-size:1rem; transition:transform .16s; }.download-notes[open] summary span { transform:rotate(45deg); }.download-notes > div { margin-top:.55rem; padding:.55rem .68rem; border-left:2px solid var(--accent); border-radius:0 .48rem .48rem 0; background:rgba(20,16,14,.28); color:var(--fg-dim); line-height:1.5; }
.download-card-actions { display:flex; flex-wrap:wrap; gap:.55rem; margin-top:auto; }.download-card-actions .btn { display:inline-flex; align-items:center; gap:.44rem; }.download-card-actions .app-icon { width:.96rem; height:.96rem; object-fit:contain; }.download-card-actions .app-icon[data-icon-animated][data-icon-playing] { object-fit:fill; transform:scale(var(--app-icon-hover-scale,1)); transform-origin:center; }.download-requirements { margin:.75rem 0 0; color:var(--fg-dim); font-size:.71rem; line-height:1.45; }.download-coming { display:flex; align-items:center; gap:.65rem; min-height:72px; margin-top:auto; padding:.72rem; border:1px dashed var(--line-2); border-radius:.8rem; background:rgba(25,20,18,.25); }.download-coming > span { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:var(--bg-4); color:var(--fg-dim); }.download-coming p { margin:0; color:var(--fg-dim); font-size:.74rem; line-height:1.45; }.download-coming b { color:var(--fg-mid); }.download-staff-build { position:relative; z-index:1; display:flex; align-items:center; gap:.55rem; margin-top:.9rem; padding-top:.8rem; border-top:1px dashed var(--line-2); }.download-staff-build .download-staff { margin-left:0; }.download-staff-build p { flex:1; margin:0; line-height:1.25; }.download-staff-build b,.download-staff-build small { display:block; }.download-staff-build b { font-size:.76rem; }.download-staff-build small { margin-top:.12rem; color:var(--fg-dim); font-size:.64rem; }
.downloads-empty { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:1.25rem; padding:clamp(1.35rem,4vw,2.35rem); border:1px solid var(--line); border-radius:1.2rem; background:linear-gradient(135deg,rgba(65,44,33,.86),rgba(30,23,20,.96)); }.downloads-empty-icon { display:grid; place-items:center; width:58px; height:58px; border-radius:1rem; background:var(--accent-wash); color:var(--accent-soft); }.downloads-empty-icon .app-icon { width:1.7rem; height:1.7rem; object-fit:contain; }.downloads-empty h3 { margin:.25rem 0 .45rem; color:var(--fg); font-size:1.2rem; }.downloads-empty p:not(.landing-eyebrow) { max-width:52ch; margin:0; color:var(--fg-mid); font-size:.84rem; line-height:1.55; }
.downloads-browser { display:grid; grid-template-columns:1.1fr minmax(200px,.75fr) auto; align-items:center; gap:2rem; padding:clamp(1.5rem,4vw,3rem); margin-bottom:4.5rem; overflow:hidden; border:1px solid rgba(155,116,225,.28); border-radius:1.25rem; background:radial-gradient(460px 220px at 5% 0,rgba(229,129,58,.18),transparent 78%),radial-gradient(380px 240px at 100% 100%,rgba(147,101,221,.2),transparent 76%),var(--bg-1); }.downloads-browser h2 { margin:0; font-size:clamp(1.6rem,3.1vw,2.55rem); letter-spacing:-.055em; line-height:1.04; }.downloads-browser > p { margin:0; color:var(--fg-mid); font-size:.86rem; line-height:1.6; }.downloads-browser .btn { white-space:nowrap; }.download-staff-build .btn { display:inline-flex; align-items:center; gap:.35rem; }.download-staff-build .app-icon,.ver-head .app-icon { width:.85rem; height:.85rem; object-fit:contain; vertical-align:-.1em; }
@media (max-width:980px) { .downloads-hero-inner { grid-template-columns:1fr; gap:2.6rem; }.downloads-copy h1 { max-width:12ch; }.downloads-device { width:min(100%,650px); margin:0 auto; }.downloads-grid { grid-template-columns:1fr; }.downloads-browser { grid-template-columns:1fr 1fr; }.downloads-browser .btn { justify-self:start; }.downloads-browser > p { grid-column:2; grid-row:1; } }
@media (max-width:700px) { .downloads-hero { padding-top:3.4rem; }.downloads-copy h1 { font-size:clamp(2.8rem,12vw,4.5rem); }.downloads-lede { font-size:.98rem; }.downloads-actions .btn { width:100%; justify-content:center; }.downloads-device { min-height:340px; border-radius:1rem; transform:rotate(.6deg); }.downloads-device::before { inset:1rem -.4rem -.65rem .65rem; }.downloads-device-top { height:2.35rem; border-radius:1rem 1rem 0 0; }.downloads-device-body { grid-template-columns:48px 1fr; min-height:297px; }.downloads-device-rail { gap:.48rem; padding:.62rem .25rem; }.downloads-device-rail img,.downloads-device-rail i { width:25px; height:25px; }.downloads-device-chat { grid-template-rows:42px 1fr auto; }.downloads-device-bar { padding:0 .65rem; }.downloads-device-message { padding:.68rem .58rem 0; }.downloads-device-message p { font-size:.64rem; }.downloads-device-message.is-reply { margin-left:.6rem; }.downloads-device-composer { min-height:34px; margin:.48rem .5rem .55rem; }.downloads-device-float { right:-.2rem; bottom:-1.05rem; transform:scale(.85); transform-origin:bottom right; }.downloads-benefits { grid-template-columns:1fr; border-left:0; border-right:0; }.downloads-benefits > div { min-height:auto; padding:1rem 1.25rem; border:0; border-bottom:1px solid var(--line); }.downloads-benefits > div:last-child { border-bottom:0; }.downloads-section-head { display:block; }.downloads-section-head > p { margin-top:1rem; }.download-card { min-height:500px; }.downloads-empty { grid-template-columns:auto 1fr; }.downloads-empty .btn { grid-column:1 / -1; justify-self:start; }.downloads-browser { grid-template-columns:1fr; gap:1rem; margin-bottom:2.6rem; }.downloads-browser > p { grid-column:auto; grid-row:auto; }.downloads-browser .btn { width:100%; justify-content:center; } }
@media (max-width:430px) { .downloads-device { min-height:307px; }.downloads-device-body { min-height:264px; }.downloads-device-message p small { display:none; }.downloads-device-message img { width:22px; height:22px; }.downloads-device-message.is-reply { padding-top:.48rem; }.downloads-device-float { display:none; }.downloads-grid { gap:.8rem; }.download-card { min-height:0; padding:1rem; }.download-card-art { height:116px; margin:1rem 0 .8rem; }.download-meta { gap:.28rem; padding:.6rem .5rem; }.download-meta dd { font-size:.65rem; }.downloads-empty { display:flex; flex-direction:column; align-items:flex-start; gap:.85rem; }.downloads-empty-icon { width:46px; height:46px; } }

/* ── Panels (profile, admin) ──────────────────────────────── */

.page-pad { padding: 2.25rem 1.25rem 4rem; }

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.panel-stack { display: grid; gap: 1rem; }

.panel {
  padding: 1.35rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-title {
  margin: 0 0 1.1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.avatar-row > div { flex: 1; min-width: 0; }

/* The handle field shows its @ inside the box, so the value lines up with
   how the name is written everywhere else. Mirrors the sign-up form. */
.prefixed { position: relative; }
.prefixed .at {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-dim);
  font-size: 0.94rem;
  pointer-events: none;
}
.prefixed .input { padding-left: 1.65rem; }

.banner-preview,
.server-cover-positioner {
  display: block;
  width: 100%;
  height: 92px;
  margin-bottom: 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  background-size: cover;
  background-position: center;
}
.banner-preview { object-fit: cover; }
.server-cover-positioner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: grab;
  touch-action: none;
}
.server-cover-positioner:active,
.server-cover-positioner.is-dragging { cursor: grabbing; }
.server-cover-positioner:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.server-cover-positioner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.32));
  pointer-events: none;
}
.server-cover-positioner-hint {
  position: absolute;
  left: .65rem;
  bottom: .55rem;
  z-index: 1;
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  padding: .24rem .45rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 99px;
  background: rgba(20,14,12,.62);
  color: #fff;
  font-size: .7rem;
  font-weight: 720;
}
.server-cover-reset {
  position: absolute;
  right: .5rem;
  top: .5rem;
  z-index: 1;
  border-color: rgba(255,255,255,.3);
  background: rgba(20,14,12,.65);
  color: #fff;
}

.input-colour {
  width: 76px;
  height: 40px;
  padding: 0.2rem;
  cursor: pointer;
}

@media (max-width: 780px) {
  .panel-grid { grid-template-columns: 1fr; }
}

/* ── Admin ────────────────────────────────────────────────── */

.admin-chip {
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: rgba(229, 129, 58, 0.16);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--fg-mid);
  cursor: pointer;
}
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.table-scroll { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.table th {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-align: left;
  white-space: nowrap;
}
.table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }

.row-actions { display: flex; gap: 0.4rem; justify-content: flex-end; }
.mono { font-family: var(--mono); font-weight: 700; }

.badge-catalogue-table { border-collapse: separate; border-spacing: 0 .52rem; }
.badge-catalogue-table th { border-bottom: 0; }
.badge-catalogue-table td {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.badge-catalogue-table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 10px 0 0 10px;
}
.badge-catalogue-table td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 10px 10px 0;
}
.badge-catalogue-table tr:last-child td { border-bottom: 1px solid var(--line); }
.badge-catalogue-table tbody tr:hover td { background: var(--bg-2); border-color: var(--line-2); }

/* ── Footer ───────────────────────────────────────────────── */

.sitefoot {
  border-top: 1px solid var(--line);
  background: var(--bg-1);
}
.sitefoot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.25rem 1.5rem;
}
.sitefoot-line { margin: 0.5rem 0 0; font-size: 0.87rem; }
.sitefoot-links { display: grid; gap: 0.45rem; align-content: start; }
.sitefoot-links a { color: var(--fg-mid); font-size: 0.88rem; }
.sitefoot-links a:hover { color: var(--fg); }
.sitefoot-base {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

/* ── Client Center ────────────────────────────────────────── */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: 1rem;
}

.dl-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dl-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.dl-head h3 { margin: 0; font-size: 1.05rem; font-weight: 720; }

.dl-glyph {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(229, 129, 58, 0.14);
  color: var(--accent);
  font-size: 1.15rem;
}

.dl-platform {
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.dl-summary { margin: 0 0 1rem; font-size: 0.9rem; color: var(--fg-mid); }

.dl-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding: 0.7rem 0.8rem;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.dl-meta dt {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.dl-meta dd { margin: 0.15rem 0 0; font-size: 0.87rem; font-weight: 600; }

.dl-notes { margin-bottom: 1rem; font-size: 0.87rem; }
.dl-notes summary {
  cursor: pointer;
  color: var(--fg-mid);
  font-weight: 600;
  list-style: none;
}
.dl-notes summary::-webkit-details-marker { display: none; }
.dl-notes summary::before { content: '▸ '; color: var(--accent); }
.dl-notes[open] summary::before { content: '▾ '; }
.dl-notes > div {
  margin-top: 0.55rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--line-2);
  color: var(--fg-mid);
}

.dl-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; }
.dl-req  { margin: 0.75rem 0 0; font-size: 0.8rem; }
.dl-soon { margin: 0; font-size: 0.88rem; }

.tag {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-3);
  color: var(--fg-mid);
}
.tag-warn { background: rgba(240, 161, 101, 0.16); color: var(--accent-soft); }
.tag-ok   { background: rgba(99, 201, 139, 0.15); color: var(--ok); }

/* Staff-controlled trust mark for PawTalk's own servers. */
.official-server-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.24rem 0.52rem;
  border: 1px solid rgba(92, 184, 255, 0.34);
  border-radius: 999px;
  background: rgba(58, 145, 225, 0.18);
  color: #8dcfff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.015em;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(20, 103, 173, 0.08) inset;
}
.official-server-badge i,
.official-check {
  display: inline-grid;
  place-items: center;
  font-style: normal;
}
.official-server-badge i {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #4aa9ef;
  color: #10202c;
  font-size: 0.64rem;
}

/* The mark beside a server's name, drawn or uploaded. Sized in em so it
   follows whatever text it sits next to, and coloured by currentColor so
   an SVG takes the badge's blue without being told twice. */
.server-mark {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  vertical-align: -0.16em;
  color: #4aa9ef;
  object-fit: contain;
}
/* The wrapper exists to hold the tooltip. It must not change the layout,
   only give the mark something focusable to hang off. */
.server-mark-wrap {
  display: inline-flex;
  align-items: center;
  cursor: help;
  border-radius: 50%;
}
.server-mark-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.server-mark.is-official { color: #e5813a; }
.disc-card .server-mark { width: 1.5rem; height: 1.5rem; vertical-align: middle; }
.disc-card .server-mark-wrap { margin-left: 0.25rem; }
.server-mark.is-verified { color: #4aa9ef; }
.server-mark.is-partner  { color: #b57bff; }

/* Bigger, for the settings preview where it is the subject. */
.mark-preview .server-mark { width: 2rem; height: 2rem; vertical-align: middle; }

.official-mark {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  vertical-align: -0.16em;
  color: #4aa9ef;
}
.official-server-badge .official-mark { color: #4aa9ef; }
.official-server-badge.is-compact { padding: 0.16rem 0.38rem; font-size: 0.64rem; }
.official-server-tag { background: rgba(58, 145, 225, 0.18); color: #8dcfff; }
.official-server-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-left: 3px solid #4aa9ef;
}
.official-check {
  width: 16px;
  height: 16px;
  margin-left: 0.32rem;
  border-radius: 50%;
  background: #4aa9ef;
  color: #10202c;
  font-size: 0.65rem;
  vertical-align: 0.12rem;
}
.tag-danger { background: rgba(211, 47, 47, 0.15); color: #d32f2f; }

/* ── Version list ─────────────────────────────────────────── */

.crumb { margin: 0 0 1.25rem; font-size: 0.88rem; }
.crumb a { color: var(--fg-mid); }
.crumb a:hover { color: var(--fg); }

.ver-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }

.ver {
  padding: 0.9rem 1rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ver-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.ver-num  { font-family: var(--mono); font-size: 0.95rem; font-weight: 700; }
.ver-when { font-size: 0.82rem; }
.ver .tag { margin-left: 0; }
.ver-notes {
  margin-top: 0.7rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--line-2);
  font-size: 0.87rem;
  color: var(--fg-mid);
}

/* ── Server settings ──────────────────────────────────────── */
/* The forms live on a dedicated route but are presented as one focused,
   modal-like workspace with a persistent section rail. */

.settings {
  position: relative;
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}

/* A settings page is a work surface, not a dead end. The explicit close
   control stays available even after the reader has scrolled its contents. */
.settings-close {
  position: absolute;
  z-index: 20;
  top: 2.1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--bg-3);
  color: var(--fg-mid);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.12s;
}
.settings-close:hover {
  border-color: var(--accent-edge);
  background: var(--bg-4);
  color: var(--fg);
  transform: translateY(-1px);
}
.settings-close .app-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}
.settings-close .app-icon[data-icon-animated][data-icon-playing] {
  /* The animated export has its own motion canvas. Keep its intended
     footprint when the still art swaps over, exactly as it does in chat. */
  object-fit: fill;
  transform: scale(var(--app-icon-hover-scale, 1));
  transform-origin: center;
}
.settings-close:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

.settings-rail {
  padding: 1.5rem 0.75rem;
  background: var(--bg-1);
  border-right: 1px solid var(--line);
}

.settings-back {
  display: block;
  padding: 0.35rem 0.6rem;
  margin-bottom: 1rem;
  color: var(--fg-dim);
  font-size: 0.85rem;
}
.settings-back:hover { color: var(--fg); text-decoration: none; }

.settings-server {
  padding: 0 0.6rem 1rem;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-group {
  padding: 1rem 0.6rem 0.35rem;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.settings-link {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--fg-mid);
  font-size: 0.92rem;
  font-weight: 600;
}
.settings-link:hover { background: var(--bg-2); color: var(--fg); text-decoration: none; }
.settings-link.on { background: var(--bg-3); color: var(--fg); }
.settings-link.is-danger { color: var(--busy); }
.settings-link.is-danger:hover { background: rgba(226, 99, 90, 0.14); color: var(--busy); }

.settings-sep { height: 1px; margin: 0.85rem 0.6rem; background: var(--line); }

.settings-main {
  position: relative;
  padding: 2.25rem 2.5rem 5rem;
  max-width: 1000px;
}

.settings-head { margin-bottom: 1.75rem; }
.settings-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 780;
  letter-spacing: -0.025em;
}
.settings-head p { margin: 0; max-width: 60ch; color: var(--fg-mid); font-size: 0.92rem; }

.settings-sub { margin: 0; font-size: 1rem; font-weight: 720; }

.settings-rule { height: 1px; margin: 1.5rem 0; background: var(--line); }

.settings-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  align-items: start;
}
.settings-split.wide-left { grid-template-columns: 300px minmax(0, 1fr); }

.settings-form { max-width: 560px; }

.webhook-panel, .webhook-list { max-width: 760px; }
.webhook-panel h2, .webhook-card h2, .webhook-secret h2 { margin: 0 0 .45rem; }
.webhook-secret { max-width: 760px; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.webhook-secret-row { display:flex; gap:.65rem; align-items:center; }
.webhook-secret-row .input { min-width:0; flex:1; }
.webhook-list { display:grid; gap:1rem; margin-top:1rem; }
.webhook-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.webhook-avatar { width:44px; height:44px; border-radius:50%; object-fit:cover; }
.webhook-form { display:grid; gap:.8rem; }
.webhook-form .field { margin:0; }
.webhook-actions { display:flex; flex-wrap:wrap; gap:.75rem; align-items:center; margin-top:1rem; padding-top:1rem; border-top:1px solid var(--line); }
.webhook-actions form { margin:0; }
.webhook-delete { display:flex; align-items:center; gap:.55rem; }
.webhook-tag { background:#347d5e; }
.webhook-help { margin:.75rem 0 0; padding:.75rem .9rem; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--bg-2, var(--bg-1)); }
.webhook-help summary { cursor:pointer; font-weight:700; }
.webhook-help p { margin:.6rem 0 0; }
.webhook-help ul { margin:.5rem 0 0; padding-left:1.2rem; display:grid; gap:.25rem; }
@media (max-width: 560px) { .webhook-secret-row { align-items:stretch; flex-direction:column; } }

.settings-search { display: flex; gap: 0.5rem; max-width: 420px; margin-bottom: 1.25rem; }

.settings-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--bg-3);
  color: var(--fg);
  font-size: 1.4rem;
  font-weight: 800;
  overflow: hidden;
}
.settings-icon img { width: 100%; height: 100%; object-fit: cover; }

/* Level 1 server themes change the accent family, never reading surfaces.
   Each option is therefore previewed on neutral cards with ordinary text. */
.server-theme-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.server-theme-heading .label { margin-bottom: 0.18rem; }
.server-theme-heading .hint { margin: 0; max-width: 48ch; }
.server-theme-level {
  flex: none;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--accent-edge);
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-soft);
  font-size: 0.62rem;
  font-weight: 850;
  white-space: nowrap;
}
.server-theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.server-theme-choice {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-1);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.server-theme-choice:hover { border-color: rgba(var(--theme-rgb), .6); background: var(--bg-2); transform: translateY(-1px); }
.server-theme-choice:has(input:checked) {
  border-color: var(--theme-accent);
  background: linear-gradient(130deg, rgba(var(--theme-rgb),.13), var(--bg-1) 68%);
  box-shadow: inset 3px 0 var(--theme-accent);
}
.server-theme-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.server-theme-choice input:focus-visible ~ .server-theme-swatch { outline: 2px solid var(--theme-soft); outline-offset: 3px; }
.server-theme-swatch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 54px;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 10px;
  background: var(--theme-accent);
}
.server-theme-swatch i:nth-child(1) { background: var(--theme-soft); }
.server-theme-swatch i:nth-child(2) { background: var(--theme-accent); }
.server-theme-swatch i:nth-child(3) { background: var(--theme-deep); }
.server-theme-copy { display: grid; gap: 0.12rem; min-width: 0; }
.server-theme-copy b { color: var(--fg); font-size: 0.78rem; }
.server-theme-copy small { color: var(--fg-dim); font-size: 0.65rem; line-height: 1.35; }
.server-theme-check { color: var(--theme-soft); font-size: 0.82rem; font-weight: 900; opacity: 0; }
.server-theme-choice:has(input:checked) .server-theme-check { opacity: 1; }
.server-theme-field.is-locked .server-theme-grid {
  padding: 0.55rem;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  background: var(--bg-1);
}
.server-theme-field.is-locked .server-theme-choice { cursor: not-allowed; }
.server-theme-field.is-locked .server-theme-choice:hover { border-color: var(--line); background: var(--bg-1); transform: none; }
.server-theme-field.is-locked .server-theme-level { border-color: var(--line-2); background: var(--bg-2); color: var(--fg-dim); }
.server-theme-lock-note { margin: 0.75rem 0 0; color: var(--fg-mid); }

@media (max-width: 620px) {
  .server-theme-heading { flex-direction: column; }
  .server-theme-grid { grid-template-columns: 1fr; }
}

/* Banner presets */
.banner-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.banner-swatch {
  position: relative;
  height: 54px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.banner-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.banner-swatch:hover { border-color: var(--line-2); }
.banner-swatch.on, .banner-swatch:has(input:checked) { border-color: var(--fg); }
.banner-swatch.is-none {
  display: grid;
  place-items: center;
  background: var(--bg-2);
  border: 2px dashed var(--line-2);
  color: var(--fg-dim);
  font-size: 0.78rem;
}

/* Discover-card preview */
.settings-preview { position: sticky; top: 1.5rem; }
.preview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  overflow: hidden;
}
.preview-banner { height: 76px; background-size: cover; background-position: center; }
.preview-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 0.9rem;
  border: 3px solid var(--bg-1);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--accent-soft), var(--accent));
  color: var(--accent-ink);
  font-size: 0.95rem;
  font-weight: 800;
  overflow: hidden;
}
.preview-icon img { width: 100%; height: 100%; object-fit: cover; }
.preview-body { padding: 0.6rem 0.9rem 1rem; }
.preview-body b { display: block; font-size: 0.98rem; }
.preview-body p {
  margin: 0.25rem 0 0.5rem;
  color: var(--fg-mid);
  font-size: 0.85rem;
  line-height: 1.4;
}
.preview-body small { color: var(--fg-dim); font-size: 0.78rem; }

/* ── Roles ────────────────────────────────────────────────── */

.role-list { display: grid; gap: 2px; }

.role-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--fg-mid);
}
.role-row:hover { border-color: var(--line-2); color: var(--fg); text-decoration: none; }
.role-row.on { border-color: var(--accent); color: var(--fg); }

.role-dot {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.role-name { flex: 1; min-width: 0; font-size: 0.92rem; font-weight: 620; }
.role-name .tag { margin-left: 0.35rem; }
.role-count { flex: none; font-size: 0.78rem; color: var(--fg-dim); }

.role-editor { position: sticky; top: 1.5rem; }

.perm-group {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.perm {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.perm:hover { background: var(--bg-2); }
.perm.is-off { opacity: 0.45; cursor: not-allowed; }
.perm input { margin-top: 0.2rem; width: 16px; height: 16px; accent-color: var(--accent); }
.perm-text b { display: block; font-size: 0.88rem; font-weight: 620; }
.perm-text small { display: block; font-size: 0.79rem; color: var(--fg-dim); }

/* ── Members table ────────────────────────────────────────── */

.member-table { display: grid; gap: 0.5rem; }

.member-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  overflow: hidden;
}
.member-card.is-open { border-color: var(--line-2); }

.member-line { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.85rem; }
.member-who { flex: 1; min-width: 0; line-height: 1.3; }
.member-who b { display: block; font-size: 0.93rem; }
.member-who small { display: block; font-size: 0.79rem; color: var(--fg-dim); }
.ban-reason { font-style: italic; margin-top: 0.15rem; }

.member-roles { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; max-width: 40%; }

.role-pill {
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-mid);
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
}

.member-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1rem 0.85rem 1.1rem;
  border-top: 1px solid var(--line);
  background: var(--bg-0);
}
.member-panel .check { margin-bottom: 0.25rem; }
.member-panel .check.is-off { opacity: 0.45; }
.member-panel .check span { display: inline-flex; align-items: center; gap: 0.4rem; }
.member-danger .label { color: var(--busy); }

/* ── Server level ─────────────────────────────────────────── */

.level-now {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.level-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(150deg, var(--accent-soft), var(--accent));
  color: var(--accent-ink);
}
.level-num { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.level-badge small { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }

.level-count { line-height: 1.35; }
.level-count b { font-size: 1.3rem; }
.level-count small { display: block; margin-top: 0.2rem; font-size: 0.84rem; }

.level-bar {
  height: 7px;
  margin-top: 0.7rem;
  border-radius: 4px;
  background: var(--bg-3);
  overflow: hidden;
}
.level-bar span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width 0.3s;
}

.tier-list { display: grid; gap: 0.55rem; }

.tier {
  padding: 0.8rem 0.95rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tier.on   { border-color: var(--accent); background: var(--accent-wash); }
.tier.past { opacity: 0.65; }

.tier-head { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.4rem; }
.tier-head b { font-size: 0.95rem; }
.tier-head span { font-size: 0.8rem; margin-left: auto; }

.tier-perks { margin: 0; padding-left: 1.1rem; font-size: 0.86rem; color: var(--fg-mid); }
.tier-perks li { margin-bottom: 0.15rem; }
.tier-perks:empty::after { content: 'Everything below, nothing new.'; color: var(--fg-dim); }

.pp-list { display: grid; gap: 0.45rem; }
.pp-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; }
.pp-row small { display: block; font-size: 0.78rem; }
.pp-glyph { font-size: 1.1rem; }

/* ── Emoji manager ────────────────────────────────────────── */

.emoji-section {
  margin-bottom: 2rem;
}
.emoji-section-head {
  margin-bottom: 0.75rem;
}

.emoji-empty-state {
  text-align: center;
  padding: 3rem 1rem;
}
.emoji-empty-visual {
  margin-bottom: 1rem;
}
.emoji-empty-state h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.emoji-table {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.emoji-table-head {
  display: grid;
  grid-template-columns: 60px 1fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 1rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
}
.emoji-table-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
}
.emoji-table-row:last-child { border-bottom: none; }
.emoji-table-empty {
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
}
.emoji-col-img img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.emoji-col-name code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent-soft);
}
.emoji-col-by { font-size: 0.85rem; }
.emoji-col-actions form { display: inline; }

@media (max-width: 600px) {
  .emoji-table-head,
  .emoji-table-row { grid-template-columns: 48px 1fr auto; }
  .emoji-col-by { display: none; }
}

/* ── Stickers ──────────────────────────────────────────────── */

/* The "one more level" nudge. Accent rather than the flat panel colour,
   because it is the only thing on the page asking for something. */
.sticker-next {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent-edge);
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: var(--accent-ink);
}
.sticker-next-mark { font-size: 1.75rem; line-height: 1; }
.sticker-next-text { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.sticker-next-text strong { font-size: 1rem; }
.sticker-next-text span { font-size: 0.87rem; opacity: 0.92; }
.sticker-next .btn {
  flex: none;
  background: var(--bg-0);
  border-color: var(--line-2);
  color: #fff;
}
.sticker-next .btn:hover { background: rgba(255, 255, 255, 0.26); }

.sticker-guide {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.sticker-guide h3 { margin: 0 0 0.4rem; font-size: 1rem; font-weight: 700; }
.sticker-guide p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--fg-mid);
  line-height: 1.55;
}

/* The ladder. One rail down the left ties the tiers together so the
   locked ones read as further along the same track, not as separate cards. */
.sticker-ladder {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 2rem;
}
.sticker-ladder::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
}

.sticker-tier { position: relative; margin-bottom: 1.5rem; }
.sticker-tier:last-child { margin-bottom: 0; }

.sticker-tier-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sticker-tier-head strong { font-size: 0.98rem; }
.sticker-tier-head .muted {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.1rem;
}
.sticker-tier-info { flex: 1; min-width: 0; }

/* The dot sits on the rail, so it is positioned against the ladder rather
   than the tier box. */
.sticker-tier-dot {
  position: absolute;
  left: -1.6rem;
  top: 1.15rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--line);
  box-shadow: 0 0 0 4px var(--bg-0);
}
.sticker-tier-dot.is-on {
  background: var(--accent);
  border-color: var(--accent);
}

.sticker-meter {
  flex: none;
  width: 84px;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-3);
  overflow: hidden;
}
.sticker-meter > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

.sticker-tier-lock { flex: none; font-size: 1rem; opacity: 0.55; }

.sticker-tier-body { margin-top: 0.75rem; }
.sticker-tier-none { margin: 0; font-size: 0.86rem; }

.sticker-tier.is-locked .sticker-tier-head {
  background: var(--bg-2);
  border-style: dashed;
  opacity: 0.72;
}
/* Still used by the per-server sticker settings page, which keeps its own
   layout - the admin site-wide manager uses .expr-* below. */
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.sticker-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.4rem;
  margin: 0;                 /* it is a <figure> */
  padding: 1rem 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  text-align: center;
}

.sticker-card figcaption {
  display: grid;
  gap: 0.1rem;
  justify-items: center;
  max-width: 100%;
}
.sticker-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.sticker-card b {
  font-size: 0.82rem;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sticker-card small {
  font-size: 0.72rem;
}
.sticker-card .btn { margin-top: 0.25rem; }

/* The add tile is a real <button>, so the UA styling has to be undone
   before the card rules land on it. */
.sticker-card-add {
  align-content: center;
  min-height: 148px;
  font: inherit;
  color: var(--fg-dim);
  border-style: dashed;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.sticker-card-add:hover {
  border-color: var(--accent);
  background: var(--bg-2);
  color: var(--fg);
}
.sticker-card-add small { font-size: 0.78rem; }
.sticker-add-mark {
  font-size: 1.9rem;
  font-weight: 300;
  line-height: 1;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-3);
}

/* Sticker upload modal */
.sticker-upload-preview {
  width: 100%;
  height: 180px;
  border-radius: var(--radius);
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.sticker-upload-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.sticker-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--fg-dim);
}
.sticker-preview-empty span { font-size: 2rem; opacity: 0.4; }
.sticker-preview-empty small { font-size: 0.8rem; }

.sticker-file-input { position: relative; }
.sticker-file-input input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.sticker-file-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--fg-dim);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.sticker-file-label:hover { border-color: var(--fg-dim); }
.sticker-file-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  background: var(--bg-4);
  border-radius: 4px;
  font-size: 0.75rem;
}

.sticker-upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 600px) {
  .sticker-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ── Audit log ────────────────────────────────────────────── */

.audit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }

.audit-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
}
.audit-row:hover { background: var(--bg-1); }

.audit-text { flex: 1; min-width: 0; font-size: 0.89rem; line-height: 1.45; }
.audit-text small { display: block; margin-top: 0.15rem; font-size: 0.81rem; }
.audit-when { flex: none; font-size: 0.79rem; white-space: nowrap; padding-top: 0.1rem; }

.danger-panel { border-color: rgba(226, 99, 90, 0.4); }
.delete-list { margin: 0; padding-left: 1.1rem; color: var(--fg-mid); font-size: 0.9rem; }
.delete-list li { margin-bottom: 0.3rem; }

@media (max-width: 900px) {
  .settings-close { top: 1.2rem; right: 0.75rem; width: 38px; height: 38px; }
  .settings { grid-template-columns: 1fr; }
  .settings-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 1rem;
  }
  .settings-main { padding: 1.5rem 1.25rem 4rem; }
  .settings-split,
  .settings-split.wide-left { grid-template-columns: 1fr; }
  .settings-preview, .role-editor { position: static; }
  .member-panel { grid-template-columns: 1fr; }
  .member-roles { max-width: none; justify-content: flex-start; }
}

/* ── Discover ─────────────────────────────────────────────── */

.disc-hero {
  padding: 3rem 0 2.25rem;
  background:
    radial-gradient(900px 480px at 20% -14%, rgba(229, 129, 58, 0.18), transparent 62%),
    radial-gradient(700px 420px at 88% 6%,  rgba(240, 161, 101, 0.10), transparent 58%);
}
.disc-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.disc-hero p { margin: 0 0 1.6rem; max-width: 52ch; color: var(--fg-mid); }

.disc-search { display: flex; gap: 0.5rem; max-width: 480px; }

.disc-body { padding: 2rem 1.25rem 4rem; }

/* Category chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.75rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-1);
  color: var(--fg-mid);
  font-size: 0.85rem;
  font-weight: 600;
}
.chip:hover { border-color: var(--line-2); color: var(--fg); text-decoration: none; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip span {
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 700;
}
.chip.on span { background: rgba(0, 0, 0, 0.18); }

.disc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(266px, 1fr));
  gap: 1.15rem;
}

.disc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.16s, transform 0.16s;
}
.disc-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.disc-card.is-official {
  border-color: rgba(74, 169, 239, 0.34);
  box-shadow: 0 10px 32px rgba(24, 101, 160, 0.09);
}
.disc-card.is-official:hover { border-color: rgba(74, 169, 239, 0.58); }

.disc-banner {
  height: 86px;
  background-color: var(--bg-3);
  background-size: cover;
  background-position: center;
}
.disc-flag { position: absolute; top: 0.6rem; right: 0.6rem; margin: 0; }

.disc-level {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  margin: 0;
  background: rgba(0, 0, 0, 0.45);
  color: var(--accent-soft);
  backdrop-filter: blur(4px);
}

/* The icon straddles the banner edge, the way an avatar sits on a cover. */
.disc-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 1rem;
  border: 3px solid var(--bg-1);
  border-radius: 17px;
  background: var(--bg-3);
  color: var(--fg);
  font-size: 1rem;
  font-weight: 800;
  overflow: hidden;
}
.disc-icon img { width: 100%; height: 100%; object-fit: cover; }

.disc-content { display: flex; flex-direction: column; flex: 1; padding: 0.7rem 1rem 1rem; }
.disc-content h3 { margin: 0 0 0.3rem; font-size: 1.02rem; font-weight: 720; }

.disc-tagline {
  margin: 0 0 0.9rem;
  color: var(--fg-mid);
  font-size: 0.87rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.disc-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  margin-bottom: 0.9rem;
  font-size: 0.79rem;
  color: var(--fg-dim);
}
.disc-stats span { display: inline-flex; align-items: center; gap: 0.32rem; }
.disc-stats .pip {
  position: static;
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--off);
}
.disc-cat {
  margin-left: auto;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--bg-3);
  font-size: 0.72rem;
  font-weight: 700;
}

/* ── Invite landing ───────────────────────────────────────── */

.invite-card {
  max-width: 420px;
  margin: 1rem auto;
  padding: 2.25rem 2rem;
  text-align: center;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.invite-card.has-splash { overflow: hidden; padding: 0; text-align: left; }

/* The facts of a suspension, on suspended.php. Left-aligned inside a
   centred card because these are records to read, not a headline - a
   date and a reason line up badly when they are centred. */
.standing-facts {
  margin: 1.4rem 0 0;
  padding: 0.9rem 1rem;
  text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.standing-facts p { margin: 0 0 0.45rem; }
.standing-facts p:last-child { margin-bottom: 0; }
.standing-facts .muted { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

.invite-splash { height: 152px; background: var(--bg-3); }
.invite-splash img { width: 100%; height: 100%; display: block; object-fit: cover; }
.invite-card-content { padding: 2.25rem 2rem; text-align: center; }
.invite-card.has-splash .invite-card-content { padding-top: 0; }

.discover-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent-soft), var(--accent));
  color: var(--accent-ink);
  font-weight: 800;
  overflow: hidden;
}
.discover-icon img { width: 100%; height: 100%; object-fit: cover; }

.invite-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  border-radius: 22px;
  font-size: 1.5rem;
}
.invite-card.has-splash .invite-icon {
  position: relative;
  margin-top: -38px;
  border: 4px solid var(--bg-1);
}

.invite-lead  { margin: 0; font-size: 0.86rem; }
.invite-name  { margin: 0.3rem 0 0.5rem; font-size: 1.6rem; letter-spacing: -0.025em; }
.invite-official { margin: -0.1rem 0 0.8rem; }
.invite-desc  { margin: 0 0 0.5rem; color: var(--fg-mid); font-size: 0.92rem; }
.invite-count { margin: 0 0 1.5rem; font-size: 0.84rem; }

/* ── Empty state ──────────────────────────────────────────── */

.empty-panel {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--bg-1);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
}
.empty-glyph {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--bg-3);
  color: var(--accent);
  font-size: 1.4rem;
}
.empty-panel h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.empty-panel p  { margin: 0 auto 1.25rem; max-width: 44ch; font-size: 0.9rem; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .peek { order: -1; }
  .sitenav { gap: 0.8rem; padding: 0.6rem 1rem; }
  .sitenav-links { display: none; }
}

/* ── Discord-style settings ─────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  max-width: 740px;
}
.settings-nav {
  position: sticky;
  top: 1rem;
  align-self: start;
}
.settings-nav-item {
  display: block;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.15rem;
  border-radius: var(--radius-sm);
  color: var(--fg-dim);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.settings-nav-item:hover { background: var(--bg-3); color: var(--text); }
.settings-nav-item.active { background: var(--bg-3); color: var(--text); font-weight: 600; }

.settings-section { margin-bottom: 2.5rem; }
.settings-section h3 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-weight: 500; }
.settings-row-value {
  margin-top: 0.15rem;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--fg-dim);
}
.settings-edit {
  padding: 0.8rem;
  margin: 0.5rem 0 0.75rem;
  background: var(--bg-3);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.settings-edit .field { margin-bottom: 0.7rem; }
.settings-edit .field:last-of-type { margin-bottom: 0.8rem; }

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  margin-left: 0.5rem;
}
.btn-link:hover { text-decoration: underline; }

.hidden { display: none; }

@media (max-width: 600px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; gap: 0.5rem; margin-bottom: 1rem; }
}

/* ── Toasts ─────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--text);
  color: var(--bg);
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-ok { background: var(--green); color: #fff; }
.toast-error { background: #d32f2f; color: #fff; }
.toast-warn { background: #f9a825; color: #1a1204; }

/* Channel category cosmetics */
.category-style-level {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  overflow: hidden;
  border: 1px solid var(--accent-edge);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0 0, rgba(255,173,112,0.16), transparent 230px),
    linear-gradient(110deg, rgba(229,129,58,0.13), rgba(201,95,36,0.045));
  box-shadow: inset 0 1px rgba(255,255,255,0.035);
}
.category-style-level-badge {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 64px;
  height: 38px;
  padding: 0 0.7rem;
  border: 1px solid rgba(255,196,151,0.24);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 9px 22px rgba(201,95,36,0.20), inset 0 1px rgba(255,255,255,0.22);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.category-style-level div { min-width: 0; line-height: 1.25; }
.category-style-level b { display: block; font-size: 0.95rem; }
.category-style-level small { display: block; margin-top: 0.18rem; color: var(--fg-dim); font-size: 0.76rem; }
.category-style-level .btn { margin-left: auto; }

.category-style-studio {
  padding: clamp(1rem, 2.5vw, 1.45rem);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(229,129,58,0.055), transparent 320px),
    rgba(17,20,25,0.90);
}
.category-style-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.category-style-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 214px;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.025), transparent 45%),
    rgba(12,14,17,0.72);
  box-shadow: inset 0 1px rgba(255,255,255,0.02);
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .18s;
}
.category-style-choice:hover {
  border-color: rgba(255,173,112,0.25);
  background: linear-gradient(145deg, rgba(229,129,58,0.065), rgba(12,14,17,0.78));
  transform: translateY(-2px);
}
.category-style-choice:has(input:checked) {
  border-color: var(--accent);
  background:
    radial-gradient(circle at 100% 0, rgba(255,173,112,0.14), transparent 180px),
    linear-gradient(145deg, rgba(229,129,58,0.10), rgba(12,14,17,0.82));
  box-shadow: 0 18px 42px rgba(201,95,36,0.14), inset 0 0 0 1px rgba(255,173,112,0.10);
}
.category-style-choice input { position: absolute; opacity: 0; pointer-events: none; }
.category-style-choice input:focus-visible + .category-style-choice-top { outline: 2px solid var(--accent-soft); outline-offset: 4px; border-radius: 8px; }
.category-style-choice-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.8rem; }
.category-style-choice-number { color: var(--fg-dim); font-family: var(--mono); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; }
.category-style-tier {
  padding: 0.24rem 0.48rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.025);
  color: var(--fg-dim);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.category-style-choice:has(input:checked) .category-style-tier { border-color: rgba(255,173,112,0.22); background: var(--accent-wash); color: var(--accent-soft); }

.category-style-preview {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 54px;
  padding: 0.62rem 0.72rem;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--fg-dim);
}
.category-style-preview-arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
  color: inherit;
  font-size: 0.78rem;
}
.category-style-preview > b {
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.category-style-preview > small {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
  color: inherit;
  font-size: 0.6rem;
  font-weight: 800;
}

.category-style-preview.is-style-plain {
  border-bottom-color: rgba(255,226,204,0.16);
  border-radius: 0;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.016));
  color: var(--fg-mid);
}
.category-style-preview.is-style-accent {
  padding-left: 0.9rem;
  border-color: rgba(229,129,58,0.18);
  background: linear-gradient(90deg, rgba(229,129,58,0.16), rgba(229,129,58,0.035));
  color: var(--accent-soft);
  box-shadow: inset 5px 0 var(--accent), 0 8px 20px rgba(201,95,36,0.08);
}
.category-style-preview.is-style-card {
  border-color: rgba(255,226,204,0.16);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.065), transparent 42%),
    linear-gradient(100deg, rgba(41,49,59,0.96), rgba(24,28,34,0.99));
  color: var(--fg);
  box-shadow: 0 12px 24px rgba(0,0,0,0.22), inset 0 1px rgba(255,255,255,0.06), inset 0 -1px rgba(0,0,0,0.22);
}
.category-style-preview.is-style-glow {
  border-color: var(--accent-edge);
  background:
    radial-gradient(circle at 16% 0, rgba(255,196,151,0.32), transparent 48%),
    linear-gradient(112deg, rgba(229,129,58,0.28), rgba(201,95,36,0.12) 48%, rgba(24,28,34,0.98));
  color: #ffc08f;
  box-shadow: 0 14px 34px rgba(201,95,36,0.22), inset 0 1px rgba(255,255,255,0.10), 0 0 0 1px rgba(229,129,58,0.08);
  text-shadow: 0 0 16px rgba(255,173,112,0.26);
}
.category-style-preview.is-style-glow::after {
  content: '';
  position: absolute;
  right: 32px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,173,112,0.18);
  filter: blur(16px);
  pointer-events: none;
}

.category-style-copy { display: grid; gap: 0.28rem; min-width: 0; margin-top: 0.9rem; }
.category-style-copy > b { color: var(--fg); font-size: 1rem; letter-spacing: -0.018em; }
.category-style-copy > small { max-width: 42ch; color: var(--fg-dim); font-size: 0.75rem; line-height: 1.45; }
.category-style-selected {
  margin-top: auto;
  padding-top: 0.8rem;
  color: var(--accent-soft);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  opacity: 0;
  text-transform: uppercase;
}
.category-style-choice:has(input:checked) .category-style-selected { opacity: 1; }
.category-style-choice.is-locked { border-style: dashed; background: var(--bg-1); cursor: not-allowed; }
.category-style-choice.is-locked:hover { border-color: var(--line); background: var(--bg-1); transform: none; }
.category-style-lock {
  width: fit-content;
  padding: 0.22rem 0.42rem;
  border-radius: 7px;
  background: var(--bg-3);
  color: var(--fg-dim);
  font-size: 0.6rem;
  font-weight: 750;
  white-space: nowrap;
}
.category-style-sample {
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.category-style-sample-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.85rem; }
.category-style-sample-head > span:first-child { display: grid; gap: 0.15rem; }
.category-style-sample-head b { font-size: 0.82rem; }
.category-style-sample-head small { color: var(--fg-dim); font-size: 0.68rem; }
.category-style-live { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ok); font-size: 0.64rem; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
.category-style-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(108,201,139,0.10); }
.category-style-sample-shell {
  width: min(360px, 100%);
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: linear-gradient(180deg, #181c22, #0c0e11);
  box-shadow: 0 18px 42px rgba(0,0,0,0.28), inset 0 1px rgba(255,255,255,0.03);
}
.category-style-sample-brand { display: flex; align-items: center; gap: 0.65rem; padding: 0.8rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.018); }
.category-style-sample-brand > span { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 11px; background: linear-gradient(145deg, var(--accent-soft), var(--accent)); color: var(--accent-ink); font-weight: 900; }
.category-style-sample-brand > div { display: grid; min-width: 0; }
.category-style-sample-brand small { color: rgba(255,173,112,0.68); font-size: 0.52rem; font-weight: 850; letter-spacing: 0.13em; }
.category-style-sample-brand b { overflow: hidden; font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.category-style-sample-rail { display: grid; gap: 0.2rem; padding: 0.75rem 0.65rem 0.9rem; }
.category-style-sample-rail .category-style-preview { min-height: 46px; }
.category-style-sample-channel { display: flex; align-items: center; gap: 0.5rem; min-height: 30px; padding: 0 0.65rem; color: var(--fg-dim); font-size: 0.74rem; }
.category-style-sample-channel span { color: rgba(255,173,112,0.5); font-weight: 800; }

.channel-icon-studio {
  margin-top: 1.35rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}
.channel-icon-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.channel-icon-head > div { display: grid; gap: 0.22rem; }
.channel-icon-kicker { color: var(--accent-soft); font-size: 0.6rem; font-weight: 900; letter-spacing: 0.12em; }
.channel-icon-head h2 { margin: 0; font-size: 1rem; }
.channel-icon-head p { margin: 0; color: var(--fg-dim); font-size: 0.76rem; line-height: 1.45; }
.channel-icon-level {
  flex: none;
  padding: 0.3rem 0.56rem;
  border: 1px solid var(--accent-edge);
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-soft);
  font-size: 0.62rem;
  font-weight: 850;
  white-space: nowrap;
}
.channel-icon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.channel-icon-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(132px, 0.8fr);
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.58rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(7,9,12,0.72);
  transition: border-color .14s, background .14s;
}
.channel-icon-row:focus-within { border-color: var(--accent-edge); background: rgba(229,129,58,0.055); }
.channel-icon-preview {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,226,204,0.13);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(255,255,255,0.07), rgba(229,129,58,0.055));
  color: var(--fg-mid);
  font-size: 1.05rem;
  font-weight: 850;
}
.channel-icon-preview img { width: 24px; height: 24px; object-fit: contain; }
.channel-icon-copy { display: grid; min-width: 0; gap: 0.12rem; }
.channel-icon-copy b { overflow: hidden; font-size: 0.79rem; text-overflow: ellipsis; white-space: nowrap; }
.channel-icon-copy small { color: var(--fg-dim); font-size: 0.64rem; }
.channel-icon-input { min-width: 0; padding-inline: 0.55rem; font-size: 0.72rem; font-weight: 700; }
.channel-icon-studio.is-locked .channel-icon-grid {
  padding: 0.55rem;
  border: 1px dashed var(--line-2);
  border-radius: 13px;
  background: var(--bg-1);
}
.channel-icon-studio.is-locked .channel-icon-level { border-color: var(--line); background: var(--bg-3); color: var(--fg-dim); }

.category-style-lapsed { margin: 0.7rem 0 0; color: var(--warn); font-size: 0.75rem; }
.category-style-form .settings-foot {
  position: relative;
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(17,20,25,0.94);
  box-shadow: 0 -12px 28px rgba(0,0,0,0.20);
  backdrop-filter: blur(14px);
}
.category-style-empty { text-align: center; }
@media (max-width: 820px) {
  .category-style-options,
  .channel-icon-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .category-style-level { align-items: flex-start; flex-wrap: wrap; }
  .category-style-level .btn { margin-left: 0; }
  .category-style-choice { min-height: 200px; }
  .channel-icon-head { flex-direction: column; }
  .category-style-form .settings-foot { align-items: stretch; flex-direction: column; }
  .category-style-form .settings-foot .btn { width: 100%; }
}

/* Expiring invite manager */
.vanity-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 1.5rem;
  margin-bottom: 0.8rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 5% 0%, rgba(229,129,58,0.14), transparent 42%),
    var(--bg-2);
}
.vanity-panel.is-locked { grid-template-columns: 1fr; }
.vanity-panel-copy { min-width: 0; }
.vanity-title-row { display: flex; align-items: center; gap: 0.7rem; }
.vanity-title-row > div { min-width: 0; }
.vanity-title-row .panel-title { margin: 0; }
.vanity-title-row p { margin: 0.15rem 0 0; font-size: 0.78rem; }
.vanity-title-row .tag { margin-left: auto; flex: none; }
.vanity-glyph {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px;
  border: 1px solid var(--accent-edge); border-radius: 12px;
  background: var(--accent-wash); color: var(--accent-soft); font-size: 1.05rem;
  box-shadow: 0 0 18px rgba(229,129,58,0.12);
}
.vanity-unlock-tag { color: var(--accent-soft); border-color: var(--accent-edge); background: var(--accent-wash); }
.vanity-current {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 0.85rem;
  padding: 0.45rem 0.5rem 0.45rem 0.7rem; border: 1px solid var(--line);
  border-radius: 9px; background: rgba(0,0,0,0.16);
}
.vanity-current span {
  min-width: 0; margin-right: auto; overflow: hidden; color: var(--accent-soft);
  font-family: var(--mono); font-size: 0.76rem; text-overflow: ellipsis; white-space: nowrap;
}
.vanity-locked-copy { margin: 0.85rem 0 0 3rem; color: var(--fg-dim); font-size: 0.78rem; }
.vanity-actions { display: flex; align-items: flex-end; gap: 0.5rem; }
.vanity-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 0.5rem; flex: 1; }
.vanity-form .label { grid-column: 1 / -1; margin: 0; }
.vanity-form small { grid-column: 1 / -1; font-size: 0.68rem; }
.vanity-input-wrap {
  display: flex; align-items: center; min-width: 0; height: 36px;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-1);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.vanity-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.vanity-input-wrap span {
  flex: none; padding-left: 0.65rem; color: var(--fg-dim); font-family: var(--mono); font-size: 0.7rem;
}
.vanity-input-wrap input {
  min-width: 80px; width: 100%; height: 100%; padding: 0 0.65rem 0 0;
  border: 0; outline: 0; background: transparent; color: var(--fg);
  font: 0.76rem var(--mono);
}
.invite-splash-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.68fr);
  gap: 1.5rem;
  margin-bottom: 0.8rem;
  background: radial-gradient(circle at 95% 0%, rgba(86, 142, 205, 0.13), transparent 42%), var(--bg-2);
}
.invite-splash-panel.is-locked { grid-template-columns: 1fr; }
.invite-splash-preview { margin-top: 1rem; overflow: hidden; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-1); aspect-ratio: 16 / 6; }
.invite-splash-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.invite-splash-actions { display: flex; align-items: flex-end; gap: 0.5rem; }
.splash-upload-form { display: grid; gap: 0.45rem; flex: 1; }
.splash-upload-form small { font-size: 0.7rem; line-height: 1.35; }
.invite-permanent-panel { margin-bottom: 1.5rem; border-left: 3px solid var(--accent); }
.invite-permanent-panel .panel-title { margin: 0; }
.invite-permanent-panel p { margin: 0.35rem 0 0; font-size: 0.82rem; }
.invite-create-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}
.invite-create-panel p { margin: 0.2rem 0 0; font-size: 0.82rem; }
.invite-create-form { display: flex; align-items: end; gap: 0.55rem; }
.invite-create-form .field { flex: 1; margin: 0; }
.invite-manager { max-width: 880px; }
.invite-manager-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.65rem; }
.invite-manager-head h2 { margin: 0; font-size: 1rem; }
.invite-manager-head p { margin: 0.12rem 0 0; color: var(--fg-dim); font-size: 0.76rem; }
.invite-manager-head form { margin-left: auto; }
.invite-table { display: grid; gap: 0.42rem; }
.invite-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(190px, auto) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
}
.invite-row.is-expired { opacity: 0.55; }
.invite-code-block { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.invite-code-icon {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px;
  border: 1px solid var(--accent-edge); border-radius: 10px;
  background: var(--accent-wash); color: var(--accent-soft); font-weight: 800;
}
.invite-code-block div { min-width: 0; line-height: 1.22; }
.invite-code-block b { display: block; font-family: var(--mono); font-size: 0.84rem; }
.invite-code-block small { display: block; margin-top: 0.15rem; color: var(--fg-dim); font-size: 0.7rem; }
.invite-row-meta { display: grid; justify-items: start; gap: 0.2rem; }
.invite-row-meta small { color: var(--fg-dim); font-size: 0.69rem; }
.invite-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.4rem; }
.invite-row-actions form { display: contents; }
.invite-default-label {
  padding: 0.2rem 0.45rem; border-radius: 6px; background: var(--bg-3);
  color: var(--fg-dim); font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
}
.invite-expiry { margin: -1rem 0 1.5rem; color: var(--accent-soft); font-size: 0.78rem; }

/* Staff badge collections - small enough to scan, with actions kept on
   the same line so a growing catalogue does not become a form wall. */
.stack-list { display: grid; gap: 0.42rem; }
.stack-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 0.7rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg-1);
}
.stack-row > div { min-width: 0; margin-right: auto; }
.stack-row b, .stack-row small { display: block; }
.stack-row b { font-size: 0.84rem; }
.stack-row small { margin-top: 0.12rem; color: var(--fg-dim); font-size: 0.7rem; }
.stack-row form { display: contents; }

/* Category/channel permission overrides. */
.channel-access-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 1rem; align-items: start; }
.channel-access-list { display: grid; gap: 0.18rem; padding: 0.65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.channel-access-list b { margin: 0.5rem 0.35rem 0.2rem; color: var(--fg-dim); font-size: 0.66rem; letter-spacing: .08em; text-transform: uppercase; }
.channel-access-list a { padding: 0.45rem 0.5rem; border-radius: 6px; color: var(--fg-mid); font-size: 0.82rem; }
.channel-access-list a:hover, .channel-access-list a.on { background: var(--bg-3); color: var(--fg); }
.channel-access-title { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.channel-access-title h2 { margin: 0.38rem 0 0; font-size: 1.18rem; }
.channel-access-title small { max-width: 30ch; color: var(--fg-dim); font-size: .74rem; line-height: 1.4; text-align: right; }
.channel-perm-table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.channel-perm-head, .channel-perm-row { display: grid; grid-template-columns: minmax(150px, 1fr) repeat(4, minmax(76px, .55fr)); min-width: 490px; }
.channel-perm-head { background: var(--bg-3); color: var(--fg-dim); font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.channel-perm-head span, .channel-perm-row > * { padding: .65rem .55rem; border-right: 1px solid var(--line); }
.channel-perm-head span:last-child, .channel-perm-row > *:last-child { border-right: 0; }
.channel-perm-row { border-top: 1px solid var(--line); align-items: center; }
.channel-perm-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.channel-perm-row label { display: grid; place-items: center; }
.channel-perm-row select { width: 46px; padding: .28rem; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg-1); color: var(--fg); text-align: center; }
.channel-access-help { margin: .75rem 0; font-size: .75rem; }

/* Public badge directory. The artwork is the focal point; the card itself
   stays quiet enough that very different custom badge images still belong
   to the same collection. */
.badge-directory { padding-bottom: 4rem; }
.badge-directory-hero {
  overflow: hidden; padding: 5.25rem 0 4.5rem; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 84% 18%, rgba(229,129,58,.28), transparent 18rem),
    radial-gradient(circle at 62% 115%, rgba(198,85,132,.12), transparent 25rem),
    linear-gradient(126deg, #17110f, #2a1914 58%, #1d1513);
}
.badge-directory-hero-inner {
  display: flex; align-items: end; justify-content: space-between; gap: 2rem;
}
.badge-directory-hero .eyebrow { color: var(--accent-soft); }
.badge-directory-hero h1 { max-width: 12ch; margin: .45rem 0 .85rem; font-size: clamp(2.65rem, 6vw, 5.2rem); line-height: .96; letter-spacing: -.065em; }
.badge-directory-hero h1 em { color: var(--accent-soft); font-family: Georgia, serif; font-weight: 400; }
.badge-directory-hero p:not(.eyebrow) { max-width: 48ch; margin: 0; color: var(--fg-mid); font-size: 1.04rem; line-height: 1.65; }
.badge-directory-count {
  display: grid; place-items: center; flex: 0 0 150px; width: 150px; height: 150px;
  border: 1px solid rgba(255,255,255,.17); border-radius: 50%;
  background: rgba(255,255,255,.055); box-shadow: inset 0 0 30px rgba(255,255,255,.05), 0 15px 45px rgba(0,0,0,.25);
  text-align: center;
}
.badge-directory-count strong { display: block; margin-bottom: -1.25rem; color: var(--accent-soft); font-size: 3rem; line-height: 1; letter-spacing: -.06em; }
.badge-directory-count span { max-width: 80px; color: var(--fg-mid); font-size: .7rem; line-height: 1.2; text-transform: uppercase; letter-spacing: .08em; }
.badge-directory-body { padding-top: 3.5rem; }
.badge-directory-group { margin-bottom: 4rem; }
.badge-directory-group-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.25rem; }
.badge-directory-group-head .eyebrow { margin: 0 0 .4rem; }
.badge-directory-group-head h2 { margin: 0; font-size: 1.75rem; letter-spacing: -.035em; }
.badge-directory-group-head > p { max-width: 44ch; margin: 0; color: var(--fg-dim); font-size: .88rem; line-height: 1.5; text-align: right; }
.badge-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.badge-directory-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: .95rem; min-height: 184px;
  padding: 1.1rem; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--badge-colour) 10%, var(--bg-2)), var(--bg-2) 58%);
  box-shadow: 0 10px 26px rgba(0,0,0,.12); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.badge-directory-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--badge-colour) 58%, var(--line)); box-shadow: 0 15px 30px rgba(0,0,0,.2); }
.badge-directory-art {
  display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--badge-colour) 58%, transparent); border-radius: 19px;
  background: color-mix(in srgb, var(--badge-colour) 17%, var(--bg-1)); color: var(--badge-colour);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--badge-colour) 18%, transparent);
}
.badge-directory-art img { width: 100%; height: 100%; object-fit: contain; }
.badge-directory-art span { font-size: 1.8rem; font-weight: 800; }
.badge-directory-copy { min-width: 0; }
.badge-directory-copy h3 { margin: .08rem 0 .35rem; color: var(--fg); font-size: 1rem; }
.badge-directory-copy p { margin: 0; color: var(--fg-dim); font-size: .78rem; line-height: 1.45; }
.badge-directory-card footer { grid-column: 1 / -1; display: flex; align-items: center; gap: .65rem; margin-top: auto; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.08); }
.badge-directory-rule { color: var(--badge-colour); font-size: .67rem; font-weight: 700; line-height: 1.25; }
.badge-directory-empty { padding: 5rem 1rem; border: 1px dashed var(--line-2); border-radius: 18px; text-align: center; }
.badge-directory-empty > div { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 20px; background: var(--accent-wash); color: var(--accent-soft); font-size: 1.8rem; }
.badge-directory-empty h2 { margin: 0 0 .4rem; font-size: 1.3rem; }
.badge-directory-empty p { margin: 0; color: var(--fg-dim); }

/* ── Admin shell ────────────────────────────────────────────
   The admin hub replaces a permanent wall of module links. It works like a
   small command palette: grouped choices, current context, and no page
   chrome competing with tables or forms. */
.admin-shellbar { gap: .75rem; }
.admin-shellbar .brand { margin-right: .25rem; }
.admin-shellbar .admin-chip { margin: 0; }
.admin-hub-wrap { position: relative; z-index: 45; }
.admin-hub-trigger {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 36px; padding: .3rem .55rem .3rem .35rem;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); color: var(--fg);
  font: 700 .8rem/1 var(--font); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
}
.admin-hub-trigger:hover, .admin-hub-trigger[aria-expanded="true"] { border-color: var(--accent-edge); background: var(--bg-3); box-shadow: 0 0 0 3px var(--accent-wash); }
.admin-hub-trigger-icon, .admin-hub-item-icon {
  display: grid; place-items: center; flex: none; width: 27px; height: 27px; border-radius: 8px;
  background: var(--accent-wash); color: var(--accent-soft); font-size: .9rem;
}
.admin-hub-chevron { margin-left: .08rem; color: var(--fg-dim); font-size: 1rem; }
.admin-shell-actions { margin-left: auto; }
.admin-page-context { border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(229,129,58,.07), transparent 48%); }
.admin-page-context-inner { display: flex; align-items: center; gap: .6rem; min-height: 42px; }
.admin-page-context span { color: var(--accent-soft); font-size: .67rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.admin-page-context strong { color: var(--fg); font-size: .8rem; }
.admin-page-context small { padding-left: .6rem; border-left: 1px solid var(--line); color: var(--fg-dim); font-size: .72rem; }
.admin-hub-popover {
  position: absolute; top: calc(100% + .65rem); left: 0; width: min(530px, calc(100vw - 2rem));
  max-height: min(650px, calc(100vh - 5rem)); overflow: auto; padding: .8rem;
  border: 1px solid var(--line-2); border-radius: 15px; background: rgba(17,20,25,.98);
  box-shadow: 0 24px 60px rgba(0,0,0,.45); backdrop-filter: blur(16px);
}
.admin-hub-popover[hidden] { display: none; }
.admin-hub-head { display: flex; align-items: center; justify-content: space-between; padding: .15rem .2rem .7rem; }
.admin-hub-head span, .admin-hub-head strong { display: block; }
.admin-hub-head span { margin-bottom: .1rem; color: var(--fg-dim); font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.admin-hub-head strong { color: var(--fg); font-size: 1.05rem; letter-spacing: -.02em; }
.admin-hub-close { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-dim); font-size: 1.4rem; cursor: pointer; }
.admin-hub-close:hover { background: var(--bg-3); color: var(--fg); }
.admin-hub-search { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; padding: 0 .65rem; border: 1px solid var(--line-2); border-radius: 9px; background: var(--bg-1); color: var(--fg-dim); }
.admin-hub-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.admin-hub-search input { min-width: 0; width: 100%; height: 36px; border: 0; outline: 0; background: transparent; color: var(--fg); font: .8rem var(--font); }
.admin-hub-areas { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.admin-hub-section { padding: .55rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(0,0,0,.1); }
.admin-hub-section:first-child { grid-column: 1 / -1; }
.admin-hub-section > p { margin: 0 0 .35rem .3rem; color: var(--fg-dim); font-size: .61rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.admin-hub-item { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: .48rem; align-items: center; padding: .45rem; border-radius: 8px; color: var(--fg-mid); }
.admin-hub-item:hover, .admin-hub-item.is-current { background: var(--bg-3); color: var(--fg); text-decoration: none; }
.admin-hub-item.is-current { box-shadow: inset 2px 0 0 var(--accent); }
.admin-hub-item-icon { width: 28px; height: 28px; border-radius: 7px; font-size: .78rem; }
.admin-hub-item b, .admin-hub-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-hub-item b { color: inherit; font-size: .75rem; }
.admin-hub-item small { margin-top: .1rem; color: var(--fg-dim); font-size: .62rem; }
.admin-hub-item i { padding: .18rem .32rem; border-radius: 5px; background: var(--accent-wash); color: var(--accent-soft); font-size: .58rem; font-style: normal; font-weight: 800; }

/* Make existing admin content feel like part of the same workspace without
   rewriting stable forms and moderation flows. */
.admin-page-context + .page-pad { padding-top: 1.65rem; }
.admin-page-context + .page-pad .section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; max-width: none; margin-bottom: 1.35rem; }
.admin-page-context + .page-pad .section-head h2 { font-size: 1.95rem; letter-spacing: -.045em; }
.admin-page-context + .page-pad .section-head p { max-width: 50ch; text-align: right; font-size: .85rem; }
.admin-page-context + .page-pad .panel { box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.admin-page-context + .page-pad .panel-title { letter-spacing: -.015em; }

/* Admin control centre: the page is a calm set of destinations. Actual
   forms live in focused dialogs so staff do not have to scan a wall of
   settings before they can decide what they want to change. */
.admin-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: .8rem;
}
.admin-control-card {
  display: flex;
  min-height: 164px;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(145deg, var(--bg-2), color-mix(in srgb, var(--bg-3) 70%, var(--bg-2)));
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
}
.admin-control-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: .75rem;
  border-radius: 10px;
  background: var(--accent-wash);
  color: var(--accent-soft);
  font-size: 1rem;
}
.admin-control-card h3 { margin: 0; color: var(--fg); font-size: .98rem; }
.admin-control-card p { margin: .35rem 0 1rem; color: var(--fg-dim); font-size: .78rem; line-height: 1.48; }
.admin-control-card .btn { margin-top: auto; }

/* Standalone admin overview mirrors the live Safety Center without turning
   the entire page into an accent-coloured reading surface. */
.admin-overview-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  min-height: 230px;
  margin-bottom: 2rem;
  overflow: hidden;
  padding: clamp(1.6rem,4vw,2.7rem);
  border: 1px solid var(--accent-edge);
  border-radius: 24px;
  background: linear-gradient(135deg,var(--accent-wash),var(--bg-1) 52%);
  box-shadow: 0 28px 64px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.04);
}
.admin-overview-hero::after { content:''; position:absolute; right:-8%; bottom:-90%; width:48%; aspect-ratio:1; border:1px solid var(--accent-edge); border-radius:50%; }
.admin-overview-hero > div:first-child { position:relative; z-index:1; max-width:650px; }
.admin-overview-hero > div > span { color:var(--accent-soft); font-size:.65rem; font-weight:900; letter-spacing:.13em; }
.admin-overview-hero h1 { margin:.5rem 0 .6rem; font-size:clamp(2rem,5vw,3.2rem); line-height:1.02; letter-spacing:-.055em; }
.admin-overview-hero p { max-width:60ch; margin:0; color:var(--fg-mid); font-size:.93rem; line-height:1.65; }
.admin-overview-hero-actions { display:flex; flex-wrap:wrap; gap:.55rem; margin-top:1.25rem; }
.admin-overview-mark { position:relative; z-index:1; display:grid; place-items:center; align-self:center; width:96px; height:96px; flex:none; border:1px solid var(--accent-edge); border-radius:30px; background:linear-gradient(145deg,var(--accent-soft),var(--accent)); color:var(--accent-ink); font-size:2.4rem; box-shadow:var(--shadow-glow); transform:rotate(5deg); }
.admin-overview-signals { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.65rem; }
.admin-overview-signal { position:relative; min-width:0; padding:1rem; border:1px solid var(--line); border-radius:15px; background:var(--bg-1); }
.admin-overview-signal::after { content:''; position:absolute; top:1rem; right:1rem; width:7px; height:7px; border-radius:50%; background:var(--ok); }
.admin-overview-signal.is-urgent { border-color:rgba(214,75,75,.5); }
.admin-overview-signal.is-urgent::after { background:var(--danger); box-shadow:0 0 12px rgba(214,75,75,.5); }
.admin-overview-signal span,.admin-overview-signal small { display:block; color:var(--fg-dim); }
.admin-overview-signal span { font-size:.62rem; font-weight:900; letter-spacing:.07em; text-transform:uppercase; }
.admin-overview-signal b { display:block; margin:.35rem 0 .1rem; font-size:1.6rem; }
.admin-overview-signal small { font-size:.68rem; }
.admin-overview-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem; margin-top:.75rem; }
.admin-overview-tools > a { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:.75rem; min-height:80px; padding:.9rem 1rem; border:1px solid var(--line); border-radius:15px; background:var(--bg-1); color:var(--fg); }
.admin-overview-tools > a:hover { border-color:var(--accent-edge); background:var(--bg-2); text-decoration:none; transform:translateY(-2px); }
.admin-overview-tools > a > span { display:grid; place-items:center; width:44px; height:44px; border-radius:13px; background:var(--accent-wash); color:var(--accent-soft); font-weight:900; }
.admin-overview-tools b,.admin-overview-tools small { display:block; }
.admin-overview-tools b { font-size:.86rem; }.admin-overview-tools small { margin-top:.15rem; color:var(--fg-dim); font-size:.7rem; }
.admin-overview-tools i { color:var(--accent-soft); font-style:normal; }
.admin-modal .modal-box { max-width: 660px; max-height: calc(100vh - 3rem); overflow: auto; }
.admin-modal .modal-head { position: sticky; top: 0; z-index: 1; background: var(--bg-2); }
.admin-modal .modal-foot { position: sticky; bottom: 0; z-index: 1; }
.admin-modal-copy { margin: 0 0 1.15rem; color: var(--fg-dim); font-size: .84rem; line-height: 1.55; }
.admin-modal .field:last-child { margin-bottom: 0; }
@media (max-width: 800px) {
  .vanity-panel { grid-template-columns: 1fr; }
  .invite-splash-panel { grid-template-columns: 1fr; }
  .invite-create-panel { grid-template-columns: 1fr; align-items: stretch; }
  .invite-row { grid-template-columns: minmax(0, 1fr) auto; }
  .invite-row-meta { grid-column: 1; }
  .invite-row-actions { grid-column: 2; grid-row: 1 / span 2; }
  .stack-row { flex-wrap: wrap; }
  .channel-access-layout { grid-template-columns: 1fr; }
  .badge-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-hub-areas { grid-template-columns: 1fr; }
  .admin-hub-section:first-child { grid-column: auto; }
  .admin-overview-signals { grid-template-columns:repeat(3,1fr); }
}
@media (max-width: 560px) {
  .vanity-title-row { align-items: flex-start; flex-wrap: wrap; }
  .vanity-title-row .tag { margin-left: 0; }
  .vanity-locked-copy { margin-left: 0; }
  .vanity-actions { align-items: stretch; flex-direction: column; }
  .invite-splash-actions { align-items: stretch; flex-direction: column; }
  .invite-splash-actions > form .btn { width: 100%; }
  .vanity-form { grid-template-columns: 1fr; width: 100%; }
  .vanity-form .label, .vanity-form small { grid-column: 1; }
  .vanity-form .btn, .vanity-actions > form:last-child .btn { width: 100%; }
  .vanity-input-wrap span { display: none; }
  .vanity-input-wrap input { padding-left: 0.65rem; }
  .invite-create-form { align-items: stretch; flex-direction: column; }
  .invite-create-form .btn { width: 100%; }
  .invite-manager-head { align-items: flex-start; flex-direction: column; }
  .invite-manager-head form { margin-left: 0; }
  .invite-row { grid-template-columns: 1fr; }
  .invite-row-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .badge-directory-hero { padding: 3.75rem 0 3.25rem; }
  .badge-directory-hero-inner, .badge-directory-group-head { align-items: flex-start; flex-direction: column; }
  .badge-directory-count { width: 116px; height: 116px; flex-basis: 116px; }
  .badge-directory-count strong { font-size: 2.3rem; }
  .badge-directory-group-head > p { text-align: left; }
  .badge-directory-grid { grid-template-columns: 1fr; }
  .admin-shellbar { padding: .6rem .8rem; }
  .admin-shellbar .brand { font-size: 0; gap: 0; }
  .admin-shellbar .brand-mark { width: 25px; }
  .admin-shell-actions .btn-ghost { display: none; }
  .admin-shell-actions .btn { padding-left: .55rem; padding-right: .55rem; font-size: .7rem; }
  .admin-hub-trigger > span:nth-child(2) { display: none; }
  .admin-hub-trigger { padding-right: .35rem; }
  .admin-hub-chevron { display: none; }
  .admin-page-context-inner { min-height: 38px; overflow: hidden; white-space: nowrap; }
  .admin-page-context small { overflow: hidden; text-overflow: ellipsis; }
  .admin-page-context + .page-pad .section-head { align-items: flex-start; flex-direction: column; }
  .admin-page-context + .page-pad .section-head p { text-align: left; }
  .admin-control-grid { grid-template-columns: 1fr; }
  .admin-overview-mark { display:none; }
  .admin-overview-hero { min-height:0; padding:1.35rem; border-radius:18px; }
  .admin-overview-signals,.admin-overview-tools { grid-template-columns:1fr; }
}

/* ── Broadcast ─────────────────────────────────────────────── */

.bc-bar {
  height: 8px;
  margin: 0.9rem 0 0.5rem;
  border-radius: 4px;
  background: var(--bg-3);
  overflow: hidden;
}
.bc-bar > i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.25s;
}

.bc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.bc-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-sm);
}
.bc-list li:hover { background: var(--bg-1); }
.bc-list b { display: block; font-size: 0.88rem; font-weight: 600; }
.bc-list small { display: block; margin-top: 0.2rem; font-size: 0.76rem; }

@media (prefers-reduced-motion: reduce) { .bc-bar > i { transition: none; } }

/* ── Linking a device ──────────────────────────────────────── */

.link-page { max-width: 560px; padding-top: 2.5rem; padding-bottom: 4rem; }

.link-card { padding: 1.6rem 1.5rem; }
.link-card h1 { margin: 0.1rem 0 0.5rem; font-size: 1.5rem; }
.link-card p { margin: 0 0 0.9rem; color: var(--fg-mid); line-height: 1.55; }

.link-kicker {
  display: block;
  color: var(--fg-dim);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.link-platform { font-size: 0.85rem; }

.link-form { display: flex; gap: 0.6rem; align-items: stretch; }
.link-code {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  font-family: var(--mono);
}

.link-grant {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
}
.link-grant b { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; }
.link-grant ul { margin: 0 0 0.6rem; padding-left: 1.1rem; color: var(--fg-mid); font-size: 0.88rem; line-height: 1.6; }
.link-grant p { margin: 0; font-size: 0.82rem; }

/* The one line that has to be read, so it is the one that looks unlike
   the rest of the page. */
.link-warn {
  margin: 0 0 1.2rem !important;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-wash);
  color: var(--fg) !important;
  font-size: 0.87rem;
}

.link-actions { display: flex; justify-content: flex-end; gap: 0.6rem; }
.link-note { font-size: 0.8rem; margin-top: 1rem !important; }
.link-card.is-good h1 { color: var(--ok, #5ac18e); }

@media (max-width: 520px) {
  .link-form { flex-direction: column; }
  .link-actions { flex-direction: column-reverse; }
  .link-actions .btn { width: 100%; }
}

/* ── Foxfire ───────────────────────────────────────────────── */

.fire-page { max-width: 1040px; padding-top: 2.5rem; padding-bottom: 4rem; }

.fire-head { max-width: 620px; margin: 0 0 2.2rem; }
.fire-kicker {
  display: block;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.fire-head h1 { margin: 0.35rem 0 0.6rem; font-size: 2.1rem; line-height: 1.15; }
.fire-head p { margin: 0; color: var(--fg-mid); font-size: 1rem; line-height: 1.6; }

.fire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.fire-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
}
/* The paid ones lift slightly, without making the free one look broken -
   it is the whole product, not a crippled sample. */
.fire-card.is-paid { border-color: var(--accent-edge); background: var(--bg-2); }
.fire-card.is-current { border-color: var(--accent); }

.fire-flag {
  position: absolute;
  top: -0.6rem;
  right: 1.2rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fire-card h2 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.fire-tagline { margin: 0 0 1rem; color: var(--fg-dim); font-size: 0.86rem; line-height: 1.5; }

.fire-size {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fire-size b { font-size: 1.6rem; color: var(--accent-soft); }
.fire-size small { color: var(--fg-dim); font-size: 0.8rem; }

.fire-price { margin-top: 0.8rem; font-size: 0.95rem; font-weight: 700; }

.fire-perks {
  flex: 1;
  margin: 1rem 0 1.2rem;
  padding: 0;
  list-style: none;
  color: var(--fg-mid);
  font-size: 0.87rem;
  line-height: 1.7;
}
.fire-perks li { padding-left: 1.2rem; position: relative; }
.fire-perks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.fire-btn { width: 100%; }
.fire-current {
  padding: 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--accent-soft);
  font-size: 0.83rem;
  font-weight: 700;
  text-align: center;
}
.fire-current.is-quiet { background: var(--bg-3); color: var(--fg-dim); font-weight: 600; }

.fire-note {
  margin-top: 2.2rem;
  padding: 1.2rem 1.3rem;
  border-left: 3px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-1);
}
.fire-note h3 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.fire-note p { margin: 0; color: var(--fg-mid); font-size: 0.88rem; line-height: 1.65; }

.plan-size-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
}

/* The price is the prominent thing on a pricing card; a bare em-dash for a
   tier with no price set yet reads as "not decided", not as free. */
.fire-perks li b { color: var(--accent-soft); }

/* ── Expression manager ─────────────────────────────────────
   Emoji and stickers are pictures, so the picture is the row and
   everything else is chrome around it. Both grids share a shape on
   purpose - the page reads as one thing with two tabs, not two pages. */

.expr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.expr-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.5rem;
  margin: 0;                      /* it is a <figure> */
  padding: 0.9rem 0.75rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  text-align: center;
  transition: border-color 0.12s, transform 0.12s;
}
.expr-card:hover { border-color: var(--line-2); transform: translateY(-1px); }

/* A checker behind the artwork, because most of these are transparent
   PNGs and a flat panel hides exactly the edges you are checking for. */
.expr-card-art {
  display: grid;
  place-items: center;
  height: 84px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-2);
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.035) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
.expr-card-art img { max-width: 100%; max-height: 72px; object-fit: contain; }
.expr-card.is-emoji .expr-card-art { height: 64px; }
.expr-card.is-emoji .expr-card-art img { max-height: 44px; }

.expr-card figcaption { display: grid; gap: 0.2rem; min-width: 0; }
.expr-card figcaption code,
.expr-card figcaption b {
  display: block;
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.expr-card figcaption code { color: var(--accent-soft); }
.expr-card figcaption small {
  display: block;
  overflow: hidden;
  color: var(--fg-dim);
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expr-card-tools { display: grid; gap: 0.35rem; }
.expr-card-tools select.input,
.expr-card-tools .input {
  width: 100%;
  padding: 0.28rem 0.4rem;
  font-size: 0.75rem;
}
.expr-card-tools .btn { padding: 0.28rem 0.45rem; font-size: 0.72rem; }

/* The folder an emoji is filed under, shown as a quiet tag. */
.expr-tag {
  justify-self: center;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-soft);
  font-size: 0.68rem;
  font-weight: 700;
}

/* Removing is destructive and permanent, so it stays out of the way until
   the card is under the pointer rather than sitting there inviting a
   mis-click on a page full of small targets. */
.expr-card-remove {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--fg-dim);
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.12s, color 0.12s, border-color 0.12s;
}
.expr-card:hover .expr-card-remove,
.expr-card-remove:focus-visible { opacity: 1; }
.expr-card-remove:hover { border-color: var(--danger); color: var(--danger); }

/* Keep it reachable where hover does not exist. */
@media (hover: none) {
  .expr-card-remove { opacity: 1; }
}

/* ── Expressions workspace ────────────────────────────────────────────── */
.expressions-workspace { max-width: 1240px; }
.expressions-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin: 0 0 1.15rem;
  padding: 1.8rem 1.9rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 5px);
  background:
    radial-gradient(circle at 88% 0%, var(--accent-wash), transparent 33%),
    linear-gradient(135deg, var(--bg-2), var(--bg-1));
}
.expressions-kicker {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--accent-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.expressions-hero h1 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.35rem); letter-spacing: -0.045em; }
.expressions-hero p { max-width: 56ch; margin: 0.55rem 0 0; color: var(--fg-mid); }
.expressions-hero-actions { display: flex; flex: none; flex-wrap: wrap; gap: 0.55rem; }

.expressions-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.35rem;
}
.expression-stat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 0.8rem;
  min-height: 94px;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  color: var(--fg);
  text-decoration: none;
  transition: transform .14s, border-color .14s, background .14s;
}
.expression-stat:hover { color: var(--fg); border-color: var(--line-2); transform: translateY(-2px); text-decoration: none; }
.expression-stat.is-current { border-color: var(--accent); background: var(--accent-wash); }
.expression-stat span { align-self: end; color: var(--fg-mid); font-size: .77rem; font-weight: 700; }
.expression-stat b { grid-row: span 2; align-self: center; color: var(--accent-soft); font-size: 1.7rem; line-height: 1; }
.expression-stat small { color: var(--fg-dim); font-size: .72rem; }

.expressions-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  margin: 0 0 1.1rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  scrollbar-width: none;
}
.expressions-tabs::-webkit-scrollbar { display: none; }
.expressions-tabs .tab {
  flex: none;
  border: 0;
  border-radius: calc(var(--radius-sm) + 2px);
  color: var(--fg-mid);
}
.expressions-tabs .tab:hover { background: var(--bg-3); color: var(--fg); }
.expressions-tabs .tab.on { background: var(--accent); color: var(--accent-ink); }
.expressions-tabs .tab span { margin-left: .35rem; padding: .05rem .34rem; border-radius: 99px; background: rgba(0,0,0,.16); font-size: .68rem; }
.expressions-section-head { display: flex; justify-content: space-between; margin: 0 0 0.85rem; }
.expressions-section-head span { display: block; font-size: 1.05rem; font-weight: 780; letter-spacing: -.02em; }
.expressions-section-head p { margin: .2rem 0 0; color: var(--fg-mid); font-size: .85rem; }

.expressions-workspace .settings-split {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1.1rem;
  align-items: stretch;
}
.expressions-workspace .settings-split > section,
.expressions-workspace .settings-split > aside > .panel,
.expressions-workspace > .panel {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 3px);
  background: var(--bg-1);
}
.expressions-workspace .settings-split > section { padding: 1rem; }
.expressions-workspace .settings-split > aside > .panel { position: sticky; top: 1rem; padding: 1.2rem; }
.expressions-workspace .panel-title { margin: 0 0 1rem; font-size: .94rem; }
.expressions-workspace .expr-grid {
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: .65rem;
}
.expressions-workspace .expr-card {
  min-height: 145px;
  padding: .65rem;
  border-radius: calc(var(--radius-sm) + 4px);
  background: var(--bg-2);
  text-align: left;
  box-shadow: none;
}
.expressions-workspace .expr-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.expressions-workspace .expr-card-art { height: 92px; border-radius: var(--radius-sm); }
.expressions-workspace .expr-card-art img { width: 100%; max-width: 100%; max-height: 84px; object-fit: contain; }
.expressions-workspace .expr-card figcaption { padding: .12rem .15rem 0; }
.expressions-workspace .expr-card figcaption b { font-size: .82rem; }
.expressions-workspace .expr-card-remove { opacity: .84; background: rgba(24,19,17,.9); }
.expressions-workspace .empty-panel { min-height: 300px; display: grid; place-content: center; border: 0; background: transparent; }
.expressions-workspace .folder-list { margin-top: .9rem; }
.expressions-workspace .folder-row { background: var(--bg-3); }

@media (max-width: 820px) {
  .expressions-hero { align-items: start; flex-direction: column; padding: 1.35rem; }
  .expressions-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expressions-workspace .settings-split { grid-template-columns: 1fr; }
  .expressions-workspace .settings-split > aside > .panel { position: static; }
}

/* ── Expression folders ─────────────────────────────────────── */

.folder-list { display: grid; gap: 0.4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.folder-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.folder-edit { display: flex; flex: 1; gap: 0.35rem; min-width: 0; }
.folder-edit .input { min-width: 0; padding: 0.3rem 0.45rem; font-size: 0.8rem; }
.folder-icon { width: 3.4rem; flex: none; text-align: center; }
.folder-count {
  flex: none;
  min-width: 1.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-4);
  color: var(--fg-dim);
  font-size: 0.72rem;
  text-align: center;
}
.folder-add { padding-top: 0.8rem; border-top: 1px solid var(--line); }

/* ── Tabs ──────────────────────────────────────────────────
 *
 * A reusable segmented control for admin pages. `nav.tabs > a.tab` was
 * already the markup in a couple of places, but only `.expressions-tabs`
 * ever styled it - everywhere else the links rendered bare, which is why
 * they read as a sentence of hyperlinks rather than a control.
 *
 * Same shape as the expressions one so the admin area stays consistent: a
 * bordered tray with the active segment filled in the accent.
 */
.tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  margin: 0 0 1.1rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tabs .tab {
  flex: none;
  padding: 0.45rem 0.85rem;
  border: 0;
  border-radius: calc(var(--radius-sm) + 2px);
  background: transparent;
  color: var(--fg-mid);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.tabs .tab:hover { background: var(--bg-3); color: var(--fg); text-decoration: none; }
.tabs .tab.on { background: var(--accent); color: var(--accent-ink); }

/* A count belongs to its tab, so it rides inside the segment rather than
   trailing after it as loose text. */
.tabs .tab span {
  margin-left: 0.35rem;
  padding: 0.05rem 0.34rem;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.16);
  font-size: 0.68rem;
}


/* The moderation build, listed under the member one on the same card.
   Deliberately quieter than the main download: it is the exception, and
   only staff can see it at all. */
.dl-staff {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line-2);
}
.dl-staff-text { flex: 1; min-width: 0; line-height: 1.25; }
.dl-staff-text b { display: block; font-size: 0.86rem; }
.dl-staff-text small { color: var(--fg-dim); font-size: 0.74rem; }

/* What is waiting for staff. On the hub trigger it is visible from every
   admin page; inside the menu it says which area. */
.admin-hub-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 0.4rem;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--busy);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}
.admin-hub-item .admin-hub-count { margin-left: auto; }

/* ── Nav menus ─────────────────────────────────────────────
 *
 * A nav item that has children. The trigger looks and behaves like the
 * plain links beside it, so the row stays one consistent bar rather than a
 * mix of two kinds of control.
 */
.sitenav-menu { position: relative; }

.sitenav-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-mid);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.sitenav-menu-trigger span { font-size: 0.7rem; opacity: 0.8; }
.sitenav-menu-trigger:hover,
.sitenav-menu-trigger[aria-expanded="true"] { background: var(--bg-2); color: var(--fg); }
.sitenav-menu-trigger.is-current { background: var(--bg-2); color: var(--fg); }

.sitenav-menu-pop {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 232px;
  padding: 0.35rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-2);
  box-shadow: var(--shadow);
}
.sitenav-menu-pop[hidden] { display: none; }

.sitenav-menu-pop a {
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--fg);
  line-height: 1.3;
}
.sitenav-menu-pop a:hover { background: var(--bg-3); text-decoration: none; }
.sitenav-menu-pop a b { display: block; font-size: 0.88rem; font-weight: 650; }
.sitenav-menu-pop a small { display: block; color: var(--fg-dim); font-size: 0.76rem; }

.sitenav-menu-empty {
  margin: 0;
  padding: 0.6rem;
  color: var(--fg-dim);
  font-size: 0.82rem;
}

/* ── GIF library ───────────────────────────────────────────
 *
 * A browsable view of the shared library. The picker in a conversation is
 * for grabbing one quickly; this is for seeing what exists - which is also
 * how somebody checks whether their submission is a duplicate.
 */
.gif-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.2rem;
}
.gif-filter .input { max-width: 320px; }
.gif-filter .muted { margin-left: auto; font-size: 0.82rem; }

.gif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.9rem;
}

.gif-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  overflow: hidden;
}
.gif-art { position: relative; background: var(--bg-0); }
.gif-art img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
}

.gif-star {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.gif-star:hover { background: rgba(0, 0, 0, 0.72); color: #fff; }
.gif-star.is-on { color: var(--accent); }
.gif-star:disabled { opacity: 0.6; cursor: wait; }

.gif-card figcaption { padding: 0.55rem 0.65rem 0.65rem; }
.gif-card figcaption b {
  display: block;
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gif-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.35rem; }
.gif-tags a {
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  background: var(--bg-3);
  color: var(--fg-dim);
  font-size: 0.7rem;
}
.gif-tags a:hover { background: var(--bg-4); color: var(--fg); text-decoration: none; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.4rem;
}
.pager a, .pager b {
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
}
.pager a { color: var(--fg-mid); }
.pager a:hover { background: var(--bg-2); color: var(--fg); text-decoration: none; }
.pager b { background: var(--accent); color: var(--accent-ink); }

/* ── Written pages ────────────────────────────────────────────
   Terms, guidelines, privacy - long-form reading rather than a
   marketing layout. A narrow measure and generous line height,
   because these are the pages people are least inclined to read
   and most need to. */
.doc { max-width: 46rem; margin: 0 auto; }
.doc-head { margin-bottom: 2rem; }
.doc-head h1 { margin: 0 0 0.5rem; font-size: 2rem; letter-spacing: -0.01em; }
.doc-summary { margin: 0 0 0.5rem; color: var(--text-2); font-size: 1.02rem; }
.doc-updated { font-size: 0.82rem; margin: 0; }

.doc-body { line-height: 1.7; color: var(--text-1); }
.doc-body h2 {
  margin: 2.2rem 0 0.75rem;
  font-size: 1.12rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
.doc-body h3 { margin: 1.5rem 0 0.5rem; font-size: 1rem; }
.doc-body p  { margin: 0 0 1rem; }
.doc-body ul, .doc-body ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.doc-body li { margin-bottom: 0.5rem; }
.doc-body a { color: var(--accent); }
.doc-body table { width: 100%; margin: 0 0 1rem; }
.doc-body th { text-align: left; white-space: nowrap; padding-right: 1rem; vertical-align: top; }

/* The filter categories, generated into the Child Safety page. Set as
   cards so they read as a list of what is covered rather than as more
   prose in the middle of prose. */
.filter-cats { margin: 1.25rem 0 1.5rem; display: grid; gap: 0.75rem; }
.filter-cat {
  padding: 1rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter-cat h3 { margin: 0 0 0.35rem; font-size: 0.98rem; }
.filter-cat p  { margin: 0 0 0.5rem; font-size: 0.9rem; }
.filter-cat-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.82rem; }
.filter-cat-meta:last-child { margin-bottom: 0; }

/* ── A support conversation ─────────────────────────────────
   Staff replies are set apart, because "who said this" is the first thing
   you need when reading back a thread about your own account. */
.ticket-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.ticket-msg {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.ticket-msg.is-staff {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-2));
}
.ticket-msg-head { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.35rem; }
.ticket-msg-head b { font-size: 0.88rem; }
.ticket-msg-head small { margin-left: auto; font-size: 0.76rem; }
.ticket-msg-body { margin: 0; font-size: 0.9rem; line-height: 1.55; overflow-wrap: anywhere; }

/* ── Feedback board ─────────────────────────────────────────
   The score sits to the left of everything, because on a board sorted by
   votes it is the column people scan down. */
.fb-list { display: grid; gap: 0.7rem; }

.fb-card, .fb-post {
  display: flex;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.fb-card:hover { border-color: var(--accent); }
.fb-post { margin-bottom: 1.2rem; }

.vote-box { flex: none; width: 2.6rem; text-align: center; }
.vote-box form { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.vote-btn {
  padding: 0.1rem 0.35rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--fg-dim);
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}
.vote-btn:hover { background: var(--bg-3); color: var(--fg); }
.vote-btn.is-on { color: var(--accent); }
.vote-btn.is-on.is-down { color: #e0574f; }
/* Signed out: the arrows are shown so the control is legible, but they do
   nothing rather than pretending and then failing. */
.vote-btn.is-quiet { opacity: 0.35; cursor: default; }
.vote-score { display: block; font-size: 0.95rem; }

.fb-card-body, .fb-post-body { flex: 1; min-width: 0; }
.fb-card-title { font-size: 1rem; font-weight: 600; color: var(--fg); text-decoration: none; }
.fb-card-title:hover { text-decoration: underline; }
.fb-card-summary { margin: 0.25rem 0 0.5rem; color: var(--fg-mid); font-size: 0.86rem; }
.fb-card-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; flex-wrap: wrap; }
.fb-summary { margin: 0 0 0.8rem; color: var(--fg-mid); font-size: 0.95rem; }

/* Each status has its own colour, so the board can be read at a glance
   rather than word by word. */
.fb-status.is-open     { background: var(--bg-4); color: var(--fg-mid); }
.fb-status.is-planned  { background: rgba(74,169,239,0.18); color: #8dcfff; }
.fb-status.is-building { background: rgba(229,129,58,0.2); color: #f0a165; }
.fb-status.is-done     { background: rgba(108,201,139,0.18); color: #8fdca8; }
.fb-status.is-declined { background: rgba(224,87,79,0.16); color: #f0918b; }

/* The staff answer, set apart from the suggestion it answers. */
.fb-answer {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-3);
}
.fb-answer b { display: block; margin-bottom: 0.3rem; font-size: 0.88rem; }
.fb-answer p { margin: 0 0 0.35rem; font-size: 0.9rem; line-height: 1.5; }

.fb-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.fb-sort { display: flex; gap: 0.3rem; }
.chip {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-dim);
  font-size: 0.76rem;
  text-decoration: none;
}
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ── Help Center ────────────────────────────────────────────
   A list of doors, not a wall of prose. The summary is what tells
   somebody whether this is their problem before they open it. */
.help-search { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; max-width: 520px; }
.help-search .input { flex: 1; }

.help-list { display: grid; gap: 0.5rem; }
.help-card {
  display: block;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.12s, background 0.12s;
}
.help-card:hover { border-color: var(--accent); background: var(--bg-3); }
.help-card b { display: block; font-size: 0.95rem; }
.help-card small { display: block; margin-top: 0.2rem; color: var(--fg-dim); font-size: 0.83rem; }

/* ── Server tag studio ───────────────────────────────────── */
.server-tag-level {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
  padding: 1rem 1.1rem;
  overflow: hidden;
  border: 1px solid var(--accent-edge);
  border-radius: 17px;
  background:
    radial-gradient(circle at 0 0, rgba(255,173,112,0.16), transparent 230px),
    linear-gradient(110deg, rgba(229,129,58,0.13), rgba(201,95,36,0.045));
  box-shadow: inset 0 1px rgba(255,255,255,0.04);
}
.server-tag-level.is-locked { border-color: var(--line-2); filter: saturate(.65); }
.server-tag-level-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,196,151,0.25);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 9px 22px rgba(201,95,36,0.2), inset 0 1px rgba(255,255,255,0.22);
  font-size: 1rem;
  font-weight: 900;
}
.server-tag-level > div { min-width: 0; }
.server-tag-level b, .server-tag-level small { display: block; }
.server-tag-level b { font-size: 0.92rem; }
.server-tag-level small { margin-top: 0.18rem; color: var(--fg-dim); font-size: 0.74rem; }
.server-tag-level .btn { margin-left: auto; }

.server-tag-studio {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(229,129,58,0.07), transparent 360px),
    rgba(17,20,25,0.86);
  box-shadow: 0 24px 54px rgba(0,0,0,0.18), inset 0 1px rgba(255,255,255,0.025);
}
.server-tag-builder {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: 1.25rem;
  padding: clamp(1rem, 2.6vw, 1.5rem);
}
.server-tag-fields { min-width: 0; }
.server-tag-section-head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.server-tag-section-head > span {
  flex: none;
  padding-top: 0.12rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.server-tag-section-head b, .server-tag-section-head small { display: block; }
.server-tag-section-head b { font-size: 0.9rem; }
.server-tag-section-head small { margin-top: 0.12rem; color: var(--fg-dim); font-size: 0.71rem; }
.server-tag-inputs {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 0.75rem;
}
.server-tag-inputs .field { margin: 0; }
.server-tag-emoji-field .input {
  padding-inline: 0.5rem;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  font-size: 1.15rem;
  text-align: center;
}
.server-tag-emoji-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 42px;
  padding: 0.34rem 0.5rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
.server-tag-emoji-trigger:hover { border-color: var(--accent-edge); background: var(--bg-2); }
.server-tag-emoji-trigger:disabled { opacity: .45; cursor: not-allowed; }
.server-tag-emoji-trigger > span { display: grid; place-items: center; min-width: 28px; font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; font-size: 1.2rem; }
.server-tag-emoji-trigger img { width: 24px; height: 24px; object-fit: contain; }
.server-tag-emoji-trigger small { color: var(--fg-dim); font-size: .61rem; font-weight: 750; text-transform: uppercase; }

.server-tag-emoji-picker {
  position: relative;
  z-index: 3;
  margin-top: .8rem;
  padding: .85rem;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(7,9,12,.98);
  box-shadow: 0 20px 46px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.035);
}
.server-tag-emoji-picker-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .65rem; }
.server-tag-emoji-picker-head > div { min-width: 0; }
.server-tag-emoji-picker-head b, .server-tag-emoji-picker-head small { display: block; }
.server-tag-emoji-picker-head b { font-size: .78rem; }
.server-tag-emoji-picker-head small { color: var(--fg-dim); font-size: .63rem; }
.server-tag-emoji-picker-head .icon-btn { margin-left: auto; }
.server-tag-emoji-picker > .input { height: 36px; font-size: .75rem; }
.server-tag-emoji-filters { display: flex; gap: .32rem; padding: .58rem 0; overflow-x: auto; }
.server-tag-emoji-filters button {
  flex: none;
  min-height: 29px;
  padding: .28rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-dim);
  font: inherit;
  font-size: .62rem;
  font-weight: 750;
  cursor: pointer;
}
.server-tag-emoji-filters button:hover, .server-tag-emoji-filters button.is-on { border-color: var(--accent-edge); background: var(--accent-wash); color: var(--accent-soft); }
.server-tag-emoji-filters button span { margin-left: .2rem; opacity: .65; }
.server-tag-emoji-library { max-height: 268px; padding-right: .28rem; overflow-y: auto; overscroll-behavior: contain; }
.server-tag-emoji-group { margin-top: .65rem; }
.server-tag-emoji-group:first-child { margin-top: 0; }
.server-tag-emoji-group > b { display: block; margin-bottom: .36rem; color: var(--fg-dim); font-size: .59rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.server-tag-emoji-group > div { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .25rem; }
.server-tag-emoji-group button {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: .2rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255,255,255,.025);
  color: var(--fg);
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  font-size: 1.05rem;
  cursor: pointer;
}
.server-tag-emoji-group button:hover { border-color: var(--accent-edge); background: var(--accent-wash); transform: translateY(-1px); }
.server-tag-emoji-group button img { width: 24px; height: 24px; object-fit: contain; }
.server-tag-emoji-empty { margin: 1.5rem 0; color: var(--fg-dim); font-size: .72rem; text-align: center; }
.server-tag-emoji-clear { width: 100%; margin-top: .65rem; padding: .45rem; border: 1px dashed var(--line-2); border-radius: 9px; background: transparent; color: var(--fg-dim); font: inherit; font-size: .68rem; cursor: pointer; }
.server-tag-emoji-clear:hover { border-color: var(--accent-edge); color: var(--fg); }
.server-tag-emoji-ideas { display: flex; flex-wrap: wrap; gap: 0.38rem; margin-top: 0.75rem; }
.server-tag-emoji-ideas button {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 0.45rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  color: var(--fg-mid);
  font: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.server-tag-emoji-ideas button:hover { border-color: var(--accent-edge); background: var(--accent-wash); transform: translateY(-1px); }
.server-tag-emoji-ideas button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.server-tag-emoji-ideas .is-clear { padding-inline: 0.65rem; color: var(--fg-dim); font-size: 0.68rem; }

.server-tag-live-card {
  align-self: stretch;
  padding: 1rem;
  border: 1px solid rgba(255,226,204,0.12);
  border-radius: 17px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.045), transparent 42%),
    rgba(7,9,12,0.78);
  box-shadow: inset 0 1px rgba(255,255,255,0.035);
}
.server-tag-live-label {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  color: var(--ok);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
.server-tag-live-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(108,201,139,.1); }
.server-tag-message-preview { display: flex; align-items: center; gap: 0.75rem; min-height: 92px; }
.server-tag-preview-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent-soft), var(--accent));
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 900;
}
.server-tag-preview-avatar img { width: 100%; height: 100%; object-fit: cover; }
.server-tag-message-preview > div { min-width: 0; }
.server-tag-preview-name { display: flex; align-items: center; min-width: 0; }
.server-tag-preview-name > b { overflow: hidden; font-size: 0.86rem; text-overflow: ellipsis; white-space: nowrap; }
.server-tag-message-preview p { margin: 0.2rem 0 0; color: var(--fg-dim); font-size: 0.71rem; }
.server-tag-live-card > small { display: block; color: var(--fg-dim); font-size: 0.68rem; line-height: 1.5; }

.server-tag-design-section { padding: 1.25rem clamp(1rem, 2.6vw, 1.5rem); border-top: 1px solid var(--line); }
.server-tag-style-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; }
.server-tag-style-choice {
  position: relative;
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 148px;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(7,9,12,0.64);
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s, box-shadow .16s;
}
.server-tag-style-choice:hover { border-color: rgba(255,173,112,.26); background: rgba(229,129,58,.055); transform: translateY(-2px); }
.server-tag-style-choice:has(input:checked) { border-color: var(--accent); background: rgba(229,129,58,.09); box-shadow: 0 12px 28px rgba(201,95,36,.11); }
.server-tag-style-choice input, .server-tag-color-choice input { position: absolute; opacity: 0; pointer-events: none; }
.server-tag-style-choice input:focus-visible ~ b, .server-tag-color-choice input:focus-visible ~ b { outline: 2px solid var(--accent-soft); outline-offset: 3px; }
.server-tag-style-choice .server-member-tag { width: fit-content; margin: 0 0 0.8rem; }
.server-tag-style-choice > b { font-size: 0.8rem; }
.server-tag-style-choice > small { margin-top: 0.2rem; color: var(--fg-dim); font-size: 0.66rem; line-height: 1.4; }
.server-tag-style-choice > i, .server-tag-color-choice > i {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 8px;
  height: 8px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
}
.server-tag-style-choice:has(input:checked) > i, .server-tag-color-choice:has(input:checked) > i { border-color: var(--accent-soft); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }

.server-tag-color-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 0.55rem; }
.server-tag-color-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(7,9,12,0.58);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.server-tag-color-choice:hover { border-color: rgba(255,173,112,.24); transform: translateY(-1px); }
.server-tag-color-choice:has(input:checked) { border-color: var(--accent); background: rgba(229,129,58,.08); }
.server-tag-color-choice > span { flex: none; width: 22px; height: 22px; border-radius: 8px; background: var(--tag-choice-color); box-shadow: inset 0 1px rgba(255,255,255,.24), 0 5px 13px color-mix(in srgb, var(--tag-choice-color) 26%, transparent); }
.server-tag-color-choice > b { overflow: hidden; padding-right: 0.8rem; font-size: 0.71rem; text-overflow: ellipsis; white-space: nowrap; }
.server-tag-color-choice > i { top: 50%; right: 0.55rem; transform: translateY(-50%); }
.server-tag-color-choice.is-custom > span { background: repeating-conic-gradient(#fff 0 25%, #d4d4d4 0 50%) 0/10px 10px; }
.server-tag-color-choice.is-custom > span::after { content:''; display:block; width:100%; height:100%; border-radius:inherit; background:var(--tag-choice-color); }

.server-tag-rgb-panel {
  display: grid;
  grid-template-columns: 74px minmax(130px, 1.35fr) repeat(3, minmax(62px, .6fr));
  gap: .55rem;
  margin-top: .7rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7,9,12,.58);
  opacity: .62;
  transition: border-color .16s, background .16s, opacity .16s;
}
.server-tag-rgb-panel.is-active { border-color: var(--accent-edge); background: rgba(229,129,58,.055); opacity: 1; }
.server-tag-rgb-panel > label { display: grid; gap: .3rem; min-width: 0; }
.server-tag-rgb-panel > label > span { color: var(--fg-dim); font-size: .59rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.server-tag-rgb-panel .input { min-width: 0; height: 36px; padding: .42rem .55rem; font-family: var(--mono); font-size: .73rem; }
.server-tag-color-well input { width: 100%; height: 36px; padding: 3px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--bg-1); cursor: pointer; }

.server-tag-actions { display: flex; align-items: center; gap: 1rem; padding: 1rem clamp(1rem, 2.6vw, 1.5rem); border-top: 1px solid var(--line); background: rgba(7,9,12,.50); }
.server-tag-actions > div { min-width: 0; }
.server-tag-actions b, .server-tag-actions small { display: block; }
.server-tag-actions b { font-size: 0.82rem; }
.server-tag-actions small { margin-top: 0.1rem; color: var(--fg-dim); font-size: 0.69rem; }
.server-tag-actions .btn { margin-left: auto; }

@media (max-width: 900px) {
  .server-tag-builder { grid-template-columns: 1fr; }
  .server-tag-style-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-tag-color-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .server-tag-rgb-panel { grid-template-columns: 72px minmax(120px, 1fr) repeat(3, minmax(58px, .6fr)); }
}
@media (max-width: 560px) {
  .server-tag-level { align-items: flex-start; flex-wrap: wrap; }
  .server-tag-level .btn { width: 100%; margin-left: 0; }
  .server-tag-inputs { grid-template-columns: 82px minmax(0, 1fr); }
  .server-tag-style-options { grid-template-columns: 1fr; }
  .server-tag-color-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-tag-rgb-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .server-tag-rgb-panel > label:nth-child(1), .server-tag-rgb-panel > label:nth-child(2) { grid-column: span 3; }
  .server-tag-emoji-group > div { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .server-tag-actions { align-items: stretch; flex-direction: column; }
  .server-tag-actions .btn { width: 100%; margin-left: 0; }
}

/* ── Focused server-settings module ─────────────────────────
   A modal-like work surface over an abstracted PawTalk shell. The route
   remains a real page, so every existing form and deep link keeps working. */
body:has(.settings-stage) { overflow: hidden; }
.settings-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100dvh;
  padding: clamp(14px, 2.2vw, 28px);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 4%, rgba(229,129,58,.22), transparent 34%),
    radial-gradient(circle at 88% 96%, rgba(149,111,208,.12), transparent 34%),
    #0b0807;
}
.settings-stage::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(8,5,4,.63);
  pointer-events: none;
}
.settings-app-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: grid;
  grid-template-columns: 72px 260px 1fr;
  opacity: .54;
  transform: scale(1.025);
  pointer-events: none;
}
.settings-app-backdrop > span { display: block; border-right: 1px solid rgba(255,226,204,.08); }
.settings-app-servers {
  background:
    radial-gradient(circle, rgba(255,173,112,.48) 0 13px, transparent 14px) 50% 38px/46px 58px repeat-y,
    #07080a;
}
.settings-app-channels {
  background:
    linear-gradient(rgba(255,255,255,.045), rgba(255,255,255,.045)) 18px 24px/150px 30px no-repeat,
    repeating-linear-gradient(180deg, transparent 0 48px, rgba(255,255,255,.035) 49px 50px),
    #17100e;
}
.settings-app-chat {
  background:
    radial-gradient(circle at 88% 12%, rgba(229,129,58,.1), transparent 28%),
    repeating-linear-gradient(180deg, transparent 0 66px, rgba(255,255,255,.025) 67px 68px),
    #120d0b;
}

.settings-stage > .settings {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  width: min(1320px, 100%);
  height: min(920px, 100%);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255,226,204,.14);
  border-radius: 24px;
  background: rgba(12,14,17,.99);
  box-shadow: 0 38px 110px rgba(0,0,0,.66), 0 0 0 1px rgba(0,0,0,.36), inset 0 1px rgba(255,255,255,.035);
}
.settings-stage .settings-rail {
  min-width: 0;
  padding: 1.15rem .85rem 1.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 0 0, rgba(229,129,58,.09), transparent 230px),
    rgba(24,17,14,.98);
  scrollbar-width: thin;
  scrollbar-color: var(--bg-4) transparent;
}
.settings-stage .settings-rail::-webkit-scrollbar { width: 7px; }
.settings-stage .settings-rail::-webkit-scrollbar-track { background: transparent; }
.settings-stage .settings-rail::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: var(--bg-4); background-clip: content-box; }
.settings-stage .settings-back {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  margin: 0 0 .8rem;
  padding: .42rem .55rem;
  border-radius: 9px;
  font-size: .72rem;
  font-weight: 700;
}
.settings-stage .settings-back:hover { background: rgba(255,255,255,.04); }
.settings-stage .settings-back span { color: var(--accent-soft); font-size: .9rem; }
.settings-server-card {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  margin-bottom: .55rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(229,129,58,.035));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.settings-server-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent-soft), var(--accent));
  color: var(--accent-ink);
  font-size: .66rem;
  font-weight: 900;
}
.settings-server-icon img { width: 100%; height: 100%; object-fit: cover; }
.settings-stage .settings-server { min-width: 0; padding: 0; }
.settings-stage .settings-server b,
.settings-stage .settings-server small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-stage .settings-server b { font-size: .82rem; letter-spacing: -.01em; }
.settings-stage .settings-server small { margin-top: .12rem; color: var(--fg-dim); font-size: .62rem; font-weight: 600; }
.settings-stage .settings-group { padding: .95rem .65rem .3rem; font-size: .6rem; letter-spacing: .11em; }
.settings-stage .settings-link {
  position: relative;
  margin: 1px 0;
  padding: .48rem .65rem .48rem .78rem;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .79rem;
  font-weight: 620;
}
.settings-stage .settings-link:hover { border-color: rgba(255,226,204,.06); background: rgba(255,255,255,.035); }
.settings-stage .settings-link.on {
  border-color: rgba(229,129,58,.16);
  background: linear-gradient(90deg, rgba(229,129,58,.17), rgba(229,129,58,.055));
  color: var(--fg);
}
.settings-stage .settings-link.on::before {
  content: '';
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 3px;
  width: 3px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(229,129,58,.42);
}
.settings-stage .settings-sep { margin: .8rem .65rem; }

.settings-stage .settings-main {
  position: relative;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0, rgba(229,129,58,.055), transparent 340px),
    var(--bg-0);
  scrollbar-gutter: stable;
}
.settings-content {
  width: min(100%, 1060px);
  min-height: 100%;
  padding: clamp(2rem, 4vw, 3.25rem) clamp(1.5rem, 4.5vw, 4.25rem) 5rem;
}
.settings-context {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0 4rem 1.25rem 0;
  color: var(--fg-dim);
  font-size: .66rem;
  font-weight: 760;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.settings-context i { opacity: .42; font-style: normal; }
.settings-context b { overflow: hidden; color: var(--accent-soft); text-overflow: ellipsis; white-space: nowrap; }
.settings-close-wrap {
  position: absolute;
  z-index: 50;
  top: 1.15rem;
  right: 1.15rem;
  display: grid;
  justify-items: center;
  gap: .28rem;
}
.settings-stage .settings-close {
  position: static;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(32,38,48,.94);
  box-shadow: 0 12px 28px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.04);
}
.settings-close-wrap > span { color: var(--fg-dim); font-family: var(--mono); font-size: .52rem; font-weight: 800; letter-spacing: .08em; }

@media (max-width: 1080px) {
  .settings-stage > .settings { grid-template-columns: 224px minmax(0, 1fr); }
  .settings-content { padding-inline: clamp(1.35rem, 4vw, 2.5rem); }
}

@media (max-width: 760px) {
  .settings-stage { padding: 0; }
  .settings-app-backdrop { display: none; }
  .settings-stage > .settings {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .settings-stage .settings-rail {
    display: flex;
    align-items: center;
    gap: .3rem;
    min-height: 66px;
    padding: .65rem 4.25rem .65rem .65rem;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }
  .settings-stage .settings-rail::-webkit-scrollbar { display: none; }
  .settings-stage .settings-back { flex: none; margin: 0; }
  .settings-server-card { flex: none; max-width: 180px; margin: 0 .35rem 0 0; padding: .42rem .55rem; border-radius: 11px; }
  .settings-server-icon { width: 30px; height: 30px; border-radius: 9px; }
  .settings-stage .settings-server small { display: none; }
  .settings-stage .settings-group, .settings-stage .settings-sep { display: none; }
  .settings-stage .settings-link { flex: none; margin: 0; padding: .48rem .65rem; font-size: .72rem; white-space: nowrap; }
  .settings-stage .settings-link.on::before { top: auto; right: 8px; bottom: 2px; left: 8px; width: auto; height: 2px; }
  .settings-stage .settings-main { padding: 0; }
  .settings-content { padding: 1.4rem 1rem 4rem; }
  .settings-context { margin-bottom: .9rem; }
  .settings-close-wrap { top: .65rem; right: .65rem; }
  .settings-close-wrap > span { display: none; }
  .settings-stage .settings-close { width: 38px; height: 38px; }
}

@media (max-width: 480px) {
  .settings-stage .settings-back { width: 34px; overflow: hidden; font-size: 0; }
  .settings-stage .settings-back span { font-size: .9rem; }
  .settings-server-card { max-width: 142px; }
  .settings-content { padding-inline: .8rem; }
}

/* Antivirus / SmartScreen explainer under the download cards (downloads.php). */
.download-av { display:grid; grid-template-columns:auto 1fr; gap:1rem; margin-top:1rem; padding:1.25rem 1.35rem; border:1px solid rgba(229,129,58,.28); border-radius:1.2rem; background:linear-gradient(145deg,rgba(57,40,32,.6),rgba(28,22,20,.9)); }
.download-av-mark { display:grid; place-items:center; width:44px; height:44px; border-radius:.8rem; background:var(--accent-wash); font-size:1.3rem; }
.download-av-copy h3 { margin:.1rem 0 .5rem; font-size:1.12rem; letter-spacing:-.03em; }
.download-av-copy > p:not(.landing-eyebrow) { margin:0 0 .7rem; color:var(--fg-mid); font-size:.86rem; line-height:1.6; }
.download-av-copy ul { margin:0; padding-left:1.1rem; display:grid; gap:.4rem; color:var(--fg-mid); font-size:.84rem; line-height:1.55; }
.download-av-copy b { color:var(--fg); }
.download-av-copy a { color:var(--accent-soft); }
@media (max-width:560px) { .download-av { grid-template-columns:1fr; padding:1rem; } }

/* Server settings: forms that save as you change them */
form.is-autosave .autosave-hide { display: none; }
.autosave-status { margin-top: 0.9rem; font-size: 0.8rem; color: var(--fg-dim); }
.autosave-status[data-kind="ok"] { color: #57c98a; }
.autosave-status[data-kind="error"] { color: var(--busy, #e2635a); }
.settings-form-stack { min-width: 0; }
.settings-form-flags { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

/* ── Admin top bar (WHMCS style) ─────────────────────────── */
.admin-topbar { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid var(--line); background: var(--bg-1, #121418); }
.admin-topbar-inner { display: flex; align-items: center; gap: 1rem; max-width: 1400px; margin: 0 auto; padding: 0 1rem; min-height: 56px; }
.admin-topbar-brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--fg); font-weight: 800; text-decoration: none; white-space: nowrap; }
.admin-topbar-brand .admin-chip { margin: 0; }
.admin-topbar-toggle { display: none; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--fg); font-size: 1.1rem; padding: .25rem .55rem; cursor: pointer; }
.admin-topnav { display: flex; align-items: stretch; gap: .15rem; align-self: stretch; }
.admin-topnav-group { position: relative; display: flex; }
.admin-topnav-link { display: inline-flex; align-items: center; gap: .35rem; padding: 0 .8rem; border: 0; border-bottom: 2px solid transparent;
  background: none; color: var(--fg-mid, #c9ccd2); font: inherit; font-size: .86rem; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; }
.admin-topnav-link:hover, .admin-topnav-group.is-open > .admin-topnav-link { color: var(--fg); background: rgba(255,255,255,.03); }
.admin-topnav-link.is-current, .admin-topnav-group.is-current > .admin-topnav-link { color: var(--fg); border-bottom-color: var(--accent); }
.admin-topnav-caret { font-size: .7rem; opacity: .7; }
.admin-topnav-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 290px; padding: .4rem; border: 1px solid var(--line);
  border-radius: 0 0 12px 12px; background: var(--bg-1, #121418); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.admin-topnav-group.is-open > .admin-topnav-menu { display: block; }
@media (hover: hover) and (min-width: 901px) { .admin-topnav .admin-topnav-group:hover > .admin-topnav-menu { display: block; } }
.admin-topnav-item { display: flex; align-items: center; gap: .65rem; padding: .55rem .6rem; border-radius: 8px; color: var(--fg); text-decoration: none; }
.admin-topnav-item:hover { background: var(--bg-3, rgba(255,255,255,.05)); }
.admin-topnav-item.is-current { background: var(--accent-wash); }
.admin-topnav-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--bg-2, #1b1e24); color: var(--accent-soft); }
.admin-topnav-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.admin-topnav-text b { font-size: .85rem; }
.admin-topnav-text small { color: var(--fg-dim); font-size: .72rem; line-height: 1.3; }
.admin-top-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #e2635a; color: #fff; font-size: .66rem; font-weight: 800; }
.admin-top-count[hidden] { display: none; }
.admin-topbar-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.admin-topbar-search { display: flex; align-items: center; gap: .35rem; padding: 0 .6rem; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2, #1b1e24); color: var(--fg-dim); }
.admin-topbar-search input { width: 150px; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: .82rem; }
.admin-bell { position: relative; }
.admin-bell-button { position: relative; display: grid; place-items: center; width: 36px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2, #1b1e24); cursor: pointer; font-size: .95rem; }
.admin-bell-button .admin-top-count { position: absolute; top: -6px; right: -7px; }
.admin-bell-menu { left: auto; right: 0; border-radius: 12px; margin-top: .4rem; }
.admin-bell-head { padding: .35rem .6rem .5rem; color: var(--fg-dim); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.admin-bell-desktop { width: 100%; margin-top: .35rem; padding: .5rem; border: 1px dashed var(--line); border-radius: 8px; background: none; color: var(--accent-soft); font: inherit; font-size: .78rem; cursor: pointer; }

@media (max-width: 900px) {
  .admin-topbar-inner { flex-wrap: wrap; gap: .5rem; padding: .5rem .8rem; }
  .admin-topbar-toggle { display: block; }
  .admin-topnav, .admin-topbar-actions { display: none; width: 100%; }
  .admin-topbar.is-nav-open .admin-topnav { display: flex; flex-direction: column; gap: 0; }
  .admin-topbar.is-nav-open .admin-topbar-actions { display: flex; flex-wrap: wrap; }
  .admin-topnav-group { flex-direction: column; }
  .admin-topnav-link { padding: .7rem .4rem; border-bottom: 0; justify-content: space-between; }
  .admin-topnav-menu { position: static; min-width: 0; box-shadow: none; border: 0; padding: 0 0 .4rem .4rem; }
  .admin-topbar-search { flex: 1; }
  .admin-topbar-search input { width: 100%; }
  .admin-bell-menu { position: absolute; min-width: 260px; max-width: calc(100vw - 1.6rem); }
}

/* ============================================================
   Admin kit - the staff design
   ============================================================
   Scoped to body.is-admin (head.php sets it when a page declares
   $admin_active). Pages are drawn with includes/adminkit.php, so every
   one shares this header, card, table, tab and dialog. */

body.is-admin {
  --ak-bg: #0a0c0f;
  --ak-card: #12151a;
  --ak-card-2: #171b21;
  --ak-line: rgba(255, 255, 255, .08);
  --ak-line-2: rgba(255, 255, 255, .14);
  --ak-dim: #9aa4b2;
  background: var(--ak-bg);
}
body.is-admin .admin-page-context { display: none; }

/* Page frame. */
.ak-page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 1.6rem 1.5rem 5rem; }

/* Header. */
.ak-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.ak-head-text { min-width: 0; max-width: 70ch; }
.ak-eyebrow { display: block; margin-bottom: .3rem; color: var(--accent-soft); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ak-head h1 { margin: 0; font-size: 1.65rem; font-weight: 760; letter-spacing: -.035em; line-height: 1.15; }
.ak-head p { margin: .4rem 0 0; color: var(--ak-dim); font-size: .88rem; line-height: 1.5; }
.ak-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Result of the last form. */
.ak-flash { display: flex; align-items: center; gap: .65rem; margin-bottom: 1rem; padding: .7rem .9rem; border: 1px solid var(--ak-line-2); border-radius: 12px; background: var(--ak-card); font-size: .88rem; }
.ak-flash span { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: .75rem; font-weight: 900; }
.ak-flash.is-ok { border-color: rgba(108, 201, 139, .35); }
.ak-flash.is-ok span { background: rgba(108, 201, 139, .18); color: var(--ok); }
.ak-flash.is-error { border-color: rgba(214, 75, 75, .45); }
.ak-flash.is-error span { background: rgba(214, 75, 75, .2); color: #f08a8a; }

/* Tabs. */
.ak-tabs { display: flex; gap: .15rem; overflow-x: auto; margin-bottom: 1.1rem; border-bottom: 1px solid var(--ak-line); }
.ak-tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .65rem .85rem; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--ak-dim); font-size: .86rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.ak-tabs a:hover { color: var(--fg); }
.ak-tabs a.is-current { border-bottom-color: var(--accent); color: var(--fg); }
.ak-tabs i { min-width: 20px; padding: .05rem .4rem; border-radius: 999px; background: var(--ak-card-2); color: var(--ak-dim); font-size: .7rem; font-style: normal; text-align: center; }
.ak-tabs a.is-current i { background: var(--accent-wash); color: var(--accent-soft); }

/* Cards. */
.ak-card { margin-bottom: 1rem; border: 1px solid var(--ak-line); border-radius: 14px; background: var(--ak-card); }
.ak-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--ak-line); }
.ak-card-head h2 { margin: 0; font-size: .95rem; font-weight: 720; letter-spacing: -.01em; }
.ak-card-head small { display: block; margin-top: .15rem; color: var(--ak-dim); font-size: .78rem; }
.ak-card-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ak-card-body { padding: 1.1rem; }
.ak-card-body.is-flush { padding: 0; }
.ak-card.is-danger { border-color: rgba(214, 75, 75, .4); }
.ak-card.is-danger .ak-card-head h2 { color: #f08a8a; }
.ak-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.ak-cols > .ak-card { margin-bottom: 0; }
.ak-cols.is-side { grid-template-columns: minmax(0, 1fr) 340px; }

/* Tables. */
.ak-table-wrap { overflow-x: auto; }
.ak-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ak-table th { padding: .6rem 1.1rem; border-bottom: 1px solid var(--ak-line); color: var(--ak-dim); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.ak-table td { padding: .7rem 1.1rem; border-bottom: 1px solid var(--ak-line); vertical-align: middle; }
.ak-table tbody tr:last-child td { border-bottom: 0; }
.ak-table tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.ak-table .is-right { text-align: right; }
.ak-table .is-dim { color: var(--ak-dim); }
.ak-table .is-mono, .ak-mono { font-family: var(--mono); font-size: .82rem; }
.ak-table .is-wrap { max-width: 420px; overflow-wrap: anywhere; }
.ak-row-actions { display: flex; justify-content: flex-end; gap: .35rem; flex-wrap: wrap; }
.ak-who { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.ak-who b, .ak-who small { display: block; }
.ak-who small { color: var(--ak-dim); font-size: .76rem; }
.ak-who a { color: inherit; text-decoration: none; }
.ak-who a:hover b { text-decoration: underline; }
.ak-thumb { display: grid; place-items: center; flex: none; width: 34px; height: 34px; overflow: hidden; border-radius: 9px; background: var(--ak-card-2); color: var(--accent-soft); font-weight: 800; }
.ak-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ak-inline { display: inline; margin: 0; }

/* Pills. */
.ak-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 750; white-space: nowrap; }
.ak-pill.is-muted { background: rgba(255, 255, 255, .07); color: var(--ak-dim); }
.ak-pill.is-ok { background: rgba(108, 201, 139, .15); color: var(--ok); }
.ak-pill.is-warn { background: rgba(240, 161, 101, .16); color: var(--accent-soft); }
.ak-pill.is-danger { background: rgba(214, 75, 75, .18); color: #f08a8a; }
.ak-pill.is-accent { background: var(--accent-wash); color: var(--accent-soft); }

/* Stats. */
.ak-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.ak-stat { position: relative; display: block; padding: 1rem 1.1rem; border: 1px solid var(--ak-line); border-radius: 14px; background: var(--ak-card); color: inherit; text-decoration: none; }
a.ak-stat:hover { border-color: var(--accent-edge); }
.ak-stat span { display: block; color: var(--ak-dim); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ak-stat b { display: block; margin-top: .35rem; font-size: 1.7rem; letter-spacing: -.04em; }
.ak-stat small { color: var(--ak-dim); font-size: .76rem; }
.ak-stat.is-alert { border-color: rgba(214, 75, 75, .5); }
.ak-stat.is-alert b { color: #f08a8a; }

/* Tiles (settings areas, icons, sounds, badges…). */
.ak-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.ak-tile { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border: 1px solid var(--ak-line); border-radius: 14px; background: var(--ak-card); color: inherit; text-decoration: none; }
a.ak-tile:hover, button.ak-tile:hover { border-color: var(--accent-edge); }
.ak-tile-top { display: flex; align-items: center; gap: .7rem; }
.ak-tile-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: 11px; background: var(--ak-card-2); color: var(--accent-soft); font-size: 1.1rem; }
.ak-tile-icon img { max-width: 70%; max-height: 70%; }
.ak-tile h3 { margin: 0; font-size: .92rem; }
.ak-tile p { margin: 0; color: var(--ak-dim); font-size: .8rem; line-height: 1.45; }
.ak-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .4rem; }

/* Toolbar (search + filters above a list). */
.ak-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.ak-toolbar .input { flex: 1 1 280px; height: 40px; }
.ak-toolbar .select { width: auto; height: 40px; }

/* Empty state. */
.ak-empty { display: grid; justify-items: center; gap: .3rem; padding: 2.6rem 1rem; text-align: center; }
.ak-empty span { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: .4rem; border-radius: 50%; background: var(--ak-card-2); color: var(--accent-soft); font-size: 1.2rem; }
.ak-empty b { font-size: .95rem; }
.ak-empty small { max-width: 46ch; color: var(--ak-dim); font-size: .82rem; }

/* Facts (label/value lists). */
.ak-facts { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: .5rem 1rem; margin: 0; font-size: .86rem; }
.ak-facts dt { color: var(--ak-dim); }
.ak-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Forms inside the kit. */
body.is-admin .field { margin-bottom: .9rem; }
body.is-admin .label { font-size: .72rem; }
body.is-admin .hint { color: var(--ak-dim); font-size: .75rem; }
.ak-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .9rem; }
.ak-form-grid .is-full { grid-column: 1 / -1; }
.ak-checks { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.ak-note { margin: 0 0 1rem; color: var(--ak-dim); font-size: .84rem; line-height: 1.5; }
.ak-modal .modal-box { max-width: 620px; }
.ak-modal.is-wide .modal-box { max-width: 900px; }

/* Anything a page still draws the old way gets the same surfaces. */
body.is-admin .panel { border-color: var(--ak-line); border-radius: 14px; background: var(--ak-card); box-shadow: none; }
body.is-admin .notice { border-radius: 12px; }
body.is-admin .notice-warn { border-left-color: var(--warn); }

@media (max-width: 900px) {
  .ak-page { padding: 1.1rem 1rem 4rem; }
  .ak-cols, .ak-cols.is-side, .ak-form-grid { grid-template-columns: 1fr; }
  .ak-facts { grid-template-columns: 120px minmax(0, 1fr); }
  .ak-table th, .ak-table td { padding-left: .8rem; padding-right: .8rem; }
}

/* Shared pieces used by the rebuilt pages. */
.admin-back { display: inline-block; margin-bottom: .7rem; color: var(--fg-dim); font-size: .8rem; text-decoration: none; }
.admin-back:hover { color: var(--fg); }
.admin-two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: .9rem; align-items: start; }
.admin-sub { margin: 1rem 0 .35rem; color: var(--fg-dim); font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.admin-facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: .45rem .9rem; margin: 0 0 .8rem; font-size: .86rem; }
.admin-facts dt { color: var(--fg-dim); }
.admin-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.admin-bio { margin: 0; color: var(--fg-mid); font-size: .86rem; line-height: 1.5; }
.admin-cell-person { display: flex; align-items: center; gap: .6rem; }
.admin-cell-person a { color: inherit; text-decoration: none; }
.admin-cell-person a:hover b { text-decoration: underline; }
.admin-cell-person small { display: block; color: var(--fg-dim); font-size: .75rem; }
.admin-inline-form { display: flex; gap: .4rem; align-items: center; }
.admin-inline-form .input { min-width: 180px; height: 34px; padding: .3rem .6rem; font-size: .8rem; }
.admin-filter { margin-bottom: .9rem; padding: .75rem !important; }
.admin-filter-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.admin-filter-form .input { flex: 1 1 260px; }
.admin-filter-form .select { width: auto; max-width: 220px; }
.admin-filter-form .is-current { border-color: var(--accent-edge); color: var(--accent-soft); }

/* Stats strip. */
.admin-stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-bottom: .9rem; }
.admin-stat { display: block; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-1); color: inherit; text-decoration: none; }
.admin-stat:hover { border-color: var(--accent-edge); }
.admin-stat b { display: block; font-size: 1.4rem; letter-spacing: -.03em; }
.admin-stat span { color: var(--fg-dim); font-size: .75rem; }

/* Person page. */
.avatar-xl { width: 96px; height: 96px; font-size: 2.2rem; }
.admin-person-hero { overflow: hidden; margin-bottom: .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-1); }
.admin-person-banner {
  height: 130px; background: linear-gradient(135deg, var(--person-accent, var(--accent)), color-mix(in srgb, var(--person-accent, var(--accent)) 35%, var(--bg-2)));
  background-size: cover; background-position: center;
}
.admin-person-head { display: flex; align-items: flex-start; gap: 1rem; margin-top: -48px; padding: 0 1.2rem; }
.admin-person-avatar { position: relative; flex: none; }
.admin-person-avatar .avatar { border: 5px solid var(--bg-1); border-radius: 50%; }
.admin-presence { position: absolute; right: 6px; bottom: 6px; width: 20px; height: 20px; border: 4px solid var(--bg-1); border-radius: 50%; background: var(--off); }
.admin-presence.is-online { background: var(--ok); }
.admin-presence.is-idle { background: var(--warn); }
.admin-presence.is-busy { background: var(--busy); }
.admin-person-id { flex: 1; min-width: 0; padding-top: 56px; }
.admin-person-id h1 { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin: 0; font-size: 1.45rem; letter-spacing: -.03em; }
.admin-person-id .muted { font-size: .83rem; }
.admin-person-status { margin-top: .3rem; color: var(--fg-mid); font-size: .85rem; }
.admin-person-badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.admin-person-standing, .admin-standing-card {
  padding: .6rem .85rem; border: 1px solid color-mix(in srgb, var(--standing) 45%, transparent);
  border-radius: 10px; background: color-mix(in srgb, var(--standing) 12%, transparent);
}
.admin-person-standing { flex: none; min-width: 150px; margin-top: 60px; }
.admin-person-standing small, .admin-person-standing span { display: block; color: var(--fg-dim); font-size: .72rem; }
.admin-person-standing b, .admin-standing-card b { display: block; color: var(--standing); font-size: 1.05rem; }
.admin-standing-card { margin-bottom: .9rem; }
.admin-standing-card span { color: var(--fg-dim); font-size: .78rem; }
.admin-person-actions { display: flex; flex-wrap: wrap; gap: .45rem; padding: 1rem 1.2rem .2rem; }
.admin-person-actions form { margin: 0; }
.admin-tabs { display: flex; gap: .2rem; overflow-x: auto; margin-top: .6rem; padding: 0 1rem; border-top: 1px solid var(--line); }
.admin-tabs a { padding: .7rem .75rem; border-bottom: 2px solid transparent; color: var(--fg-dim); font-size: .84rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.admin-tabs a:hover { color: var(--fg); }
.admin-tabs a.is-current { border-bottom-color: var(--accent); color: var(--fg); }
.admin-person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.admin-person-tile { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; }
.admin-person-tile:hover { border-color: var(--accent-edge); background: var(--surface-hover); }
.admin-person-tile b, .admin-person-tile small { display: block; }
.admin-person-tile small { color: var(--fg-dim); font-size: .74rem; }

/* Message lists (server messages, DMs). */
.admin-msgs { display: grid; gap: .45rem; max-height: 70vh; overflow-y: auto; }
.admin-msg { padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.admin-msg.is-deleted { border-style: dashed; opacity: .75; }
.admin-msg-meta { color: var(--fg-dim); font-size: .73rem; }
.admin-msg-meta b { color: var(--fg-mid); }
.admin-msg-body { margin-top: .2rem; font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere; }

/* Mass selection bar. */
.admin-mass-bar {
  position: sticky; bottom: 1rem; z-index: 20; display: flex; align-items: center; gap: .6rem;
  width: fit-content; margin: 1rem auto 0; padding: .55rem .7rem .55rem 1rem;
  border: 1px solid var(--accent-edge); border-radius: 999px; background: var(--surface-raised); box-shadow: var(--shadow-sm);
}
.admin-mass-bar[hidden] { display: none; }
.admin-people-table input[type="checkbox"], [data-mass-all] { width: 16px; height: 16px; accent-color: var(--accent); }

/* Server takedown. */
.admin-danger-panel { border-color: rgba(214, 75, 75, .45) !important; }
.admin-danger-panel .panel-title { color: #f08a8a; }
.admin-takedown-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 .8rem; }

@media (max-width: 900px) {
  body.is-admin .settings-split, .admin-two { grid-template-columns: 1fr; }
  .admin-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-person-head { flex-wrap: wrap; }
  .admin-person-standing { width: 100%; margin-top: 0; }
  .admin-person-id { padding-top: 52px; }
  .admin-facts { grid-template-columns: 120px minmax(0, 1fr); }
}

/* Toggle rows (server trust marks and similar on/off settings). */
.ak-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--ak-line); }
.ak-toggle-row:first-child { padding-top: 0; }
.ak-toggle-row:last-child { padding-bottom: 0; border-bottom: 0; }
.ak-toggle-row b { display: block; font-size: .88rem; }
.ak-toggle-row small { display: block; margin-top: .15rem; color: var(--ak-dim); font-size: .78rem; }
.ak-toggle-state { display: flex; align-items: center; gap: .5rem; flex: none; }

/* Report cards. */
.ak-report-label { margin-bottom: .35rem; color: var(--ak-dim); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ak-report-meta { margin-top: .4rem; color: var(--ak-dim); font-size: .8rem; }
.ak-report-meta a { color: inherit; }
.ak-quote { padding: .6rem .75rem; border-left: 3px solid var(--accent-edge); border-radius: 6px; background: var(--ak-card-2); font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.ak-report-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--ak-line); }
.ak-report-actions .select { width: auto; min-width: 200px; height: 36px; }
.ak-report-actions .input { height: 36px; }
.ak-report-buttons { display: flex; flex-wrap: wrap; gap: .35rem; margin-left: auto; }

/* Ticket thread. */
.ak-thread { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.ak-thread li { padding: .75rem .9rem; border: 1px solid var(--ak-line); border-radius: 12px; background: var(--ak-card-2); }
.ak-thread li.is-staff { border-color: var(--accent-edge); }
.ak-thread li.is-internal { border-style: dashed; border-color: rgba(240, 161, 101, .5); background: rgba(240, 161, 101, .06); }
.ak-thread-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .35rem; }
.ak-thread-head small { margin-left: auto; color: var(--ak-dim); font-size: .75rem; }
.ak-thread-body { font-size: .88rem; line-height: 1.55; overflow-wrap: anywhere; }

/* Settings: section list on the left, the section on the right. */
.ak-settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.ak-side-nav { position: sticky; top: 80px; display: grid; gap: .15rem; padding: .4rem; border: 1px solid var(--ak-line); border-radius: 14px; background: var(--ak-card); }
.ak-side-nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: 9px; color: var(--ak-dim); font-size: .86rem; font-weight: 650; text-decoration: none; }
.ak-side-nav a span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--ak-card-2); color: var(--accent-soft); font-size: .8rem; }
.ak-side-nav a:hover { background: rgba(255, 255, 255, .04); color: var(--fg); }
.ak-side-nav a.is-current { background: var(--accent-wash); color: var(--fg); }
.ak-save-bar { position: sticky; bottom: 1rem; display: flex; justify-content: flex-end; padding: .7rem; border: 1px solid var(--ak-line-2); border-radius: 14px; background: var(--surface-raised); box-shadow: var(--shadow-sm); }
@media (max-width: 900px) { .ak-settings { grid-template-columns: 1fr; } .ak-side-nav { position: static; grid-auto-flow: column; overflow-x: auto; } .ak-side-nav a { white-space: nowrap; } }

/* Media grid (GIFs, stickers, submissions). */
.ak-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.ak-media { display: flex; flex-direction: column; margin: 0; overflow: hidden; border: 1px solid var(--ak-line); border-radius: 12px; background: var(--ak-card-2); }
.ak-media-art { display: grid; place-items: center; aspect-ratio: 1; background: repeating-conic-gradient(rgba(255,255,255,.03) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.ak-media-art img { max-width: 88%; max-height: 88%; object-fit: contain; }
.ak-media figcaption { display: grid; gap: .1rem; padding: .55rem .65rem 0; min-width: 0; }
.ak-media figcaption b { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.ak-media figcaption small { overflow: hidden; color: var(--ak-dim); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.ak-media-actions { display: flex; gap: .35rem; justify-content: flex-end; margin-top: auto; padding: .55rem .65rem .65rem; }

/* Destructive buttons inside lists stay quiet until hovered. */
.ak-row-actions .btn-danger, .ak-media-actions .btn-danger { background: transparent; border: 1px solid rgba(214, 75, 75, .45); color: #f08a8a; }
.ak-row-actions .btn-danger:hover, .ak-media-actions .btn-danger:hover { background: rgba(214, 75, 75, .16); color: #ffb0b0; }

/* Warn / Strike / Mute / Ban on a person's page. */
.ak-quick-sanctions { display: inline-flex; gap: .35rem; padding-right: .6rem; margin-right: .2rem; border-right: 1px solid var(--ak-line); }

/* Two-way choice cards (points or ban) and section titles inside dialogs. */
.ak-choice { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ak-choice label { display: block; margin: 0; cursor: pointer; }
.ak-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ak-choice span { display: block; height: 100%; padding: .6rem .75rem; border: 1px solid var(--ak-line-2); border-radius: 10px; background: var(--ak-card-2); }
.ak-choice b { display: block; font-size: .88rem; }
.ak-choice small { display: block; margin-top: .15rem; color: var(--ak-dim); font-size: .75rem; }
.ak-choice input:checked + span { border-color: var(--accent); background: var(--accent-wash); }
.ak-choice input[value=ban]:checked + span { border-color: rgba(214, 75, 75, .7); background: rgba(214, 75, 75, .12); }
.ak-choice input:focus-visible + span { outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.ak-modal-section { margin: 0 0 .7rem; color: var(--ak-dim); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* ── Server templates (settings page + public gallery) ───── */
.tpl-copies { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 1rem; }
.tpl-copies div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.tpl-copies b { display: block; font-size: 0.8rem; margin-bottom: 3px; }
.tpl-copies span { color: var(--fg-dim); font-size: 0.78rem; }
.tpl-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-0); font-family: ui-monospace, monospace; font-size: 0.82rem; overflow: hidden; }
.tpl-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-meta { margin: 0.5rem 0 1rem; font-size: 0.8rem; }
.tpl-form-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.tpl-actions { display: flex; align-items: center; gap: 10px; margin-top: 0.8rem; }
.tpl-delete { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.tpl-outline { margin-top: 10px; }
.tpl-outline-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tpl-outline-cat { display: grid; gap: 3px; align-content: start; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-0); min-width: 0; }
.tpl-outline-cat b { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg-mid); margin-bottom: 3px; }
.tpl-outline-ch { display: flex; gap: 7px; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-outline-ch i { font-style: normal; color: var(--fg-dim); width: 15px; text-align: center; flex: none; }
.tpl-lock { font-size: 0.7em; opacity: 0.8; }
.tpl-outline-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tpl-role { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.76rem; }
.tpl-role i { width: 9px; height: 9px; border-radius: 50%; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tpl-card { display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-1); }
.tpl-card h3 { margin: 0 0 4px; font-size: 1rem; }
.tpl-card h3 a { color: inherit; text-decoration: none; }
.tpl-card p { margin: 0 0 10px; color: var(--fg-mid); font-size: 0.85rem; flex: 1; }
.tpl-card-chans { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.tpl-card-chans span { padding: 2px 8px; border-radius: 6px; background: var(--bg-2); color: var(--fg-mid); font-size: 0.74rem; }
.tpl-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tpl-detail { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-1); }
.tpl-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.tpl-detail-actions { display: flex; gap: 8px; align-items: center; }
.tpl-note { margin-top: 1rem; font-size: 0.8rem; }
@media (max-width: 640px) { .tpl-copies, .tpl-form-grid { grid-template-columns: 1fr; } }

/* Admin → Staff */
body.is-admin .staff-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
body.is-admin .staff-perms { display: flex; flex-wrap: wrap; gap: 4px; max-width: 520px; }
body.is-admin .staff-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
body.is-admin .staff-perm { align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin: 0; }
body.is-admin .staff-perm b { display: block; font-size: 0.84rem; }
body.is-admin .staff-perm small { display: block; color: var(--fg-dim); font-size: 0.74rem; }
body.is-admin .staff-perm.is-locked { opacity: 0.5; }

/* Move from Discord */
.move-body { max-width: 620px; }
.move-card { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-1); }
.move-card h2 { margin: 0.2rem 0 0.4rem; font-size: 1.2rem; }
.move-steps { margin: 0 0 1.2rem; padding-left: 1.2rem; display: grid; gap: 0.8rem; }
.move-steps b { display: block; }
.move-steps span { color: var(--fg-mid); font-size: 0.9rem; }
.move-discord-btn { width: 100%; background: #5865f2; border-color: #5865f2; color: #fff; }
.move-preview { margin: -22px -22px 1rem; border-radius: 16px 16px 0 0; overflow: hidden; }
.move-banner { height: 120px; background: linear-gradient(130deg, var(--accent), var(--accent-soft)); background-size: cover; background-position: center; }
.move-id { display: flex; align-items: flex-end; gap: 12px; padding: 0 22px; margin-top: -36px; }
.move-id b { display: block; font-size: 1.1rem; }
.move-id small { color: var(--fg-dim); }
.move-avatar { width: 84px; height: 84px; border-radius: 50%; border: 5px solid var(--bg-1); background: var(--bg-3); display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; overflow: hidden; flex: none; }
.move-avatar img { width: 100%; height: 100%; object-fit: cover; }
.move-form .check { margin-bottom: 0.55rem; }
.move-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-left: 4px; }
.move-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1rem; }
.move-cancel { margin-top: 1rem; text-align: center; }
.move-done { text-align: center; }
.move-cancel button { background: none; border: 0; color: var(--fg-dim); font: inherit; font-size: 0.85rem; cursor: pointer; text-decoration: underline; }
.move-cancel button:hover { color: var(--fg); }

/* Admin: small actions menu (a <details>), each item opens its own popup */
.ak-menu { position: relative; display: inline-block; }
.ak-menu > summary { list-style: none; cursor: pointer; }
.ak-menu > summary::-webkit-details-marker { display: none; }
.ak-menu-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 210px; display: grid; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); box-shadow: 0 16px 40px rgba(0,0,0,0.45); }
.ak-menu-list button { padding: 0.55rem 0.75rem; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; }
.ak-menu-list button:hover { background: var(--bg-3); }
.ak-menu-list button.is-danger { color: #f0776a; }
.ak-menu-list button.is-danger:hover { background: rgba(240,119,106,0.12); }
.ak-list-plain { margin: 0.4rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; font-size: 0.9rem; }

/* Public staff team page */
.team-body { padding: 2rem 0 3rem; display: grid; gap: 2.2rem; }
.team-role-head h2 { display: flex; align-items: center; gap: 0.55rem; margin: 0; font-size: 1.25rem; }
.team-role-head h2 span { font-size: 0.8rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--bg-3); color: var(--fg-dim); }
.team-role-head p { margin: 0.35rem 0 0; color: var(--fg-mid); }
.team-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--role); box-shadow: 0 0 0 4px color-mix(in srgb, var(--role) 25%, transparent); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.9rem; margin-top: 1rem; }
.team-card { position: relative; display: grid; justify-items: center; gap: 0.55rem; padding: 0 0.9rem 1rem; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; text-align: center; }
.team-banner { justify-self: stretch; height: 74px; margin: 0 -0.9rem; background-size: cover; background-position: center; border-bottom: 3px solid var(--role); }
.team-avatar { display: grid; place-items: center; width: 72px; height: 72px; margin-top: -40px; border-radius: 50%; overflow: hidden; border: 4px solid var(--bg-2); color: #fff; font-weight: 700; font-size: 1.5rem; }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-name { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1rem; }
.team-card form { margin: 0; }
.team-btn { display: inline-block; padding: 0.3rem 0.95rem; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font: inherit; font-size: 0.8rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.team-btn:hover { filter: brightness(1.1); }
.team-btn.is-muted { background: var(--bg-3); color: var(--fg-dim); cursor: default; filter: none; }
.team-empty { display: grid; gap: 0.3rem; padding: 2rem; text-align: center; border-radius: 14px; border: 1px dashed var(--line); }
.team-foot { margin: 0; }

/* Badge chips (custom image, or glyph on the badge colour) */
.bdg-chip { display: inline-grid; place-items: center; width: 18px; height: 18px; flex-shrink: 0; border-radius: 5px; overflow: hidden; background: color-mix(in srgb, var(--bdg) 22%, transparent); color: var(--bdg); font-size: 0.7rem; font-style: normal; line-height: 1; vertical-align: middle; }
.bdg-chip.is-art { background: none; border-radius: 0; }
.bdg-chip img { width: 100%; height: 100%; object-fit: contain; }
.bdg-chip i { font-style: normal; }
.bdg-more { font-size: 0.72rem; color: var(--fg-dim); align-self: center; }
.team-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: -0.2rem; }
.staff-role-badge { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.25rem; font-size: 0.78rem; color: var(--fg-mid); }
.staff-member-badges { display: inline-flex; flex-wrap: wrap; gap: 3px; margin-left: 0.6rem; }
.team-none { margin-top: 0.8rem; padding: 0.9rem 1rem; border-radius: 12px; border: 1px dashed var(--line); color: var(--fg-dim); font-size: 0.9rem; }

/* Rank editor: one switch per action, grouped by area */
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.7rem; }
.perm-group { margin: 0; padding: 0.6rem 0.75rem 0.7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.perm-group legend { padding: 0 0.3rem; font-weight: 700; }
.perm-key { display: flex; margin: 0.15rem 0; font-size: 0.86rem; }
.perm-key.is-locked { opacity: 0.45; }
.perm-group legend, .perm-group legend span, .perm-key, .perm-key span { text-transform: none; letter-spacing: 0; }
.perm-key span { font-weight: 500; font-size: 0.86rem; }
.perm-group legend span { font-weight: 700; font-size: 0.92rem; }
.perm-group { max-height: none; }

/* ── Server settings: edge to edge, like Discord ─────────────
   The rail fills the left side and its links sit against the content;
   the content keeps a readable width with the close button beside it. */
.settings-stage { padding: 0; }
.settings-stage::after, .settings-app-backdrop { display: none; }
.settings-stage > .settings {
  width: 100%;
  height: 100%;
  grid-template-columns: minmax(250px, 1fr) minmax(0, 2.3fr);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
/* Same warm PawTalk palette as before, just stretched to the edges. */
.settings-stage .settings-rail {
  padding: 3.6rem .6rem 2.5rem max(1rem, calc(100% - 250px));
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 100% 0, rgba(229,129,58,.10), transparent 320px),
    rgba(24,17,14,.98);
}
.settings-stage .settings-back,
.settings-stage .settings-server-card { display: none; }
.settings-stage .settings-group { padding: 1rem .65rem .3rem; font-size: .68rem; }
.settings-stage .settings-group:first-of-type { padding-top: 0; }
.settings-stage .settings-link { font-size: .95rem; font-weight: 500; padding: .5rem .65rem; }
.settings-stage .settings-link.on { font-weight: 650; }
.settings-stage .settings-sep { margin: .6rem .65rem; }
.settings-stage .settings-main {
  background:
    radial-gradient(circle at 100% 0, rgba(229,129,58,.07), transparent 420px),
    radial-gradient(circle at 0 100%, rgba(149,111,208,.05), transparent 420px),
    var(--bg-0);
}
.settings-stage .settings-content { width: min(100%, 900px); padding: 3.6rem 6rem 5rem 2.5rem; }
.settings-stage .settings-close-wrap { top: 3.4rem; right: 2rem; }
.settings-stage .settings-context { display: none; }

/* Enable Community */
.community-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.6rem 1.8rem; margin-bottom: 1.2rem; border-radius: 16px;
  background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #3b1f6b));
  color: #fff;
}
.community-hero h1 { margin: 0 0 .35rem; font-size: 1.5rem; font-weight: 800; }
.community-hero p { margin: 0; max-width: 46ch; opacity: .92; }
.community-hero-art { font-size: 2.4rem; letter-spacing: .3rem; opacity: .9; white-space: nowrap; }
.community-perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.community-perk { display: grid; gap: .3rem; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.community-perk span { font-size: 1.4rem; }
.community-perk small { color: var(--fg-dim); }
.community-setup .field { max-width: 520px; }
.community-off { margin-top: 1.2rem; }
@media (max-width: 760px) {
  .settings-stage > .settings { grid-template-columns: 1fr; }
  .settings-stage .settings-rail { padding: 1rem; }
  .settings-stage .settings-content { padding: 1.2rem 1rem 4rem; }
  .settings-stage .settings-close-wrap { top: .8rem; right: .8rem; }
}

/* ── Support site (support.<domain>) ───────────────────────── */
.sup-nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1.2rem;
  padding: .85rem clamp(1rem, 4vw, 3rem);
  background: rgba(16, 12, 10, .88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.sup-brand { display: flex; align-items: center; gap: .55rem; color: var(--fg); font-weight: 800; font-size: 1.02rem; text-decoration: none; }
.sup-brand b { color: var(--accent-soft, var(--accent)); font-weight: 800; }
.sup-brand:hover { text-decoration: none; }
.sup-links { display: flex; gap: .2rem; margin-left: .6rem; }
.sup-links a { padding: .45rem .75rem; border-radius: 9px; color: var(--fg-mid); font-weight: 600; font-size: .9rem; }
.sup-links a:hover { background: rgba(255,255,255,.05); color: var(--fg); text-decoration: none; }
.sup-links a.is-current { color: var(--fg); background: rgba(229,129,58,.14); }
.sup-actions { margin-left: auto; display: flex; gap: .5rem; }
.sup-page { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem) 4rem; }
.sup-hero {
  margin: 2rem 0 2.2rem; padding: clamp(2rem, 5vw, 3.5rem) clamp(1.2rem, 4vw, 3rem);
  border: 1px solid var(--line); border-radius: 24px; text-align: center;
  background:
    radial-gradient(circle at 15% 0, rgba(229,129,58,.28), transparent 45%),
    radial-gradient(circle at 90% 100%, rgba(149,111,208,.16), transparent 45%),
    rgba(24,17,14,.9);
}
.sup-hero h1 { margin: 0 0 1.2rem; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; }
.sup-search { display: flex; gap: .5rem; max-width: 620px; margin: 0 auto; }
.sup-search .input { flex: 1; height: 3rem; font-size: 1rem; }
.sup-search .btn { height: 3rem; padding: 0 1.3rem; }
.sup-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; max-width: 820px; margin: 1.8rem auto 0; text-align: left; }
.sup-quick-card { display: grid; gap: .25rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(12,14,17,.72); color: var(--fg); transition: border-color .12s, transform .12s; }
.sup-quick-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.sup-quick-card span { font-size: 1.4rem; }
.sup-quick-card small { color: var(--fg-dim); font-size: .82rem; line-height: 1.4; }
.sup-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.sup-section-head h2 { margin: 0; font-size: 1.25rem; }
.sup-section-head p { margin: 0; }
.sup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .7rem; }
.sup-article { display: grid; gap: .3rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); color: var(--fg); }
.sup-article:hover { border-color: var(--accent); background: var(--bg-3); text-decoration: none; }
.sup-article small { color: var(--fg-dim); font-size: .84rem; line-height: 1.45; }
.sup-extra { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1rem; }
.sup-stuck { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 2.2rem; padding: 1.4rem 1.6rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(24,17,14,.85); }
.sup-stuck h2 { margin: 0 0 .3rem; font-size: 1.15rem; }
.sup-stuck p { margin: 0; color: var(--fg-dim); }
.sup-crumbs { margin: 1.6rem 0 .6rem; color: var(--fg-dim); font-size: .86rem; }
.sup-crumbs span { margin: 0 .35rem; opacity: .6; }
.sup-page > .wrap, .sup-page .page-pad { padding-left: 0; padding-right: 0; }
@media (max-width: 760px) {
  .sup-nav { flex-wrap: wrap; gap: .6rem; }
  .sup-links { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .sup-stuck { flex-direction: column; align-items: flex-start; }
}

/* Developer portal: the real logo instead of "PT" initials. */
.dev-portal-brand .brand-mark { width: 27px; height: 27px; flex: none; }

/* ── Developer Portal, signed out (developer/landing.php) ──── */
.devl-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1.2rem; padding: .85rem clamp(1rem, 4vw, 3rem); background: rgba(16,12,10,.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.devl-brand { display: flex; align-items: center; gap: .55rem; color: var(--fg); font-weight: 800; }
.devl-brand:hover { text-decoration: none; }
.devl-brand b { color: var(--accent-soft, var(--accent)); }
.devl-links { display: flex; gap: .2rem; margin-left: .6rem; }
.devl-links a { padding: .45rem .75rem; border-radius: 9px; color: var(--fg-mid); font-weight: 600; font-size: .9rem; }
.devl-links a:hover { background: rgba(255,255,255,.05); color: var(--fg); text-decoration: none; }
.devl-actions { margin-left: auto; display: flex; gap: .5rem; }
.devl { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem) 4rem; }
.devl-hero { margin: 2rem 0 2.4rem; padding: clamp(2rem, 5vw, 3.5rem); border: 1px solid var(--line); border-radius: 24px;
  background: radial-gradient(circle at 12% 0, rgba(229,129,58,.28), transparent 45%), radial-gradient(circle at 92% 100%, rgba(149,111,208,.2), transparent 45%), rgba(24,17,14,.9); }
.devl-kicker { color: var(--accent-soft, var(--accent)); font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.devl-hero h1 { margin: .4rem 0 .7rem; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.02em; }
.devl-hero p { max-width: 60ch; margin: 0; color: var(--fg-mid); font-size: 1.05rem; line-height: 1.55; }
.devl-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.devl-section { margin-top: 2.6rem; }
.devl-section > h2, .devl-box h2 { margin: 0 0 .9rem; font-size: 1.4rem; }
.devl-lead { margin: -.4rem 0 1rem; color: var(--fg-dim); }
.devl-sub { margin: 1.6rem 0 .7rem; font-size: 1rem; }
.devl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; }
.devl-card { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.devl-card span { font-size: 1.5rem; }
.devl-card h3 { margin: .5rem 0 .35rem; font-size: 1.02rem; }
.devl-card p { margin: 0; color: var(--fg-dim); font-size: .88rem; line-height: 1.5; }
.devl-card.is-no { border-color: rgba(224,87,79,.35); }
.devl-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.devl-two h3 { margin: 0 0 .6rem; font-size: 1rem; }
.devl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.devl-list li { display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: .8rem; align-items: baseline; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); font-size: .88rem; }
.devl-list code, .devl-note code, .devl-box code, .devl-card code { color: var(--accent-soft, var(--accent)); font-family: var(--mono); font-size: .82rem; }
.devl-list span { color: var(--fg-mid); }
.devl-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.devl-chip { padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); font-size: .84rem; cursor: help; }
.devl-note { margin: .9rem 0 0; color: var(--fg-dim); font-size: .86rem; line-height: 1.55; }
.devl-box { padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); }
.devl-box ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; color: var(--fg-mid); font-size: .9rem; }
.devl-box.is-yes { border-color: rgba(99,201,139,.35); }
.devl-box.is-yes h2::before { content: '✓ '; color: var(--ok, #63c98b); }
.devl-box.is-no { border-color: rgba(224,87,79,.35); }
.devl-box.is-no h2::before { content: '✕ '; color: #e0574f; }
.devl-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; color: var(--fg-mid); font-size: .88rem; }
.devl-facts li { padding: .6rem .8rem; border-radius: 10px; background: rgba(255,255,255,.03); }
.devl-code { margin: 0; padding: 1rem 1.2rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-0); color: var(--fg-mid); font: .86rem/1.6 var(--mono); }
.devl-end { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 2.6rem; padding: 1.4rem 1.6rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(24,17,14,.85); }
.devl-end h2 { margin: 0 0 .3rem; font-size: 1.2rem; }
.devl-end p { margin: 0; color: var(--fg-dim); }
.devl-legal { margin: 1.2rem 0 0; color: var(--fg-dim); font-size: .8rem; text-align: center; }
@media (max-width: 760px) {
  .devl-bar { flex-wrap: wrap; }
  .devl-links { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .devl-list li { grid-template-columns: 1fr; gap: .2rem; }
  .devl-end { flex-direction: column; align-items: flex-start; }
}
.sup-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.sup-cat { display: grid; gap: .3rem; align-content: start; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); color: var(--fg); transition: border-color .12s, transform .12s; }
.sup-cat:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.sup-cat b { font-size: 1.02rem; }
.sup-cat small { color: var(--fg-dim); font-size: .84rem; line-height: 1.45; }
.sup-cat i { margin-top: .3rem; color: var(--accent-soft, var(--accent)); font-size: .78rem; font-style: normal; font-weight: 700; }
.sup-cat-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(229,129,58,.14); font-size: 1.3rem; }
.sup-cat-head { display: flex; align-items: center; gap: 1rem; margin: .4rem 0 1.4rem; }
.sup-cat-head h1 { margin: 0; font-size: 1.8rem; }
.sup-cat-head p { margin: .2rem 0 0; color: var(--fg-dim); }
.sup-page > .sup-section { margin-top: 2.2rem; }
.sup-page > .sup-hero + .sup-section { margin-top: 0; }
