@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  color-scheme: dark;
  font-family: "DM Sans", system-ui, sans-serif;
  --bg: #111318;
  --surface: #181b22;
  --surface-2: #20242d;
  --surface-3: #292e38;
  --text: #f5f6f8;
  --muted: #9ca3b0;
  --subtle: #6e7684;
  --line: rgba(245, 246, 248, .11);
  --line-strong: rgba(245, 246, 248, .2);
  --primary: #DF1756;
  --primary-light: #ff5d8b;
  --accent: #91e1c5;
  --blue: #8eafff;
  --radius-sm: 10px;
  --radius-md: 15px;
  --radius-lg: 21px;
  --shadow: 0 18px 48px rgba(0, 0, 0, .2);
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, label:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { width: min(1440px, calc(100% - 48px)); margin: 0 auto; }
.topbar { min-height: 76px; display: flex; align-items: center; gap: 30px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; font-family: "Space Grotesk", sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -.07em; }
.brand > span:last-child > span { color: var(--primary-light); }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: transparent; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.search-form { width: min(390px, 40vw); height: 42px; position: relative; display: flex; align-items: center; margin-left: 18px; }
.search-form input { width: 100%; height: 100%; padding: 0 38px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--text); font-size: 12px; outline: none; transition: border-color .2s ease, background .2s ease; }
.search-form input:focus { border-color: var(--accent); background: var(--surface-2); }
.search-form input::placeholder { color: var(--subtle); }
.search-symbol { position: absolute; z-index: 1; left: 14px; color: var(--muted); font-size: 22px; line-height: 1; pointer-events: none; }
.clear-search { position: absolute; right: 6px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 19px; }
.top-actions { display: flex; align-items: center; gap: 23px; margin-left: auto; }
.top-action { padding: 28px 0 24px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 12px; font-weight: 700; }
.top-action:hover, .top-action.active { color: var(--text); border-color: var(--primary); }
.icon-button { width: 38px; height: 38px; position: relative; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); font-size: 23px; }
.icon-button:hover { color: var(--text); }
.notification-dot { width: 6px; height: 6px; position: absolute; top: 7px; right: 5px; border: 1px solid var(--bg); border-radius: 50%; background: var(--primary); }
.profile-chip { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 4px 9px 4px 4px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--text); }
.profile-chip:hover { border-color: var(--line-strong); background: var(--surface-2); }
.profile-name { font-size: 12px; font-weight: 700; }
.chevron { color: var(--muted); font-size: 16px; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.avatar-small { width: 32px; height: 32px; }
.avatar-medium { width: 38px; height: 38px; }
.avatar-coral { background: var(--primary-light); }
.avatar-blue { background: var(--blue); }
.avatar-lilac { background: #d3a8ff; }

.layout { display: grid; grid-template-columns: 194px minmax(0, 1fr) 275px; gap: 35px; }
.left-rail, .right-rail { padding-top: 31px; }
.left-rail { border-right: 1px solid var(--line); padding-right: 24px; min-height: calc(100vh - 77px); }
.rail-nav { display: grid; gap: 5px; }
.rail-link { min-height: 43px; display: flex; align-items: center; gap: 13px; padding: 0 13px; border-radius: var(--radius-sm); color: var(--muted); font-size: 13px; font-weight: 600; }
.rail-link:hover, .rail-link.active { background: var(--surface-2); color: var(--text); }
.rail-link.active .rail-icon { color: var(--primary-light); }
.rail-icon { width: 20px; color: var(--subtle); font-size: 18px; text-align: center; }
.rail-divider { height: 1px; margin: 29px 12px 25px; background: var(--line); }
.rail-label { margin: 0 13px 12px; color: var(--subtle); font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.mini-profile { min-height: 58px; display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: var(--radius-sm); }
.mini-profile:hover { background: var(--surface); }
.mini-profile strong, .mini-profile small { display: block; }
.mini-profile strong { font-size: 11px; }
.mini-profile small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.mini-profile .arrow { margin-left: auto; color: var(--subtle); }
.rail-note { display: flex; gap: 9px; margin-top: 27px; padding: 12px 9px; border: 1px solid rgba(145, 225, 197, .17); border-radius: var(--radius-sm); background: rgba(145, 225, 197, .06); }
.privacy-mark { width: 19px; height: 19px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 11px; font-weight: 800; }
.rail-note strong, .rail-note span:last-child { display: block; }
.rail-note strong { font-size: 10px; }
.rail-note span:last-child { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }

.main-content { min-width: 0; padding: 47px 0 70px; }
.welcome-row { display: flex; justify-content: space-between; align-items: end; gap: 22px; }
.welcome-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.download-status { max-width: 150px; color: var(--accent); font-size: 10px; line-height: 1.3; }
.download-status.error { color: var(--primary-light); }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
h1, h2 { margin: 0; font-family: "Space Grotesk", sans-serif; letter-spacing: -.055em; }
h1 { font-size: clamp(32px, 4vw, 47px); line-height: 1.03; }
h2 { font-size: 22px; line-height: 1.1; }
.welcome-copy { max-width: 520px; margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; padding: 0 17px; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--text); font-size: 12px; font-weight: 700; transition: transform .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-dark { background: var(--surface-2); border-color: var(--line); }
.button-dark:hover { background: var(--surface-3); }
.button-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 22px rgba(223, 23, 86, .24); }
.button-primary:hover { background: var(--primary-light); }
.button-primary:disabled { cursor: not-allowed; opacity: .4; transform: none; box-shadow: none; }
.button-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.button-ghost:hover { color: var(--text); background: var(--surface-2); }
.category-row { display: flex; gap: 7px; margin-top: 31px; padding-bottom: 21px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.category-row::-webkit-scrollbar { display: none; }
.category { min-height: 33px; flex: 0 0 auto; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.category:hover, .category.active { border-color: var(--primary); background: rgba(243, 111, 93, .12); color: var(--primary-light); }
.featured-section, .feed-section, .create-section, .profile-section { padding-top: 40px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-title-row .eyebrow { margin-bottom: 8px; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--primary-light); font-size: 11px; font-weight: 700; }
.text-button:hover { color: var(--text); }
.creator-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.creator-empty { grid-column: 1 / -1; padding: 27px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.creator-card { min-width: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.creator-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.creator-cover { height: 71px; position: relative; background: var(--surface-3); }
.cover-coral { background: linear-gradient(115deg, var(--primary), #573740); }
.cover-blue { background: linear-gradient(115deg, var(--blue), #303d62); }
.cover-mint { background: linear-gradient(115deg, var(--accent), #31584f); }
.cover-purple { background: linear-gradient(115deg, #d3a8ff, #493659); }
.creator-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(17, 19, 24, .45)); }
.creator-avatar { position: absolute; z-index: 1; left: 12px; bottom: -17px; width: 43px; height: 43px; border: 3px solid var(--surface); font-size: 11px; }
.creator-body { min-height: 106px; padding: 25px 11px 11px; }
.creator-name { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.verified { width: 13px; height: 13px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 8px; font-weight: 900; }
.creator-handle { display: block; margin-top: 3px; color: var(--subtle); font-size: 9px; }
.creator-footer { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 12px; }
.creator-followers { color: var(--muted); font-size: 9px; }
.follow-button { min-height: 27px; padding: 0 10px; border: 1px solid var(--primary); border-radius: 7px; background: transparent; color: var(--primary-light); font-size: 9px; font-weight: 800; }
.follow-button:hover, .follow-button.following { background: var(--primary); color: #fff; }
.feed-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.feed-status span:first-child { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(145, 225, 197, .1); }
.post-list { display: grid; gap: 16px; }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .1); }
.post-header { display: flex; align-items: center; gap: 10px; padding: 16px 17px 13px; }
.post-header .avatar { width: 35px; height: 35px; }
.post-author strong, .post-author small { display: block; }
.post-author strong { font-size: 12px; }
.post-author small { margin-top: 3px; color: var(--subtle); font-size: 10px; }
.post-more { margin-left: auto; padding: 6px; border: 0; background: transparent; color: var(--subtle); font-size: 18px; }
.post-more:hover { color: var(--text); }
.post-caption { margin: 0; padding: 0 17px 13px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.post-media { min-height: 295px; position: relative; overflow: hidden; display: flex; align-items: end; padding: 15px 17px; }
.post-media.user-media { padding: 0; background: var(--bg); }
.post-media.user-media img, .post-media.user-media video { width: 100%; max-height: 490px; display: block; object-fit: cover; }
.post-art-1 { background: linear-gradient(135deg, #c87961, #47343c 57%, #252a33); }
.post-art-2 { background: linear-gradient(135deg, #78b8a1, #244c4b 52%, #252a33); }
.post-art-3 { background: linear-gradient(135deg, #a7a3d9, #414365 48%, #252a33); }
.post-art-4 { background: linear-gradient(135deg, #8399aa, #334754 48%, #252a33); }
.post-shape { width: 44%; aspect-ratio: .73; position: absolute; left: 28%; top: 12%; border-radius: 48% 48% 30% 30%; background: rgba(17, 19, 24, .61); transform: rotate(7deg); }
.post-shape::after { content: ""; width: 115%; height: 45px; position: absolute; left: -7%; top: 34%; border-radius: 14px; background: var(--primary-light); filter: blur(13px); opacity: .92; }
.post-art-2 .post-shape::after { background: var(--accent); }
.post-art-3 .post-shape::after { background: var(--blue); }
.post-art-4 .post-shape::after { background: var(--primary-light); }
.post-type { position: relative; z-index: 1; display: inline-flex; gap: 6px; align-items: center; color: var(--text); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.post-type span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.post-actions { display: flex; align-items: center; gap: 15px; padding: 14px 17px 16px; }
.post-action { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.post-action:hover, .post-action.liked { color: var(--primary-light); }
.post-protected { margin-left: auto; color: var(--accent); font-size: 9px; font-weight: 700; }
.empty-state { display: grid; justify-items: center; gap: 7px; padding: 55px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); text-align: center; }
.empty-symbol { color: var(--accent); font-size: 29px; }
.empty-state strong { font-size: 14px; }
.empty-state span:last-child { color: var(--muted); font-size: 11px; }

.profile-section { scroll-margin-top: 20px; }
.profile-status { padding: 6px 9px; border-radius: 99px; background: rgba(145, 225, 197, .1); color: var(--accent); font-size: 9px; font-weight: 700; }
.profile-editor-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.profile-form { padding: 23px; }
.profile-field { margin-bottom: 15px; }
.profile-field label { display: block; margin-bottom: 7px; font-size: 11px; font-weight: 700; }
.profile-field input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); outline: none; font-size: 12px; }
.profile-field input:focus { border-color: var(--accent); }
.profile-field input::placeholder { color: var(--subtle); }
.profile-field textarea { min-height: 74px; }
.profile-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.profile-upload { min-height: 92px; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); text-align: center; cursor: pointer; }
.profile-upload:hover { border-color: var(--accent); background: rgba(145, 225, 197, .05); }
.profile-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.profile-upload-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 17px; line-height: 1; }
.profile-upload strong { font-size: 10px; }
.profile-upload small { color: var(--subtle); font-size: 8px; }
.profile-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.profile-preview { min-height: 360px; position: relative; overflow: hidden; background: var(--bg); }
.profile-banner-preview { height: 145px; display: grid; place-items: center; padding: 20px; background: linear-gradient(120deg, var(--primary), var(--surface-3) 65%); background-position: center; background-size: cover; color: rgba(245, 246, 248, .78); font-size: 10px; text-align: center; }
.profile-banner-preview.has-image { color: transparent; }
.profile-preview-body { display: flex; gap: 13px; padding: 22px 21px; }
.profile-avatar-preview { width: 67px; height: 67px; margin-top: -43px; border: 4px solid var(--surface); font-size: 18px; }
.avatar.has-image { background-position: center; background-size: cover; background-repeat: no-repeat; }
.profile-preview-body strong, .profile-preview-body small { display: block; }
.profile-preview-body strong { font-size: 14px; }
.profile-preview-body small { margin-top: 4px; color: var(--subtle); font-size: 10px; }
.profile-preview-body p { max-width: 280px; margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.create-section { scroll-margin-top: 20px; }
.privacy-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 10px; font-weight: 700; }
.privacy-tag span:first-child { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 10px; }
.composer-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: 440px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.composer-form { padding: 24px; }
.field-group { margin-bottom: 18px; }
.field-group label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
textarea { width: 100%; min-height: 81px; display: block; resize: vertical; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); padding: 12px; outline: none; font-size: 12px; line-height: 1.5; }
textarea:focus { border-color: var(--accent); }
textarea::placeholder { color: var(--subtle); }
.field-meta { display: flex; justify-content: space-between; padding-top: 6px; color: var(--subtle); font-size: 9px; }
.upload-zone { min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; border: 1px dashed rgba(145, 225, 197, .4); border-radius: var(--radius-md); background: rgba(145, 225, 197, .04); text-align: center; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--accent); background: rgba(145, 225, 197, .1); }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-icon { width: 33px; height: 33px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 22px; }
.upload-zone strong { font-size: 12px; }
.upload-zone > span:not(.upload-icon):not(.upload-file) { margin-top: 5px; color: var(--muted); font-size: 10px; }
.upload-file { max-width: 100%; margin-top: 8px; overflow: hidden; color: var(--accent); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.privacy-check { display: flex; align-items: center; gap: 9px; margin-top: 11px; padding: 10px; border-radius: var(--radius-sm); background: rgba(145, 225, 197, .09); }
.check-icon { width: 21px; height: 21px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 12px; font-weight: 800; }
.privacy-check strong, .privacy-check span:last-child { display: block; }
.privacy-check strong { font-size: 11px; }
.privacy-check #detectionDetail { margin-top: 2px; color: var(--muted); font-size: 9px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.preview-panel { min-height: 440px; position: relative; display: grid; place-items: center; overflow: hidden; background: var(--bg); }
.preview-panel::before { content: ""; position: absolute; inset: 0; opacity: .26; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 26px 26px; }
.preview-empty, .preview-loading { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; padding: 30px; text-align: center; }
.preview-empty strong, .preview-loading strong { font-size: 13px; }
.preview-empty span:last-child, .preview-loading span:last-child { max-width: 180px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.preview-symbol { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 4px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); font-size: 34px; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.media-preview { width: 100%; height: 100%; min-height: 440px; position: relative; z-index: 1; display: grid; place-items: center; padding: 22px; }
.media-preview img, .media-preview video { display: block; max-width: 100%; max-height: 394px; border-radius: var(--radius-md); object-fit: contain; box-shadow: var(--shadow); }
.preview-badge { position: absolute; z-index: 2; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 99px; background: var(--accent); color: var(--bg); font-size: 8px; font-weight: 900; letter-spacing: .06em; }
.form-note { display: flex; align-items: center; gap: 7px; margin: 12px 2px 0; color: var(--subtle); font-size: 10px; }
.form-note span:first-child { color: var(--accent); }
.inline-message { min-height: 18px; margin: 8px 2px 0; color: var(--primary-light); font-size: 11px; }

.right-rail { min-width: 0; }
.side-card { margin-bottom: 19px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.side-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.side-card h2 { font-size: 14px; letter-spacing: -.03em; }
.side-card-heading .text-button { font-size: 9px; }
.side-empty { padding: 9px 0 2px; color: var(--subtle); font-size: 10px; line-height: 1.5; }
.suggestion { display: flex; align-items: center; gap: 9px; padding: 9px 0; }
.suggestion + .suggestion { border-top: 1px solid var(--line); }
.suggestion-info { min-width: 0; flex: 1; }
.suggestion-info strong, .suggestion-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-info strong { font-size: 10px; }
.suggestion-info small { margin-top: 3px; color: var(--subtle); font-size: 9px; }
.suggestion .follow-button { min-height: 25px; padding: 0 8px; font-size: 8px; }
.trend-mark { color: var(--primary-light); font-size: 17px; }
.trend-item { display: flex; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.trend-item > span { color: var(--primary-light); font-size: 13px; font-weight: 700; }
.trend-item strong, .trend-item small { display: block; }
.trend-item strong { font-size: 10px; }
.trend-item small { margin-top: 4px; color: var(--subtle); font-size: 9px; }
.side-footer { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 3px 4px; color: var(--subtle); font-size: 9px; line-height: 1.5; }
.side-footer span:last-child { width: 100%; color: var(--subtle); }

.auth-modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(4, 5, 8, .76); backdrop-filter: blur(8px); }
.auth-card { width: min(100%, 470px); position: relative; z-index: 1; padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.auth-close { width: 36px; height: 36px; position: absolute; top: 14px; right: 14px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 22px; }
.auth-close:hover { color: var(--text); background: var(--surface-3); }
.auth-card h2 { padding-right: 35px; }
.auth-copy { margin: 10px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 18px; padding: 4px; border-radius: var(--radius-sm); background: var(--bg); }
.auth-tab { min-height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.auth-tab:hover, .auth-tab.active { background: var(--surface-2); color: var(--text); }
.auth-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-form .profile-field { margin-bottom: 13px; }
.auth-submit { width: 100%; margin-top: 3px; }
.auth-logout { width: 100%; margin-top: 6px; }
.auth-message { margin-top: 12px; }

@media (max-width: 1120px) {
  .app-shell { width: min(100% - 32px, 930px); }
  .layout { grid-template-columns: 160px minmax(0, 1fr); gap: 25px; }
  .right-rail { display: none; }
  .left-rail { padding-right: 15px; }
  .creator-grid { grid-template-columns: repeat(4, minmax(125px, 1fr)); overflow-x: auto; }
  .creator-card { min-width: 135px; }
}
@media (max-width: 720px) {
  .app-shell { width: min(100% - 22px, 560px); }
  .topbar { min-height: 68px; gap: 14px; }
  .search-form { order: 3; width: 100%; margin: 0; }
  .topbar { flex-wrap: wrap; padding: 10px 0 13px; }
  .top-actions { gap: 8px; margin-left: auto; }
  .top-action { display: none; }
  .profile-name, .chevron { display: none; }
  .profile-chip { border: 0; padding: 4px; background: transparent; }
  .layout { display: block; }
  .left-rail { min-height: 0; padding: 12px 0 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 10px; }
  .rail-link { min-height: 36px; flex: 0 0 auto; padding: 0 10px; font-size: 11px; }
  .rail-link .rail-icon { font-size: 15px; }
  .rail-divider, .rail-label, .mini-profile, .rail-note { display: none; }
  .main-content { padding-top: 32px; }
  .creator-grid { grid-template-columns: repeat(4, 135px); }
  .composer-card, .profile-editor-card { grid-template-columns: 1fr; }
  .profile-preview { min-height: 290px; }
  .preview-panel, .media-preview { min-height: 320px; }
  .media-preview img, .media-preview video { max-height: 280px; }
}
@media (max-width: 470px) {
  .welcome-row { display: block; }
  .welcome-actions { display: grid; grid-template-columns: 1fr 1fr; margin-top: 17px; }
  .welcome-actions .button { margin-top: 0; padding: 0 10px; }
  .section-title-row { align-items: flex-start; }
  .privacy-tag { max-width: 118px; text-align: right; line-height: 1.3; }
  .post-media { min-height: 260px; }
  .composer-form { padding: 18px; }
  .form-actions { justify-content: stretch; }
  .form-actions .button { flex: 1; }
  .form-note { align-items: flex-start; line-height: 1.45; }
  .auth-card { padding: 23px 18px; }
  .auth-form-grid { grid-template-columns: 1fr; gap: 0; }
}

/* Beskeder */
.messages-section{margin:28px 0;padding:24px;background:#191c23;border-radius:18px}.messages-layout{display:grid;grid-template-columns:minmax(180px,1fr) 2fr;gap:20px;margin-top:20px}.messages-layout select,.messages-layout textarea{width:100%;padding:12px;background:#111318;color:#fff;border:1px solid #444;border-radius:9px;margin:8px 0}.message-thread{height:320px;overflow-y:auto;padding:14px;background:#101218;border-radius:12px}.message-bubble{max-width:85%;padding:10px 14px;background:#30333c;border-radius:12px;margin:9px 0;overflow-wrap:anywhere}.message-bubble.mine{background:#63325b;margin-left:auto}.message-bubble p{margin:0 0 5px}.message-bubble small{opacity:.7}#messageForm button{margin-top:10px}#messageError{color:#ff9d9d}@media(max-width:650px){.messages-layout{grid-template-columns:1fr}}
