html { font-size: 16px; }
body { line-height: 1.5; letter-spacing: 0; overflow-wrap: break-word; }
h1, h2, h3, p, span, a, button, label, input, textarea { line-height: inherit; }
.brand, .timeline-header h1, .panel-title h3, .display-name { letter-spacing: -0.02em; }
.nav a, .nav-form button { min-height: 50px; white-space: nowrap; }
.timeline { min-width: 0; overflow: hidden; }
.post-meta { min-width: 0; flex-wrap: wrap; row-gap: 0; }
.post-meta .display-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-text { line-height: 1.55; }
.profile-avatar { overflow: hidden; }

.settings-page { overflow: visible; }
.settings-wrap { padding: 28px; display: grid; gap: 24px; }
.setting-panel { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 12px 34px rgba(32, 24, 64, .05); }
.setting-copy { margin-bottom: 22px; }
.setting-copy h2 { font: 700 25px/1.2 "Space Grotesk", sans-serif; margin: 7px 0; }
.setting-copy p { color: var(--muted); margin: 0; max-width: 520px; }
.setting-panel form { display: grid; gap: 16px; }
.setting-panel label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
.setting-panel input { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: #fff; outline: none; }
.setting-panel input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(108, 77, 255, .12); }
.setting-panel .button { justify-self: start; }
.avatar-picker { display: flex; align-items: center; gap: 20px; }
.avatar-picker .profile-avatar { width: 88px; height: 88px; margin: 0; border: 4px solid #f0edff; flex: 0 0 auto; }
.file-field { flex: 1; min-width: 0; }
.file-field small { color: var(--muted); font-weight: 400; }

.admin-table > div { gap: 18px; }
.admin-controls { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.admin-controls form { display: flex; gap: 6px; }
.mini-action { border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 7px 9px; color: var(--ink); font-size: 11px; font-weight: 700; cursor: pointer; }
.mini-action:hover { border-color: var(--purple); color: var(--purple); }
.mini-action.danger { color: #b53b32; }
.admin-table .status-active { background: #e7f8f2; color: #16705d; }
.admin-table .status-suspended { background: #fff0ed; color: #a53529; }

.legal-footer { padding: 20px 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.legal-footer p { margin: 5px 0; }
.legal-footer a { color: var(--purple); font-weight: 700; }
.auth-form .legal-footer { margin-top: 26px; border-top: 1px solid var(--line); }
.timeline > .legal-footer { padding: 24px; border-top: 1px solid var(--line); }
.rightbar > .legal-footer { padding: 16px 8px; }
.profile-avatar { background: var(--avatar, #6c4dff) url("default-avatar.svg") center/cover no-repeat; color: transparent; }
.profile-avatar:has(img) { background-image: none; }
.reply-picker { display: flex; align-items: center; gap: 6px; color: var(--purple); }
.reply-picker select { max-width: 190px; border: 0; background: transparent; color: var(--purple); font-size: 12px; font-weight: 700; outline: none; cursor: pointer; }
.post-link { color: var(--purple); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.video-embed { position: relative; aspect-ratio: 16/9; margin-top: 13px; overflow: hidden; border-radius: 15px; background: #17151f; }
.video-embed iframe { width: 100%; height: 100%; border: 0; }
.post-actions a { color: inherit; }
.reply-locked { margin: 0; padding: 17px 24px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.reply-locked a { color: var(--purple); font-weight: 700; }
.reply-composer .composer-footer { justify-content: flex-end; gap: 14px; }
.post-actions { max-width: 430px; align-items: center; overflow: visible; }
.post-actions form { margin: 0; }
.post-actions button { border: 0; background: transparent; cursor: pointer; }
.repost-button.active { color: #0e9f8a; font-weight: 700; }
.reaction-wrap { position: relative; }
.reaction-summary { display: flex; align-items: center; gap: 4px; color: #918d9d; font-size: 17px; padding: 2px 5px; }
.reaction-summary.active { color: var(--purple); }
.reaction-menu { position: absolute; z-index: 8; left: 50%; bottom: 28px; transform: translate(-50%, 8px); display: flex; gap: 3px; padding: 7px; border: 1px solid var(--line); border-radius: 999px; background: #fff; box-shadow: 0 10px 32px rgba(28,20,60,.16); opacity: 0; visibility: hidden; transition: .16s; }
.reaction-wrap:hover .reaction-menu, .reaction-wrap:focus-within .reaction-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.reaction-menu button { display: flex; flex-direction: column; align-items: center; min-width: 37px; padding: 4px; border-radius: 10px; font-size: 20px; transition: transform .15s, background .15s; }
.reaction-menu button:hover { transform: translateY(-4px) scale(1.14); background: #f3f0ff; }
.reaction-menu button.selected { background: #eeeaff; }
.reaction-menu small { font-size: 9px; color: var(--muted); }
@media (hover:none) { .reaction-menu { left: auto; right: -8px; transform: none; } .reaction-wrap:focus-within .reaction-menu { transform: none; } }
.repost-label { margin-bottom: 5px; color: #0e8a76; font-size: 11px; font-weight: 700; }
.repost-label a { color: inherit; }
.profile-top { display: flex; align-items: flex-end; justify-content: space-between; min-height: 48px; }
.profile-top .profile-avatar { flex: 0 0 auto; }
.profile-top form { margin-top: 12px; }
.follow-stats { display: flex; gap: 18px; margin: 11px 0; color: var(--muted); font-size: 13px; }
.follow-stats b { color: var(--ink); }
.feed-tabs a { flex: 1; display: grid; place-items: center; position: relative; color: var(--muted); font-size: 14px; font-weight: 600; }
.feed-tabs a.active { color: var(--ink); }
.feed-tabs a.active:after { content: ""; position: absolute; bottom: 0; width: 50px; height: 3px; background: var(--purple); border-radius: 3px; }
.people-list { display: grid; }
.connection-card { display: flex; align-items: center; gap: 13px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.connection-card:hover { background: #faf9ff; }
.connection-card > span:last-child { display: flex; flex-direction: column; }
.connection-card small { color: var(--muted); }
.nav a { position: relative; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 10px; line-height: 1; }
.nav-badge.is-empty { display: none; }
.notification-list { display: grid; }
.notification-item { display: flex; gap: 13px; padding: 17px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.notification-item.unread { background: #f5f2ff; }
.notification-item > span:last-child { min-width: 0; line-height: 1.45; }
.notification-item small, .notification-item em { display: block; color: var(--muted); font-size: 11px; font-style: normal; }
.notification-item em { margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media(max-width:1000px){.nav-badge{position:absolute;right:2px;top:2px}.nav a{overflow:visible}}
.inline-follow { margin-left: auto; }
.inline-follow button { border: 0; background: transparent; color: var(--purple); padding: 2px 5px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.inline-follow button:hover { text-decoration: underline; }
.trend-empty { padding: 15px 18px 18px; color: var(--muted); font-size: 12px; }

@media (max-width: 1000px) {
  .nav a, .nav-form button { min-height: 48px; justify-content: center; }
  .nav a { font-size: 0; }
  .nav a span { font-size: 26px; }
}
@media (max-width: 650px) {
  html { font-size: 15px; }
  .nav { gap: 2px; }
  .nav a { padding: 7px; min-height: 46px; }
  .settings-wrap { padding: 16px; gap: 16px; }
  .setting-panel { padding: 20px 16px; border-radius: 16px; }
  .avatar-picker { align-items: flex-start; gap: 14px; }
  .avatar-picker .profile-avatar { width: 70px; height: 70px; }
  .admin-table > div, .user-table > div { align-items: flex-start; flex-direction: column; }
  .admin-controls { justify-content: flex-start; }
  .auth-form { align-items: start; }
  .form-card { margin: 0 auto; }
}
