﻿:root {
  --bg-primary: #0f0f12;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #f5f5f5;
  --text-secondary: rgba(255, 255, 255, .5);
  --text-tertiary: rgba(255, 255, 255, .3);
  --text-inverse: #000000;
  --accent-primary: #0080FF;
  --accent-secondary: #3b82f6;
  --accent-hover: #93c5fd;
  --accent-repost: #00ba7c;
  --link-color: #6a9fd4;
  --border-color: rgba(255, 255, 255, .1);
  --block-bg: #222224;
  --block-bg-secondary: #2a2a2c;
  --block-hover-bg: #2c2c2f;
  --bg-hover: rgba(255, 255, 255, .08);
  --bg-active: rgba(255, 255, 255, .12);
  --tab-active-bg: rgba(255, 255, 255, .08);
  --settings-tab-active-bg: var(--bg-tertiary);
  --toggle-active-bg: white;
  --glass-bg: rgba(47, 47, 47, .5);
  --nav-gradient: linear-gradient(to bottom, transparent 0%, rgba(21, 21, 24, .3) 30%, rgba(21, 21, 24, .8) 100%);
  --btn-primary-bg: #ffffff;
  --btn-primary-text: #000000;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
}

main {
  min-width: 0;
  padding-bottom: 0;
}

.min-h-screen {
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: none;
  z-index: -1;
}

body.is-nav-open {
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--block-bg-secondary);
  border-radius: 999px;
}

.logo-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: 0 10px 30px rgba(0, 128, 255, 0.3);
}

.logo-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.header-row {
  padding-top: 0.2rem;
  padding-bottom: 0.5rem;
}

.mobile-only {
  display: none !important;
}

.layout-grid {
  width: 100%;
  padding-top: 1rem;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: 1fr;
}

.mobile-nav.hidden {
  display: none;
}

.mobile-nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(6px);
}

.mobile-nav-panel {
  position: relative;
  z-index: 1;
  width: min(320px, 80vw);
  height: 100%;
  background: var(--block-bg);
  border-right: 1px solid var(--border-color);
  padding: 1.2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { transform: translateX(-12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.card {
  background: var(--block-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
}

.section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-tertiary);
}

.post-content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.post-content.is-truncated {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.post-more {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--link-color);
  text-align: left;
}

.post-compose {
  width: 100%;
}

.compose-tools {
  flex-wrap: wrap;
}

.comment-form {
  width: 100%;
}

.post-content strong {
  color: #ffffff;
  font-weight: 600;
}

.post-content a {
  color: var(--link-color);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  display: grid;
  place-items: center;
  font-weight: 700;
}

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

.avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  font-size: 1.4rem;
}

.avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  transition: 0.2s ease;
  font-size: 0.85rem;
}

.icon-btn:hover {
  background: var(--bg-hover);
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  border-radius: 16px;
  color: var(--text-secondary);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.post-author {
  color: inherit;
  text-decoration: none;
}

.post-author:hover {
  color: var(--text-primary);
}

.nav-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  line-height: 1.2;
}

.nav-badge.is-in {
  color: var(--accent-secondary);
  border-color: rgba(0, 128, 255, 0.4);
  background: rgba(0, 128, 255, 0.12);
}

.nav-badge.is-out {
  color: var(--text-tertiary);
}

.chip {
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.72rem;
  transition: 0.2s ease;
}

.chip:hover,
.chip.is-active {
  color: var(--text-inverse);
  background: var(--btn-primary-bg);
}

.file-chip input {
  display: none;
}

.primary-btn {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.2s ease;
  font-size: 0.82rem;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.icon-pill {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.segmented-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: 0.2s ease;
}

.segmented-btn.is-active {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.segmented-btn:hover {
  color: var(--text-primary);
}

.icon-pill.is-liked {
  background: rgba(0, 128, 255, 0.15);
  border-color: rgba(0, 128, 255, 0.5);
}

.comment-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 0.8rem;
}

.comment-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.story-card {
  background: var(--block-bg-secondary);
  border-radius: 18px;
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: 0.2s ease;
}

.story-card:hover {
  transform: translateY(-4px);
  background: var(--block-hover-bg);
}

.story-avatar {
  width: 52px;
  height: 52px;
  border-radius: 20px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-weight: 600;
}

.story-ring {
  border: 2px solid var(--accent-secondary);
  box-shadow: 0 0 0 4px rgba(0, 128, 255, 0.2);
}

.post-media {
  height: 220px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 128, 255, 0.22), rgba(0, 186, 124, 0.12)),
              url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="200"><rect width="400" height="200" fill="%2323262c"/><circle cx="80" cy="60" r="42" fill="%233b82f6" opacity="0.5"/><circle cx="300" cy="120" r="70" fill="%2300ba7c" opacity="0.45"/></svg>');
  border: 1px solid var(--border-color);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.post-media-overlay {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.8rem 1rem;
  border-radius: 16px;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.poll-builder {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.poll-card {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.poll-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  background: var(--bg-hover);
  font-size: 0.85rem;
}

.poll-option-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.poll-text {
  flex: 1;
}

.poll-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.poll-count {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.poll-percent {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.poll-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.poll-bar span {
  display: block;
  height: 100%;
  background: var(--accent-secondary);
  border-radius: 999px;
}

.post-media-real {
  overflow: hidden;
  border-radius: 20px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-secondary);
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
}

.trend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.trend-meta {
  min-width: 0;
}

.badge {
  background: var(--accent-secondary);
  color: var(--text-inverse);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
}

.badge-green {
  background: var(--accent-repost);
}

.badge-blue {
  background: var(--accent-secondary);
}

.action-btn {
  width: 100%;
  border-radius: 16px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  text-align: left;
  transition: 0.2s ease;
  font-size: 0.8rem;
}

.action-btn:hover {
  background: var(--bg-hover);
}

.message-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  transition: 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.message-item:hover {
  background: var(--bg-hover);
}

.message-item.is-active {
  background: var(--bg-active);
  border-color: rgba(255, 255, 255, 0.2);
}

.chat-window {
  background: var(--block-bg-secondary);
  border-radius: 20px;
  padding: 1.2rem;
  border: 1px solid var(--border-color);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: 0.2s ease;
}

.chat-window-fixed {
  height: 70vh;
}

.chat-thread {
  flex: 1;
  overflow-y: auto;
  min-height: 200px;
  padding-right: 4px;
}

.chat-window.is-drop {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.chat-drop-hint {
  position: absolute;
  inset: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(59, 130, 246, 0.6);
  background: rgba(15, 23, 42, 0.65);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.chat-window.is-drop .chat-drop-hint {
  opacity: 1;
}

.chat-bubble {
  max-width: 70%;
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  border-radius: 18px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.chat-bubble-me {
  margin-left: auto;
  background: rgba(0, 128, 255, 0.2);
}

.chat-message-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  opacity: 0;
  transition: 0.2s ease;
}

.chat-bubble:hover .chat-message-actions {
  opacity: 1;
}

.chat-message-delete {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  transition: 0.2s ease;
}

.chat-message-delete:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
}

.chat-message-text {
  white-space: pre-wrap;
}

.chat-attachment-image,
.chat-attachment-video {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.chat-attachment-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.chat-attachment-name {
  color: var(--text-primary);
  font-weight: 600;
}

.chat-attachment-size {
  color: var(--text-tertiary);
}

.chat-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0.6rem;
}

.chat-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.5rem;
}

.chat-emoji {
  border-radius: 12px;
  padding: 0.4rem;
  background: var(--block-bg-secondary);
  border: 1px solid var(--border-color);
  font-size: 1.1rem;
}

.chat-sticker {
  border-radius: 14px;
  padding: 0.35rem;
  background: var(--block-bg-secondary);
  border: 1px solid var(--border-color);
  display: grid;
  place-items: center;
}

.chat-sticker img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.chat-attachment-preview {
  padding: 0.6rem;
  border-radius: 16px;
  border: 1px dashed var(--border-color);
  background: var(--bg-secondary);
}

.chat-attachment-chip {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.chat-attachment-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.chat-attachment-meta {
  display: grid;
  gap: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.chat-gif-input {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.chat-attachments-list {
  display: grid;
  gap: 0.75rem;
}

.chat-attachment-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  text-decoration: none;
  color: inherit;
}

.chat-attachment-item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.chat-attachment-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--block-bg-secondary);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: var(--text-tertiary);
}

.chat-attachment-item .meta {
  display: grid;
  gap: 0.1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.chat-attachment-item .meta strong {
  color: var(--text-primary);
  font-size: 0.85rem;
}

.profile-hero {
  background: linear-gradient(120deg, rgba(0, 128, 255, 0.35), rgba(0, 0, 0, 0.2));
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.group-hero {
  background: linear-gradient(120deg, rgba(0, 128, 255, 0.25), rgba(0, 0, 0, 0.35));
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.group-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(21, 21, 24, 0.2), rgba(21, 21, 24, 0.85));
  z-index: 0;
}

.group-hero > * {
  position: relative;
  z-index: 1;
}

.group-card {
  background: var(--block-bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.group-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 21, 24, 0.2), rgba(21, 21, 24, 0.85));
  z-index: 0;
}

.group-card > * {
  position: relative;
  z-index: 1;
}

.member-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0.8rem 1rem;
}

.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.friend-row.is-fading {
  opacity: 0;
  transform: translateY(6px);
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent-secondary);
  color: var(--text-inverse);
  border-radius: 999px;
  padding: 0.1rem 0.35rem;
  font-size: 0.65rem;
}

.notif-panel {
  position: absolute;
  right: 0;
  top: 46px;
  width: 320px;
  background: var(--block-bg);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 0.9rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  z-index: 30;
}

.toast-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 0.5rem;
  z-index: 60;
}

.toast {
  background: var(--block-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.settings-tab {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.settings-tab.is-active {
  background: var(--settings-tab-active-bg);
  color: var(--text-primary);
}

.toggle {
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  position: relative;
  transition: 0.2s ease;
}

.toggle span {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-tertiary);
  transition: 0.2s ease;
}

.toggle.is-active {
  background: var(--toggle-active-bg);
}

.toggle.is-active span {
  left: 26px;
  background: var(--text-inverse);
}

.color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--swatch);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(520px, 90vw);
  background: var(--block-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: pop 0.2s ease;
}

.modal-action {
  width: 100%;
  border-radius: 16px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  text-align: left;
  transition: 0.2s ease;
  font-size: 0.8rem;
}

.modal-action:hover {
  background: var(--bg-hover);
}

.modal-action.danger {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fecaca;
}

.flash {
  padding: 0.8rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 0.8rem;
  background: var(--bg-secondary);
}

.flash-error {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

.flash-info {
  border-color: rgba(59, 130, 246, 0.6);
  color: #bfdbfe;
}

.auth-card {
  max-width: 520px;
  margin: 0 auto;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--text-tertiary);
}

@keyframes pop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 1024px) {
  .profile-hero {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .group-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .mobile-only {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .layout-grid {
    display: block;
    gap: 0;
    padding-top: 0.8rem;
    padding-bottom: env(safe-area-inset-bottom);
  }

  aside {
    display: none;
  }

  .header-row {
    flex-wrap: wrap;
  }

  .header-profile,
  .header-logout {
    display: none;
  }

  .logo-img {
    width: 38px;
    height: 38px;
  }

  .section-title {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
  }

  .post-content {
    font-size: 0.9rem;
  }

  .segmented {
    width: 100%;
  }

  .segmented-btn {
    flex: 1;
    text-align: center;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
  }

  .primary-btn {
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
  }

  .chip {
    padding: 0.3rem 0.55rem;
    font-size: 0.7rem;
  }

  .icon-pill {
    padding: 0.35rem 0.6rem;
    font-size: 0.74rem;
  }

  .card {
    border-radius: 18px;
  }

  .card.p-6,
  .card.p-5,
  .card.p-4 {
    padding: 1rem;
  }

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

  .post-compose .avatar {
    width: 38px;
    height: 38px;
  }

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

  .compose-tools {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .compose-actions .primary-btn {
    width: 100%;
  }

  .comment-form {
    flex-direction: column;
    align-items: stretch;
  }

  .comment-form .primary-btn {
    width: 100%;
  }

  .chat-window {
    max-height: none;
    height: auto;
  }

  .message-item {
    padding: 0.65rem;
  }

  .chat-window {
    min-height: auto;
    padding: 1rem;
    height: auto;
  }

  .chat-window-fixed {
    height: auto;
  }

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

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

  .post-media-real img,
  .post-media-real video {
    max-height: 260px;
  }
}
