/* Galaxy opening */
html.intro-open { overflow: hidden; }
#opening[open] {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 73% 28%, #3b1c63 0%, transparent 43%),
    radial-gradient(ellipse at 22% 74%, #30306c 0%, transparent 47%),
    #0a0715;
}
#opening::backdrop { background: transparent; }
.intro-stars, .intro-clouds { position: absolute; inset: 0; pointer-events: none; }
.intro-stars {
  background-image:
    radial-gradient(circle, #f6dcff 0 1px, transparent 2px),
    radial-gradient(circle, #b88aff 0 1px, transparent 2px),
    radial-gradient(circle, #fff 0 1px, transparent 2px);
  background-size: 113px 133px, 163px 113px, 193px 173px;
  background-position: 13px 49px, 53px 12px, 31px 67px;
  opacity: .5;
  mask-image: radial-gradient(ellipse, transparent 12%, #000 60%);
}
.intro-scene { position: relative; display: grid; justify-items: center; gap: 1rem; animation: intro-arrive .5s ease-out both; }
.intro-portrait {
  z-index: 1;
  width: min(73vw, 46dvh, 490px);
  overflow: hidden;
  border-radius: 1.3rem;
  border: 1px solid #e8c8ffad;
  background: #201438;
  box-shadow: 0 0 38px #b284fb6b, 0 24px 85px #060311c9;
}
#opening .intro-portrait img { width: 100%; height: auto; max-height: none; margin: 0; }
.intro-orbit {
  position: absolute;
  top: 45%;
  width: min(114vw, 82dvh);
  height: 37%;
  border: 1px solid #ceafffa8;
  border-radius: 50%;
  transform: rotate(-23deg);
  box-shadow: 0 0 20px #ba75ffa1, inset 0 0 16px #9e79e285;
}
.intro-enter { z-index: 1; border-radius: 99px; gap: .75rem; padding-inline: 1.25rem; }
.intro-clouds {
  z-index: 2;
  inset: -28%;
  opacity: 0;
  background:
    radial-gradient(ellipse at 21% 53%, #9952bdde, transparent 31%),
    radial-gradient(ellipse at 48% 41%, #c39effe8, transparent 30%),
    radial-gradient(ellipse at 72% 54%, #63499dd9, transparent 37%),
    radial-gradient(ellipse at 48% 65%, #2f235fe8, transparent 39%);
}
#opening.is-leaving { animation: intro-out .64s ease-in-out both; }
.is-leaving .intro-scene { animation: intro-recede .55s ease-in both; }
.is-leaving .intro-clouds { animation: clouds-pass .64s ease-in-out both; }
@keyframes intro-arrive { from { opacity: 0; transform: scale(.96) translateY(10px); } }
@keyframes intro-recede { to { opacity: 0; transform: scale(1.035); } }
@keyframes intro-out { 0%, 34% { opacity: 1; } 100% { opacity: 0; } }
@keyframes clouds-pass {
  from { opacity: 0; transform: translate3d(-16%, 12%, 0) scale(.87); }
  45% { opacity: .96; }
  to { opacity: .52; transform: translate3d(14%, -11%, 0) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .intro-scene, #opening.is-leaving, .is-leaving .intro-scene, .is-leaving .intro-clouds { animation: none; }
}

/* N.A.H public feed and dashboard */
.nah { --feed-surface: #191122; }
.nah-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 4vw, 3.5rem);
  border: 1px solid #614879;
  border-radius: 1.35rem;
  background: radial-gradient(ellipse at 92% 18%, #70469b, transparent 62%), linear-gradient(132deg,#241432,#120e1f);
}
.nah-banner h2 { margin-bottom: .5rem; }
.nah-banner p { margin: 0; color: #ead9fb; }
.nah-banner img { width: clamp(64px, 12vw, 130px); aspect-ratio: 1; object-fit: cover; object-position: 50% 30%; border-radius: 50%; border: 2px solid #eeccff; box-shadow: 0 0 25px #d798ff7d; }
.nah-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0; }
.nah-toolbar button, .post-actions button { border: 1px solid #785790; color: #f6e9fb; background: #20142b; border-radius: 99px; padding: .5rem .85rem; cursor: pointer; }
.nah-toolbar button:hover, .post-actions button:hover { background: #3b2450; }
.nah-toolbar button[aria-pressed="true"] { color: #251134; background: #eabaff; border-color: #eabaff; font-weight: 700; }
.nah .feed { max-width: min(100%, 820px); }
.nah .post, .feed-message { background: #191122; border: 1px solid #503b62; border-radius: 1.1rem; padding: clamp(1rem, 3vw, 1.6rem); }
.feed-message { max-width: 820px; margin: 0; }
.post-meta { display: flex; align-items: center; gap: .7rem; }
.post-avatar { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: none; border-radius: 50%; background: linear-gradient(145deg,#f1b5fc,#8164da); color: #1d0e2c; font-size: .85rem; font-weight: 900; }
.nah .post > p { margin: .85rem 0; }
.nah .post img, .nah .post video { margin-top: .85rem; }
.post-actions { display: flex; margin-top: .9rem; padding-top: .75rem; border-top: 1px solid #493656; }
.nah .post-highlight { border-color: #eabaff; scroll-margin-top: 1rem; }
.admin h1 { font-size: clamp(2.8rem, 8vw, 5.5rem); }
.admin #signin { padding: clamp(1rem, 4vw, 2rem); border: 1px solid #503b62; border-radius: 1.1rem; background: #191122; }
.admin #signout { margin-bottom: 1.5rem; }
