:root {
  --bg: #f6f7f4;
  --panel: rgba(255, 255, 255, 0.72);
  --line: rgba(20, 20, 20, 0.1);
  --text: #161616;
  --muted: #6d6d6d;
  --shadow: 14px 18px 38px rgba(38, 49, 62, 0.11), -10px -10px 26px rgba(255, 255, 255, 0.88);
  --glass: blur(18px) saturate(1.16);
  --sidebar: 230px;
  --right: 320px;
  --white: #ffffff;
  --ink: #111111;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(217, 245, 207, 0.58), transparent 28%),
    linear-gradient(225deg, rgba(215, 235, 255, 0.56), transparent 30%),
    linear-gradient(180deg, #fbfcf9 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--right);
  gap: 26px;
  min-height: 100vh;
  padding: 22px 18px 24px;
}

.left,
.right {
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 8px 4px 10px;
}

.logo {
  position: relative;
  width: 74px;
  flex: none;
  aspect-ratio: 1;
  border-radius: 50%;
  background: url("../img/ypg-logo.png") center / contain no-repeat;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.logo::after {
  content: "";
}

.brand-copy h1,
.brand-copy p {
  margin: 0;
}

.brand-copy h1 {
  font-size: 1.16rem;
  line-height: 1.1;
}

.brand-copy p,
.quiet,
.soft-note {
  color: var(--muted);
}

.brand-copy p {
  margin-top: 2px;
  font-size: 0.86rem;
}

.sidebar-card,
.content-panel,
.filter-panel,
.profile-hero,
.stats-row,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
}

.sidebar-card,
.content-panel,
.filter-panel,
.profile-hero,
.empty-state {
  padding: 16px;
}

.topic-list,
.dm-list,
.trending,
.feed,
.form-grid,
.followed-list {
  display: grid;
  gap: 12px;
}

.topic,
.person,
.followed-user,
.dm-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--topic-color, #ececec) 76%, white);
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.topic.all {
  --topic-color: #ececec;
}

.topic:hover,
.topic.active,
.person:hover,
.followed-user:hover,
.dm-preview:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.topic.active {
  outline: 2px solid rgba(0, 0, 0, 0.14);
}

.dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--ink);
}

.divider {
  height: 7px;
  margin: 18px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.02));
}

.section-label {
  margin-bottom: 12px;
  padding: 0 4px;
  color: #777777;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-link {
  display: block;
  padding: 12px 4px 4px;
  font-weight: 800;
}

.main {
  min-width: 0;
  padding-top: 8px;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 0 4px;
}

.button,
.create-post {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 22px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 8px 10px 22px rgba(38, 49, 62, 0.1), -7px -7px 18px rgba(255, 255, 255, 0.92);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button:hover,
.create-post:hover {
  transform: translateY(-2px);
  background: #f5f5f5;
}

.button:disabled,
button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
  box-shadow: inset 5px 5px 12px rgba(38, 49, 62, 0.12), inset -5px -5px 12px rgba(255, 255, 255, 0.86);
}

.button.compact {
  min-height: 44px;
  padding: 0 16px;
}

.button.danger {
  background: #7f1d1d;
  color: #ffffff;
}

.disabled-link {
  opacity: 0.72;
}

.auth-actions,
.profile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary {
  background: var(--ink);
  color: #ffffff;
}

.primary:hover {
  background: #2a2a2a;
}

.search {
  display: flex;
  align-items: center;
  width: min(760px, 100%);
  height: 56px;
  justify-self: center;
  padding: 0 14px 0 18px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--glass);
  box-shadow: inset 5px 5px 12px rgba(38, 49, 62, 0.08), inset -6px -6px 14px rgba(255, 255, 255, 0.9);
}

.search span {
  color: #101010;
  font-size: 1.25rem;
}

.search input {
  width: 100%;
  margin: 0 12px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.clear-search {
  border: 0;
  background: transparent;
  color: #777777;
  font-weight: 900;
}

.profile {
  display: inline-flex;
  justify-self: end;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--avatar-color, #27304f);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.13);
}

.avatar.has-image {
  background-size: cover;
  background-position: center;
}

.avatar.small {
  width: 24px;
  height: 24px;
  font-size: 0.62rem;
}

.avatar.large {
  width: 92px;
  height: 92px;
  font-size: 1.5rem;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  font-size: 1rem;
}

.page-title {
  margin: 4px 0 18px;
  padding: 0 4px;
}

.page-title h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.05;
}

.page-title p {
  max-width: 72ch;
  margin: 8px 0 0;
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.filter-panel h3,
.filter-panel p,
.section-heading h3 {
  margin: 0;
}

.filter-panel p {
  margin-top: 6px;
  color: var(--muted);
}

.chip-row,
.tag-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.tag,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag-color, #eeeeee) 76%, white);
  color: #222222;
  font-size: 0.84rem;
  font-weight: 900;
}

.chip {
  min-height: 38px;
}

.chip.active,
.checkbox-chip:has(input:checked) {
  outline: 2px solid rgba(0, 0, 0, 0.2);
  background: var(--tag-color, #eeeeee);
}

.checkbox-chip input {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
}

.post,
.trend-card,
.message-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
}

.post {
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08)),
    var(--post-color, #ececec);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.post:hover {
  transform: translateY(-3px);
  box-shadow: 16px 22px 48px rgba(38, 49, 62, 0.14), -9px -9px 22px rgba(255, 255, 255, 0.9);
}

.post-inner {
  display: grid;
  gap: 8px;
  min-height: 220px;
  padding: 16px;
}

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

.user,
.user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.post-meta {
  display: flex;
  gap: 10px;
  margin-left: auto;
  color: #555555;
  font-size: 0.88rem;
  font-weight: 800;
}

.follow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  font-size: 0.9rem;
  font-weight: 900;
}

.follow.following {
  background: #2e7d32;
}

.muted-follow {
  background: rgba(0, 0, 0, 0.55);
}

.post-content h3 {
  margin: 7px 0 5px;
  font-size: 1.28rem;
  line-height: 1.2;
}

.post-content p {
  max-width: 74ch;
  margin: 0;
  color: #222222;
  font-size: 1rem;
  line-height: 1.55;
}

.post-card-link {
  display: block;
  border-radius: 18px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.post-card-link:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

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

.vote {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #161616;
  font-size: 1.15rem;
  font-weight: 900;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  font-weight: 900;
}

.vote-btn.active {
  background: #111111;
  color: #ffffff;
}

.vote-btn.active.down {
  background: #7f1d1d;
}

.comment-link {
  font-weight: 900;
}

.post-detail,
.comments-panel,
.related-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
}

.post-detail {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.1)),
    var(--post-color, #ffffff);
}

.post-detail-head,
.post-detail-footer,
.comment-card header,
.inline-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.post-detail h3 {
  margin: 18px 0 10px;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.08;
}

.post-detail p {
  max-width: 82ch;
  margin: 0;
  color: #202020;
  font-size: 1.08rem;
  line-height: 1.65;
}

.post-detail-footer {
  justify-content: flex-start;
  margin-top: 20px;
  color: #444444;
  font-weight: 900;
}

.large-vote {
  padding-right: 8px;
}

.comment-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.comment-thread {
  display: grid;
  gap: 12px;
}

.comment-thread.nested {
  margin-top: 10px;
  margin-left: 28px;
  padding-left: 16px;
  border-left: 3px solid rgba(17, 17, 17, 0.12);
}

.comment-node {
  display: grid;
  gap: 8px;
}

.comment-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  background: #ffffff;
}

.comment-card header span,
.inline-heading span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.comment-card p {
  margin: 0;
  line-height: 1.55;
}

.reply-link {
  justify-self: start;
  border: 0;
  background: transparent;
  color: #111111;
  font-weight: 900;
  padding: 0;
}

.comment-form {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.comment-form label {
  font-weight: 900;
}

.comment-form textarea {
  min-height: 120px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 16px;
  resize: vertical;
}

.compact-reply {
  margin: 4px 0 10px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.follow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.color-picker-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.color-picker-row input[type="color"] {
  width: 58px;
  height: 58px;
  padding: 4px;
  border-radius: 50%;
}

.color-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-preset {
  width: 34px;
  height: 34px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--preset-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

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

.related-post {
  display: grid;
  gap: 7px;
  min-height: 130px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.08)),
    var(--post-color, #ffffff);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.05);
}

.related-post span,
.related-post small {
  color: #555555;
  font-weight: 900;
}

.related-post strong {
  font-size: 1.05rem;
  line-height: 1.25;
}

.right-title {
  margin-bottom: 8px;
  padding: 10px 10px 0 12px;
  color: #626262;
  font-weight: 900;
  text-align: right;
}

.right-title.second {
  margin-top: 18px;
}

.followed-list {
  margin-bottom: 10px;
}

.followed-user {
  --topic-color: #ffffff;
  background: rgba(255, 255, 255, 0.76);
}

.dm-preview {
  --topic-color: #ffffff;
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
}

.dm-preview small {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-weight: 700;
}

.dm-preview.unread {
  outline: 2px solid rgba(17, 17, 17, 0.12);
}

.trend-card {
  display: block;
  min-height: 164px;
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08)),
    var(--post-color, #ffffff);
}

.trend-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #626262;
  font-size: 0.9rem;
  font-weight: 900;
}

.trend-title {
  margin: 0 0 6px;
  font-size: 1rem;
}

.trend-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: #222222;
  font-size: 0.94rem;
}

.trend-vote {
  margin-top: 12px;
  color: #333333;
  font-size: 0.88rem;
  font-weight: 900;
}

.content-panel {
  margin-bottom: 18px;
}

.form-grid {
  gap: 16px;
}

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

.field label {
  font-weight: 900;
}

.field input,
.field textarea,
.field select,
.setting-row select {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  padding: 14px 16px;
  box-shadow: inset 4px 4px 9px rgba(38, 49, 62, 0.07), inset -5px -5px 12px rgba(255, 255, 255, 0.86);
}

.field textarea {
  min-height: 170px;
  resize: vertical;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: #8d1c1c;
  font-weight: 800;
}

.success-note {
  margin: 0;
  color: #2e7d32;
  font-weight: 800;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.profile-hero h3 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.profile-hero p {
  margin: 5px 0;
  color: var(--muted);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.settings-panel,
.auth-card,
.chat-shell,
.chat-list {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
  padding: 16px;
}

.settings-panel h3,
.auth-card h3 {
  margin: 0 0 12px;
}

.auth-card {
  display: grid;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 10px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-weight: 800;
}

.setting-row:first-of-type {
  border-top: 0;
}

.setting-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: #111111;
}

.data-preview {
  max-height: 180px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 14px;
  background: #111111;
  color: #ffffff;
  font-size: 0.78rem;
  white-space: pre-wrap;
}

.messages-layout {
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  gap: 16px;
}

.chat-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.message-card.active {
  outline: 2px solid rgba(17, 17, 17, 0.18);
}

.chat-shell {
  display: grid;
  gap: 14px;
  min-height: 520px;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.chat-head p {
  margin: 2px 0 0;
  color: var(--muted);
}

.chat-messages {
  display: grid;
  align-content: end;
  gap: 10px;
}

.chat-bubble {
  max-width: min(72ch, 78%);
  padding: 10px 12px;
  border-radius: 16px;
  background: #ffffff;
}

.chat-bubble.mine {
  justify-self: end;
  background: #111111;
  color: #ffffff;
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble span {
  display: block;
  margin-top: 5px;
  opacity: 0.72;
  font-size: 0.78rem;
  font-weight: 800;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-self: end;
}

.chat-compose input {
  min-height: 52px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 16px;
  padding: 0 14px;
  background: #ffffff;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 0;
}

.stats-row div {
  display: grid;
  gap: 4px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.stats-row strong {
  font-size: 1.25rem;
}

.stats-row span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.section-heading {
  margin: 20px 4px 12px;
}

.message-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
}

.message-card p {
  margin: 3px 0 0;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.info-box {
  min-height: 140px;
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
}

.info-box h3 {
  margin: 0 0 8px;
}

.info-box p,
.empty-state p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  display: grid;
  gap: 8px;
}

.empty-state h3 {
  margin: 0;
}

@media (max-width: 1320px) {
  :root {
    --sidebar: 210px;
    --right: 280px;
  }
}

@media (max-width: 1120px) {
  .app {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .left,
  .right {
    position: static;
    max-height: none;
  }

  .left {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
  }

  .right {
    display: none;
  }

  .main {
    padding-top: 0;
  }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .app {
    display: block;
    min-height: 100svh;
    padding: 10px;
  }

  .left {
    display: block;
    margin-bottom: 12px;
  }

  .brand {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 64px;
    margin: -10px -10px 10px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(246, 247, 244, 0.92);
    backdrop-filter: var(--glass);
  }

  .logo {
    width: 48px;
  }

  .brand-copy h1 {
    font-size: 1rem;
  }

  .sidebar-card {
    margin: 0 -10px 12px;
    padding: 10px 10px 12px;
    border-width: 1px 0;
    border-radius: 0;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.58);
  }

  .topic-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .topic-list::-webkit-scrollbar {
    display: none;
  }

  .topic {
    min-width: max-content;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 999px;
    scroll-snap-align: start;
    font-size: 0.88rem;
  }

  .topic:hover,
  .topic.active {
    transform: none;
  }

  .sidebar-card .divider,
  .sidebar-card .section-label,
  .sidebar-card .dm-list {
    display: none;
  }

  .topbar {
    position: sticky;
    top: 64px;
    z-index: 25;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0 -2px 12px;
    padding: 8px 0;
    background: rgba(246, 247, 244, 0.9);
    backdrop-filter: var(--glass);
  }

  .create-post,
  .search {
    width: 100%;
  }

  .button,
  .create-post,
  .search {
    min-height: 48px;
  }

  .auth-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .auth-actions .button {
    width: 100%;
  }

  .profile {
    justify-self: end;
  }

  .profile-avatar {
    width: 48px;
    height: 48px;
  }

  .page-title {
    margin-bottom: 12px;
  }

  .page-title h2 {
    font-size: 1.55rem;
  }

  .filter-panel,
  .profile-hero,
  .stats-row,
  .follow-grid,
  .settings-grid,
  .messages-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel,
  .content-panel,
  .profile-hero,
  .empty-state,
  .post-detail,
  .comments-panel,
  .related-panel,
  .settings-panel,
  .auth-card,
  .chat-shell,
  .chat-list {
    border-radius: 16px;
    padding: 14px;
  }

  .chip-row,
  .tag-row,
  .form-actions {
    gap: 7px;
  }

  .chip,
  .tag,
  .pill {
    max-width: 100%;
  }

  .post {
    border-radius: 18px;
  }

  .post:hover {
    transform: none;
  }

  .post-inner {
    min-height: auto;
    padding: 14px;
  }

  .post-content h3 {
    font-size: 1.1rem;
  }

  .post-content p,
  .post-detail p,
  .comment-card p {
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .post-detail h3 {
    font-size: 1.45rem;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }

  .chat-shell {
    min-height: 420px;
  }

  .chat-bubble {
    max-width: 92%;
  }

  .chat-list {
    max-height: 270px;
    overflow: auto;
  }

  .post-meta {
    width: 100%;
    margin-left: 0;
  }

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

  .profile-hero {
    align-items: start;
  }

  .profile-hero .profile-actions {
    width: 100%;
  }

  .profile-hero .follow,
  .profile-actions .follow {
    flex: 1;
  }

  .avatar.large {
    width: 74px;
    height: 74px;
    font-size: 1.2rem;
  }

  .stats-row div {
    padding: 13px 14px;
  }

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

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

  .message-card {
    grid-template-columns: auto 1fr;
  }

  .message-card .pill {
    grid-column: 1 / -1;
    width: max-content;
  }

  .field input,
  .field textarea,
  .field select,
  .setting-row select,
  .chat-compose input,
  .comment-form textarea {
    min-height: 48px;
    border-radius: 12px;
    font-size: 16px;
  }

  .field textarea {
    min-height: 140px;
  }

  .setting-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .setting-row input[type="checkbox"] {
    align-self: flex-start;
  }

  .data-preview {
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 430px) {
  .app {
    padding: 8px;
  }

  .brand {
    margin-inline: -8px;
  }

  .sidebar-card {
    margin-inline: -8px;
  }

  .topbar {
    top: 62px;
  }

  .auth-actions,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .form-actions {
    display: grid;
  }

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

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

  .follow {
    min-height: 34px;
    padding-inline: 11px;
    font-size: 0.84rem;
  }

  .comment-thread.nested {
    margin-left: 10px;
    padding-left: 10px;
  }
}
