body.posts-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(80, 107, 255, 0.2), transparent 24%),
    radial-gradient(circle at 18% 16%, rgba(255, 94, 143, 0.08), transparent 20%),
    radial-gradient(circle at 84% 8%, rgba(78, 206, 255, 0.1), transparent 16%),
    linear-gradient(180deg, #070a12 0%, #090d17 44%, #06080f 100%);
  color: #edf2ff;
  --mobile-nav-surface: rgba(9, 14, 25, 0.94);
  --mobile-nav-border: rgba(97, 122, 194, 0.2);
  --mobile-nav-ink: #eef3ff;
  --mobile-nav-muted: #97a7ca;
  --mobile-nav-accent: #5b7cff;
  --mobile-nav-accent-soft: rgba(91, 124, 255, 0.18);
  --mobile-nav-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
  --mobile-sheet-surface: rgba(13, 19, 33, 0.98);
}

html.posts-page,
body.posts-page {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html.posts-page::-webkit-scrollbar,
body.posts-page::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body.posts-page .site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 18px 4vw;
  border-bottom: 1px solid rgba(116, 138, 202, 0.14);
  background: rgba(8, 12, 20, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

body.posts-page .brand {
  color: #ffffff;
}

body.posts-page .nav-links {
  gap: 14px;
  flex-wrap: wrap;
}

body.posts-page .nav-links a {
  color: rgba(220, 231, 255, 0.74);
}

body.posts-page .nav-links a:hover {
  color: #ffffff;
}

body.posts-page .nav-links .nav-posts-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(93, 123, 219, 0.26);
  background: linear-gradient(135deg, rgba(49, 90, 255, 0.86), rgba(89, 124, 255, 0.92));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(22, 49, 152, 0.24);
}

body.posts-page .nav-links .nav-posts-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.posts-shell {
  box-sizing: border-box;
  padding: 22px 4vw 32px;
}

.post-composer-card,
.post-card,
.posts-empty {
  background: linear-gradient(180deg, rgba(15, 20, 34, 0.96), rgba(10, 14, 25, 0.98));
  border: 1px solid rgba(91, 114, 184, 0.18);
  border-radius: 0;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.36);
}

.posts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.posts-main {
  width: 100%;
  max-width: 608px;
  margin-inline: auto;
  min-width: 0;
}

.post-composer-card {
  padding: 22px;
  border-radius: 0;
}

.post-composer-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.post-composer-avatar,
.post-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #4f7bff, #7f8cff);
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
}

.post-composer-hint {
  margin-top: 4px;
  color: #93a6cb;
  font-size: 13px;
}

.post-form {
  display: grid;
  gap: 14px;
}

.post-field {
  display: grid;
  gap: 8px;
}

.post-field span {
  color: #c7d3ef;
  font-size: 13px;
  font-weight: 700;
}

.post-field input,
.post-field textarea {
  width: 100%;
  border: 1px solid rgba(96, 117, 170, 0.24);
  border-radius: 0;
  background: rgba(9, 14, 25, 0.94);
  color: #edf2ff;
  padding: 14px 16px;
  font: inherit;
  outline: none;
  box-sizing: border-box;
}

.post-field input::placeholder,
.post-field textarea::placeholder {
  color: #7b8aa8;
}

.post-field input:focus,
.post-field textarea:focus {
  border-color: rgba(98, 136, 255, 0.56);
  box-shadow: 0 0 0 4px rgba(72, 112, 255, 0.16);
}

.post-background-stage {
  border-radius: 0;
  padding: 14px;
  border: 1px solid rgba(93, 114, 168, 0.18);
  background: rgba(8, 12, 22, 0.9);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.post-background-stage textarea {
  min-height: 180px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: vertical;
  padding: 8px;
}

.post-background-stage.is-themed textarea {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.55;
}

.post-background-stage.is-themed textarea::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.post-extra-fields {
  display: grid;
  gap: 12px;
}

.is-hidden {
  display: none !important;
}

.post-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.button.small {
  padding: 10px 14px;
  border-radius: 0;
  font-size: 13px;
}

.button.ghost {
  background: rgba(37, 48, 78, 0.78);
  border: 1px solid rgba(96, 117, 170, 0.22);
  color: #eef3ff;
}

.button.ghost:hover {
  background: rgba(49, 63, 104, 0.92);
}

.composer-link-preview {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid rgba(90, 114, 184, 0.18);
  background: rgba(10, 15, 27, 0.96);
}

.composer-link-preview-media,
.post-link-card-media {
  position: relative;
  overflow: hidden;
  background: rgba(6, 9, 17, 0.94);
}

.composer-link-preview-media {
  min-height: 180px;
}

.composer-link-preview-media img,
.post-link-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.composer-link-preview-copy,
.post-link-card-copy {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

.composer-link-preview-title,
.post-link-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #f5f8ff;
}

.composer-link-preview-desc,
.post-link-card-desc {
  margin: 0;
  color: #b6c2dc;
  line-height: 1.65;
}

.composer-link-preview-site,
.post-link-card-site {
  color: #89a1d6;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-background-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.post-bg-swatch {
  min-width: 86px;
  padding: 10px 14px;
  border: 1px solid rgba(104, 125, 184, 0.18);
  border-radius: 0;
  background: rgba(17, 23, 39, 0.94);
  color: #e7edff;
  font-weight: 700;
}

.post-bg-swatch.is-active {
  border-color: rgba(131, 160, 255, 0.44);
  box-shadow: 0 0 0 3px rgba(76, 110, 255, 0.12);
}

.post-bg-swatch--sunset,
.post-bg--sunset {
  background: linear-gradient(135deg, #ff7f51, #ffb347 54%, #ffdd67);
}

.post-bg-swatch--ocean,
.post-bg--ocean {
  background: linear-gradient(135deg, #1d7cf2, #31c9d6 55%, #8ae4ff);
}

.post-bg-swatch--forest,
.post-bg--forest {
  background: linear-gradient(135deg, #1f7a4f, #49c46c 52%, #a2f59f);
}

.post-bg-swatch--violet,
.post-bg--violet {
  background: linear-gradient(135deg, #6842ff, #9f6cff 58%, #e1b0ff);
}

.post-bg-swatch--berry,
.post-bg--berry {
  background: linear-gradient(135deg, #bb2f5d, #ff5f8a 56%, #ffb0c4);
}

.post-bg-swatch--midnight,
.post-bg--midnight {
  background: linear-gradient(135deg, #0f1630, #203d8c 54%, #5b7cff);
}

.composer-media-grid,
.post-media-grid {
  display: grid;
  gap: 12px;
}

.composer-media-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.composer-media-card,
.post-media-item {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid rgba(95, 115, 171, 0.18);
  background: rgba(10, 15, 27, 0.94);
}

.post-media-item {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.post-media-item.is-video {
  background: transparent;
  border-color: transparent;
}

.composer-media-card img,
.post-media-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  background: #05070c;
}

.composer-media-card video,
.post-media-item video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #05070c;
}

.post-media-item video {
  width: min(100%, 360px);
  max-width: 100%;
  max-height: min(72vh, 680px);
  margin: 0 auto;
}

.composer-media-meta {
  padding: 10px 12px 12px;
  display: grid;
  gap: 8px;
}

.composer-media-name {
  font-size: 12px;
  color: #dce5fb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-media-remove {
  justify-self: start;
  padding: 6px 10px;
  border-radius: 0;
  border: 1px solid rgba(255, 124, 124, 0.22);
  background: rgba(103, 21, 31, 0.46);
  color: #ffb3b1;
  font-size: 12px;
  font-weight: 700;
}

.post-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.post-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 0;
  border: 1px solid rgba(93, 114, 168, 0.18);
  background: rgba(13, 18, 31, 0.92);
  color: #edf2ff;
  font-weight: 700;
}

.post-tool-button:hover {
  background: rgba(19, 27, 46, 0.96);
}

.post-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: rgba(74, 118, 255, 0.16);
  color: #9db8ff;
  font-size: 12px;
  font-weight: 800;
}

.post-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.post-status {
  flex: 1 1 auto;
  padding: 12px 14px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
}

.post-status[data-tone='success'] {
  background: rgba(69, 171, 101, 0.18);
  color: #99e9ac;
}

.post-status[data-tone='error'] {
  background: rgba(232, 91, 82, 0.16);
  color: #ffb0ab;
}

.post-status[data-tone='info'] {
  background: rgba(79, 156, 232, 0.16);
  color: #9fd2ff;
}

.posts-feed {
  display: grid;
  gap: 0;
  margin-top: 0;
}

.post-card {
  border-radius: 0;
  padding: 22px;
  box-shadow: none;
}

.post-card + .post-card {
  border-top: 0;
}

.post-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.post-card-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.post-card-meta {
  min-width: 0;
}

.post-card-author {
  font-weight: 800;
  color: #f6f8ff;
}

.post-card-time {
  margin-top: 4px;
  color: #8d9cbc;
  font-size: 12px;
}

.post-card-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 0;
  background: rgba(255, 113, 97, 0.12);
  color: #ffbcaf;
  font-size: 12px;
  font-weight: 700;
}

.post-card-body {
  display: grid;
  gap: 14px;
}

.post-card-body.is-themed {
  padding: 26px;
  border-radius: 0;
}

.post-card-title {
  margin: 0;
  font-size: 24px;
  color: #ffffff;
}

.post-card-content {
  margin: 0;
  color: #c9d4eb;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-card-body.is-themed .post-card-title,
.post-card-body.is-themed .post-card-content {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
}

.post-media-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.post-link-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid rgba(91, 114, 184, 0.18);
  background: rgba(10, 15, 27, 0.96);
  color: inherit;
}

.post-link-card:hover {
  color: inherit;
}

.post-link-card-media {
  min-height: 220px;
}

.post-link-card-copy {
  gap: 8px;
}

.post-card-tag {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 0;
  background: rgba(62, 104, 224, 0.18);
  color: #a8c5ff;
  font-size: 12px;
  font-weight: 700;
}

.posts-empty {
  padding: 34px 24px;
  border-radius: 0;
  text-align: center;
  color: #9eadce;
}

@media (max-width: 980px) {
  .posts-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.posts-page.has-mobile-bottom-nav .site-header {
    padding: 14px 4vw 10px;
  }

  body.posts-page.has-mobile-bottom-nav .mobile-page-chip {
    background: rgba(91, 124, 255, 0.12);
    color: #b8ccff;
  }

  .posts-shell {
    padding: 16px 4vw calc(96px + env(safe-area-inset-bottom));
  }

  .post-composer-card,
  .post-card,
  .posts-empty {
    padding: 18px;
    border-radius: 0;
  }

  .post-link-row,
  .post-toolbar {
    grid-template-columns: 1fr;
  }

  .post-composer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .post-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-card-body.is-themed {
    padding: 20px;
  }

  .post-background-stage.is-themed textarea {
    font-size: 18px;
  }
}
