/* From community/app/templates/base.html */
:root {
      --font-family: "Inter", sans-serif;
      --bg: #000000;
      --surface: #161616;
      --surface-hover: #1f1f1f;
      --active: #262626;
      --border: #2a2a2a;
      --text: #ffffff;
      --muted: #737373;
      --pill: #1e1e1e;
      --pill-gradient: linear-gradient(180deg, rgba(42, 42, 42, 0.78) 0%, rgba(30, 30, 30, 0.68) 100%);
      --pill-glow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 1px 2px rgba(255, 255, 255, 0.04);
      --pill-active-gradient: linear-gradient(180deg, rgba(51, 51, 51, 0.85) 0%, rgba(38, 38, 38, 0.75) 100%);
      --pill-active-glow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.06);
      --glass-blur: blur(20px) saturate(160%);
      --publish-bg: #e5e5e5;
      --publish-text: #171717;
      --sidebar-width: 240px;
      --feed-width: 720px;
      --right-width: 220px;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

    body {
      font-family: var(--font-family);
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      line-height: 1.5;
      overflow-x: hidden;
    }

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

    .tabs,
    .tab.active,
    .card,
    .btn-pill,
    .btn-outline,
    .search-bar,
    .tabbar,
    .tabbar-item.active,
    .fab,
    .search-btn-mobile,
    .modal-card {
      -webkit-backdrop-filter: var(--glass-blur);
      backdrop-filter: var(--glass-blur);
    }

    .icon {
      display: block;
      flex-shrink: 0;
      filter: brightness(0) invert(0.55);
    }

    .nav-item.active .icon,
    .nav-item:hover .icon {
      filter: brightness(0) invert(1);
    }

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

    .icon-btn:hover .icon {
      filter: brightness(0) invert(0.85);
    }

    .app {
      display: grid;
      grid-template-columns:
        minmax(16px, 1fr)
        var(--sidebar-width)
        min(var(--feed-width), 100%)
        minmax(0, var(--right-width))
        minmax(16px, 1fr);
      column-gap: 40px;
      align-items: start;
      max-width: 100%;
      margin: 0 auto;
      padding: 24px 0 48px;
      min-height: 100vh;
    }

    .sidebar {
      grid-column: 2;
      width: var(--sidebar-width);
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      position: sticky;
      top: 24px;
      height: calc(100vh - 48px);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      margin-bottom: 24px;
    }

    .brand img {
      width: 32px;
      height: auto;
    }

    /* Полный логотип с текстом «Community» */
    .brand .brand-logo-img {
      width: 100%;
      max-width: 160px;
      height: auto;
      max-height: 44px;
      object-fit: contain;
    }

    .brand-name {
      font-size: 1.125rem;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .brand-version {
      font-size: 0.75rem;
      color: var(--muted);
      font-weight: 500;
    }

    .nav-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 12px 16px;
      border-radius: 16px;
      font-size: 0.95rem;
      font-weight: 500;
      color: var(--text);
      transition: background 0.15s;
    }

    .nav-item:hover {
      background: var(--surface-hover);
    }

    .nav-item.active {
      background: var(--active);
    }

    .nav-item.disabled {
      opacity: 0.45;
      pointer-events: none;
    }

    .nav-spacer { flex: 1; }

    .feed {
      grid-column: 3;
      width: 100%;
      max-width: var(--feed-width);
      min-width: 0;
      margin: 0 auto;
    }

    .rightbar {
      grid-column: 4;
      width: var(--right-width);
      flex-shrink: 0;
      padding-top: 8px;
    }

    .footer-links {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .footer-links a {
      color: var(--muted);
      font-size: 0.8125rem;
      transition: color 0.15s;
    }

    .footer-links a:hover {
      color: var(--text);
    }

    .copyright {
      margin-top: 20px;
      color: var(--muted);
      font-size: 0.8125rem;
    }

    .tabs {
      display: flex;
      gap: 4px;
      background: var(--pill-gradient);
      box-shadow: var(--pill-glow);
      border-radius: 999px;
      padding: 4px;
      margin-bottom: 16px;
    }

    .tab {
      flex: 1;
      text-align: center;
      padding: 10px 16px;
      border-radius: 999px;
      font-size: 0.875rem;
      font-weight: 500;
      color: var(--muted);
      transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    }

    .tab:hover {
      color: var(--text);
    }

    .tab.active {
      background: var(--pill-active-gradient);
      box-shadow: var(--pill-active-glow);
      color: var(--text);
    }

    .card {
      background: var(--pill-gradient);
      box-shadow: var(--pill-glow);
      border-radius: 20px;
      padding: 16px;
      margin-bottom: 16px;
    }

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

    .composer-top {
      display: flex;
      gap: 12px;
      align-items: flex-start;
    }

    .composer textarea {
      flex: 1;
      background: transparent;
      border: none;
      color: var(--text);
      font-size: 1rem;
      font-family: inherit;
      line-height: 1.5;
      resize: none;
      min-height: 28px;
      padding: 4px 0;
    }

    .composer textarea:focus {
      outline: none;
    }

    .composer textarea::placeholder {
      color: var(--muted);
    }

    .composer-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

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

    .icon-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      border: none;
      background: transparent;
      border-radius: 10px;
      cursor: pointer;
      transition: background 0.15s;
    }

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

    .btn-publish {
      padding: 10px 24px;
      border: none;
      border-radius: 999px;
      background: var(--publish-bg);
      color: var(--publish-text);
      font-size: 0.875rem;
      font-weight: 600;
      cursor: pointer;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
      transition: opacity 0.15s;
    }

    .btn-publish:hover {
      opacity: 0.9;
    }

    .btn-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 12px 20px;
      border: none;
      border-radius: 999px;
      background: var(--pill-gradient);
      box-shadow: var(--pill-glow);
      color: var(--text);
      font-size: 0.875rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: background 0.15s, box-shadow 0.15s;
    }

    .btn-pill:hover {
      background: var(--pill-active-gradient);
      box-shadow: var(--pill-active-glow);
    }

    .avatar {
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background: var(--avatar-color, #7c3aed);
      color: white;
      font-weight: 700;
      flex-shrink: 0;
      overflow: hidden;
    }

    .avatar.has-image {
      background: #111827;
    }

    .avatar-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .avatar-md {
      width: 40px;
      height: 40px;
      font-size: 1rem;
    }

    .avatar-sm {
      width: 36px;
      height: 36px;
      font-size: 0.875rem;
    }

    .avatar-wrap {
      position: relative;
      display: inline-flex;
    }

    .avatar-wrap-online::after {
      content: "";
      position: absolute;
      right: 2px;
      bottom: 2px;
      width: 12px;
      height: 12px;
      background: #22c55e;
      border: 2px solid var(--bg);
      border-radius: 50%;
    }

    .profile-header {
      margin-bottom: 16px;
      overflow: hidden;
    }

    .profile-banner-wrap {
      position: relative;
      margin-bottom: 56px;
    }

    .profile-banner {
      position: relative;
      height: 180px;
      background: var(--surface, #161616);
      border-radius: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .profile-banner.has-image {
      background: #111827;
    }

    .profile-banner-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .profile-banner-text {
      color: #111827;
      font-size: 3rem;
      font-weight: 700;
      font-style: italic;
      letter-spacing: -0.03em;
    }

    .profile-banner-actions {
      position: absolute;
      right: 16px;
      bottom: 16px;
      display: flex;
      gap: 8px;
    }

    .profile-banner-btn {
      width: 36px;
      height: 36px;
      border: none;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.08);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    .profile-banner-btn img {
      width: 18px;
      height: 18px;
      filter: none;
      opacity: 0.7;
    }

    .profile-banner.has-image .profile-banner-btn {
      background: rgba(255, 255, 255, 0.9);
    }

    .profile-avatar {
      position: absolute;
      left: 24px;
      bottom: -56px;
      z-index: 2;
    }

    .profile-avatar-btn {
      position: absolute;
      right: 4px;
      bottom: 4px;
      z-index: 3;
      width: 36px;
      height: 36px;
      border: none;
      border-radius: 50%;
      background: var(--pill-gradient);
      box-shadow: var(--pill-glow);
      -webkit-backdrop-filter: var(--glass-blur);
      backdrop-filter: var(--glass-blur);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    .profile-avatar-btn .icon {
      width: 18px;
      height: 18px;
      filter: brightness(0) invert(1);
    }

    .profile-avatar .avatar {
      width: 120px;
      height: 120px;
      font-size: 2.75rem;
      border: 5px solid var(--bg);
    }

    .profile-avatar .avatar-wrap-online::after {
      right: 8px;
      bottom: 8px;
      width: 18px;
      height: 18px;
      border-width: 3px;
    }

    .profile-identity {
      padding: 0 8px 0 24px;
      margin-bottom: 12px;
    }

    .profile-toolbar {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      height: 56px;
      margin-top: -56px;
      margin-bottom: 12px;
    }

    .profile-info {
      width: 100%;
    }

    .profile-head-text {
      display: flex;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 10px;
      min-width: 0;
    }

    .profile-name {
      font-size: 1.75rem;
      font-weight: 700;
      margin: 0;
      line-height: 1.2;
    }

    .profile-username {
      color: var(--muted);
      font-size: 1rem;
      margin-bottom: 0;
    }

    .profile-btn {
      padding: 10px 20px;
      border-radius: 999px;
      font-size: 0.875rem;
      font-weight: 600;
      border: none;
      cursor: pointer;
    }

    .profile-btn-edit {
      background: #ffffff;
      color: #111827;
    }

    .profile-btn-follow {
      background: #ffffff;
      color: #111827;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }

    .profile-btn-outline {
      background: var(--pill-gradient);
      box-shadow: var(--pill-glow);
      -webkit-backdrop-filter: var(--glass-blur);
      backdrop-filter: var(--glass-blur);
      color: var(--text);
    }

    .profile-verified {
      width: 20px;
      height: 20px;
      filter: none;
    }

    .profile-bio {
      font-size: 0.9375rem;
      margin-bottom: 12px;
      line-height: 1.5;
    }

    .profile-stats {
      display: flex;
      gap: 16px;
      font-size: 0.9375rem;
      margin-bottom: 12px;
    }

    .profile-meta {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--muted);
      font-size: 0.9375rem;
      font-weight: 500;
      margin-bottom: 20px;
    }

    .profile-meta .icon {
      width: 20px;
      height: 20px;
    }

    .profile-tabs {
      margin-bottom: 16px;
    }

    .post-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }

    .post-info {
      flex: 1;
      min-width: 0;
    }

    .post-author {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-weight: 600;
      font-size: 0.9375rem;
    }

    .post-author:hover {
      text-decoration: underline;
    }

    .post-author .verified-check,
    .post-author .verified-check-slot {
      flex-shrink: 0;
    }

    /* Внутренние формы комментариев в профилях */
    .pf-post-comments,
    .up-post-comments {
      padding: 12px 14px 14px;
      border-top: 1px solid var(--border, #2a2a2a);
      background: rgba(0, 0, 0, 0.18);
      border-radius: 0 0 14px 14px;
    }
    .pf-post-comments.hidden,
    .up-post-comments.hidden { display: none !important; }

    .pf-post-comments-loading,
    .up-post-comments-loading,
    .pf-post-comments-error,
    .up-post-comments-error {
      padding: 8px 4px;
      color: var(--muted, #a3a3a3);
      font-size: 13px;
      text-align: center;
    }

    .pf-comments-list,
    .up-comments-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 10px;
      max-height: 280px;
      overflow-y: auto;
    }

    .pf-comments-empty,
    .up-comments-empty {
      text-align: center;
      color: var(--muted, #a3a3a3);
      font-size: 13px;
      padding: 8px 0;
    }

    .pf-comment,
    .up-comment {
      display: flex;
      gap: 10px;
      padding: 6px 0;
    }

    .pf-comment .comment-avatar,
    .up-comment .comment-avatar {
      width: 28px;
      height: 28px;
      flex-shrink: 0;
      border-radius: 50%;
      overflow: hidden;
      object-fit: cover;
      background: var(--active, #262626);
      color: var(--text, #fff);
      display: grid;
      place-items: center;
      font-size: 12px;
      font-weight: 700;
    }

    .pf-comment-body,
    .up-comment-body {
      flex: 1;
      min-width: 0;
    }

    .pf-comment-author,
    .up-comment-author {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-weight: 600;
      font-size: 13px;
      margin-bottom: 2px;
      color: var(--text, #fff);
    }

    .pf-comment-text,
    .up-comment-text {
      font-size: 14px;
      line-height: 1.4;
      color: var(--text, #fff);
      word-wrap: break-word;
    }

    .pf-comment-time,
    .up-comment-time {
      font-size: 11px;
      color: var(--muted, #a3a3a3);
      margin-top: 3px;
    }

    .pf-comment-form,
    .up-comment-form {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .pf-comment-input,
    .up-comment-input {
      flex: 1;
      background: var(--surface, #161616);
      border: 1px solid var(--border, #2a2a2a);
      border-radius: 999px;
      padding: 8px 14px;
      color: var(--text, #fff);
      font: inherit;
      font-size: 14px;
    }

    .pf-comment-input:focus,
    .up-comment-input:focus {
      outline: none;
      border-color: var(--accent, #3b82f6);
    }

    .pf-comment-submit,
    .up-comment-submit {
      background: var(--accent, #3b82f6);
      color: #fff;
      border: none;
      border-radius: 999px;
      padding: 8px 14px;
      font-weight: 600;
      font-size: 13px;
      cursor: pointer;
      transition: background 0.15s ease, opacity 0.15s ease;
    }

    .pf-comment-submit:hover,
    .up-comment-submit:hover { background: var(--accent-hover, #2f6df0); }
    .pf-comment-submit:disabled,
    .up-comment-submit:disabled { opacity: 0.55; cursor: wait; }

    .post-avatar-link {
      flex-shrink: 0;
    }

    .post-time {
      color: var(--muted);
      font-size: 0.8125rem;
    }

    .post-menu {
      position: relative;
    }

    .post-menu-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border: none;
      background: transparent;
      border-radius: 8px;
      cursor: pointer;
    }

    .post-menu-btn:hover {
      background: var(--active);
    }

    .post-menu-btn .icon {
      width: 20px;
      height: 20px;
    }

    .post-content {
      word-break: break-word;
      font-size: 0.9375rem;
      line-height: 1.6;
    }

    .mention {
      color: #3b82f6;
      font-weight: 500;
    }

    .mention:hover {
      text-decoration: underline;
    }

    .notification-item {
      display: flex;
      gap: 12px;
      align-items: flex-start;
    }

    .notification-avatar {
      flex-shrink: 0;
    }

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

    .notification-text {
      font-size: 0.9375rem;
      line-height: 1.5;
      margin-bottom: 6px;
    }

    .notification-user {
      font-weight: 600;
    }

    .notification-user:hover {
      text-decoration: underline;
    }

    .notification-preview {
      color: var(--muted);
      font-size: 0.875rem;
      margin-bottom: 6px;
      line-height: 1.5;
    }

    .notification-time {
      color: var(--muted);
      font-size: 0.8125rem;
    }

    .notification-unread {
      box-shadow: var(--pill-glow), inset 3px 0 0 #3b82f6;
    }

    .post-delete {
      margin-top: 12px;
    }

    .post-delete button {
      background: none;
      border: none;
      color: var(--muted);
      font-size: 0.8125rem;
      cursor: pointer;
      padding: 0;
    }

    .post-delete button:hover {
      color: #ef4444;
    }

    .empty {
      text-align: center;
      color: var(--muted);
      padding: 48px 16px;
      font-size: 0.9375rem;
    }

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

    .auth-card h1 {
      font-size: 1.5rem;
      margin-bottom: 20px;
    }

    .error {
      background: #2a1010;
      border: 1px solid #5a2020;
      color: #ff8888;
      padding: 12px 16px;
      border-radius: 12px;
      margin-bottom: 16px;
      font-size: 0.875rem;
    }

    .form-group {
      margin-bottom: 16px;
    }

    label {
      display: block;
      font-size: 0.8125rem;
      color: var(--muted);
      margin-bottom: 6px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
      width: 100%;
      padding: 12px 16px;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      color: var(--text);
      font-size: 1rem;
      font-family: inherit;
    }

    input:focus {
      outline: none;
      border-color: #525252;
    }

    .btn-primary {
      width: 100%;
      padding: 12px;
      border: none;
      border-radius: 999px;
      background: var(--publish-bg);
      color: var(--publish-text);
      font-size: 0.9375rem;
      font-weight: 600;
      cursor: pointer;
    }

    .auth-footer {
      margin-top: 16px;
      text-align: center;
      font-size: 0.875rem;
      color: var(--muted);
    }

    .auth-footer a {
      color: var(--text);
    }

    .guest-banner {
      text-align: center;
      padding: 8px 0 4px;
    }

    .guest-banner p {
      color: var(--muted);
      margin-bottom: 16px;
      font-size: 0.9375rem;
    }

    .guest-actions {
      display: flex;
      gap: 8px;
      justify-content: center;
    }

    .btn-outline {
      padding: 10px 20px;
      border-radius: 999px;
      font-size: 0.875rem;
      font-weight: 600;
      border: none;
      background: var(--pill-gradient);
      box-shadow: var(--pill-glow);
      color: var(--text);
      transition: background 0.15s, box-shadow 0.15s;
    }

    .btn-outline:hover {
      background: var(--pill-active-gradient);
      box-shadow: var(--pill-active-glow);
    }

    .page-title {
      font-size: 2rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      margin-bottom: 20px;
    }

    .search-form {
      margin-bottom: 16px;
    }

    .search-bar {
      display: flex;
      align-items: center;
      gap: 12px;
      background: var(--pill-gradient);
      box-shadow: var(--pill-glow);
      border-radius: 999px;
      padding: 12px 18px;
    }

    .search-bar .icon {
      width: 22px;
      height: 22px;
      filter: brightness(0) invert(0.45);
    }

    .search-bar input {
      flex: 1;
      background: transparent;
      border: none;
      color: var(--text);
      font-size: 1.25rem;
      font-family: inherit;
      line-height: 1.2;
    }

    .search-bar input:focus {
      outline: none;
    }

    .search-bar input::placeholder {
      color: var(--muted);
    }

    .section-title {
      font-size: 1.125rem;
      font-weight: 700;
      margin-bottom: 16px;
    }

    .hashtag-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .hashtag-item {
      padding: 14px 4px;
      border-radius: 12px;
      transition: background 0.15s;
    }

    .hashtag-item:hover {
      background: var(--surface-hover);
    }

    .hashtag-name {
      color: #3b82f6;
      font-size: 1.0625rem;
      font-weight: 600;
      margin-bottom: 4px;
    }

    .hashtag-count {
      color: var(--muted);
      font-size: 0.8125rem;
    }

    .search-results {
      margin-bottom: 16px;
    }

    .search-result-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 4px;
      border-radius: 12px;
      transition: background 0.15s;
    }

    .search-result-item:hover {
      background: var(--surface-hover);
    }

    .search-result-name {
      font-weight: 600;
      font-size: 0.9375rem;
      color: var(--text);
    }

    .search-result-name:hover {
      color: var(--text);
    }

    .tabs .tab {
      display: block;
    }

    .search-result-meta {
      color: var(--muted);
      font-size: 0.8125rem;
    }

    .feed-toolbar {
      margin-bottom: 16px;
    }

    .feed-toolbar .tabs {
      margin-bottom: 0;
    }

    .search-btn-mobile {
      display: none;
    }

    .modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 200;
      background: rgba(0, 0, 0, 0.45);
      -webkit-backdrop-filter: blur(12px) saturate(120%);
      backdrop-filter: blur(12px) saturate(120%);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-overlay[hidden] {
      display: none;
    }

    .modal-card {
      width: 100%;
      max-width: 480px;
      background: var(--pill-gradient);
      box-shadow: var(--pill-glow);
      border-radius: 24px;
      padding: 24px;
    }

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

    .modal-header h2 {
      font-size: 1.25rem;
      font-weight: 700;
    }

    .modal-close {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      border: none;
      border-radius: 50%;
      background: var(--active);
      cursor: pointer;
      flex-shrink: 0;
    }

    .modal-close .icon {
      width: 18px;
      height: 18px;
      filter: brightness(0) invert(0.85);
    }

    .modal-error {
      background: #2a1010;
      border: 1px solid #5a2020;
      color: #ff8888;
      padding: 10px 14px;
      border-radius: 12px;
      margin-bottom: 16px;
      font-size: 0.875rem;
    }

    .modal-form textarea {
      width: 100%;
      padding: 12px 16px;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      color: var(--text);
      font-family: inherit;
      font-size: 1rem;
      resize: vertical;
      min-height: 100px;
    }

    .modal-form textarea:focus {
      outline: none;
      border-color: #525252;
    }

    .modal-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      margin-top: 4px;
    }

    .modal-avatar-row {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .modal-avatar-actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .modal-hint {
      margin-top: 8px;
      color: var(--muted);
      font-size: 0.8125rem;
    }

    .tabbar,
    .fab {
      display: none;
    }

    @media (max-width: 1100px) {
      .rightbar { display: none; }

      .app {
        grid-template-columns:
          minmax(16px, 1fr)
          var(--sidebar-width)
          min(var(--feed-width), 100%)
          minmax(16px, 1fr);
      }
    }

    @media (max-width: 768px) {
      .app {
        display: block;
        padding: 0 0 calc(92px + env(safe-area-inset-bottom, 0px));
      }

      .sidebar {
        display: none;
      }

      .feed {
        max-width: 100%;
        padding: 12px 16px 8px;
        margin: 0 auto;
      }

      .tabbar {
        display: flex;
        position: fixed;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        left: 16px;
        right: 16px;
        z-index: 100;
        align-items: stretch;
        justify-content: space-between;
        gap: 2px;
        padding: 4px;
        background: var(--pill-gradient);
        box-shadow: var(--pill-glow), 0 8px 32px rgba(0, 0, 0, 0.45);
        border-radius: 999px;
      }

      .tabbar-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-height: 56px;
        padding: 6px 4px;
        border-radius: 999px;
        font-size: 0.625rem;
        font-weight: 500;
        color: var(--muted);
        transition: background 0.15s, box-shadow 0.15s, color 0.15s;
      }

      .tabbar-item .icon {
        width: 22px;
        height: 22px;
      }

      .tabbar-item.active {
        background: var(--pill-active-gradient);
        box-shadow: var(--pill-active-glow);
        color: var(--text);
      }

      .tabbar-item.active .icon {
        filter: brightness(0) invert(1);
      }

      .tabbar-item.disabled {
        opacity: 0.4;
        pointer-events: none;
      }

      .fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: 16px;
        bottom: calc(88px + env(safe-area-inset-bottom, 0px));
        z-index: 101;
        width: 52px;
        height: 52px;
        border: none;
        border-radius: 50%;
        background: var(--pill-gradient);
        box-shadow: var(--pill-glow);
        cursor: pointer;
      }

      .fab .icon {
        width: 24px;
        height: 24px;
        filter: brightness(0) invert(1);
      }

      .feed-toolbar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 16px;
      }

      .feed-toolbar .tabs {
        flex: 1;
        margin-bottom: 0;
        min-width: 0;
      }

      .search-btn-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: var(--pill-gradient);
        box-shadow: var(--pill-glow);
      }

      .search-btn-mobile .icon {
        width: 20px;
        height: 20px;
        filter: brightness(0) invert(0.7);
      }

      .tabs {
        padding: 3px;
      }

      .tab {
        padding: 11px 12px;
        font-size: 0.8125rem;
      }

      .card {
        border-radius: 16px;
        padding: 14px;
      }

      .composer-bottom {
        flex-wrap: wrap;
        gap: 12px;
      }

      .btn-publish {
        flex: 1;
        min-width: 120px;
        padding: 12px 20px;
      }

      .guest-actions {
        flex-direction: column;
        width: 100%;
      }

      .guest-actions .btn-publish,
      .guest-actions .btn-outline {
        display: block;
        width: 100%;
        text-align: center;
        padding: 14px 20px;
      }

      .page-title {
        font-size: 1.5rem;
      }

      .search-bar input {
        font-size: 1rem;
      }

      .profile-banner {
        height: 140px;
        border-radius: 16px;
      }

      .profile-avatar .avatar {
        width: 88px;
        height: 88px;
        font-size: 2rem;
        border-width: 4px;
      }

      .profile-banner-wrap {
        margin-bottom: 48px;
      }

      .profile-avatar {
        left: 16px;
        bottom: -44px;
      }

      .profile-identity {
        padding: 0 4px 0 16px;
      }

      .profile-toolbar {
        height: 48px;
        margin-top: -48px;
      }

      .profile-name {
        font-size: 1.375rem;
      }

      .profile-btn {
        padding: 10px 18px;
      }

      .profile-btn-edit {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
      }
    }

.post-actions { display:flex; align-items:center; gap:18px; padding-top:7px; color:var(--text-muted, var(--rd-muted)); font-size:13px; }
.post-like-btn { display:inline-flex; align-items:center; gap:6px; border:0; background:transparent; color:var(--text-muted, var(--rd-muted)); padding:4px 5px; margin:-4px -5px; border-radius:8px; cursor:pointer; font:inherit; transition:background .15s ease, color .15s ease, transform .15s ease; }
.post-like-btn:hover { background:var(--bg-hover, rgba(127,127,127,.08)); }
.post-like-btn:active { transform:scale(.96); }
.post-action-icon { width:18px; height:18px; flex:0 0 18px; object-fit:contain; opacity:.72; filter:grayscale(1) brightness(.72); transition:filter .15s ease, opacity .15s ease, transform .15s ease; }
.post-like-btn .post-like-icon { width:18px; height:18px; }
.post-view-count .post-view-icon { width:17px; height:17px; }
.post-like-btn.is-liked { color:#ef4444; }
.post-like-btn .post-like-icon, .post-view-count .post-view-icon { filter: grayscale(1) brightness(0) invert(68%); opacity:1; }
.post-like-btn.is-liked .post-like-icon { filter:none; }
.post-like-btn.is-liked .post-like-icon { opacity:1; filter:invert(24%) sepia(96%) saturate(4100%) hue-rotate(344deg) brightness(96%) contrast(94%); transform:scale(1.04); }
.post-like-btn:disabled { opacity:.55; cursor:wait; }
.post-view-count { display:inline-flex; align-items:center; gap:4px; color:var(--text-muted, var(--rd-muted)); font-variant-numeric:tabular-nums; }
