/* ============================================================
   More / short videos / image-text community
   ============================================================ */

.more-page .page,
.community-page .page {
  width: min(calc(100% - 28px), 860px);
}

.more-hero {
  padding-bottom: 20px;
}

.more-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}

.more-grid.is-single .more-card {
  min-height: 220px;
}

.more-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 248px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(249, 244, 232, 0.82));
  box-shadow: 0 18px 40px -32px rgba(28, 49, 35, 0.4);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.more-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 46px -30px rgba(28, 49, 35, 0.42);
}

.more-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(17, 107, 56, 0.12);
  border-radius: 50%;
}

.more-card.is-video {
  border-top: 4px solid var(--red);
}

.more-card.is-image {
  border-top: 4px solid var(--accent);
}

.more-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  color: #fff;
  background: var(--accent);
}

.more-card.is-video .more-card-icon {
  background: var(--red);
}

.more-card-icon .icon {
  width: 21px;
  height: 21px;
}

.more-card-kicker {
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.more-card h2 {
  margin: 5px 0 6px;
  font-size: 26px;
  font-weight: 780;
  letter-spacing: -0.035em;
}

.more-card p {
  max-width: 290px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.more-enter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.more-card.is-video .more-enter {
  color: var(--red-strong);
}

.more-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--faint);
  background: rgba(255, 254, 250, 0.55);
  font-size: 10px;
  line-height: 1.7;
}

/* ---------- shared community toolbar/empty ---------- */
.community-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 12px;
}

.community-toolbar-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.community-toolbar-copy strong {
  font-size: 14px;
  font-weight: 750;
}

.community-toolbar-copy span,
.community-toolbar-count {
  color: var(--faint);
  font-size: 10px;
}

body.community-sheet-open {
  overflow: hidden;
}

.community-empty,
.community-loading {
  padding: 36px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 254, 250, 0.66);
  text-align: center;
}

.community-empty h2 {
  margin: 10px 0 4px;
  color: var(--ink);
  font-size: 17px;
}

.community-empty p {
  margin: 0 0 16px;
  font-size: 11.5px;
  line-height: 1.7;
}

.community-empty-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}

.community-empty-icon .icon {
  width: 22px;
  height: 22px;
}

.community-toast {
  position: fixed;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  z-index: 180;
  max-width: min(360px, calc(100vw - 32px));
  padding: 9px 14px;
  border-radius: 999px;
  color: #fffdf6;
  background: rgba(16, 30, 21, 0.92);
  box-shadow: 0 10px 30px rgba(10, 24, 16, 0.2);
  font-size: 11.5px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.community-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- image-text feed ---------- */
.community-page-head {
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--border);
}

.community-page-head .hero-top {
  margin-bottom: 12px;
}

.community-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.community-title-row h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.community-title-row .btn {
  flex: none;
  min-height: 36px;
  padding: 0 13px;
  font-size: 11px;
}

.community-subtitle {
  max-width: 540px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.image-feed {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.image-post {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 16px 36px -34px rgba(28, 49, 35, 0.32);
}

.image-post.is-hot {
  border-color: #e4c17a;
  background:
    linear-gradient(140deg, rgba(255, 252, 241, 0.98), rgba(255, 254, 250, 0.94));
}

.image-post-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-post-avatar,
.comment-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 750;
}

.image-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  color: var(--faint);
  font-size: 9px;
}

.image-post-author {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.image-hot-badge {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 5px;
  border-radius: 4px;
  color: #7c560b;
  background: #fdf3d9;
  font-size: 8px;
  font-weight: 750;
}

.image-post-time {
  margin-left: auto;
  white-space: nowrap;
}

.image-post-body {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.image-post-gallery {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 11px;
  background: #eef1e9;
}

.image-post-gallery.count-1 { grid-template-columns: 1fr; }
.image-post-gallery.count-2 { grid-template-columns: repeat(2, 1fr); }
.image-post-gallery.count-3,
.image-post-gallery.count-4 { grid-template-columns: repeat(2, 1fr); }

.image-post-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  background: #e9eee4;
}

.image-post-gallery.count-1 img { aspect-ratio: 4 / 3; }
.image-post-gallery.count-2 img { aspect-ratio: 1 / 1; }
.image-post-gallery.count-3 img,
.image-post-gallery.count-4 img { aspect-ratio: 1 / 1; }

.image-post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.community-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.community-action-btn:hover {
  color: var(--accent);
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.community-action-btn.is-liked {
  color: var(--red-strong);
  border-color: #ecc9c5;
  background: var(--red-soft);
}

.community-action-btn.is-liked .icon-sm {
  fill: currentColor;
}

.community-action-btn svg {
  width: 13px;
  height: 13px;
}

.community-action-count {
  font-variant-numeric: tabular-nums;
}

/* ---------- dark short-video page ---------- */
.videos-page {
  color: #f4f0e6;
  background: #080b09;
}

.videos-page.has-bottom-nav {
  padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
}

.video-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: max(10px, env(safe-area-inset-top, 0px)) 14px 9px;
  color: #f4f0e6;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.68), transparent);
  pointer-events: none;
}

.video-topbar > * {
  pointer-events: auto;
}

.video-topbar .brand {
  color: #f4f0e6;
}

.video-topbar .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1e9d7;
  color: #0b5f39;
  font-size: 10px;
}

.video-topbar .brand-school,
.video-topbar .brand-copy {
  color: #f4f0e6;
}

.video-topbar .brand-school {
  font-size: 11.5px;
  font-weight: 750;
}

.video-topbar .brand-sub {
  color: rgba(244, 240, 230, 0.58);
  font-size: 8px;
}

.video-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.video-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #f4f0e6;
  background: rgba(12, 18, 14, 0.42);
  font-size: 9.5px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.video-topbar-btn.is-primary {
  border-color: #f1e9d7;
  color: #0b4f28;
  background: #f1e9d7;
}

.video-feed {
  width: 100%;
  height: calc(100dvh - 58px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  background: #080b09;
}

.video-feed::-webkit-scrollbar {
  display: none;
}

.video-slide {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  overflow: hidden;
  background: #080b09;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.video-slide video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #080b09;
}

.video-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 6, 4, 0.32), transparent 26%),
    linear-gradient(0deg, rgba(3, 6, 4, 0.9), transparent 44%);
}

.video-hot-badge {
  position: absolute;
  top: 72px;
  left: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid rgba(255, 220, 145, 0.38);
  border-radius: 999px;
  color: #ffe3a1;
  background: rgba(55, 38, 8, 0.44);
  font-size: 9px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.video-meta {
  position: absolute;
  right: 82px;
  bottom: 28px;
  left: 14px;
  z-index: 3;
  color: #f4f0e6;
}

.video-author {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.video-author-tag {
  color: rgba(244, 240, 230, 0.52);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 500;
}

.video-caption {
  display: -webkit-box;
  max-width: 34em;
  margin: 6px 0 0;
  overflow: hidden;
  color: rgba(244, 240, 230, 0.92);
  font-size: 12px;
  line-height: 1.6;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  white-space: pre-wrap;
}

.video-caption:empty {
  display: none;
}

.video-time {
  display: block;
  margin-top: 7px;
  color: rgba(244, 240, 230, 0.46);
  font-size: 9px;
}

.video-actions {
  position: absolute;
  right: 10px;
  bottom: 28px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}

.video-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 54px;
  padding: 0;
  border: 0;
  color: #f4f0e6;
  background: transparent;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
}

.video-action-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(8, 12, 9, 0.38);
  backdrop-filter: blur(9px);
}

.video-action svg {
  width: 21px;
  height: 21px;
}

.video-action.is-liked {
  color: #ff8b83;
}

.video-action.is-liked .video-action-icon {
  border-color: rgba(255, 139, 131, 0.38);
  background: rgba(166, 41, 33, 0.3);
}

.video-action.is-liked svg {
  fill: currentColor;
}

.video-sound {
  position: absolute;
  top: 74px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #f4f0e6;
  background: rgba(8, 12, 9, 0.35);
  backdrop-filter: blur(8px);
}

.video-sound svg {
  width: 15px;
  height: 15px;
}

.video-play-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.video-slide.is-paused .video-play-hint {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.video-feed[hidden],
.video-empty[hidden],
.image-feed[hidden],
.community-preview-grid[hidden],
.comment-image-preview[hidden],
.community-video-preview[hidden] {
  display: none !important;
}

.video-loading,
.video-empty {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 58px);
  padding: 24px;
  color: rgba(244, 240, 230, 0.7);
  text-align: center;
}

.video-empty h2 {
  color: #f4f0e6;
}

.videos-page .bottom-nav {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: rgba(8, 11, 9, 0.94);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.videos-page .bottom-nav-item {
  color: rgba(244, 240, 230, 0.54);
}

.videos-page .bottom-nav-item:hover {
  color: #f4f0e6;
}

.videos-page .bottom-nav-item.is-active {
  color: #f1e9d7;
}

.videos-page .bottom-nav-item.is-active::before {
  content: "";
  position: absolute;
  top: 2px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #f1e9d7;
}

.videos-page .bottom-nav-badge {
  border-color: #080b09;
}

/* ---------- comments sheet ---------- */
.comment-sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(8, 16, 11, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.comment-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
}

.comment-sheet-panel {
  display: flex;
  flex-direction: column;
  width: min(100%, 620px);
  max-height: min(76dvh, 680px);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  box-shadow: 0 -18px 60px rgba(10, 24, 16, 0.2);
  transform: translateY(24px);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.comment-sheet.is-open .comment-sheet-panel {
  transform: translateY(0);
}

.comment-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.comment-sheet-title {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
}

.comment-sheet-count {
  color: var(--faint);
  font-size: 10px;
  font-weight: 500;
}

.comment-sheet-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
}

.comment-sheet-close svg {
  width: 15px;
  height: 15px;
}

.comment-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 16px;
}

.comment-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
  border-bottom: 0;
}

.comment-main {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.comment-body-wrap {
  min-width: 0;
  flex: 1;
}

.comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.4;
}

.comment-author {
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
}

.comment-text {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-image {
  display: block;
  max-width: min(100%, 220px);
  max-height: 220px;
  margin-top: 6px;
  border-radius: 9px;
  object-fit: cover;
  background: #eef1e9;
}

.comment-reply-to {
  color: var(--accent);
}

.comment-reply-btn {
  margin: 5px 0 0 36px;
  padding: 0;
  border: 0;
  color: var(--faint);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.comment-reply-btn:hover {
  color: var(--accent);
}

.comment-replies {
  display: grid;
  gap: 7px;
  margin: 8px 0 0 36px;
  padding-left: 9px;
  border-left: 2px solid var(--border);
}

.comment-reply-item {
  padding: 3px 0;
}

.comment-reply-item .comment-avatar {
  width: 21px;
  height: 21px;
  font-size: 8px;
}

.comment-reply-item .comment-author {
  font-size: 9.5px;
}

.comment-reply-item .comment-text {
  margin-top: 2px;
  font-size: 10.5px;
}

.comment-empty {
  padding: 36px 10px;
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}

.comment-form {
  padding: 9px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.comment-reply-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 23px;
  margin-bottom: 5px;
  padding: 0 4px;
  color: var(--accent);
  font-size: 9.5px;
}

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

.comment-reply-target button {
  border: 0;
  color: var(--faint);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.comment-input-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.comment-input {
  width: 100%;
  min-height: 38px;
  max-height: 100px;
  padding: 9px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fffefa;
  font-size: 11.5px;
  line-height: 1.5;
  resize: none;
}

.comment-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 107, 56, 0.1);
}

.comment-send {
  flex: none;
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.comment-send:disabled {
  opacity: 0.5;
}

.comment-form-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.comment-image-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--faint);
  font-size: 9px;
  cursor: pointer;
}

.comment-image-label:hover {
  color: var(--accent);
}

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

.comment-image-preview {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  color: var(--faint);
  font-size: 9px;
}

.comment-image-preview img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}

.comment-image-preview button {
  border: 0;
  color: var(--faint);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.comment-error {
  min-height: 15px;
  margin: 4px 2px 0;
  color: var(--danger);
  font-size: 9px;
}

/* video comments are dark to match the player */
.videos-page .comment-sheet {
  background: rgba(0, 0, 0, 0.62);
}

.videos-page .comment-sheet-panel {
  border-color: #2c352e;
  background: #111712;
  color: #f4f0e6;
}

.videos-page .comment-sheet-head,
.videos-page .comment-form {
  border-color: #2a332c;
  background: #111712;
}

.videos-page .comment-sheet-close {
  border-color: #344038;
  color: #aeb9ae;
}

.videos-page .comment-item {
  border-color: #27302a;
}

.videos-page .comment-author {
  color: #f4f0e6;
}

.videos-page .comment-text {
  color: #d9ded6;
}

.videos-page .comment-meta {
  color: #7f8c81;
}

.videos-page .comment-replies {
  border-color: #344038;
}

.videos-page .comment-input {
  border-color: #364239;
  color: #f4f0e6;
  background: #1a221c;
}

.videos-page .comment-input:focus {
  border-color: #a9c7ac;
  box-shadow: 0 0 0 3px rgba(169, 199, 172, 0.12);
}

.videos-page .comment-form-tools,
.videos-page .comment-image-label {
  border-color: #344038;
  color: #8f9d91;
}

.videos-page .comment-image-label:hover {
  color: #f4f0e6;
}

.videos-page .comment-reply-target {
  color: #b7d3b9;
}

.videos-page .comment-send {
  color: #101712;
  background: #e9e1d0;
}

.videos-page .comment-image-preview {
  color: #8f9d91;
}

/* ---------- composer dialog ---------- */
.community-dialog {
  width: min(100% - 28px, 480px);
  max-height: min(88dvh, 760px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(10, 24, 16, 0.28);
}

.community-dialog::backdrop {
  background: rgba(8, 16, 11, 0.58);
  backdrop-filter: blur(4px);
}

.community-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: min(88dvh, 760px);
}

.community-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.community-dialog-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
}

.community-dialog-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.community-dialog-body {
  overflow-y: auto;
  padding: 14px 16px;
}

.community-file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 132px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--muted);
  background: #f9fcf6;
  font-size: 10.5px;
  text-align: center;
  cursor: pointer;
}

.community-file-drop:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.community-file-drop input {
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  position: absolute;
}

.community-file-drop strong {
  color: var(--ink);
  font-size: 12px;
}

.community-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.community-preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 7px;
  object-fit: cover;
}

.community-video-preview {
  display: block;
  width: 100%;
  max-height: 260px;
  margin-top: 8px;
  border-radius: 9px;
  background: #101712;
}

.community-field {
  display: block;
  margin-top: 12px;
}

.community-field-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.community-caption {
  width: 100%;
  min-height: 86px;
  padding: 9px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fffefa;
  font-size: 12px;
  line-height: 1.65;
  resize: vertical;
}

.community-caption:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 107, 56, 0.1);
}

.community-form-hint {
  margin: 6px 0 0;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.55;
}

.community-form-error {
  min-height: 16px;
  margin: 7px 0 0;
  color: var(--danger);
  font-size: 10px;
}

.community-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 11px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
}

.videos-page .community-dialog {
  border-color: #2c352e;
  color: #f4f0e6;
  background: #111712;
}

.videos-page .community-dialog-head,
.videos-page .community-dialog-actions {
  border-color: #2a332c;
}

.videos-page .community-dialog-close {
  border-color: #344038;
  color: #aeb9ae;
}

.videos-page .community-file-drop {
  border-color: #3a463c;
  color: #9ba79d;
  background: #171f19;
}

.videos-page .community-file-drop strong {
  color: #f4f0e6;
}

.videos-page .community-field-label {
  color: #9ba79d;
}

.videos-page .community-caption {
  border-color: #364239;
  color: #f4f0e6;
  background: #1a221c;
}

.videos-page .community-caption:focus {
  border-color: #a9c7ac;
  box-shadow: 0 0 0 3px rgba(169, 199, 172, 0.12);
}

.videos-page .community-dialog-actions .btn-quiet {
  color: #c4cdc4;
  border-color: #3a463c;
  background: transparent;
}

/* ---------- responsive ---------- */
@media (min-width: 720px) {
  .video-feed {
    width: min(100%, 520px);
    margin: 0 auto;
    border-left: 1px solid #1e2721;
    border-right: 1px solid #1e2721;
  }

  .video-slide {
    min-height: calc(100dvh - 58px - env(safe-area-inset-bottom, 0px));
  }

  .videos-page .bottom-nav {
    background: rgba(8, 11, 9, 0.98);
  }
}

@media (max-width: 620px) {
  .more-grid {
    grid-template-columns: 1fr;
  }

  .more-card {
    min-height: 190px;
    padding: 17px;
  }

  .more-card-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    border-radius: 10px;
  }

  .more-card h2 {
    font-size: 23px;
  }

  .community-title-row h1 {
    font-size: 29px;
  }

  .community-page-head {
    padding-top: 10px;
  }

  .image-post {
    padding: 12px;
    border-radius: 14px;
  }

  .video-meta {
    right: 76px;
  }

  .video-actions {
    right: 7px;
  }

  .video-action {
    min-width: 50px;
  }

  .video-action-icon {
    width: 37px;
    height: 37px;
  }

  .comment-sheet-panel {
    max-height: 82dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .more-card,
  .comment-sheet,
  .comment-sheet-panel,
  .community-toast {
    transition-duration: 0.01ms !important;
  }
}

/* Public profile avatars in community feeds and comments. */
.image-post-avatar.has-avatar,
.comment-avatar.has-avatar,
.comment-reply-item .comment-avatar.has-avatar {
  background-position: center;
  background-size: cover;
  border-color: var(--border-strong);
  color: transparent;
}

.video-author-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.video-author-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #f4f0e6;
  background: rgba(255, 255, 255, 0.12);
  background-position: center;
  background-size: cover;
  font-size: 9px;
  font-weight: 750;
}

.video-author-avatar.has-avatar {
  color: transparent;
  border-color: rgba(255, 255, 255, 0.4);
}

.community-passcode {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fffefa;
  font-size: 12px;
}

.community-passcode:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 107, 56, 0.1);
}

.videos-page .community-passcode {
  border-color: #364239;
  color: #f4f0e6;
  background: #1a221c;
}
