:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #1e1f22;
  color: #f2f3f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: #1e1f22; }
body { color: #f2f3f5; font: 14px/1.5 "Segoe UI", Arial, sans-serif; }
button, input, textarea, select { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }
#demo-app { --bg: #1e1f22; --panel: #2b2d31; --panel-raised: #313338; --panel-hover: #383a40; --line: #3f4249; --text: #f2f3f5; --muted: #b5bac1; --accent: #7289da; --accent-strong: #5865f2; --danger: #ed4245; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
#demo-app a { color: inherit; text-decoration: none; }
#demo-app button { color: inherit; }
#demo-app .app-header { position: sticky; top: 0; z-index: 10; min-height: 64px; display: flex; align-items: center; gap: 30px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid #17181a; background: #232428; }
#demo-app .brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; font-size: 16px; letter-spacing: .2px; }
#demo-app .brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-strong); color: #fff; font-weight: 800; }
#demo-app .main-nav { display: flex; align-items: center; gap: 6px; }
#demo-app .main-nav a, #demo-app .main-nav button { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; }
#demo-app .main-nav a:hover, #demo-app .main-nav button:hover, #demo-app .main-nav .selected, #demo-app .main-nav .admin-link { background: #35383e; color: #fff; }
#demo-app .header-account { display: flex; align-items: center; gap: 9px; margin-left: auto; color: var(--muted); font-size: 12px; }
#demo-app .text-button { padding: 6px 9px; border: 0; border-radius: 5px; background: transparent; color: #aeb8ff !important; font-size: 12px; }
#demo-app .text-button:hover { background: var(--panel-hover); }
#demo-app main { width: 100%; flex: 1; }
#demo-app footer { padding: 16px; color: #72767d; text-align: center; font-size: 11px; }
#demo-app .button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 650; transition: background .15s, border .15s; }
#demo-app .button:disabled { cursor: wait; opacity: .6; }
#demo-app .button-primary { background: var(--accent-strong); color: #fff; }
#demo-app .button-primary:hover { background: #4752c4; }
#demo-app .button-secondary { border-color: var(--line); background: #35383e; color: var(--text); }
#demo-app .button-secondary:hover { background: #41444b; }
#demo-app .button-danger { background: #8e3035; color: #fff; }
#demo-app .button-danger:hover { background: var(--danger); }
#demo-app input, #demo-app textarea, #demo-app select { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #202127; border-radius: 6px; outline: none; background: #1e1f22; color: var(--text); }
#demo-app textarea { resize: vertical; }
#demo-app input:focus, #demo-app textarea:focus, #demo-app select:focus { border-color: var(--accent); }
#demo-app .avatar { width: 44px; height: 44px; flex: 0 0 auto; display: block; overflow: hidden; border-radius: 50%; object-fit: cover; background: #444b8e; }
#demo-app .avatar-small { width: 34px; height: 34px; }
#demo-app .avatar-large { width: 128px; height: 128px; }
#demo-app .avatar-fallback { display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 700; }
#demo-app .avatar-small.avatar-fallback { font-size: 14px; }
#demo-app .verified-badge { width: 19px; height: 19px; display: inline-grid; place-items: center; margin-left: 4px; vertical-align: -4px; filter: drop-shadow(0 2px 3px #0005); }
#demo-app .verified-badge svg { width: 100%; height: 100%; overflow: visible; }
#demo-app .verified-seal { fill: #596cff; stroke: #9da8ff; stroke-width: .8; }
#demo-app .verified-check { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#demo-app .auth-page { width: min(440px, calc(100% - 32px)); margin: 7vh auto; }
#demo-app .auth-intro { margin-bottom: 24px; text-align: center; }
#demo-app .auth-intro .brand-mark { width: 50px; height: 50px; margin: auto; border-radius: 15px; font-size: 22px; }
#demo-app .auth-intro h1 { margin: 12px 0 4px; font-size: 25px; }
#demo-app .auth-intro p { margin: 0 auto; max-width: 340px; color: var(--muted); font-size: 13px; }
#demo-app .auth-card, #demo-app .create-card, #demo-app .admin-card { padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
#demo-app .auth-card h2 { margin: 0 0 16px; font-size: 18px; }
#demo-app .auth-card label, #demo-app .create-card>label:not(.upload-zone), #demo-app .profile-edit-card>label { display: grid; gap: 7px; margin: 14px 0; color: #d3d6db; font-size: 12px; }
#demo-app .field-hint { color: var(--muted); font-size: 10px; text-align: right; }
#demo-app .auth-card .button { width: 100%; margin-top: 6px; }
#demo-app .auth-switch { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
#demo-app .auth-switch a, #demo-app .text-link { color: #aeb8ff; }
#demo-app .social-layout { width: min(1150px, calc(100% - 36px)); display: grid; grid-template-columns: minmax(190px, 250px) minmax(400px, 610px) minmax(190px, 250px); align-items: start; gap: 24px; margin: 28px auto; }
#demo-app .side-card { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
#demo-app .user-link { min-width: 0; display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; }
#demo-app .user-link>span:last-child { min-width: 0; display: grid; }
#demo-app .user-link strong { font-size: 12px; }
#demo-app .user-link small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
#demo-app .user-link:hover strong { text-decoration: underline; }
#demo-app .current-user-link { width: 100%; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
#demo-app .profile-stat-row { display: flex; justify-content: space-between; padding: 10px 0; color: var(--muted); font-size: 12px; }
#demo-app .profile-stat-row strong { color: var(--text); }
#demo-app .full-button { width: 100%; margin-top: 10px; }
#demo-app .admin-card h2 { margin: 0 0 7px; font-size: 14px; }
#demo-app .admin-card>p { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
#demo-app .admin-card .admin-note { margin: 0 0 12px; color: #e8c777; font-size: 11px; }
#demo-app .text-link { font-size: 12px; }
#demo-app .feed-column { min-width: 0; }
#demo-app .feed-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0 0 16px; }
#demo-app .eyebrow { margin: 0 0 4px; color: #aeb8ff; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
#demo-app .feed-heading h1, #demo-app .page-title h1 { margin: 0; font-size: 24px; }
#demo-app .feed-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 7px; background: #232428; }
#demo-app .feed-tabs button { padding: 7px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; }
#demo-app .feed-tabs button.selected { background: #41444b; color: #fff; }
#demo-app .post-card { overflow: hidden; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
#demo-app .post-header { min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
#demo-app .post-author { flex: 1; }
#demo-app .post-header time { color: var(--muted); font-size: 10px; }
#demo-app .danger-text { color: #ff777a !important; }
#demo-app .post-image { width: 100%; max-height: 720px; display: block; object-fit: contain; background: #17181a; }
#demo-app .post-caption { margin: 0; padding: 13px 15px 3px; color: #d9dce1; font-size: 13px; overflow-wrap: anywhere; }
#demo-app .post-caption strong { color: #fff; }
#demo-app .post-actions { display: flex; gap: 18px; padding: 10px 14px 13px; }
#demo-app .icon-button { min-height: 30px; padding: 3px 4px; border: 0; background: transparent; color: #d9dce1; font-size: 12px; }
#demo-app .icon-button:hover { color: #fff; }
#demo-app .icon-button.liked { color: #ff5b73; }
#demo-app .icon-button.liked:first-letter { color: #ff5b73; }
#demo-app .comments-panel { padding: 0 14px 13px; }
#demo-app .comment-list { max-height: 180px; overflow-y: auto; }
#demo-app .comment { margin: 5px 0; color: #d9dce1; font-size: 12px; overflow-wrap: anywhere; }
#demo-app .comment strong { color: #fff; }
#demo-app .no-comments { color: var(--muted); font-size: 11px; }
#demo-app .comment-form { display: flex; gap: 8px; margin-top: 10px; }
#demo-app .comment-form input { min-width: 0; min-height: 34px; }
#demo-app .empty-card { padding: 30px 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); text-align: center; }
#demo-app .empty-card h2 { margin: 0 0 7px; font-size: 16px; }
#demo-app .empty-card p { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
#demo-app .form-page, #demo-app .admin-page { width: min(760px, calc(100% - 36px)); margin: 34px auto; }
#demo-app .page-title { margin-bottom: 18px; }
#demo-app .page-title>p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
#demo-app .create-card { display: grid; gap: 12px; }
#demo-app .upload-zone { min-height: 260px; position: relative; display: grid; place-items: center; overflow: hidden; border: 1px dashed #626671; border-radius: 9px; background: #232428; cursor: pointer; text-align: center; }
#demo-app .upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#demo-app .upload-zone #upload-placeholder { display: grid; justify-items: center; gap: 8px; padding: 22px; }
#demo-app .upload-zone #upload-placeholder strong { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: #35383e; color: #aeb8ff; font-size: 26px; }
#demo-app .upload-zone #upload-placeholder small { color: var(--muted); font-size: 11px; }
#demo-app #image-preview { width: 100%; height: 100%; max-height: 480px; position: absolute; inset: 0; object-fit: contain; background: #17181a; }
#demo-app .create-card>.button { justify-self: end; }
#demo-app .search-form { display: flex; gap: 9px; }
#demo-app .search-form input { flex: 1; }
#demo-app .user-results { display: grid; gap: 8px; margin-top: 14px; }
#demo-app .search-results-heading { margin: 22px 0 10px; font-size: 15px; }
#demo-app .user-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
#demo-app .profile-page { width: min(900px, calc(100% - 36px)); margin: 34px auto; }
#demo-app .profile-summary { display: flex; align-items: center; gap: 42px; padding: 18px 30px 28px; border-bottom: 1px solid var(--line); }
#demo-app .profile-info { min-width: 0; flex: 1; }
#demo-app .profile-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#demo-app .profile-title h1 { margin: 0; font-size: 21px; }
#demo-app .profile-title .button { min-height: 33px; }
#demo-app .display-name { margin: 12px 0 7px; font-size: 13px; font-weight: 600; }
#demo-app .profile-counts { display: flex; flex-wrap: wrap; gap: 23px; margin: 10px 0; color: #d9dce1; font-size: 12px; }
#demo-app .profile-counts strong { color: #fff; }
#demo-app .profile-bio { margin: 9px 0 0; color: var(--muted); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
#demo-app .profile-posts-heading { padding: 15px 0; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .8px; text-align: center; text-transform: uppercase; }
#demo-app .profile-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
#demo-app .profile-post { aspect-ratio: 1; overflow: hidden; padding: 0; border: 0; background: var(--panel); }
#demo-app .profile-post { position: relative; cursor: pointer; }
#demo-app .profile-post:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#demo-app .profile-post-media { width: 100%; height: 100%; display: block; object-fit: cover; }
#demo-app .text-post-tile { display: grid; place-items: center; padding: 14px; background: linear-gradient(145deg, #24262d, #34313e); color: var(--text); font-size: 13px; font-weight: 600; text-align: center; overflow-wrap: anywhere; }
#demo-app .profile-post video { background: #17181a; }
#demo-app .profile-post-counts { position: absolute; inset: auto 0 0; padding: 18px 8px 7px; background: linear-gradient(transparent, #000b); color: #fff; font-size: 12px; font-weight: 700; opacity: 0; text-align: center; transition: opacity .15s; }
#demo-app .profile-post:hover .profile-post-counts, #demo-app .profile-post:focus-visible .profile-post-counts { opacity: 1; }
#demo-app .post-detail-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: #000b; }
#demo-app .post-detail { width: min(900px, 100%); max-height: min(720px, 92vh); position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 20px 70px #0008; }
#demo-app .post-detail-close { width: 36px; height: 36px; position: absolute; top: 8px; right: 8px; z-index: 1; border: 0; border-radius: 50%; background: #111b; color: #fff; font-size: 25px; line-height: 1; }
#demo-app .post-detail-media { min-width: 0; min-height: 300px; display: grid; place-items: center; background: #111; }
#demo-app .post-detail-image { width: 100%; height: 100%; max-height: min(720px, 92vh); object-fit: contain; }
#demo-app .post-detail-content { min-width: 0; display: flex; flex-direction: column; padding: 24px 18px; }
#demo-app .post-detail-caption { margin: 0 0 12px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
#demo-app .post-detail-counts { margin: 0 0 22px; color: var(--muted); font-size: 12px; }
#demo-app .post-detail-counts strong { color: #fff; }
#demo-app .post-detail-actions { margin: -12px 0 18px; }
#demo-app .post-detail-actions .icon-button { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; }
#demo-app .post-detail-actions .icon-button:hover { background: var(--panel-hover); }
#demo-app .post-detail-content h2 { margin: 0 0 10px; font-size: 14px; }
#demo-app .post-detail-comments { min-height: 0; overflow-y: auto; }
#demo-app .post-detail-comment-form { display: flex; gap: 8px; margin-top: 12px; }
#demo-app .post-detail-comment-form input { min-width: 0; min-height: 36px; }
#demo-app .post-detail-comment-form .button { flex: 0 0 auto; }
#demo-app .delete-confirm-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: #000b; }
#demo-app .delete-confirm-card { width: min(420px, 100%); padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 20px 70px #0008; }
#demo-app .delete-confirm-card h2 { margin: 0 0 8px; font-size: 17px; }
#demo-app .delete-confirm-card p { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
#demo-app .delete-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
#demo-app .delete-confirm-actions .button { min-height: 42px; }
#demo-app .avatar-edit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
#demo-app .avatar-edit .button { cursor: pointer; }
#demo-app .check-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
#demo-app .check-label input { width: auto; min-height: 0; }
#demo-app .admin-page { width: min(980px, calc(100% - 36px)); }
#demo-app .admin-card { margin-bottom: 16px; }
#demo-app .admin-search-form { display: flex; gap: 8px; margin: 0 0 16px; }
#demo-app .admin-search-form input { flex: 1; min-width: 0; }
#demo-app .admin-user-list { display: grid; gap: 8px; }
#demo-app .admin-user { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(180px, 1fr); align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #25262a; }
#demo-app .admin-user-heading { display: flex; align-items: center; gap: 8px; }
#demo-app .admin-edit-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; color: #c4caff; font-size: 19px; }
#demo-app .admin-edit-button:hover { background: var(--panel-hover); }
#demo-app .admin-user-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 10px; }
#demo-app .admin-user-meta span { padding: 4px 7px; border-radius: 99px; background: #35383e; }
#demo-app .admin-user-actions { grid-column: 1 / -1; display: flex; gap: 7px; flex-wrap: wrap; }
#demo-app .admin-user-actions .button { min-height: 31px; font-size: 10px; }
#demo-app .admin-follower-form { display: flex; align-items: end; gap: 7px; flex-wrap: wrap; }
#demo-app .admin-follower-form label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
#demo-app .admin-follower-form input { width: 140px; min-height: 32px; padding: 6px 8px; font-size: 11px; }
#demo-app .admin-user-posts { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
#demo-app .admin-user-posts h3 { margin: 0; font-size: 13px; }
#demo-app .admin-post { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #25262a; }
#demo-app .admin-post-info { min-width: 0; flex: 1; }
#demo-app .admin-post-preview { width: 112px; height: 92px; flex: 0 0 auto; overflow: hidden; border-radius: 6px; background: #17181a; }
#demo-app .admin-media-preview { width: 100%; height: 100%; display: block; object-fit: cover; }
#demo-app .admin-post-info strong { display: inline-block; font-size: 12px; }
#demo-app .admin-post-info p { margin: 4px 0; color: #d9dce1; font-size: 12px; overflow-wrap: anywhere; }
#demo-app .admin-post-info small { color: var(--muted); font-size: 10px; }
#demo-app .admin-like-form { display: flex; align-items: end; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
#demo-app .admin-like-form label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
#demo-app .admin-like-form input { width: 120px; min-height: 32px; padding: 6px 8px; font-size: 11px; }
#demo-app .upload-zone #image-preview, #demo-app .upload-zone #video-preview { width: 100%; max-height: 420px; object-fit: contain; background: #17181a; }
#demo-app .custom-count-label { color: var(--muted); font-size: 10px; font-weight: 400; }
#demo-app .admin-protected { align-self: center; color: var(--muted); font-size: 10px; }
#demo-app #toast { position: fixed; right: 18px; bottom: 18px; z-index: 30; max-width: min(400px, calc(100vw - 36px)); padding: 11px 14px; transform: translateY(10px); border: 1px solid #3c7651; border-radius: 7px; opacity: 0; background: #20362a; color: #b9ebc8; font-size: 12px; pointer-events: none; transition: .2s; }
#demo-app #toast.is-visible { transform: none; opacity: 1; }
#demo-app #toast.is-error { border-color: #713e42; background: #291719; color: #ffaaa4; }

@media (max-width: 1000px) {
  #demo-app .social-layout { grid-template-columns: 190px minmax(0, 1fr); }
}
@media (max-width: 700px) {
  #demo-app .app-header { position: static; min-height: auto; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px 16px; }
  #demo-app .main-nav { order: 3; width: 100%; justify-content: space-between; overflow-x: auto; }
  #demo-app .main-nav a, #demo-app .main-nav button { padding-inline: 9px; white-space: nowrap; }
  #demo-app .header-account { margin-left: auto; }
  #demo-app .header-account>span:not(.avatar) { display: none; }
  #demo-app .social-layout { width: min(610px, calc(100% - 20px)); display: block; margin: 16px auto; }
  #demo-app .current-user-card { display: none; }
  #demo-app .feed-heading h1, #demo-app .page-title h1 { font-size: 21px; }
  #demo-app .post-card { margin-bottom: 12px; border-radius: 8px; }
  #demo-app .post-image { max-height: 620px; }
  #demo-app .form-page, #demo-app .admin-page, #demo-app .profile-page { width: calc(100% - 24px); margin: 22px auto; }
  #demo-app .create-card, #demo-app .admin-card { padding: 16px; }
  #demo-app .profile-summary { align-items: flex-start; gap: 18px; padding: 12px 4px 20px; }
  #demo-app .avatar-large { width: 82px; height: 82px; }
  #demo-app .profile-title h1 { font-size: 18px; }
  #demo-app .post-detail-backdrop { padding: 10px; }
  #demo-app .post-detail { max-height: 94vh; grid-template-columns: 1fr; grid-template-rows: minmax(180px, 42vh) minmax(0, 1fr); overflow-y: auto; }
  #demo-app .post-detail-media { min-height: 0; }
  #demo-app .post-detail-image { max-height: 42vh; }
  #demo-app .post-detail-content { min-height: 0; padding: 16px; }
  #demo-app .profile-post-counts { opacity: 1; }
}
@media (max-width: 450px) {
  #demo-app .brand { font-size: 14px; }
  #demo-app .brand-mark { width: 30px; height: 30px; }
  #demo-app .header-account { gap: 5px; }
  #demo-app .feed-heading { align-items: center; }
  #demo-app .feed-tabs button { padding: 7px; font-size: 10px; }
  #demo-app .post-header { gap: 7px; padding-inline: 10px; }
  #demo-app .post-header time { max-width: 100px; font-size: 9px; text-align: right; }
  #demo-app .post-actions { gap: 10px; }
  #demo-app .profile-summary { gap: 12px; }
  #demo-app .avatar-large { width: 68px; height: 68px; }
  #demo-app .profile-counts { gap: 10px; font-size: 10px; }
  #demo-app .profile-title { gap: 6px; }
  #demo-app .profile-title .button { min-height: 29px; padding-inline: 9px; font-size: 10px; }
  #demo-app .admin-user { grid-template-columns: 1fr; }
  #demo-app .admin-user-actions { grid-column: auto; }
  #demo-app .admin-search-form { flex-wrap: wrap; }
  #demo-app .admin-search-form input { flex-basis: 100%; }
  #demo-app .admin-post { align-items: flex-start; flex-wrap: wrap; }
  #demo-app .admin-post-info { flex-basis: calc(100% - 130px); }
  #demo-app .admin-post-preview { width: 100px; height: 82px; }
  #demo-app .admin-like-form { align-items: flex-start; }
  #demo-app .user-result { align-items: flex-start; }
  #demo-app .user-result .button { min-height: 31px; padding-inline: 9px; font-size: 10px; }
}
@media (max-width: 700px) {
  html, body { width: 100%; overflow-x: hidden; }
  #demo-app { width: 100%; min-width: 0; overflow-x: clip; }
  #demo-app main, #demo-app .social-layout, #demo-app .feed-column,
  #demo-app .form-page, #demo-app .admin-page, #demo-app .profile-page { min-width: 0; }
  #demo-app .app-header { gap: 8px; padding-inline: max(12px, env(safe-area-inset-left)); }
  #demo-app .brand { min-width: 0; }
  #demo-app .main-nav { min-width: 0; justify-content: flex-start; gap: 2px; padding-bottom: 2px; scrollbar-width: none; }
  #demo-app .main-nav::-webkit-scrollbar { display: none; }
  #demo-app .main-nav a, #demo-app .main-nav button { flex: 0 0 auto; min-height: 40px; }
  #demo-app .header-account { flex: 0 0 auto; }
  #demo-app .post-header, #demo-app .post-actions, #demo-app .comment-form,
  #demo-app .search-form, #demo-app .admin-search-form, #demo-app .post-detail-comment-form { min-width: 0; }
  #demo-app .comment-form input, #demo-app .post-detail-comment-form input,
  #demo-app .search-form input, #demo-app .admin-search-form input { min-width: 0; }
  #demo-app .post-detail-backdrop { align-items: stretch; padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); }
  #demo-app .post-detail { width: 100%; max-height: 100%; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
  #demo-app .post-detail-media { flex: 0 0 auto; min-height: 0; max-height: 42dvh; }
  #demo-app .post-detail-image { width: 100%; height: auto; max-height: 42dvh; }
  #demo-app .post-detail-content { flex: 0 0 auto; min-width: 0; padding: 16px 14px; }
  #demo-app .post-detail-comments { max-height: 28dvh; }
  #demo-app .admin-user, #demo-app .admin-post { min-width: 0; }
  #demo-app .admin-user-actions, #demo-app .admin-follower-form, #demo-app .admin-like-form { min-width: 0; }
  #demo-app .admin-follower-form label, #demo-app .admin-like-form label { min-width: 0; }
  #demo-app .profile-counts { gap: 8px 14px; }
}
@media (max-width: 450px) {
  #demo-app .app-header { padding-inline: max(10px, env(safe-area-inset-left)); }
  #demo-app .brand { gap: 7px; }
  #demo-app .main-nav a, #demo-app .main-nav button { padding-inline: 8px; font-size: 12px; }
  #demo-app .header-account .text-button { padding-inline: 6px; }
  #demo-app .social-layout { width: calc(100% - 16px); }
  #demo-app .form-page, #demo-app .admin-page, #demo-app .profile-page { width: calc(100% - 16px); }
  #demo-app .auth-page { width: calc(100% - 24px); }
  #demo-app .auth-card, #demo-app .create-card, #demo-app .admin-card { padding: 14px; }
  #demo-app .feed-heading { flex-wrap: wrap; }
  #demo-app .feed-heading h1, #demo-app .page-title h1 { font-size: 20px; }
  #demo-app .post-detail-comment-form { align-items: stretch; flex-wrap: wrap; }
  #demo-app .post-detail-comment-form input { flex: 1 1 180px; }
  #demo-app .post-detail-comment-form .button { flex: 0 0 auto; }
  #demo-app .admin-post-info { flex-basis: 100%; }
  #demo-app .admin-post-preview { order: -1; }
  #demo-app .admin-like-form input, #demo-app .admin-follower-form input { width: min(140px, 42vw); }
}

:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #000;
  color: #e7e9ea;
}
html, body { background: #000; color: #e7e9ea; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
#demo-app {
  --bg: #000;
  --panel: #08090a;
  --panel-raised: #16181c;
  --panel-hover: #1d1f23;
  --line: #2f3336;
  --text: #e7e9ea;
  --muted: #71767b;
  --accent: #1d9bf0;
  --accent-strong: #1d9bf0;
  --danger: #f4212e;
  background: var(--bg);
}
#demo-app .app-header {
  min-height: 64px;
  gap: 22px;
  border-bottom-color: var(--line);
  background: rgb(0 0 0 / 88%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
#demo-app .brand { gap: 11px; font-size: 15px; }
#demo-app .brand-mark {
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 22px rgb(29 155 240 / 18%);
}
#demo-app .main-nav { gap: 4px; }
#demo-app .main-nav a, #demo-app .main-nav button {
  min-height: 42px;
  position: relative;
  padding-inline: 13px;
  border-radius: 999px;
  color: #aeb3b7;
  font-size: 13px;
}
#demo-app .main-nav a:hover, #demo-app .main-nav button:hover,
#demo-app .main-nav .selected, #demo-app .main-nav .admin-link {
  background: #17191c;
  color: var(--text);
}
#demo-app .main-nav .selected::after {
  height: 3px;
  position: absolute;
  right: 14px;
  bottom: 1px;
  left: 14px;
  border-radius: 3px;
  background: var(--accent);
  content: "";
}
#demo-app .header-account { color: var(--text); }
#demo-app .text-button { color: var(--accent) !important; }
#demo-app .text-button:hover { background: rgb(29 155 240 / 12%); }
#demo-app footer { color: #53606a; }
#demo-app .button { min-height: 40px; border-radius: 999px; font-size: 13px; }
#demo-app .button-primary { background: var(--accent); color: #fff; }
#demo-app .button-primary:hover { background: #1687d1; }
#demo-app .button-secondary {
  border-color: #53606a;
  background: transparent;
  color: var(--text);
}
#demo-app .button-secondary:hover { background: #17191c; }
#demo-app .button-danger { background: var(--danger); }
#demo-app input, #demo-app textarea, #demo-app select {
  border-color: var(--line);
  border-radius: 10px;
  background: #050607;
}
#demo-app input:focus, #demo-app textarea:focus, #demo-app select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
#demo-app .auth-page { margin-top: 6vh; }
#demo-app .auth-card, #demo-app .create-card, #demo-app .admin-card,
#demo-app .side-card, #demo-app .empty-card {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--panel);
}
#demo-app .auth-intro .brand-mark { border-radius: 50%; }
#demo-app .auth-intro h1, #demo-app .feed-heading h1,
#demo-app .page-title h1 { letter-spacing: -.035em; }
#demo-app .auth-switch a, #demo-app .text-link { color: var(--accent); }
#demo-app .social-layout {
  width: min(920px, calc(100% - 32px));
  grid-template-columns: minmax(200px, 250px) minmax(0, 620px);
  gap: 28px;
  margin: 20px auto;
}
#demo-app .side-card { position: sticky; top: 84px; padding: 18px; }
#demo-app .current-user-link { padding-bottom: 16px; }
#demo-app .profile-stat-row { color: var(--muted); }
#demo-app .profile-stat-row strong, #demo-app .profile-counts strong { color: var(--text); }
#demo-app .feed-heading {
  position: sticky;
  top: 64px;
  z-index: 5;
  align-items: center;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(0 0 0 / 90%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
#demo-app .eyebrow { color: var(--accent); letter-spacing: .12em; }
#demo-app .feed-heading h1, #demo-app .page-title h1 { font-size: 23px; }
#demo-app .feed-tabs { gap: 2px; padding: 2px; border-radius: 999px; background: #101214; }
#demo-app .feed-tabs button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
}
#demo-app .feed-tabs button.selected { background: #25282b; color: var(--text); }
#demo-app .post-card {
  margin-bottom: 12px;
  border-color: var(--line);
  border-radius: 14px;
  background: var(--bg);
}
#demo-app .post-header { min-height: 60px; padding: 12px 15px; }
#demo-app .post-header time { font-size: 11px; }
#demo-app .user-link strong { font-size: 13px; }
#demo-app .user-link small { color: var(--muted); font-size: 12px; }
#demo-app .post-image { max-height: 680px; background: #070809; }
#demo-app .post-caption { padding: 12px 16px 3px; color: #d7dbde; line-height: 1.6; }
#demo-app .post-caption strong, #demo-app .comment strong { color: var(--text); }
#demo-app .post-actions { gap: 22px; padding: 10px 15px 14px; }
#demo-app .icon-button {
  min-height: 38px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #9da3a8;
  transition: background .15s, color .15s;
}
#demo-app .icon-button:hover { background: rgb(29 155 240 / 12%); color: var(--accent); }
#demo-app .icon-button.liked, #demo-app .icon-button.liked:hover { color: #f91880; }
#demo-app .comments-panel { padding-inline: 16px; }
#demo-app .comment { color: #c3c8cc; }
#demo-app .comment {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
#demo-app .comment-body { min-width: 0; flex: 1; overflow-wrap: anywhere; }
#demo-app .comment-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
#demo-app .comment-action-button {
  min-height: 30px;
  padding: 3px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9da3a8;
  font-size: 12px;
}
#demo-app .comment-action-button:hover { background: rgb(29 155 240 / 12%); color: var(--accent); }
#demo-app .comment-action-button.liked { color: #f91880; }
#demo-app .comment-delete-button:hover { background: rgb(244 33 46 / 12%); color: var(--danger); }
#demo-app .comment-form { padding-top: 8px; border-top: 1px solid var(--line); }
#demo-app .comment-form .text-button { align-self: center; }
#demo-app .empty-card { padding: 28px 22px; }
#demo-app .upload-zone { border-color: #53606a; border-radius: 14px; background: #08090a; }
#demo-app .upload-zone #upload-placeholder strong { border-radius: 50%; background: #10283a; color: var(--accent); }
#demo-app .user-result, #demo-app .admin-user, #demo-app .admin-post {
  border-color: var(--line);
  border-radius: 12px;
  background: #08090a;
}
#demo-app .admin-user-meta span { background: #17191c; }
#demo-app .profile-summary { border-bottom-color: var(--line); }
#demo-app .profile-counts { color: #aeb3b7; }
#demo-app .profile-post-grid { gap: 3px; }
#demo-app .profile-post { border-radius: 5px; }
#demo-app .post-detail, #demo-app .delete-confirm-card {
  border-color: var(--line);
  border-radius: 16px;
  background: #08090a;
}
#demo-app .post-detail-actions .icon-button { border-color: var(--line); }
#demo-app .delete-confirm-actions .button { min-height: 42px; }
#demo-app #toast { border-radius: 12px; }
#demo-app :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#demo-app .offline-page {
  display: grid;
  min-height: min(76vh, 720px);
  place-items: center;
  padding: 32px 18px;
}
#demo-app .offline-card {
  width: min(480px, 100%);
  padding: clamp(26px, 6vw, 44px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 50% 0, rgb(29 155 240 / 11%), transparent 58%),
    #08090a;
  box-shadow: 0 24px 80px rgb(0 0 0 / 40%);
  text-align: center;
}
#demo-app .offline-symbol {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  border: 1px solid rgb(29 155 240 / 24%);
  border-radius: 24px;
  background: rgb(29 155 240 / 9%);
  color: var(--accent);
}
#demo-app .offline-symbol svg { width: 42px; height: 42px; }
#demo-app .offline-eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .16em;
}
#demo-app .offline-card h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 6vw, 32px);
  letter-spacing: -.04em;
  line-height: 1.15;
}
#demo-app .offline-description {
  max-width: 350px;
  margin: 14px auto 22px;
  color: #aeb3b7;
  font-size: 14px;
  line-height: 1.7;
}
#demo-app .offline-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #aeb3b7;
  font-size: 12px;
}
#demo-app .offline-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f0ad4e;
  box-shadow: 0 0 12px rgb(240 173 78 / 45%);
}
#demo-app .offline-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 1100px) {
  #demo-app .social-layout { grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 700px) {
  #demo-app .app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 8px;
    padding: 9px max(12px, env(safe-area-inset-left));
  }
  #demo-app .main-nav { gap: 2px; }
  #demo-app .main-nav a, #demo-app .main-nav button { min-height: 40px; padding-inline: 10px; }
  #demo-app .header-account { gap: 6px; }
  #demo-app .social-layout { width: 100%; margin: 0 auto; }
  #demo-app .feed-heading {
    top: 106px;
    margin: 0;
    padding: 13px 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  #demo-app .post-card { margin: 0; border-top: 0; border-right: 0; border-left: 0; border-radius: 0; }
  #demo-app .post-image { max-height: 72vh; }
  #demo-app .form-page, #demo-app .admin-page, #demo-app .profile-page { width: calc(100% - 24px); }
  #demo-app .auth-card, #demo-app .create-card, #demo-app .admin-card { padding: 18px; }
  #demo-app .profile-summary { padding-inline: 4px; }
}
@media (max-width: 450px) {
  #demo-app .app-header { padding-inline: max(9px, env(safe-area-inset-left)); }
  #demo-app .brand { gap: 7px; font-size: 13px; }
  #demo-app .brand-mark { width: 30px; height: 30px; }
  #demo-app .main-nav a, #demo-app .main-nav button { padding-inline: 7px; font-size: 11px; }
  #demo-app .header-account .text-button { padding-inline: 5px; }
}
@media (max-width: 450px) {
  #demo-app .offline-page { min-height: 70vh; padding: 20px 14px; }
  #demo-app .offline-card { border-radius: 20px; }
  #demo-app .offline-symbol { width: 66px; height: 66px; margin-bottom: 20px; border-radius: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  #demo-app *, #demo-app *::before, #demo-app *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
