:root {
  --bg: #eef0f3;
  --card: #ffffff;
  --panel: #f6f7fb;
  --surface: #ffffff;
  --surface-alt: #f6f7fb;
  --muted: #8a8d96;
  --text: #1f2430;
  --accent: #df6367;
  --accent-soft: #fff3f3;
  --line: #e5e7eb;
  --shadow: 0 10px 30px rgba(17, 24, 39, .06);
  --radius: 18px;
}

html[data-theme="dark"] {
  --bg: #111827;
  --card: #18212f;
  --panel: #101a2b;
  --surface: #18212f;
  --surface-alt: #101a2b;
  --muted: #96a0b4;
  --text: #eef2ff;
  --accent: #ff7b7f;
  --accent-soft: rgba(255, 123, 127, .14);
  --line: #2b3547;
  --shadow: 0 16px 40px rgba(0, 0, 0, .34);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.icon-svg { width: 20px; height: 20px; display: block; }

.topbar {
  display: grid;
  grid-template-columns: 220px 116px 42px minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: white;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -.6px;
  color: #343434;
}
.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  flex: 0 0 auto;
}
.brand-text {
  line-height: 1;
  white-space: nowrap;
}
.nav-pill {
  background: #f6f7f9;
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  font-weight: 600;
  color: #61636b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tiny-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tiny-icon.filled {
  color: white;
}
.nav-pill.active { background: var(--accent); color: white; }
.app-grid {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f7f7f8;
  border: 1px solid #ececef;
  display: grid;
  place-items: center;
  color: #5d5f68;
}
.top-action {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #2b313d;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  position: relative;
}
.top-action .icon-svg {
  width: 28px;
  height: 28px;
}
.top-action:hover {
  transform: translateY(-1px);
}
.top-action.top-action-user,
.top-action.top-action-messages,
.top-action.top-action-bell {
  background: transparent !important;
  box-shadow: none !important;
}
.search-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  justify-self: center;
}
.search-wrap input {
  width: 100%;
  border: none;
  background: #f2f3f5;
  padding: 14px 48px 14px 18px;
  border-radius: 12px;
}
.search-submit,
.search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #50535d;
  border: none;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.search-submit .icon-svg {
  width: 20px;
  height: 20px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-self: end;
}

.top-action-wrap {
  position: relative;
}
.top-action-badge {
  position: absolute;
  top: -4px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 0 0 2px #fff;
}
.notifications-panel {
  position: absolute;
  top: calc(100% + 16px);
  right: -14px;
  width: 380px;
  background: #fff;
  border: 1px solid #ececef;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(30, 36, 50, .16);
  overflow: hidden;
  z-index: 30;
}
.notifications-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #ececef;
}
.notifications-panel-head h3 {
  margin: 0;
  font-size: 16px;
  color: #2f3440;
}
.notifications-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notifications-mark-read,
.notifications-clear {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.notifications-clear {
  color: #8c93a0;
}
.notifications-mark-read:hover,
.notifications-clear:hover {
  opacity: .86;
}
.notifications-panel-body {
  max-height: 460px;
  overflow: auto;
  padding: 8px 0;
}
.notification-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  color: inherit;
  text-decoration: none;
  transition: background .18s ease;
}
.notification-row:hover {
  background: #faf7f8;
}
.notification-row.is-unread {
  background: #fff6f7;
}
.notification-copy {
  min-width: 0;
  flex: 1;
}
.notification-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: #2f3440;
  line-height: 1.35;
}
.notification-text strong {
  font-weight: 700;
}
.notification-inline-emoji {
  font-size: 15px;
  line-height: 1;
}
.notification-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #8a8f99;
}
.notifications-empty {
  min-height: 260px;
  display: flex;
  padding: 30px 22px;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  gap: 8px;
  color: #808692;
}
.notifications-empty-bell {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: #fff2f2;
  color: var(--accent);
  display: grid;
  place-items: center;
}
.notifications-empty-bell .icon-svg {
  width: 30px;
  height: 30px;
}
.notifications-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: #2f3440;
}
.notifications-empty-text {
  font-size: 13px;
  line-height: 1.5;
  max-width: 240px;
}
@media (max-width: 900px) {
  .notifications-panel {
    right: -32px;
    width: min(92vw, 380px);
  }
}

.user-chip {
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:500;
  color: #4d5058;
}
.user-menu-combo {
  display: flex;
  align-items: center;
  gap: 6px;
}
.user-chip-link {
  text-decoration: none;
}
.user-chip-link:hover {
  color: #111827;
}
.user-chip-arrow {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.user-chip-arrow:hover .chip-down {
  color: #111827;
}
.topbar-avatar-shell {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f3dcc7;
  display: grid;
  place-items: center;
}
.topbar-avatar {
  width: 32px;
  height: 32px;
  font-size: 14px;
  box-shadow: none;
}
.chip-down {
  color: #2f3440;
  width: 16px;
  height: 16px;
  display: inline-flex;
}
.user-menu-wrap {
  position: relative;
  justify-self: end;
}
.user-chip-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.user-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 238px;
  background: #fff;
  border: 1px solid #ececef;
  border-radius: 20px;
  box-shadow: 0 22px 44px rgba(17, 24, 39, .16);
  padding: 8px;
  z-index: 40;
}
.user-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  color: #2f3440;
  font-weight: 700;
  line-height: 1.2;
}
.user-menu-item:hover {
  background: #f7f7f9;
}
.user-menu-theme-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.user-menu-theme-toggle [data-theme-toggle-label] {
  white-space: nowrap;
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .notifications-panel,
html[data-theme="dark"] .user-menu-panel,
html[data-theme="dark"] .search-wrap input,
html[data-theme="dark"] .nav-pill,
html[data-theme="dark"] .app-grid,
html[data-theme="dark"] .topbar-avatar-shell {
  background: var(--card);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .brand,
html[data-theme="dark"] .user-chip,
html[data-theme="dark"] .user-chip-link:hover,
html[data-theme="dark"] .chip-down,
html[data-theme="dark"] .top-action,
html[data-theme="dark"] .notifications-panel-head h3,
html[data-theme="dark"] .user-menu-item,
html[data-theme="dark"] .search-submit,
html[data-theme="dark"] .search-icon {
  color: var(--text);
}

html[data-theme="dark"] .nav-pill,
html[data-theme="dark"] .user-menu-item:hover {
  background: rgba(255, 255, 255, .04);
}

html[data-theme="dark"] .nav-pill.active {
  background: var(--accent);
  color: #fff;
}

html[data-theme="dark"] .search-wrap input::placeholder {
  color: var(--muted);
}

html[data-theme="dark"] .top-action-badge {
  box-shadow: 0 0 0 2px var(--card);
}


html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] .stories-card,
html[data-theme="dark"] .notice-card,
html[data-theme="dark"] .composer-card,
html[data-theme="dark"] .greeting-card,
html[data-theme="dark"] .post-card,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .trends-card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .edit-profile-card,
html[data-theme="dark"] .messages-sidebar,
html[data-theme="dark"] .messages-thread-panel,
html[data-theme="dark"] .feed-filter-banner,
html[data-theme="dark"] .image-preview-dialog,
html[data-theme="dark"] .post-more-toggle,
html[data-theme="dark"] .post-more-menu,
html[data-theme="dark"] .reaction-picker {
  background: var(--card);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .menu-item,
html[data-theme="dark"] .menu-arrow,
html[data-theme="dark"] .notice-card h3,
html[data-theme="dark"] .notice-card p,
html[data-theme="dark"] .greeting-card strong,
html[data-theme="dark"] .greeting-card p,
html[data-theme="dark"] .post-card p,
html[data-theme="dark"] .post-name,
html[data-theme="dark"] .comment-author,
html[data-theme="dark"] .trend-tag,
html[data-theme="dark"] .profile-card h2,
html[data-theme="dark"] .stats,
html[data-theme="dark"] .edit-profile-head h1,
html[data-theme="dark"] .edit-profile-head p,
html[data-theme="dark"] .edit-profile-field label,
html[data-theme="dark"] .messages-sidebar,
html[data-theme="dark"] .messages-thread-panel,
html[data-theme="dark"] .messages-empty-thread,
html[data-theme="dark"] .messages-no-selection {
  color: var(--text);
}

html[data-theme="dark"] .post-meta,
html[data-theme="dark"] .handle,
html[data-theme="dark"] .story-name,
html[data-theme="dark"] .empty-hashtags,
html[data-theme="dark"] .trend-count,
html[data-theme="dark"] .post-comments-total,
html[data-theme="dark"] .comment-time,
html[data-theme="dark"] .comment-text,
html[data-theme="dark"] .edit-profile-help,
html[data-theme="dark"] .helper,
html[data-theme="dark"] .empty-feed-state p,
html[data-theme="dark"] .notifications-empty-text {
  color: var(--muted);
}

html[data-theme="dark"] .composer-top input,
html[data-theme="dark"] .comment-form input,
html[data-theme="dark"] .auth-form input,
html[data-theme="dark"] .auth-form select,
html[data-theme="dark"] .edit-profile-field input,
html[data-theme="dark"] .edit-profile-field textarea,
html[data-theme="dark"] .edit-profile-field select,
html[data-theme="dark"] .relationship-picker-trigger,
html[data-theme="dark"] .messages-compose-form textarea,
html[data-theme="dark"] .profile-report-select,
html[data-theme="dark"] .profile-report-textarea {
  background: #0f172a;
  border: 1px solid var(--line);
  color: var(--text);
}

html[data-theme="dark"] .composer-top input::placeholder,
html[data-theme="dark"] .comment-form input::placeholder,
html[data-theme="dark"] .auth-form input::placeholder,
html[data-theme="dark"] .edit-profile-field textarea::placeholder,
html[data-theme="dark"] .profile-report-textarea::placeholder,
html[data-theme="dark"] .messages-compose-form textarea::placeholder {
  color: var(--muted);
}

html[data-theme="dark"] .composer-selected-image,
html[data-theme="dark"] .composer-selected-video,
html[data-theme="dark"] .comment-bubble,
html[data-theme="dark"] #imagePreviewImg,
html[data-theme="dark"] .preview-btn-light,
html[data-theme="dark"] .feed-filter-banner,
html[data-theme="dark"] .story.muted,
html[data-theme="dark"] .post-more-item:hover,
html[data-theme="dark"] .trend-link:hover,
html[data-theme="dark"] .trend-link.active,
html[data-theme="dark"] .comment-form input,
html[data-theme="dark"] .post-more-toggle:hover {
  background: #111b2d;
}

html[data-theme="dark"] .comment-bubble,
html[data-theme="dark"] .composer-selected-image,
html[data-theme="dark"] .composer-selected-video,
html[data-theme="dark"] #imagePreviewImg,
html[data-theme="dark"] .post-social-bar,
html[data-theme="dark"] .post-more-toggle,
html[data-theme="dark"] .post-image,
html[data-theme="dark"] .post-video,
html[data-theme="dark"] .modern-player {
  border-color: var(--line);
}

html[data-theme="dark"] .post-icon-button,
html[data-theme="dark"] .comment-action,
html[data-theme="dark"] .post-more-item,
html[data-theme="dark"] .post-more-item-icon,
html[data-theme="dark"] .preview-btn-light {
  color: var(--text);
}

html[data-theme="dark"] .post-icon-button {
  background: #111b2d;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 10px 22px rgba(3, 7, 18, .28);
}

html[data-theme="dark"] .post-icon-button:hover,
html[data-theme="dark"] .post-icon-button.copied {
  background: #16233a;
  border-color: rgba(255,255,255,.12);
  color: #fff;
}

html[data-theme="dark"] .post-icon-button.active {
  background: rgba(223, 99, 103, .14);
  border-color: rgba(223, 99, 103, .26);
}

html[data-theme="dark"] .post-more-item-copy span,
html[data-theme="dark"] .composer-selected-meta span {
  color: var(--muted);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .notifications-panel,
html[data-theme="dark"] .user-menu-panel,
html[data-theme="dark"] .stories-card,
html[data-theme="dark"] .notice-card,
html[data-theme="dark"] .composer-card,
html[data-theme="dark"] .greeting-card,
html[data-theme="dark"] .post-card,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .trends-card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .edit-profile-card,
html[data-theme="dark"] .messages-sidebar,
html[data-theme="dark"] .messages-thread-panel,
html[data-theme="dark"] .feed-filter-banner,
html[data-theme="dark"] .image-preview-dialog {
  background-image: none;
}

html[data-theme="dark"] .alert.error {
  background: rgba(180, 35, 24, .18);
  color: #ffb4b0;
}

html[data-theme="dark"] .alert.success {
  background: rgba(2, 122, 72, .18);
  color: #9bf6c3;
}

html[data-theme="dark"] .greeting-card {
  border-color: rgba(255, 123, 127, .45);
  background: linear-gradient(135deg, rgba(255, 123, 127, .08), rgba(24, 33, 47, 1));
}

html[data-theme="dark"] .trend-icon,
html[data-theme="dark"] .topbar-avatar-shell,
html[data-theme="dark"] .story,
html[data-theme="dark"] .story-plus,
html[data-theme="dark"] .preview-btn-danger,
html[data-theme="dark"] .composer-remove-selected {
  box-shadow: none;
}

html[data-theme="dark"] .story {
  background: #1d2940;
  border-color: #31415c;
}

html[data-theme="dark"] .story-plus {
  background: #31415c;
  border-color: #1d2940;
}

html[data-theme="dark"] .preview-btn-danger,
html[data-theme="dark"] .composer-remove-selected {
  background: rgba(255, 123, 127, .12);
  color: var(--accent);
}

html[data-theme="dark"] .user-menu-item:hover,
html[data-theme="dark"] .user-menu-theme-toggle:hover {
  background: rgba(255, 255, 255, .06);
}
.user-menu-item-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
}
.user-menu-item-icon .icon-svg {
  width: 20px;
  height: 20px;
}
.edit-profile-page {
  max-width: 860px;
  margin: 28px auto 44px;
  padding: 0 20px;
}
.edit-profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.edit-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.edit-profile-head h1 {
  margin: 0;
  font-size: 32px;
}
.edit-profile-head p {
  margin: 6px 0 0;
  color: #7d8390;
}
.edit-profile-form {
  display: grid;
  gap: 18px;
}
.edit-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.edit-profile-field {
  display: grid;
  gap: 8px;
}
.edit-profile-field label {
  font-size: 14px;
  font-weight: 700;
  color: #303440;
}
.edit-profile-field input,
.edit-profile-field textarea,
.edit-profile-field select,
.relationship-picker-trigger {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px 16px;
  background: #f8f9fb;
  color: #1f2430;
  outline: none;
}
.birthdate-grid {
  display: grid;
  grid-template-columns: 110px minmax(150px, 1fr) 120px;
  gap: 10px;
}
.edit-profile-field select {
  appearance: none;
  cursor: pointer;
}
.edit-profile-help {
  margin: 2px 0 0;
  font-size: 13px;
  color: #8c92a0;
}
.edit-profile-field textarea {
  min-height: 150px;
  resize: vertical;
}
.edit-profile-field input:focus,
.edit-profile-field textarea:focus,
.relationship-picker.is-open .relationship-picker-trigger,
.relationship-picker-trigger:focus {
  border-color: rgba(223, 99, 103, .45);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(223, 99, 103, .08);
}
.relationship-picker {
  position: relative;
}
.relationship-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  cursor: pointer;
}
.relationship-picker-trigger-copy {
  display: grid;
  gap: 3px;
}
.relationship-picker-kicker {
  font-size: 12px;
  color: #8c92a0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.relationship-picker-current {
  font-size: 16px;
  font-weight: 700;
  color: #1f2430;
}
.relationship-picker-trigger-icon {
  width: 20px;
  height: 20px;
  color: #8c92a0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease;
}
.relationship-picker-trigger-icon .icon-svg {
  width: 18px;
  height: 18px;
}
.relationship-picker.is-open .relationship-picker-trigger-icon {
  transform: rotate(180deg);
}
.relationship-picker-menu {
  position: absolute;
  inset: calc(100% + 10px) 0 auto;
  z-index: 45;
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(22, 27, 45, .14);
  padding: 14px;
}
.relationship-picker-menu-head {
  display: grid;
  gap: 4px;
  padding: 6px 6px 12px;
}
.relationship-picker-menu-head strong {
  font-size: 14px;
  color: #202531;
}
.relationship-picker-menu-head span {
  font-size: 13px;
  color: #8c92a0;
}
.relationship-picker-options {
  display: grid;
  gap: 8px;
}
.relationship-option {
  width: 100%;
  border: 1px solid #eceef2;
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.relationship-option:hover {
  border-color: rgba(223, 99, 103, .24);
  background: #fff8f8;
  transform: translateY(-1px);
}
.relationship-option.is-selected {
  border-color: rgba(223, 99, 103, .38);
  background: rgba(223, 99, 103, .08);
  box-shadow: inset 0 0 0 1px rgba(223, 99, 103, .08);
}
.relationship-option-main {
  display: grid;
  gap: 3px;
}
.relationship-option-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2430;
}
.relationship-option-subtitle {
  font-size: 12px;
  line-height: 1.4;
  color: #8c92a0;
}
.relationship-option-check {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #eceef2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: #fff;
  flex: 0 0 24px;
}
.relationship-option.is-selected .relationship-option-check {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.edit-profile-actions {
  display: flex;
  justify-content: flex-end;
}
.edit-profile-save {
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 14px 22px;
  cursor: pointer;
}
@media (max-width: 760px) {
  .edit-profile-grid {
    grid-template-columns: 1fr;
  }
  .edit-profile-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .relationship-picker-menu {
    position: static;
    margin-top: 10px;
  }
  .birthdate-grid {
    grid-template-columns: 1fr;
  }
}

.layout {
  display: grid;
  grid-template-columns: 230px minmax(420px, 1fr) 344px;
  gap: 18px;
  max-width: 1280px;
  margin: 20px auto;
}
.sidebar.left { padding: 10px 0; }
.menu-item {
  display:flex;
  gap:14px;
  align-items:center;
  padding: 10px 16px;
  margin: 4px 0;
  color:#31343d;
  border-radius: 14px;
  position: relative;
}
.menu-item span:last-child:not(.menu-arrow) {
  flex: 1;
}
.menu-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
}
.menu-icon .icon-svg {
  width: 21px;
  height: 21px;
  overflow: visible;
  shape-rendering: geometricPrecision;
}
.menu-arrow {
  color: #7c8088;
  margin-left: auto;
  display: inline-flex;
}
.menu-arrow .icon-svg { width: 14px; height: 14px; }
.menu-item.active,
.menu-item:hover { background: transparent; }
.feed-area, .sidebar.right { display:flex; flex-direction:column; gap:18px; }
.stories-card, .notice-card, .composer-card, .greeting-card, .post-card, .profile-card, .trends-card, .auth-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #eceef2;
}
.stories-card {
  display:flex;
  gap:14px;
  padding:18px;
  min-height: 168px;
}
.story {
  width: 114px;
  border-radius: 18px;
  border: 1px solid #c9b8a0;
  padding: 10px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background:#ead5b9;
  position: relative;
}
.story.muted {
  background:#f4efe6;
  align-items:center;
  justify-content:center;
  text-align:left;
  border-color: #b9ae9f;
}
.story-inner {
  font-weight:700;
  line-height:1.35;
  font-size: 12px;
}
.story-inner span {
  color: #1ca050;
  font-size: 13px;
}
.story-plus {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #b8aa95;
  display: grid;
  place-items: center;
  color: #fff;
  margin: -6px auto 0;
  border: 3px solid #e9d6bb;
}
.story-plus .icon-svg { width: 14px; height: 14px; }
.story-name { text-align:center; margin-top:8px; color:#5e6570; }
.notice-card { padding: 22px; position: relative; }
.notice-card h3 { margin:0 0 10px; font-size: 18px; }
.notice-card p { margin:0; color:#555c67; line-height:1.6; font-size: 15px; }
.notice-link { color: #df5e62; text-decoration: underline; }
.notice-card[hidden] { display: none !important; }
.notice-close {
  position: absolute;
  right: 14px;
  top: 12px;
  border: none;
  background: transparent;
  color: #b5b7bd;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 999px;
  transition: color 0.18s ease, transform 0.18s ease;
}
.notice-close:hover,
.notice-close:focus-visible {
  color: #8f95a3;
  transform: scale(1.04);
  outline: none;
}
.composer-card { padding: 18px; }
.composer-top { display:flex; align-items:center; gap:12px; }
.composer-top input {
  flex:1;
  border:none;
  background:#f3f4f6;
  border-radius:12px;
  padding:16px 18px;
}
.composer-top button, .auth-form button {
  background: var(--accent);
  color:white;
  border:none;
  border-radius:12px;
  padding: 14px 18px;
  font-weight:700;
  cursor:pointer;
}

.hidden-file-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.composer-actions {
  display:flex;
  gap:22px;
  padding: 16px 10px 4px;
  color:#3c414b;
  flex-wrap:wrap;
}
.composer-actions span,
.composer-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.composer-upload {
  cursor: pointer;
}
.composer-actions em {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  color: #ff9f00;
  background: #fff4dd;
  padding: 2px 5px;
  border-radius: 999px;
  margin-left: 2px;
}
.action-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.action-icon.plus { color: #8f4f53; }

.upload-remove .icon-svg {
  width: 16px;
  height: 16px;
}

.composer-selected-image,
.composer-selected-video {
  margin-top: 14px;
  border: 1px solid #eceef2;
  background: #fbfbfc;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.composer-selected-image[hidden],
.composer-selected-video[hidden] {
  display: none;
}
.composer-selected-image img,
.composer-selected-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  border: 1px solid #eceef2;
  background: #f3f4f6;
}

.mini-video-frame {
  width: 92px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #1f2937 0%, #0f172a 100%);
  border: 1px solid #eceef2;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.mini-video-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(17,24,39,.72);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 4px 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.composer-selected-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.composer-selected-meta strong {
  font-size: 14px;
}
.composer-selected-meta span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(320px, 46vw);
}
.composer-remove-selected {
  margin-left: auto;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #fff1f2;
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.greeting-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid #f1b4ba;
}
.greeting-card strong {
  font-size: 18px;
}
.greeting-card p {
  margin: 6px 0 0;
  color: #555c67;
}
.greeting-mark { font-size: 28px; }
.post-card { padding: 18px; }
.post-card + .post-card { margin-top: 0; }
.post-header { display:flex; gap:12px; align-items:flex-start; justify-content: space-between; margin-bottom: 12px; }
.post-header-main { display:flex; gap:12px; align-items:center; min-width: 0; flex: 1; }
.post-name { font-weight: 800; }
.post-more-wrap { position: relative; flex: 0 0 auto; }
.post-more-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid #eceef2;
  border-radius: 12px;
  background: #fff;
  color: #2f3440;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.post-more-toggle:hover {
  background: #faf7f4;
}
.post-more-toggle .icon-svg {
  width: 18px;
  height: 18px;
}
.post-more-menu[hidden],
.saved-posts-empty-state[hidden] {
  display: none !important;
}
.post-more-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, 76vw);
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #eceef2;
  box-shadow: 0 22px 50px rgba(15, 23, 42, .14);
  display: grid;
  gap: 6px;
  z-index: 40;
}
.post-more-item {
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 8px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  color: #20242e;
  text-decoration: none;
}
.post-more-item:hover {
  background: #faf7f4;
}
.post-more-item-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f3440;
}
.post-more-item-icon .icon-svg {
  width: 18px;
  height: 18px;
}
.post-more-item-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.post-more-item-copy strong {
  font-size: 15px;
  line-height: 1.2;
}
.post-more-item-copy span {
  font-size: 14px;
  color: #8a9099;
  line-height: 1.35;
}
.post-more-item-danger .post-more-item-icon,
.post-more-item-danger .post-more-item-copy strong {
  color: #df6367;
}
.post-action-hidden {
  display: none !important;
}
.feed-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #20242e;
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .24);
  font-size: 14px;
  z-index: 140;
}
.post-meta { color: var(--muted); font-size: 14px; }
.post-feeling-line { display:flex; align-items:center; gap:8px; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.post-feeling-icon { width: 18px; height: 18px; color: var(--accent); display:inline-flex; align-items:center; justify-content:center; flex: 0 0 auto; }
.post-feeling-icon .icon-svg { width: 16px; height: 16px; }
.post-feeling-copy { min-width: 0; }
.post-card p { margin:0; line-height:1.7; color:#323842; }
.post-reaction-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.post-reaction-summary.inline-right {
  justify-content: flex-end;
}
.post-reaction-preview {
  display: inline-flex;
  align-items: center;
  flex-direction: row-reverse;
}
.post-reaction-chip {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-left: -6px;
  background: #fff;
  border: none;
  box-shadow: none;
  border-radius: 50%;
}
.post-reaction-chip:first-child {
  margin-left: 0;
}
.reaction-chip-like,
.reaction-chip-love,
.reaction-chip-haha,
.reaction-chip-wow,
.reaction-chip-sad,
.reaction-chip-angry { background: #fff; }
.post-reaction-total {
  color: #8f8693;
  font-size: 15px;
  white-space: nowrap;
}
.post-image,
.post-video {
  width: 100%;
  margin-top: 14px;
  border-radius: 18px;
  display: block;
  max-height: 560px;
  object-fit: cover;
  border: 1px solid #eceef2;
  background: #0f172a;
}
.post-video {
  height: auto;
  margin-top: 0;
}

.modern-player:fullscreen,
.modern-player.is-fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin-top: 0;
  border-radius: 0;
  border: none;
  background: #000;
}
.modern-player:fullscreen .modern-player-video,
.modern-player.is-fullscreen .modern-player-video {
  height: 100vh;
  max-height: none;
  border-radius: 0;
  object-fit: contain;
  background: #000;
}
.modern-player:fullscreen .modern-player-gradient,
.modern-player.is-fullscreen .modern-player-gradient {
  border-radius: 0;
}
.modern-player:fullscreen .modern-player-controls,
.modern-player.is-fullscreen .modern-player-controls {
  left: 24px;
  right: 24px;
  bottom: 24px;
}
.modern-player:fullscreen .modern-player-overlay,
.modern-player.is-fullscreen .modern-player-overlay {
  transform: translate(-50%, -50%) scale(1.08);
}

.modern-player {
  position: relative;
  margin-top: 14px;
  border-radius: 22px;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(37, 99, 235, .24), transparent 38%), #0f172a;
  border: 1px solid #dfe4ea;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}
.preview-modern-player {
  margin-top: 0;
  border-radius: 24px;
}
.modern-player-video {
  width: 100%;
  display: block;
  background: #0f172a;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
.youtube-thumbnail-card {
  position: relative;
  cursor: pointer;
}
.youtube-thumbnail-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15,23,42,.08) 0%, rgba(15,23,42,0) 24%, rgba(15,23,42,0) 60%, rgba(15,23,42,.46) 100%);
}
.youtube-thumbnail-image {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}
.youtube-thumbnail-play {
  z-index: 3;
}
.youtube-thumbnail-controls {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(17,24,39,.58);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 24px rgba(15,23,42,.22);
  backdrop-filter: blur(14px);
  z-index: 3;
}
.youtube-thumbnail-label {
  flex: 1;
  color: #fff;
  font-weight: 700;
  letter-spacing: .01em;
}
.youtube-shell-fullscreen {
  margin-left: auto;
}
.youtube-modal[hidden] {
  display: none !important;
}
.youtube-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}
.youtube-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.76);
  backdrop-filter: blur(10px);
}
.youtube-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 32px));
  margin: min(5vh, 36px) auto;
}
.youtube-modal-close {
  position: absolute;
  top: -14px;
  right: -4px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(10px);
}
.youtube-modal-shell {
  background: #000;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.1);
}
.youtube-modal-frame {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}
.post-modern-player .modern-player-video {
  max-height: 560px;
}
.modern-player-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15,23,42,.22) 0%, rgba(15,23,42,0) 32%, rgba(15,23,42,0) 60%, rgba(15,23,42,.72) 100%);
}
.modern-player-topbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.modern-player-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, .62);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.modern-player-badge.subtle {
  color: #dbe4ff;
}
.modern-player-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(15,23,42,.28);
  z-index: 2;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
}
.modern-player-overlay:hover {
  transform: translate(-50%, -50%) scale(1.04);
  background: rgba(255,255,255,.18);
}
.modern-player.is-playing .modern-player-overlay {
  opacity: 0;
  pointer-events: none;
}
.modern-player-controls {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(17,24,39,.58);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 24px rgba(15,23,42,.22);
  backdrop-filter: blur(14px);
  z-index: 2;
}
.modern-player-controls,
.modern-player-gradient,
.modern-player-overlay {
  transition: opacity .24s ease, transform .24s ease, background .18s ease;
}
.modern-player.controls-hidden .modern-player-controls {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}
.modern-player.controls-hidden .modern-player-gradient {
  opacity: .18;
}
.modern-player.is-playing.controls-hidden {
  cursor: none;
}
.modern-player.is-playing.controls-hidden .modern-player-overlay {
  opacity: 0;
  pointer-events: none;
}
.modern-player-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.modern-player-btn:hover {
  background: rgba(255,255,255,.18);
  transform: translateY(-1px);
}
.modern-player-btn .icon-svg,
.modern-player-overlay .icon-svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.control-icon {
  display: none;
  line-height: 1;
  align-items: center;
  justify-content: center;
}
.control-icon-play,
.control-icon-volume,
.control-icon-expand {
  display: inline-flex;
}
.control-icon-compress,
.modern-player.is-fullscreen .control-icon-expand,
.modern-player:fullscreen .control-icon-expand {
  display: none;
}
.modern-player.is-fullscreen .control-icon-compress,
.modern-player:fullscreen .control-icon-compress {
  display: inline-flex;
}
.modern-player.is-playing .control-icon-play {
  display: none;
}
.modern-player.is-playing .control-icon-pause {
  display: inline-flex;
}
.modern-player.is-muted .control-icon-volume {
  display: none;
}
.modern-player.is-muted .control-icon-volume-off {
  display: inline-flex;
}
.modern-player-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}
.modern-player-progress,
.modern-player-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  outline: none;
  cursor: pointer;
}
.modern-player-volume {
  width: 88px;
  flex: 0 0 88px;
}
.modern-player-progress::-webkit-slider-thumb,
.modern-player-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.16);
}
.modern-player-progress::-moz-range-thumb,
.modern-player-volume::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.16);
}
.modern-player-time {
  min-width: 90px;
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: center;
}
.profile-card { overflow:hidden; text-align:center; }
.cover { height: 98px; }
.profile-card h2 { margin: 18px 0 6px; font-size: 26px; }
.handle { color: var(--muted); margin-bottom: 14px; }
.stats { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; padding: 0 12px 22px; color:#534f5a; }

.feed-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  margin-bottom: 18px;
}
.feed-filter-banner strong {
  display: block;
  margin-bottom: 4px;
  color: #7c2d12;
}
.feed-filter-banner p {
  margin: 0;
  color: #9a3412;
  font-size: 14px;
}
.clear-filter-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.empty-feed-state h3 {
  margin: 0 0 6px;
}
.empty-feed-state p {
  margin: 0;
  color: var(--muted);
}
.post-text {
  line-height: 1.65;
}

.post-colored-body,
.shared-post-body-colored {
  margin-top: 4px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--post-color-start), var(--post-color-end));
  color: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.post-colored-body {
  min-height: 220px;
  padding: 30px 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.post-colored-body-text {
  width: 100%;
  font-size: clamp(1.4rem, 2.3vw, 2rem);
  line-height: 1.45;
  font-weight: 800;
  word-break: break-word;
}

.shared-post-body-colored {
  padding: 16px 18px;
  font-weight: 700;
}

.post-colored-body-light {
  color: #1f2430;
}

.post-colored-body .hashtag-link,
.post-colored-body .mention-link,
.shared-post-body-colored .hashtag-link,
.shared-post-body-colored .mention-link {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.45);
}

.post-colored-body-light .hashtag-link,
.post-colored-body-light .mention-link {
  text-decoration-color: rgba(31, 36, 48, 0.34);
}
.hashtag-link,
.mention-link {
  color: #d9485f;
  font-weight: 700;
  text-decoration: none;
}
.hashtag-link:hover,
.mention-link:hover {
  text-decoration: underline;
}
.comment-text .hashtag-link,
.comment-text .mention-link,
.post-text .hashtag-link,
.post-text .mention-link {
  white-space: nowrap;
}
.trend-link {
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  padding-inline: 8px;
  margin-inline: -8px;
}
.trend-link:hover {
  background: #faf4f4;
}
.trend-link.active {
  background: #fff1f2;
}
.empty-hashtags {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.trends-card { padding: 22px; }
.trends-card h3 { margin-top:0; }
.trend-row {
  padding: 10px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.trend-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff0ef;
  display: grid;
  place-items: center;
  color: var(--accent);
  flex: 0 0 32px;
}
.trend-icon .icon-svg { width: 16px; height: 16px; }
.trend-tag { font-size: 14px; font-weight: 700; color:#5a5561; }
.trend-count { color: var(--muted); }
.avatar {
  display:grid;
  place-items:center;
  border-radius:50%;
  font-weight:800;
  color:#5f4029;
  border: 4px solid #fff;
}
.avatar.small { width:40px; height:40px; font-size:14px; border-width: 2px; }
.avatar.big { width:90px; height:90px; font-size:28px; margin: 2px auto 0; }
.avatar.profile { width:100px; height:100px; font-size:28px; margin: -44px auto 0; }

.avatar-has-image {
  color: transparent;
  text-shadow: none;
}

.profile-avatar-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-avatar-shell.is-editable {
  cursor: pointer;
}
.profile-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.profile-cover-upload-form {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
}
.profile-cover-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .48);
  color: #fff;
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .2);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}
.profile-cover-upload-btn:hover {
  background: rgba(15, 23, 42, .62);
}
.profile-hero:hover .profile-cover-upload-btn,
.profile-cover-upload-form:focus-within .profile-cover-upload-btn {
  opacity: 1;
  transform: translateY(0);
}
.profile-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-upload-icon .icon-svg {
  width: 18px;
  height: 18px;
}
.profile-avatar-upload-form {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}
.profile-avatar-upload-btn {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(15, 23, 42, .46);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  transform: scale(.97);
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}
.profile-avatar-upload-btn:hover {
  background: rgba(15, 23, 42, .58);
}
.profile-avatar-shell:hover .profile-avatar-upload-btn,
.profile-avatar-upload-form:focus-within .profile-avatar-upload-btn {
  opacity: 1;
  transform: scale(1);
}
.profile-avatar-upload-btn .icon-svg {
  width: 22px;
  height: 22px;
}
.profile-avatar-upload-text {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .01em;
}
@media (max-width: 760px) {
  .profile-cover-upload-btn {
    opacity: 1;
    transform: translateY(0);
  }
  .profile-avatar-upload-btn {
    opacity: 1;
    transform: scale(1);
  }
  .profile-cover-upload-btn span:last-child {
    display: none;
  }
  .profile-avatar-upload-text {
    display: none;
  }
}
html[data-theme="dark"] .profile-cover-upload-btn {
  background: rgba(2, 8, 23, .56);
}
html[data-theme="dark"] .profile-avatar-upload-btn {
  background: rgba(2, 8, 23, .56);
}
.auth-page { display:grid; place-items:center; min-height: calc(100vh - 74px); padding: 30px; }
.auth-card { width:min(460px, 94vw); padding: 28px; }
.auth-card h1 { margin:0 0 8px; }
.auth-card p { margin:0 0 20px; color:var(--muted); }
.auth-form { display:flex; flex-direction:column; gap:14px; }
.auth-form input, .auth-form select { border:1px solid var(--line); border-radius: 12px; padding: 14px 16px; background:#fff; }
.alert { border-radius:12px; padding:12px 14px; margin-bottom:12px; }
.alert.error { background:#fff1f2; color:#b42318; }
.alert.success { background:#ecfdf3; color:#027a48; }
.helper { color: var(--muted); margin-top: 14px; }
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; padding: 0 16px; }
  .sidebar.left, .sidebar.right { order: 2; }
  .feed-area { order: 1; }
  .topbar {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .top-actions {
    justify-content: flex-start;
  }
}


.image-preview-modal[hidden] {
  display: none;
}
.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .45);
}
.image-preview-dialog {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  margin: 8vh auto 0;
  background: #fff;
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: 0 24px 60px rgba(17, 24, 39, .22);
  border: 1px solid #eceef2;
}
.image-preview-close {
  position: absolute;
  right: 14px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff3f3;
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.image-preview-label {
  font-size: 18px;
  font-weight: 800;
  margin: 4px 0 14px;
  padding-right: 44px;
}
#imagePreviewImg {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  border-radius: 18px;
  background: #f6f7f9;
  border: 1px solid #eceef2;
}
.preview-modern-player .modern-player-video {
  max-height: 70vh;
}
.image-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.preview-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}
.preview-btn-light {
  background: #f3f4f6;
  color: #3c414b;
}
.preview-btn-danger {
  background: #fff1f2;
  color: #cf3746;
}


@media (max-width: 680px) {
  .modern-player-controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 8px;
    padding: 10px;
    min-height: 54px;
  }
  .modern-player-time {
    display: none;
  }
  .modern-player-volume {
    display: none;
  }
  .modern-player-overlay {
    width: 62px;
    height: 62px;
  }
}


.post-social-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eceef2;
}
.post-social-meta-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 90px;
  gap: 10px;
}
.post-action-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}
.reaction-form {
  position: relative;
}
.reaction-trigger-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.reaction-trigger-wrap.open .reaction-picker {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.reaction-trigger.has-reaction {
  color: #444b56;
}
.reaction-current-emoji {
  font-size: 24px;
  line-height: 1;
  display: inline-block;
}
.reaction-picker {
  position: absolute;
  left: -10px;
  bottom: calc(100% + 12px);
  background: #fff;
  border: 1px solid #e8eaef;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, .16);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px) scale(.96);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 20;
}
.reaction-choice {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  transition: transform .14s ease;
  background: transparent;
  box-shadow: none;
}
.reaction-choice:hover,
.reaction-choice:focus-visible {
  transform: translateY(-6px) scale(1.08);
  outline: none;
}
.reaction-choice-like,
.reaction-choice-love,
.reaction-choice-haha,
.reaction-choice-wow,
.reaction-choice-sad,
.reaction-choice-angry { background: transparent; }
.inline-action-form {
  margin: 0;
}
.post-icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: #f5f7fb;
  padding: 0;
  color: #5e6674;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
  transition: color .18s ease, transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.post-icon-button:hover,
.post-icon-button.copied {
  color: #1f2937;
  background: #ffffff;
  border-color: rgba(223, 99, 103, .28);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .1);
}
.post-icon-button.active {
  color: var(--accent);
  background: rgba(223, 99, 103, .10);
  border-color: rgba(223, 99, 103, .24);
  box-shadow: 0 10px 22px rgba(223, 99, 103, .16);
}
.post-icon-button:active {
  transform: translateY(1px) scale(.98);
}
.post-icon-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(223, 99, 103, .18), 0 12px 24px rgba(15, 23, 42, .1);
}
.post-icon-button .icon-svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.95;
}
.post-icon-button .reaction-current-emoji {
  font-size: 19px;
  line-height: 1;
}
@media (max-width: 680px) {
  .reaction-picker {
    left: 0;
    gap: 6px;
    padding: 7px 8px;
  }
  .reaction-choice {
    width: 38px;
    height: 38px;
    font-size: 21px;
  }
}
.post-comments-total {
  margin-top: 8px;
  font-size: 14px;
  color: #8f8693;
  text-align: right;
  white-space: nowrap;
}
.post-comments-area {
  margin-top: 12px;
}
.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.comment-avatar {
  flex: 0 0 40px;
}
.comment-body-wrap {
  min-width: 0;
  flex: 1;
}
.comment-bubble {
  background: #f4f6fb;
  border: 1px solid #eceff5;
  border-radius: 18px;
  padding: 12px 14px;
}
.comment-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.comment-author {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}
.comment-time {
  font-size: 13px;
  color: #9aa2ae;
}
.comment-text {
  color: #49525d;
  line-height: 1.55;
  font-size: 14px;
  margin-top: 4px;
}
.comment-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding-left: 14px;
}
.comment-action {
  border: none;
  background: transparent;
  padding: 0;
  color: #7e8692;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.comment-action:hover,
.comment-action.active {
  color: #eb5d61;
}
.comment-like-form {
  margin: 0;
  display: inline-flex;
}
.comment-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.comment-form input {
  flex: 1;
  border: none;
  background: #f0f2f5;
  border-radius: 11px;
  padding: 14px 16px;
  color: #4b5563;
}
.comment-form input::placeholder {
  color: #9aa2ae;
}
.comment-form input:focus {
  outline: 2px solid rgba(223, 99, 103, .14);
}
.comment-error {
  color: #b42318;
  font-size: 13px;
  margin: 8px 0 0 52px;
}

.post-reaction-summary-trigger {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.post-reaction-summary-trigger:hover .post-reaction-total {
  color: #6f6573;
}

.reactors-modal[hidden] {
  display: none;
}
.reactors-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
}
.reactors-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .36);
  backdrop-filter: blur(5px);
}
.reactors-dialog {
  position: relative;
  width: min(600px, calc(100vw - 28px));
  margin: 8vh auto 0;
  background: #fff;
  border-radius: 22px;
  border: 1px solid #eceef2;
  box-shadow: 0 28px 80px rgba(17, 24, 39, .26);
  padding: 18px 18px 14px;
}
.reactors-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #a0a4ab;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.reactors-title {
  font-size: 20px;
  font-weight: 800;
  color: #31343d;
  padding-right: 40px;
  margin-bottom: 12px;
}
.reactors-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 10px;
}
.reactors-filter {
  border: none;
  background: #f4f5f7;
  color: #4b5563;
  border-radius: 999px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-weight: 700;
}
.reactors-filter span:last-child {
  font-size: 12px;
  color: #7d8793;
}
.reactors-filter.is-active {
  background: #fff0f1;
  color: #cf4c58;
}
.reactors-filter.emoji-filter {
  padding: 8px 10px;
  min-width: 54px;
  justify-content: center;
}
.reactors-filter .emoji-only {
  font-size: 20px;
  line-height: 1;
}
.reactors-list {
  max-height: min(56vh, 420px);
  overflow-y: auto;
  padding-right: 6px;
}
.reactors-list::-webkit-scrollbar {
  width: 8px;
}
.reactors-list::-webkit-scrollbar-thumb {
  background: #d55661;
  border-radius: 999px;
}
.reactors-list::-webkit-scrollbar-track {
  background: transparent;
}
.reactor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 2px;
  border-top: 1px solid #eceef2;
}
.reactor-row:first-child {
  border-top: 1px solid #eceef2;
}
.reactor-row[hidden] {
  display: none;
}
.reactor-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.reactor-meta {
  min-width: 0;
}
.reactor-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.reactor-name {
  font-size: 14px;
  font-weight: 700;
  color: #373b44;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(230px, 35vw);
}
.reactor-item-emoji {
  font-size: 18px;
  line-height: 1;
}
.reactor-username {
  color: #9098a4;
  font-size: 13px;
  margin-top: 3px;
}
.reactor-follow-form {
  margin: 0;
}
.reactor-follow-btn,
.reactor-self-pill {
  border: none;
  border-radius: 4px;
  min-width: 88px;
  padding: 10px 14px;
  background: #d55661;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.reactor-follow-btn.is-following,
.reactor-self-pill {
  background: #f4f5f7;
  color: #505864;
}
.reactors-load-more {
  display: block;
  margin: 14px auto 4px;
  border: 1px solid #eceef2;
  border-radius: 12px;
  padding: 12px 22px;
  background: #fff;
  color: #d55661;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(17, 24, 39, .05);
}
.reactors-load-more[hidden] {
  display: none;
}

@media (max-width: 680px) {
  .reactors-dialog {
    margin-top: 4vh;
    padding: 16px 14px 14px;
  }
  .reactor-name {
    max-width: 36vw;
  }
  .reactor-follow-btn,
  .reactor-self-pill {
    min-width: 74px;
    padding: 9px 12px;
  }
}

.modern-player-topbar, .modern-player-badge, .mini-video-badge { display: none !important; }


@media (max-width: 720px) {
  .youtube-thumbnail-controls {
    min-height: 54px;
    padding: 8px 10px;
    gap: 10px;
  }
  .youtube-modal-dialog {
    width: calc(100vw - 18px);
    margin: 22px auto;
  }
  .youtube-modal-close {
    top: 8px;
    right: 8px;
  }
}


.messages-layout {
  grid-template-columns: 240px minmax(0, 1fr) 0;
}
.messages-page {
  grid-column: 2 / span 1;
  min-width: 0;
}
.messages-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.messages-sidebar,
.messages-thread-panel {
  background: #fff;
  border: 1px solid #ececef;
  border-radius: 20px;
  box-shadow: var(--shadow);
  min-height: 72vh;
}
.messages-sidebar {
  overflow: hidden;
}
.messages-sidebar-head,
.messages-thread-head {
  padding: 18px 20px;
  border-bottom: 1px solid #ececef;
}
.messages-sidebar-head h2 {
  margin: 0;
  font-size: 22px;
}
.messages-sidebar-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.messages-contact-list {
  max-height: calc(72vh - 84px);
  overflow: auto;
  padding: 8px;
}
.messages-contact {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 16px;
  transition: background .18s ease;
}
.messages-contact:hover {
  background: #faf7f8;
}
.messages-contact.active {
  background: #fff4f5;
}
.messages-contact-copy {
  min-width: 0;
  flex: 1;
}
.messages-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.messages-contact-row strong {
  font-size: 15px;
}
.messages-contact-row span {
  color: var(--muted);
  font-size: 12px;
}
.messages-contact-sub {
  margin-top: 3px;
}
.messages-contact-preview {
  color: #4b5563;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.messages-unread-pill {
  background: var(--accent);
  color: #fff !important;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px !important;
  font-weight: 700;
}
.messages-thread-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.messages-thread-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.messages-thread-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.messages-thread-body {
  flex: 1;
  padding: 22px;
  overflow: auto;
  background: linear-gradient(180deg, #fff 0%, #fbfbfc 100%);
}
.message-bubble-row {
  display: flex;
  margin-bottom: 14px;
}
.message-bubble-row.mine {
  justify-content: flex-end;
}
.message-bubble {
  max-width: min(78%, 560px);
  background: #f3f4f6;
  color: #1f2430;
  border-radius: 18px 18px 18px 6px;
  padding: 12px 14px;
  box-shadow: 0 6px 14px rgba(17, 24, 39, .05);
}
.message-bubble.mine {
  background: var(--accent);
  color: #fff;
  border-radius: 18px 18px 6px 18px;
}
.message-bubble-text {
  white-space: pre-wrap;
  line-height: 1.45;
}
.message-bubble-meta {
  margin-top: 7px;
  font-size: 11px;
  opacity: .72;
}
.messages-compose {
  border-top: 1px solid #ececef;
  padding: 16px 18px 18px;
}
.messages-compose-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.messages-compose-form textarea {
  flex: 1;
  resize: vertical;
  min-height: 58px;
  max-height: 180px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px 16px;
  background: #f7f8fa;
  outline: none;
}
.messages-compose-form textarea:focus {
  border-color: #efafb2;
  box-shadow: 0 0 0 4px rgba(223, 99, 103, .10);
}
.messages-compose-form button {
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 14px 18px;
  cursor: pointer;
}
.messages-empty-thread,
.messages-no-selection {
  color: var(--muted);
  display: grid;
  place-items: center;
  height: 100%;
  text-align: center;
  padding: 28px;
}
@media (max-width: 980px) {
  .messages-layout { grid-template-columns: 1fr; }
  .messages-page { grid-column: 1; }
  .messages-shell { grid-template-columns: 1fr; }
  .messages-sidebar, .messages-thread-panel { min-height: auto; }
  .messages-contact-list { max-height: 340px; }
}

.brand,
.user-chip,
.post-name a,
.post-meta a,
.reactor-name,
.reactor-username a,
.story-name,
.handle a {
  text-decoration: none;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.profile-page-wrap {
  max-width: 1280px;
  margin: 26px auto 36px;
  padding: 0 8px 32px;
}
.profile-hero {
  position: relative;
  overflow: visible;
  border-radius: 26px;
  background: #fff;
  border: 1px solid #ece7e7;
  box-shadow: 0 12px 28px rgba(31, 41, 55, .06);
  margin-bottom: 18px;
}
.profile-hero-cover {
  height: 308px;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  background: var(--profile-cover);
  background-image: var(--profile-cover-image, none), var(--profile-cover);
  background-size: cover, cover;
  background-position: center center, center center;
  position: relative;
}
.profile-hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, .06), rgba(15, 23, 42, .2) 42%, rgba(15, 23, 42, .56));
}
.profile-hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: .24;
}
.profile-hero-glow-a {
  width: 240px;
  height: 240px;
  background: rgba(255,255,255,.55);
  top: -28px;
  right: 120px;
}
.profile-hero-glow-b {
  width: 200px;
  height: 200px;
  background: rgba(255, 200, 160, .35);
  bottom: -46px;
  left: 22%;
}
.profile-hero-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 0 26px 18px;
  margin-top: -114px;
  position: relative;
  z-index: 2;
}
.profile-identity {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}
.profile-avatar {
  width: 118px;
  height: 118px;
  border-radius: 999px;
  border: 6px solid rgba(255,255,255,.9);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .18);
  font-size: 36px;
}
.profile-identity-copy { color: #fff; padding-bottom: 10px; text-shadow: 0 4px 14px rgba(0,0,0,.16); }
.profile-identity-title-row { display: flex; align-items: center; gap: 10px; }
.profile-identity-title-row h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
  color: #fff;
}
.profile-badge {
  background: #4da7ff;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}
.profile-live-badge {
  background: #ff4d5c;
  text-decoration: none;
}
.profile-handle {
  color: rgba(255,255,255,.92);
  font-size: 14px;
  margin-top: 6px;
}
.profile-live-link {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 77, 92, .18);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(4px);
}
.profile-live-link .icon-svg {
  width: 16px;
  height: 16px;
}
.profile-link-view { display: none; }
.profile-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.profile-inline-form { margin: 0; }
.profile-action-btn,
.profile-icon-btn {
  border: 0;
  background: #fff;
  color: #2a2d36;
  border-radius: 999px;
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}
.profile-action-btn .icon-svg,
.profile-icon-btn .icon-svg {
  width: 18px;
  height: 18px;
}
.profile-action-btn.primary {
  background: var(--accent);
  color: #fff;
}
.profile-action-btn.profile-live-action {
  background: #ff4d5c;
  color: #fff;
}
.profile-action-btn.secondary { color: #2f3440; }
.profile-icon-btn {
  width: 48px;
  padding: 0;
}
.profile-ring-btn.is-active {
  background: #fff4f4;
  color: var(--accent);
}
.profile-more-wrap {
  position: relative;
  z-index: 80;
}
.profile-more-menu[hidden] {
  display: none !important;
}
.profile-more-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 272px;
  background: #fff;
  border: 1px solid #ece7e7;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .14);
  padding: 8px;
  display: grid;
  gap: 6px;
  z-index: 30;
}
.profile-more-form {
  margin: 0;
}
.profile-more-item {
  border: 0;
  background: transparent;
  text-align: left;
  color: #2f3440;
  border-radius: 12px;
  padding: 12px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}
.profile-more-item:hover {
  background: #f6f7f9;
}
.profile-more-item:disabled {
  cursor: default;
  opacity: .78;
}
.profile-more-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #727786;
  flex: 0 0 auto;
}
.profile-more-item-icon .icon-svg {
  width: 18px;
  height: 18px;
}
.profile-more-item-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.profile-more-item-copy strong {
  font-size: 14px;
  color: #252933;
}
.profile-more-item-copy span {
  font-size: 13px;
  line-height: 1.35;
  color: #676d79;
  font-weight: 500;
}
.profile-more-item-danger .profile-more-item-icon {
  color: var(--accent);
}
.profile-report-modal[hidden] {
  display: none !important;
}
.profile-report-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.profile-report-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 31, 39, .38);
  backdrop-filter: blur(5px);
}
.profile-report-dialog {
  position: relative;
  width: min(430px, calc(100vw - 28px));
  margin: 110px auto 24px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, .22);
  padding: 16px;
  border: 1px solid #ece7e7;
}
.profile-report-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #8a909c;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.profile-report-close:hover {
  background: #f4f5f7;
  color: #2f3440;
}
.profile-report-close .icon-svg {
  width: 16px;
  height: 16px;
}
.profile-report-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 34px;
  margin-bottom: 14px;
}
.profile-report-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff3f3;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.profile-report-badge .icon-svg {
  width: 15px;
  height: 15px;
}
.profile-report-header h3 {
  margin: 0;
  font-size: 18px;
  color: #252933;
}
.profile-report-form {
  display: grid;
  gap: 12px;
}
.profile-report-select,
.profile-report-textarea {
  width: 100%;
  border: 1px solid #e2e4ea;
  border-radius: 12px;
  background: #f6f6f7;
  color: #2f3440;
  font: inherit;
}
.profile-report-select {
  min-height: 50px;
  padding: 0 14px;
}
.profile-report-textarea {
  min-height: 134px;
  padding: 14px;
  resize: vertical;
}
.profile-report-select:focus,
.profile-report-textarea:focus {
  outline: none;
  border-color: #b8d4ff;
  box-shadow: 0 0 0 3px rgba(90, 155, 255, .12);
  background: #fff;
}
.profile-report-textarea::placeholder {
  color: #8a909c;
}
.profile-report-actions {
  display: flex;
  justify-content: flex-end;
}
.profile-report-submit {
  border: 0;
  background: var(--accent);
  color: #fff;
  min-width: 78px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(223, 99, 103, .22);
}
.profile-report-submit:hover {
  filter: brightness(.98);
}
.profile-status-card {
  background: #fff;
  border: 1px solid #ece7e7;
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.profile-status-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #222733;
}
.profile-status-card p {
  margin: 0;
  color: #676d79;
}
.profile-tabs-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #ece7e7;
  border-radius: 22px;
  padding: 14px 18px;
  overflow-x: auto;
  margin-bottom: 16px;
}
.profile-tab-item {
  flex: 0 0 auto;
  min-width: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 14px;
  color: #4d5361;
  text-decoration: none;
  font-weight: 600;
}
.profile-tab-item.is-active { background: #f3f3f4; }
.profile-tab-icon .icon-svg { width: 18px; height: 18px; }
.profile-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .9fr);
  gap: 18px;
}
.profile-post-card { margin-bottom: 16px; }
.profile-side-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.profile-summary-card,
.profile-info-card,
.profile-bio-card {
  background: #fff;
  border: 1px solid #ece7e7;
  border-radius: 20px;
  padding: 18px;
}
.profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-summary-pill {
  background: #f7f7f8;
  border-radius: 16px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-summary-pill strong { font-size: 19px; }
.profile-summary-pill span,
.profile-info-row span { color: var(--muted); font-size: 13px; }
.profile-summary-pill[href] {
  text-decoration: none;
  color: inherit;
}
.profile-summary-pill.is-active {
  background: #fff3f4;
  border: 1px solid #f1d1d5;
}
.profile-follow-card {
  background: #fff;
  border: 1px solid #ece7e7;
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
}
.profile-follow-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.profile-follow-card-header h3 {
  margin: 0;
  font-size: 22px;
}
.profile-follow-card-header p {
  margin: 6px 0 0;
  color: var(--muted);
}
.profile-follow-count {
  min-width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f8;
  font-weight: 700;
  color: #353a45;
}
.profile-follow-list {
  display: grid;
}
.profile-follow-row {
  padding-left: 0;
  padding-right: 0;
}
.profile-follow-bio {
  color: #505864;
  font-size: 13px;
  margin-top: 6px;
  max-width: 540px;
}
.profile-follow-empty {
  padding: 18px 0 4px;
  color: var(--muted);
  font-weight: 600;
}
.profile-photos-card {
  background: #fff;
  border: 1px solid #ece7e7;
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
}
.profile-photos-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.profile-photos-header h3 {
  margin: 0;
  font-size: 22px;
}
.profile-photos-header p {
  margin: 6px 0 0;
  color: var(--muted);
}
.profile-photos-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.profile-photo-tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #ece7e7;
  background: #f4f4f6;
  text-decoration: none;
}
.profile-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .22s ease;
}
.profile-photo-tile:hover img,
.profile-photo-tile:focus-visible img {
  transform: scale(1.04);
}
.profile-photo-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: flex-end;
  padding: 10px;
  background: linear-gradient(180deg, rgba(8, 12, 22, 0) 0%, rgba(8, 12, 22, 0.7) 100%);
}
.profile-photo-time {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(12, 18, 29, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.profile-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.profile-video-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.profile-video-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #ece7e7;
  background: #111827;
}
.profile-video-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .22s ease;
}
.profile-video-tile:hover .profile-video-thumb,
.profile-video-tile:focus-visible .profile-video-thumb {
  transform: scale(1.04);
}
.profile-video-play-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(10, 14, 22, 0.72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.profile-video-play-badge .icon-svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
.profile-video-caption {
  display: block;
  color: #2f3440;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
.profile-info-card { display: grid; gap: 14px; }
.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 15px;
}
.profile-info-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.profile-info-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #f7f7f8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #df6367;
  flex: 0 0 auto;
}
.profile-info-icon .icon-svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
}
.profile-info-row strong {
  text-align: right;
}
.profile-bio-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
}
.profile-bio-card p {
  margin: 0;
  color: #4a4f5c;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .profile-main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .profile-page-wrap { padding: 0 6px 26px; }
  .profile-hero-cover { height: 220px; }
  .profile-hero-content {
    flex-direction: column;
    align-items: flex-start;
    margin-top: -72px;
    padding: 0 18px 18px;
  }
  .profile-avatar {
    width: 98px;
    height: 98px;
    border-radius: 999px;
    font-size: 28px;
  }
  .profile-hero-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .profile-action-btn.secondary { flex: 1; }
  .profile-more-wrap { margin-left: auto; }
  .profile-tabs-bar { padding: 10px; gap: 6px; }
  .profile-tab-item { min-width: auto; padding: 10px 12px; }
  .profile-photos-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-videos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .profile-photos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .profile-videos-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 10px; }
}


.stories-card-real {
  min-height: 0;
  padding: 16px 18px;
  overflow-x: auto;
  align-items: flex-start;
  scrollbar-width: none;
}
.stories-card-real::-webkit-scrollbar { display:none; }
.story-card-btn {
  border: none;
  background: transparent;
  padding: 0;
  width: 88px;
  flex: 0 0 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #283246;
}
.story-card-btn:focus-visible { outline: none; }
.story-ring {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  padding: 3px;
  display: grid;
  place-items: center;
  position: relative;
}
.story-ring-live {
  background: linear-gradient(135deg, #ff4d67 10%, #ff7a5e 55%, #ffbe57 100%);
  box-shadow: 0 10px 20px rgba(233, 82, 95, .22);
}
.story-ring-muted {
  background: #dfe4eb;
}
.story-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.story-thumb-media {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  display: block;
  object-fit: cover;
  border: 2px solid #fff;
  background: #eef2f7;
}
.story-avatar-thumb {
  width: 62px;
  height: 62px;
  font-size: 25px;
  border: 2px solid #fff;
}
.story-card-name {
  max-width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: #495167;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-add-badge {
  position: absolute;
  right: -2px;
  bottom: -1px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(229, 84, 94, .28);
}
.story-add-badge .icon-svg { width: 13px; height: 13px; }
.story-card-btn.is-seen .story-card-name { color:#717a8d; }
.profile-avatar-story {
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px rgba(255, 95, 104, .9), 0 0 0 10px rgba(255, 197, 92, .55);
  cursor: pointer;
}
.profile-story-link {
  border: none;
  cursor: pointer;
}
.story-ui-root[hidden] { display:none !important; }
.story-composer-modal,
.story-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
}
.story-modal-backdrop,
.story-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, .72);
  backdrop-filter: blur(8px);
}
.story-composer-dialog {
  position: relative;
  z-index: 1;
  width: min(540px, calc(100vw - 28px));
  margin: 8vh auto 0;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 34px 90px rgba(12, 18, 32, .24);
  padding: 24px;
}
.story-composer-head h3 {
  margin: 0;
  font-size: 26px;
}
.story-composer-head p {
  margin: 6px 0 0;
  color: #6a7282;
}
.story-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: rgba(245, 247, 250, .95);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 28px;
  color: #344055;
  cursor: pointer;
}
.story-composer-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}
.story-upload-box {
  border: 1.5px dashed #d7dce6;
  border-radius: 24px;
  padding: 26px 18px;
  text-align: center;
  background: #fafbff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #4b5568;
}
.story-upload-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(229, 84, 94, .08);
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  margin: 0 auto 8px;
}
.story-upload-icon .icon-svg { width: 25px; height: 25px; }
.story-composer-preview {
  min-height: 150px;
  border-radius: 24px;
  overflow: hidden;
  background: #0f1320;
  display: grid;
  place-items: center;
}
.story-composer-preview img,
.story-composer-preview video {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}
.story-composer-form textarea {
  min-height: 86px;
  border: 1px solid #e2e7ef;
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  resize: vertical;
}
.story-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.story-composer-status {
  color: #6b7383;
  font-size: 14px;
}
.story-submit-btn {
  border: none;
  background: linear-gradient(135deg, #f25462, #ff8b57);
  color: #fff;
  font-weight: 800;
  border-radius: 16px;
  padding: 14px 22px;
  cursor: pointer;
}
.story-viewer-shell {
  position: relative;
  z-index: 1;
  width: min(430px, calc(100vw - 18px));
  height: min(86vh, 780px);
  margin: 4vh auto 0;
  border-radius: 30px;
  overflow: hidden;
  background: #10131d;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .45);
}
.story-viewer-progress {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 14px;
  z-index: 3;
  display: flex;
  gap: 6px;
}
.story-progress-seg {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,.28);
  border-radius: 999px;
  overflow: hidden;
}
.story-progress-fill {
  width: 0;
  height: 100%;
  background: #fff;
  border-radius: inherit;
}
.story-viewer-top {
  position: absolute;
  top: 28px;
  left: 16px;
  right: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}
.story-viewer-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.story-viewer-user strong,
.story-viewer-user span {
  display: block;
}
.story-viewer-user span {
  color: rgba(255,255,255,.8);
  font-size: 13px;
}
.story-viewer-close {
  position: static;
  background: rgba(255,255,255,.14);
  color: #fff;
}
.story-viewer-avatar {
  color: #293040;
  border: 2px solid rgba(255,255,255,.85);
}
.story-viewer-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.story-viewer-stage img,
.story-viewer-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b0d13;
}
.story-viewer-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  z-index: 2;
  border: none;
  background: transparent;
  cursor: pointer;
}
.story-viewer-prev { left: 0; }
.story-viewer-next { right: 0; }
.story-viewer-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 3;
  color: #fff;
  background: rgba(0,0,0,.34);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 12px 14px;
  line-height: 1.45;
  font-size: 14px;
  backdrop-filter: blur(12px);
}
@media (max-width: 700px) {
  .story-card-btn { width: 80px; flex-basis: 80px; }
  .story-ring { width: 68px; height: 68px; }
  .story-thumb-media { width: 56px; height: 56px; }
  .story-avatar-thumb { width: 56px; height: 56px; font-size: 22px; }
  .story-viewer-shell { width: calc(100vw - 8px); height: 92vh; margin-top: 2vh; border-radius: 24px; }
}

/* Profile page + reaction UI dark mode refinements */
html[data-theme="dark"] .profile-hero,
html[data-theme="dark"] .profile-status-card,
html[data-theme="dark"] .profile-tabs-bar,
html[data-theme="dark"] .profile-summary-card,
html[data-theme="dark"] .profile-info-card,
html[data-theme="dark"] .profile-bio-card,
html[data-theme="dark"] .profile-follow-card,
html[data-theme="dark"] .profile-photos-card,
html[data-theme="dark"] .profile-more-menu,
html[data-theme="dark"] .profile-report-dialog,
html[data-theme="dark"] .reactors-dialog {
  background: var(--card);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .profile-status-card h3,
html[data-theme="dark"] .profile-follow-card-header h3,
html[data-theme="dark"] .profile-bio-card h3,
html[data-theme="dark"] .profile-photos-header h3,
html[data-theme="dark"] .profile-report-header h3,
html[data-theme="dark"] .profile-summary-pill strong,
html[data-theme="dark"] .profile-info-row strong,
html[data-theme="dark"] .profile-follow-count,
html[data-theme="dark"] .reactors-title,
html[data-theme="dark"] .reactor-name,
html[data-theme="dark"] .post-reaction-total {
  color: var(--text);
}

html[data-theme="dark"] .profile-status-card p,
html[data-theme="dark"] .profile-follow-card-header p,
html[data-theme="dark"] .profile-follow-bio,
html[data-theme="dark"] .profile-follow-empty,
html[data-theme="dark"] .profile-bio-card p,
html[data-theme="dark"] .profile-photos-header p,
html[data-theme="dark"] .profile-summary-pill span,
html[data-theme="dark"] .profile-info-row span,
html[data-theme="dark"] .reactor-username,
html[data-theme="dark"] .reactors-filter span:last-child,
html[data-theme="dark"] .profile-tab-item {
  color: var(--muted);
}

html[data-theme="dark"] .profile-tab-item,
html[data-theme="dark"] .profile-summary-pill,
html[data-theme="dark"] .profile-follow-count,
html[data-theme="dark"] .profile-info-icon,
html[data-theme="dark"] .reactors-filter,
html[data-theme="dark"] .reactor-follow-btn.is-following,
html[data-theme="dark"] .reactor-self-pill,
html[data-theme="dark"] .reactors-load-more {
  background: #111b2d;
  border-color: var(--line);
}

html[data-theme="dark"] .profile-tab-item.is-active,
html[data-theme="dark"] .profile-summary-pill.is-active,
html[data-theme="dark"] .reactors-filter.is-active {
  background: rgba(255, 123, 127, .12);
  border-color: rgba(255, 123, 127, .28);
  color: #ffd7d9;
}

html[data-theme="dark"] .profile-tab-item.is-active span,
html[data-theme="dark"] .profile-summary-pill.is-active span,
html[data-theme="dark"] .profile-summary-pill.is-active strong,
html[data-theme="dark"] .reactors-filter.is-active span:last-child {
  color: inherit;
}

html[data-theme="dark"] .profile-info-icon,
html[data-theme="dark"] .profile-report-badge,
html[data-theme="dark"] .profile-more-item-icon {
  color: var(--accent);
}

html[data-theme="dark"] .profile-more-item,
html[data-theme="dark"] .profile-more-item-copy strong,
html[data-theme="dark"] .profile-report-close,
html[data-theme="dark"] .reactors-close,
html[data-theme="dark"] .reactors-filter,
html[data-theme="dark"] .reactors-load-more {
  color: var(--text);
}

html[data-theme="dark"] .profile-more-item:hover,
html[data-theme="dark"] .profile-report-close:hover,
html[data-theme="dark"] .reactors-load-more:hover {
  background: rgba(255, 255, 255, .05);
}

html[data-theme="dark"] .profile-more-item-copy span {
  color: var(--muted);
}

html[data-theme="dark"] .profile-info-row,
html[data-theme="dark"] .reactor-row {
  border-color: var(--line);
}

html[data-theme="dark"] .profile-report-select:focus,
html[data-theme="dark"] .profile-report-textarea:focus {
  background: #0f172a;
  border-color: rgba(255, 123, 127, .34);
  box-shadow: 0 0 0 3px rgba(255, 123, 127, .12);
}

html[data-theme="dark"] .post-reaction-chip {
  background: #111b2d;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 2px var(--card);
}

html[data-theme="dark"] .reaction-chip-like,
html[data-theme="dark"] .reaction-chip-love,
html[data-theme="dark"] .reaction-chip-haha,
html[data-theme="dark"] .reaction-chip-wow,
html[data-theme="dark"] .reaction-chip-sad,
html[data-theme="dark"] .reaction-chip-angry {
  background: #111b2d;
}

html[data-theme="dark"] .post-reaction-summary-trigger:hover .post-reaction-total {
  color: #ffffff;
}

html[data-theme="dark"] .reaction-trigger.has-reaction,
html[data-theme="dark"] .reactor-item-emoji {
  color: var(--text);
}


/* Global dark mode consistency pass */
html[data-theme="dark"] .menu-item,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .people-card,
html[data-theme="dark"] .people-info-card,
html[data-theme="dark"] .admin-sidebar,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .admin-panel {
  background: var(--card);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .settings-title h1,
html[data-theme="dark"] .people-header h2,
html[data-theme="dark"] .people-name,
html[data-theme="dark"] .people-info-card h3,
html[data-theme="dark"] .settings-icon,
html[data-theme="dark"] .notification-setting-label,
html[data-theme="dark"] .admin-sidebar h2,
html[data-theme="dark"] .admin-card strong,
html[data-theme="dark"] .admin-form label,
html[data-theme="dark"] .admin-switch span,
html[data-theme="dark"] .admin-inline-check,
html[data-theme="dark"] .admin-nav a,
html[data-theme="dark"] .admin-table td,
html[data-theme="dark"] .admin-table td a {
  color: var(--text);
}

html[data-theme="dark"] .settings-title p,
html[data-theme="dark"] .people-header p,
html[data-theme="dark"] .people-username a,
html[data-theme="dark"] .people-bio,
html[data-theme="dark"] .people-tip,
html[data-theme="dark"] .people-info-card p,
html[data-theme="dark"] .people-empty,
html[data-theme="dark"] .notification-global-note,
html[data-theme="dark"] .admin-sidebar p,
html[data-theme="dark"] .admin-card h3,
html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-section-head p,
html[data-theme="dark"] .admin-file-name,
html[data-theme="dark"] .admin-help,
html[data-theme="dark"] .admin-muted {
  color: var(--muted);
}

html[data-theme="dark"] .settings-icon,
html[data-theme="dark"] .people-count,
html[data-theme="dark"] .people-pill,
html[data-theme="dark"] .settings-panel-tab,
html[data-theme="dark"] .notification-toggle-ui,
html[data-theme="dark"] .admin-nav a,
html[data-theme="dark"] .admin-switch,
html[data-theme="dark"] .admin-btn.secondary,
html[data-theme="dark"] .admin-file-picker,
html[data-theme="dark"] .admin-logo-preview,
html[data-theme="dark"] .admin-story-thumb.video,
html[data-theme="dark"] .admin-badge,
html[data-theme="dark"] .admin-badge.warn,
html[data-theme="dark"] .admin-badge.off {
  background: #111b2d;
  border-color: var(--line);
}

html[data-theme="dark"] .settings-panel-tab.active,
html[data-theme="dark"] .notification-toggle input:checked + .notification-toggle-ui,
html[data-theme="dark"] .admin-nav a:hover,
html[data-theme="dark"] .admin-nav a:focus-visible {
  background: rgba(255, 123, 127, .12);
  border-color: rgba(255, 123, 127, .28);
  color: #ffd7d9;
}

html[data-theme="dark"] .people-search-input,
html[data-theme="dark"] .admin-form input[type=text],
html[data-theme="dark"] .admin-form textarea,
html[data-theme="dark"] .admin-form input[type=search],
html[data-theme="dark"] .admin-input-inline input[type=number] {
  background: #0f172a;
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .people-search-input::placeholder,
html[data-theme="dark"] .admin-form input[type=text]::placeholder,
html[data-theme="dark"] .admin-form textarea::placeholder,
html[data-theme="dark"] .admin-form input[type=search]::placeholder {
  color: var(--muted);
}

html[data-theme="dark"] .people-search-input:focus,
html[data-theme="dark"] .admin-form input[type=text]:focus,
html[data-theme="dark"] .admin-form textarea:focus,
html[data-theme="dark"] .admin-form input[type=search]:focus,
html[data-theme="dark"] .admin-file-picker:focus-within {
  outline: none;
  border-color: rgba(255, 123, 127, .34);
  box-shadow: 0 0 0 3px rgba(255, 123, 127, .12);
}

html[data-theme="dark"] .people-clear-btn,
html[data-theme="dark"] .people-open-btn {
  background: #111b2d;
  color: var(--text);
  border: 1px solid var(--line);
}

html[data-theme="dark"] .people-clear-btn:hover,
html[data-theme="dark"] .people-open-btn:hover,
html[data-theme="dark"] .settings-panel-tab:hover,
html[data-theme="dark"] .admin-btn.secondary:hover {
  background: #182338;
}

html[data-theme="dark"] .people-row,
html[data-theme="dark"] .notification-setting-row,
html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-table td {
  border-color: var(--line);
}

html[data-theme="dark"] .notification-global-note {
  background: rgba(255, 180, 0, .10);
  border-color: rgba(255, 180, 0, .22);
}

html[data-theme="dark"] .admin-logo-preview img {
  background: #0f172a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .24);
}


html[data-theme="dark"] .profile-photo-tile {
  background: #101b31;
  border-color: var(--line);
}
html[data-theme="dark"] .profile-photo-time {
  background: rgba(9, 14, 26, 0.82);
  color: #f8fbff;
}


html[data-theme="dark"] .profile-video-media {
  border-color: rgba(124, 146, 198, 0.2);
  background: #0b1220;
}
html[data-theme="dark"] .profile-video-caption {
  color: #dbe7ff;
}
html[data-theme="dark"] .profile-video-play-badge {
  background: rgba(10, 16, 28, 0.78);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
}


body.share-modal-open {
    overflow: hidden;
}

.shared-post-card {
    display: block;
    margin: 14px 0 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    text-decoration: none;
    color: inherit;
}

.shared-post-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.shared-post-name {
    font-weight: 700;
    color: var(--text);
}

.shared-post-username {
    font-size: 13px;
    color: var(--muted);
}

.shared-post-feeling-line {
    margin-top: 4px;
    font-size: 13px;
}

.shared-post-body {
    margin-top: 10px;
    color: var(--text);
    line-height: 1.55;
}

.shared-post-media {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 12px;
    display: block;
}

.shared-post-media-video {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-weight: 700;
}

.shared-post-video {
    background: #000;
}

.share-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
}

.share-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 24, 0.58);
    backdrop-filter: blur(4px);
}

.share-modal-dialog {
    position: relative;
    width: min(640px, calc(100vw - 24px));
    margin: 28px auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.32);
    padding: 22px;
    max-height: calc(100vh - 56px);
    overflow: auto;
}

.share-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 28px;
    cursor: pointer;
}

.share-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 18px;
}

.share-social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.share-social-link {
    width: 90px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
}

.share-social-link span {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
}

.share-social-twitter span { background: #1d9bf0; }
.share-social-facebook span { background: #1877f2; }
.share-social-whatsapp span { background: #25d366; }
.share-social-linkedin span { background: #0a66c2; }
.share-social-telegram span { background: #2aabee; }

.share-target-box {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.share-target-box-single {
    padding-top: 0;
}


.share-target-title {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 12px;
}

.share-target-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
}

.share-target-item input {
    accent-color: var(--accent);
}

.share-modal-form textarea {
    width: 100%;
    min-height: 110px;
    margin-top: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    padding: 16px 18px;
    resize: vertical;
    font: inherit;
}

.share-modal-form textarea::placeholder {
    color: var(--muted);
}

.share-preview-card {
    margin-top: 16px;
    padding: 14px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
}

.share-preview-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-preview-meta {
    min-width: 0;
}

.share-preview-author {
    font-weight: 700;
    color: var(--text);
}

.share-preview-time {
    font-size: 13px;
    color: var(--muted);
}

.share-preview-body {
    margin-top: 10px;
    color: var(--text);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.share-preview-media {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    margin-top: 12px;
    border-radius: 14px;
    display: block;
}

.share-preview-video {
    margin-top: 12px;
    min-height: 84px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-weight: 700;
}

.share-preview-video-player {
    background: #000;
}

.share-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.share-submit-btn {
    appearance: none;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #ff7f86);
    color: #fff;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.01em;
    padding: 12px 18px;
    min-width: 152px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 28px rgba(255, 107, 114, 0.26);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.share-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(255, 107, 114, 0.30);
}

.share-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 10px 22px rgba(255, 107, 114, 0.24);
}

.share-submit-btn:focus-visible,
.share-modal-form textarea:focus-visible,
.share-modal-close:focus-visible {
    outline: 2px solid rgba(255, 107, 114, 0.42);
    outline-offset: 2px;
}

.share-modal-close:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text);
}

.share-modal-form textarea:focus {
    border-color: rgba(255, 107, 114, 0.32);
    box-shadow: 0 0 0 4px rgba(255, 107, 114, 0.08);
}

@media (max-width: 640px) {
    .share-modal-dialog {
        width: calc(100vw - 16px);
        margin: 12px auto;
        padding: 18px;
        border-radius: 20px;
        max-height: calc(100vh - 24px);
    }

    .share-submit-btn {
        width: 100%;
    }

    .share-modal-actions {
        justify-content: stretch;
    }
}


body.composer-modal-open {
    overflow: hidden;
}

.composer-launcher-card {
    padding: 20px;
}

.composer-launcher {
    display: flex;
    align-items: center;
    gap: 14px;
}

.composer-launcher-input {
    flex: 1;
    min-height: 52px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-alt);
    color: var(--muted);
    text-align: left;
    padding: 0 18px;
    font-size: 15px;
    cursor: pointer;
}

.composer-launcher-submit,
.composer-modal-submit {
    border: none;
    border-radius: 16px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    padding: 14px 20px;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(223, 99, 103, 0.18);
}

.composer-launcher-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.composer-launch-chip,
.composer-modal-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-alt);
    color: var(--text);
    padding: 11px 15px;
    cursor: pointer;
    font-weight: 600;
}

.composer-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
}

.composer-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 20, 32, 0.56);
    backdrop-filter: blur(6px);
}

.composer-modal-dialog {
    position: relative;
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    margin: 24px auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(15, 20, 32, 0.28);
    padding: 24px;
    overflow-y: auto;
}

.composer-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-alt);
    color: var(--muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.composer-modal-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 18px;
}

.composer-modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.composer-modal-top {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
}

.composer-modal-top textarea {
    width: 100%;
    min-height: 112px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface-alt);
    color: var(--text);
    padding: 16px 18px;
    resize: vertical;
    font: inherit;
    outline: none;
    box-shadow: none;
}

.composer-modal-top textarea:focus,
.composer-poll-options input:focus,
.composer-gif-search-row input:focus,
.composer-feeling-input-wrap input:focus {
    border-color: rgba(223, 99, 103, 0.45);
    box-shadow: 0 0 0 3px rgba(223, 99, 103, 0.12);
}

.composer-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.composer-color-row[hidden] {
    display: none !important;
}

.composer-color-swatches {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.composer-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid transparent;
    padding: 0;
    background: linear-gradient(135deg, var(--post-color-start), var(--post-color-end));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 8px 16px rgba(15, 23, 42, 0.12);
    cursor: pointer;
}

.composer-color-swatch.is-active {
    transform: scale(1.08);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.72), 0 0 0 3px rgba(223, 99, 103, 0.18);
}

.composer-color-clear {
    border: none;
    border-radius: 12px;
    background: rgba(223, 99, 103, 0.12);
    color: var(--accent);
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.composer-color-clear[hidden] {
    display: none !important;
}

.composer-modal-top textarea.is-color-preview {
    background: linear-gradient(135deg, var(--post-color-start), var(--post-color-end));
    color: #fff;
    border-color: transparent;
}

.composer-modal-top textarea.is-color-preview::placeholder {
    color: rgba(255,255,255,.72);
}

.composer-modal-top textarea.is-color-preview.post-color-preview-light {
    color: #1f2430;
}

.composer-modal-top textarea.is-color-preview.post-color-preview-light::placeholder {
    color: rgba(31,36,48,.58);
}

.composer-modal-actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.composer-inline-error {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(223, 99, 103, 0.28);
    background: rgba(223, 99, 103, 0.12);
    color: #b43238;
    font-size: 0.92rem;
    font-weight: 700;
}

.composer-feeling-builder,
.composer-poll-builder,
.composer-gif-builder {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface-alt);
    padding: 18px;
}

.composer-gif-builder[hidden],
.composer-feeling-builder[hidden] {
    display: none;
}

.composer-feeling-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.composer-feeling-head strong {
    display: block;
    font-size: 16px;
}

.composer-feeling-head span {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

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

.composer-feeling-choice {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    font-weight: 700;
}

.composer-feeling-choice.is-active {
    border-color: rgba(223, 99, 103, 0.45);
    background: rgba(223, 99, 103, 0.08);
    box-shadow: 0 0 0 3px rgba(223, 99, 103, 0.08);
}

.composer-feeling-input-wrap {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.composer-feeling-input-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.composer-feeling-input-wrap input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    padding: 13px 14px;
    font: inherit;
}

.composer-feeling-input-wrap input:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.composer-feeling-clear,
.composer-poll-remove,
.composer-poll-add,
.composer-gif-clear,
.composer-gif-search-btn {
    border: none;
    border-radius: 12px;
    background: rgba(223, 99, 103, 0.12);
    color: var(--accent);
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.composer-poll-head,
.composer-gif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.composer-poll-head strong,
.composer-gif-head strong {
    display: block;
    font-size: 16px;
}

.composer-poll-head span,
.composer-gif-head span {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.composer-poll-options {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.composer-gif-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 12px;
}

.composer-gif-search-row input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    padding: 13px 14px;
    font: inherit;
    outline: none;
}

.composer-gif-status {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.composer-gif-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.composer-gif-tile {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    padding: 0;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.composer-gif-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.composer-gif-tile.is-selected {
    border-color: rgba(223, 99, 103, 0.5);
    box-shadow: 0 0 0 3px rgba(223, 99, 103, 0.14);
}

.composer-poll-options input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    padding: 13px 14px;
    font: inherit;
    outline: none;
}

.composer-selected-gif img {
    object-fit: cover;
}

.composer-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
}

.composer-modal-hint {
    color: var(--muted);
    font-size: 14px;
}

.composer-modal-submit {
    border: none;
    border-radius: 14px;
    background: var(--accent);
    color: #fff;
    padding: 12px 22px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 640px) {
    .composer-modal-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px auto;
        padding: 18px;
        border-radius: 22px;
    }

    .composer-modal-top {
        grid-template-columns: 1fr;
    }

    .composer-modal-top .avatar.small {
        display: none;
    }

    .composer-poll-head,
    .composer-gif-head,
    .composer-modal-footer,
    .composer-gif-search-row {
        flex-direction: column;
        align-items: stretch;
    }

    .composer-gif-search-row {
        display: flex;
    }

    .composer-modal-submit,
    .composer-poll-remove,
    .composer-poll-add,
    .composer-gif-clear,
    .composer-gif-search-btn {
        width: 100%;
        text-align: center;
    }

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

    .post-colored-body {
        min-height: 180px;
        padding: 22px 18px;
    }
}

.post-poll-card {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface-alt);
    padding: 16px;
}

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

.post-poll-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 800;
}

.post-poll-badge .icon-svg {
    width: 18px;
    height: 18px;
}

.post-poll-total {
    color: var(--muted);
    font-size: 14px;
}

.post-poll-options {
    display: grid;
    gap: 10px;
}

.post-poll-vote-form {
    margin: 0;
}

.post-poll-option {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    padding: 14px 16px;
}

.post-poll-option-button {
    width: 100%;
    cursor: pointer;
}

.post-poll-option-button:hover {
    border-color: rgba(223, 99, 103, 0.45);
    transform: translateY(-1px);
}

.post-poll-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: rgba(223, 99, 103, 0.14);
    pointer-events: none;
}

.post-poll-option.is-selected {
    border-color: rgba(223, 99, 103, 0.55);
}

.post-poll-label,
.post-poll-stats,
.post-poll-vote-cta {
    position: relative;
    z-index: 1;
}

.post-poll-label {
    font-weight: 700;
}

.post-poll-stats,
.post-poll-vote-cta {
    color: var(--muted);
    font-size: 13px;
}

html[data-theme="dark"] .composer-launcher-input,
html[data-theme="dark"] .composer-launch-chip,
html[data-theme="dark"] .composer-modal-action,
html[data-theme="dark"] .composer-modal-close,
html[data-theme="dark"] .composer-modal-top textarea,
html[data-theme="dark"] .composer-poll-options input,
html[data-theme="dark"] .composer-gif-search-row input,
html[data-theme="dark"] .composer-gif-tile,
html[data-theme="dark"] .post-poll-card,
html[data-theme="dark"] .post-poll-option {
    background: rgba(10, 22, 50, 0.9);
    color: #f5f7fb;
    border-color: rgba(121, 139, 178, 0.22);
}

html[data-theme="dark"] .composer-modal-dialog {
    background: linear-gradient(180deg, rgba(17, 30, 57, 0.98), rgba(11, 22, 44, 0.98));
    border-color: rgba(121, 139, 178, 0.22);
}

html[data-theme="dark"] .composer-color-swatch.is-active {
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.78), 0 0 0 3px rgba(255,123,127,.22);
}

html[data-theme="dark"] .composer-inline-error {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(223, 99, 103, 0.28);
    background: rgba(223, 99, 103, 0.12);
    color: #b43238;
    font-size: 0.92rem;
    font-weight: 700;
}

.composer-poll-builder,
.composer-gif-builder {
    background: linear-gradient(180deg, rgba(223, 99, 103, 0.12), rgba(223, 99, 103, 0.04));
    border-color: rgba(223, 99, 103, 0.14);
}

html[data-theme="dark"] .composer-modal-hint,
html[data-theme="dark"] .post-poll-total,
html[data-theme="dark"] .post-poll-stats,
html[data-theme="dark"] .post-poll-vote-cta,
html[data-theme="dark"] .composer-poll-head span,
html[data-theme="dark"] .composer-gif-head span,
html[data-theme="dark"] .composer-gif-status {
    color: rgba(220, 228, 243, 0.7);
}

@media (max-width: 720px) {
    .composer-launcher {
        flex-wrap: wrap;
    }

    .composer-launcher-submit,
    .composer-modal-submit {
        width: 100%;
        justify-content: center;
    }

    .composer-modal-dialog {
        width: min(100vw - 20px, 720px);
        margin: 20px auto;
        padding: 20px;
    }

    .composer-modal-top {
        flex-direction: column;
    }

    .composer-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Feeling/activity composer refreshed with a modern card layout */
.composer-feeling-builder {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfcff 100%);
    padding: 16px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
}

.composer-feeling-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.composer-feeling-head > div {
    flex: 1 1 auto;
    display: grid;
    gap: 4px;
}

.composer-feeling-head strong {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}

.composer-feeling-head span {
    margin-top: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.45;
}

.composer-feeling-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.composer-feeling-choice {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #ffffff;
    color: #111827;
    padding: 10px 14px;
    gap: 10px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.composer-feeling-choice:hover {
    transform: translateY(-1px);
    border-color: rgba(223, 99, 103, 0.24);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.composer-feeling-choice .action-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(223, 99, 103, 0.12);
    color: var(--accent);
    flex: 0 0 auto;
}

.composer-feeling-choice .icon-svg {
    width: 16px;
    height: 16px;
}

.composer-feeling-choice.is-active {
    border-color: rgba(223, 99, 103, 0.38);
    background: rgba(223, 99, 103, 0.08);
    box-shadow: 0 0 0 4px rgba(223, 99, 103, 0.08);
}

.composer-feeling-input-wrap {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.composer-feeling-input-label {
    font-size: 13px;
    font-weight: 700;
    color: #4b5563;
}

.composer-feeling-input-wrap input {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #ffffff;
    color: #111827;
    padding: 13px 15px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.composer-feeling-input-wrap input:focus {
    outline: none;
    border-color: rgba(223, 99, 103, 0.35);
    box-shadow: 0 0 0 4px rgba(223, 99, 103, 0.08);
}

.composer-feeling-input-wrap input:disabled {
    opacity: 1;
    cursor: not-allowed;
    background: #f8fafc;
    color: #9ca3af;
}

.composer-feeling-clear {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    padding: 9px 14px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.composer-feeling-clear:hover {
    border-color: rgba(223, 99, 103, 0.2);
    color: var(--accent);
}

@media (max-width: 640px) {
    .composer-feeling-builder {
        padding: 14px;
        border-radius: 18px;
    }

    .composer-feeling-head {
        flex-direction: column;
        align-items: stretch;
    }

    .composer-feeling-clear {
        align-self: flex-start;
    }

    .composer-feeling-choice {
        width: 100%;
        justify-content: flex-start;
    }
}


.composer-selected-audio {
  align-items: center;
  flex-wrap: wrap;
}

.composer-audio-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239,68,68,.12), rgba(249,115,22,.12));
  border: 1px solid #eceef2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.composer-selected-audio-player {
  flex: 1 1 240px;
  min-width: 220px;
}

.post-audio-card {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  gap: 12px;
}

.post-audio-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-audio-head strong {
  display: block;
  font-size: 15px;
  color: var(--text);
}

.post-audio-head span:last-child {
  font-size: 13px;
  color: var(--muted);
}

.post-audio-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239,68,68,.14), rgba(249,115,22,.14));
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.post-audio-player,
.share-preview-audio {
  width: 100%;
}

.composer-audio-preview-card {
  margin-top: 12px;
}

.shared-post-audio {
  margin-top: 12px;
}

.share-preview-audio {
  margin-top: 12px;
}

html[data-theme="dark"] .composer-audio-badge,
html[data-theme="dark"] .post-audio-icon {
  border-color: rgba(148,163,184,.24);
  background: linear-gradient(135deg, rgba(248,113,113,.18), rgba(251,146,60,.18));
}


.composer-selected-file {
  align-items: center;
}

.composer-file-badge,
.post-file-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(99,102,241,.12));
  border: 1px solid #eceef2;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.post-file-card {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
  max-width: 100%;
}

.post-file-card:hover {
  border-color: rgba(37,99,235,.22);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.post-file-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.post-file-copy strong,
.post-file-copy span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-file-copy strong {
  color: var(--text);
}

.post-file-copy span {
  color: var(--muted);
  font-size: 13px;
}

.share-preview-file[hidden] {
  display: none !important;
}

html[data-theme="dark"] .post-file-card {
  background: rgba(10, 22, 50, 0.9);
  border-color: rgba(121, 139, 178, 0.22);
  color: #f5f7fb;
}

html[data-theme="dark"] .post-file-copy strong {
  color: #f5f7fb;
}

html[data-theme="dark"] .post-file-copy span {
  color: rgba(220, 228, 243, 0.7);
}
