:root {
  --social-bg: #f1f3f6;
  --surface: #ffffff;
  --surface-soft: #f7f8fb;
  --text: #172033;
  --muted: #657085;
  --line: #dfe3eb;
  --primary: #1463ff;
  --primary-soft: #e8f0ff;
  --teal: #0f9f8f;
  --orange: #e26d2d;
  --danger: #d63939;
  --blue: #2967d8;
  --purple: #7d50d6;
  --shadow: 0 10px 30px rgba(26, 38, 66, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--social-bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.social-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(220px, 420px) 1fr minmax(220px, 280px);
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-lockup.is-logo-only {
  gap: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.brand-mark.has-logo {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
}

.topbar-search {
  position: relative;
}

.topbar-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.topbar-search input,
.contact-filter,
.chat-input input,
.composer-form textarea {
  width: 100%;
  border: 1px solid transparent;
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
}

.topbar-search input {
  height: 44px;
  padding: 0 16px 0 44px;
  border-radius: 999px;
}

.topbar-search input:focus,
.contact-filter:focus,
.chat-input input:focus,
.composer-form textarea:focus {
  border-color: rgba(20, 99, 255, 0.35);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.1);
}

.topbar-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.topbar-tabs a {
  display: grid;
  width: 64px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
}

.topbar-tabs a:hover,
.topbar-tabs a.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.topbar-tabs svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.icon-button,
.profile-button,
.topbar-link-button,
.ghost-button,
.contact-actions button,
.chat-input button {
  border: 0;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  text-decoration: none;
}

.icon-button.small {
  width: 34px;
  height: 34px;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.topbar-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.topbar-link-button svg {
  width: 18px;
  height: 18px;
}

.profile-button img,
.composer-line img,
.user-card img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.social-shell {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(430px, 680px) minmax(250px, 340px);
  justify-content: center;
  align-items: start;
  gap: 24px;
  width: min(1480px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 24px 22px 40px;
}

.center-feed,
.feed-list,
.panel,
.composer-card,
.post-card,
.post-header > div {
  min-width: 0;
  max-width: 100%;
}

.left-rail,
.right-rail {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  scrollbar-width: thin;
}

.panel,
.composer-card,
.post-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-card strong,
.user-card span,
.post-header strong,
.post-header span,
.sponsored-card strong,
.sponsored-card span {
  display: block;
}

.user-card span,
.post-header span,
.sponsored-card span,
.chat-header span {
  color: var(--muted);
  font-size: 13px;
}

.nav-panel {
  display: grid;
  gap: 4px;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.rail-link:hover,
.rail-link.is-current {
  background: var(--surface);
  color: var(--primary);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title h2,
.chat-header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.section-title a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.mini-list {
  display: grid;
  gap: 8px;
}

.mini-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: var(--text);
  text-decoration: none;
}

.mini-list a small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.group-create-form,
.group-moderator-form,
.group-settings-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.group-create-form input[type="text"],
.group-create-form textarea,
.group-moderator-form input,
.group-settings-form input,
.group-settings-form textarea,
.group-settings-form select {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  outline: none;
}

.group-create-form textarea,
.group-settings-form textarea {
  resize: vertical;
}

.group-create-form input:focus,
.group-create-form textarea:focus,
.group-moderator-form input:focus,
.group-settings-form input:focus,
.group-settings-form textarea:focus,
.group-settings-form select:focus {
  border-color: rgba(20, 99, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.1);
}

.group-settings-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.group-privacy-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.group-privacy-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.group-create-form button,
.group-moderator-form button,
.group-settings-form button,
.group-member-row button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.group-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.teal,
.avatar-stack.green {
  background: var(--teal);
}

.orange,
.avatar-stack.orange {
  background: var(--orange);
}

.group-shell {
  display: grid;
  gap: 18px;
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.group-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.group-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
}

.group-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.group-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 159, 143, 0.12);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.group-badge.is-private {
  background: rgba(226, 109, 45, 0.13);
  color: var(--orange);
}

.group-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.group-meta span {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.group-tabs a.is-active,
.group-tabs a:hover {
  border-color: rgba(20, 99, 255, 0.22);
  background: var(--primary-soft);
  color: var(--primary);
}

.group-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.group-management-panel,
.group-members-panel,
.group-posts-panel,
.group-members-page {
  padding: 16px;
}

.group-about-block {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.group-about-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.group-about-block span {
  min-height: 28px;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.group-settings-title {
  margin-top: 18px;
}

.group-post-form {
  margin-bottom: 18px;
}

.group-posts-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.group-post-list-title {
  margin-top: 10px;
}

.group-member-list {
  display: grid;
  gap: 10px;
}

.group-member-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.group-member-row div {
  min-width: 0;
}

.group-member-row strong,
.group-member-row span {
  display: block;
}

.group-member-row span:not(.avatar-stack) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.group-member-row form {
  margin: 0;
}

.group-member-row button {
  min-width: 84px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--primary);
}

.blue,
.avatar-stack.blue {
  background: var(--blue);
}

.avatar-stack.purple {
  background: var(--purple);
}

.center-feed {
  display: grid;
  gap: 16px;
}

.stories-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.story-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 172px;
  padding: 14px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #283b58, #4878c7);
  color: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
}

.story-card span {
  position: relative;
  z-index: 1;
  font-weight: 800;
}

.story-card:hover,
.story-card:focus-visible {
  color: #fff;
  transform: translateY(-1px);
}

.story-card.is-active {
  outline: 3px solid rgba(20, 99, 255, 0.28);
  outline-offset: 2px;
}

.story-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.5));
}

.story-card.bg-1 {
  background: linear-gradient(135deg, #0f9f8f, #74c6b5);
}

.story-card.bg-2 {
  background: linear-gradient(135deg, #e26d2d, #f2af58);
}

.story-card.bg-3 {
  background: linear-gradient(135deg, #7d50d6, #cd8ef7);
}

.create-story {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--surface);
  color: var(--text);
}

.create-story::before {
  display: none;
}

.create-story img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.create-story button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.composer-card {
  padding: 14px;
}

.composer-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.composer-form {
  display: grid;
  gap: 12px;
}

.composer-form textarea {
  display: block;
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
  border-radius: 8px;
}

.composer-tools,
.post-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.composer-tools button,
.composer-upload-button,
.post-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.composer-tools .composer-icon-button {
  width: 42px;
  padding: 0;
  justify-self: start;
}

.composer-target-menu {
  position: relative;
  width: 42px;
}

.composer-emoji-menu {
  position: relative;
  width: 42px;
  height: 42px;
}

.composer-emoji-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  list-style: none;
  cursor: pointer;
}

.composer-emoji-menu summary::-webkit-details-marker {
  display: none;
}

.composer-emoji-menu[open] summary {
  background: var(--primary-soft);
  color: var(--primary);
}

.composer-emoji-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(4, 38px);
  gap: 7px;
  width: max-content;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.composer-emoji-popover button {
  display: grid;
  width: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 20px;
}

.composer-emoji-popover button:hover {
  background: var(--primary-soft);
}

.composer-emoji-icon {
  display: inline-grid;
  width: 21px;
  height: 21px;
  place-items: center;
  font-size: 21px;
  line-height: 1;
}

img.emoji {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin: 0 0.04em;
  vertical-align: -0.18em;
}

.composer-emoji-icon img.emoji {
  width: 21px;
  height: 21px;
  margin: 0;
  vertical-align: middle;
}

.composer-emoji-popover img.emoji,
.emoji-menu img.emoji {
  width: 22px;
  height: 22px;
  margin: 0;
  vertical-align: middle;
}

.composer-target-button[aria-expanded="true"] {
  background: var(--primary-soft);
  color: var(--primary);
}

.composer-target-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 12;
  display: grid;
  width: min(280px, calc(100vw - 32px));
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.composer-target-popover[hidden] {
  display: none;
}

.composer-target-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.composer-target-option small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.composer-target-option:hover,
.composer-target-option.is-selected {
  background: var(--primary-soft);
  color: var(--primary);
}

.composer-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.composer-image-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.composer-image-preview[hidden] {
  display: none;
}

.composer-image-preview img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: var(--surface-soft);
}

.composer-image-preview button {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 32, 51, 0.78);
  color: #fff;
  cursor: pointer;
}

.composer-image-preview button:hover {
  background: rgba(23, 32, 51, 0.92);
}

.composer-image-preview button svg {
  width: 18px;
  height: 18px;
}

.post-actions form {
  margin: 0;
}

.post-actions form button,
.post-actions > button {
  width: 100%;
}

.composer-tools button:hover,
.composer-upload-button:hover,
.post-actions button:hover,
.icon-button:hover,
.profile-button:hover,
.topbar-link-button:hover,
.ghost-button:hover,
.contact-actions button:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.notification-button.is-active,
.notification-button:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.post-actions button svg {
  width: 21px;
  height: 21px;
}

.post-actions .is-liked {
  background: var(--primary-soft);
  color: var(--primary);
}

.post-actions .is-error,
.comment-form input.is-error {
  box-shadow: 0 0 0 3px rgba(226, 109, 45, 0.18);
}

.composer-tools .primary-action {
  background: var(--primary);
  color: #fff;
}

.composer-tools .primary-action:hover {
  background: #0f55da;
  color: #fff;
}

.feed-list {
  display: grid;
  gap: 16px;
}

.feed-search-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feed-search-panel svg {
  position: absolute;
  left: 24px;
  color: var(--muted);
  pointer-events: none;
}

.feed-search-panel input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 14px 0 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
}

.feed-search-panel input:focus {
  border-color: rgba(20, 99, 255, 0.35);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.1);
}

.feed-search-panel button,
.feed-search-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.feed-search-panel a {
  background: var(--surface-soft);
  color: var(--text);
}

.load-more-posts {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(220px, 100%);
  min-height: 42px;
  margin: 16px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.load-more-posts:hover,
.load-more-posts:focus-visible {
  background: var(--primary-soft);
}

.load-more-posts:disabled {
  cursor: wait;
  opacity: 0.72;
}

.load-more-posts[hidden] {
  display: none;
}

.feed-sentinel {
  height: 1px;
}

.post-image {
  margin: 12px 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.post-image img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.post-link-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  margin: 12px 0 14px;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.post-link-preview:hover,
.post-link-preview:focus-visible {
  border-color: rgba(20, 99, 255, 0.32);
  box-shadow: 0 12px 30px rgba(20, 99, 255, 0.12);
}

.post-link-preview-image {
  display: block;
  min-height: 118px;
  background: var(--surface-soft);
}

.post-link-preview-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
}

.post-link-preview-body {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  padding: 14px;
}

.post-link-preview-body small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.post-link-preview-body strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.post-link-preview-body span {
  display: -webkit-box;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.composer-link-preview {
  position: relative;
  overflow: hidden;
  margin: 10px 0 12px 54px;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.composer-link-preview[hidden] {
  display: none;
}

.composer-link-preview > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  color: var(--text);
  text-decoration: none;
}

.composer-link-preview.has-image > a {
  grid-template-columns: 112px minmax(0, 1fr);
}

.composer-link-preview-image {
  display: block;
  min-height: 94px;
  background: var(--surface-soft);
}

.composer-link-preview-image[hidden] {
  display: none;
}

.composer-link-preview-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 94px;
  object-fit: cover;
}

.composer-link-preview-body {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 12px 44px 12px 12px;
}

.composer-link-preview-body small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.composer-link-preview-body strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.composer-link-preview-body span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.composer-link-preview button {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  cursor: pointer;
}

.composer-link-preview button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.composer-location-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 12px 54px;
  padding: 10px 42px 10px 12px;
  border: 1px solid rgba(15, 159, 143, 0.28);
  border-radius: 8px;
  background: #eefcf9;
}

.composer-location-preview[hidden] {
  display: none;
}

.composer-location-preview a,
.post-location-pill {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #087d72;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  text-decoration: none;
}

.composer-location-preview a {
  gap: 8px;
}

.composer-location-preview a span {
  overflow-wrap: anywhere;
}

.composer-location-preview a svg,
.post-location-pill svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.composer-location-preview button {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(15, 159, 143, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #087d72;
  cursor: pointer;
}

.composer-location-preview button svg {
  width: 15px;
  height: 15px;
}

.composer-icon-button.is-active {
  background: #eefcf9;
  color: #087d72;
}

.post-location-pill {
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 159, 143, 0.28);
  border-radius: 8px;
  background: #eefcf9;
  overflow-wrap: anywhere;
}

.post-location-pill span,
.post-location-pill small {
  min-width: 0;
}

.post-location-pill small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.post-card {
  padding: 16px;
}

.post-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.post-group-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 24px;
  margin-top: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.post-group-pill svg {
  width: 15px;
  height: 15px;
}

.avatar-stack {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.post-avatar,
.member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-link {
  display: inline-grid;
  width: fit-content;
  color: inherit;
  text-decoration: none;
}

.profile-name-link,
.profile-username-link {
  color: inherit;
  text-decoration: none;
}

.profile-name-link:hover,
.profile-username-link:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.ghost-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-weight: 900;
}

.post-menu {
  position: relative;
}

.post-menu summary {
  display: grid;
  place-items: center;
  list-style: none;
}

.post-menu summary::-webkit-details-marker {
  display: none;
}

.post-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  display: grid;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.post-menu:not([open]) .post-menu-dropdown {
  display: none;
}

.post-menu-dropdown form {
  margin: 0;
}

.post-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.post-menu-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.post-menu-item.is-danger {
  color: var(--danger);
}

.post-menu-item.is-danger:hover {
  background: rgba(214, 57, 57, 0.1);
  color: var(--danger);
}

.post-menu-item svg {
  width: 18px;
  height: 18px;
}

.post-card p {
  margin: 0 0 14px;
  color: #273044;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-media {
  display: grid;
  min-height: 240px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: clamp(24px, 5vw, 42px);
  font-weight: 900;
  text-align: center;
}

.gradient-media {
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(135deg, #1463ff, #0f9f8f 48%, #e26d2d);
}

.comment-preview {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.comment-preview strong,
.comment-preview span {
  display: block;
}

.comment-preview span {
  color: var(--muted);
}

.post-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.post-comments {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.comment-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: flex-start;
}

.comment-row .avatar-stack {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.comment-row > .comment-body {
  min-width: 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.comment-row strong,
.comment-row small {
  display: block;
}

.comment-row strong {
  font-size: 13px;
}

.comment-row p {
  margin: 2px 0;
  font-size: 14px;
}

.comment-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.comment-reply-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.comment-replies {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

.comment-replies:empty {
  display: none;
}

.comment-replies .comment-row {
  gap: 8px;
}

.comment-replies .comment-row .avatar-stack,
.comment-replies .comment-row .comment-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.comment-form[hidden] {
  display: none;
}

.comment-form input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  outline: none;
}

.comment-form input:focus {
  border-color: rgba(20, 99, 255, 0.35);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.1);
}

.comment-form button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.emoji-menu {
  position: relative;
}

.emoji-menu summary {
  display: grid;
  width: 40px;
  min-height: 40px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.emoji-menu summary::-webkit-details-marker {
  display: none;
}

.emoji-menu[open] summary,
.emoji-menu summary:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.emoji-menu div {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, 34px);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.emoji-menu button {
  display: grid;
  min-height: 34px;
  width: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 18px;
}

.emoji-menu button:hover {
  background: var(--primary-soft);
}

.reply-form {
  margin-top: 8px;
}

.sponsored-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.sponsored-card img {
  width: 82px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
}

.contact-actions {
  display: flex;
  gap: 6px;
}

.contact-actions button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
}

.contact-filter {
  height: 40px;
  margin-bottom: 10px;
  padding: 0 12px;
  border-radius: 8px;
}

.contact-list {
  display: grid;
  gap: 4px;
}

.contact-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.contact-item strong,
.contact-item small {
  display: block;
  text-decoration: none;
}

.contact-item:hover,
.contact-item:hover strong,
.contact-item:hover small,
.contact-item:focus,
.contact-item:focus strong,
.contact-item:focus small {
  text-decoration: none;
}

.contact-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.contact-item:hover,
.contact-item.is-selected {
  background: var(--surface-soft);
}

.contact-item.is-online::after {
  content: "";
  position: absolute;
  left: 39px;
  bottom: 8px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #17b26a;
}

.chat-panel {
  padding: 0;
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 210px;
  max-height: 280px;
  padding: 14px;
  overflow: auto;
  background: #fbfcfe;
}

.bubble {
  max-width: 85%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.4;
}

.bubble.their {
  align-self: flex-start;
  background: #edf1f7;
}

.bubble.mine {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.chat-input input {
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
}

.chat-input button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
}

.admin-body {
  background: #eef2f6;
}

.admin-topbar {
  grid-template-columns: minmax(180px, 260px) minmax(220px, 440px) 1fr minmax(260px, 320px);
}

.admin-shell {
  display: grid;
  grid-template-columns: minmax(230px, 286px) minmax(0, 1040px);
  gap: 24px;
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 24px 22px 44px;
}

.admin-content {
  min-width: 0;
}

.admin-hero,
.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-hero {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 99, 255, 0.08), transparent 36%),
    var(--surface);
  box-shadow: var(--shadow);
}

.admin-kicker,
.admin-heading span,
.admin-stat-card span,
.admin-stat-card small,
.admin-side-status span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-hero h1,
.admin-heading h1 {
  margin: 3px 0 0;
  font-size: 32px;
  line-height: 1.2;
}

.admin-hero p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff6ed;
  color: #a44914;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.admin-status-pill.is-ok {
  background: #ecfdf3;
  color: #067647;
}

.primary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.primary-link-button.compact {
  min-height: 42px;
}

.primary-link-button svg {
  width: 18px;
  height: 18px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.admin-stat-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  min-height: 148px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-stat-card span,
.admin-stat-card strong,
.admin-stat-card small {
  grid-column: 1;
}

.admin-stat-card strong {
  font-size: 32px;
  line-height: 1.1;
}

.admin-stat-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  grid-column: 2;
  grid-row: 1 / span 2;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.admin-stat-icon svg {
  width: 20px;
  height: 20px;
}

.admin-stat-card.is-teal .admin-stat-icon {
  background: #e7f8f5;
  color: var(--teal);
}

.admin-stat-card.is-purple .admin-stat-icon {
  background: #f2ecff;
  color: var(--purple);
}

.admin-stat-card.is-orange .admin-stat-icon {
  background: #fff2e9;
  color: var(--orange);
}

.admin-dashboard-grid,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
  gap: 16px;
}

.admin-panel-wide {
  min-width: 0;
}

.admin-status-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 6px;
}

.admin-status-row strong {
  display: block;
  font-size: 15px;
}

.admin-status-row p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: #e26d2d;
}

.status-dot.is-ok {
  background: #17b26a;
}

.admin-online,
.admin-warning {
  color: #067647;
}

.admin-warning {
  color: #a44914;
}

.admin-side-status {
  display: grid;
  gap: 6px;
}

.admin-side-status strong {
  font-size: 22px;
}

.admin-side-status p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.activity-list,
.moderation-list,
.system-check-list,
.admin-action-list {
  display: grid;
  gap: 10px;
}

.activity-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.activity-row strong,
.activity-row small {
  display: block;
}

.activity-row small {
  margin-top: 3px;
  color: var(--muted);
}

.activity-dot {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.activity-dot.teal {
  background: var(--teal);
}

.activity-dot.orange {
  background: var(--orange);
}

.system-check-list {
  margin-top: 16px;
}

.system-check-list div,
.moderation-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.system-check-list span,
.moderation-row span,
.moderation-row small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.system-check-list strong,
.moderation-row strong {
  font-size: 14px;
}

.moderation-row small {
  grid-column: 1 / -1;
  font-weight: 700;
}

.admin-action-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.admin-action-list a:hover {
  border-color: rgba(20, 99, 255, 0.2);
  background: var(--primary-soft);
  color: var(--primary);
}

.admin-action-list svg {
  width: 18px;
  height: 18px;
}

.admin-table-panel,
.admin-form-panel {
  min-width: 0;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-table td strong,
.admin-table td small {
  display: block;
}

.admin-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-inline-form select,
.settings-form input[type="text"],
.settings-form input[type="password"],
.settings-form input[type="file"],
.settings-form textarea {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.settings-form textarea {
  min-height: 108px;
  padding-top: 10px;
  resize: vertical;
  font-weight: 700;
}

.admin-inline-form button,
.danger-button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.admin-inline-form button:hover {
  background: #0f55da;
}

.danger-button {
  background: #c2410c;
}

.danger-button:hover {
  background: #9a3412;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-badge.is-ok {
  background: #ecfdf3;
  color: #067647;
}

.admin-badge.is-warning {
  background: #fff4ed;
  color: #a44914;
}

.content-admin-list {
  display: grid;
  gap: 12px;
}

.content-admin-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.content-admin-card header,
.content-admin-card footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.content-admin-card header strong,
.content-admin-card header small {
  display: block;
}

.content-admin-card header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.content-admin-card p {
  margin: 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.content-admin-card blockquote {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: #fff;
  color: var(--muted);
  line-height: 1.5;
}

.admin-post-thumb {
  display: block;
  width: min(260px, 100%);
  max-height: 180px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.settings-form {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.settings-tab-shell {
  display: grid;
  gap: 16px;
}

.settings-tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-tab-list {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.settings-tab-list label {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

#settings-tab-platform:checked ~ .settings-tab-list label[for="settings-tab-platform"],
#settings-tab-api:checked ~ .settings-tab-list label[for="settings-tab-api"] {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow);
}

.settings-tab-panel {
  display: none;
  gap: 16px;
}

#settings-tab-platform:checked ~ .settings-tab-panels .settings-panel-platform,
#settings-tab-api:checked ~ .settings-tab-panels .settings-panel-api {
  display: grid;
}

.api-help-box {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(20, 99, 255, 0.22);
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.api-help-box span {
  color: var(--muted);
  line-height: 1.45;
}

.settings-divider {
  width: 100%;
  margin: 4px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.recaptcha-box {
  overflow-x: auto;
}

.logo-setting-block {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.logo-preview {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-weight: 900;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-setting-fields {
  display: grid;
  gap: 12px;
}

.settings-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.settings-form .toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.setup-commands {
  display: grid;
  gap: 8px;
}

.setup-commands code {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #e7eefb;
  overflow-x: auto;
}

.setup-panel {
  grid-column: 1 / -1;
}

.admin-login-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(20, 99, 255, 0.08), transparent 36%),
    linear-gradient(315deg, rgba(15, 159, 143, 0.1), transparent 44%),
    #eef2f7;
}

.admin-login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 24px;
}

.admin-login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.72fr);
  width: min(1080px, 100%);
  min-height: 640px;
  overflow: hidden;
  border: 1px solid rgba(172, 182, 198, 0.55);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(18, 30, 54, 0.14);
}

.admin-login-visual {
  display: grid;
  align-content: space-between;
  gap: 28px;
  min-width: 0;
  padding: 34px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 36%),
    linear-gradient(180deg, #10213d, #153b57 55%, #0d7f7c);
  color: #fff;
}

.admin-login-card {
  display: grid;
  align-content: center;
  gap: 20px;
  min-width: 0;
  padding: 44px;
  background: var(--surface);
}

.admin-login-brand {
  width: fit-content;
  color: #fff;
}

.admin-login-brand .brand-mark {
  background: #fff;
  color: #123452;
}

.admin-login-copy {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.admin-login-copy span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
}

.admin-login-copy h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.04;
}

.admin-login-copy p {
  max-width: 440px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.6;
}

.admin-login-preview {
  width: min(520px, 108%);
  margin: 18px -70px -24px auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 50px rgba(3, 11, 24, 0.32);
}

.admin-login-preview img {
  display: block;
  width: 100%;
  min-height: 260px;
  object-fit: cover;
  object-position: left top;
}

.admin-login-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-login-heading h2 {
  margin: 6px 0 0;
  font-size: 32px;
  line-height: 1.2;
}

.admin-login-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-login-form {
  display: grid;
  gap: 16px;
}

.login-field {
  display: grid;
  gap: 7px;
}

.admin-login-form label {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.admin-login-form input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--text);
  outline: none;
}

.admin-login-form input::placeholder {
  color: #98a2b3;
}

.admin-login-form input:focus {
  border-color: rgba(20, 99, 255, 0.35);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.1);
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.login-submit svg {
  width: 18px;
  height: 18px;
}

.login-submit:hover {
  background: #0f55da;
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.google-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.google-login-button:hover {
  border-color: rgba(20, 99, 255, 0.28);
  background: var(--surface-soft);
}

.google-login-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
}

.policy-topbar {
  grid-template-columns: auto minmax(320px, 1fr) auto;
}

.policy-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.policy-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.policy-nav a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.policy-shell {
  width: min(900px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 46px;
}

.policy-card {
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.policy-card header {
  display: grid;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.policy-card header span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.policy-card h1,
.policy-card h2,
.policy-card p {
  margin: 0;
}

.policy-card h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.05;
}

.policy-card h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.policy-card p {
  color: var(--muted);
  line-height: 1.65;
}

.policy-footer {
  display: grid;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.policy-footer strong {
  color: var(--text);
}

.site-legal-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  max-width: calc(100% - 28px);
  margin: 14px auto 28px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px rgba(26, 38, 66, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.site-legal-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #4b5567;
  text-decoration: none;
}

.site-legal-footer a:hover {
  border-color: rgba(20, 99, 255, 0.18);
  background: var(--primary-soft);
  color: var(--primary);
}

.login-alert {
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.login-alert.is-error {
  border: 1px solid rgba(226, 109, 45, 0.35);
  background: #fff4ed;
  color: #a44914;
}

.login-alert.is-success {
  border: 1px solid rgba(23, 178, 106, 0.35);
  background: #ecfdf3;
  color: #067647;
}

.login-alert.is-info {
  border: 1px solid rgba(20, 99, 255, 0.28);
  background: var(--primary-soft);
  color: var(--primary);
}

.login-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-meta a {
  color: var(--muted);
  text-decoration: none;
}

.login-meta a:hover {
  color: var(--primary);
}

.reset-link-box {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(20, 99, 255, 0.22);
  border-radius: 8px;
  background: var(--primary-soft);
}

.reset-link-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.reset-link-box a {
  color: var(--primary);
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.notifications-shell {
  width: min(920px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 18px;
}

.notifications-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notifications-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.notifications-heading h1 {
  margin: 2px 0 0;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.05;
}

.notifications-heading span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.notification-avatar,
.notification-row .avatar-stack {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.notification-body {
  min-width: 0;
}

.notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
}

.notification-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.notification-body p {
  margin: 4px 0 8px;
  line-height: 1.5;
}

.notification-body blockquote {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-left: 3px solid rgba(20, 99, 255, 0.25);
  border-radius: 0 8px 8px 0;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.notification-post-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.notification-post-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-post-link svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.notification-empty {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed rgba(20, 99, 255, 0.28);
  border-radius: 8px;
  background: var(--primary-soft);
}

.notification-empty span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.profile-shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 18px;
}

.profile-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-heading h1 {
  margin: 2px 0 0;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.05;
}

.profile-heading span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.profile-form {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 22px;
  align-items: start;
}

.password-change-form {
  margin-top: 4px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.profile-avatar-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.profile-avatar-panel img {
  width: min(100%, 220px);
  aspect-ratio: 1;
  justify-self: center;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(26, 38, 66, 0.14);
}

.profile-avatar-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.profile-upload-control {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(20, 99, 255, 0.2);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-weight: 900;
  cursor: pointer;
}

.profile-upload-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.profile-fields {
  display: grid;
  gap: 14px;
}

.profile-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.profile-fields input,
.profile-fields textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.profile-fields textarea {
  resize: vertical;
}

.profile-fields input:focus,
.profile-fields textarea:focus {
  border-color: rgba(20, 99, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.1);
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
}

.profile-actions .primary-action {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.profile-public-card {
  gap: 22px;
}

.profile-public-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}

.profile-public-hero img {
  width: 150px;
  height: 150px;
  border: 5px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(26, 38, 66, 0.15);
}

.profile-public-hero span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.profile-public-hero h1 {
  margin: 4px 0 10px;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.04;
}

.profile-public-hero p,
.profile-empty-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.friend-action-form {
  display: flex;
  align-items: center;
  margin-top: 14px;
}

.friend-action-form form {
  margin: 0;
}

.friend-action-form .primary-action,
.friend-status-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
}

.friend-action-form .primary-action {
  border: 0;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

.friend-action-form .primary-action:hover,
.friend-action-form .primary-action:focus-visible {
  background: var(--primary-dark);
}

.friend-status-button {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  cursor: default;
}

.profile-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-detail-list div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.profile-detail-list .profile-wide-detail {
  grid-column: 1 / -1;
}

.profile-detail-list strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.profile-detail-list span,
.profile-detail-list a {
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.profile-detail-list a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guest-panel {
  display: grid;
  gap: 10px;
}

.guest-panel h2,
.empty-feed strong {
  margin: 0;
  font-size: 18px;
}

.guest-panel p,
.empty-feed p,
.muted-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.guest-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.empty-feed {
  display: grid;
  gap: 6px;
  text-align: center;
}

.user-auth-layout .admin-login-visual {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 36%),
    linear-gradient(180deg, #10213d, #253f7a 58%, #1463ff);
}

@media (max-width: 1180px) {
  .social-topbar {
    grid-template-columns: auto minmax(180px, 1fr) auto;
  }

  .topbar-tabs {
    display: none;
  }

  .social-shell {
    grid-template-columns: minmax(220px, 280px) minmax(430px, 680px);
  }

  .right-rail {
    display: none;
  }

  .admin-topbar {
    grid-template-columns: minmax(160px, 220px) minmax(180px, 1fr) auto;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-health-panel,
  .admin-quick-panel {
    min-width: 0;
  }

  .admin-login-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  }

  .admin-login-copy h1 {
    font-size: 38px;
  }

  .admin-login-card {
    padding: 36px;
  }
}

@media (max-width: 820px) {
  .social-topbar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px 14px;
  }

  .topbar-actions {
    justify-content: flex-end;
    min-width: 0;
  }

  .topbar-search,
  .profile-button span {
    display: none;
  }

  .admin-topbar {
    grid-template-columns: 1fr auto;
  }

  .group-hero {
    flex-direction: column;
  }

  .group-grid {
    grid-template-columns: 1fr;
  }

  .group-posts-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .group-member-row {
    grid-template-columns: auto 1fr;
  }

  .profile-shell {
    width: min(100% - 24px, 560px);
    padding-top: 14px;
  }

  .notifications-shell {
    width: min(100% - 24px, 560px);
    padding-top: 14px;
  }

  .notifications-panel,
  .profile-card {
    padding: 16px;
  }

  .notifications-heading,
  .profile-heading {
    flex-direction: column;
  }

  .notifications-heading .topbar-link-button,
  .profile-heading .topbar-link-button {
    width: 100%;
    font-size: 14px;
  }

  .profile-form {
    grid-template-columns: 1fr;
  }

  .profile-avatar-panel {
    position: static;
  }

  .profile-actions,
  .profile-actions .primary-action {
    width: 100%;
  }

  .profile-public-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-public-hero img {
    justify-self: center;
    width: 124px;
    height: 124px;
  }

  .profile-detail-list {
    grid-template-columns: 1fr;
  }

  .group-member-row form {
    grid-column: 1 / -1;
  }

  .group-member-row button {
    width: 100%;
  }

  .topbar-link-button {
    width: 42px;
    padding: 0;
  }

  .topbar-link-button svg {
    width: 20px;
    height: 20px;
  }

  .topbar-link-button {
    font-size: 0;
  }

  .social-shell {
    grid-template-columns: 1fr;
    padding: 14px 12px 28px;
  }

  .left-rail {
    position: static;
    display: block;
    max-height: none;
    overflow: visible;
  }

  .left-rail .panel:not(.user-card),
  .left-rail .nav-panel {
    display: none;
  }

  .user-card {
    margin-bottom: 0;
  }

  .stories-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feed-search-panel {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .feed-search-panel a {
    grid-column: 1 / -1;
  }

  .story-card {
    min-height: 140px;
  }

  .composer-tools {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .composer-target-menu,
  .composer-emoji-menu,
  .composer-tools .composer-icon-button {
    flex: 0 0 40px;
    width: 40px;
  }

  .composer-tools .composer-icon-button,
  .composer-tools .composer-target-button,
  .composer-emoji-menu summary,
  .composer-upload-button {
    min-height: 40px;
    height: 40px;
    padding: 0;
  }

  .composer-tools .primary-action {
    flex: 0 0 auto;
    margin-left: auto;
    min-height: 40px;
    padding: 0 16px;
  }

  .post-actions {
    grid-template-columns: 1fr;
  }

  .post-actions {
    grid-template-columns: repeat(3, 40px);
    justify-content: space-around;
    gap: 10px;
  }

  .post-actions form,
  .post-actions form button,
  .post-actions > button {
    width: 40px;
  }

  .post-actions button {
    min-height: 40px;
    padding: 0;
  }

  .post-actions button svg {
    width: 20px;
    height: 20px;
  }

  .post-media {
    min-height: 180px;
  }

  .post-link-preview {
    grid-template-columns: 1fr;
  }

  .post-link-preview-image,
  .post-link-preview-image img {
    min-height: 170px;
  }

  .composer-link-preview {
    margin-left: 0;
  }

  .composer-location-preview {
    margin-left: 0;
  }

  .composer-link-preview.has-image > a {
    grid-template-columns: 1fr;
  }

  .composer-link-preview-image,
  .composer-link-preview-image img {
    min-height: 150px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
    padding: 14px 12px 30px;
  }

  .admin-sidebar {
    position: static;
    display: block;
    max-height: none;
    overflow: visible;
  }

  .admin-sidebar .nav-panel {
    display: none;
  }

  .admin-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .admin-hero-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .admin-hero h1,
  .admin-heading h1 {
    font-size: 24px;
  }

  .admin-stats,
  .admin-dashboard-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-login-shell {
    padding: 14px;
  }

  .site-legal-footer {
    width: min(360px, calc(100% - 24px));
    max-width: none;
    margin: 10px auto 22px;
    padding: 8px;
    border-radius: 8px;
    gap: 6px;
    font-size: 12px;
  }

  .site-legal-footer a {
    flex: 1 1 140px;
    min-height: 38px;
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.72);
  }

  .admin-login-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .admin-login-visual {
    gap: 24px;
    padding: 24px;
  }

  .admin-login-copy h1 {
    font-size: 30px;
  }

  .admin-login-copy p {
    font-size: 15px;
  }

  .admin-login-preview {
    display: none;
  }

  .admin-login-card {
    padding: 24px;
  }

  .admin-login-heading h2 {
    font-size: 24px;
  }

  .login-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .brand-name {
    display: none;
  }

  .topbar-actions .icon-button:first-child:not(.notification-button) {
    display: none;
  }

  .stories-strip {
    display: flex;
    gap: 10px;
    overflow: auto;
    padding-bottom: 2px;
  }

  .story-card {
    min-width: 132px;
  }

  .post-actions {
    grid-template-columns: repeat(3, 36px);
  }

  .post-actions form,
  .post-actions form button,
  .post-actions > button {
    width: 36px;
  }

  .post-actions button {
    min-height: 36px;
  }

  .post-actions button svg {
    width: 19px;
    height: 19px;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }
}
