/* =====================================================================
   RSFXR design system — "YOUR IDENTITY. YOUR UNIVERSE."
   Tokens first; components below. No build step, no external CDN.
   ===================================================================== */

@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("/fonts/space-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Orbitron"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/fonts/orbitron-latin-wght-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Colour */
  --void: #05060f;          /* page background: deep navy space */
  --graphite: #0a0c1a;      /* rails, secondary panels */
  --surface: #10132a;       /* cards */
  --surface-2: #171b38;     /* inputs, hover */
  --line: #232849;          /* hairlines */
  --line-strong: #343b68;
  --text: #ecebf5;
  --muted: #b4b7d6;         /* secondary text */
  --faint: #8a8db3;         /* tertiary text, ≥ 4.7:1 on every surface */
  --violet: #8b5cff;        /* brand */
  --violet-strong: #a07bff;
  --violet-deep: #4b23c8;
  --violet-ink: #7446f0;    /* violet behind white text (WCAG AA 5.4:1) */
  --blue-ink: #3d6be0;      /* end of the action gradient (4.8:1 with white) */
  --grad-action: linear-gradient(120deg, var(--violet-ink) 0%, #5a54f0 45%, var(--blue-ink) 100%);
  --grad-brand: linear-gradient(100deg, #3ee6f0 0%, #7aa0ff 38%, #8b5cff 70%, #c06bff 100%);
  --font-brand: "Orbitron", var(--font-display);
  --violet-glow: rgba(139, 92, 255, .32);
  --violet-soft: #d4c6ff;   /* violet text/icons on dark */
  --magenta: #e04ab8;
  --magenta-soft: #f08bdc;
  --text-on-art: #c9cbe6;   /* text over the space artwork */
  /* Selected state (tabs, nav, chips): a tint, never the action gradient */
  --sel-bg: linear-gradient(90deg, rgba(139, 92, 255, .24), rgba(139, 92, 255, .10));
  --sel-bg-strong: rgba(139, 92, 255, .22);
  --sel-border: rgba(139, 92, 255, .6);
  --sel-ring: inset 0 0 0 1px rgba(139, 92, 255, .42);
  --cyan: #3ee6f0;          /* accent: Señal, focus, "Útil" */
  --cyan-dim: rgba(62, 230, 240, .14);
  --danger: #ff5d7a;        /* danger text and borders */
  --danger-ink: #d43a55;    /* filled destructive buttons (4.6:1 with white) */
  --ok: #4be3a2;
  --warn: #ffc65c;

  /* Type */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* One type scale (px values in rem). --step-* are the older names of the same steps. */
  --fs-2xs: .6875rem;  /* 11: badges only */
  --fs-xs: .75rem;     /* 12: meta, captions */
  --fs-sm: .8125rem;   /* 13: labels, secondary text, chips */
  --fs-base: .9375rem; /* 15: body */
  --fs-md: 1.0625rem;  /* 17: card titles, lead */
  --fs-lg: 1.25rem;    /* 20: section titles */
  --fs-xl: 1.625rem;   /* 26: page titles */
  --fs-2xl: 2.125rem;  /* 34: brand titles (Nexus, Unknown, Afterlife) */
  --fs-display: clamp(2.5rem, 5vw, 4rem);
  --step--1: var(--fs-sm);
  --step-0: var(--fs-base);
  --step-1: var(--fs-md);
  --step-2: var(--fs-lg);
  --step-3: var(--fs-xl);
  --step-4: var(--fs-2xl);
  --step-5: var(--fs-display);

  /* Space & shape */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  --r-xs: 6px; --r-sm: 10px; --r: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --hdr-h: 64px;

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --fast: 120ms;
  --base: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
  margin: 0; background: var(--void); color: var(--text);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg { max-width: 100%; display: block; }
a { color: var(--violet-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 var(--s3); letter-spacing: -.01em; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 var(--s4); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
::selection { background: var(--violet-ink); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: var(--r-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--violet-ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: var(--step--1); }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: var(--s4); }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.prose { overflow-wrap: anywhere; white-space: pre-line; }

/* ---------------- App shell ---------------- */
.shell { display: grid; grid-template-columns: 240px minmax(0, 660px) 320px; gap: var(--s6); max-width: 1320px; margin: 0 auto; padding: 0 var(--s5); }
.shell.wide { grid-template-columns: 240px minmax(0, 1fr); }
.rail { position: sticky; top: 0; height: 100vh; padding: var(--s5) 0; display: flex; flex-direction: column; gap: var(--s2); }
.main { padding: var(--s5) 0 var(--s8); min-width: 0; }
.aside { padding: var(--s5) 0; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; }

.brand { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3) var(--s5); color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); letter-spacing: .06em; }

.nav a { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s3); border-radius: var(--r); color: var(--muted); font-weight: 500; position: relative; }
.nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav svg { width: 22px; height: 22px; flex: none; }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--violet-ink); color: #fff; font-size: var(--fs-2xs); font-weight: 700; display: grid; place-items: center; }
.rail .create { margin: var(--s4) 0; }
.rail-foot { margin-top: auto; display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r); }
.rail-foot form { margin-left: auto; }

.topbar, .bottombar { display: none; }

/* ---------------- Buttons & forms ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 40px; padding: 0 18px;
  border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  font: 600 var(--step-0)/1 var(--font-display); cursor: pointer; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease); white-space: nowrap; }
.btn:hover { background: #1f2446; border-color: #4a5285; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--violet-ink); border-color: var(--violet-ink); color: #fff; box-shadow: 0 0 0 0 var(--violet-glow); }
.btn.primary:hover { background: #6a3be6; box-shadow: 0 0 24px -4px var(--violet-glow); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { background: transparent; border-color: rgba(255, 93, 122, .5); color: var(--danger); }
.btn.danger:hover { background: rgba(255, 93, 122, .1); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: var(--step--1); }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--violet-strong); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

label { display: block; font-weight: 600; margin-bottom: var(--s2); font-size: var(--step--1); color: var(--text); }
.hint { display: block; color: var(--faint); font-size: var(--step--1); margin-top: var(--s1); font-weight: 400; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], input[type=datetime-local], input[type=date], input[type=time], input[type=tel], select, textarea {
  width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 11px 14px; font: inherit; transition: border-color var(--fast), box-shadow var(--fast); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 255, .28); }
input[aria-invalid=true], textarea[aria-invalid=true], select[aria-invalid=true] { border-color: var(--danger); }
input[type=file] { color: var(--muted); font-size: var(--step--1); }
input[type=checkbox], input[type=radio] { accent-color: var(--violet); width: 18px; height: 18px; vertical-align: -3px; }
.check { display: flex; gap: var(--s3); align-items: flex-start; font-weight: 400; font-size: var(--step-0); }
.check input { margin-top: 2px; flex: none; }
.field { margin-bottom: var(--s5); }
.field-error { color: var(--danger); font-size: var(--step--1); margin-top: var(--s1); }
.form-actions { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4) var(--s5); margin: 0 0 var(--s5); }
legend { padding: 0 var(--s2); font-family: var(--font-display); font-weight: 600; }

/* Segmented choices (visibility, decisions) */
.choices { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: block; padding: var(--s4); border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface-2); cursor: pointer; font-weight: 400; color: var(--muted); }
.choice span strong { display: block; color: var(--text); font-family: var(--font-display); margin-bottom: 2px; }
.choice input:checked + span { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); background: rgba(139, 92, 255, .08); }
.choice input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------------- Feedback ---------------- */
.flash { border-radius: var(--r); padding: var(--s3) var(--s4); margin-bottom: var(--s5); border: 1px solid; }
.flash.ok { border-color: rgba(75, 227, 162, .35); background: rgba(75, 227, 162, .08); }
.flash.err { border-color: rgba(255, 93, 122, .4); background: rgba(255, 93, 122, .08); }
.flash.info { border-color: var(--line-strong); background: var(--surface); }
.flash ul { margin: 0; padding-left: 1.2em; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; border: 1px solid var(--line-strong); color: var(--muted); background: var(--graphite); }
.badge.violet { color: #cdb9ff; border-color: rgba(139, 92, 255, .5); background: rgba(139, 92, 255, .1); }
.badge.cyan { color: var(--cyan); border-color: rgba(62, 230, 240, .4); background: var(--cyan-dim); }
.badge.warn { color: var(--warn); border-color: rgba(255, 198, 92, .4); }
.badge.danger { color: var(--danger); border-color: rgba(255, 93, 122, .4); }
.badge.demo { color: var(--warn); border-style: dashed; border-color: rgba(255, 198, 92, .5); }

.empty { text-align: center; padding: var(--s7) var(--s5); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--muted); }
.empty .empty-title { color: var(--text); font: 600 var(--step-1)/1.3 var(--font-display); margin: 0 0 var(--s2); }
.empty .orbit-empty { width: 84px; margin: 0 auto var(--s4); opacity: .9; }

/* ---------------- Surfaces ---------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); }
.panel + .panel { margin-top: var(--s4); }
.panel h2, .panel h3 { margin-bottom: var(--s4); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: var(--s1) 0 0; color: var(--muted); }

.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin-bottom: var(--s5); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: var(--s3) var(--s4); color: var(--muted); font-weight: 600; font-family: var(--font-display); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--text); border-color: var(--violet); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }

/* ---------------- Avatars & planets ---------------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: linear-gradient(135deg, var(--violet-deep), #1f1f30); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: #fff; font-size: var(--fs-base); overflow: hidden; }
.avatar.lg { width: 96px; height: 96px; font-size: var(--fs-2xl); border: 4px solid var(--void); }
.avatar.sm { width: 30px; height: 30px; font-size: var(--fs-xs); }
.avatar.xs { width: 22px; height: 22px; font-size: var(--fs-2xs); }

/* A Universe is drawn as a planet with an orbit ring — the visual signature of RSFXR. */
.planet { --pc: var(--violet); position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; }
.planet::before { content: ""; position: absolute; inset: -5px -9px; border: 1.5px solid color-mix(in srgb, var(--pc) 70%, transparent); border-radius: 50%; transform: rotate(-18deg); }
.planet > .core { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font: 700 14px var(--font-display); color: #fff;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--pc) 85%, #fff) 0%, var(--pc) 35%, color-mix(in srgb, var(--pc) 35%, #000) 100%); }
.planet > .core img { width: 100%; height: 100%; object-fit: cover; }
.planet.lg { width: 92px; height: 92px; }
.planet.lg > .core { font-size: var(--fs-xl); }
.planet.lg::before { inset: -9px -18px; border-width: 2px; }
.planet.sm { width: 28px; height: 28px; }
.planet.sm > .core { font-size: var(--fs-2xs); }
.planet.sm::before { inset: -3px -6px; border-width: 1px; }
.accent-violet { --pc: #8b5cff; } .accent-cyan { --pc: #22c7d6; } .accent-magenta { --pc: #e04ab8; }
.accent-amber { --pc: #e8a23a; } .accent-lime { --pc: #8fd14f; } .accent-blue { --pc: #4f7dff; }

/* ---------------- Posts ---------------- */
.feed { display: flex; flex-direction: column; gap: var(--s4); }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4) var(--s5) var(--s3); transition: border-color var(--base) var(--ease), opacity var(--base); position: relative; }
.post:hover { border-color: var(--line-strong); }
.post.is-hidden { opacity: 0; transform: scale(.98); transition: opacity 200ms, transform 200ms; }
.post-full { border-color: var(--line-strong); }
.post-full .post-body { font-size: var(--fs-lg); }
.post-head { display: flex; gap: var(--s3); align-items: flex-start; margin-bottom: var(--s3); }
.post-who { min-width: 0; flex: 1; line-height: 1.3; }
.who-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.who-line .name { font-weight: 650; color: var(--text); }
.who-line .handle, .who-line .time { color: var(--faint); font-size: var(--step--1); }
.who-line .time:hover { color: var(--muted); }
.where-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 3px; font-size: var(--step--1); color: var(--muted); }
.where-line:empty { display: none; }
.in-universe { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.in-universe:hover { color: var(--text); text-decoration: none; }
.dot-planet { width: 10px; height: 10px; border-radius: 50%; background: var(--pc, var(--violet)); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px color-mix(in srgb, var(--pc, var(--violet)) 55%, transparent); }
.flag { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); }
.flag.featured { color: var(--warn); }
.flag.demo { color: var(--warn); border: 1px dashed rgba(255, 198, 92, .45); border-radius: var(--r-pill); padding: 0 7px; font-size: var(--fs-2xs); line-height: 17px; }
.shared-label { display: inline-flex; align-items: center; gap: 4px; }
.post-body { font-size: var(--step-1); line-height: 1.62; overflow-wrap: anywhere; white-space: pre-line; }
.post-body.clamped { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { display: inline-block; margin-top: var(--s1); font-size: var(--step--1); font-weight: 600; }
.post-body a.tag { color: var(--cyan); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--cyan) 45%, transparent); text-underline-offset: 3px; }
.post-body a.mention { color: var(--violet-strong); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--violet-strong) 45%, transparent); text-underline-offset: 3px; }
.link-card { display: flex; gap: var(--s3); align-items: center; margin-top: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--graphite); color: var(--text); overflow: hidden; }
.link-card:hover { border-color: var(--violet); text-decoration: none; }
.link-ic { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--surface-2); display: grid; place-items: center; color: var(--violet-strong); flex: none; }
.link-card .host { color: var(--muted); font-size: var(--step--1); display: block; font-weight: 600; }
.link-card .url { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--faint); font-size: var(--step--1); }
.media-grid { display: grid; gap: 4px; margin-top: var(--s3); border-radius: var(--r); overflow: hidden; grid-template-columns: 1fr 1fr; }
.media-grid.n1 { grid-template-columns: 1fr; }
.media-grid.n3 > :first-child { grid-row: span 2; }
.media-grid > * { min-height: 140px; background: var(--graphite); position: relative; display: block; }
.media-grid img, .media-grid video { width: 100%; height: 100%; max-height: 520px; object-fit: cover; }
.media-grid.n1 img { object-fit: contain; max-height: 620px; background: #000; }
.media-grid.n2 > *, .media-grid.n3 > *, .media-grid.n4 > * { aspect-ratio: 4 / 3; }
.media-item { cursor: zoom-in; }
.more-media { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6, 6, 10, .6); font: 600 var(--step-3) var(--font-display); color: #fff; }
.media-pending { display: flex; gap: var(--s2); align-items: center; justify-content: center; color: var(--muted); font-size: var(--step--1); }
.shared { margin-top: var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r); padding: var(--s3) var(--s4); background: var(--graphite); }
.shared .who-line { align-items: center; margin-bottom: var(--s2); }
.post-actions { display: flex; gap: 2px; margin: var(--s3) 0 0 -8px; align-items: center; }
.post-actions form { display: contents; }
.post-actions .push { margin-left: auto; }
.post-actions form.push { display: block; margin-left: auto; }
.act { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--muted); font: 600 var(--step--1) var(--font-body); cursor: pointer; transition: color var(--fast), background var(--fast); }
.act:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.act svg { width: 19px; height: 19px; flex: none; }
.act .count:empty { display: none; }
.act.on { color: var(--violet-strong); }
.act.like.on { color: #ff6b9d; }
.act.like.on svg { fill: currentColor; }
.act.save.on svg { fill: currentColor; }
.act.useful.on { color: var(--cyan); background: var(--cyan-dim); }
.act.useful.on svg { fill: currentColor; filter: drop-shadow(0 0 6px rgba(62, 230, 240, .6)); }
.act.pop svg { animation: pop 300ms var(--ease); }
@keyframes pop { 40% { transform: scale(1.4) rotate(-8deg); } }
.discovery-note { display: flex; align-items: center; gap: 6px; color: var(--cyan); font-size: var(--step--1); margin: 0 0 var(--s3); }
.discovery-note svg { flex: none; }
.removed-note { color: var(--danger); font-size: var(--step--1); }

/* Overflow menus */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--faint); cursor: pointer; }
.icon-btn:hover, .menu[open] > .icon-btn { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-pop { position: absolute; right: 0; top: 38px; z-index: 30; min-width: 230px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); animation: menu-in 120ms var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: var(--r-sm); color: var(--text); font: 500 var(--step-0) var(--font-body); text-align: left; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.menu-pop .danger { color: var(--danger); }
.menu-pop svg { color: var(--muted); flex: none; }
.menu-pop form { margin: 0; }

/* Avatar tones (fallback without photo) */
.tone-violet { background: linear-gradient(135deg, #8b5cff, #3b1b9e); }
.tone-cyan { background: linear-gradient(135deg, #22c7d6, #0d5a74); }
.tone-magenta { background: linear-gradient(135deg, #e04ab8, #6d1a63); }
.tone-amber { background: linear-gradient(135deg, #e8a23a, #7a4410); }
.tone-blue { background: linear-gradient(135deg, #4f7dff, #1b2f8a); }
.tone-lime { background: linear-gradient(135deg, #8fd14f, #2f6416); }

/* Spinner & loading */
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--cyan); animation: spin .8s linear infinite; display: inline-block; flex: none; }
button[data-busy] { position: relative; color: transparent !important; }
button[data-busy]::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Comments */
.comments { margin-top: var(--s5); }
.comment { padding: var(--s3) 0 var(--s3) var(--s4); border-left: 2px solid var(--line); margin-left: var(--s2); }
.comment .comment { margin-top: var(--s2); }
.comment-head { display: flex; gap: var(--s2); align-items: center; font-size: var(--step--1); }
.comment-body { margin: var(--s2) 0 var(--s1); overflow-wrap: anywhere; white-space: pre-line; }
.comment.gone .comment-body { color: var(--faint); font-style: italic; }
details.reply summary { min-height: 34px; align-items: center; padding: 0 10px; border-radius: var(--r-pill); cursor: pointer; color: var(--muted); font-size: var(--step--1); font-weight: 600; display: inline-flex; list-style: none; }
details.reply summary:hover { background: var(--surface-2); }
details.reply summary::-webkit-details-marker { display: none; }
details.reply[open] summary { color: var(--text); }
details.reply form { margin-top: var(--s2); }
details.reply textarea { min-height: 80px; }

/* ---------------- Universe page ---------------- */
.rules { counter-reset: rule; list-style: none; padding: 0; margin: 0; }
.rules li { counter-increment: rule; padding: var(--s2) 0 var(--s2) 30px; position: relative; border-bottom: 1px solid var(--line); }
.rules li::before { content: counter(rule); position: absolute; left: 0; top: 9px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); color: var(--muted); font: 600 11px/20px var(--font-display); text-align: center; }
.rules li strong { display: block; }
.rules li span { color: var(--muted); font-size: var(--step--1); }

.u-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mini-u { display: flex; gap: var(--s3); align-items: center; padding: var(--s2) 0; color: var(--text); }
.mini-u:hover { text-decoration: none; }
.mini-u:hover .u-name { color: var(--violet-strong); }
.mini-u .u-name { font-weight: 600; font-size: var(--step--1); }
.mini-u .why { color: var(--faint); font-size: var(--fs-xs); }

.signal { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--cyan); }
.signal .bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.signal .bars i { width: 3px; background: var(--line-strong); border-radius: 1px; }
.signal .bars i:nth-child(1) { height: 4px; } .signal .bars i:nth-child(2) { height: 7px; } .signal .bars i:nth-child(3) { height: 10px; } .signal .bars i:nth-child(4) { height: 12px; }
.signal .bars i.on { background: var(--cyan); box-shadow: 0 0 6px rgba(62, 230, 240, .5); }

.chips { display: flex; gap: var(--s2); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--muted); font-weight: 600; font-size: var(--step--1); background: var(--surface); }
.chip:hover { color: var(--text); border-color: var(--violet); text-decoration: none; }
.chip[aria-current="page"], .chip.on { color: #fff; background: var(--sel-bg-strong); border-color: var(--sel-border); }
.chip-toggle { position: relative; }
.chip-toggle input { position: absolute; opacity: 0; inset: 0; }
.chip-toggle span { display: inline-flex; padding: 9px 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font-weight: 600; cursor: pointer; }
.chip-toggle input:checked + span { background: var(--sel-bg-strong); color: #fff; border-color: var(--sel-border); }
.chip-toggle input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------------- Profile ---------------- */
.p-head { display: flex; gap: var(--s5); align-items: flex-end; margin: -48px var(--s5) var(--s4); flex-wrap: wrap; position: relative; z-index: 1; }
.p-head .actions { margin-left: auto; display: flex; gap: var(--s2); flex-wrap: wrap; }
.p-name { font-size: var(--step-3); font-family: var(--font-display); font-weight: 600; margin: 0; }
.p-handle { color: var(--muted); }
.p-meta { display: flex; gap: var(--s5); color: var(--muted); font-size: var(--step--1); margin: var(--s3) 0; flex-wrap: wrap; }
.p-meta strong { color: var(--text); }
.id-card { position: relative; border-radius: var(--r-lg); padding: var(--s5); border: 1px solid rgba(139, 92, 255, .35);
  background: radial-gradient(120% 140% at 100% 0%, rgba(139, 92, 255, .22), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(62, 230, 240, .10), transparent 60%), var(--surface); overflow: hidden; }
.id-card .id-sub { font-family: var(--font-display); color: var(--muted); font-size: var(--fs-xs); word-break: break-all; }

/* ---------------- Messages ---------------- */

/* ---------------- Notifications ---------------- */

/* ---------------- Tables (admin) ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: var(--graphite); }
tr:last-child td { border-bottom: 0; }
.kpis { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); }
.kpi b { display: block; font: 600 var(--step-3) var(--font-display); }
.kpi span { color: var(--muted); font-size: var(--step--1); }
.bars-chart { display: flex; gap: 3px; align-items: flex-end; height: 80px; }
.bars-chart i { flex: 1; background: var(--violet); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .85; }

/* ---------------- Landing ---------------- */
.landing { min-height: 100vh; }
.l-nav { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: var(--s5); }
.l-hero { max-width: 1200px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s7); display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s7); align-items: center; }
.l-hero h1 { font-size: var(--step-5); line-height: 1; letter-spacing: -.03em; margin-bottom: var(--s5); }
.l-hero h1 .line2 { display: block; color: transparent; -webkit-text-stroke: 1.5px var(--violet-strong); }
.l-hero p.lead { font-size: var(--step-2); color: var(--muted); max-width: 34ch; line-height: 1.4; }
.orbit-stage { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; justify-self: center; }
.orbit-stage svg { width: 100%; height: 100%; overflow: visible; }
.orbit-stage .ring { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.orbit-stage .ring.lit { stroke: rgba(139, 92, 255, .55); }
.orbit-stage .sat { cursor: pointer; }
.orbit-stage .sat text { fill: var(--text); font: 600 13px var(--font-display); }
.orbit-stage .sat .lbl-bg { fill: var(--graphite); stroke: var(--line-strong); }
.orbit-spin { transform-origin: 260px 260px; animation: spin 140s linear infinite; }
.orbit-spin.slow { animation-duration: 220s; animation-direction: reverse; }
.counter-spin { animation: spin 140s linear infinite reverse; transform-box: fill-box; transform-origin: center; }
.orbit-spin.slow .counter-spin { animation-duration: 220s; animation-direction: normal; }
@keyframes spin { to { transform: rotate(360deg); } }
.l-section { max-width: 1200px; margin: 0 auto; padding: var(--s7) var(--s5); }
.l-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.l-pillar { padding: var(--s5); border-top: 2px solid var(--line-strong); }
.l-pillar h3 { font-size: var(--step-2); }
.l-pillar:nth-child(1) { border-color: var(--violet); }
.l-pillar:nth-child(3) { border-color: var(--cyan); }
.l-foot { border-top: 1px solid var(--line); color: var(--faint); font-size: var(--step--1); }
.l-foot .row { max-width: 1200px; margin: 0 auto; padding: var(--s5); }

/* Auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--s5); background:
  radial-gradient(600px 400px at 85% 0%, rgba(139, 92, 255, .18), transparent 70%), radial-gradient(500px 360px at 0% 100%, rgba(62, 230, 240, .07), transparent 70%), var(--void); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .brand { justify-content: center; padding-bottom: var(--s6); }
.auth-card h1 { text-align: center; margin-bottom: var(--s5); }

/* Map */
.map-wrap { position: relative; height: 70vh; min-height: 420px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background:
  radial-gradient(circle at 20% 30%, rgba(255,255,255,.25) 0 1px, transparent 1.5px) 0 0/80px 80px, var(--graphite); }
.map-wrap > svg { width: 100%; height: 100%; }
.map-wrap .edge { stroke: rgba(139, 92, 255, .35); }
.map-wrap .node circle.body { stroke: var(--void); stroke-width: 2; }
.map-wrap .node .ring { fill: none; stroke: rgba(62, 230, 240, .55); stroke-width: 1.2; }
.map-wrap .node.joined circle.halo { fill: none; stroke: var(--cyan); stroke-width: 1.5; }
.map-wrap .node text { fill: var(--text); font: 600 12px var(--font-display); paint-order: stroke; stroke: var(--graphite); stroke-width: 4px; }
.map-wrap .node:focus { outline: none; }
.map-wrap .node:focus circle.body, .map-wrap .node:hover circle.body { stroke: var(--cyan); }
.map-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line-strong); padding: 6px 10px; border-radius: var(--r-sm); font-size: var(--fs-xs); max-width: 240px; display: none; }

/* Pagination */
.pager { display: flex; justify-content: center; gap: var(--s2); margin-top: var(--s5); }

/* Consent */
.consent { max-width: 480px; }
.consent .apps { display: flex; align-items: center; justify-content: center; gap: var(--s4); margin-bottom: var(--s5); }
.consent .app-logo { width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--surface-2); display: grid; place-items: center; font: 700 22px var(--font-display); border: 1px solid var(--line-strong); }
.consent .link-dots { width: 40px; border-top: 2px dotted var(--line-strong); }
.scope-list { list-style: none; margin: 0 0 var(--s5); padding: 0; }
.scope-list li { display: flex; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.scope-list svg { width: 20px; height: 20px; color: var(--cyan); flex: none; margin-top: 2px; }

code, pre, .code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .86em; }
code { background: var(--surface-2); padding: 2px 6px; border-radius: var(--r-xs); }
pre { background: var(--graphite); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
.secret-box { border: 1px solid var(--warn); background: rgba(255, 198, 92, .06); border-radius: var(--r); padding: var(--s4); }
.secret-box code { display: block; margin-top: var(--s2); word-break: break-all; font-size: var(--fs-base); padding: 10px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .aside { display: none; }
}
@media (max-width: 820px) {
  .shell, .shell.wide { grid-template-columns: 1fr; padding: 0 var(--s4); gap: 0; }
  .rail { display: none; }
  .main { padding-top: var(--s4); padding-bottom: 96px; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; padding: 10px var(--s4); background: rgba(6, 6, 10, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .topbar .brand { padding: 0; }
  .topbar .brand-word { font-size: var(--fs-md); }
  .bottombar { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: rgba(16, 16, 24, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottombar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; color: var(--muted); font-size: var(--fs-2xs); font-weight: 600; position: relative; }
  .bottombar a:hover { text-decoration: none; }
  .bottombar a[aria-current="page"] { color: var(--text); }
  .bottombar a[aria-current="page"] svg { color: var(--violet-strong); }
  .bottombar svg { width: 22px; height: 22px; }
  .bottombar .dot { position: absolute; top: 5px; left: calc(50% + 6px); width: 8px; height: 8px; border-radius: 50%; background: var(--violet); }
  .l-hero { grid-template-columns: 1fr; padding-top: var(--s4); }
  .l-pillars { grid-template-columns: 1fr; }
  .post { padding: var(--s4); border-radius: var(--r); }
  .u-head, .p-head { margin-left: var(--s3); margin-right: var(--s3); }
  .cover { height: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.map-empty { position: absolute; inset: 30% 10% auto; }
.center { text-align: center; } .auth-card > p { margin-top: var(--s4); }
.mt { margin-top: var(--s5); } .mb { margin-bottom: var(--s5); }
input[type=file]::file-selector-button { margin-right: var(--s3); padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: 600 var(--step--1) var(--font-display); cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--violet); }
.row > label { margin: 0; }
.row > input:not(.grow), .row > select { width: auto; }
.row > input[type=number] { width: 110px; }
.row > input.grow, .row > textarea.grow { flex: 1; min-width: 160px; width: auto; }
.post-where .planet { margin: 0 4px 0 6px; }


/* =====================================================================
   v2 components
   ===================================================================== */
.hide-sm { }
.crumb { margin: 0 0 var(--s2); font-size: var(--step--1); }
.crumb a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.icon-only { width: 44px; padding: 0; }
.visually-hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
body.no-scroll { overflow: hidden; }
.bucket { font-size: var(--step--1); color: var(--muted); margin: var(--s5) 0 var(--s2); font-weight: 600; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 8px var(--violet-glow); flex: none; align-self: center; }
.hint.warn { color: var(--warn); }

/* Toasts */
.toasts { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: var(--r); background: #23233a; border: 1px solid var(--line-strong); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .8); color: var(--text); animation: toast-in 220ms var(--ease); }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.toast.err::before { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); transition: 220ms; }
.toast-x { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: var(--fs-lg); line-height: 1; cursor: pointer; padding: 0 4px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(4, 4, 8, .94); display: none; align-items: center; justify-content: center; padding: 48px 64px; }
.lightbox.open { display: flex; animation: fade-in 160ms; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: var(--r-sm); }
.lightbox figcaption { color: var(--muted); font-size: var(--step--1); text-align: center; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: var(--fs-xl); line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .16); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; }
.lb-next { right: 12px; top: 50%; }
@keyframes fade-in { from { opacity: 0; } }

/* Composer */
.composer-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); margin-bottom: var(--s4); transition: border-color var(--base), box-shadow var(--base); }
.composer-card:focus-within { border-color: rgba(139, 92, 255, .55); box-shadow: 0 0 0 4px rgba(139, 92, 255, .08); }
.composer-card.drag { border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-dim); }
.composer-card.full { padding: var(--s5); }
.composer-main { display: flex; gap: var(--s3); }
.composer-card textarea { background: transparent; border: 0; padding: 8px 0; min-height: 44px; font-size: var(--step-1); resize: none; box-shadow: none; }
.composer-card textarea:focus { box-shadow: none; }
.composer-card.full textarea { min-height: 160px; }
.composer-bar { display: flex; align-items: center; gap: var(--s2); border-top: 1px solid var(--line); padding-top: var(--s3); margin-top: var(--s2); flex-wrap: wrap; }
.composer-bar .tool { color: var(--violet-strong); position: relative; }
.where-select { width: auto; max-width: 220px; padding: 7px 12px; border-radius: var(--r-pill); font-size: var(--step--1); background: var(--surface-2); }
.link-field > input { margin-top: var(--s2); }
.link-field:not([open]) > input { display: none; }
.picker-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.picker-previews:not(:empty) { margin-top: var(--s3); }
.picker-item { position: relative; border-radius: var(--r); overflow: hidden; background: var(--graphite); border: 1px solid var(--line-strong); display: flex; flex-direction: column; }
.picker-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.picker-item.is-video { aspect-ratio: 1; display: grid; place-items: center; color: var(--muted); font-size: var(--step--1); }
.picker-item input { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 6px 8px; font-size: var(--fs-xs); background: var(--surface-2); }
.picker-rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(6, 6, 10, .75); color: #fff; font-size: var(--fs-md); line-height: 1; cursor: pointer; }

/* Horizontal chip rails */
.rail-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.rail-x::-webkit-scrollbar { display: none; }
.rail-x.can-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.rail-x:not(.can-right) { -webkit-mask-image: none; mask-image: none; }
.rail-x.can-left:not(.can-right) { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%); mask-image: linear-gradient(90deg, transparent, #000 8%); }
.rail-x .chip { white-space: nowrap; flex: none; }

/* Universe hero */
.u-hero { margin-bottom: var(--s5); }
.cover { height: 210px; border-radius: var(--r-lg); background: var(--graphite) center/cover no-repeat; position: relative; overflow: hidden; border: 1px solid var(--line); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.placeholder { background:
  radial-gradient(ellipse 60% 120% at 80% 120%, color-mix(in srgb, var(--pc, var(--violet)) 50%, transparent), transparent 70%),
  radial-gradient(circle at 15% 30%, rgba(255,255,255,.5) 0 1px, transparent 1.5px) 0 0/90px 70px,
  radial-gradient(circle at 60% 70%, rgba(255,255,255,.35) 0 1px, transparent 1.5px) 0 0/130px 110px,
  var(--graphite); }
.cover::after { content: ""; position: absolute; inset: auto 0 0 0; height: 60%; background: linear-gradient(transparent, rgba(6, 6, 10, .55)); pointer-events: none; }
.u-head { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s5); align-items: end; margin: -46px var(--s5) 0; position: relative; z-index: 1; }
.u-head .planet.lg > .core { box-shadow: 0 0 0 5px var(--void); }
.u-title { min-width: 0; padding-top: 52px; }
.u-title h1 { margin: 0; font-size: var(--step-3); }
.u-tagline { margin: 4px 0 0; color: var(--muted); }
.u-stats { display: flex; gap: var(--s4); color: var(--muted); font-size: var(--step--1); margin-top: var(--s2); flex-wrap: wrap; align-items: center; }
.u-stats > span { display: inline-flex; align-items: center; gap: 5px; }
.u-stats strong { color: var(--text); font-family: var(--font-display); }
.u-actions { display: flex; gap: var(--s2); align-items: center; padding-bottom: 4px; }
.u-actions .menu-pop { top: 44px; }
.u-tabs { margin: var(--s5) 0 0; }

/* Universe cards */
.u-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.u-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--text); overflow: hidden; transition: border-color var(--base), transform var(--base) var(--ease); }
.u-card:hover { border-color: color-mix(in srgb, var(--pc, var(--violet)) 65%, transparent); text-decoration: none; transform: translateY(-2px); }
.u-card-cover { height: 78px; background: var(--graphite) center/cover; display: block; position: relative; }
.u-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.u-card-cover.placeholder { background: radial-gradient(ellipse 70% 140% at 85% 130%, color-mix(in srgb, var(--pc) 55%, transparent), transparent 70%), radial-gradient(circle at 20% 40%, rgba(255,255,255,.45) 0 1px, transparent 1.5px) 0 0/60px 44px, var(--graphite); }
.u-card-body { display: flex; flex-direction: column; gap: 4px; padding: 0 var(--s4) var(--s4); }
.u-card-body .planet { margin: -22px 0 6px 6px; }
.u-card-body .planet > .core { box-shadow: 0 0 0 4px var(--surface); }
.u-card .u-name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); }
.u-card .u-tag { color: var(--muted); font-size: var(--step--1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.u-meta { display: flex; gap: var(--s3); color: var(--faint); font-size: var(--fs-sm); align-items: center; margin-top: 2px; }
.u-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.u-card .why { color: var(--cyan); font-size: var(--fs-xs); margin-top: 4px; }

/* Profile cover */
.p-cover { height: 190px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); position: relative; }
.p-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Messenger */
.messenger { display: grid; grid-template-columns: 340px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; height: calc(100vh - 48px); min-height: 520px; background: var(--surface); }
.conv-pane { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--graphite); }
.pane-head { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.pane-head h1 { margin: 0; font-size: var(--step-2); }
.conv-list { overflow-y: auto; flex: 1; padding: var(--s2); }
.conv { display: flex; gap: var(--s3); align-items: center; padding: 10px 12px; border-radius: var(--r); color: var(--text); }
.conv:hover { background: var(--surface); text-decoration: none; }
.conv[aria-current="page"] { background: var(--surface-2); }
.conv-top { display: flex; justify-content: space-between; gap: var(--s2); }
.conv-last { display: block; color: var(--muted); font-size: var(--step--1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.unread .conv-last { color: var(--text); font-weight: 600; }
.conv-empty { padding: var(--s5); text-align: center; }
.thread-pane { display: flex; flex-direction: column; min-height: 0; }
.empty-thread { align-items: center; justify-content: center; padding: var(--s6); }
.empty-thread .center { max-width: 340px; }
.empty-thread .orbit-empty { width: 96px; margin: 0 auto var(--s4); }
.thread-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); }
.thread-head .name { font-weight: 650; color: var(--text); }
.thread-head .back { display: none; }
.thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: var(--s5); }
.msg { display: flex; align-items: center; gap: 6px; max-width: 78%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.them { align-self: flex-start; }
.bubble { padding: 9px 14px 6px; border-radius: var(--r-lg); background: var(--surface-2); overflow-wrap: anywhere; }
.msg.me .bubble { background: linear-gradient(135deg, #7a4bff, #5a2fe0); border-bottom-right-radius: 6px; }
.msg.them .bubble { border-bottom-left-radius: 6px; }
.bubble-text { white-space: pre-line; display: block; }
.bubble time { display: block; font-size: var(--fs-2xs); color: rgba(255, 255, 255, .55); margin-top: 2px; text-align: right; }
.msg-report { opacity: 0; color: var(--faint); padding: 4px; }
.msg:hover .msg-report, .msg-report:focus { opacity: 1; }
.read-receipt { align-self: flex-end; color: var(--faint); font-size: var(--fs-xs); margin: 0 4px; }
.thread .composer, form.composer { display: flex; gap: var(--s2); align-items: flex-end; padding: var(--s3) var(--s4); border-top: 1px solid var(--line); background: var(--surface); }
form.composer textarea { min-height: 44px; height: 44px; resize: none; border-radius: var(--r-xl); padding: 11px 16px; }
.thread-note { font-size: var(--fs-xs); color: var(--faint); margin: 0; padding: 0 var(--s5) var(--s3); background: var(--surface); }

/* Notifications */
.notif-list { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px; }
.notif { display: flex; gap: var(--s3); padding: 12px; border-radius: var(--r); align-items: flex-start; color: var(--text); }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif.unread { background: rgba(139, 92, 255, .07); }
.notif-av { position: relative; flex: none; }
.notif-type { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--violet-ink); color: #fff; box-shadow: 0 0 0 2px var(--surface); }
.notif-type.t-useful { background: var(--cyan); color: #06222a; }
.notif-type.t-like { background: #ff6b9d; }
.notif-type.t-follow, .notif-type.t-join_approved { background: var(--ok); color: #062a1b; }
.notif-text { display: block; }
.notif-excerpt { display: block; color: var(--muted); font-size: var(--step--1); margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52ch; }

/* Badge counts in nav (now always rendered, hidden when zero) */
.nav .count[hidden], .bottombar .dot[hidden] { display: none; }
.bottombar .dot { font-size: 0; }

@media (max-width: 1180px) {
  .aside { display: block; position: static; grid-column: 2; max-height: none; padding-top: 0; }
}
@media (max-width: 820px) {
  .shell, .shell.wide { grid-template-columns: 1fr; }
  .aside { grid-column: 1; padding-bottom: 96px; }
  .main { padding-bottom: var(--s5); }
  .u-head { grid-template-columns: auto 1fr; margin: -36px var(--s3) 0; gap: var(--s2) var(--s3); align-items: end; }
  .u-head .planet.lg { width: 72px; height: 72px; grid-row: 1; grid-column: 1; }
  .u-actions { grid-row: 1; grid-column: 2; justify-content: flex-end; flex-wrap: wrap; }
  .u-title { grid-row: 2; grid-column: 1 / -1; padding-top: var(--s2); }
  .u-title h1 { font-size: var(--step-2); }
  /* Hidden from sight but still read by screen readers: icon-only buttons keep their name on phones. */
  .hide-sm { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .messenger { grid-template-columns: 1fr; height: calc(100vh - 140px); border-radius: var(--r); }
  .messenger.has-thread .conv-pane { display: none; }
  .messenger:not(.has-thread) .thread-pane { display: none; }
  .thread-head .back { display: grid; }
  .thread { padding: var(--s3); }
  .msg { max-width: 88%; }
  .lightbox { padding: 56px 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; }
  .composer-bar .where-select { max-width: 150px; }
  .post { padding: var(--s4) var(--s4) var(--s2); }
}
button.icon-btn { background: none; border: 0; padding: 0; font: inherit; }
.aside-links { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: var(--s3) var(--s2); font-size: var(--fs-sm); }
.aside-links a { color: var(--faint); }
.composer-bar .btn.primary { margin-left: auto; } .composer-bar .hint:empty { display: none; }
/* Profile hero */
.p-head2 .p-avatar .avatar.lg { width: 104px; height: 104px; font-size: 40px; border: 5px solid var(--void); }
.p-info { margin: var(--s4) var(--s5) 0; }
.p-info .prose { margin-bottom: var(--s3); max-width: 62ch; }
.p-links { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: var(--step--1); margin-bottom: var(--s2); }
.p-links a { display: inline-flex; align-items: center; gap: 4px; }
.p-meta { display: flex; gap: var(--s5); color: var(--muted); font-size: var(--step--1); margin: var(--s2) 0; flex-wrap: wrap; align-items: center; }
.p-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.p-meta a { color: var(--muted); }
.p-meta strong { color: var(--text); }
.signal-strip { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); }
.signal-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--cyan-dim); border: 1px solid rgba(62, 230, 240, .25); color: var(--muted); font-size: var(--fs-sm); }
.signal-chip:hover { text-decoration: none; border-color: var(--cyan); }
.u-tagline .flag { margin-left: 8px; }
@media (max-width: 820px) { .p-info { margin: var(--s3) var(--s3) 0; } .p-head2 .p-avatar .avatar.lg { width: 80px; height: 80px; font-size: var(--fs-2xl); } }
@media (max-width: 820px) { .u-head > :first-child { grid-row: 1; grid-column: 1; } }
.p-head2 { grid-template-columns: auto 1fr; align-items: end; row-gap: var(--s2); margin-top: -52px; }
.p-head2 > .p-avatar { grid-row: 1; grid-column: 1; }
.p-head2 > .u-actions { grid-row: 1; grid-column: 2; justify-content: flex-end; }
.p-head2 > .u-title { grid-row: 2; grid-column: 1 / -1; padding-top: var(--s2); }

/* ---------------- Image picker & swatches ---------------- */
.label { display: block; font-weight: 600; margin-bottom: var(--s2); font-size: var(--step--1); }
.grid-2 { display: grid; grid-template-columns: auto 1fr; gap: var(--s5); align-items: start; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.img-pick { display: flex; gap: var(--s4); align-items: center; }
.img-pick.wide { flex-direction: column; align-items: stretch; }
.img-drop { margin: 0; flex: none; position: relative; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: var(--surface-2); border: 1px dashed var(--line-strong); color: var(--faint); transition: border-color var(--base) var(--ease); }
.img-drop:hover, .img-pick.drag .img-drop { border-color: var(--violet); color: var(--text); }
.img-pick.round .img-drop { width: 96px; height: 96px; border-radius: 50%; }
.img-pick.square .img-drop { width: 96px; height: 96px; border-radius: var(--r-xl); }
.img-pick.wide .img-drop { width: 100%; aspect-ratio: 3 / 1; border-radius: var(--r); }
.img-drop img { width: 100%; height: 100%; object-fit: cover; }
.img-side { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); min-width: 0; }
.img-pick.wide .img-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
.img-side .btn { margin: 0; }
.img-side .hint { overflow-wrap: anywhere; }
.img-pick:focus-within .img-side .btn { outline: 2px solid var(--violet); outline-offset: 2px; }

.swatches { display: flex; flex-wrap: wrap; gap: var(--s2); }
.swatch { margin: 0; display: inline-flex; align-items: center; gap: var(--s2); padding: 6px 12px 6px 8px; border-radius: var(--r-pill); border: 1px solid var(--line);
  font-weight: 500; cursor: pointer; transition: border-color var(--base), background var(--base); }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch .dot { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--pc) 70%, #fff), var(--pc) 60%); box-shadow: 0 0 0 2px var(--surface); }
.swatch:hover { border-color: var(--line-strong); }
.swatch:has(input:checked) { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, transparent); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--pc); outline-offset: 2px; }

/* ---------------- Welcome flow ---------------- */
.welcome { max-width: 760px; }
.welcome-head { margin-bottom: var(--s5); }
.welcome-head .brand-mark { width: 44px; height: 44px; margin-bottom: var(--s3); }
.welcome-head h1 { margin-bottom: var(--s2); }
.welcome-head p { max-width: 58ch; }
.stepper { list-style: none; padding: 0; margin: 0 0 var(--s5); display: flex; gap: var(--s2); counter-reset: s; }
.stepper li { flex: 1; position: relative; }
.stepper a { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) 0 var(--s3); color: var(--faint); text-decoration: none; border-bottom: 2px solid var(--line); font-weight: 600; font-size: var(--step--1); }
.stepper .n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); font-size: var(--fs-xs); }
.stepper .current a { color: var(--text); border-color: var(--violet); }
.stepper .current .n { background: var(--violet-ink); border-color: var(--violet-ink); color: #fff; }
.stepper .done a { color: var(--muted); border-color: color-mix(in srgb, var(--cyan) 60%, transparent); }
.stepper .done .n { background: color-mix(in srgb, var(--cyan) 18%, transparent); border-color: var(--cyan); color: var(--cyan); }
@media (max-width: 480px) { .stepper .t { display: none; } .stepper .current .t { display: inline; } }
.chips-lg .chip-toggle span { padding: 11px 18px; font-size: var(--step-0); }
.welcome-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s4); }
.welcome-u { display: flex; flex-direction: column; gap: var(--s2); }
.welcome-u .u-card { flex: 1; }
.welcome-u form, .welcome-u .btn { width: 100%; }
.welcome-u .btn { justify-content: center; }
.btn.joined { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); cursor: default; }
[hidden] { display: none !important; }
@media (max-width: 820px) { .welcome-head .brand-mark { display: none; } }

/* ---------------- Landing: how it works ---------------- */
.l-how { display: flex; flex-direction: column; gap: var(--s7); }
.how { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); align-items: center; }
.how.flip .how-copy { order: 2; }
.how-copy h3 { font-size: var(--step-3); letter-spacing: -.02em; margin-bottom: var(--s3); }
.how-copy p { color: var(--muted); font-size: var(--step-1); line-height: 1.55; max-width: 46ch; margin-bottom: var(--s4); }
.how-demo { margin: 0; position: relative; padding: var(--s6) var(--s5) var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--pc) 16%, transparent), transparent 70%), var(--surface); }
.how-demo figcaption { position: absolute; top: var(--s3); right: var(--s4); font-size: var(--fs-2xs); color: var(--faint); border: 1px dashed var(--line-strong); border-radius: var(--r-pill); padding: 2px 8px; }
.levels { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s4); }
.levels li { display: flex; flex-direction: column; gap: 2px; }

.mock-link { display: flex; align-items: center; gap: 0; }
.mock-planet { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font: 700 18px var(--font-display); color: #fff;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--pc) 85%, #fff) 0%, var(--pc) 38%, color-mix(in srgb, var(--pc) 30%, #000) 100%);
  box-shadow: 0 0 40px color-mix(in srgb, var(--pc) 45%, transparent); }
.mock-wire { flex: 1; height: 2px; position: relative; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.mock-wire .why { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; background: var(--void); border: 1px solid var(--line-strong); padding: 4px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); }
.mock-names { display: flex; justify-content: space-between; margin-top: var(--s2); font-weight: 600; font-size: var(--step--1); }
.mock-names span { width: 96px; text-align: center; margin: 0 -12px; }

.mock-post { background: var(--void); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); }
.mock-who { display: flex; align-items: center; gap: var(--s2); font-size: var(--step--1); margin-bottom: var(--s2); }
.mock-post p { margin-bottom: var(--s3); }
.mock-acts { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.chip-signal { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--cyan); padding: 4px 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--cyan) 12%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 35%, transparent); }

.mock-consent { background: var(--void); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); max-width: 380px; margin: 0 auto; }
.mock-consent-head { display: flex; gap: var(--s3); align-items: center; margin-bottom: var(--s3); }
.mock-consent-head .brand-mark { width: 32px; height: 32px; flex: none; }
.mock-consent ul { list-style: none; padding: 0; margin: 0 0 var(--s2); display: grid; gap: var(--s2); }
.mock-consent li { display: flex; gap: var(--s2); align-items: center; padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--surface); font-size: var(--step--1); }
.mock-consent .btn { pointer-events: none; }

.l-cta { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.l-cta .brand-mark { width: 56px; height: 56px; }
.l-cta h2 { font-size: var(--step-3); max-width: 22ch; letter-spacing: -.02em; }
@media (max-width: 900px) {
  .how { grid-template-columns: 1fr; gap: var(--s4); }
  .how.flip .how-copy { order: 0; }
  .mock-wire .why { white-space: normal; text-align: center; width: max-content; max-width: 150px; }
}
@media (max-width: 640px) {
  .l-nav { flex-wrap: nowrap; }
  .l-nav nav .btn.ghost { display: none; }
  .l-nav nav { flex-wrap: nowrap; }
  .orbit-stage { margin: 0 -8px; }
}

/* ---------------- Developers ---------------- */
.dev-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s5); align-items: end; padding-bottom: var(--s6); border-bottom: 1px solid var(--line); margin-bottom: var(--s6); }
.dev-hero h1 { font-size: var(--step-4); letter-spacing: -.025em; line-height: 1.05; max-width: 18ch; }
.dev-hero .lead { color: var(--muted); font-size: var(--step-1); max-width: 52ch; margin-bottom: var(--s4); }
.dev-discovery { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); display: grid; gap: var(--s2); }
.dev-discovery code { overflow-wrap: anywhere; font-size: var(--fs-sm); color: var(--cyan); }
.dev-discovery .btn { justify-self: start; }
.dev-section { margin-bottom: var(--s7); }
.dev-section h2 { margin-bottom: var(--s4); }
.dev-steps { list-style: none; counter-reset: st; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.dev-steps li { counter-increment: st; position: relative; padding: var(--s4) var(--s4) var(--s4) 64px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: var(--s1, 4px); }
.dev-steps li::before { content: counter(st); position: absolute; left: var(--s4); top: var(--s4); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font: 700 14px var(--font-display); color: #fff; background: radial-gradient(circle at 35% 30%, #c3a8ff, #8b5cff 50%, #2a0f7a); }
.dev-steps li span { color: var(--muted); font-size: var(--step--1); }
.dev-kit { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--s5); align-items: start; }
.kit-preview { display: grid; gap: var(--s3); }
.kit-stage { border-radius: var(--r-lg); padding: var(--s6) var(--s4); display: grid; place-items: center; border: 1px solid var(--line); }
.kit-stage.dark { background: #0b0912; }
.kit-stage.light { background: #f4f2f8; }
.rsfxr-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: var(--r-pill); font: 600 15px/1.2 var(--font-body); }
.rsfxr-btn .brand-mark { width: 24px; height: 24px; }
.rsfxr-btn.dark { background: #0b0912; color: #fff; border: 1px solid #2b2540; }
.rsfxr-btn.light { background: #fff; color: #14111c; border: 1px solid #d9d4e6; }
.kit-code pre { background: var(--void); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); overflow-x: auto; font-size: var(--fs-sm); line-height: 1.6; margin: var(--s2) 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.scope-table { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.scope-row { display: grid; grid-template-columns: 140px 1fr auto; gap: var(--s4); align-items: center; padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }
.scope-row:first-child { border-top: 0; }
.scope-row code { color: var(--cyan); }
@media (max-width: 900px) {
  .dev-hero, .dev-kit { grid-template-columns: 1fr; }
  .dev-steps { grid-template-columns: 1fr; }
  .scope-row { grid-template-columns: 1fr auto; } .scope-row > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--muted); font-size: var(--step--1); }
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 84px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: var(--muted); font: 600 var(--step--1) var(--font-display); padding: 6px 10px; border-radius: var(--r-pill); cursor: pointer; }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-rules { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); padding: 0; margin: var(--s2) 0 0; font-size: var(--fs-xs); color: var(--faint); }
.pw-rules li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; margin-right: 6px; vertical-align: 1px; }
.pw-rules li.ok { color: var(--cyan); }
.pw-rules li.ok::before { background: currentColor; }
.pw-match.ok { color: var(--cyan); }
.auth-side { display: none; }
@media (min-width: 1000px) {
  .auth { grid-template-columns: minmax(0, 520px) minmax(0, 440px); justify-content: center; align-items: center; column-gap: clamp(48px, 8vw, 140px); }
  .auth-side { display: flex; flex-direction: column; gap: var(--s5); justify-self: start; max-width: 460px; }
  .auth-side .brand { padding: 0; }
  .auth-slogan { white-space: nowrap; font: 700 clamp(3rem, 4.6vw, 4.4rem)/1.02 var(--font-display); letter-spacing: -.03em; margin: 0; }
  .auth-slogan span { display: block; color: transparent; -webkit-text-stroke: 1.5px var(--violet-strong); }
  .auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); color: var(--muted); }
  .auth-points li { display: flex; gap: var(--s3); align-items: center; }
  .auth-points svg { color: var(--cyan); flex: none; }
  .auth-card .brand { display: none; }
}

/* ---------------- Admin: system ---------------- */
.sys-summary { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-bottom: var(--s5); }
.sys-pill { padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: var(--step--1); }
.sys-pill strong { font: 700 var(--step-1) var(--font-display); margin-right: 4px; }
.sys-pill.ok strong { color: var(--ok); } .sys-pill.warn strong { color: var(--warn); } .sys-pill.fail strong { color: var(--danger); }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--s4); align-items: start; }
.sys-group h2 { font-size: var(--step-1); margin-bottom: var(--s3); }
.sys-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.sys-row { display: flex; gap: var(--s3); align-items: flex-start; }
.sys-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--ok); box-shadow: 0 0 8px color-mix(in srgb, var(--ok) 60%, transparent); }
.sys-row.warn .sys-dot { background: var(--warn); box-shadow: 0 0 8px color-mix(in srgb, var(--warn) 60%, transparent); }
.sys-row.fail .sys-dot { background: var(--danger); box-shadow: 0 0 8px color-mix(in srgb, var(--danger) 60%, transparent); }
.sys-label { display: block; font-weight: 600; }
.sys-detail { display: block; color: var(--muted); font-size: var(--step--1); overflow-wrap: anywhere; }
.sys-fix { display: block; font-size: var(--fs-xs); color: var(--faint); margin-top: 2px; overflow-wrap: anywhere; }
.sys-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-block); padding-top: var(--space-block); border-top: 1px solid var(--line); }
.sys-grid > .panel { margin: 0; }

/* ---------------- Missions & achievements ---------------- */
.meter { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; margin: var(--s2) 0 var(--s3); }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--cyan)); transition: width 400ms var(--ease); }
.meter .w1 { width: 25%; } .meter .w2 { width: 50%; } .meter .w3 { width: 75%; } .meter .w4 { width: 100%; }
.missions ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.missions li { display: flex; gap: var(--s3); align-items: flex-start; font-size: var(--step--1); }
.missions li strong { display: block; }
.missions li span.grow > span { color: var(--muted); }
.missions .tick { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; margin-top: 1px; }
.missions li.done .tick { background: var(--cyan); border-color: var(--cyan); color: var(--void); }
.missions li.done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.badges { list-style: none; padding: 0; margin: var(--s2) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: var(--s2); }
.badge-a { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); padding: var(--s3); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 600; line-height: 1.25; position: relative; }
.badge-ic { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 35% 30%, #c3a8ff, #8b5cff 55%, #2a0f7a); box-shadow: 0 0 14px rgba(139, 92, 255, .35); }
.badge-a:nth-child(3n+2) .badge-ic { background: radial-gradient(circle at 35% 30%, #b8fbff, #22c7d6 55%, #0b4552); box-shadow: 0 0 14px rgba(62, 230, 240, .3); }
.badge-a:nth-child(3n) .badge-ic { background: radial-gradient(circle at 35% 30%, #ffc2ec, #e04ab8 55%, #5a1050); box-shadow: 0 0 14px rgba(224, 74, 184, .3); }
.badge-a.locked { opacity: .55; }
.badge-a.locked .badge-ic { background: var(--surface); box-shadow: none; color: var(--faint); border: 1px dashed var(--line-strong); }
.badge-t { min-width: 0; overflow-wrap: break-word; hyphens: manual; }
.badge-p { display: block; font-size: var(--fs-2xs); font-weight: 500; color: var(--faint); margin-top: 2px; }

/* ---------------- Topics ---------------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s2); }
.topic { display: flex; gap: var(--s3); align-items: center; padding: var(--s3); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color var(--base), transform var(--base); }
.topic:hover { text-decoration: none; border-color: var(--violet); }
.topic-ic { width: 40px; height: 40px; flex: none; border-radius: var(--r); display: grid; place-items: center; color: var(--cyan); background: color-mix(in srgb, var(--cyan) 10%, var(--surface-2)); }
.topic:nth-child(3n+2) .topic-ic { color: #b9a0ff; background: color-mix(in srgb, var(--violet) 14%, var(--surface-2)); }
.topic:nth-child(3n) .topic-ic { color: #f08ad3; background: color-mix(in srgb, #e04ab8 12%, var(--surface-2)); }
.topic-n { display: block; font-weight: 600; font-size: var(--step--1); line-height: 1.3; }
.topic-c { display: block; font-size: var(--fs-xs); color: var(--faint); }

/* ---------------- Polls ---------------- */
.poll { margin: var(--s3) 0 var(--s2); }
.poll-vote fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.poll-vote { display: grid; gap: var(--s2); }
.poll-option { display: block; width: 100%; text-align: left; padding: 10px 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 600 var(--step--1) var(--font-body); cursor: pointer; transition: border-color var(--base), background var(--base); }
.poll-option:hover { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 10%, transparent); text-decoration: none; }
.poll-option:disabled { opacity: .6; cursor: progress; }
.poll-results { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.poll-results li { position: relative; display: flex; justify-content: space-between; gap: var(--s3); padding: 9px 14px; border-radius: var(--r-sm); overflow: hidden; font-size: var(--step--1); background: var(--surface-2); }
.poll-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--violet) 26%, transparent); transition: width 500ms var(--ease); }
.poll-results li.mine .poll-bar { background: color-mix(in srgb, var(--cyan) 26%, transparent); }
.poll-results li.win { font-weight: 700; }
.poll-label, .poll-pct { position: relative; display: inline-flex; gap: 6px; align-items: center; }
.poll-pct { font-variant-numeric: tabular-nums; color: var(--muted); }
.poll-meta { margin: var(--s2) 0 0; font-size: var(--fs-xs); color: var(--faint); }
.poll-field > fieldset { margin: var(--s3) 0 0; display: grid; gap: var(--s2); }
.poll-field:not([open]) > fieldset { display: none; }
.poll-days { display: flex; align-items: center; gap: var(--s2); margin: 0; font-weight: 500; }
.poll-days select { width: auto; }
.icon-btn.tool.on { color: var(--violet-strong); background: color-mix(in srgb, var(--violet) 14%, transparent); }
.poll-bar.p5 { width: 5%; }
.poll-bar.p10 { width: 10%; }
.poll-bar.p15 { width: 15%; }
.poll-bar.p20 { width: 20%; }
.poll-bar.p25 { width: 25%; }
.poll-bar.p30 { width: 30%; }
.poll-bar.p35 { width: 35%; }
.poll-bar.p40 { width: 40%; }
.poll-bar.p45 { width: 45%; }
.poll-bar.p50 { width: 50%; }
.poll-bar.p55 { width: 55%; }
.poll-bar.p60 { width: 60%; }
.poll-bar.p65 { width: 65%; }
.poll-bar.p70 { width: 70%; }
.poll-bar.p75 { width: 75%; }
.poll-bar.p80 { width: 80%; }
.poll-bar.p85 { width: 85%; }
.poll-bar.p90 { width: 90%; }
.poll-bar.p95 { width: 95%; }
.poll-bar.p100 { width: 100%; }

/* ---------------- Group conversations ---------------- */
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.group-av { position: relative; width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; border-radius: var(--r); background: var(--surface-2); color: var(--muted); }
.group-av .avatar { position: absolute; width: 26px; height: 26px; font-size: var(--fs-2xs); border: 2px solid var(--surface); }
.group-av .avatar:first-child { top: 2px; left: 2px; }
.group-av .avatar:nth-child(2) { bottom: 2px; right: 2px; }
.msg-system { text-align: center; font-size: var(--fs-xs); color: var(--faint); margin: var(--s3) auto; max-width: 80%; }
.msg.in-group { align-items: flex-end; }
.msg-av { width: 24px; flex: none; align-self: flex-end; }
.msg-author { display: block; font-size: var(--fs-xs); font-weight: 700; color: var(--cyan); margin-bottom: 2px; }
.msg.cont { margin-top: -6px; }
.group-menu { position: relative; }
.group-pop { width: min(360px, 86vw); padding: var(--s3); display: grid; gap: var(--s3); right: 0; left: auto; }
.group-members { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); max-height: 240px; overflow: auto; }
.group-members li { display: flex; align-items: center; gap: var(--s2); font-size: var(--step--1); }
.group-members form { margin: 0; }
.group-add label { font-size: var(--fs-xs); }
.pick-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2); max-height: 320px; overflow: auto; padding: 2px; }
.pick-people.small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-height: 150px; margin-bottom: var(--s2); }
.person-pick { position: relative; display: flex; align-items: center; gap: var(--s2); padding: var(--s2); margin: 0; border-radius: var(--r); border: 1px solid var(--line); font-weight: 500; cursor: pointer; }
.person-pick input { position: absolute; opacity: 0; }
.person-pick .grow { display: flex; flex-direction: column; min-width: 0; }
.person-pick:has(input:checked) { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); }
.person-pick:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.new-group { padding: var(--s5); overflow: auto; }

/* ---------------- Events & missions ---------------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin: var(--s2) 0 var(--s4); }
.section-head h2 { margin: 0; }
.grid-2.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .grid-2.even { grid-template-columns: 1fr; } }
.event-list, .mission-list { display: grid; gap: var(--s3); }
.event-card { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color var(--base); }
.event-card:hover { text-decoration: none; border-color: var(--line-strong); }
.event-card.cancelled { opacity: .6; }
.event-list.past .event-card { background: transparent; }
.ev-date { flex: none; width: 56px; border-radius: var(--r); overflow: hidden; text-align: center; border: 1px solid var(--line-strong); background: var(--surface-2); }
.ev-m { display: block; padding: 3px 0; font: 700 11px var(--font-display); text-transform: uppercase; letter-spacing: .06em; color: #fff; background: linear-gradient(90deg, var(--violet), color-mix(in srgb, var(--violet) 60%, var(--cyan))); }
.ev-d { display: block; padding: 4px 0 6px; font: 700 22px/1.1 var(--font-display); }
.ev-date.lg { width: 76px; } .ev-date.lg .ev-d { font-size: var(--fs-2xl); } .ev-date.lg .ev-m { font-size: var(--fs-xs); }
.ev-title { display: block; font: 600 var(--step-1) var(--font-display); margin-bottom: 4px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 4px var(--s3); font-size: var(--step--1); color: var(--muted); }
.ev-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.ev-foot { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s2); }
.event-page, .mission-page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); }
.event-head { display: flex; gap: var(--s4); align-items: flex-start; margin-bottom: var(--s4); }
.event-head h2 { font-size: var(--step-3); margin: var(--s1, 4px) 0 var(--s3); }
.event-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); color: var(--muted); }
.event-facts li { display: flex; gap: var(--s2); align-items: flex-start; }
.event-facts svg { flex: none; margin-top: 3px; color: var(--pc, var(--violet)); }
.rsvp-bar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; padding: var(--s3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: var(--s4); }
.rsvp { display: flex; gap: var(--s2); flex-wrap: wrap; margin: 0; }
.btn.on-going { background: color-mix(in srgb, var(--cyan) 16%, transparent); border-color: var(--cyan); color: var(--cyan); }
.attendees { display: flex; flex-wrap: wrap; gap: 6px; }
.mission-card { display: grid; gap: var(--s2); padding: var(--s4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.mission-card:hover { text-decoration: none; border-color: var(--line-strong); }
.mission-card.phase-running { border-color: color-mix(in srgb, var(--violet) 45%, var(--line)); background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--violet) 12%, transparent), transparent 60%), var(--surface); }
.mission-card.phase-ended { opacity: .75; }
.mc-top { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.mc-tag { font: 700 var(--step--1) var(--font-display); color: var(--cyan); margin: 0; }
.mc-top .badge:last-child { margin-left: auto; }
.mc-title { font: 600 var(--step-1) var(--font-display); }
.mc-desc { color: var(--muted); font-size: var(--step--1); }
.mission-page h2 { font-size: var(--step-3); margin: var(--s1, 4px) 0 var(--s3); }
.mission-stats { display: flex; flex-wrap: wrap; gap: var(--s5); margin: var(--s4) 0 var(--s2); }
.mission-stats div { display: flex; flex-direction: column; }
.mission-stats strong { font: 700 var(--step-2) var(--font-display); }
.mission-stats span { color: var(--muted); font-size: var(--step--1); }
.meter.lg { height: 10px; margin-bottom: var(--s4); }
.next-event .event-card { padding: var(--s3); border: 0; background: var(--surface-2); }
.next-event .ev-title { font-size: var(--step-0); }
.mini-mission { display: grid; gap: 2px; padding: var(--s3); border-radius: var(--r); background: var(--surface-2); color: var(--text); } .mini-mission:hover { text-decoration: none; background: color-mix(in srgb, var(--violet) 12%, var(--surface-2)); }

/* Universe header: planet + actions on the first row, title block below (same rhythm as profiles). */
.u-head { grid-template-columns: auto 1fr; row-gap: var(--s2); align-items: end; }
.u-head > :first-child { grid-row: 1; grid-column: 1; }
.u-head > .u-actions { grid-row: 1; grid-column: 2; justify-content: flex-end; flex-wrap: wrap; }
.u-head > .u-title { grid-row: 2; grid-column: 1 / -1; padding-top: var(--s2); }
.u-head .u-stats { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; }
.meter .m5 { width: 5%; }
.meter .m10 { width: 10%; }
.meter .m15 { width: 15%; }
.meter .m20 { width: 20%; }
.meter .m25 { width: 25%; }
.meter .m30 { width: 30%; }
.meter .m35 { width: 35%; }
.meter .m40 { width: 40%; }
.meter .m45 { width: 45%; }
.meter .m50 { width: 50%; }
.meter .m55 { width: 55%; }
.meter .m60 { width: 60%; }
.meter .m65 { width: 65%; }
.meter .m70 { width: 70%; }
.meter .m75 { width: 75%; }
.meter .m80 { width: 80%; }
.meter .m85 { width: 85%; }
.meter .m90 { width: 90%; }
.meter .m95 { width: 95%; }
.meter .m100 { width: 100%; }
.presence { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin-left: var(--s2); }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.presence.available { color: var(--ok); }
.presence.available .presence-dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.presence.away .presence-dot { background: transparent; border: 1.5px solid var(--warn); }

/* ---------------- Two-step verification ---------------- */
.otp-input { font: 600 var(--step-2) var(--font-display); letter-spacing: .3em; text-align: center; }
.btn.block { width: 100%; justify-content: center; }
.mfa-steps { padding-left: 1.2em; display: grid; gap: var(--s4); margin: 0 0 var(--s4); }
.mfa-qr { display: flex; gap: var(--s4); align-items: center; flex-wrap: wrap; margin-top: var(--s3); }
.mfa-qr img { background: #fff; border-radius: var(--r); padding: 6px; }
.mfa-qr > div { display: grid; gap: var(--s2); justify-items: start; }
.mfa-key { font-size: var(--step-0); letter-spacing: .08em; color: var(--cyan); word-break: break-all; }
.recovery { border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); border-radius: var(--r); padding: var(--s4); margin-bottom: var(--s4); }
.codes { columns: 2; margin: var(--s3) 0; padding-left: 1.4em; font-size: var(--step--1); }
.codes code { letter-spacing: .05em; }

/* ---------------- Admin metrics ---------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); display: grid; gap: 2px; }
.kpi-n { font: 700 var(--step-3) var(--font-display); letter-spacing: -.02em; }
.kpi-l { color: var(--muted); font-size: var(--step--1); }
.chart { width: 100%; height: auto; display: block; margin: var(--s3) 0 var(--s2); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .bar-a { fill: var(--violet); }
.chart .bar-s { fill: var(--cyan); }
.chart .tick { fill: var(--faint); font-size: var(--fs-2xs); font-family: var(--font-body); }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); }
.legend .lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.legend .lg.a { background: var(--violet); } .legend .lg.s { background: var(--cyan); }
.funnel { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.funnel li { display: grid; grid-template-columns: 1fr; gap: 4px; }
.f-label { font-size: var(--step--1); font-weight: 600; }
.f-bar { height: 10px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; display: block; }
.f-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.f-bar > span.zero { width: 0; }
.f-bar > .m5 { width: 5%; } .f-bar > .m10 { width: 10%; } .f-bar > .m15 { width: 15%; } .f-bar > .m20 { width: 20%; } .f-bar > .m25 { width: 25%; } .f-bar > .m30 { width: 30%; } .f-bar > .m35 { width: 35%; } .f-bar > .m40 { width: 40%; } .f-bar > .m45 { width: 45%; } .f-bar > .m50 { width: 50%; }
.f-bar > .m55 { width: 55%; } .f-bar > .m60 { width: 60%; } .f-bar > .m65 { width: 65%; } .f-bar > .m70 { width: 70%; } .f-bar > .m75 { width: 75%; } .f-bar > .m80 { width: 80%; } .f-bar > .m85 { width: 85%; } .f-bar > .m90 { width: 90%; } .f-bar > .m95 { width: 95%; } .f-bar > .m100 { width: 100%; }
.f-n { font-size: var(--fs-xs); }
.stats-dl { margin: 0; display: grid; gap: var(--s2); }
.stats-dl > div { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.stats-dl dt { color: var(--muted); } .stats-dl dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.cohorts { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.cohorts th, .cohorts td { padding: 8px 10px; text-align: center; border-radius: var(--r-xs); }
.cohorts thead th { color: var(--muted); font-weight: 600; }
.cohorts tbody th { text-align: left; font-weight: 600; }
.cohorts td.na { color: var(--faint); }
.cohorts td.r0 { background: color-mix(in srgb, var(--violet) 6%, transparent); } .cohorts td.r1 { background: color-mix(in srgb, var(--violet) 14%, transparent); }
.cohorts td.r2 { background: color-mix(in srgb, var(--violet) 22%, transparent); } .cohorts td.r3 { background: color-mix(in srgb, var(--violet) 30%, transparent); }
.cohorts td.r4 { background: color-mix(in srgb, var(--violet) 38%, transparent); } .cohorts td.r5 { background: color-mix(in srgb, var(--violet) 46%, transparent); }
.cohorts td.r6 { background: color-mix(in srgb, var(--violet) 54%, transparent); } .cohorts td.r7 { background: color-mix(in srgb, var(--violet) 62%, transparent); }
.cohorts td.r8, .cohorts td.r9, .cohorts td.r10 { background: color-mix(in srgb, var(--violet) 72%, transparent); color: #fff; }
.cohorts th, .cohorts td { border-bottom: 0; } .cohorts thead th, .cohorts tbody th { background: transparent; }
.kpi .kpi-n { font: 700 var(--step-3)/1.1 var(--font-display); color: var(--text); } .kpi .kpi-l { font-size: var(--step--1); } .grid-2 > .panel { margin: 0; } .grid-2.even + .panel, .panel + .grid-2 { margin-top: var(--s4); }
.share-out { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: var(--s4) 0; }
.embed-code { position: relative; }
.embed-code > summary { list-style: none; }
.embed-code > summary::-webkit-details-marker { display: none; }
.embed-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(460px, 88vw); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r); padding: var(--s3); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); display: grid; gap: var(--s2); }
.embed-pop pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-xs); background: var(--void); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s2); }
.secret-once { border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); border-radius: var(--r); padding: var(--s3); margin-bottom: var(--s3); overflow-wrap: anywhere; }
.topic-hero { display: flex; gap: var(--s5); align-items: flex-start; padding: var(--s6) var(--s5); margin-bottom: var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line);
  background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 60%), radial-gradient(70% 120% at 100% 100%, color-mix(in srgb, var(--cyan) 12%, transparent), transparent 60%), var(--surface); }
.topic-hero-ic { width: 72px; height: 72px; flex: none; border-radius: var(--r-xl); display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #c3a8ff, #8b5cff 55%, #2a0f7a); box-shadow: 0 0 40px rgba(139, 92, 255, .35); }
.topic-hero h1 { font-size: var(--step-4); letter-spacing: -.02em; margin-bottom: var(--s2); }
.topic-hero .lead { color: var(--muted); max-width: 56ch; margin-bottom: var(--s4); }
@media (max-width: 560px) { .topic-hero { flex-direction: column; padding: var(--s5) var(--s4); } }
.map-loading { position: absolute; inset: 0; display: flex; gap: var(--s2); align-items: center; justify-content: center; color: var(--muted); font-size: var(--step--1); pointer-events: none; }
.sys-migrate { border-color: var(--danger); margin-bottom: var(--s4); }
.share-in { margin-top: var(--s4); } .share-in > summary { list-style: none; display: inline-flex; } .share-in > summary::-webkit-details-marker { display: none; } .share-in[open] > summary { margin-bottom: var(--s3); } .share-out { margin-top: var(--s2); }

/* ---------------- Pulso ---------------- */
.pulse-head { margin-bottom: var(--s4); }
.pulse-head h1 { margin-bottom: var(--s1, 4px); }
.pulse-sec { margin-bottom: var(--s6); }
.pulse-sec > h2, .pulse-grid h2 { display: flex; align-items: center; gap: var(--s2); font-size: var(--step-1); margin-bottom: var(--s3); }
.pulse-sec > h2 svg, .pulse-grid h2 svg { color: var(--cyan); }
.pulse-grid { margin-bottom: var(--s6); }
.pulse-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.pulse-item { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.pulse-item:hover { text-decoration: none; border-color: var(--line-strong); }
.pulse-item .grow { min-width: 0; font-size: var(--step--1); }
.pulse-quote { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.pulse-where { font-size: var(--fs-xs); color: var(--faint); white-space: nowrap; }
.pulse-avs { display: inline-flex; flex: none; }
.pulse-avs .avatar { margin-left: -8px; border: 2px solid var(--surface); } .pulse-avs .avatar:first-child { margin-left: 0; }
.pulse-sugg { display: flex; align-items: center; gap: var(--s2); }
.pulse-sugg .pulse-item { flex: 1; }
.pulse-sugg .why { display: block; }
.pulse-end { text-align: center; padding: var(--s6) var(--s4); border-top: 1px solid var(--line); }
.pulse-end .orbit-empty { width: 84px; margin-bottom: var(--s2); }
.pulse-prefs { text-align: left; max-width: 480px; margin: var(--s4) auto 0; }
.pulse-prefs > summary { list-style: none; display: inline-flex; } .pulse-prefs > summary::-webkit-details-marker { display: none; }
.pulse-steps { display: grid; gap: var(--s2); padding-left: 1.2em; margin: var(--s3) 0 0; }
.warn-text { color: var(--warn); }
@media (max-width: 560px) { .pulse-where { display: none; } }
.pulse-list > li, .pulse-item { min-width: 0; } .pulse-item { overflow: hidden; } .mini-mission.mb:last-child { margin-bottom: 0; } .pulse-grid { align-items: start; }

/* ---------------- Live map ---------------- */
.map-filters { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; margin-bottom: var(--s4); }
.map-filters label { margin: 0; font-size: var(--fs-xs); color: var(--muted); display: grid; gap: 4px; }
.map-filters select { min-width: 150px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s4); align-items: start; }
.map-layout .map-wrap { height: 72vh; }
.map-panel { margin: 0; max-height: 72vh; overflow: auto; }
.map-panel h2 { font-size: var(--step-1); }
.map-wrap > svg { touch-action: none; cursor: grab; }
.map-wrap > svg.dragging { cursor: grabbing; }
.map-wrap .edge.manual { stroke: rgba(62, 230, 240, .5); stroke-dasharray: 5 4; }
.map-wrap .edge-hit { stroke: transparent; stroke-width: 14; cursor: pointer; }
.map-wrap .edge.hot { stroke: var(--cyan); }
.map-wrap .edge.dim { stroke-opacity: .12; }
.map-wrap .node { transition: opacity var(--base); }
.map-wrap .node.dim { opacity: .25; }
.map-wrap .node.sel circle.body { stroke: var(--cyan); stroke-width: 3; }
.map-wrap .node.active .ring { stroke: rgba(62, 230, 240, .85); }
.map-wrap .node .halo { fill: none; }
.map-zoom { position: absolute; right: var(--s3); top: var(--s3); display: grid; gap: 6px; }
.map-zoom .icon-btn { background: var(--surface-2); border: 1px solid var(--line-strong); font-size: var(--fs-md); line-height: 1; }
.map-legend { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s2); color: var(--muted); }
.map-legend span { display: inline-block; vertical-align: middle; margin-right: 8px; }
.lg-node { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--violet) 40%, #0b0620); }
.lg-joined { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--cyan); }
.lg-edge { width: 22px; height: 3px; background: rgba(139, 92, 255, .6); border-radius: 2px; }
.map-rels { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.map-rel { display: grid; gap: 2px; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; color: var(--text); cursor: pointer; font: inherit; }
.map-rel:hover { border-color: var(--violet); }
.map-panel .btn + .btn, .map-panel .row { margin-top: var(--s2); }
.map-panel [data-panel-content] > .btn.ghost { margin-top: var(--s3); }
.map-list { margin-top: var(--s5); }
.map-list > summary { cursor: pointer; font-weight: 600; margin-bottom: var(--s3); }
.map-list > ul { display: grid; gap: var(--s3); padding-left: 1.1em; }
.map-list li > ul { margin-top: 4px; color: var(--muted); }
@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-layout .map-wrap { height: 60vh; min-height: 340px; }
  .map-panel { max-height: none; }
  .map-filters select { min-width: 0; }
  .map-filters label { flex: 1 1 140px; }
}

/* ---------------- Profile customisation ---------------- */
.design-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.block-list { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: var(--s2); counter-reset: b; }
.block-list li { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.block-list li .grow { display: grid; gap: 2px; min-width: 0; }
.block-list select { width: auto; }
.block-list .move { display: inline-flex; gap: 4px; }
.block-list .move svg.up { transform: rotate(90deg); } .block-list .move svg.down { transform: rotate(90deg); }
.block-list .move button:disabled { opacity: .3; }
@media (max-width: 560px) { .block-list li { flex-wrap: wrap; } .block-list li .grow { flex: 1 1 100%; } }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); }
.theme-opt { position: relative; margin: 0; display: grid; gap: 6px; padding: var(--s2); border-radius: var(--r); border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: var(--step--1); }
.theme-opt input { position: absolute; opacity: 0; }
.theme-opt:has(input:checked) { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.theme-opt.locked { opacity: .55; cursor: not-allowed; }
.theme-opt span .small { display: block; font-weight: 400; }
.theme-swatch { display: block; height: 46px; border-radius: var(--r-sm); border: 1px solid var(--line); }
/* Header themes (applied to the cover placeholder and as an overlay). */
.theme-swatch.theme-nebula, .p-hero.theme-nebula .cover.placeholder { background: radial-gradient(circle 900px at 88% 1010px, color-mix(in srgb, var(--pc, #8b5cff) 26%, #070814) 0 898px, color-mix(in srgb, var(--pc, #8b5cff) 65%, #fff) 899.5px, transparent 902px), radial-gradient(circle 960px at 88% 1010px, transparent 0 900px, color-mix(in srgb, var(--pc, #8b5cff) 34%, transparent) 912px, transparent 960px), radial-gradient(circle at 18% 30%, rgba(255, 255, 255, .75) 0 1px, transparent 1.6px) 0 0 / 113px 89px, radial-gradient(circle at 62% 70%, rgba(255, 255, 255, .45) 0 .8px, transparent 1.3px) 17px 9px / 71px 53px, radial-gradient(circle at 40% 40%, rgba(255, 255, 255, .3) 0 .7px, transparent 1.2px) 31px 23px / 47px 41px, radial-gradient(60% 120% at 20% 0%, color-mix(in srgb, var(--pc, #8b5cff) 24%, transparent), transparent 70%), linear-gradient(180deg, #0c0e26, #070814); }
.theme-swatch.theme-aurora, .p-hero.theme-aurora .cover.placeholder { background: linear-gradient(160deg, rgba(62, 230, 240, .28), transparent 45%), linear-gradient(20deg, rgba(139, 92, 255, .35), transparent 55%), radial-gradient(60% 80% at 30% 100%, rgba(143, 209, 79, .18), transparent 70%), #0a0f16; }
.theme-swatch.theme-eclipse, .p-hero.theme-eclipse .cover.placeholder { background: radial-gradient(circle at 70% 55%, #06060a 0 22%, rgba(62, 230, 240, .5) 23%, rgba(139, 92, 255, .25) 30%, transparent 46%), #0b0912; }
.theme-swatch.theme-grid, .p-hero.theme-grid .cover.placeholder { background: linear-gradient(rgba(139, 92, 255, .18) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(139, 92, 255, .18) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(180deg, #0d0b18, #120d26); }
.theme-swatch.theme-supernova { background: radial-gradient(circle at 50% 120%, #ffd29a, #e04ab8 30%, #4f1a8e 60%, #0b0912); }
.theme-swatch.theme-pulsar { background: repeating-radial-gradient(circle at 50% 50%, rgba(62, 230, 240, .35) 0 2px, transparent 2px 14px), #0b0912; }
.featured-u { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.fu { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--s3) var(--s2); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: var(--fs-sm); text-align: center; }
.fu:hover { text-decoration: none; border-color: var(--pc); }
.highlights { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.highlights a { display: grid; gap: 2px; padding: var(--s2) var(--s3); border-radius: var(--r); background: var(--surface-2); color: var(--text); font-size: var(--step--1); }
.highlights a:hover { text-decoration: none; background: color-mix(in srgb, var(--violet) 10%, var(--surface-2)); }
.hl-count { display: inline-flex; align-items: center; gap: 4px; color: var(--cyan); font-weight: 700; font-size: var(--fs-xs); }
.block-hint { border-style: dashed; }
.preview-bar { margin-bottom: var(--s4); }

/* Universe content settings */
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--s2) var(--s4); }

/* Threads between Universes */
.also-in { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s3); }
.also-in .small { display: inline-flex; align-items: center; gap: 6px; }
.also-item { display: inline-flex; align-items: center; gap: 2px; }
.also-item .icon-btn.sm { width: 26px; height: 26px; }
.also-item .icon-btn.sm svg { width: 12px; height: 12px; }
.threads-in ul { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); }
.thread-link { display: grid; gap: 2px; padding: var(--s3); border-radius: var(--r); background: var(--surface-2); color: var(--text); border-left: 3px solid var(--cyan); }
.thread-link:hover { text-decoration: none; background: color-mix(in srgb, var(--cyan) 10%, var(--surface-2)); }
.thread-link strong { font-weight: 600; overflow-wrap: anywhere; }
.stack-sm > * + * { margin-top: var(--s3); }
.where-formats { flex-basis: 100%; order: 10; color: var(--cyan); }
.post-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s2); margin-top: var(--s4); }
.post-tools > .share-in { margin-top: 0; }
.post-tools > details[open] { flex-basis: 100%; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--graphite); }
.post-tools > details[open] > summary { color: var(--text); border-color: var(--line-strong); }
.post-tools + .share-out { margin-top: var(--s2); }

/* Seasons */
.season-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s5); align-items: end; padding: var(--s5); margin-bottom: var(--s5); border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--violet) 40%, var(--line)); background:
  radial-gradient(90% 160% at 0% 100%, color-mix(in srgb, var(--violet-deep) 45%, transparent), transparent 70%),
  var(--graphite); }
.season-band.reached { border-color: color-mix(in srgb, var(--cyan) 55%, var(--line)); }
.season-band.phase-ended:not(.reached) { border-color: var(--line); }
.sb-head { display: grid; gap: var(--s1); }
.sb-kicker { font: 600 var(--step--1) var(--font-display); color: var(--cyan); }
.season-band.phase-upcoming .sb-kicker, .season-band.phase-ended:not(.reached) .sb-kicker { color: var(--muted); }
.sb-head h3 { margin: 0; font: 700 var(--step-3) / 1.1 var(--font-display); letter-spacing: -.01em; }
.sb-head h3 a { color: inherit; }
.sb-dates { color: var(--muted); font-size: var(--step--1); }
.sb-goal p { margin: 0; }
.sb-goal > p:first-child { font-size: var(--step-0); color: var(--muted); }
.sb-goal > p:first-child strong { font: 700 var(--step-2) var(--font-display); color: var(--text); margin-right: 4px; }
.sb-goal .meter { margin: var(--s2) 0; }
@media (max-width: 720px) { .season-band { grid-template-columns: 1fr; gap: var(--s3); padding: var(--s4); } }
.season-history ol { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.season-history li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s3); align-items: center; padding: var(--s3) var(--s4); background: var(--surface); }
.season-history li .badge { grid-row: 1 / span 2; grid-column: 2; }
.season-history li.reached { box-shadow: inset 3px 0 0 var(--cyan); }
.btn svg, .chip svg, .badge svg { flex: none; }
.section-head > .row { flex: none; flex-wrap: wrap; justify-content: flex-end; }
.signal-case h2 { font-size: var(--step-1); margin: 0; }
.signal-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.signal-actions > form.row { flex: 1 1 26rem; }

/* Integration checker */
.checklist { list-style: none; margin: var(--s4) 0 var(--s3); padding: 0; display: grid; gap: var(--s3); }
.checklist li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: var(--s3); align-items: start; }
.ck-mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--faint); }
.ck-ok .ck-mark { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.ck-warn .ck-mark { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.ck-fail .ck-mark { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }

/* ---------------- Status page ---------------- */
.status-hero { display: flex; align-items: center; gap: var(--s5); padding: var(--s6) 0 var(--s5); }
.status-hero h1 { margin: 0; font-size: var(--step-4); line-height: 1.05; letter-spacing: -.02em; }
.status-hero p { margin: var(--s2) 0 0; }
.status-orb { --c: var(--ok); flex: none; width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--c) 85%, white), var(--c) 55%, color-mix(in srgb, var(--c) 40%, black)); box-shadow: 0 0 0 10px color-mix(in srgb, var(--c) 12%, transparent), 0 0 48px color-mix(in srgb, var(--c) 45%, transparent); }
.status-hero.st-degraded .status-orb { --c: var(--warn); }
.status-hero.st-down .status-orb { --c: var(--danger); }
@media (prefers-reduced-motion: no-preference) { .status-hero.st-ok .status-orb { animation: orb-breathe 4s var(--ease) infinite; } }
@keyframes orb-breathe { 50% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--c) 6%, transparent), 0 0 60px color-mix(in srgb, var(--c) 35%, transparent); } }
.status-notice { padding: var(--s4) var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--graphite); margin-bottom: var(--s5); }
.status-notice p { margin: var(--s1) 0; }
.status-notice.st-degraded { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.status-notice.st-down { border-color: color-mix(in srgb, var(--danger) 60%, var(--line)); }
.status-list { display: grid; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--line); gap: 1px; }
.status-row { padding: var(--s5); background: var(--surface); }
.sr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); }
.sr-head h3 { margin: 0; font-size: var(--step-1); }
.sr-head p { margin: 2px 0 0; }
.st-pill { flex: none; font: 600 var(--step--1) var(--font-display); padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.st-pill.st-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.st-pill.st-degraded { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.st-pill.st-down { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.st-days { list-style: none; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; margin: var(--s4) 0 var(--s2); padding: 0; height: 30px; }
.st-days li { border-radius: 3px; background: var(--surface-2); }
.st-days li.st-ok { background: color-mix(in srgb, var(--ok) 70%, var(--surface)); }
.st-days li.st-degraded { background: var(--warn); }
.st-days li.st-down { background: var(--danger); }
.st-foot { display: flex; justify-content: space-between; gap: var(--s3); }
@media (max-width: 600px) { .status-hero { gap: var(--s4); padding-left: 10px; } .status-orb { width: 40px; height: 40px; } .status-hero h1 { font-size: var(--step-3); } .st-days { gap: 2px; } .sr-head { flex-direction: column; gap: var(--s2); } }

/* Sponsored slot: clearly labelled, quieter than content */
.ad-slot { display: grid; gap: var(--s2); border-style: dashed; background: var(--graphite); }
.ad-label { font-size: var(--step--1); color: var(--warn); font-weight: 600; }
.ad-slot > a:first-of-type { display: grid; gap: 2px; color: var(--text); }
.ad-slot > a:first-of-type:hover { text-decoration: none; }
.ad-slot > a:first-of-type:hover strong { text-decoration: underline; }
.ad-slot span { color: var(--muted); font-size: var(--step--1); }
.ad-slot .ad-host { color: var(--faint); }

/* ---------------- Error pages ---------------- */
.err-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; padding: var(--s5) clamp(16px, 6vw, 80px); background: radial-gradient(60% 50% at 70% 20%, color-mix(in srgb, var(--violet-deep) 30%, transparent), transparent 70%), var(--void); }
.err-body { align-self: center; max-width: 34rem; padding-bottom: 10vh; }
.err-code { position: relative; display: inline-block; margin: 0 0 var(--s4); font: 700 clamp(5rem, 18vw, 10rem)/.9 var(--font-display); letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 2px var(--violet-strong); }
.err-orb { position: absolute; right: -0.55em; top: .05em; width: .32em; height: .32em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d9c8ff, var(--violet) 55%, var(--violet-deep)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cyan) 60%, transparent), 0 0 30px var(--violet-glow); }
@media (prefers-reduced-motion: no-preference) { .err-orb { animation: err-drift 9s ease-in-out infinite; } }
@keyframes err-drift { 50% { transform: translate(-.12em, .18em); } }
.err-body h1 { font-size: var(--step-4); margin: 0 0 var(--s3); line-height: 1.05; }
.err-actions { margin-top: var(--s5); flex-wrap: wrap; }

/* Saved collections */
.saved-item { display: grid; gap: var(--s2); }
.saved-move { display: flex; align-items: center; gap: var(--s2); justify-content: flex-end; padding: 0 var(--s2); }
.saved-move select { width: auto; min-width: 11rem; padding-block: 6px; }
.new-collection { display: inline-block; }
.new-collection > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.new-collection > summary::-webkit-details-marker { display: none; }
.new-collection[open] > summary { display: none; }
.new-collection form { gap: var(--s2); }
.new-collection input { width: 14rem; padding-block: 6px; }

/* Links inside running text are underlined, not told apart by colour alone. */
main p a:not([class]), main .prose a:not([class]), main .prose-page li a:not([class]), main td a:not([class]), .hint a, .flash a, #map-panel p a:not([class]) { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; }


/* =====================================================================
   Neón (v2): deep navy, gradient actions, glowing selection, brand wordmark
   ===================================================================== */
body { background:
  radial-gradient(900px 600px at 88% -8%, rgba(116, 70, 240, .16), transparent 70%),
  radial-gradient(700px 520px at -6% 108%, rgba(62, 230, 240, .07), transparent 70%),
  var(--void); background-attachment: fixed; }

.brand-word { font-family: var(--font-brand); font-weight: 800; letter-spacing: .05em; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn.primary { background: var(--grad-action); border-color: transparent; box-shadow: 0 6px 20px -10px rgba(116, 70, 240, .9), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn.primary:hover { background: var(--grad-action); filter: brightness(1.08); box-shadow: 0 8px 28px -8px rgba(90, 84, 240, .95), inset 0 1px 0 rgba(255, 255, 255, .18); }

.panel { background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0) 40%), var(--surface); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03); }


.tabs a[aria-current="page"] { border-color: transparent; background: linear-gradient(90deg, #8b5cff, #3ee6f0) bottom / 100% 2px no-repeat; }



/* Feature tiles: icon in a glowing rounded square (landing, welcome, ID centre). */
.icon-tile { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: var(--r); color: #d9ccff;
  background: linear-gradient(160deg, rgba(139, 92, 255, .22), rgba(61, 107, 224, .10)); box-shadow: inset 0 0 0 1px rgba(139, 92, 255, .45), 0 0 22px -8px rgba(139, 92, 255, .8); }
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile.cyan { color: #b8fbff; background: linear-gradient(160deg, rgba(62, 230, 240, .18), rgba(61, 107, 224, .08)); box-shadow: inset 0 0 0 1px rgba(62, 230, 240, .45), 0 0 22px -8px rgba(62, 230, 240, .7); }

/* Desktop search bar at the top of the main column */
.appbar { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); padding: 0 var(--s4); min-height: 46px; border-radius: var(--r-pill);
  background: rgba(16, 19, 42, .72); border: 1px solid var(--line); color: var(--faint); backdrop-filter: blur(8px); }
.appbar:focus-within { border-color: #7a6bff; box-shadow: 0 0 0 3px rgba(122, 107, 255, .22); color: var(--text); }
.appbar input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 10px 0 !important; color: var(--text); }
.appbar input::-webkit-search-cancel-button { filter: invert(.7); }
.appbar kbd { font: 600 12px var(--font-display); color: var(--faint); border: 1px solid var(--line-strong); border-radius: var(--r-xs); padding: 1px 7px; }
@media (max-width: 820px) { .appbar { display: none; } }
.pillars { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 30rem; }
.pillars li { display: grid; justify-items: start; gap: 2px; padding-right: var(--s4); }
.pillars li + li { padding-left: var(--s4); border-left: 1px solid var(--line); }
.pillars .icon-tile { margin-bottom: var(--s2); }
.pillars strong { font-family: var(--font-display); }
.pillars span:last-child { color: var(--muted); font-size: var(--step--1); line-height: 1.35; }
@media (max-width: 520px) { .pillars li + li { padding-left: var(--s3); } .pillars li { padding-right: var(--s2); } .pillars .icon-tile { width: 44px; height: 44px; } }

/* Achievements as hexagonal medals */
.badge-a .badge-ic { width: 42px; height: 46px; border-radius: 0; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); box-shadow: none; }
.badge-a:not(.locked) { background: linear-gradient(180deg, rgba(139, 92, 255, .10), rgba(255, 255, 255, 0)), var(--surface-2); border-color: rgba(139, 92, 255, .28); }
.badge-a:not(.locked) .badge-ic { filter: drop-shadow(0 0 10px rgba(139, 92, 255, .55)); }
.badge-a.locked .badge-ic { border: 0; background: linear-gradient(160deg, #222849, #171b38); color: var(--faint); }

/* Home aside: trends and people */
.trend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: t; }
.trend-list a { display: grid; grid-template-columns: 1.6rem 1fr; column-gap: var(--s2); padding: 6px var(--s2); border-radius: var(--r-sm); color: var(--text); }
.trend-list a::before { counter-increment: t; content: counter(t); grid-row: span 2; align-self: center; font: 700 var(--step--1) var(--font-display); color: var(--faint); }
.trend-list a:hover { background: var(--surface-2); text-decoration: none; }
.trend-tag { font-weight: 600; color: var(--cyan); }
.people-list { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: var(--s3); }
.people-list li { display: flex; align-items: center; gap: var(--s3); }
.pl-who { display: flex; align-items: center; gap: var(--s3); flex: 1; min-width: 0; color: var(--text); }
.pl-who:hover { text-decoration: none; }
.pl-who .grow { display: grid; min-width: 0; }
.pl-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-who .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trust-list { list-style: none; margin: var(--s4) 0; padding: var(--s3) var(--s4); display: grid; gap: var(--s2); border-radius: var(--r); background: var(--graphite); border: 1px solid var(--line); font-size: var(--step--1); color: var(--muted); }
.trust-list li { display: grid; grid-template-columns: 18px 1fr; gap: var(--s2); align-items: start; }
.trust-list li svg { margin-top: 2px; }
.trust-list li.ok svg { color: var(--ok); }
.trust-list li.warn svg { color: var(--warn); }
.id-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s4); }
.id-facts > div { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s3); align-items: center; }
.id-facts .icon-tile { grid-row: span 2; width: 44px; height: 44px; }
.id-facts strong { font-family: var(--font-display); }
.id-facts span:last-child { color: var(--muted); font-size: var(--step--1); }
@media (max-width: 640px) { .id-facts { grid-template-columns: 1fr; } }
.app-logo.sm { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; font: 700 15px var(--font-display); background: linear-gradient(160deg, rgba(139, 92, 255, .25), rgba(61, 107, 224, .12)); box-shadow: inset 0 0 0 1px rgba(139, 92, 255, .4); color: #e2d8ff; }
.also-mini { display: inline-flex; align-items: center; gap: 4px; font-size: var(--step--1); color: var(--cyan); }
.faq { display: grid; gap: var(--s2); margin-top: var(--s4); }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--graphite); padding: 0 var(--s4); }
.faq summary { cursor: pointer; padding: var(--s3) 0; font: 600 var(--step-0) var(--font-display); list-style-position: inside; }
.faq details[open] summary { color: var(--text); }
.faq p { color: var(--muted); }

/* =====================================================================
   Shell v3: header bar, three columns, footer (desktop first, then mobile)
   ===================================================================== */
.hdr { position: sticky; top: 0; z-index: 40; height: var(--hdr-h); display: grid; grid-template-columns: 250px minmax(0, 1fr) auto; align-items: center; gap: 28px;
  padding: 0 max(24px, calc((100vw - 1480px) / 2 + 24px)); background: rgba(5, 6, 15, .82); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); }
.hdr .brand { padding: 0; gap: 10px; }
.hdr .brand-mark, .side-card .brand-mark, .foot-brand .brand-mark { width: 34px; height: 34px; }
.hdr .brand-word { font-size: var(--fs-lg); }
.hdr-search { display: flex; align-items: center; gap: var(--s3); max-width: 560px; width: 100%; height: 42px; padding: 0 6px 0 var(--s4); border-radius: var(--r); background: rgba(16, 19, 42, .9); border: 1px solid var(--line); color: var(--faint); }
.hdr-search:focus-within { border-color: #7a6bff; box-shadow: 0 0 0 3px rgba(122, 107, 255, .22); color: var(--text); }
.hdr-search input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 8px 0 !important; color: var(--text); }
.hdr-search kbd { font: 600 11.5px var(--font-display); color: var(--faint); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 3px 8px; white-space: nowrap; }
.hdr-actions { display: flex; align-items: center; gap: var(--s2); justify-self: end; }
.hdr-actions .icon-btn { position: relative; width: 40px; height: 40px; color: var(--muted); }
.hdr-actions .icon-btn:hover { color: var(--text); }
.hdr-dot { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); display: grid; place-items: center; font: 700 10.5px/1 var(--font-display); color: #fff; background: var(--grad-action); box-shadow: 0 0 0 2px var(--void); }
.hdr-me > summary { list-style: none; cursor: pointer; border-radius: 50%; padding: 2px; margin-left: var(--s1); box-shadow: 0 0 0 1px var(--line-strong); }
.hdr-me > summary::-webkit-details-marker { display: none; }
.hdr-me[open] > summary, .hdr-me > summary:hover { box-shadow: 0 0 0 2px #8b5cff; }
.hdr-me .menu-pop { right: 0; left: auto; min-width: 230px; top: calc(100% + 8px); }
.menu-head { display: grid; padding: var(--s2) var(--s3) var(--s3); border-bottom: 1px solid var(--line); margin-bottom: var(--s1); }
.btn.ghost-line { background: rgba(255, 255, 255, .02); border-color: var(--line-strong); }

.shell { grid-template-columns: 250px minmax(0, 1fr) 310px; gap: 28px; max-width: 1480px; padding: 0 24px; }
.shell.wide { grid-template-columns: 250px minmax(0, 1fr); }
.side { position: sticky; top: var(--hdr-h); align-self: start; height: calc(100vh - var(--hdr-h)); overflow-y: auto; padding: var(--s5) var(--s1) var(--s5) 0; display: flex; flex-direction: column; gap: var(--s5); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.side .nav { display: grid; gap: 2px; }
.nav a { padding: 11px 14px; border-radius: var(--r); font-size: var(--fs-base); }
.nav a[aria-current="page"] { color: #fff; background: var(--sel-bg); box-shadow: var(--sel-ring); }
.nav a[aria-current="page"] svg { color: var(--violet-soft); }
.side-sec { border-top: 1px solid var(--line); padding-top: var(--s4); }
.side-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); padding: 0 var(--s2) var(--s2); }
.side-head h2 { margin: 0; font: 600 13.5px var(--font-display); color: var(--muted); letter-spacing: 0; }
.side-head a { font-size: var(--fs-sm); }
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-list a { display: grid; grid-template-columns: 40px minmax(0, 1fr) 14px; align-items: center; gap: var(--s3); padding: 7px var(--s2); border-radius: var(--r); color: var(--text); }
.side-list a:hover, .side-list a[aria-current="page"] { background: var(--surface); text-decoration: none; }
.side-list svg { color: var(--faint); }
.side-list .grow { display: grid; min-width: 0; }
.u-n { font-weight: 600; font-size: var(--fs-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-m { font-size: var(--fs-xs); color: var(--faint); }
.u-thumb { width: 40px; height: 40px; border-radius: var(--r-sm); overflow: hidden; display: grid; place-items: center; flex: none; font: 700 13px var(--font-display); color: #fff;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--pc, #8b5cff) 85%, white), var(--pc, #8b5cff) 55%, color-mix(in srgb, var(--pc, #8b5cff) 40%, #05060f)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.u-thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-card { position: relative; display: block; overflow: hidden; border-radius: var(--r-lg); border: 1px solid rgba(139, 92, 255, .35); min-height: 180px; color: var(--text); isolation: isolate; }
.side-card:hover { text-decoration: none; border-color: rgba(139, 92, 255, .6); }
.side-card .space-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.side-card-body { display: grid; gap: 6px; padding: var(--s4); background: linear-gradient(0deg, rgba(5, 6, 15, .85) 30%, transparent); min-height: 180px; align-content: end; }
.side-card-body strong { font: 700 var(--step-1) var(--font-display); }
.side-card-body > span { color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.side-card-body .link { color: var(--cyan); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.side-card-body .btn { margin-top: var(--s2); }
.main { padding: var(--s5) 0 var(--s7); }
.aside { top: var(--hdr-h); max-height: calc(100vh - var(--hdr-h)); padding: var(--s5) 0; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.panel { border-radius: var(--r-lg); padding: 20px; }
.site-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; max-width: 1480px; margin: 0 auto; padding: var(--s5) 24px var(--s6); border-top: 1px solid var(--line); }
.foot-brand { display: flex; align-items: center; gap: var(--s3); }
.foot-brand .brand-mark { width: 28px; height: 28px; }
.foot-brand .brand-word { font-size: var(--fs-md); }
.foot-tag { color: var(--faint); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; padding-left: var(--s3); border-left: 1px solid var(--line); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: var(--fs-sm); }
.site-foot nav a { color: var(--muted); }
.topbar { display: none !important; }

@media (max-width: 1280px) { .shell { grid-template-columns: 220px minmax(0, 1fr) 280px; gap: 22px; } .hdr { grid-template-columns: 220px minmax(0, 1fr) auto; gap: 22px; } }
@media (max-width: 1100px) { .shell { grid-template-columns: 220px minmax(0, 1fr); } .aside { display: none; } }
@media (max-width: 820px) {
  .hdr { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); padding: 0 var(--s4); --hdr-h: 58px; height: 58px; }
  .hdr .brand-word { display: none; }
  .hdr-search { height: 38px; } .hdr-search kbd { display: none; }
  .hdr-actions .hide-sm { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .hdr-actions .btn.sm { padding-inline: 12px; }
  .side { display: none; }
  .shell, .shell.wide { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 var(--s4); }
  .bottombar { grid-template-columns: repeat(5, 1fr); background: rgba(10, 12, 26, .96); }
  .site-foot { padding-bottom: 96px; justify-content: center; text-align: center; }
  .foot-tag { display: none; }
}

/* =====================================================================
   Home v3: hero band, Universe row, composer tools, feed tabs, side cards
   ===================================================================== */
.hero-band { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl); border: 1px solid rgba(139, 92, 255, .32); min-height: 300px; margin-bottom: var(--s5);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(220px, .85fr); align-items: center; padding: 36px 40px; box-shadow: 0 30px 60px -40px rgba(116, 70, 240, .7); }
.hero-band > .space-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 6, 15, .88) 0%, rgba(5, 6, 15, .55) 45%, transparent 75%); }
.hero-copy h1, .hero-copy h2 { font: 700 clamp(2rem, 3.2vw, 2.85rem)/1.06 var(--font-display); letter-spacing: -.025em; margin: 0 0 var(--s3); }
.hero-copy p { color: #c9cbe6; max-width: 44ch; font-size: var(--step-1); line-height: 1.55; margin: 0 0 var(--s5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero-actions .btn { padding: 11px 20px; }
.hero-actions .btn.ghost-line { background: rgba(10, 12, 26, .55); backdrop-filter: blur(6px); }
.hero-mark { justify-self: center; display: grid; justify-items: center; gap: 6px; text-align: center; transform: translateY(-6px); }
.hero-r { width: 112px !important; height: 112px !important; filter: drop-shadow(0 0 22px rgba(139, 92, 255, .75)) drop-shadow(0 0 60px rgba(62, 230, 240, .25)); }
.hero-word { font: 800 2rem/1 var(--font-brand); letter-spacing: .12em; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; margin-top: 4px; }
.hero-tag { font: 600 11px var(--font-display); letter-spacing: .32em; text-transform: uppercase; color: #c9cbe6; }
.hero-pillars { grid-column: 1 / -1; list-style: none; margin: var(--s6) 0 0; padding: var(--s4) 0 0; display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); border-top: 1px solid rgba(255, 255, 255, .1); }
.hero-pillars li { display: flex; align-items: center; gap: var(--s2); color: #c9cbe6; font-size: var(--fs-base); }
.hero-pillars svg { color: var(--cyan); }
.hero-pillars strong { color: var(--text); }
.hero-close { position: absolute; top: 12px; right: 12px; }
.hero-close .icon-btn { background: rgba(5, 6, 15, .55); color: var(--muted); }
.hero-close .icon-btn:hover { color: var(--text); }
.hero-band.is-member { min-height: 0; padding: 28px 34px; grid-template-columns: minmax(0, 1.4fr) minmax(200px, .6fr); }
.hero-band.is-member .hero-copy h2 { font-size: clamp(1.5rem, 2.1vw, 1.95rem); text-wrap: balance; }
.hero-band.is-member .hero-tag { letter-spacing: .22em; font-size: var(--fs-2xs); white-space: nowrap; }
.hero-band.is-member .hero-copy p { margin-bottom: var(--s4); }
.hero-band.is-member .hero-r { width: 88px !important; height: 88px !important; }
.hero-band.is-member .hero-word { font-size: var(--fs-xl); }

.sec-head { display: flex; align-items: baseline; gap: var(--s3); margin: 0 0 var(--s3); }
.sec-head h2 { font: 700 var(--step-2) var(--font-display); margin: 0; letter-spacing: -.01em; }
.sec-more { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-sm); font-weight: 600; color: var(--violet-strong); white-space: nowrap; }
.feed-head { margin-top: var(--s6); }

.u-row-wrap { margin-bottom: var(--s5); }
.u-row { list-style: none; margin: 0; padding: 2px 2px var(--s2); display: grid; grid-auto-flow: column; grid-auto-columns: 184px; justify-content: start; gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.u-tile { scroll-snap-align: start; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color var(--base); }
.u-tile:hover { border-color: color-mix(in srgb, var(--pc, var(--violet)) 60%, transparent); }
.u-tile-link { display: flex; flex-direction: column; color: var(--text); flex: 1; padding-bottom: var(--s2); }
.u-tile-link:hover { text-decoration: none; }
.u-tile-cover { display: block; height: 92px; background: var(--graphite); }
.u-tile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.u-tile-cover.placeholder, .u-card-cover.placeholder {
  background:
    radial-gradient(130% 170% at 108% 150%, color-mix(in srgb, var(--pc, #8b5cff) 32%, #070814) 0 40%, color-mix(in srgb, var(--pc, #8b5cff) 70%, #fff) 40.6%, transparent 41.6%),
    radial-gradient(130% 170% at 108% 150%, transparent 0 41%, color-mix(in srgb, var(--pc, #8b5cff) 38%, transparent) 43%, transparent 58%),
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, .7) 0 1px, transparent 1.6px) 0 0 / 46px 38px,
    radial-gradient(circle at 62% 70%, rgba(255, 255, 255, .45) 0 .8px, transparent 1.3px) 0 0 / 31px 27px,
    radial-gradient(80% 120% at 10% 0%, color-mix(in srgb, var(--pc, #8b5cff) 26%, transparent), transparent 70%),
    linear-gradient(180deg, #0c0e26, #070814); }
.u-tile .planet { margin: -20px 0 0 12px; }
.u-tile .planet > .core { box-shadow: 0 0 0 3px var(--surface); }
.u-tile-name { font: 700 15px/1.25 var(--font-display); padding: 6px 12px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-tile-meta { display: flex; align-items: center; gap: 5px; padding: 0 12px; font-size: var(--fs-sm); color: var(--muted); flex-wrap: wrap; }
.u-tile-why { padding: 4px 12px 0; font-size: var(--fs-xs); color: var(--faint); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.u-tile > form, .u-tile > .u-tile-join { margin: 0 12px 12px; }
.u-tile-join { width: 100%; justify-content: center; }
.u-tile .u-tile-join:hover { background: var(--grad-action); border-color: transparent; color: #fff; }

.composer-tools { display: flex; flex-wrap: wrap; gap: var(--s2); margin-right: auto; }
.tool-pill { display: inline-flex; align-items: center; gap: 7px; height: 36px; line-height: 1; padding: 0 14px 0 11px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--graphite); color: var(--muted); font: 600 13.5px var(--font-display); cursor: pointer; position: relative; }
.tool-pill:hover { color: var(--text); border-color: var(--line-strong); }
.tool-pill svg { color: var(--violet-strong); }
.tool-pill:nth-child(2) svg { color: var(--cyan); }
.tool-pill:nth-child(3) svg { color: #ffc65c; }
.tool-pill.on, .tool-pill[aria-expanded="true"] { color: var(--text); border-color: rgba(139, 92, 255, .6); background: rgba(139, 92, 255, .14); }
.tool-pill:focus-within { outline: 2px solid var(--violet); outline-offset: 2px; }
.composer-bar .composer-tools ~ .btn.primary { margin-left: 0; }

.feed-end { display: grid; justify-items: center; text-align: center; gap: var(--s3); margin-top: var(--s5); padding: var(--s6) var(--s5); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.feed-end .brand-mark { width: 40px; height: 40px; }
.feed-end p { color: var(--muted); max-width: 46ch; margin: 0; }
.feed-end strong { color: var(--text); }

.id-promo { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 20px; margin-top: var(--s4); border: 1px solid rgba(139, 92, 255, .4);
  background: radial-gradient(120% 90% at 100% 0%, rgba(139, 92, 255, .32), transparent 60%), radial-gradient(90% 70% at 0% 100%, rgba(62, 230, 240, .12), transparent 60%), var(--surface); }
.panel + .id-promo, .id-promo + .panel { margin-top: var(--s4); }
.id-promo:first-child { margin-top: 0; }
.id-promo-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.id-promo-head .brand-mark { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(139, 92, 255, .6)); }
.id-promo-head h3 { margin: 0; font: 700 var(--step-1) var(--font-display); }
.id-promo p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; margin: 0 0 var(--s3); }
.id-promo-stat { display: flex; align-items: center; gap: 6px; color: var(--text) !important; font-weight: 600; }
.id-promo-stat svg { color: var(--cyan); }
.id-promo-list { list-style: none; padding: 0; margin: 0 0 var(--s4); display: grid; gap: 6px; font-size: var(--fs-sm); }
.id-promo-list li { display: flex; align-items: center; gap: 8px; }
.id-promo-list svg { color: var(--ok); flex: none; }
.how-steps ol { list-style: none; counter-reset: hs; margin: 0 0 var(--s3); padding: 0; display: grid; gap: var(--s3); }
.how-steps li { counter-increment: hs; display: grid; grid-template-columns: 28px 1fr; column-gap: var(--s3); font-size: var(--fs-sm); }
.how-steps li::before { content: counter(hs); grid-row: span 2; width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; font: 700 13px var(--font-display); color: #fff; background: var(--grad-action); }
.how-steps li span { color: var(--muted); line-height: 1.45; }
.trend-list a { grid-template-columns: 1.6rem 1fr 14px; }
.trend-list a::after { content: ""; grid-row: 1 / span 2; grid-column: 3; align-self: center; width: 7px; height: 7px; border-top: 1.5px solid var(--faint); border-right: 1.5px solid var(--faint); transform: rotate(45deg); }

.panel .l-how { margin: var(--s6) 0; }
.panel .how { gap: var(--s5); }
.panel .how-copy h3 { font-size: var(--step-2); }

@media (max-width: 1100px) { .hero-band { grid-template-columns: 1fr; } .hero-mark { display: none; } }
@media (max-width: 820px) {
  .hero-band { padding: 26px 22px; min-height: 0; border-radius: var(--r-lg); }
  .hero-band::before { background: linear-gradient(180deg, rgba(5, 6, 15, .5), rgba(5, 6, 15, .85)); }
  .hero-pillars { gap: var(--s2) var(--s4); }
  .u-row { grid-auto-columns: 160px !important; }
  .panel .how { grid-template-columns: 1fr; }
  .panel .how.flip .how-copy { order: 0; }
}

.show-sm { display: none; }
@media (max-width: 1100px) { .hero-band.is-member { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .show-sm { display: inline; }
  .hdr-search input::placeholder { font-size: var(--fs-base); }
  .sec-head > .faint { display: none; }
  .hero-band.is-member .hero-copy p { font-size: var(--step-0); }
}
@media (max-width: 420px) { .hdr .hdr-search kbd, .hdr-search > svg { display: none; } .hdr-search { padding-left: 12px; } }

/* Pages without a right column: the main column takes the space, readable width for long text. */
.shell.no-aside { grid-template-columns: 250px minmax(0, 1fr); }
.shell.no-aside:not(.wide) > .main { max-width: 1040px; width: 100%; }
.panel .l-section { padding: var(--s5) 0; max-width: none; }
@media (max-width: 1280px) { .shell.no-aside { grid-template-columns: 220px minmax(0, 1fr); } }
@media (max-width: 820px) { .shell.no-aside { grid-template-columns: minmax(0, 1fr); } }

.u-hero:not(.p-hero) .cover.placeholder { background: radial-gradient(circle 900px at 88% 1010px, color-mix(in srgb, var(--pc, #8b5cff) 26%, #070814) 0 898px, color-mix(in srgb, var(--pc, #8b5cff) 65%, #fff) 899.5px, transparent 902px), radial-gradient(circle 960px at 88% 1010px, transparent 0 900px, color-mix(in srgb, var(--pc, #8b5cff) 34%, transparent) 912px, transparent 960px), radial-gradient(circle at 18% 30%, rgba(255, 255, 255, .75) 0 1px, transparent 1.6px) 0 0 / 113px 89px, radial-gradient(circle at 62% 70%, rgba(255, 255, 255, .45) 0 .8px, transparent 1.3px) 17px 9px / 71px 53px, radial-gradient(circle at 40% 40%, rgba(255, 255, 255, .3) 0 .7px, transparent 1.2px) 31px 23px / 47px 41px, radial-gradient(60% 120% at 20% 0%, color-mix(in srgb, var(--pc, #8b5cff) 24%, transparent), transparent 70%), linear-gradient(180deg, #0c0e26, #070814); }

/* Auth v3: the same sky and planet horizon as the home banner. */
.auth { position: relative; isolation: isolate; overflow: hidden; }
.auth-bg { position: absolute; inset: 0; z-index: -1; }
.auth-bg .space-art { width: 100%; height: 100%; }
.auth-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 6, 15, .75), rgba(5, 6, 15, .25) 55%, rgba(5, 6, 15, .55)); }
.auth-card .panel { background: rgba(16, 19, 42, .82); backdrop-filter: blur(14px); border-color: rgba(139, 92, 255, .35); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.auth-side .hero-r { width: 84px !important; height: 84px !important; }
.auth-slogan span { color: transparent !important; -webkit-text-stroke: 0 !important; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; }
.auth-tag { margin: calc(-1 * var(--s3)) 0 0; font: 600 11.5px var(--font-display); letter-spacing: .32em; text-transform: uppercase; color: #c9cbe6; }
.auth-points { color: #c9cbe6 !important; }
@media (max-width: 999px) { .auth-bg::after { background: rgba(5, 6, 15, .6); } }

/* =====================================================================
   Nexus (map v2), connections and Crónica
   ===================================================================== */
.nexus-head h1 { font: 800 var(--step-4)/1 var(--font-brand); letter-spacing: .06em; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.map-wrap { background: radial-gradient(70% 60% at 75% 20%, rgba(116, 70, 240, .16), transparent 70%), radial-gradient(60% 50% at 15% 90%, rgba(62, 230, 240, .07), transparent 70%),
  radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .5) 0 1px, transparent 1.5px) 0 0 / 97px 83px, radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .3) 0 .8px, transparent 1.3px) 0 0 / 61px 47px, #070814; }
.map-tools { position: absolute; left: var(--s3); top: var(--s3); right: 64px; z-index: 2; display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; pointer-events: none; }
.map-tools > * { pointer-events: auto; }
.map-find { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border-radius: var(--r); background: rgba(16, 19, 42, .9); border: 1px solid var(--line-strong); color: var(--faint); backdrop-filter: blur(8px); width: min(300px, 100%); }
.map-find:focus-within { border-color: #7a6bff; box-shadow: 0 0 0 3px rgba(122, 107, 255, .22); }
.map-find input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 6px 0 !important; color: var(--text); min-width: 0; flex: 1; }
.map-tools .icon-btn { background: rgba(16, 19, 42, .9); border: 1px solid var(--line-strong); width: 38px; height: 38px; }
.map-tools .icon-btn:disabled { opacity: .45; cursor: default; }
.map-favs { height: 38px; background: rgba(16, 19, 42, .9); }
.map-favs svg { color: #ffc65c; }
.map-msg { position: absolute; left: 50%; bottom: var(--s4); transform: translateX(-50%); z-index: 3; margin: 0; padding: 8px 14px; border-radius: var(--r-pill); background: rgba(16, 19, 42, .95); border: 1px solid var(--line-strong); font-size: var(--fs-sm); max-width: 90%; text-align: center; }
.map-wrap .edge.k-auto { stroke: rgba(139, 92, 255, .32); }
.map-wrap .edge.k-team { stroke: rgba(160, 140, 255, .6); stroke-dasharray: 5 4; }
.map-wrap .edge.k-verified { stroke: #3ee6f0; stroke-opacity: .85; }
.map-wrap .edge-glow { stroke: #3ee6f0; stroke-opacity: .35; stroke-width: 7; }
.map-wrap .edge.hot { stroke: #c9b6ff; stroke-opacity: 1; }
.map-wrap .edge.k-verified.hot { stroke: #7ff3f8; }
.map-wrap .node .live { fill: #3ee6f0; stroke: var(--void); stroke-width: 1.5; }
.map-wrap .node .star { fill: #ffc65c; stroke: var(--void); stroke-width: 1; display: none; }
.map-wrap .node.fav .star { display: block; }
.map-wrap.far .node.minor text { display: none; }
.map-wrap .node.minor:focus text, .map-wrap .node.minor.sel text { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .map-wrap .node .live { animation: live-pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes live-pulse { 50% { transform: scale(1.5); opacity: .55; } }
}
.lg-edge.verified { background: #3ee6f0; box-shadow: 0 0 8px rgba(62, 230, 240, .6); }
.lg-edge.team { background: repeating-linear-gradient(90deg, rgba(160, 140, 255, .8) 0 5px, transparent 5px 9px); }
.lg-live { width: 9px; height: 9px; border-radius: 50%; background: #3ee6f0; margin-left: 2px; }
.lg-fav svg { color: #ffc65c; }
.map-card-cover { height: 84px; margin: calc(-1 * var(--s5)) calc(-1 * var(--s5)) var(--s3); border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden;
  background: radial-gradient(circle 420px at 88% 470px, color-mix(in srgb, var(--pc, #8b5cff) 26%, #070814) 0 418px, color-mix(in srgb, var(--pc, #8b5cff) 65%, #fff) 419.5px, transparent 422px),
  radial-gradient(circle at 18% 30%, rgba(255, 255, 255, .7) 0 1px, transparent 1.6px) 0 0 / 53px 41px, linear-gradient(180deg, #0c0e26, #070814); }
.map-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-card-head { display: flex; align-items: center; gap: var(--s2); justify-content: space-between; }
.map-card-head h2 { margin: 0; }
.fav-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.fav-btn.on { color: #ffc65c; } .fav-btn.on svg { fill: currentColor; }
.map-card-live { display: grid; gap: 6px; margin: var(--s2) 0 var(--s3); }
.map-card-live p { margin: 0; color: var(--muted); }
.map-live-item { display: flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--text); padding: 6px 8px; border-radius: var(--r-sm); background: var(--surface-2); }
.map-live-item:hover { text-decoration: none; background: var(--line); }
.map-rel.verified { border-color: rgba(62, 230, 240, .45); }
.map-panel .row { flex-wrap: wrap; gap: var(--s2); }
.map-panel .row form { margin: 0; }
@media (max-width: 820px) { .map-tools { right: 56px; } .map-find { width: 100%; } }

.conn-list { list-style: none; padding: 0; margin: 0 0 var(--s4); display: grid; gap: var(--s2); }
.conn-list li { display: flex; align-items: center; gap: var(--s2); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--graphite); flex-wrap: wrap; }
.conn-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s3); align-items: end; }
.conn-form .field:nth-of-type(3) { grid-column: 1 / -1; }
.conn-form .btn { justify-self: start; }
@media (max-width: 700px) { .conn-form { grid-template-columns: 1fr; } }

.flag.fiction { color: #e9a8ff; border: 1px dashed rgba(224, 74, 184, .6); border-radius: var(--r-pill); padding: 0 7px; font-size: var(--fs-2xs); line-height: 17px; }
.chron { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; }
.chron::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, #8b5cff, rgba(62, 230, 240, .5) 60%, transparent); border-radius: 2px; }
.chron-month h2 { font: 600 var(--step-0) var(--font-display); color: var(--muted); margin: var(--s5) 0 var(--s3) -2px; text-transform: none; }
.chron-month:first-child h2 { margin-top: 0; }
.chron-item { position: relative; margin-bottom: var(--s3); }
.chron-dot { position: absolute; left: -30px; top: 14px; width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; color: #fff; background: var(--surface-2); border: 1px solid var(--line-strong); }
.k-connection .chron-dot { background: rgba(62, 230, 240, .16); border-color: rgba(62, 230, 240, .5); color: var(--cyan); }
.k-season .chron-dot, .k-milestone .chron-dot { background: rgba(255, 198, 92, .14); border-color: rgba(255, 198, 92, .5); color: #ffc65c; }
.k-mystery .chron-dot, .k-reveal .chron-dot { background: rgba(224, 74, 184, .16); border-color: rgba(224, 74, 184, .55); color: #f08bdc; }
.k-founding .chron-dot, .k-note .chron-dot { background: rgba(139, 92, 255, .18); border-color: rgba(139, 92, 255, .55); color: #c9b6ff; }
.chron-card { margin-left: 10px; padding: 14px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.chron-card h3 { margin: 4px 0 4px; font-size: var(--step-1); }
.chron-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0; font-size: var(--fs-sm); color: var(--faint); }
.chron-kind { font-weight: 600; color: var(--muted); }
.chron-body { color: var(--muted); margin: 0 0 var(--s2); font-size: var(--fs-base); }
.chron-u { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s2) 0 0; }
.chron-u .chip { padding: 3px 10px; font-size: var(--fs-xs); }
.dot-pc { width: 8px; height: 8px; border-radius: 50%; background: var(--pc, #8b5cff); }
.chron-admin { display: flex; gap: var(--s2); margin-top: var(--s3); }
.chron-admin input { flex: 1; padding: 6px 10px; font-size: var(--fs-sm); }

/* =====================================================================
   The Unknown: same sky, magenta accent, the only place with a scanline texture
   ===================================================================== */
.unk-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl); border: 1px solid rgba(224, 74, 184, .35); padding: 40px; min-height: 260px; display: flex; align-items: flex-end; }
.unk-hero > .space-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; filter: hue-rotate(38deg) saturate(1.1); }
.unk-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px), linear-gradient(90deg, rgba(5, 6, 15, .9), rgba(5, 6, 15, .45) 60%, rgba(5, 6, 15, .2)); }
.unk-hero h1 { font: 800 clamp(2.2rem, 4vw, 3.4rem)/1 var(--font-brand); letter-spacing: .08em; margin: 6px 0 var(--s3); background: linear-gradient(90deg, #f6d6ff, #e04ab8 55%, #8b5cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.unk-hero p { color: #d6cfe8; max-width: 58ch; margin: 0; font-size: var(--step-1); line-height: 1.55; }
.unk-kicker { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--font-display) !important; color: #f08bdc !important; }
.fiction-note { display: flex; gap: var(--s3); align-items: flex-start; margin-top: var(--s4); padding: 12px 16px; border-radius: var(--r); border: 1px dashed rgba(224, 74, 184, .5); background: rgba(224, 74, 184, .06); color: var(--muted); font-size: var(--fs-sm); }
.fiction-note svg { color: #f08bdc; flex: none; margin-top: 2px; }
.fiction-note p { margin: 0; }
.fiction-note strong { color: #f6d6ff; }
.unk-card { display: grid; gap: 8px; padding: 18px 20px; margin-bottom: var(--s3); border-radius: var(--r-lg); border: 1px solid var(--line); color: var(--text);
  background: radial-gradient(90% 120% at 100% 0%, rgba(224, 74, 184, .12), transparent 60%), var(--surface); transition: border-color var(--base); }
.unk-card:hover { text-decoration: none; border-color: rgba(224, 74, 184, .55); }
.unk-card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.unk-card-title { font: 700 var(--step-2) var(--font-display); }
.unk-card-sum { color: var(--muted); }
.unk-meter { width: 100%; height: 6px; display: block; }
.unk-meter .track { fill: var(--line); } .unk-meter .fill { fill: #e04ab8; }
.unk-head h1 { font-size: var(--step-4); margin: 8px 0 6px; }
.unk-head .lead { color: var(--muted); max-width: 60ch; }
.unk-goal { max-width: 520px; margin-top: var(--s3); display: grid; gap: 6px; }
.unk-goal p { margin: 0; }
.unk-solved { border-color: rgba(224, 74, 184, .5); background: radial-gradient(80% 120% at 100% 0%, rgba(224, 74, 184, .16), transparent 60%), var(--surface); }
.unk-solved h2 { display: flex; align-items: center; gap: 8px; color: #f6d6ff; }
.unk-changes { display: grid; gap: 6px; padding-left: 1.1em; }
.unk-clues { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.unk-clue { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s3); }
.unk-step { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; font: 700 15px var(--font-display); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--faint); }
.unk-clue.current .unk-step { background: linear-gradient(135deg, #e04ab8, #8b5cff); color: #fff; border-color: transparent; box-shadow: 0 0 18px rgba(224, 74, 184, .45); }
.unk-clue.solved .unk-step { background: rgba(75, 227, 162, .14); border-color: rgba(75, 227, 162, .5); color: var(--ok); }
.unk-clue-body { padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.unk-clue.current .unk-clue-body { border-color: rgba(224, 74, 184, .5); }
.unk-clue.locked .unk-clue-body { background: transparent; border-style: dashed; }
.unk-clue-body h3 { margin: 0 0 8px; font-size: var(--step-1); }
.unk-q { margin: var(--s3) 0; color: #f6d6ff; }
.unk-answer { display: flex; gap: var(--s2); flex-wrap: wrap; }
.unk-answer input { flex: 1 1 220px; }
.unk-hint { padding: 8px 12px; border-radius: var(--r-sm); background: rgba(255, 198, 92, .08); border: 1px solid rgba(255, 198, 92, .35); font-size: var(--fs-base); display: flex; gap: 6px; align-items: center; }
.unk-hint svg { color: #ffc65c; }
.ok-text { color: var(--ok); }
.unk-done { margin-top: var(--s3); padding: 12px 16px; border-radius: var(--r); background: rgba(224, 74, 184, .08); border: 1px solid rgba(224, 74, 184, .4); display: flex; gap: 8px; align-items: center; }
.unk-done svg { color: #f08bdc; flex: none; }
.unk-hyp-form { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.unk-hyp-form label:first-child { font-weight: 600; }
.unk-hyp { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: var(--s3); }
.unk-hyp header { gap: 8px; align-items: center; margin-bottom: 8px; }
.unk-hyp-body { margin: 0 0 8px; white-space: pre-line; }
.unk-hyp footer { gap: var(--s3); align-items: center; }
.unk-hyp footer form { margin: 0; }
.unk-spoiler { margin-bottom: 8px; }
.unk-spoiler summary { cursor: pointer; color: #f08bdc; font-size: var(--fs-base); }
.unk-spoiler p { filter: none; margin: 8px 0 0; }
.unk-clue-edit { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 0 0 var(--s3); }
.unk-clue-edit legend { padding: 0 6px; font-weight: 600; }
.unk-editor fieldset[disabled] { opacity: .6; }
@media (max-width: 820px) { .unk-hero { padding: 26px 22px; } }
.back-link, .ico-line { display: inline-flex; align-items: center; gap: 4px; }
.unk-text { white-space: pre-line; line-height: 1.6; }
.map-wrap .edge.k-story { stroke: #e04ab8; stroke-opacity: .85; stroke-dasharray: 2 5; stroke-linecap: round; stroke-width: 2.4; }
.lg-edge.story { background: repeating-linear-gradient(90deg, #e04ab8 0 3px, transparent 3px 7px); }
.unk-aside { display: grid; gap: 6px; margin-top: var(--s4); padding: 18px 20px; border-radius: var(--r-lg); color: var(--text); border: 1px solid rgba(224, 74, 184, .45);
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 4px), radial-gradient(100% 90% at 100% 0%, rgba(224, 74, 184, .2), transparent 60%), var(--surface); }
.unk-aside:hover { text-decoration: none; border-color: rgba(224, 74, 184, .75); }
.unk-aside strong { font: 700 var(--step-1) var(--font-display); }
.k-project .chron-dot { background: rgba(75, 227, 162, .14); border-color: rgba(75, 227, 162, .5); color: var(--ok); }

/* Projects */
.badge.ok { color: var(--ok); border-color: rgba(75, 227, 162, .45); background: rgba(75, 227, 162, .08); }
.proj-card { display: grid; gap: 6px; padding: 16px 18px; margin-bottom: var(--s3); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.proj-card:hover { text-decoration: none; border-color: rgba(75, 227, 162, .5); }
.proj-card strong { font: 700 var(--step-1) var(--font-display); }
.proj-meter { width: 100%; height: 6px; display: block; }
.proj-meter .track { fill: var(--line); } .proj-meter .fill { fill: #4be3a2; }
.proj-head h1 { margin: 8px 0 6px; }
.proj-head .lead { color: var(--muted); max-width: 62ch; }
.proj-result { border-color: rgba(75, 227, 162, .5); }
.proj-result h2 { display: flex; gap: 8px; align-items: center; color: var(--ok); }
.proj-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.proj-col { background: var(--graphite); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.proj-col h3 { font-size: var(--fs-base); margin: 0 0 10px; display: flex; justify-content: space-between; }
.proj-col.col-doing { border-color: rgba(62, 230, 240, .35); } .proj-col.col-done { border-color: rgba(75, 227, 162, .35); }
.proj-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.proj-task { display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.col-done .proj-task-t { text-decoration: line-through; text-decoration-color: rgba(75, 227, 162, .6); color: var(--muted); }
.proj-task-acts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.proj-task-acts form { margin: 0; }
.proj-task-acts .btn.sm { padding: 3px 9px; font-size: var(--fs-xs); }
.proj-empty { padding: 6px; }
@media (max-width: 900px) { .proj-board { grid-template-columns: 1fr; } }
/* Profile Órbita */
.orbit-svg { width: 100%; height: auto; display: block; margin: -6px 0 4px; }
.orbit-svg .o-ring { fill: none; stroke: rgba(139, 92, 255, .35); stroke-dasharray: 2 5; }
.orbit-svg .o-ring.inner { stroke: rgba(75, 227, 162, .3); }
.orbit-svg .o-core { fill: #241760; stroke: #8b5cff; stroke-width: 1.5; }
.orbit-svg .o-me { fill: #fff; font: 700 14px var(--font-display); }
.orbit-svg .o-planet { stroke: var(--void); stroke-width: 2; }
.orbit-svg a:hover .o-planet, .orbit-svg a:focus .o-planet { stroke: var(--cyan); }
.orbit-svg .o-project { fill: #4be3a2; }
.orbit-projects { list-style: none; padding: 0; margin: var(--s2) 0 0; display: grid; gap: 6px; font-size: var(--fs-base); }
.orbit-projects a { display: inline-flex; gap: 4px; align-items: center; }
/* Universe templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s3); }
.tpl { position: relative; display: block; margin: 0; }
.tpl input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tpl-card { display: grid; gap: 6px; height: 100%; padding: 14px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--graphite); }
.tpl input:checked + .tpl-card { border-color: #8b5cff; background: rgba(139, 92, 255, .1); box-shadow: 0 0 0 1px #8b5cff inset; }
.tpl input:focus-visible + .tpl-card { outline: 2px solid var(--violet); outline-offset: 2px; }
.tpl-card .icon-tile { width: 36px; height: 36px; }
.trend { width: 100%; height: 140px; display: block; margin: var(--s2) 0; }
.trend .t-p { fill: #8b5cff; } .trend .t-c { fill: rgba(62, 230, 240, .55); } .trend .t-m { fill: #4be3a2; }
.lg:is(.a, .s, .u, .t-p, .t-c, .t-m) { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.lg.t-p { background: #8b5cff; } .lg.t-c { background: rgba(62, 230, 240, .55); } .lg.t-m { background: #4be3a2; border-radius: 50%; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s4); margin-top: var(--s4); }
.plan { display: grid; align-content: start; gap: var(--s3); padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.plan h2 { margin: 0; font-size: var(--step-2); }
.plan-price { margin: 0; font: 700 var(--step-3) var(--font-display); }
.plan.plus { border-color: rgba(139, 92, 255, .55); background: radial-gradient(100% 80% at 100% 0%, rgba(139, 92, 255, .18), transparent 60%), var(--surface); }
.plan.creators { border-color: rgba(62, 230, 240, .45); background: radial-gradient(100% 80% at 100% 0%, rgba(62, 230, 240, .12), transparent 60%), var(--surface); }
.info-note { display: flex; gap: var(--s3); align-items: flex-start; padding: 12px 16px; border-radius: var(--r); border: 1px solid rgba(62, 230, 240, .35); background: rgba(62, 230, 240, .06); color: var(--muted); font-size: var(--fs-base); }
.info-note svg { color: var(--cyan); flex: none; margin-top: 2px; }
.info-note p { margin: 0; }
.digest-ai { padding: 12px 14px; border-radius: var(--r); background: rgba(139, 92, 255, .08); border: 1px solid rgba(139, 92, 255, .3); }
.digest-top { display: grid; gap: 4px; padding-left: 1.2em; }

/* Afterlife */
.afl-card { position: relative; margin-bottom: var(--s5); padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid rgba(62, 230, 240, .4);
  background: radial-gradient(90% 120% at 100% 0%, rgba(62, 230, 240, .12), transparent 60%), radial-gradient(70% 90% at 0% 100%, rgba(139, 92, 255, .14), transparent 60%), var(--surface); }
.afl-head { display: flex; gap: var(--s3); align-items: flex-start; margin-bottom: var(--s3); }
.afl-head h2 { margin: 0; font-size: var(--step-2); }
.afl-head p { margin: 2px 0 0; }
.afl-ic { width: 38px; height: 38px; border-radius: var(--r); display: grid; place-items: center; color: var(--cyan); background: rgba(62, 230, 240, .12); border: 1px solid rgba(62, 230, 240, .4); flex: none; }
.afl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.afl-list a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text); }
.afl-list a:hover { background: var(--surface-2); text-decoration: none; }
.afl-list svg { color: var(--cyan); flex: none; }
.afl-trail-t { margin: 2px 0 0; }
.afl-page-head h1 { font: 800 var(--step-4)/1 var(--font-brand); letter-spacing: .06em; background: linear-gradient(90deg, #3ee6f0, #8b5cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.map-wrap .node .new-ring { fill: none; stroke: #3ee6f0; stroke-width: 1.5; stroke-dasharray: 3 4; }
.map-wrap .edge.is-new { stroke-width: 3.2; }
.map-new svg { color: var(--cyan); }
.lg-new { width: 14px; height: 14px; border-radius: 50%; border: 1.5px dashed #3ee6f0; }
.map-since { display: flex; gap: 6px; align-items: flex-start; color: var(--muted); }
.map-since svg { color: var(--cyan); flex: none; margin-top: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .map-wrap .node .new-ring { animation: new-spin 12s linear infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes new-spin { to { transform: rotate(360deg); } }
}
.info-note.ok-note { border-color: rgba(75, 227, 162, .45); background: rgba(75, 227, 162, .07); }
.info-note.ok-note svg { color: var(--ok); }
.info-note + .info-note { margin-top: var(--s3); }
.ai-assist { display: grid; gap: 6px; margin: 0 0 var(--s4); padding: 12px 14px; border-radius: var(--r); border: 1px dashed rgba(139, 92, 255, .5); background: rgba(139, 92, 255, .05); }
.ai-assist .btn { justify-self: start; }
.ai-summary { margin: 0 0 var(--s4); }
.ai-summary-box { margin-top: var(--s2); padding: 12px 14px; border-radius: var(--r); background: rgba(139, 92, 255, .08); border: 1px solid rgba(139, 92, 255, .3); }
.ai-summary-box p { margin: 0 0 6px; }

/* Error pages v3: the brand sky, the code in Orbitron */
.err-page { position: relative; isolation: isolate; overflow: hidden; }
.err-page .auth-bg::after { background: linear-gradient(90deg, rgba(5, 6, 15, .85), rgba(5, 6, 15, .35) 60%, rgba(5, 6, 15, .2)); }
.err-page .err-code { font: 800 clamp(5rem, 14vw, 9rem)/1 var(--font-brand) !important; letter-spacing: .06em; color: transparent !important; -webkit-text-stroke: 0 !important;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 30px rgba(139, 92, 255, .45)); }
.err-page .err-orb { display: none; }


/* Admin: modules */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s3); }
.mod { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.mod.on { border-color: rgba(75, 227, 162, .35); }
.mod.off { opacity: .8; border-style: dashed; }
.mod h2 { font-size: var(--step-1); margin: 0 0 4px; }
.mod form { margin: 0; }
.switch { width: 46px; height: 26px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface-2); position: relative; cursor: pointer; flex: none; padding: 0; }
.switch span { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--faint); transition: transform var(--base) var(--ease), background var(--base); }
.switch.is-on { background: rgba(75, 227, 162, .25); border-color: rgba(75, 227, 162, .6); }
.switch.is-on span { transform: translateX(20px); background: var(--ok); }
.chart .line-u { fill: none; stroke: #ffc65c; stroke-width: 2; }
.legend .lg.u { background: #ffc65c; }
.stat-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s4); }
.stat-groups .panel { margin: 0; }

/* Admin records */
.rec-head { display: flex; gap: var(--s4); align-items: center; margin: var(--s3) 0 var(--s4); flex-wrap: wrap; }
.rec-head h1 { margin: 0 0 4px; font-size: var(--step-3); }
.rec-actions { display: grid; gap: var(--s2); }
.rec-actions form { margin: 0; }
.audit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.w-sm { width: 90px !important; flex: none; }
.data-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2); }
.data-t { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.data-t:hover { text-decoration: none; border-color: var(--line-strong); }
.data-table td, .data-table th { white-space: nowrap; font-size: var(--fs-sm); }
.data-wrap { max-width: 100%; overflow-x: auto; }
.admin-nav { display: grid; align-items: start; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s2) var(--s4); margin: var(--s3) 0 var(--s5); padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--graphite); }
.admin-nav-g { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; align-content: flex-start; }
.admin-nav-l { width: 100%; font: 600 12px var(--font-display); color: var(--faint); }
.admin-nav a { padding: 4px 10px; border-radius: var(--r-pill); font-size: var(--fs-sm); color: var(--muted); border: 1px solid transparent; }
.admin-nav a:hover { color: var(--text); text-decoration: none; border-color: var(--line-strong); }
.admin-nav a[aria-current="page"] { color: #fff; background: var(--sel-bg-strong); }

/* Investigaciones: amber, the colour of a lamp over a case file. */
.inv-card { display: grid; gap: 6px; padding: 16px 18px; margin-bottom: var(--s3); border-radius: var(--r-lg); border: 1px solid var(--line); border-left: 3px solid rgba(255, 198, 92, .55); background: var(--surface); color: var(--text); }
.inv-card:hover { text-decoration: none; border-color: rgba(255, 198, 92, .6); }
.inv-card.st-resolved { border-left-color: rgba(75, 227, 162, .6); }
.inv-card.st-closed { border-left-color: var(--line-strong); opacity: .8; }
.inv-card strong { font: 700 var(--step-1) var(--font-display); }
.inv-head h1 { margin: 8px 0 6px; }
.inv-question { white-space: pre-line; max-width: 66ch; font-size: var(--step-1); line-height: 1.55; color: var(--text); }
.inv-track { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 0; padding: 0; margin: var(--s4) 0; font-size: var(--fs-sm); color: var(--faint); }
.inv-track li { display: flex; align-items: center; gap: 8px; padding-right: 10px; }
.inv-track li + li::before { content: ""; width: 22px; height: 2px; background: var(--line-strong); margin-right: 2px; }
.inv-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.inv-track li.done { color: var(--muted); } .inv-track li.done .inv-dot { background: var(--warn); border-color: var(--warn); }
.inv-track li.done + li::before { background: rgba(255, 198, 92, .6); }
.inv-track li.now { color: var(--text); font-weight: 600; } .inv-track li.now .inv-dot { border-color: var(--warn); box-shadow: 0 0 0 4px rgba(255, 198, 92, .18); }
.inv-result { border-color: rgba(75, 227, 162, .5); } .inv-result h2 { display: flex; gap: 8px; align-items: center; color: var(--ok); }
.inv-proposed { border-color: rgba(139, 92, 255, .5); }
.inv-evidence { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.inv-ev { padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 6px; }
.inv-ev p { margin: 0; }
.inv-ev-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.inv-ev-st { margin-left: auto; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.inv-ev.ev-accepted { border-color: rgba(255, 198, 92, .5); } .ev-accepted .inv-ev-st { color: var(--warn); }
.inv-ev.ev-rejected, .inv-ev.ev-hidden { opacity: .62; }
.inv-invites ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.inv-invites li { gap: var(--s2); }
.inv-invites form { margin: 0; }
.inv-ev-top .pl-who { flex: none; max-width: 100%; }

/* Nexus: route between two Universes and the topics layer. */
.map-wrap .edge.route { stroke: #ffc65c; stroke-opacity: 1; stroke-width: 3.4; }
.lg-route { width: 22px; height: 3px; border-radius: 2px; background: #ffc65c; }
.map-route-form { display: grid; gap: var(--s2); margin-bottom: var(--s3); }
.map-route-form .field { margin: 0; }
.map-route-steps { margin: 0 0 var(--s3); padding-left: 1.2em; display: grid; gap: 6px; }
.map-route-steps li::marker { color: #ffc65c; font-weight: 700; }
.map-route-why { display: block; padding: 2px 0 2px 10px; border-left: 2px solid rgba(255, 198, 92, .45); margin: 4px 0 2px; }
.map-wrap .topic-label { fill: rgba(232, 228, 255, .5); font: 700 15px var(--font-display); letter-spacing: .02em; pointer-events: none; paint-order: stroke; stroke: rgba(5, 6, 15, .85); stroke-width: 4px; }
.map-wrap.topics-on .node text { opacity: .75; }
.map-wrap .edge.dim + .edge-glow { stroke-opacity: .04; }

.needs-help ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.needs-help a { display: grid; gap: 2px; color: var(--text); padding-left: 10px; border-left: 2px solid rgba(255, 198, 92, .5); }
.needs-help a:hover { text-decoration: none; border-left-color: var(--warn); }
.needs-help .nh-q { font-size: var(--fs-base); line-height: 1.4; }

.proj-log { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; border-left: 2px solid var(--line); }
.proj-log li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0 8px 14px; position: relative; }
.proj-log li::before { content: ""; position: absolute; left: -7px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line-strong); }
.proj-log li.pl-decision::before { background: #4be3a2; border-color: #4be3a2; }
.proj-log li.pl-task_done::before { border-color: rgba(75, 227, 162, .6); }
.proj-log .grow { display: grid; gap: 2px; }
.proj-log-kind { flex: none; width: 92px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); padding-top: 2px; }
.pl-decision .proj-log-kind { color: var(--ok); }
.pl-decision .proj-log-text { font-weight: 600; }
.proj-log-note { color: var(--muted); font-size: var(--fs-base); white-space: pre-line; }
.proj-log li.withdrawn .proj-log-text { text-decoration: line-through; color: var(--faint); }
.proj-log form { margin: 0; }
@media (max-width: 560px) { .proj-log li { flex-wrap: wrap; } .proj-log-kind { width: auto; } }
.proj-decide > summary { list-style: none; display: inline-flex; } .proj-decide > summary::-webkit-details-marker { display: none; }

/* Administration: its own navigation in the sidebar on wide screens; the compact block stays on phones. */
.admin-side { display: flex; flex-direction: column; align-items: stretch; gap: var(--s3); margin: 0; padding: 0; border: 0; background: none; }
.admin-side .admin-back { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--muted); padding: 0 10px; border: 0; }
.admin-side .admin-title { font: 700 var(--step-1) var(--font-display); padding: 0 12px; color: var(--text); }
.admin-side .admin-nav-g { display: grid; gap: 1px; }
.admin-side .admin-nav-l { padding: 0 12px 4px; font-size: var(--fs-xs); letter-spacing: .02em; }
.admin-side a { display: block; border-radius: var(--r-sm); padding: 7px 12px; font-size: var(--fs-base); border: 0; }
.admin-side a:hover { background: var(--surface); }
.admin-side a[aria-current="page"] { background: var(--sel-bg); color: #fff; box-shadow: var(--sel-ring); }
@media (min-width: 821px) { .admin-nav.top { display: none; } }
.p-head2 .p-avatar .avatar.lg { box-shadow: 0 0 0 2px rgba(139, 92, 255, .55), 0 12px 32px -12px rgba(139, 92, 255, .8); }
.conv > .grow, .conv-top > :first-child { min-width: 0; }
.conv-top > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
@media (max-width: 820px) { .messenger { grid-template-columns: minmax(0, 1fr); } .pane-head { padding: var(--s3) var(--s4); } }

/* Post page: path back, context column and a calmer share row. */
.crumbs { margin: 0 0 var(--s3); }
.post-ctx { display: grid; gap: var(--s3); }
.post-ctx-head { display: flex; align-items: center; gap: var(--s3); color: var(--text); }
.post-ctx-head:hover { text-decoration: none; }
.post-ctx-head .grow { display: grid; }
.post-ctx-head .u-name { font: 700 var(--step-1) var(--font-display); }
.post-ctx h3 { margin: 0; font-size: var(--fs-base); color: var(--muted); }
.post-ctx .rules { margin: 0; }
.post-more { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-more a { display: grid; gap: 2px; color: var(--text); }
.post-more a:hover { text-decoration: none; color: #fff; }
.post-more .pm-t { font-size: var(--fs-base); line-height: 1.45; }
.share-out { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.share-out-l { font-size: var(--fs-sm); font-weight: 600; color: var(--faint); margin: 0 6px 0 0; }
.comments-empty { padding: var(--s2) 0; }
.post-ctx-head .why { font-size: var(--fs-sm); color: var(--muted); }
.u-title .h1-like { margin: 0; font: 700 var(--step-3)/1.15 var(--font-display); color: var(--text); letter-spacing: -.01em; }
.event-head h1.event-title { font-size: var(--step-3); margin: var(--s1, 4px) 0 var(--s3); }
@media (max-width: 820px) { .u-title .h1-like { font-size: var(--step-2); } }

/* Admin tables: one "Acciones" disclosure per row instead of a wall of inline forms. */
.row-actions { position: relative; display: inline-block; }
.row-actions > summary { list-style: none; } .row-actions > summary::-webkit-details-marker { display: none; }
.row-actions-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 280px; display: grid; gap: 10px; padding: 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7); white-space: normal; }
.row-actions-pop form { display: grid; gap: 8px; margin: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.row-actions-pop .field { margin: 0; }
.admin-users td { vertical-align: middle; }
@media (min-width: 1100px) { .table-wrap:has(.admin-users) { overflow: visible; } }
@media (max-width: 1099px) { .row-actions-pop { position: static; width: auto; min-width: 240px; margin-top: 8px; box-shadow: none; } }
.admin-nav-m > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin: var(--s3) 0; border-radius: var(--r); border: 1px solid var(--line); background: var(--graphite); cursor: pointer; font-size: var(--fs-base); color: var(--muted); }
.admin-nav-m > summary::-webkit-details-marker { display: none; }
.admin-nav-m > summary strong { color: var(--text); }
.admin-nav-m[open] > summary { border-color: var(--violet); }
.admin-nav-m .admin-nav { margin-top: 0; }
@media (min-width: 821px) { .admin-nav-m { display: none; } }

/* Administración › Puesta en marcha */
.launch-head { display: flex; gap: var(--s4); align-items: center; }
.launch-count { font: 600 var(--step-1) var(--font-display); margin: 0 0 8px; }
.launch-count strong { font-size: var(--step-3); color: #fff; }
.ok-text { color: var(--ok); }
.launch-phase { margin-top: var(--s6); }
.launch-phase h2 { font-size: var(--step-2); margin: 0 0 var(--s3); }
.launch-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.launch-step { display: flex; gap: var(--s3); padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.launch-step.st-done { border-color: rgba(75, 227, 162, .35); }
.launch-mark { flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; color: #05060f; }
.st-done .launch-mark { background: var(--ok); border-color: var(--ok); }
.launch-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.launch-top h3 { margin: 0; font-size: var(--step-1); }
.st-done .launch-top h3 { color: var(--muted); }
.launch-step p { margin: 6px 0 0; }
.launch-how { margin-top: 8px; }
.launch-how ol { margin: 8px 0 0; padding-left: 1.3em; display: grid; gap: 6px; color: var(--text); }
.launch-acts { margin-top: 10px; gap: 8px; }
.launch-acts form { margin: 0; }
.launch-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin: 0 0 var(--s5); border-radius: var(--r); color: var(--text);
  border: 1px solid rgba(139, 92, 255, .5); background: linear-gradient(90deg, rgba(139, 92, 255, .18), rgba(62, 230, 240, .06)); }
.launch-banner:hover { text-decoration: none; border-color: var(--violet); }
.launch-acts:not(:has(*)) { display: none; }
@media (max-width: 820px) { .bottombar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; } }
.chart-axis { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; font-size: var(--fs-xs); color: var(--faint); margin-top: 4px; }
.table-wrap { position: relative; }
@media (max-width: 820px) {
  .map-tools { flex-wrap: nowrap; right: 52px; gap: 6px; }
  .map-find { flex: 1 1 auto; width: auto; min-width: 0; }
  .map-tools .chip { padding: 0 10px; height: 38px; flex: none; }
  .map-tools .chip .chip-l { display: none; }
  .map-new span { display: none; }
}
/* Route form: the suggestion list must not look like a native select. */
.map-route-form input::-webkit-calendar-picker-indicator { display: none !important; }
.sec-title { font-size: var(--step-2); margin: var(--s4) 0 var(--s3); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
@media (max-width: 600px) {
  .u-head .u-actions { grid-row: 3; grid-column: 1 / -1; justify-content: flex-start; padding-top: var(--s2); }
  .u-head { align-items: end; }
}
.map-tools .icon-btn { flex: none; }
.js [data-map-apply] { display: none; }
.choice { display: flex; } .choice > span { flex: 1; height: 100%; }
/* The right column scrolls with the page (no hidden inner scroll cutting cards). */
@media (min-width: 1101px) { .aside { position: static; max-height: none; overflow: visible; } }
.side { scrollbar-color: var(--line-strong) transparent; }
.where-line:not(:has(*)) { display: none; }
@media (max-width: 420px) { .post-head .handle { display: none; } }
/* People's names read as names (white), links reveal themselves on hover. */
.unk-hyp header a, .list.panel li a:has(> strong), .comment-head a:has(> strong), .people-list .pl-name { color: var(--text); }
/* One select style everywhere: our chevron instead of the browser's. */
select:not([multiple]) { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a9a3d6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; }
select:not([multiple]) option { background: var(--surface); color: var(--text); }
.u-actions .menu > summary.icon-btn { width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); }
/* Stat grids never leave an orphan row: they fill the width with as many columns as fit. */
.kpis { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; }
/* "Acciones" looks like a button. */
.row-actions > summary.btn { border: 1px solid var(--line-strong); }
.plan { display: flex; flex-direction: column; }
.plan-cta { margin-top: auto; display: grid; gap: 8px; padding-top: var(--s3); }
.plan-cta form { margin: 0; }
.btn.is-current { cursor: default; opacity: .7; }
.hdr-create > summary { list-style: none; } .hdr-create > summary::-webkit-details-marker { display: none; }
.hdr-create .menu-pop { min-width: 300px; }
.hdr-create .menu-pop a { align-items: flex-start; }
.hdr-create .menu-pop a > span { display: grid; gap: 1px; }
#resumen, #denuncias, #solicitudes, #invitar, #equipo, #ajustes, #normas, #conexiones { scroll-margin-top: calc(var(--hdr-h) + 70px); }
.avatar.notif-sys { background: linear-gradient(135deg, rgba(139, 92, 255, .35), rgba(62, 230, 240, .2)); color: #e6e1ff; border: 1px solid rgba(139, 92, 255, .45); }
.auth-below > * { display: inline-block; margin: var(--s3) auto 0; padding: 6px 14px; border-radius: var(--r-pill); background: rgba(5, 6, 15, .72); backdrop-filter: blur(6px); }
.auth-below { text-align: center; }
.auth-below:not(:has(*)) { display: none; }
.map-list > ul { list-style: none; padding: 0; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.map-list > ul > li { padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 4px; }
.map-list > ul > li > ul { list-style: none; padding: 0; font-size: var(--fs-sm); }
.map-list > summary { display: inline-flex; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); }
@media (max-width: 480px) { .composer-tools .tool-pill > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .composer-tools .tool-pill { padding: 8px 10px; } }

/* Scroll hints (classes set by app.js) */
.sx.sx-r:not(.sx-l) { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.sx.sx-l:not(.sx-r) { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%); mask-image: linear-gradient(90deg, transparent, #000 15%); }
.sx.sx-l.sx-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.table-wrap.sx { -webkit-mask-image: none !important; mask-image: none !important; box-shadow: inset -14px 0 12px -12px color-mix(in srgb, var(--violet) 60%, transparent); }
.table-wrap.sx-l:not(.sx-r) { box-shadow: inset 14px 0 12px -12px color-mix(in srgb, var(--violet) 60%, transparent); }
.table-wrap.sx-l.sx-r { box-shadow: inset 14px 0 12px -12px color-mix(in srgb, var(--violet) 60%, transparent), inset -14px 0 12px -12px color-mix(in srgb, var(--violet) 60%, transparent); }

/* Team recommendations */
.link-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.link-chips li { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: var(--step--1); }
.link-chips form { display: contents; }
.chip-x { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.chip-x:hover { color: var(--text); background: var(--graphite); }
.chip-x:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.tabs:not(.rail-x), .u-row, .data-wrap { position: relative; }

/* Long words (URLs, codes, "aaaaaaaa…") never widen the page */
body { overflow-wrap: break-word; }
h1, h2, h3, h4, .panel, .card, .event-card, .inv-ev, .inv-card, .proj-col li, .proj-col, .unk-card-top strong, .section-head > *, .crumbs, .u-hero h1, .mission-card, .post-head .name, .who-line, .notif, .list li { min-width: 0; }
.event-card > *, .proj-board > *, .layout > *, .grid > *, .row > .grow, .flex > * { min-width: 0; }
.grow, .proj-log li > *, .proj-log-text, .conn-list li > * { min-width: 0; }
.report-target { margin-bottom: var(--s4); padding: var(--s3) var(--s4); border-left: 3px solid var(--line-strong); background: var(--graphite); border-radius: 0 var(--r) var(--r) 0; }
.report-target blockquote { margin: 4px 0 0; color: var(--text); overflow-wrap: anywhere; white-space: pre-line; }
/* Toasts sit above the mobile bottom bar */
@media (max-width: 820px) { body:has(.bottombar) .toasts { bottom: calc(72px + env(safe-area-inset-bottom)); } }
/* Mobile conversation: full height between the top and bottom bars, no footer underneath */
@media (max-width: 820px) {
  body:has(.messenger.has-thread) .site-foot { display: none; }
  .messenger.has-thread { height: calc(100dvh - 64px - 64px - env(safe-area-inset-bottom)); min-height: 360px; }
}
.req { color: var(--warn, #ffb648); font-weight: 700; }
.audit-meta { overflow-wrap: anywhere; }

.section-head { flex-wrap: wrap; }
.section-head > :first-child { flex: 1 1 16rem; }
:where(.inv-card, .inv-ev, .unk-card, .panel, .card, .post, .event-card, .mission-card, .proj-card, .list li, main, .content) > * { min-width: 0; }
/* E-mail reminder when confirming is optional */
.verify-soft { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s5); padding: var(--s3) var(--s4); border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--warn, #ffb648) 45%, transparent); background: color-mix(in srgb, var(--warn, #ffb648) 8%, var(--surface)); }
.verify-soft p { margin: 0; flex: 1 1 18rem; font-size: var(--step--1); }
.verify-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--warn, #ffb648) 18%, transparent); color: var(--warn, #ffb648); flex: none; }
.verify-acts { display: flex; gap: var(--s2); flex-wrap: wrap; }
.media-grid video { object-fit: contain; background: #000; }

/* «Un producto de OrionDataGroup» */
.foot-base { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding-top: var(--s4); margin-top: var(--s2); border-top: 1px solid var(--line); }
.foot-copy { color: var(--faint); font-size: var(--fs-xs); }
.maker { display: inline-flex; align-items: center; gap: 10px; color: var(--faint); font-size: var(--fs-xs); text-decoration: none; opacity: .8; transition: opacity var(--base); }
.maker img { display: block; height: 16px; width: auto; }
.maker:hover, .maker:focus-visible { opacity: 1; text-decoration: none; color: var(--muted); }
.maker-auth { display: flex; width: fit-content; margin: var(--s4) auto 0; padding: 6px 14px; border-radius: var(--r-pill); background: rgba(5, 6, 15, .72); backdrop-filter: blur(6px); opacity: 1; }
@media (max-width: 820px) { .foot-base { justify-content: center; flex-direction: column; gap: var(--s2); } }
.act.static { cursor: default; opacity: .75; }

/* Side column: compact admin list, a visible scrollbar and a fade when more items are below */
.admin-side .admin-nav-g a { padding-top: 6px; padding-bottom: 6px; }
.admin-side .admin-nav-l { padding-top: 6px; }
.side { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 55%, transparent) transparent; }
.side.sx-b { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 48px), transparent); }
.show-sm { display: none; }
@media (max-width: 820px) {
  .show-sm { display: inline-flex; }
  .verify-soft { padding: 10px 12px; gap: var(--s2); flex-wrap: nowrap; margin-bottom: var(--s4); }
  .verify-soft .verify-ic, .verify-soft .verify-more { display: none; }
  .verify-soft p { flex: 1 1 auto; overflow-wrap: anywhere; }
  .verify-acts { flex-wrap: nowrap; gap: 4px; }
}
.num-s { width: 5.5em; flex: none; }
/* Comfortable tap targets on phones (≥ 40 px) without moving the layout */
@media (max-width: 820px) {
  .site-foot nav { gap: 0 4px; }
  .site-foot nav a { display: inline-block; padding: 10px 8px; }
  .pw-toggle { min-height: 40px; min-width: 64px; }
  .post-head .time, .who-line .time { padding: 12px 4px; margin: -12px -4px; }
  .thread-hint { display: none; }
}
.btn.is-disabled { opacity: .55; cursor: not-allowed; }
/* Confirmation dialog (replaces the browser's confirm) */
.confirm-dlg { border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--text); padding: var(--s5); width: min(92vw, 420px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.confirm-dlg::backdrop { background: rgba(4, 5, 12, .7); backdrop-filter: blur(3px); }
.confirm-msg { margin: 0 0 var(--s5); font-size: var(--step-0); line-height: 1.5; }
.confirm-acts { display: flex; justify-content: flex-end; gap: var(--s2); flex-wrap: wrap; }
.btn.danger.primary, .confirm-dlg .btn.primary.danger { background: var(--danger-ink); border-color: transparent; color: #fff; box-shadow: none; }
.btn.danger.primary:hover { background: #c22f49; filter: none; }
.share-to .menu-pop { min-width: 180px; }
/* Language switcher */
.lang-switch { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--faint); }
.lang-switch a, .lang-switch span { padding: 6px 4px; }
.lang-switch a { color: var(--muted); }
.lang-switch [aria-current] { color: var(--text); font-weight: 600; }
.auth-lang { display: flex; justify-content: center; margin-top: var(--s3); }
.auth-lang .lang-switch { padding: 4px 12px; border-radius: var(--r-pill); background: rgba(5, 6, 15, .72); }
.count-pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: var(--r-pill); background: var(--warn, #ffb648); color: #1a1205; font-size: var(--fs-xs); font-weight: 700; }
/* «Qué es RSFXR»: one visual language from top to bottom */
.about { display: flex; flex-direction: column; gap: var(--s7); }
.about-head h1 { font-size: var(--fs-2xl); letter-spacing: -.02em; margin-bottom: var(--s3); }
.about-lead { color: var(--muted); font-size: var(--step-1); line-height: 1.55; max-width: 60ch; margin: 0; }
.about-more h2, .about-maker h2 { font-size: var(--step-3); letter-spacing: -.02em; margin-bottom: var(--s4); }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; } }
.about-card { padding: var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.about-card h3 { font-size: var(--step-1); margin: var(--s3) 0 var(--s2); }
.about-card p { color: var(--muted); line-height: 1.6; margin: 0; }
.about-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r); background: color-mix(in srgb, var(--violet) 18%, transparent); color: var(--violet-strong, #b9a2ff); }
.about-maker { padding: var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--violet) 10%, var(--surface)), var(--surface)); }
.about-maker p { color: var(--muted); max-width: 60ch; }

/* ---------- #tags: field with chips, suggestions, and the tags shown on Universes ---------- */
.tag-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; padding: 6px 8px; background: var(--surface-2);
  border: 1px solid var(--line-strong); border-radius: var(--r); cursor: text; transition: border-color var(--fast), box-shadow var(--fast); }
.tag-box:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-glow); }
.tag-box:has(input[aria-invalid=true]) { border-color: var(--danger); }
.tag-box-list { display: contents; list-style: none; margin: 0; padding: 0; }
.tag-box-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 11px; border-radius: var(--r-pill);
  background: rgba(139, 92, 255, .16); border: 1px solid rgba(139, 92, 255, .42); color: var(--text); font-weight: 600; font-size: var(--step--1); line-height: 1.2; }
.tag-box-x { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: var(--fs-md); line-height: 1; cursor: pointer; }
.tag-box-x:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.tag-box-x:focus-visible { outline: 2px solid var(--cyan); outline-offset: 0; }
.tag-box .tag-box-input { flex: 1 1 8rem; min-width: 8rem; width: auto; border: 0; background: none; padding: 6px 4px; box-shadow: none; border-radius: 0; }
.tag-box .tag-box-input:focus { box-shadow: none; }
.tag-box .tag-box-input:disabled { cursor: default; }
.tag-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: var(--s2); }
.tag-suggest-label { color: var(--faint); font-size: var(--step--1); margin-right: 2px; }
.tag-suggest-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--r-pill); border: 1px dashed var(--line-strong);
  background: transparent; color: var(--muted); font: inherit; font-size: var(--step--1); font-weight: 600; cursor: pointer; }
.tag-suggest-item:hover, .tag-suggest-item:focus-visible { color: var(--text); border-color: var(--violet); border-style: solid; outline: none; }
.tag-suggest-item .n { color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tag-chip { display: inline-flex; padding: 4px 11px; border-radius: var(--r-pill); background: rgba(62, 230, 240, .08); border: 1px solid rgba(62, 230, 240, .26);
  color: #9ef3f8; font-weight: 600; font-size: var(--step--1); line-height: 1.3; }
.tag-chip:hover { text-decoration: none; background: rgba(62, 230, 240, .16); color: #fff; }
.tag-box .tag-box-input:focus-visible { outline: none; }

/* =====================================================================
   v4 system pass: one tab style, one chip size, one badge, calmer selection,
   readable line lengths, consistent cards and spacing. Later rules here are
   the reference for these components.
   ===================================================================== */
:root { --pad-card: 20px; --space-section: 32px; --space-block: 16px; }

/* Type: one title size per level */
h1 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: var(--fs-lg); font-weight: 700; }
h3 { font-size: var(--fs-md); font-weight: 600; }
.brand-title { font: 800 var(--fs-2xl)/1.05 var(--font-brand) !important; letter-spacing: .05em; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nexus-head h1, .afl-page-head h1 { font: 800 var(--fs-2xl)/1.05 var(--font-brand); letter-spacing: .05em; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.unk-hero h1 { font-size: var(--fs-2xl); }
.unk-card-title { font-size: var(--fs-md); font-weight: 600; }
.u-title h1, .u-title .h1-like { font-size: var(--fs-xl); }
.sec-head h2, .section-head h2 { font-size: var(--fs-lg); }
.text-balance, .auth-card h1, .welcome-head h1, .page-head h1 { text-wrap: balance; }
.tnum { font-variant-numeric: tabular-nums; }

/* Labels and group titles */
label, .label { font: 600 var(--fs-sm)/1.35 var(--font-body); }
legend { font: 600 var(--fs-base)/1.3 var(--font-display); color: var(--text); padding: 0; margin-bottom: var(--s3); }
:where(.panel, form) fieldset:not(.unk-clue-edit) { border: 0; border-radius: 0; padding: 0; margin: 0 0 var(--s5); min-width: 0; }
:where(.panel, form) fieldset:not(.unk-clue-edit) + fieldset:not(.unk-clue-edit) { margin-top: var(--s6); }
:where(.panel, form) fieldset fieldset legend { font: 600 var(--fs-sm)/1.35 var(--font-body); margin-bottom: var(--s2); }
.sub-label { display: block; font: 600 var(--fs-xs)/1.3 var(--font-body); color: var(--muted); margin: 0 0 var(--s2); }
.field-error, .field .err, .tag-field .err { display: block; color: var(--danger); font-size: var(--fs-sm); font-weight: 500; margin-top: 6px; }
.field.narrow input, .field.narrow select, .narrow-inputs .field > input:not([type=checkbox]):not([type=radio]):not([type=file]), .narrow-inputs .field > select { max-width: 560px; }

/* Cards: one inner edge */
.panel { padding: var(--pad-card); }
.post { padding: 18px var(--pad-card) 10px; }
.chron-card { padding: 16px var(--pad-card); }
.unk-card, .proj-card, .inv-card { padding: 18px var(--pad-card); }
.plan { padding: 24px; }
.about-card { padding: var(--pad-card); }
@media (max-width: 820px) { .post { padding: 16px 16px 8px; } .panel { padding: 16px; } }

/* Right column: an even gap between its cards */
@media (min-width: 1101px) {
  .aside { display: flex; flex-direction: column; gap: var(--space-block); }
  .aside > * { margin-top: 0 !important; margin-bottom: 0 !important; }
}

/* Tabs: underline for sections of a page (feed, Universe, profile, settings, manage) */
.tabs { gap: 2px; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 12px 14px; font-size: var(--fs-base); }
.tabs a svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.tabs a[aria-current="page"] { color: var(--text); }
.tabs a[aria-current="page"] svg { color: var(--violet-soft); }
.tabs a .count-pill { margin-left: 2px; }
.feed-tabs { margin-bottom: var(--space-block); }
.u-hero .u-tabs { margin-top: var(--s5); flex-wrap: nowrap; overflow-x: auto; }
@media (min-width: 821px) { .u-hero .u-tabs a { padding-inline: 8px; } .u-hero .u-tabs a:first-child { padding-left: 4px; } }
.u-hero .u-tabs a[aria-current="page"] { background: linear-gradient(90deg, var(--pc, var(--violet)), color-mix(in srgb, var(--pc, var(--violet)) 40%, var(--cyan))) bottom / 100% 2px no-repeat; }
.manage-nav { position: sticky; top: var(--hdr-h); z-index: 6; margin: 0 0 var(--s5); background: rgba(5, 6, 15, .9); backdrop-filter: blur(12px); }
@media (max-width: 820px) { .tabs a { padding: 12px 12px; } }

/* Chips: filters and toggles. 32 px, 40 px for the large set */
.chip { min-height: 32px; padding: 0 14px; line-height: 1.2; }
.chip-toggle span { min-height: 32px; align-items: center; padding: 0 14px; font-size: var(--fs-sm); }
.chips-lg .chip-toggle span, .chip.lg { min-height: 40px; padding: 0 16px; font-size: var(--fs-base); }
.chip-toggle input:checked + span::before { content: ""; width: 14px; height: 14px; margin-right: 6px; flex: none;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat; }
.chip-toggle span { display: inline-flex; }

/* Badges: one size; dashed only for things that are not real (demo, fiction) */
.badge, .flag.demo, .flag.fiction, .st-pill, .count-pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font: 600 var(--fs-2xs)/1 var(--font-body); letter-spacing: .01em; white-space: nowrap; }
.count-pill { min-width: 20px; justify-content: center; padding: 0 6px; }
.flag.demo { border-width: 1px; }

/* Buttons */
.btn.primary { position: relative; }
.btn.lg { min-height: 44px; padding: 0 22px; }
.btn.ghost-line:hover { border-color: var(--violet); }
.u-tile .u-tile-join:hover { background: var(--surface-2); border-color: var(--violet); color: var(--text); }
.how-steps li::before { background: var(--sel-bg-strong); color: var(--violet-soft); box-shadow: var(--sel-ring); }
.hdr-dot { background: var(--violet-ink); }

/* Menus */
.menu-pop { min-width: 248px; padding: 6px; border-radius: var(--r); }
.menu-pop a, .menu-pop button { white-space: nowrap; min-height: 38px; }
.menu-pop .menu-sep, .menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px -6px; }
.menu-pop .danger svg { color: var(--danger); }

/* Disclosures: our chevron instead of the browser's triangle */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.faq summary, .disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); cursor: pointer; list-style: none; }
.faq summary::after, .disclosure > summary::after { content: ""; width: 8px; height: 8px; flex: none; margin-right: 4px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg) translateY(-2px); transition: transform var(--base) var(--ease); }
.faq details[open] > summary::after, .disclosure[open] > summary::after { transform: rotate(-135deg) translate(-2px, 0); }
.disclosure > summary { color: var(--violet-strong); font-weight: 600; font-size: var(--fs-sm); padding: var(--s2) 0; justify-content: flex-start; }

/* Empty states */
.empty { padding: var(--s7) var(--s5); }
.empty.sm { border: 0; padding: var(--s5) var(--s3); }
.empty.sm .orbit-empty { width: 56px; margin-bottom: var(--s3); }
.empty.sm .empty-title { font-size: var(--fs-base); }

/* Readable measure */
.prose-page { max-width: 68ch; }
.prose-page p, .prose-page li { line-height: 1.65; }
.narrow-page { max-width: 680px; }

/* Header */
.hdr-search-spacer { display: block; }
.hdr-actions { gap: 6px; }

/* Side column: the promo card only when it fits */
@media (max-height: 960px) { .side .side-card { display: none; } }

/* Footer for members: one quiet line */
.site-foot.compact { gap: var(--s2) var(--s4); padding: var(--s4) 24px var(--s5); font-size: var(--fs-xs); }
.site-foot.compact nav { gap: 4px 16px; font-size: var(--fs-xs); flex: 1; }
.site-foot.compact nav a { color: var(--faint); }
.site-foot.compact nav a:hover { color: var(--muted); }
.site-foot.compact .lang-switch { font-size: var(--fs-xs); }
body:has(.messenger) .site-foot { display: none; }

/* Mobile bottom bar: bigger targets, «Crear» as a round action */
@media (max-width: 820px) {
  .bottombar { min-height: 60px; padding-bottom: env(safe-area-inset-bottom); align-items: center; }
  .bottombar a { font-size: var(--fs-2xs); gap: 3px; padding: 8px 0 7px; }
  .bottombar svg { width: 24px; height: 24px; }
  .bottombar .bb-plus { display: grid; place-items: center; width: 40px; height: 32px; border-radius: var(--r-pill); background: var(--grad-action); color: #fff; box-shadow: 0 6px 16px -8px rgba(116, 70, 240, .9); }
  .bottombar .bb-plus svg { width: 20px; height: 20px; color: #fff !important; }
  .bottombar .bb-create { gap: 2px; padding-top: 4px; }
  /* Comfortable tap targets */
  .icon-btn { width: 44px; height: 44px; }
  .hdr-actions .icon-btn { width: 44px; height: 44px; }
  .act { height: 40px; min-width: 40px; justify-content: center; }
  .rail-x .chip, .chips .chip { min-height: 40px; }
  .sec-more { padding-block: 12px; margin-block: -12px; }
  .in-universe { padding-block: 6px; margin-block: -6px; }
  .tool-pill { height: 40px; }
  .where-select { min-height: 40px; }
  .tag-box-x { width: 32px; height: 32px; }
}

/* Panels opened by address (#compartir, #vincular, #insertar, reply/edit forms): hidden until targeted */
.tool-sheet:not(:target) { display: none; }
.tool-sheet { margin: var(--space-block) 0; scroll-margin-top: calc(var(--hdr-h) + 24px); animation: sheet-fade 160ms var(--ease); }
.tool-sheet.panel { border-color: var(--sel-border); }
.tool-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.tool-sheet-head h2 { margin: 0; font-size: var(--fs-md); }
.tool-sheet pre { margin: 0 0 var(--s3); white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-xs); }
@keyframes sheet-fade { from { opacity: 0; transform: translateY(-4px); } }

/* Comments: avatar column, actions in one row, replies hang from the parent's avatar */
.comments { margin-top: var(--space-section); }
.comments-h { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--space-block); }
.comment-new { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: start; margin-bottom: var(--s5); }
.comment-new .avatar { margin-top: 5px; }
.comment-new textarea, .comment-form textarea { min-height: 44px; resize: none; line-height: 1.45; padding: 10px 14px; }
.comment-new .btn { height: 44px; min-height: 44px; }
.comment-list { display: grid; gap: var(--s4); }
.comment { padding: 0; border: 0; margin: 0; }
.comment .comment { margin-top: 0; }
.comment-main { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--s3); }
.comment-av .avatar { width: 32px; height: 32px; font-size: var(--fs-xs); }
.comment-gone-av { background: var(--surface-2) !important; }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: var(--fs-sm); line-height: 1.3; }
.comment-head a { color: var(--text); }
.comment-body { margin: 3px 0 2px; line-height: 1.55; }
.comment-acts { display: flex; align-items: center; gap: 2px; margin-left: -10px; }
.comment-acts form { display: contents; }
.comment-acts .act { height: 32px; font-size: var(--fs-xs); }
.comment-acts .act svg { width: 16px; height: 16px; }
.comment-menu { margin-left: 2px; }
.comment-menu > summary { list-style: none; }
.comment-replies { margin: var(--s3) 0 0 15px; padding-left: 21px; border-left: 2px solid var(--line); display: grid; gap: var(--s4); }
.comment-form-sheet { margin: var(--s2) 0 0; }
.comment-form { display: grid; gap: var(--s2); }
.comment-form-acts { display: flex; justify-content: flex-end; gap: var(--s2); }
.comment.gone .comment-body { color: var(--faint); font-style: italic; }
@media (max-width: 820px) { .comment-acts .act { height: 40px; } .comment-new { grid-template-columns: minmax(0, 1fr) auto; } .comment-new .avatar { display: none; } }

/* Share menu opens from the left (it sits among the first actions) */
.share-menu > .menu-pop { left: -8px; right: auto; }
.post-actions .menu > summary { list-style: none; }

/* Post: one link language — hashtags cyan, mentions violet, plain links in text colour */
/* Links inside text keep a fine underline (colour alone is not enough to tell them apart) */
.post-body a.tag, .post-body a.mention { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.post-body a.tag:hover, .post-body a.mention:hover { text-decoration-color: currentColor; }
.post-body a:not(.tag):not(.mention) { color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 45%, transparent); text-underline-offset: 3px; }
/* Active actions: each in its own colour with the same tinted pill */
.act.like.on { background: rgba(255, 107, 157, .12); }
.act.save.on { color: var(--violet-strong); background: rgba(139, 92, 255, .12); }
/* Images: square tiles with a fine gap; single images keep their shape on the card colour */
.media-grid { gap: 2px; }
.media-grid.n2 > *, .media-grid.n3 > *, .media-grid.n4 > * { aspect-ratio: 1; }
.media-grid.n3 > :first-child { aspect-ratio: auto; }
.media-grid.n1 img { background: var(--graphite); max-height: 640px; }
.media-grid.n1 > * { max-height: 640px; }
.who-line { flex-wrap: nowrap; min-width: 0; }
.who-line .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.who-line .handle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.who-line .time, .who-line .flag { flex: none; white-space: nowrap; }

/* Dialog: a title, the consequence, a clear action; a bottom sheet on phones */
.confirm-title { margin: 0 0 var(--s2); font: 600 var(--fs-md)/1.35 var(--font-display); }
.confirm-msg { color: var(--muted); }
.confirm-title + .confirm-msg[hidden] + .confirm-acts { margin-top: var(--s5); }
@media (max-width: 600px) {
  .confirm-dlg { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: var(--s5) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom)); }
  .confirm-acts { flex-direction: column-reverse; }
  .confirm-acts .btn { width: 100%; min-height: 46px; }
}
/* Menus become bottom sheets on phones (except the account and create menus in the header) */
@media (max-width: 600px) {
  .menu:not(.hdr-me):not(.hdr-create) > .menu-pop { position: fixed; left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); min-width: 0; z-index: 72; border-radius: var(--r-lg); padding: 8px; animation: sheet-up 180ms var(--ease); }
  .menu:not(.hdr-me):not(.hdr-create)[open]::before { content: ""; position: fixed; inset: 0; z-index: 71; background: rgba(4, 5, 12, .6); }
  .menu:not(.hdr-me):not(.hdr-create) > .menu-pop a, .menu:not(.hdr-me):not(.hdr-create) > .menu-pop button { min-height: 48px; font-size: var(--fs-base); }
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
@media (max-width: 820px) {
  .site-foot.compact { flex-direction: column; align-items: center; text-align: center; gap: var(--s2); padding: var(--s4) var(--s4) calc(84px + env(safe-area-inset-bottom)); }
  .site-foot.compact nav { flex: none; justify-content: center; gap: 0 2px; }
  .site-foot.compact nav a { padding: 8px 8px; }
}

/* Composer on phones: where to post on its own line, then the tools and «Publicar» on one row */
@media (max-width: 600px) {
  .composer-bar { row-gap: var(--s3); }
  .composer-bar .where-select { order: -1; flex: 1 1 100%; max-width: none; }
  .composer-bar .composer-tools { margin-right: 0; }
  .composer-bar .btn.primary { margin-left: auto !important; }
  .composer-bar .hint.grow:empty { display: none; }
}

/* Home: the member banner is short on phones; the Universe row fills the width when it has few tiles */
.u-row { grid-auto-columns: minmax(184px, 1fr); }
.u-row:has(> li:nth-child(5)) { grid-auto-columns: 184px; }
@media (max-width: 820px) {
  .u-row, .u-row:has(> li:nth-child(5)) { grid-auto-columns: minmax(160px, 1fr) !important; }
  .u-row:has(> li:nth-child(3)) { grid-auto-columns: 160px !important; }
  .hero-band.is-member { padding: 20px 20px 18px; }
  .hero-band.is-member .hero-copy h2 { font-size: var(--fs-lg); margin-bottom: var(--s2); padding-right: 36px; }
  .hero-band.is-member .hero-copy p { font-size: var(--fs-sm); margin-bottom: var(--s3); }
  .hero-band.is-member .hero-actions { flex-wrap: nowrap; gap: var(--s2); }
  .hero-band.is-member .hero-actions .btn { min-height: 38px; padding: 0 14px; font-size: var(--fs-sm); }
  .hero-band.is-member .hero-actions .btn svg { width: 16px; height: 16px; }
}
.hero-band.is-member .hero-mark { display: none; }
.hero-band.is-member { grid-template-columns: minmax(0, 1fr); background-position: right; }
.u-tile-meta .flag.demo { margin-left: 2px; }
.u-tile-meta { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.discovery-run { display: flex; align-items: center; gap: 8px; margin: var(--s2) 0 calc(-1 * var(--s1)); color: var(--muted); font: 600 var(--fs-sm) var(--font-display); }
.discovery-run svg { color: var(--cyan); }
.discovery-note.quiet { color: var(--faint); font-size: var(--fs-xs); margin-bottom: var(--s2); }

/* Page heads: title block left, actions right, centred on one axis */
.page-head { align-items: center; }
.page-head > .row { flex: none; }
.mt-s { margin-top: var(--s3); margin-bottom: 0; }
/* Explore: tag filter wraps (no hidden chips) */
.tag-filter { margin-bottom: var(--s5); }
.tag-filter .chip.more { border-style: dashed; }
/* Universe cards: no dead space; meta pinned to the bottom */
.u-card .u-tag { min-height: 0; }
.u-card-body { flex: 1; padding-bottom: 16px; }
.u-meta { margin-top: auto; padding-top: 6px; font-size: var(--fs-sm); }
.u-meta svg { width: 14px; height: 14px; }
/* Phones: long lists of Universes as compact rows */
@media (max-width: 600px) {
  .u-grid.list-sm { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .u-grid.list-sm .u-card { flex-direction: row; align-items: center; }
  .u-grid.list-sm .u-card-cover { display: none; }
  .u-grid.list-sm .u-card-body { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s3); row-gap: 1px; padding: 12px 14px; align-items: center; }
  .u-grid.list-sm .u-card-body .planet { margin: 0 6px 0 4px; grid-row: span 3; width: 36px; height: 36px; }
  .u-grid.list-sm .u-card-body .planet::before { inset: -4px -7px; }
  .u-grid.list-sm .u-card-body .planet > .core { box-shadow: none; font-size: var(--fs-xs); }
  .u-grid.list-sm .u-tag { -webkit-line-clamp: 1; }
  .u-grid.list-sm .u-meta { padding-top: 0; }
  .u-grid.list-sm .u-card:hover { transform: none; }
}

/* Universe and profile heads: planet/avatar above, title left, actions on the title's baseline */
@media (min-width: 601px) {
  .u-head, .p-head2 { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s5); }
  .u-head > :first-child, .p-head2 > .p-avatar { grid-row: 1; grid-column: 1; }
  .u-head > .u-title, .p-head2 > .u-title { grid-row: 2; grid-column: 1 / -1; }
  /* Actions sit on the planet's row, clear of the cover edge */
  .u-head > .u-actions { grid-row: 1; grid-column: 2; align-self: start; padding: 60px 0 0; }
  .p-head2 > .u-actions { grid-row: 1; grid-column: 2; align-self: start; padding: 66px 0 0; }
}
.u-stats { gap: 4px 0; }
.u-stats > span:not(.flag):not(.badge) + span:not(.flag):not(.badge)::before { content: "·"; margin: 0 4px 0 6px; color: var(--faint); }
.u-stats > .flag, .u-stats > .badge { margin-left: 12px; }
@media (max-width: 820px) { .u-head .planet.lg::before { inset: -7px -12px; } .u-head { margin-left: var(--s4); margin-right: var(--s4); } }
.sec-title { font-size: var(--fs-lg); margin: var(--s5) 0 var(--s3); }
/* Universe templates: titles on one line across cards */
.tpl-card { align-content: start; }
.tpl-grid + .hint { margin-top: var(--s3); }
.narrow-inputs .tag-field .tag-box, .narrow-inputs .tag-field .tag-suggest { max-width: 560px; }
.narrow-inputs .field > textarea { max-width: 720px; }
.tag-suggest-item { border-style: solid; border-color: var(--line); background: var(--surface); }
.tag-suggest-item.hl { border-color: var(--sel-border); background: var(--sel-bg-strong); color: var(--text); }
.tag-suggest-item.hl::after { content: "↵"; font-size: var(--fs-xs); color: var(--muted); margin-left: 2px; }
.measure { max-width: 62ch; }

/* Auth: title first, then the message; the alternative inside the card; one quiet line below */
.auth-card .panel { display: flex; flex-direction: column; }
.auth-card .panel > h1 { order: -1; }
.auth-card .panel > .flash { margin-bottom: var(--s4); }
.auth-alt { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }
.auth-alt p { margin: 0; }
.auth-meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; width: fit-content; margin: var(--s4) auto 0; padding: 4px 16px; border-radius: var(--r-pill); background: rgba(5, 6, 15, .72); backdrop-filter: blur(6px); }
.auth-meta .lang-switch, .auth-meta .maker { font-size: var(--fs-xs); }
.auth-meta .maker { opacity: .85; }
.auth-meta-sep { width: 1px; height: 14px; background: var(--line-strong); }
.check-error { margin: 4px 0 0 30px; }
.mt-xs { margin-top: var(--s3); }
.auth-card h1 { font-size: var(--fs-xl); }

/* Messages: the panel fits the window below the header; no footer under the chat */
@media (min-width: 821px) {
  body:has(.messenger) .main { padding-bottom: var(--s5); }
  .messenger { height: calc(100dvh - var(--hdr-h) - 48px); min-height: 480px; }
}
@media (max-width: 820px) {
  .messenger:not(.has-thread) { height: auto; min-height: 0; border: 0; background: none; border-radius: 0; }
  .messenger:not(.has-thread) .conv-pane { background: none; border: 0; }
  .messenger:not(.has-thread) .pane-head { padding-inline: 0; }
  .messenger:not(.has-thread) .conv-list { padding: 0; overflow: visible; }
}
.thread-privacy { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 0; }
.msg + .msg { margin-top: 10px; }
.msg.cont, .msg + .msg.cont { margin-top: 2px; }
.pane-head { min-height: 64px; }
.thread { gap: 0; }
.thread > .msg { margin-top: 12px; }
.thread > .msg.cont { margin-top: 3px; }
.notif-top { display: flex; align-items: baseline; gap: var(--s3); }
.notif-top .notif-text { flex: 1; min-width: 0; }
.notif-time { flex: none; color: var(--faint); font-size: var(--fs-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
.notif { padding: 12px 14px; }
.narrow-page > .page-head { margin-bottom: var(--s4); }
/* Settings: on phones the sections are a grid of buttons (all visible, no sideways scroll) */
@media (max-width: 600px) {
  .settings-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; border-bottom: 0; overflow: visible; -webkit-mask-image: none !important; mask-image: none !important; }
  .settings-nav a { justify-content: center; text-align: center; padding: 10px 6px; margin: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: var(--fs-sm); white-space: normal; line-height: 1.2; }
  .settings-nav a[aria-current="page"] { background: var(--sel-bg-strong) !important; border-color: var(--sel-border); }
}
.list .small.faint, .stats-dl dd, time { font-variant-numeric: tabular-nums; }
/* Pulse: a reading column; cards of a row share their height; «not for me» sits inside each suggestion */
.pulse-page { max-width: 760px; }
.pulse-grid { align-items: stretch !important; }
.pulse-grid > .panel { height: 100%; }
.pulse-sugg { position: relative; }
.pulse-sugg .pulse-item { padding-right: 52px; }
.pulse-sugg > form { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
/* Afterlife: «Tu rastro» as quiet rows in one panel */
.afl-rows { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.afl-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); min-height: 44px; padding: 6px 10px; border-radius: var(--r-sm); color: var(--text); }
a.afl-row:hover { background: var(--surface-2); text-decoration: none; }
.afl-row-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--violet-soft); }
.afl-row-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afl-row-d { color: var(--faint); font-size: var(--fs-xs); white-space: nowrap; }
@media (max-width: 600px) { .afl-row { grid-template-columns: 32px minmax(0, 1fr); } .afl-row-d { grid-column: 2; margin-top: -4px; } .afl-row-t { white-space: normal; } }
/* Chronicle: the line runs from the first month to the last entry, with a dot per month */
.chron::before { top: 0; }
.chron-month { position: relative; }
.chron-month > h2::before { content: ""; position: absolute; left: -22px; top: .45em; width: 10px; height: 10px; border-radius: 50%; background: var(--void); border: 2px solid var(--violet); }
.chron-month > h2 { position: relative; }
/* The Unknown keeps its magenta in its own steps */
.unk-how li::before, .how-steps.unk li::before { background: linear-gradient(135deg, var(--magenta), #8b5cff); color: #fff; box-shadow: none; }
.plan h2 { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.plan-current { margin: 0; justify-self: start; width: fit-content; }
/* Legal and help pages: a readable measure inside the card */
.prose-page.panel { max-width: calc(68ch + 2 * var(--pad-card)); padding: 28px 32px; }
.legal h1 { margin-bottom: var(--s4); }
.legal h2 { font-size: var(--fs-md); margin: var(--s5) 0 var(--s2); }
.legal .faq details { padding: 0 var(--s4); }
.legal .faq summary { padding: 14px 0; }
@media (max-width: 600px) { .prose-page.panel { padding: 20px 18px; } }
/* About: one left edge, 48 px between sections */
.about .l-section { padding: 0; max-width: none; }
.about .l-how h2, .about-more h2, .about-maker h2 { font-size: var(--fs-xl); }
/* Events: icons sit on the first line of their text; past events keep the card, the date tile fades */
.ev-meta > span { align-items: flex-start; }
.ev-meta svg { width: 14px; height: 14px; margin-top: 3px; flex: none; }
.event-list.past .event-card { background: var(--surface); }
.event-list.past .ev-date { opacity: .55; filter: saturate(.3); }
.event-list.past .ev-title { color: var(--muted); }
/* Admin: stat tiles that link are links as a whole; scroll hint as a soft fade */
a.kpi { color: var(--text); display: grid; }
a.kpi:hover { text-decoration: none; border-color: var(--line-strong); }
.table-wrap.sx, .table-wrap.sx-l, .table-wrap.sx-r { box-shadow: none !important; }
.table-wrap.sx.sx-r:not(.sx-l) { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent) !important; mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent) !important; }
.table-wrap.sx.sx-l:not(.sx-r) { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px) !important; mask-image: linear-gradient(90deg, transparent, #000 32px) !important; }
.table-wrap.sx.sx-l.sx-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent) !important; mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent) !important; }
/* Nexus on phones: filters behind one chip, a two-line intro, zoom clear of the toolbar */
.map-filters-wrap > summary { display: none; }
@media (max-width: 820px) {
  .map-filters-wrap { margin-bottom: var(--s3); }
  .map-filters-wrap > summary { display: inline-flex; cursor: pointer; }
  .map-filters-wrap[open] > summary { margin-bottom: var(--s3); border-color: var(--sel-border); }
  .nexus-head p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .map-zoom .icon-btn { width: 38px; height: 38px; }
  .map-zoom { top: 62px; }
  .map-tools { right: var(--s3); }
}
.pulse-end .orbit-empty { display: block; margin: 0 auto var(--s2); }
.pulse-end .pulse-prefs > summary { margin: 0 auto; }
.poll-field > fieldset { margin: var(--s3) 0 0; }
.poll-vote fieldset { margin: 0; }
.u-head .u-stats { column-gap: 0; }
.u-stats > span:not(.flag):not(.badge) + span:not(.flag):not(.badge)::before { margin: 0 3px 0 8px; }
.u-stats > span { gap: 5px; }
.orbit-projects li { display: grid; gap: 2px; }

/* ---------- Round 9 polish ---------- */
.side-list a[aria-current="page"] { background: var(--sel-bg); box-shadow: var(--sel-ring); }
.tag-chips.mb { margin-bottom: var(--s3); }
.tag-chips.end { justify-content: flex-end; }
.badge-a.locked { opacity: 1; }
.badge-a.locked .badge-t { color: var(--muted); }
.badge-a.locked .badge-ic { opacity: .7; }
.thread-privacy { display: block; text-align: center; }
.thread-privacy svg { display: inline-block; vertical-align: -1px; margin-right: 4px; }
main:has(.settings-nav) .field > input:not([type=checkbox]):not([type=radio]):not([type=file]), main:has(.settings-nav) .field > select, main:has(.settings-nav) .field > .pw-wrap { max-width: 560px; }
main:has(.settings-nav) .field > textarea { max-width: 720px; }
/* Selected tab: a solid line (the Universe's own colour on its tabs) */
.tabs a[aria-current="page"] { background: linear-gradient(var(--violet), var(--violet)) bottom / 100% 2px no-repeat; }
.u-hero .u-tabs a[aria-current="page"] { background: linear-gradient(var(--pc, var(--violet)), var(--pc, var(--violet))) bottom / 100% 2px no-repeat; }
.side-head h2 { font-size: var(--fs-sm); }
.tool-pill { font-size: var(--fs-sm); }
.ev-d { font-size: var(--fs-lg); }
.hero-actions .btn { min-height: 40px; padding: 0 20px; }
.comment-new .btn { border-radius: var(--r); }
.manage-nav { background: rgba(5, 6, 15, .62); backdrop-filter: blur(14px) saturate(1.2); }
.kpi { align-content: start; }
.thread-head { min-height: 64px; }
.thread-head .name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-head .grow { min-width: 0; }
.notif { align-items: center; }
.notif:has(.notif-excerpt) { align-items: flex-start; }
.map-legend { margin-bottom: var(--s3); }
.pulse-grid .event-card { background: transparent; border: 0; padding: 0; }
.list .faint, .list .small { font-variant-numeric: tabular-nums; }
/* Phone sheets carry a title */
@media (max-width: 600px) {
  .menu:not(.hdr-me):not(.hdr-create) > .menu-pop[data-sheet-title]::before { content: attr(data-sheet-title); display: block; padding: 6px 10px 10px; margin: 0 -8px 6px; border-bottom: 1px solid var(--line); color: var(--muted); font: 600 var(--fs-sm) var(--font-display); text-align: center; }
  .auth-meta-sep { display: none; }
  .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  .tpl-card { padding: 10px; }
  .tpl-card .small, .tpl-card p { font-size: var(--fs-xs); }
}
@media (max-width: 820px) {
  .map-zoom { top: auto; bottom: var(--s3); }
  .map-tools [data-map-back] { display: none; }
  /* Members' footer on phones: one line of links, the maker below */
  .site-foot.compact nav a:nth-child(n+5) { display: none; }
}
/* Legal and help: no outer card, the text sits on the page */
.prose-page.legal { padding: 0; }
.legal .flash { margin-bottom: var(--s5); }
.rail-x { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.rail-x.can-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 56px), transparent); }
.rail-x:not(.can-right) { -webkit-mask-image: none; mask-image: none; }
.rail-x.can-left:not(.can-right) { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }

/* ---------- Round 10 ---------- */
.share-preview { margin: 0 0 var(--s3); padding: 10px 14px; border-left: 3px solid var(--sel-border); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--graphite); color: var(--muted); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.share-preview strong { color: var(--text); margin-right: 4px; }
.side-head a { display: inline-flex; align-items: center; gap: 2px; }
.badges + .disclosure { margin-top: var(--s2); }
.disclosure > .badges { margin-top: var(--s2); }
@media (max-width: 820px) {
  .in-universe { padding-block: 10px; margin-block: -10px; }
  /* Welcome steps: every label visible, smaller */
  .stepper .t { display: inline !important; font-size: var(--fs-xs); }
  .stepper a { gap: 6px; }
  /* Nexus: the map search is an icon until it gets the focus */
  .map-find { flex: 0 0 auto; width: 40px; padding: 0 11px; cursor: text; transition: width var(--base) var(--ease); }
  .map-find input { flex: 0 0 0; width: 0; min-width: 0; padding: 0 !important; }
  .map-find:focus-within, .map-find.has-text { flex: 1 1 auto; width: auto; }
  .map-find:focus-within input, .map-find.has-text input { flex: 1 1 auto; width: auto; }
  .map-tools:has(.map-find:focus-within) .chip, .map-tools:has(.map-find:focus-within) .icon-btn { display: none; }
}
/* Phone sheets end with «Cancelar» */
.sheet-cancel, .menu-pop .sheet-cancel { display: none; }
@media (max-width: 600px) {
  .menu:not(.hdr-me):not(.hdr-create) > .menu-pop .sheet-cancel { display: flex; justify-content: center; margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0; color: var(--muted); font-weight: 600; }
}
@media (max-width: 820px) {
  .map-find { height: 38px; padding: 0 11px; border-radius: var(--r-pill); gap: 8px; }
  .map-find:not(:focus-within):not(.has-text) { width: 38px; gap: 0; }
  .map-find svg { flex: none; width: 16px; height: 16px; }
}

/* ---------- Round 11: Errores (admin) ---------- */
.chip-n { margin-left: 6px; font-variant-numeric: tabular-nums; color: var(--faint); }
.chip[aria-current="page"] .chip-n { color: inherit; opacity: .8; }
.err-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-block); }
.err-row { margin: 0; }
.err-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.err-count { font-weight: 600; font-variant-numeric: tabular-nums; }
.err-msg { margin: 10px 0 4px; overflow-wrap: anywhere; line-height: 1.45; }
.err-where code { overflow-wrap: anywhere; }
.err-foot { margin-top: 8px; gap: 8px; align-items: flex-start; }
.err-trace { margin: 8px 0 0; padding: 10px 12px; max-height: 260px; overflow: auto; font-size: var(--fs-xs); white-space: pre; }
/* Animated GIFs in posts */
.media-item picture { display: contents; }
.gif-tag { position: absolute; left: 8px; bottom: 8px; padding: 1px 6px; border-radius: var(--r-xs); background: rgba(6, 6, 10, .72); color: #fff; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .04em; pointer-events: none; }

/* ---------- Profile: «Sobre» as a real tab ---------- */
.shell.profile-about.no-aside > .main { max-width: 720px; }
.about-page { display: grid; gap: var(--space-block); }
.about-page > .panel { margin: 0; }
.about-page .orbit-svg { max-width: 340px; margin-inline: auto; display: block; }
.about-page .badges { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.badges-sub { margin: var(--space-block) 0 0; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.about-edit { margin: 0; }
/* Side column (desktop): earned achievements as a compact row */
.badges.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: var(--s2); }
.badges.compact .badge-a { align-items: center; text-align: center; padding: 8px 4px; gap: 6px; font-size: var(--fs-2xs); }
.badges.compact .badge-a .badge-ic { width: 30px; height: 33px; }
.aside-more { margin: 0; padding: 0 var(--s2); font-size: var(--fs-sm); }
.aside-more a { display: inline-flex; align-items: center; gap: 4px; }
/* A greyed-out «Mensaje» can't explain itself on a phone (no tooltips): it only shows where its text fits. */
@media (max-width: 600px) { .u-actions .btn.is-disabled { display: none; } }
/* Choosable rows show their state: an empty ring that fills with a tick when chosen */
.pick-tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; }
.person-pick:has(input:checked) .pick-tick { background: var(--violet); border-color: var(--violet); color: #fff; }
form fieldset.field.design-group { margin-top: var(--space-section); }
.people-list .people-bio { margin-top: 2px; }

/* Event page: the Universe header shrinks on phones so the event itself is on the first screen */
.rsvp-state { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; min-height: 40px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--cyan); font-weight: 600; }
@media (max-width: 600px) {
  .u-hero.compact .cover { height: 64px; min-height: 0; aspect-ratio: auto; }
  .u-hero.compact .u-tagline, .u-hero.compact .u-stats { display: none; }
  .u-hero.compact .planet.lg { width: 48px; height: 48px; }
}

/* Manage › Normas: each rule as a numbered pair (title + explanation that wraps) */
.rule-edit { display: flex; gap: var(--s3); align-items: flex-start; margin-bottom: var(--space-block); }
.rule-edit .rule-n { flex: none; width: 28px; height: 28px; margin-top: 8px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.rule-edit .grow { display: grid; gap: 6px; }
.rule-edit textarea { min-height: 0; }

/* Scroll arrows on horizontal rails (mouse only; touch swipes) */
.rail-wrap { position: relative; min-width: 0; }
.rail-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.rail-btn:hover { background: var(--surface); border-color: var(--violet); }
.rail-btn.prev { left: -4px; } .rail-btn.next { right: -4px; }
.rail-btn[hidden] { display: none; }
.post-ctx .post-ctx-rules { margin: var(--space-block) 0 var(--s2); padding-top: var(--space-block); border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
/* Your own counters are information, not buttons */
.act.static:hover { background: none; }
/* iOS zooms into text fields under 16px: keep them at 16px on touch screens */
@media (pointer: coarse) { input:not([type=checkbox]):not([type=radio]), textarea, select { font-size: max(16px, 1em); } }
h2.h3 { font-size: var(--fs-md); font-weight: 600; }
