@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;600;700;800&display=swap');
:root {
  font-family: 'Inter', 'Noto Sans JP', system-ui, sans-serif;
  background: #070b17;
  color: #f3f3ff;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
:root,
[data-space-theme='cosmic'] {
  --bg: #080d1b;
  --panel: #10172a;
  --panel2: #141d32;
  --line: rgba(178, 195, 243, 0.12);
  --text: #f3f5ff;
  --muted: #8795b3;
  --accent: #987bfa;
  --bright: #b49aff;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
}
[data-space-theme='light'] {
  --bg: #f4f6fd;
  --panel: #fff;
  --panel2: #f0f2fa;
  --line: #e3e7f2;
  --text: #1b2544;
  --muted: #71819e;
  --accent: #6b55df;
  --bright: #7665e5;
  --shadow: 0 12px 35px #d6dcf03d;
}
[data-space-theme='midnight'] {
  --bg: #07090d;
  --panel: #12151b;
  --panel2: #1c202a;
  --line: #282e38;
  --text: #f6f6fa;
  --muted: #9197a2;
  --accent: #5f95e3;
  --bright: #85aff1;
  --shadow: 0 18px 50px #0007;
}
.space-app {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}
.stars-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(#6680bb88 0.7px, transparent 0.7px),
    radial-gradient(#8463cf55 1px, transparent 1px);
  background-size:
    67px 71px,
    141px 131px;
  background-position:
    11px 22px,
    57px 6px;
  mask-image: linear-gradient(#0005, transparent 80%);
}
.orb {
  position: absolute;
  pointer-events: none;
  z-index: -1;
  filter: blur(90px);
  opacity: 0.19;
}
.orb-one {
  top: 0;
  left: 29%;
  width: 340px;
  height: 320px;
  background: #6b4bd3;
}
.orb-two {
  top: 780px;
  right: 2%;
  width: 260px;
  height: 250px;
  background: #1870ac;
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg), transparent 9%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(25px);
}
.brand {
  background: none;
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.1px;
  white-space: nowrap;
}
.brand em {
  font-style: normal;
  font-weight: 600;
  color: var(--bright);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, #9c83ff, #4638a1);
  box-shadow: 0 5px 25px #8265ed55;
  color: white;
}
.global-search {
  height: 43px;
  max-width: 580px;
  width: 100%;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px 0 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
}
.global-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 12px;
}
.global-search button {
  background: transparent;
  border: 0;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}
.theme-switch {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  max-width: 110px;
}
.top-avatar {
  padding: 0;
  border: 0;
  background: transparent;
}
.login-btn,
.primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  background: linear-gradient(130deg, #a17fff, #6551db);
  color: white;
  border: 0;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  padding: 12px 17px;
  white-space: nowrap;
  box-shadow: 0 6px 25px #7663dd42;
}
.primary-button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 740px) 280px;
  gap: 25px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 29px 28px 0;
}
.sidebar {
  position: sticky;
  top: 102px;
  height: calc(100vh - 114px);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px 0;
}
.nav-label,
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 800;
  color: var(--bright);
}
.nav-label {
  padding: 0 17px 17px;
  opacity: 0.75;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-link {
  color: var(--muted);
  height: 45px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
}
.nav-link.selected {
  color: var(--text);
  background: linear-gradient(90deg, #9174ec30, transparent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-link:hover,
.right-link:hover {
  background: var(--panel2);
  color: var(--text);
}
.new-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5cc6fd;
  margin-left: auto;
}
.create-big {
  background: linear-gradient(135deg, #9876f0, #7654d5);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 8px;
  border-radius: 12px;
  height: 47px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 6px 21px #7255de3e;
}
.side-bottom {
  margin: auto 8px 0;
  padding: 22px 19px;
  background: linear-gradient(160deg, #7d5ec329, #4769bd13);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.mini-orbit {
  color: var(--bright);
  margin-bottom: 13px;
}
.side-bottom strong {
  font-size: 10px;
  letter-spacing: 1.1px;
}
.side-bottom p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
}
.side-bottom small {
  font-size: 10px;
  color: var(--muted);
}
.main-column {
  min-width: 0;
  padding-bottom: 26px;
}
.hero {
  height: 316px;
  position: relative;
  overflow: hidden;
  border: 1px solid #a18cfa35;
  border-radius: 20px;
  background:
    radial-gradient(circle at 86% 47%, #6647c075, transparent 37%),
    linear-gradient(114deg, #202244, #131c42 55%, #15143b);
  padding: 38px 38px;
  color: white;
}
.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 110%, #585caf2a, transparent 60%);
  pointer-events: none;
}
.hero-kicker {
  position: relative;
  color: #b5a4fb !important;
}
.hero h1 {
  position: relative;
  margin: 17px 0 10px;
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.48;
  font-weight: 800;
}
.hero h1 span {
  background: linear-gradient(90deg, #faf6ff, #b8abff);
  color: transparent;
  background-clip: text;
}
.hero p {
  position: relative;
  font-size: 12px;
  line-height: 2;
  color: #bfc5e9;
}
.hero-buttons {
  display: flex;
  gap: 13px;
  margin-top: 20px;
  position: relative;
  z-index: 2;
}
.ghost-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 600;
}
.hero .ghost-button {
  color: #fff;
  border-color: #b0abe559;
}
.hero-planet {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  position: absolute;
  right: 59px;
  top: 67px;
  background: radial-gradient(
    circle at 22% 24%,
    #c2b4ff,
    #806bd8 40%,
    #242b7c 77%,
    #11134c
  );
  box-shadow:
    0 0 70px #8268dd7b,
    inset -25px -18px 42px #130c50aa;
  transform: rotate(-30deg);
}
.planet-ring {
  position: absolute;
  width: 290px;
  height: 70px;
  border: 15px solid #b9b1ff90;
  border-top-color: #d4c8ff42;
  border-left-color: #d3c6ff5c;
  border-radius: 50%;
  transform: rotate(-15deg);
  top: 65px;
  left: -47px;
  box-shadow: 0 0 20px #8172ec4a;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin: 17px 0 29px;
}
.quick-grid button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
  color: var(--text);
  text-align: left;
}
.quick-grid button > svg {
  position: absolute;
  top: 16px;
  right: 14px;
  color: var(--muted);
}
.quick-grid strong {
  font-size: 12px;
}
.quick-grid small {
  font-size: 10px;
  color: var(--muted);
}
.quick-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  margin-bottom: 5px;
}
.quick-icon.violet {
  color: #b29eff;
  background: #9069e734;
}
.quick-icon.aqua {
  color: #6bcce6;
  background: #368caa2c;
}
.quick-icon.pink {
  color: #ffa1ca;
  background: #b4578a2d;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 23px 0 19px;
}
.section-header h2 {
  font-size: 22px;
  margin: 7px 0 7px;
  letter-spacing: -0.5px;
}
.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.outline-button {
  white-space: nowrap;
}
.filter-tabs {
  display: flex;
  gap: 7px;
  padding-bottom: 15px;
  overflow: auto;
}
.filter-tabs button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  padding: 9px 17px;
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
}
.filter-tabs button.active {
  background: #9477ee27;
  border-color: #8d72e567;
  color: var(--bright);
}
.thought-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 15px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 15px;
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 12px;
}
.thought-plus {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #a27fff25;
  color: var(--bright);
}
.post-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 16px;
  padding: 21px 22px 9px;
  box-shadow: var(--shadow);
}
.card-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}
.avatar {
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  flex: none;
  box-shadow: 0 3px 18px #987be242;
}
.avatar-btn {
  background: none;
  border: 0;
  padding: 0;
}
.byline {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}
.byline .author-name {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  background: none;
  border: 0;
  text-align: left;
  padding: 0;
}
.byline span {
  font-size: 10px;
  color: var(--muted);
}
.visibility-tag {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.icon-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  padding: 8px;
  border-radius: 8px;
}
.icon-btn:hover {
  background: var(--panel2);
}
.post-title {
  display: block;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 14px;
}
.post-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.95;
  font-size: 13px;
  color: var(--text);
  margin: 4px 0 15px;
}
.clamp-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
}
.media-frame {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 14px;
}
.media-frame video,
.media-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: black;
}
.media-frame.vertical-media {
  aspect-ratio: 9/16;
  max-width: 355px;
  margin-inline: auto;
}
.media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  color: #eee8ff;
  position: relative;
}
.media-placeholder svg {
  opacity: 0.78;
  filter: drop-shadow(0 2px 16px #fff7);
}
.media-placeholder span {
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 10px;
  opacity: 0.65;
}
.gradient-0 {
  background:
    radial-gradient(circle at 70% 30%, #9f69d9, transparent 45%),
    linear-gradient(130deg, #1c315e, #41215f);
}
.gradient-1 {
  background:
    radial-gradient(circle at 30% 30%, #6a77e8, transparent 45%),
    linear-gradient(130deg, #172d4b, #22585a);
}
.gradient-2 {
  background:
    radial-gradient(circle at 70% 30%, #ac68ad, transparent 45%),
    linear-gradient(130deg, #263167, #542759);
}
.gradient-3 {
  background:
    radial-gradient(circle at 50% 20%, #5c86b0, transparent 45%),
    linear-gradient(130deg, #10343c, #362f70);
}
.media-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #060815ad;
  color: white;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 9px;
  letter-spacing: 1.6px;
  font-weight: 800;
  pointer-events: none;
}
.book-card {
  display: flex;
  gap: 18px;
  align-items: center;
  border-radius: 13px;
  padding: 15px;
  background: var(--panel2);
  border: 1px solid var(--line);
  margin-bottom: 14px;
  cursor: pointer;
}
.book-cover {
  width: 103px;
  height: 138px;
  flex: none;
  border-radius: 5px 11px 11px 5px;
  border-left: 5px solid #2a2259;
  color: #eee1ff;
  background:
    radial-gradient(circle at 70% 22%, #b29be677, transparent 42%),
    linear-gradient(145deg, #50459d, #221d49);
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-direction: column;
  box-shadow: 7px 8px 18px #0003;
}
.book-cover span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 5px;
}
.book-cover small {
  font-size: 7px;
  letter-spacing: 0.8px;
}
.book-card > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.book-card strong {
  font-size: 16px;
}
.book-card small {
  font-size: 10px;
  color: var(--muted);
}
.read-book {
  color: var(--bright);
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
}
.tweet-photo {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  background: #02040a;
  border-radius: 12px;
  margin-bottom: 12px;
}
.poll-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}
.poll-choice {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel2);
  border: 1px solid #8d83b842;
  border-radius: 9px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 12px;
  text-align: left;
}
.poll-choice span:not(.poll-fill),
.poll-choice b {
  z-index: 1;
}
.poll-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #9982ed27;
}
.poll-results small {
  color: var(--muted);
  font-size: 10px;
}
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tags button {
  background: #9380e121;
  color: var(--bright);
  border: 0;
  border-radius: 7px;
  font-size: 10px;
  padding: 5px 8px;
}
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 9px 1px;
}
.card-actions button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 11px;
}
.card-actions button:hover,
.card-actions button.is-saved {
  color: var(--bright);
}
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 35px;
  color: var(--muted);
  font-size: 12px;
}
.spinning {
  animation: spin 1.2s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.empty-state {
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 19px;
  background: var(--panel);
  padding: 55px 22px;
  margin-bottom: 17px;
}
.empty-state h3 {
  font-size: 17px;
  margin: 18px 0 10px;
}
.empty-state p {
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
  margin-bottom: 23px;
}
.empty-planet {
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: #c2a9ff;
  background: radial-gradient(circle, #8f70e054, transparent 75%);
  width: 95px;
  height: 95px;
}
.profile-card {
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 25px;
}
.profile-banner {
  height: 160px;
  background:
    radial-gradient(circle at 75% 20%, #c7b0e270, transparent 24%),
    linear-gradient(120deg, #2a2050, #1c3963 52%, #181b43);
  position: relative;
  overflow: hidden;
}
.profile-banner-planet {
  position: absolute;
  right: 8%;
  top: 23px;
  width: 115px;
  height: 115px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #ae9ce9, #5443a7 65%, #211d5d);
  box-shadow: 0 0 40px #b294df77;
}
.profile-body {
  padding: 0 21px 20px;
  display: flex;
  align-items: end;
  gap: 17px;
}
.profile-body > .avatar {
  margin-top: -37px;
  border: 4px solid var(--panel);
  z-index: 1;
}
.profile-content {
  flex: 1;
  min-width: 0;
}
.profile-content h2 {
  font-size: 19px;
  margin: 13px 0 6px;
}
.profile-content p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 9px;
}
.profile-content small {
  font-size: 10px;
  color: var(--bright);
}
.profile-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
.profile-edit {
  border-top: 1px solid var(--line);
  padding: 20px;
  display: grid;
  gap: 12px;
}
.profile-edit label,
.modal-scroll label,
.panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.profile-edit input,
.profile-edit textarea,
.profile-edit select,
.modal-scroll input:not([type='checkbox']),
.modal-scroll textarea,
.modal-scroll select,
.panel input,
.dm-form input,
.comment-input input {
  width: 100%;
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  outline: 0;
  font-size: 12px;
}
.profile-edit input:focus,
.profile-edit textarea:focus,
.modal-scroll input:focus,
.modal-scroll textarea:focus,
.dm-form input:focus {
  border-color: var(--accent);
}
.profile-edit .primary-button {
  justify-self: start;
}
.inbox-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 21px;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 17px;
}
.panel-title button {
  margin-left: auto;
  color: var(--bright);
  background: none;
  border: 0;
  font-size: 11px;
}
.notif {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 13px;
  align-items: center;
  font-size: 12px;
}
.notif-dot {
  width: 7px;
  height: 7px;
  background: var(--bright);
  border-radius: 50%;
}
.notif small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.messages-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  margin-bottom: 15px;
}
.dm-bubble {
  align-self: flex-start;
  max-width: 87%;
  border-radius: 12px;
  background: var(--panel2);
  padding: 10px 14px;
}
.dm-bubble.mine {
  align-self: flex-end;
  background: #7861d13d;
}
.dm-bubble small {
  font-size: 9px;
  color: var(--muted);
}
.dm-bubble p {
  margin: 5px 0;
  font-size: 12px;
}
.dm-form {
  display: flex;
  gap: 9px;
  margin-top: 12px;
}
.tiny-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.9;
}
.footer {
  padding: 35px 0 15px;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 45px;
}
.right-column {
  position: sticky;
  top: 104px;
  height: calc(100vh - 116px);
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding-top: 5px;
}
.right-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 19px;
}
.welcome-card {
  background:
    radial-gradient(circle at 85% 0, #7258bd2b, transparent 48%), var(--panel);
}
.planet-icon {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  background: linear-gradient(135deg, #977af43c, #604ba827);
  display: grid;
  place-items: center;
  margin: 22px 0 13px;
  color: var(--bright);
}
.welcome-card h3 {
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 8px;
}
.welcome-card p,
.beta-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 2;
}
.full-width {
  width: 100%;
  margin-top: 10px;
}
.right-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 12px 2px;
  text-align: left;
  font-size: 11px;
}
.right-link svg:last-child {
  margin-left: auto;
}
.beta-card {
  background: linear-gradient(130deg, #7c61bc19, var(--panel));
}
.beta-card h4 {
  margin: 12px 0 2px;
  font-size: 14px;
}
.beta-pill {
  display: inline-block;
  color: #bdaaff;
  background: #8974e32b;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 9px;
  letter-spacing: 1px;
  margin-top: 10px;
}
.right-legal {
  font-size: 9px;
  line-height: 1.9;
  color: var(--muted);
  padding: 0 8px;
}
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  background: #222547;
  color: #fff;
  border: 1px solid #8476d777;
  border-radius: 12px;
  box-shadow: 0 10px 50px #0006;
  padding: 14px 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  max-width: min(90vw, 430px);
}
.toast > svg {
  color: #ad9bff;
}
.toast button {
  margin-left: auto;
  background: none;
  border: 0;
  color: white;
}
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #050814d9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  backdrop-filter: blur(8px);
}
.modal {
  width: min(100%, 625px);
  max-height: 92vh;
  background: var(--panel);
  color: var(--text);
  border: 1px solid #9d86e344;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 120px #000a;
}
.modal-head {
  padding: 22px 24px 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h3 {
  margin: 6px 0 0;
  font-size: 20px;
}
.compose-tabs {
  display: flex;
  gap: 8px;
  padding: 0 22px 14px;
  border-bottom: 1px solid var(--line);
}
.compose-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 11px;
  flex: 1;
  justify-content: center;
}
.compose-tabs button.selected {
  background: #8872ed39;
  color: var(--bright);
  border-color: #9580e85c;
}
.modal-scroll {
  overflow: auto;
  padding: 21px 24px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-scroll textarea {
  resize: vertical;
  line-height: 1.9;
}
.char-counter {
  font-size: 10px;
  color: var(--muted);
  align-self: end;
}

/* Video normalization is display-only: never crop/stretch the source video. */
.video-compose-preview-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.video-compose-preview-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}
.video-compose-preview {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.video-compose-preview.vertical-media {
  aspect-ratio: 9/16;
  max-width: 300px;
  margin-inline: auto;
}
.video-compose-preview video,
.video-compose-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: contain;
}

.upload-zone {
  border: 1px dashed #8974d770;
  background: var(--panel2);
  border-radius: 11px;
}
.upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 17px;
  gap: 5px;
  cursor: pointer;
  color: var(--bright);
}
.upload-label strong {
  font-size: 12px;
}
.upload-label small {
  font-size: 10px;
  color: var(--muted);
}
.poll-editor {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.poll-editor .checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.poll-editor > div {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 11px;
}
.inline-action {
  border: 0;
  background: transparent;
  color: var(--bright);
  text-align: left;
  font-size: 11px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 11px;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
}
.detail-modal {
  max-width: 730px;
}
.detail-body {
  overflow: auto;
  padding: 15px 24px 23px;
}
.detail-body .post-body {
  font-size: 13px;
}
.detail-tools {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.detail-tools button {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  border: 0;
  background: none;
  font-size: 11px;
}
.detail-tools .danger {
  color: #ff8eaa;
}
.book-reader {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.reader-header {
  background: var(--panel2);
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
}
.reader-text {
  padding: 22px;
  white-space: pre-wrap;
  line-height: 2.3;
  font-size: 13px;
  max-height: 480px;
  overflow: auto;
}
.pdf-open {
  margin: 12px;
  display: inline-flex;
}
.pdf-frame {
  width: 100%;
  height: 470px;
  border: 0;
  background: white;
}
.detail-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
  border-radius: 11px;
  margin-bottom: 14px;
}
.detail-video-frame.vertical-media {
  aspect-ratio: 9/16;
  max-width: 345px;
  margin-inline: auto;
}
.detail-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  border: 0;
}
.comments {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.comments h4 {
  font-size: 14px;
}
.comments h4 span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.comment {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}
.comment strong {
  font-size: 11px;
}
.comment p {
  font-size: 12px;
  line-height: 1.8;
  margin: 5px 0;
}
.comment-input {
  display: flex;
  gap: 9px;
  margin-top: 15px;
}
.comment-input button {
  padding: 11px;
}
.mobile-menu {
  display: none;
}

/* Profile photo uploads */
.avatar { overflow: hidden; }
.avatar-photo { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.profile-banner.has-banner-photo { background-position: center; background-size: cover; background-repeat: no-repeat; }
.profile-photo-editor { display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 21px; margin-bottom: 4px; }
.profile-photo-editor h4 { display: flex; gap: 9px; align-items: center; margin: 4px 0 0; font-size: 13px; }
.image-editor-row { display: flex; gap: 17px; align-items: center; flex-wrap: wrap; }
.image-editor-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.image-editor-actions-horizontal { flex-direction: row; flex-wrap: wrap; align-items: center; }
.image-select-button { display: inline-flex!important; flex-direction: row!important; width: max-content; align-items: center; gap: 9px; cursor: pointer; background: var(--panel2); border: 1px solid var(--line); padding: 12px 14px; border-radius: 10px; color: var(--text)!important; font-size: 11px!important; }
.image-select-button:hover { border-color: var(--accent); color: var(--bright)!important; }
.image-select-button input { display: none; }
.remove-image { border: 0; background: transparent; color: #efa4b0; font-size: 11px; padding: 6px 0; }
.banner-image-preview { width: 100%; height: 125px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px dashed #9884db88; border-radius: 12px; background: radial-gradient(circle at 70% 30%,#a38bdb76,transparent 40%),linear-gradient(125deg,#222c5e,#49295a); background-position:center; background-size:cover; }
.banner-image-preview span { font-size: 11px; letter-spacing: 3px; color: #d5ccff; }


/* Manage your own content without hiding deletion inside a secondary menu. */
.post-delete-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #f39bab41; color: #f2a9bb; background: #b7446620; border-radius: 10px; padding: 9px 11px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.post-delete-btn:hover { background: #a83b5b; color: white; }
.chunked-video { width: 100%; height: 100%; min-height: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.chunked-video video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.chunked-video-overlay { display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; padding: 16px; height: 100%; width: 100%; color: white; text-align: center; background: radial-gradient(circle at 50% 30%, #39315f, #090b19 70%, #030406 100%); }
.chunked-video-overlay strong { font-size: 13px; }
.chunked-video-overlay small { font-size: 10px; color: #bbbfde; }
.chunked-video-overlay button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #ad9cf68b; background: #725cc5; border-radius: 11px; padding: 11px 14px; color: white; font-weight: 700; font-size: 12px; }
.chunked-video-error { color: #ffb2c2; font-size: 11px; }
.chunked-progress-track, .upload-progress-track { width: min(90%,260px); height: 7px; background: #3e415d; border-radius: 99px; overflow: hidden; }
.chunked-progress-track span, .upload-progress-track span { height: 100%; display: block; background: linear-gradient(90deg,#9f83fa,#78d0e5); border-radius: 99px; transition: width .16s ease; }
.upload-progress { margin: 0 24px 12px; border: 1px solid var(--line); border-radius: 11px; padding: 13px; background: var(--panel2); display: flex; flex-direction: column; gap: 9px; }
.upload-progress-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.upload-progress-head strong { color: var(--bright); }
.upload-progress-track { width: 100%; }
.upload-progress small { color: var(--muted); font-size: 10px; }

@media (max-width: 1190px) {
  .layout {
    grid-template-columns: 208px minmax(0, 780px);
    justify-content: center;
    gap: 22px;
  }
  .right-column {
    display: none;
  }
  .sidebar {
    padding-left: 2px;
  }
  .topbar {
    padding: 0 22px;
  }
  .hero-planet {
    right: 58px;
  }
}
@media (max-width: 820px) {
  .layout {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 14px;
    padding: 22px 17px;
  }
  .sidebar {
    top: 95px;
    align-items: center;
  }
  .sidebar .nav-label,
  .sidebar .nav-link span,
  .sidebar .side-bottom,
  .sidebar .create-big {
    display: none;
  }
  .sidebar nav {
    width: 100%;
  }
  .sidebar .nav-link {
    justify-content: center;
    padding: 0;
    height: 52px;
  }
  .nav-link.selected {
    box-shadow: inset 0 -2px 0 var(--accent);
  }
  .topbar {
    gap: 15px;
  }
  .brand {
    font-size: 15px;
  }
  .brand-mark {
    height: 35px;
    width: 35px;
  }
  .global-search {
    max-width: none;
  }
  .header-right {
    gap: 8px;
  }
  .hero-planet {
    right: 45px;
    opacity: 0.8;
  }
}
@media (max-width: 620px) {
  .topbar {
    height: 64px;
    padding: 0 13px;
    gap: 9px;
  }
  .mobile-menu {
    display: inline-grid;
  }
  .brand {
    font-size: 13px;
    gap: 6px;
  }
  .brand-mark {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }
  .brand-mark svg {
    width: 19px;
  }
  .global-search {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    width: auto;
    height: 40px;
  }
  .topbar {
    margin-bottom: 51px;
  }
  .header-right {
    margin-left: auto;
  }
  .theme-switch {
    max-width: 77px;
    font-size: 10px;
    padding: 7px 3px;
  }
  .login-btn {
    padding: 8px 9px;
    font-size: 10px;
  }
  .layout {
    display: block;
    padding: 13px 12px;
  }
  .sidebar {
    display: none;
    position: fixed;
    left: 8px;
    top: 67px;
    bottom: 8px;
    height: auto;
    width: 245px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 15px;
    z-index: 80;
    padding: 19px 10px;
    box-shadow: 0 30px 90px #0009;
  }
  .sidebar.sidebar-open {
    display: flex;
  }
  .sidebar .nav-label,
  .sidebar .nav-link span,
  .sidebar .create-big {
    display: flex;
  }
  .sidebar .nav-link {
    justify-content: flex-start;
    padding: 0 17px;
    height: 43px;
  }
  .sidebar .create-big {
    width: 92%;
    margin: 16px 4%;
  }
  .main-column {
    width: 100%;
  }
  .hero {
    height: 283px;
    padding: 25px 21px;
  }
  .hero h1 {
    font-size: 25px;
  }
  .hero p {
    font-size: 10px;
  }
  .hero-planet {
    width: 128px;
    height: 128px;
    right: 17px;
    top: 75px;
    opacity: 0.46;
  }
  .planet-ring {
    width: 189px;
    height: 47px;
    top: 44px;
    left: -31px;
    border-width: 9px;
  }
  .hero .primary-button,
  .hero .ghost-button {
    font-size: 10px;
    padding: 10px;
  }
  .quick-grid {
    gap: 7px;
  }
  .quick-grid button {
    padding: 12px 9px;
  }
  .quick-grid strong {
    font-size: 10px;
  }
  .quick-grid small {
    font-size: 9px;
    line-height: 1.5;
  }
  .quick-icon {
    height: 32px;
    width: 32px;
  }
  .section-header h2 {
    font-size: 19px;
  }
  .section-header p {
    font-size: 10px;
  }
  .section-header .eyebrow {
    font-size: 8px;
  }
  .post-card {
    padding: 17px 14px 6px;
  }
  .book-cover {
    height: 110px;
    width: 80px;
  }
  .book-card {
    gap: 11px;
  }
  .book-card strong {
    font-size: 13px;
  }
  .card-actions button {
    font-size: 10px;
    gap: 5px;
  }
  .card-actions button svg {
    width: 16px;
  }
  .profile-body {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .profile-content {
    flex-basis: 60%;
  }
  .profile-actions {
    width: 100%;
    padding-top: 10px;
  }
  .modal-scrim {
    padding: 6px;
  }
  .modal {
    max-height: 97vh;
    border-radius: 14px;
  }
  .modal-head {
    padding: 16px;
  }
  .modal-head h3 {
    font-size: 17px;
  }
  .compose-tabs {
    padding: 0 10px 10px;
    gap: 5px;
  }
  .compose-tabs button {
    padding: 9px 6px;
    font-size: 10px;
    gap: 3px;
  }
  .compose-tabs button svg {
    width: 13px;
  }
  .modal-scroll {
    padding: 14px;
  }
  .modal-footer {
    padding: 12px;
  }
  .inbox-stack .panel {
    padding: 15px;
  }
  .dm-form input {
    min-width: 0;
  }
  .footer {
    font-size: 9px;
  }
}

/* GitHub-free Cloudflare migration setup and Supabase email auth */
.setup-screen { min-height:100vh;display:grid;place-items:center;padding:30px;background:radial-gradient(circle at 76% 30%,#42318d 0%,transparent 38%),#080d1b;color:#f3f4ff; }
.setup-content {max-width:610px;width:100%;padding:44px;background:#13192c;border:1px solid #766ac75e;border-radius:20px;box-shadow:0 20px 70px #0005;}
.setup-planet {display:grid;place-items:center;height:82px;width:82px;font-size:48px;background:radial-gradient(circle,#8874d5,#221f4b);border-radius:50%;margin-bottom:26px;box-shadow:0 0 40px #a58fea65;}
.setup-content h1 {font-size:28px;line-height:1.5;margin:15px 0;}
.setup-content p {font-size:13px;line-height:2;color:#bac5e5;}
.setup-content code {color:#c9b2ff;background:#34305e;padding:2px 5px;border-radius:5px;}
.setup-caution {font-size:12px;line-height:1.9;color:#edc6cb;background:#762c3c30;padding:13px;border-radius:10px;margin-top:25px;}
.space-login-modal {max-width:460px;}
.space-login-content {display:flex;flex-direction:column;align-items:center;gap:16px;padding:15px 26px 29px;}
.space-login-content p {font-size:12px;color:var(--muted);line-height:1.9;text-align:center;}
.space-login-content input {width:100%;padding:13px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--text);}
.space-login-content small {color:var(--muted);font-size:10px;line-height:1.7;}
.space-login-or {font-size:11px;color:var(--muted);}
.space-login-notice {color:var(--bright)!important;border-radius:10px;padding:12px;background:var(--panel2);}
