:root {
  color-scheme: dark;
  --bg: #090e15;
  --panel: #101821;
  --input: #0a121b;
  --border: #30404e;
  --gold: #f4c66b;
  --gold-bright: #ffdd95;
  --muted: #abbac8;
  --text: #f1f3f5;
  --mark: #8bbcc2;
  --mono: "Cascadia Mono", "IBM Plex Mono", "Courier New", monospace;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; min-height: 100vh; }
[hidden] { display: none !important; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--gold-bright); }
p { color: var(--muted); margin: 0 0 1rem; line-height: 1.65; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .58; cursor: wait; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 4px; }
.skip { position: absolute; z-index: 4; top: 1rem; left: 1rem; background: var(--bg); padding: .6rem; transform: translateY(-220%); }
.skip:focus { transform: translateY(0); }
.site-width { width: min(100% - 3rem, 1200px); margin-inline: auto; }
.header { border-bottom: 1px solid var(--border); background: #0a1119; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.75rem; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--text); font: 800 1.15rem/1.04 var(--mono); text-decoration: none; letter-spacing: .14em; }
.brand-subtitle { display: block; margin-top: .3rem; color: var(--mark); font-size: .75rem; letter-spacing: .16em; }
.brand-mark { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); box-shadow: inset 0 0 .65rem #eeb75236; }
.brand-mark span { width: .8rem; height: .8rem; transform: rotate(45deg); border: 1px solid currentColor; background: #f4c66b24; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(.65rem, 2vw, 1.8rem); }
nav a { padding: .45rem 0; color: var(--muted); font-size: .95rem; text-decoration: none; }
nav a[aria-current] { color: var(--gold); text-decoration: underline; text-underline-offset: .65rem; }
.nav-upload { border: 1px solid #705d3e; border-radius: 4px; padding-inline: .85rem; }
main { min-height: 63vh; }
.hero { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr); align-items: center; gap: 2rem; padding: 3.5rem 0; }
.hero-copy { padding-block: .5rem; }
.kicker { color: var(--gold); font: 700 .83rem/1.5 var(--mono); letter-spacing: .16em; margin-bottom: .9rem; }
.gold-line { display: inline-block; vertical-align: middle; width: 1.1rem; height: 1px; background: var(--gold); margin-right: .45rem; }
h1, h2, h3 { color: var(--text); margin: 0 0 .75rem; line-height: 1.12; }
h1 { font-size: clamp(2.65rem, 6vw, 5.35rem); letter-spacing: -.065em; font-weight: 800; }
h1 em { font-style: normal; color: var(--gold); }
h2 { font-size: clamp(1.42rem, 3vw, 1.9rem); letter-spacing: -.035em; }
h3 { font-size: 1.15rem; }
.lede { font-size: clamp(1rem, 2vw, 1.17rem); max-width: 39rem; margin: 1.2rem 0 1.7rem; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.button { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; border: 1px solid #675739; border-radius: 4px; padding: .62rem .9rem; color: var(--gold-bright); background: #10171e; font-weight: 650; text-decoration: none; font-size: .91rem; line-height: 1.24; }
.button:hover { background: #24313c; color: var(--gold-bright); }
.primary { background: var(--gold); color: #16130c; border-color: var(--gold); }
.primary:hover { background: var(--gold-bright); color: #16130c; }
.small { min-height: 2.35rem; padding: .44rem .7rem; }
.system-map { position: relative; overflow: hidden; isolation: isolate; display: grid; place-items: center; width: 100%; height: clamp(19.5rem, 36vw, 28rem); border: 1px solid #263d48; background-color: #0b141d; background-image: linear-gradient(90deg, #2941504c 1px, transparent 1px), linear-gradient(#2941504c 1px, transparent 1px), radial-gradient(ellipse at center, #705f392c, transparent 65%); background-size: 25px 25px, 25px 25px, 100% 100%; background-position: center; }
.system-map::after { content: ""; position: absolute; inset: 8px; pointer-events: none; border: 1px solid #21303a; z-index: -1; }
.map-label { position: absolute; top: 1rem; left: 1.15rem; letter-spacing: .12em; font: .74rem var(--mono); color: var(--mark); }
.orbit { z-index: -1; position: absolute; width: min(65%, 21rem); aspect-ratio: 1; border-radius: 50%; border: 1px solid #325654; }
.orbit.inner { width: min(45%, 14rem); border-color: #26444b; }
.orbit.outer { width: min(90%, 28rem); border-color: #1d343e; }
.sun { display: grid; place-content: center; justify-items: center; z-index: 1; text-align: center; width: clamp(6.6rem, 10vw, 8.6rem); aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--gold); background: radial-gradient(circle, #222a2c 0%, #141d25 55%, #0a1119 92%); box-shadow: 0 0 2.5rem #e8aa474f, inset 0 0 1.1rem #955f383a; color: var(--gold-bright); font: 700 1.17rem/1.06 var(--mono); letter-spacing: .07em; text-decoration: none; }
.sun small { font-size: .73rem; color: var(--mark); margin-top: .4rem; }
.sun-light, .satellite span { display: block; width: .35rem; height: .35rem; border-radius: 50%; background: var(--gold-bright); box-shadow: 0 0 .9rem .1rem #edb45488; margin-bottom: .36rem; }
.satellite { position: absolute; display: grid; place-content: center; justify-items: center; width: clamp(4.5rem, 6.7vw, 5.7rem); max-width: 22%; aspect-ratio: 1; border: 1px solid #a48347; color: var(--gold-bright); border-radius: 50%; background: #121c25; box-shadow: 0 0 1.15rem #e5b04c22; font: 700 .78rem/1.15 var(--mono); text-decoration: none; text-align: center; transform: translate(-50%, -50%); }
.satellite:hover, .sun:hover { background: #27313a; }
.satellite.top { left: 50%; top: 17%; }
.satellite.right { left: 81%; top: 38%; }
.satellite.bottom { left: 68%; top: 78%; }
.satellite.left { left: 19%; top: 38%; }
.satellite.upload { left: 32%; top: 78%; }
.section-rule { border-top: 1px solid var(--border); padding-top: 1.6rem; margin-bottom: 1.7rem; }
.section-heading, .owner-toolbar { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; margin-bottom: .72rem; }
.section-heading a { font-size: .95rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 1rem; }
.card { padding: clamp(1rem, 2vw, 1.55rem); background: var(--panel); border: 1px solid var(--border); border-radius: 6px; min-width: 0; overflow-wrap: anywhere; }
.feature-card { display: flex; flex-direction: column; align-items: flex-start; }
.feature-card h2 { font-size: 1.35rem; }
.feature-card .button { margin-top: auto; }
.release-card { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; align-content: start; border-top-color: #887046; background-image: linear-gradient(150deg, #b9883520, transparent 48%); }
.release-body { min-width: 0; }
.release-body h3 { font-size: 1.25rem; }
.release-description { white-space: pre-line; }
.release-mark { display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid #735c3d; border-radius: 4px; background: #181c1c; color: var(--gold); font: 700 1.05rem var(--mono); }
.meta { color: var(--mark); margin: 0 0 .45rem; font: .79rem/1.45 var(--mono); }
.subpage { padding: 2.9rem 0 4rem; }
.subpage h1 { font-size: clamp(2.45rem, 6vw, 4.35rem); }
.page-intro { margin-bottom: 1.8rem; }
.prose, .form-card { max-width: 47rem; }
.browse-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; max-width: 48rem; margin-bottom: 1rem; }
label { display: flex; flex-direction: column; gap: .4rem; font-size: .94rem; font-weight: 650; margin-bottom: .85rem; }
input, select, textarea { width: 100%; min-height: 2.7rem; border: 1px solid #485b6b; border-radius: 4px; padding: .56rem .68rem; color: var(--text); background: var(--input); }
select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 16px) 51%, calc(100% - 11px) 51%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type=file] { padding: .45rem; }
textarea { resize: vertical; }
.form-card a:not(.button) { display: inline-block; margin-top: .85rem; }
.muted { font-size: .91rem; color: var(--muted); }
.admin-grid, .member-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 1rem; margin: 1rem 0; }
.member-layout { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
.admin-stack { display: grid; align-content: start; gap: 1rem; }
.owner-entry { align-self: start; }
.form-success { color: #9edbc2; margin: .7rem 0 0; }
.back-link { margin-top: 1rem; }
.social-feed { margin-bottom: 1.6rem; max-width: 50rem; }
#feed-posts { display: grid; gap: .75rem; margin-top: .8rem; }
.feed-post p { white-space: pre-wrap; margin-top: .5rem; }
.feed-post time { color: var(--muted); font-size: .84rem; }
.feed-replies { border-left: 1px solid var(--border); display: grid; gap: .7rem; padding-left: .8rem; margin: .9rem 0; }
.feed-replies p { margin: .2rem 0 0; }
.feed-post > form { margin-top: .9rem; }
.input-row { display: grid; grid-template-columns: 1fr 1.35fr; gap: .85rem; }
.item-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; border-top: 1px solid var(--border); padding: .72rem 0; }
.item-row:last-child { padding-bottom: 0; }
.messages { display: grid; gap: .45rem; max-height: 26rem; overflow-y: auto; }
.message { max-width: 88%; background: #0b151e; border: 1px solid #304457; border-radius: 5px; padding: .55rem .75rem; white-space: pre-wrap; }
.message.mine { justify-self: end; background: #24251c; border-color: #615438; }
.message strong { display: block; font-size: .84rem; color: var(--gold); margin-bottom: .12rem; }
#message-form { margin-top: .75rem; }
#generated-key { display: block; padding: .65rem; margin: .8rem 0; border: 1px solid #725f3d; border-radius: 4px; font: .84rem/1.5 var(--mono); user-select: all; overflow-wrap: anywhere; }
dialog { max-width: min(92%, 35rem); color: var(--text); background: var(--panel); padding: 1.5rem; border: 1px solid #725f3d; border-radius: 6px; }
dialog::backdrop { background: #05070bd9; }
.form-error { color: #ffc1b8; }
.notice { position: fixed; z-index: 3; right: 1rem; bottom: 1rem; width: max-content; max-width: min(90vw, 28rem); padding: .85rem 1rem; border: 1px solid #89724c; border-radius: 5px; background: #25251b; color: var(--text); margin: 0; }
.notice.error { border-color: #c77b6d; background: #351b1b; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; border-top: 1px solid var(--border); color: var(--muted); padding: 1.25rem 0 1.6rem; font-size: .88rem; }
.footer span:nth-child(2) { font-family: var(--mono); letter-spacing: .12em; color: var(--gold); }
@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; gap: 1.25rem; padding: 2.4rem 0; }
  .system-map { width: min(100%, 40rem); }
  .satellite { width: 5rem; }
  .sun { width: 7.1rem; }
  .satellite.top { top: 17%; }
  .satellite.bottom, .satellite.upload { top: 81%; }
}
@media (max-width: 590px) {
  .site-width { width: calc(100% - 1.6rem); }
  .header-inner { flex-direction: column; align-items: flex-start; padding: .8rem 0; gap: .75rem; }
  nav { gap: .38rem .85rem; }
  nav a { font-size: .88rem; }
  .nav-upload { padding-inline: .5rem; }
  .system-map { height: 19.5rem; }
  .map-label { top: .65rem; left: .65rem; }
  .satellite { width: 4.65rem; max-width: 24%; font-size: .73rem; }
  .sun { width: 6.6rem; }
  .satellite.left { left: 15%; }
  .satellite.right { left: 85%; }
  .admin-grid, .member-layout { grid-template-columns: 1fr; }
  .browse-controls { grid-template-columns: 1fr; gap: 0; }
  .subpage { padding-top: 2rem; }
}
