* { box-sizing: border-box; }
:root {
    --bg: #07111f;
    --bg-soft: #0c1629;
    --card: rgba(13, 24, 43, 0.88);
    --card-2: rgba(18, 31, 54, 0.9);
    --text: #e5eefc;
    --muted: #8ba3c7;
    --line: rgba(148, 163, 184, 0.14);
    --accent: #7c3aed;
    --accent-2: #2563eb;
    --success: #0f766e;
    --error: #7f1d1d;
    --shadow: 0 25px 60px rgba(0,0,0,.28);
}
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(124,58,237,.22), transparent 25%),
        radial-gradient(circle at top right, rgba(37,99,235,.18), transparent 22%),
        linear-gradient(180deg, #07111f 0%, #091423 100%);
    color: var(--text);
    min-height: 100vh;
}
a { color: #c4b5fd; text-decoration: none; }
a:hover { text-decoration: none; color: white; }
img { max-width: 100%; display: block; }
.container { width: min(1120px, 92%); margin: 0 auto; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(16px);
    background: rgba(7, 17, 31, 0.72);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 18px;
}
.topbar nav { display: flex; gap: 10px; flex-wrap: wrap; }
.topbar nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: .2s ease;
}
.topbar nav a:hover { background: rgba(255,255,255,.06); color: white; }
.brand {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: white;
}
.main { padding: 28px 0 56px; }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}
.surface { background: var(--card-2); }
.hero {
    display: grid;
    gap: 14px;
    background: linear-gradient(135deg, rgba(124,58,237,.22), rgba(37,99,235,.18));
}
.hero h1, .auth-card h1, .composer h2, .page-title, .section-title, .card h2, .card h3 { margin-top: 0; }
.hero p { margin: 0; color: #d8e4fb; max-width: 760px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
textarea, input {
    width: 100%;
    background: rgba(7,17,31,.82);
    border: 1px solid rgba(148,163,184,.18);
    color: var(--text);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color .2s ease, transform .15s ease;
}
textarea:focus, input:focus { border-color: rgba(196,181,253,.75); }
input[type="file"] { padding: 12px; }
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    padding: 11px 16px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
    transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease;
    box-shadow: 0 10px 24px rgba(80, 70, 229, 0.28);
}
button:hover, .btn:hover { opacity: .98; transform: translateY(-1px); }
.btn-secondary {
    background: rgba(255,255,255,.06);
    box-shadow: none;
    border: 1px solid rgba(148,163,184,.16);
}
.post-header, .post-actions, .stats, .result-row, .message-header, .message-user, .profile-main, .gallery-meta, .gallery-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.post-content { font-size: 1.04rem; line-height: 1.65; }
.comment {
    border-top: 1px solid var(--line);
    padding-top: 12px;
    margin-top: 12px;
}
.comment-form, .inline-form { display: flex; gap: 10px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.comment-form input, .inline-form input { margin-bottom: 0; }
.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,.08);
}
.success { background: rgba(15,118,110,.25); }
.error { background: rgba(127,29,29,.35); }
.muted { color: var(--muted); font-size: .94rem; }
.auth-card { max-width: 480px; margin: 40px auto; }
.user-link { font-weight: 800; color: white; }
.profile-card form, .post-actions form { margin: 0; }
.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 18px;
}
.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}
.search-form input { margin-bottom: 0; }
.search-results .card:last-child, .sidebar .card:last-child { margin-bottom: 0; }
.feed { display: grid; gap: 18px; }
.post {
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 27, 49, 0.95), rgba(10, 20, 37, 0.94));
}
.profile-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(124,58,237,.2), rgba(37,99,235,.17));
}
.profile-main { align-items: flex-start; }
.profile-name h1 { margin-bottom: 6px; }
.stats { justify-content: flex-start; flex-wrap: wrap; margin-top: 16px; }
.stat-chip {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
}
.avatar, .avatar-lg, .avatar-xl {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}
.avatar-lg { width: 62px; height: 62px; }
.avatar-xl { width: 94px; height: 94px; }
.avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(124,58,237,.9), rgba(37,99,235,.9));
    color: white;
    font-weight: 800;
    letter-spacing: .03em;
}
.user-meta { display: flex; align-items: center; gap: 12px; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.gallery-link { color: inherit; display: block; }
.gallery-item {
    background: rgba(7,17,31,.72);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease;
}
.gallery-item:hover { transform: translateY(-3px); border-color: rgba(196,181,253,.35); }
.gallery-item img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}
.gallery-caption { padding: 12px 13px 14px; }
.gallery-caption strong { display: block; margin-bottom: 6px; }
.gallery-card {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 18px;
    align-items: start;
}
.gallery-card-image {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.03);
}
.gallery-card-image img {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    background: #050b15;
}
.gallery-side .card { margin-bottom: 0; }
.like-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.message-list .card, .search-results .card { margin-bottom: 12px; }
.chat-box {
    max-height: 540px;
    overflow-y: auto;
    padding-right: 4px;
}
.chat-message {
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 12px;
    max-width: 82%;
}
.chat-message.me {
    background: linear-gradient(135deg, rgba(124,58,237,.95), rgba(37,99,235,.95));
    margin-left: auto;
}
.chat-message.them {
    background: rgba(255,255,255,.06);
}
.empty-state { text-align: center; padding: 26px; }
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(124,58,237,.18);
    border: 1px solid rgba(196,181,253,.25);
    font-size: .9rem;
}
.search-user-card { padding: 16px 18px; }
.search-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.top-note { margin-bottom: 12px; }
@media (max-width: 920px) {
    .grid-2, .gallery-card { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .post-actions, .comment-form, .stats, .topbar-inner, .search-form, .inline-form, .result-row, .message-header, .profile-main {
        flex-direction: column;
        align-items: flex-start;
        display: flex;
    }
    .search-form { display: flex; }
    .chat-message { max-width: 100%; }
    .topbar nav { gap: 6px; }
    .card { padding: 18px; border-radius: 20px; }
    .gallery-item img { height: 190px; }
}

.upload-panel {
    display:grid;
    gap:14px;
    padding: 16px;
    margin-bottom: 14px;
    border-radius: 18px;
    border: 1px dashed rgba(196,181,253,.26);
    background: rgba(255,255,255,.03);
}
.upload-label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: white;
}
.post-video-wrap {
    margin: 16px 0 4px;
}
.post-video {
    width: 100%;
    max-height: 72vh;
    border-radius: 22px;
    background: #030712;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 18px 45px rgba(0,0,0,.28);
}
.video-note {
    margin-top: 10px;
    color: var(--muted);
    font-size: .9rem;
}
.chat-message .message-user {
    justify-content: flex-start;
}
@media (max-width: 720px) {
    .post-video { border-radius: 18px; }
}


.nav-badge {
    display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;
    border-radius:999px;background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;font-size:.78rem;font-weight:800;
}
.avatar-comment{width:34px;height:34px}
.video-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:12px}
.post-video-wrap{margin-top:14px}
.post-video{width:100%;max-height:70vh;border-radius:22px;background:#050b15;border:1px solid var(--line)}
.video-note{color:var(--muted);font-size:.88rem}
.mobile-nav{position:fixed;left:0;right:0;bottom:0;z-index:40;display:none;grid-template-columns:repeat(5,1fr);gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:rgba(7,17,31,.92);backdrop-filter:blur(16px);border-top:1px solid var(--line)}
.mobile-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#d6e2f8;font-size:.8rem;padding:6px;border-radius:14px}
.mobile-nav a span{font-size:.72rem}
.reel-open{overflow:hidden}
.reel-overlay{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:9999}
.reel-overlay.is-open{display:flex}
.reel-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.92)}
.reel-stage{position:relative;z-index:2;width:min(420px,92vw);display:grid;gap:10px}
.reel-player{width:100%;height:min(78vh,820px);border-radius:28px;background:#000;object-fit:contain;border:1px solid rgba(255,255,255,.12)}
.reel-meta{padding:0 8px 8px}
.reel-close,.reel-nav{position:absolute;z-index:3;border:none;background:rgba(15,23,42,.7);color:#fff;border:1px solid rgba(255,255,255,.15);box-shadow:none}
.reel-close{top:18px;right:18px;width:44px;height:44px;border-radius:999px;font-size:1.2rem}
.reel-nav{top:50%;transform:translateY(-50%);width:48px;height:48px;border-radius:999px;font-size:1.8rem}
.reel-nav-prev{left:max(16px,2vw)}
.reel-nav-next{right:max(16px,2vw)}
.notification-item{padding:18px}
.notification-new{border-color:rgba(196,181,253,.35);background:rgba(124,58,237,.08)}
@media (max-width: 860px){
    .grid-2,.gallery-card{grid-template-columns:1fr}
    .topbar nav{display:none}
    .main{padding-bottom:92px}
    .mobile-nav{display:grid}
    .reel-nav{display:none}
    .hero-actions,.comment-form,.inline-form,.post-actions,.profile-main,.message-user,.gallery-card-header{align-items:flex-start}
}

.btn-small{padding:10px 14px;border-radius:14px;font-size:.92rem;font-weight:700}
.btn-ghost{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.12);color:#e8eefc}
.btn-ghost:hover{background:rgba(255,255,255,.08)}
.video-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px}
.video-tools .btn,.video-tools a{box-shadow:none}
.video-tools .is-done{border-color:rgba(74,222,128,.35);background:rgba(34,197,94,.18)}
.share-shell{max-width:900px;margin:0 auto;width:100%}
.share-post-card{padding:22px}
.share-meta-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:10px}
.embed-body{margin:0;min-height:100vh;background:radial-gradient(circle at top,#12254a 0,#07111f 45%,#030712 100%);color:#ecf3ff;font-family:Inter,system-ui,sans-serif}
.embed-shell{min-height:100vh;display:grid;place-items:center;padding:14px}
.embed-card{width:min(100%,430px);padding:16px;border-radius:24px;background:rgba(7,17,31,.94)}
.embed-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.avatar-sm{width:40px;height:40px}
.embed-caption{margin-bottom:12px}
.embed-video-wrap{margin:0}
.embed-video{width:100%;height:min(72vh,760px);max-height:none;object-fit:contain;background:#000;border-radius:22px}
.embed-actions{display:flex;justify-content:flex-end;margin-top:12px}
@media (max-width:720px){
  .video-tools{align-items:stretch}
  .video-tools .btn,.video-tools a{width:100%;justify-content:center;text-align:center}
  .share-meta-row{align-items:flex-start}
}

.nav-coins {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    font-size: 0.95rem;
}

.video-paywall {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
}

.video-locked-preview {
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
}

.video-locked-poster {
    display: block;
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    filter: blur(8px);
    transform: scale(1.03);
    opacity: 0.9;
}


.checkbox-row{display:flex;align-items:center;gap:10px;margin:12px 0 4px;color:#eef4ff;font-weight:700}
.checkbox-row input{width:18px;height:18px}
.chat-send-form{display:grid;gap:12px}
.chat-send-form textarea{min-height:88px;resize:vertical}
.chat-send-tools{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.chat-upload-label{min-width:220px}
.coin-field{display:grid;gap:8px;color:#eef4ff;font-weight:700}
.coin-field input{max-width:150px}
.chat-attachment{margin-top:12px}
.chat-image{display:block;max-width:min(100%,320px);max-height:320px;border-radius:16px;border:1px solid rgba(255,255,255,.12);background:#020817}
.chat-coins-badge{display:inline-flex;align-items:center;gap:8px;margin-top:12px;padding:8px 12px;border-radius:999px;background:rgba(250,204,21,.14);border:1px solid rgba(250,204,21,.28);font-weight:700;color:#fde68a}
@media (max-width:720px){.chat-send-tools{align-items:stretch}.chat-send-tools > *{width:100%}.coin-field input{max-width:none}}


.upload-status {
    margin-top: 12px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
}
.upload-status-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.upload-progress {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
}
.upload-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(124,58,237,.95), rgba(37,99,235,.95));
    transition: width .2s ease;
}
.upload-status.is-error .upload-progress-bar {
    background: linear-gradient(90deg, rgba(239,68,68,.95), rgba(249,115,22,.95));
}

.chat-typing-indicator{margin:10px 4px 0;color:var(--muted);font-size:.95rem;min-height:20px}
.chat-read-receipt{margin-top:4px;text-align:right;color:var(--muted);font-size:.88rem;opacity:0;transition:opacity .2s ease;min-height:18px}
.chat-read-receipt.is-visible{opacity:1}
.chat-emoji-picker{display:flex;gap:8px;flex-wrap:wrap}
.chat-emoji-picker[hidden]{display:none !important}
.emoji-btn{padding:8px 10px;min-width:auto;border-radius:12px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);line-height:1;font-size:1.15rem}
.emoji-btn:hover{background:rgba(255,255,255,.1)}

.chat-drop-zone {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px dashed rgba(255,255,255,.25);
  border-radius: 14px;
  color: #a9b7d9;
  cursor: pointer;
  transition: .2s ease;
}
.chat-drop-zone.is-dragover {
  border-color: #8a7dff;
  background: rgba(98,78,255,.12);
  color: #fff;
}
.chat-file-card {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
}
.chat-file-card a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.chat-file-card a:hover {
  text-decoration: underline;
}

.chat-shell{padding-bottom:18px}
.chat-partner-head{align-items:flex-start}
.chat-presence-row{display:flex;align-items:center;gap:8px;margin-top:4px}
.presence-dot{width:10px;height:10px;border-radius:999px;background:rgba(148,163,184,.7);box-shadow:0 0 0 2px rgba(255,255,255,.05)}
.presence-dot.is-online{background:#22c55e;box-shadow:0 0 12px rgba(34,197,94,.45)}
.secondary-btn{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);color:#fff;border-radius:14px;padding:12px 14px;font-weight:700}
.secondary-btn:hover{background:rgba(255,255,255,.12)}
.chat-voice-status{min-height:20px;margin-top:8px}
.chat-video{display:block;max-width:min(100%,340px);max-height:340px;border-radius:16px;border:1px solid rgba(255,255,255,.12);background:#020817}
.chat-audio-card{margin-top:10px;padding:12px;border-radius:14px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08)}
.chat-audio-card audio{width:min(100%,340px)}
.message-checks{display:inline-flex;align-items:center;gap:2px;margin-left:8px;font-weight:800;letter-spacing:-1px}
.message-checks.is-read{color:#60a5fa}
.message-checks.is-delivered{color:#cbd5e1}
.message-checks.is-sent{color:#94a3b8}
#chatBox{max-height:65vh;overflow:auto;scroll-behavior:smooth}
@media (max-width:720px){.chat-send-tools{gap:10px}.secondary-btn{width:100%}.chat-upload-label{width:100%}}


.gallery-thumb-wrap{position:relative}
.gallery-badges{position:absolute;left:10px;top:10px;display:flex;gap:8px;flex-wrap:wrap}
.gallery-item-locked .gallery-caption{border-top:1px solid rgba(255,255,255,.06)}
.is-blurred{filter:blur(16px) brightness(.5);transform:scale(1.02)}
.locked-media-wrap{position:relative;overflow:hidden;border-radius:22px}
.locked-media-image{width:100%;max-height:72vh;object-fit:contain;background:#050b15}
.locked-media-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;text-align:center;background:rgba(3,7,18,.38)}
.gallery-owner-actions form{display:inline-flex}

.unlock-note{padding:12px 14px;border-radius:14px;background:rgba(99,102,241,.12);border:1px solid rgba(129,140,248,.24);color:#e7ecff;font-weight:700;line-height:1.45}.gallery-thumb-wrap::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(2,6,23,0) 35%,rgba(2,6,23,.55) 100%)}.gallery-item-locked .gallery-thumb-wrap::before{content:'Gesperrt';position:absolute;right:10px;top:10px;z-index:2;padding:7px 10px;border-radius:999px;background:rgba(15,23,42,.85);border:1px solid rgba(255,255,255,.14);color:#fff;font-weight:800;font-size:.85rem}.locked-media-overlay .badge{background:rgba(15,23,42,.78);border-color:rgba(255,255,255,.18)}


.stat-chip-link {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.stat-chip-link:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.09);
    border-color: rgba(196,181,253,.35);
}
.stat-chip-link.is-active {
    background: linear-gradient(135deg, rgba(124,58,237,.32), rgba(37,99,235,.22));
    border-color: rgba(196,181,253,.35);
}
.follow-list-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.follow-list {
    display: grid;
    gap: 14px;
}
.follow-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(7,17,31,.5);
}
.follow-user {
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    flex: 1 1 auto;
}
.follow-user strong {
    display: block;
    font-size: 1.05rem;
}
.follow-user .muted {
    overflow-wrap: anywhere;
}
.follow-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.follow-actions form {
    margin: 0;
}
@media (max-width: 720px) {
    .follow-row {
        flex-direction: column;
        align-items: stretch;
    }
    .follow-actions {
        justify-content: flex-start;
    }
}


.gallery-top-link{margin:12px 0 18px}.gallery-page-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.gallery-grid-page{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.gallery-grid-page .gallery-item img{height:260px}@media (max-width:720px){.gallery-page-header{flex-direction:column}.gallery-grid-page .gallery-item img{height:220px}}

.messages-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 0;
    padding: 0;
    overflow: hidden;
    min-height: 76vh;
}
.messages-sidebar {
    border-right: 1px solid var(--line);
    background: rgba(255,255,255,.025);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    min-height: 76vh;
}
.messages-sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.messages-sidebar-head h2 {
    margin-bottom: 6px;
}
.icon-link {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    color: white;
    font-size: 1.35rem;
}
.messages-search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 16px;
}
.messages-search-form input,
.messages-search-form button {
    margin-bottom: 0;
}
.messages-filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.messages-filter-chip {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--text);
    box-shadow: none;
}
.messages-filter-chip.is-active {
    background: white;
    color: #07111f;
}
.messages-filter-chip span {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(7,17,31,.14);
    margin-left: 6px;
    font-size: .8rem;
}
.messages-conversation-list {
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.conversation-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: rgba(255,255,255,.02);
    color: var(--text);
    transition: .18s ease;
}
.conversation-card:hover {
    background: rgba(255,255,255,.05);
    border-color: rgba(196,181,253,.18);
}
.conversation-card.is-active {
    background: rgba(192, 240, 144, 0.18);
    border-color: rgba(192, 240, 144, 0.32);
}
.conversation-avatar-wrap {
    position: relative;
    flex: 0 0 auto;
}
.conversation-avatar-wrap .presence-dot {
    position: absolute;
    right: 2px;
    bottom: 2px;
}
.conversation-content {
    min-width: 0;
    flex: 1;
}
.conversation-topline,
.conversation-preview-row,
.messenger-compose-bottom,
.messages-main-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.conversation-topline strong,
.conversation-preview {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.conversation-time {
    font-size: .85rem;
    color: var(--muted);
    white-space: nowrap;
}
.conversation-subline {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: .84rem;
    margin: 4px 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.conversation-preview {
    margin: 0;
    color: #dce7fb;
    font-size: .95rem;
}
.conversation-badge {
    margin-left: auto;
    min-width: 28px;
}
.messages-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 76vh;
    background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}
.messages-main.is-empty {
    justify-content: center;
    align-items: center;
}
.messages-main-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.03);
}
.messages-main-body {
    flex: 1;
    min-height: 0;
    padding: 18px 22px 0;
}
.messenger-chat-box {
    max-height: none;
    height: 100%;
    min-height: 360px;
    padding-bottom: 20px;
}
.messenger-compose {
    position: relative;
    padding: 12px 22px 22px;
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.03);
}
.messenger-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.messenger-tool-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: none;
}
.messenger-file-btn {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.messenger-file-btn input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}
.compact-coin-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--text);
}
.compact-coin-field input {
    width: 86px;
    background: transparent;
    border: 0;
    padding: 11px 0;
    margin: 0;
}
.messenger-compose textarea {
    min-height: 72px;
    max-height: 180px;
    resize: vertical;
    margin-bottom: 10px;
}
.messenger-compose-bottom {
    align-items: flex-end;
}
.chat-drop-zone {
    border: 1px dashed rgba(196,181,253,.25);
    border-radius: 16px;
    padding: 10px 14px;
    margin-bottom: 10px;
    color: var(--muted);
    text-align: center;
    transition: .18s ease;
}
.chat-drop-zone {
    position: relative;
    cursor: pointer;
}
.chat-drop-zone:focus-visible {
    outline: 2px solid rgba(96,165,250,.65);
    outline-offset: 2px;
}
.chat-drop-zone-link {
    color: #c4b5fd;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.chat-drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.chat-drop-zone.is-dragover {
    border-color: rgba(196,181,253,.65);
    color: white;
    background: rgba(124,58,237,.08);
}
.chat-emoji-picker.is-floating {
    position: absolute;
    left: 22px;
    bottom: 150px;
    z-index: 5;
    max-width: 260px;
    background: rgba(7,17,31,.96);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 10px;
    box-shadow: var(--shadow);
}
.chat-typing-indicator,
.chat-read-receipt {
    padding: 0 22px 10px;
    color: var(--muted);
    font-size: .92rem;
}
.chat-read-receipt {
    opacity: 0;
    transition: .18s ease;
}
.chat-read-receipt.is-visible {
    opacity: 1;
}
.messages-empty-state {
    text-align: center;
    max-width: 420px;
    padding: 30px;
}
.messages-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
}

@media (max-width: 980px) {
    .messages-layout {
        grid-template-columns: 1fr;
    }
    .messages-sidebar {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .messages-main {
        min-height: 68vh;
    }
}

@media (max-width: 720px) {
    .messages-layout {
        min-height: auto;
    }
    .messages-sidebar,
    .messages-main-head,
    .messages-main-body,
    .messenger-compose {
        padding-left: 14px;
        padding-right: 14px;
    }
    .messages-search-form,
    .conversation-topline,
    .conversation-preview-row,
    .messenger-compose-bottom,
    .messages-main-head {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .conversation-time,
    .conversation-badge {
        margin-left: 0;
    }
    .chat-emoji-picker.is-floating {
        left: 14px;
        right: 14px;
        max-width: none;
        bottom: 170px;
    }
}


.sr-only{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.upload-panel{display:grid;gap:14px;}
.upload-panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px;}
.upload-trigger{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;}
.upload-dropzone{padding:18px;border:1px dashed rgba(148,163,184,.35);border-radius:18px;background:rgba(15,23,42,.35);}
.upload-dropzone-title{font-weight:700;margin-bottom:6px;}
.upload-status{padding:16px;border:1px solid rgba(148,163,184,.18);border-radius:18px;background:rgba(15,23,42,.45);display:grid;gap:12px;}
.upload-file-row,.upload-status-head,.upload-stats{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.upload-clear{border:1px solid rgba(148,163,184,.2);background:rgba(30,41,59,.7);color:#fff;border-radius:999px;padding:8px 12px;cursor:pointer;}
.upload-progress{width:100%;height:12px;background:rgba(15,23,42,.8);border-radius:999px;overflow:hidden;border:1px solid rgba(148,163,184,.12);}
.upload-progress-bar{width:0%;height:100%;background:linear-gradient(90deg,#7c3aed,#2563eb);transition:width .2s ease;}
.processing-badge{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border-radius:999px;background:rgba(59,130,246,.16);color:#dbeafe;font-weight:600;}
.processing-badge::before{content:"";width:10px;height:10px;border-radius:50%;background:#60a5fa;box-shadow:0 0 0 0 rgba(96,165,250,.8);animation:pulseUpload 1.8s infinite;}
.upload-status.is-error .upload-progress-bar{background:linear-gradient(90deg,#dc2626,#f97316);}
.upload-status.is-success .upload-progress-bar{background:linear-gradient(90deg,#22c55e,#06b6d4);}
@keyframes pulseUpload{0%{box-shadow:0 0 0 0 rgba(96,165,250,.75);}70%{box-shadow:0 0 0 10px rgba(96,165,250,0);}100%{box-shadow:0 0 0 0 rgba(96,165,250,0);}}

.upload-status[hidden], .processing-badge[hidden]{display:none !important;}
.upload-trigger{appearance:none;-webkit-appearance:none;border:none;}

/* Instagram-inspirierter Feed */
.insta-shell{display:grid;grid-template-columns:minmax(0,680px) minmax(260px,340px);gap:24px;align-items:start;max-width:1080px;margin:0 auto}
.insta-main{min-width:0}.insta-sidebar{position:sticky;top:92px}.insta-hero{padding:26px;background:linear-gradient(135deg,rgba(236,72,153,.2),rgba(124,58,237,.2),rgba(37,99,235,.18))}.eyebrow{margin:0 0 8px;color:#f9a8d4;font-weight:900;letter-spacing:.12em;text-transform:uppercase;font-size:.78rem}.insta-hero h1{font-size:clamp(2rem,5vw,3.25rem);line-height:1.02;margin-bottom:10px}
.stories-card{padding:14px 16px;overflow:hidden}.stories-strip{display:flex;gap:16px;overflow-x:auto;padding:4px 2px 8px;scrollbar-width:thin}.story-create,.story-bubble{flex:0 0 86px;display:grid;place-items:center;text-align:center;color:var(--text);gap:6px}.story-create strong,.story-bubble strong{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.84rem}.story-ring,.story-add-ring{width:70px;height:70px;border-radius:999px;padding:3px;background:linear-gradient(135deg,#f97316,#ec4899,#7c3aed);display:grid;place-items:center}.story-ring .avatar{width:64px;height:64px;border:3px solid #0b1220}.story-add-ring{cursor:pointer;color:#fff;font-size:1.7rem;font-weight:900}.story-add-ring span{width:64px;height:64px;border-radius:999px;background:rgba(7,17,31,.92);display:grid;place-items:center;border:2px solid rgba(255,255,255,.18)}.story-empty{align-self:center;min-width:260px}.insta-composer textarea{min-height:98px}.composer-media-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px}.media-pill{display:inline-flex;align-items:center;gap:8px;padding:11px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);font-weight:800;cursor:pointer}.post-photo-wrap{margin:15px -22px 4px;background:#020617;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.post-photo{width:100%;max-height:760px;object-fit:cover;margin:0 auto}.post{padding-bottom:16px}.mini-profile{display:grid;gap:16px}.sidebar-hint p{line-height:1.55}.topbar{background:rgba(2,6,23,.78)}.brand{letter-spacing:0;text-transform:none;font-size:1.25rem}.brand::before{content:'◎ ';color:#f472b6}.post-actions button{border-radius:999px}.comment-form input{border-radius:999px}
@media(max-width:1020px){.insta-shell{grid-template-columns:1fr}.insta-sidebar{display:none}.insta-main{width:100%}}
@media(max-width:720px){.container{width:min(100%,96%)}.main{padding-top:12px}.insta-hero{display:none}.stories-card,.post,.insta-composer{border-radius:18px}.post-photo-wrap{margin-left:-18px;margin-right:-18px}.story-ring,.story-add-ring{width:64px;height:64px}.story-ring .avatar,.story-add-ring span{width:58px;height:58px}.composer-media-row{align-items:flex-start}}

/* Instagram-ähnliches Profil */
.ig-profile-page{max-width:975px;margin:0 auto 56px;color:var(--text);}
.ig-profile-head{display:grid;grid-template-columns:250px minmax(0,1fr);gap:44px;align-items:center;padding:36px 0 34px;border-bottom:0;background:transparent;}
.ig-avatar-wrap{display:flex;justify-content:center;align-items:center;}
.ig-profile-avatar,.avatar-xl.ig-profile-avatar{width:154px;height:154px;border-radius:50%;object-fit:cover;border:1px solid rgba(148,163,184,.28);box-shadow:none;}
.ig-profile-info{min-width:0;display:grid;gap:18px;}
.ig-profile-topline{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.ig-profile-topline h1{font-size:1.75rem;line-height:1.2;margin:0;font-weight:800;letter-spacing:-.03em;}
.ig-action,.ig-profile-page button.ig-action{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 18px;border-radius:10px;border:0;background:rgba(148,163,184,.16);color:var(--text);font-weight:800;text-decoration:none;cursor:pointer;box-shadow:none;}
.ig-action:hover{filter:brightness(1.08);transform:none;}
.ig-action-primary,.ig-profile-page button.ig-action-primary{background:#0095f6;color:#fff;}
.ig-icon-action{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;color:var(--text);text-decoration:none;font-size:1.2rem;}
.ig-inline-form{margin:0;display:inline-flex;}
.ig-stats-row{display:flex;align-items:center;gap:34px;font-size:1rem;flex-wrap:wrap;}
.ig-stats-row a{color:var(--text);text-decoration:none;}
.ig-stat-disabled{color:var(--text);opacity:.75;cursor:default;user-select:none;}
.ig-stats-row strong{font-weight:900;margin-right:4px;}
.ig-bio{font-size:.98rem;line-height:1.42;display:grid;gap:4px;}
.ig-bio p{margin:0;max-width:520px;}
.ig-owner-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px;}
.ig-owner-meta span{display:inline-flex;padding:7px 10px;border-radius:999px;background:rgba(148,163,184,.12);font-size:.86rem;font-weight:700;}
.ig-mobile-actions{display:none;grid-template-columns:1fr 1fr;gap:8px;margin:2px 0 18px;}
.ig-highlights{display:flex;gap:28px;align-items:flex-start;overflow-x:auto;padding:18px 4px 30px;scrollbar-width:thin;}
.ig-highlight,.ig-highlight-new label{display:grid;justify-items:center;gap:8px;min-width:78px;color:var(--text);text-decoration:none;cursor:pointer;}
.ig-highlight-circle{width:76px;height:76px;border-radius:50%;display:grid;place-items:center;background:rgba(148,163,184,.08);border:2px solid rgba(148,163,184,.26);outline:3px solid rgba(148,163,184,.08);font-size:1.9rem;color:rgba(148,163,184,.9);}
.ig-highlight strong,.ig-highlight-new strong{font-size:.86rem;}
.ig-limit-note{margin:8px 0 18px;}
.ig-tabs{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid rgba(148,163,184,.28);margin-top:8px;}
.ig-tabs a{height:54px;display:flex;align-items:center;justify-content:center;gap:8px;color:var(--muted);text-decoration:none;text-transform:uppercase;letter-spacing:.08em;font-size:.76rem;font-weight:900;border-top:2px solid transparent;margin-top:-1px;}
.ig-tabs a.active{color:var(--text);border-top-color:var(--text);}
.ig-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;}
.ig-tile{position:relative;aspect-ratio:1/1;overflow:hidden;background:rgba(15,23,42,.9);color:#fff;text-decoration:none;display:grid;place-items:center;}
.ig-tile img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .2s ease,filter .2s ease;}
.ig-tile:hover img{transform:scale(1.035);filter:brightness(.72);}
.ig-tile-type{position:absolute;top:10px;right:10px;text-shadow:0 2px 10px rgba(0,0,0,.7);font-size:1.15rem;font-weight:900;z-index:2;}
.ig-tile-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.38);font-weight:900;font-size:1.05rem;opacity:0;transition:opacity .18s ease;}
.ig-tile:hover .ig-tile-overlay{opacity:1;}
.ig-video-placeholder{width:100%;height:100%;display:grid;place-items:center;font-size:3rem;background:linear-gradient(135deg,rgba(15,23,42,.95),rgba(51,65,85,.85));}
.ig-empty-state{grid-column:1/-1;text-align:center;padding:90px 20px;border-top:1px solid rgba(148,163,184,.2);}
.ig-empty-state>div{font-size:3rem;margin-bottom:12px;}
.ig-empty-state h2{margin:0 0 8px;font-size:1.8rem;}
@media(max-width:800px){.ig-profile-page{max-width:100%;}.ig-profile-head{grid-template-columns:92px minmax(0,1fr);gap:18px;padding:20px 0 10px;align-items:start}.ig-profile-avatar,.avatar-xl.ig-profile-avatar{width:86px;height:86px}.ig-profile-topline h1{font-size:1.35rem}.ig-profile-topline .ig-action,.ig-profile-topline form,.ig-icon-action{display:none}.ig-stats-row{order:3;grid-column:1/-1;justify-content:space-around;gap:6px;padding:18px 0;border-top:1px solid rgba(148,163,184,.22);border-bottom:1px solid rgba(148,163,184,.22);font-size:.9rem}.ig-profile-info{display:contents}.ig-bio{grid-column:1/-1;padding:0 4px 10px}.ig-mobile-actions{display:grid}.ig-highlights{gap:18px;padding:12px 2px 22px}.ig-highlight-circle{width:66px;height:66px;font-size:1.55rem}.ig-tabs a span{display:none}.ig-tabs a{font-size:1.25rem;height:48px}.ig-photo-grid{gap:3px}}

.ig-video-feed{display:grid;gap:18px;padding:28px 0 8px;scroll-margin-top:90px;}
.ig-section-title{display:flex;align-items:end;justify-content:space-between;gap:14px;border-top:1px solid rgba(148,163,184,.22);padding-top:24px;}
.ig-section-title h2{margin:0;font-size:1.4rem;letter-spacing:-.02em;}
.ig-section-title p{margin:0;}
.ig-video-card{max-width:760px;width:100%;margin:0 auto;}
.ig-video-card .post-video{max-height:78vh;}
.ig-video-empty{border:1px solid rgba(148,163,184,.18);border-radius:24px;background:rgba(15,23,42,.28);}
@media(max-width:800px){.ig-video-feed{padding-top:20px}.ig-section-title{display:block;padding:20px 10px 0}.ig-video-card{border-radius:0;margin-left:-12px;margin-right:-12px;width:auto}.ig-video-card .post-video{border-radius:0}}

/* Profil-Tabs und Video-Popup */
.ig-tab-panel{display:none;}
.ig-tab-panel.active{display:grid;}
.profile-video-modal[hidden]{display:none!important;}
.profile-video-modal{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:24px;}
.profile-video-modal-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.82);backdrop-filter:blur(10px);}
.profile-video-modal-card{position:relative;z-index:1;width:min(920px,96vw);max-height:92vh;overflow:auto;border-radius:24px;border:1px solid rgba(148,163,184,.25);background:rgba(15,23,42,.98);box-shadow:0 24px 90px rgba(0,0,0,.55);padding:22px;}
.profile-video-modal-close{position:sticky;top:0;float:right;width:38px;height:38px;border-radius:999px;border:1px solid rgba(148,163,184,.25);background:rgba(15,23,42,.9);color:var(--text);font-size:1.6rem;line-height:1;z-index:3;cursor:pointer;}
.profile-video-modal-content[hidden]{display:none!important;}
.profile-video-modal-content .post-video-wrap{margin-top:16px;}
.profile-video-modal-content .post-video{width:100%;max-height:74vh;object-fit:contain;background:#000;}
@media(max-width:800px){.profile-video-modal{padding:0}.profile-video-modal-card{width:100vw;max-height:100vh;border-radius:0;padding:14px}.profile-video-modal-content .post-video{border-radius:14px;}}

/* Story-Popup: ein Profil = eine Story-Blase, mehrere Slides automatisch nacheinander */
.story-bubble{border:0;background:transparent;font:inherit;cursor:pointer;padding:0;}
.story-modal[hidden]{display:none!important;}
.story-modal{position:fixed;inset:0;z-index:2100;display:grid;place-items:center;padding:22px;}
.story-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.88);backdrop-filter:blur(8px);}
.story-modal-card{position:relative;z-index:1;width:min(430px,96vw);height:min(760px,92vh);border-radius:24px;overflow:hidden;background:#050505;border:1px solid rgba(255,255,255,.14);box-shadow:0 24px 90px rgba(0,0,0,.65);}
.story-modal-close{position:absolute;top:18px;right:14px;z-index:8;width:36px;height:36px;border-radius:999px;border:0;background:rgba(0,0,0,.45);color:#fff;font-size:1.7rem;line-height:1;cursor:pointer;}
.story-modal-group,.story-slide{position:absolute;inset:0;}
.story-modal-group[hidden],.story-slide[hidden]{display:none!important;}
.story-media-zoom-wrap{position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;background:#050505;touch-action:none;cursor:zoom-in;user-select:none;}
.story-media-zoom-wrap.is-zoom-active{cursor:grab;}
.story-media-zoom-wrap.is-zoom-active:active{cursor:grabbing;}
.story-zoom-media{width:100%;height:100%;object-fit:contain;background:#050505;display:block;transform-origin:center center;will-change:transform;}
.story-slide img,.story-slide video{max-width:100%;max-height:100%;}
.story-progress-row{position:absolute;top:10px;left:12px;right:56px;z-index:7;display:flex;gap:5px;}
.story-progress{height:3px;flex:1;border-radius:999px;background:rgba(255,255,255,.28);overflow:hidden;}
.story-progress i{display:block;width:0;height:100%;background:#fff;border-radius:inherit;}
.story-modal-user{position:absolute;top:22px;left:14px;z-index:7;display:flex;align-items:center;gap:9px;color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.7);font-weight:900;}
.story-modal-user .avatar{width:34px;height:34px;border:2px solid rgba(255,255,255,.8);}
.story-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:7;width:42px;height:62px;border:0;border-radius:999px;background:rgba(0,0,0,.28);color:#fff;font-size:2.5rem;line-height:1;cursor:pointer;}
.story-prev{left:10px;}.story-next{right:10px;}
@media(max-width:620px){.story-modal{padding:0}.story-modal-card{width:100vw;height:100vh;border-radius:0;border:0}.story-nav{background:transparent;width:34%;height:75%;font-size:0}.story-prev{left:0}.story-next{right:0}}

/* Profil-Stories: sauberer Ring ohne doppelten Glow */
.ig-highlight.story-bubble{background:transparent;box-shadow:none;border:0;}
.ig-highlight .story-ring.ig-highlight-circle{padding:0;background:rgba(148,163,184,.08);border:2px solid rgba(148,163,184,.28);outline:0;box-shadow:none;}
.ig-highlight .story-ring.ig-highlight-circle .avatar{width:62px;height:62px;border:2px solid rgba(15,23,42,.95);}
.ig-highlight .story-ring.ig-highlight-circle::before{content:"";position:absolute;inset:-4px;border-radius:999px;background:linear-gradient(135deg,#f97316,#ec4899,#7c3aed);z-index:-1;opacity:.95;}
.ig-highlight-circle{position:relative;}
.ig-highlight small{max-width:88px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.76rem;}
.ig-moment-circle{overflow:hidden;}
.ig-moment-circle img,.moment-cover img{width:100%;height:100%;object-fit:cover;display:block;}
.moment-create-card{margin:18px 0;padding:18px;}
.moment-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.moment-create-card input,.moment-create-card textarea{width:100%;margin-top:7px;}
.moment-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:16px;margin:18px 0 26px;}
.moment-card{display:grid;gap:9px;text-decoration:none;color:var(--text);padding:12px;border:1px solid rgba(148,163,184,.18);background:rgba(15,23,42,.55);border-radius:18px;}
.moment-card:hover{transform:translateY(-2px);border-color:rgba(96,165,250,.45);}
.moment-cover{aspect-ratio:1/1;border-radius:16px;display:grid;place-items:center;overflow:hidden;background:rgba(148,163,184,.1);font-size:2rem;}
.moment-card small,.moment-card em{color:var(--muted);font-style:normal;}
.moment-page-head{margin-bottom:18px;}
.moment-page-head h1{margin:18px 0 6px;font-size:2rem;}
.moment-location{font-weight:800;color:#bfdbfe;}
.moment-items-grid{margin-bottom:30px;}
@media(max-width:720px){.moment-form-grid{grid-template-columns:1fr}.ig-highlight .story-ring.ig-highlight-circle .avatar{width:54px;height:54px}}

.moment-bulk-upload{margin:0 0 18px;padding:18px;}
.moment-bulk-upload h2{margin:0 0 6px;font-size:1.25rem;}
.moment-bulk-upload form{display:grid;gap:12px;margin-top:14px;}
.moment-bulk-upload input[type="text"],.moment-bulk-upload input[type="file"]{width:100%;margin-top:7px;}
.moment-bulk-upload .checkline{display:flex;align-items:center;gap:8px;font-weight:700;}

/* Fix: locked/coins/FSK18 images must stay blurred on profile hover. */
.ig-tile img.is-blurred,
.ig-tile:hover img.is-blurred {
    filter: blur(16px) brightness(.5);
}
.ig-tile:hover img.is-blurred {
    transform: scale(1.035);
}

.video-upload-page-form{margin-bottom:22px;}
.video-list-page{display:grid;gap:18px;margin-top:18px;}
.ig-tile-type-adult{right:auto;left:10px;}

/* Galerie-Bild: Kommentarbereich rechts unter den Bildinfos */
.gallery-comments-card{margin-top:14px;min-height:360px;display:flex;flex-direction:column;gap:14px}
.gallery-comments{display:flex;flex-direction:column;gap:10px;max-height:420px;overflow:auto;padding-right:4px}
.gallery-comment{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:12px}
.gallery-comment p{margin:0;line-height:1.45}
.gallery-comment-form{margin-top:auto;width:100%}
.gallery-comment-form input{flex:1;min-width:180px}

.profile-video-comments{margin-top:18px;border-top:1px solid rgba(148,163,184,.22);padding-top:16px;display:flex;flex-direction:column;gap:12px}
.profile-video-comments-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:2px}
.profile-video-comments .comments{display:flex;flex-direction:column;gap:10px;max-height:300px;overflow:auto;padding-right:4px}
.profile-video-comments .comment{background:rgba(15,23,42,.72);border:1px solid rgba(148,163,184,.16);border-radius:14px;padding:10px 12px}
.profile-video-comments .comment p{margin:6px 0 0;line-height:1.35}
.profile-video-comment-form{position:sticky;bottom:0;background:rgba(15,23,42,.96);padding-top:8px}
.profile-video-comments-locked{margin-top:14px;border-top:1px solid rgba(148,163,184,.18);padding-top:14px}

.feed-info-card{display:grid;gap:10px;margin-bottom:16px}
.feed-sentinel,.feed-end{margin:22px auto 8px;padding:14px 18px;text-align:center;border-radius:999px;background:rgba(15,23,42,.72);border:1px solid rgba(148,163,184,.18);max-width:360px;font-weight:800;color:var(--text)}
.feed-sentinel{cursor:pointer;box-shadow:0 14px 36px rgba(0,0,0,.18)}
.feed-sentinel:hover{border-color:rgba(96,165,250,.45)}
.feed-item .js-feed-autoplay{background:#000}
.feed-item .comment-form button:disabled,.feed-item .post-actions button:disabled{opacity:.65;cursor:wait}

/* Startseite bereinigt: Feed zeigt nur Inhalte, keine Promo-/Info-Boxen */
.feed-gallery-media{display:block;text-decoration:none;color:inherit;margin:15px -22px 4px;background:#020617;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.feed-gallery-media .post-image{display:block;width:100%;max-height:760px;object-fit:contain;margin:0 auto;background:#020617}
.feed-locked-wrap{border-radius:0;min-height:320px;display:grid;place-items:center;background:#020617}
.feed-locked-wrap .locked-media-image{max-height:760px;object-fit:contain}
.feed-locked-wrap .locked-media-overlay{color:#fff;pointer-events:none}
.feed-gallery-item .post-actions{margin-top:12px}
.feed-gallery-item img.is-blurred,
.feed-gallery-item:hover img.is-blurred{filter:blur(16px) brightness(.5)!important;transform:scale(1.02)}
@media(max-width:720px){.feed-gallery-media{margin-left:-18px;margin-right:-18px}.feed-locked-wrap{min-height:240px}}

/* TikTok Style Fullscreen Feed */
body:has(.tiktok-page) .main.container { max-width: none; width: 100%; padding: 0; }
.tiktok-page { position: relative; margin: -24px auto 0; min-height: calc(100vh - 72px); background: #050b18; }
.tiktok-top-actions { position: fixed; top: 86px; left: max(16px, calc((100vw - 520px) / 2 - 190px)); z-index: 30; }
.tiktok-feed { height: calc(100vh - 72px); overflow-y: auto; scroll-snap-type: y mandatory; scroll-behavior: smooth; background: #050b18; }
.tiktok-feed::-webkit-scrollbar { width: 0; height: 0; }
.tiktok-slide { position: relative; height: calc(100vh - 72px); max-width: 520px; margin: 0 auto; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #000; border-left: 1px solid rgba(255,255,255,.08); border-right: 1px solid rgba(255,255,255,.08); }
.tiktok-media-stage, .tiktok-locked-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; }
.tiktok-media { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tiktok-video { object-fit: contain; }
.tiktok-image { object-fit: contain; }
.tiktok-gradient { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.76) 100%); }
.tiktok-caption { position: absolute; left: 18px; right: 92px; bottom: 32px; z-index: 5; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.tiktok-caption p { margin: 8px 0 0; line-height: 1.35; }
.tiktok-author { color: #fff; font-weight: 800; text-decoration: none; }
.tiktok-actions { position: absolute; right: 14px; bottom: 86px; z-index: 7; display: flex; flex-direction: column; align-items: center; gap: 14px; color: #fff; }
.tiktok-actions .avatar { width: 54px; height: 54px; border-radius: 999px; border: 2px solid rgba(255,255,255,.82); }
.tiktok-action-form { margin: 0; }
.tiktok-action-form button, .tiktok-action-static { width: 58px; min-height: 58px; border: 0; border-radius: 999px; background: rgba(15,23,42,.72); color: #fff; font-size: 23px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; box-shadow: 0 12px 26px rgba(0,0,0,.28); cursor: pointer; }
.tiktok-action-form button span, .tiktok-action-static span { font-size: 12px; font-weight: 800; }
.tiktok-sound-toggle { position: absolute; top: 18px; right: 18px; z-index: 8; width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(15,23,42,.62); color: #fff; cursor: pointer; }
.tiktok-lock-overlay { position: relative; z-index: 4; margin: 20px; padding: 24px; border-radius: 22px; background: rgba(15,23,42,.82); color: #fff; text-align: center; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.tiktok-lock-overlay button { border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #7c3aed, #2563eb); cursor: pointer; }
.tiktok-comments-panel { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; max-height: 56%; overflow: auto; padding: 16px; background: rgba(8,13,28,.96); border-top: 1px solid rgba(255,255,255,.12); border-radius: 22px 22px 0 0; color: #fff; box-shadow: 0 -18px 60px rgba(0,0,0,.5); }
.tiktok-comments-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.tiktok-comments-head button { width: 34px; height: 34px; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: 22px; cursor: pointer; }
.tiktok-comments-panel .comment { background: rgba(255,255,255,.06); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.tiktok-comments-panel .comment p { margin: 4px 0 0; }
.tiktok-comments-panel .comment-form { display: flex; gap: 8px; margin-top: 12px; }
.tiktok-comments-panel .comment-form input { flex: 1; min-width: 0; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.08); color: #fff; border-radius: 12px; padding: 10px 12px; }
.tiktok-comments-panel .comment-form button { border: 0; border-radius: 12px; padding: 10px 14px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #7c3aed, #2563eb); }
.tiktok-sentinel { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 25; padding: 8px 12px; border-radius: 999px; color: #fff; background: rgba(15,23,42,.72); font-size: 13px; }
@media (max-width: 760px) {
  .tiktok-page { margin-top: -16px; }
  .tiktok-slide, .tiktok-feed { height: calc(100vh - 64px); }
  .tiktok-top-actions { top: 76px; left: 10px; }
  .tiktok-caption { left: 14px; right: 82px; bottom: 24px; }
  .tiktok-actions { right: 10px; bottom: 78px; }
}


/* Bild-Vergrößerung als Popup */
.js-image-lightbox-open{cursor:zoom-in;}
.image-lightbox{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:28px;}
.image-lightbox[hidden]{display:none!important;}
.image-lightbox-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.78);backdrop-filter:blur(10px);}
.image-lightbox-dialog{position:relative;z-index:1;width:min(94vw,1120px);max-height:92vh;border:1px solid rgba(148,163,184,.28);background:rgba(15,23,42,.92);border-radius:24px;box-shadow:0 28px 90px rgba(0,0,0,.55);padding:18px;display:flex;flex-direction:column;align-items:center;gap:10px;transform:scale(.96);opacity:0;transition:transform .16s ease,opacity .16s ease;}
.image-lightbox.is-open .image-lightbox-dialog{transform:scale(1);opacity:1;}
.image-lightbox-close{position:absolute;top:12px;right:12px;width:42px;height:42px;border-radius:999px;border:1px solid rgba(255,255,255,.14);background:rgba(15,23,42,.82);color:#fff;font-size:22px;font-weight:900;display:flex;align-items:center;justify-content:center;box-shadow:0 12px 30px rgba(0,0,0,.32);z-index:2;}
.image-lightbox-close:hover{transform:scale(1.05);}
.image-lightbox-dialog img{max-width:100%;max-height:82vh;object-fit:contain;border-radius:16px;background:#050b15;}
.image-lightbox-caption{width:100%;text-align:center;color:#cbd5e1;font-weight:700;padding:4px 48px 0;}
body.image-lightbox-open{overflow:hidden;}
@media (max-width:720px){.image-lightbox{padding:10px}.image-lightbox-dialog{width:96vw;padding:10px;border-radius:18px}.image-lightbox-dialog img{max-height:84vh}.image-lightbox-close{top:8px;right:8px;width:38px;height:38px}.image-lightbox-caption{padding:2px 44px 0;font-size:.92rem}}

.js-save-form{display:inline-flex;margin:0;}
.js-save-button{white-space:nowrap;}

.profile-video-actions{
    display:flex;
    justify-content:flex-start;
    gap:10px;
    margin:10px 0 14px;
}
.profile-video-actions .js-save-form{
    margin:0;
}
.profile-video-actions .js-save-button{
    border-radius:999px;
    padding:10px 16px;
}

.linked-accounts{
    margin-top:14px;
}
.linked-accounts > strong{
    display:block;
    margin-bottom:8px;
}
.linked-account-list{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.linked-account-pill{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 10px;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.12);
    color:inherit;
    text-decoration:none;
    transition:transform .15s ease, background .15s ease;
}
.linked-account-pill:hover{
    transform:translateY(-1px);
    background:rgba(255,255,255,.13);
}
.linked-account-pill .avatar{
    width:34px;
    height:34px;
}
.linked-account-pill span{
    display:flex;
    flex-direction:column;
    line-height:1.1;
}
.linked-account-pill small{
    color:var(--muted, #9fb0d0);
}

.locked-media-image,.is-blurred{user-select:none;-webkit-user-drag:none;}

/* Profil Medien-Popup: Bilder + Videos, Kommentare, Zoom und Navigation */
.profile-media-nav{position:fixed;top:50%;transform:translateY(-50%);z-index:2003;width:46px;height:64px;border-radius:999px;border:1px solid rgba(148,163,184,.3);background:rgba(15,23,42,.78);color:var(--text);font-size:2.4rem;line-height:1;cursor:pointer;display:grid;place-items:center;box-shadow:0 14px 40px rgba(0,0,0,.35);}
.profile-media-prev{left:18px;}
.profile-media-next{right:18px;}
.profile-media-nav:hover{background:rgba(30,41,59,.92);}
.profile-media-image-wrap{position:relative;margin-top:16px;display:grid;place-items:center;overflow:hidden;max-height:76vh;border-radius:18px;background:#000;touch-action:none;cursor:zoom-in;user-select:none;}
.profile-media-image{display:block;width:100%;max-height:76vh;object-fit:contain;transition:transform .08s linear;transform-origin:center center;will-change:transform;user-select:none;-webkit-user-drag:none;}
.profile-media-image-wrap.is-zoom-active{cursor:grab;}
.profile-media-image-wrap.is-zoom-active:active{cursor:grabbing;}
.profile-media-zoom-btn{min-height:38px;}
.profile-video-comments{margin-top:18px;border-top:1px solid rgba(148,163,184,.22);padding-top:16px;}
.profile-video-comments-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;}
.profile-video-comments .comments{display:grid;gap:12px;}
.profile-video-comments-locked{margin-top:14px;padding:14px;border:1px solid rgba(148,163,184,.2);border-radius:16px;background:rgba(15,23,42,.45);}
@media(max-width:800px){.profile-media-nav{width:40px;height:52px;font-size:2rem;background:rgba(15,23,42,.55)}.profile-media-prev{left:8px}.profile-media-next{right:8px}.profile-media-image-wrap{max-height:62vh}.profile-media-image{max-height:62vh}}

.profile-gallery-unlock-overlay{gap:10px;pointer-events:auto;}
.profile-gallery-unlock-overlay .locked-media-title{font-size:1.1rem;font-weight:900;color:#fff;}
.profile-gallery-unlock-form{justify-content:center;}
.profile-gallery-unlock-form button{min-height:42px;border-radius:999px;padding:0 18px;font-weight:900;}

.profile-video-actions .profile-media-like-form{
    margin:0;
}
.profile-video-actions .profile-media-like-form button{
    border-radius:999px;
    padding:10px 16px;
}
.profile-video-actions .profile-media-like-form button:disabled{
    opacity:.55;
    cursor:not-allowed;
}

/* Bild-Freischaltung im Profil-Popup oben aus der Zoom-Fläche herauslösen */
.profile-video-actions{flex-wrap:wrap;align-items:center;}
.profile-gallery-unlock-form-top{display:inline-flex;align-items:center;gap:8px;margin:0;position:relative;z-index:5;}
.profile-gallery-unlock-form-top .profile-gallery-unlock-status{font-size:.88rem;min-width:120px;}
.profile-gallery-unlock-hint{text-align:center;max-width:260px;line-height:1.35;}
@media(max-width:720px){.profile-gallery-unlock-form-top{width:100%;justify-content:flex-start}.profile-gallery-unlock-form-top .profile-gallery-unlock-status{width:100%;}}
.story-slide video.story-video{width:100%;height:100%;object-fit:contain;background:#050505;display:block;}

.story-sound-toggle{position:absolute;top:18px;right:58px;z-index:9;width:36px;height:36px;border-radius:999px;border:0;background:rgba(0,0,0,.45);color:#fff;font-size:1.05rem;line-height:1;cursor:pointer;display:grid;place-items:center;backdrop-filter:blur(8px);}
.story-sound-toggle[hidden]{display:none!important;}
.story-sound-toggle:hover{background:rgba(255,255,255,.18);}
@media(max-width:620px){.story-sound-toggle{top:16px;right:56px;}}

.follow-requests-card{margin:16px 0;padding:16px;}
.follow-requests-card h2{font-size:18px;margin:0 0 12px;}
.follow-request-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid rgba(255,255,255,.08);}
.follow-request-row:first-of-type{border-top:0;}
.follow-request-row>a{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit;font-weight:700;}
.follow-request-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.follow-request-actions form{margin:0;}
@media (max-width:640px){.follow-request-row{align-items:flex-start;flex-direction:column}.follow-request-actions{width:100%}.follow-request-actions form{flex:1}.follow-request-actions button{width:100%}}


.activity-card.is-unread {
    border-color: rgba(139, 92, 246, .65);
    background: linear-gradient(135deg, rgba(139, 92, 246, .18), rgba(14, 165, 233, .08)), var(--card);
    box-shadow: 0 16px 40px rgba(79, 70, 229, .16);
}
.activity-card.is-unread::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 0 5px rgba(139, 92, 246, .12);
    align-self: center;
    margin-right: 12px;
}
.activity-card.is-unread .post-header {
    flex: 1;
}
.activity-title {
    font-weight: 700;
}
.activity-new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
    vertical-align: middle;
}

.nav-activity-link,
nav a:has(.nav-badge) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-badge[hidden] {
    display: none !important;
}
.activity-new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg,var(--accent),var(--accent-2));
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
}


/* Sichtbarer roter Hinweis direkt neben Aktivität */
.nav-badge-notifications,
.nav-badge-messages {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: #ff2d55 !important;
    color: #fff !important;
    font-size: 12px;
    line-height: 18px;
    font-weight: 900;
    box-shadow: 0 0 0 2px rgba(255,45,85,.18), 0 8px 18px rgba(255,45,85,.35);
}
.nav-badge-notifications[hidden],
.nav-badge-messages[hidden] {
    display: none !important;
}

/* Mobile Optimierung für Nachrichten / Chat */
.mobile-chat-back{display:none;color:#c4b5fd;text-decoration:none;font-weight:900;white-space:nowrap;align-items:center;gap:6px;padding:8px 10px;border-radius:999px;background:rgba(124,58,237,.14);border:1px solid rgba(196,181,253,.18)}
@media (max-width: 760px){
  body:has(.messages-layout){overflow-x:hidden;}
  .messages-layout.card.surface{width:100vw;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);border-radius:0;border-left:0;border-right:0;min-height:calc(100dvh - 72px);display:flex;flex-direction:column;background:rgba(15,23,42,.45)}
  .messages-sidebar{padding:14px 12px 12px;min-height:auto;max-height:none;border-right:0;border-bottom:1px solid var(--line)}
  .messages-sidebar-head{align-items:center;margin-bottom:12px}.messages-sidebar-head h2{font-size:1.25rem}.messages-sidebar-head p{display:none}.icon-link{width:40px;height:40px;border-radius:999px}
  .messages-search-form{grid-template-columns:1fr auto;gap:8px;margin-bottom:10px}.messages-search-form input{min-width:0}.messages-search-form button{padding-left:12px;padding-right:12px}
  .messages-filter-bar{gap:8px;overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.messages-filter-chip{white-space:nowrap;padding:9px 12px}
  .messages-conversation-list{max-height:none;overflow:visible;padding-right:0;gap:8px}.conversation-card{padding:11px;border-radius:16px}.conversation-card .avatar{width:46px;height:46px}.conversation-content{min-width:0}.conversation-topline{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px}.conversation-time{font-size:.76rem}.conversation-subline{font-size:.78rem;margin:2px 0 5px}.conversation-preview{font-size:.88rem}.conversation-badge{min-width:24px;height:24px;font-size:.78rem}
  .messages-main{min-height:calc(100dvh - 72px);height:calc(100dvh - 72px);background:rgba(15,23,42,.28)}
  .messages-main.is-empty{min-height:46vh;height:auto;padding:24px 14px}.messages-empty-state{padding:18px 10px}.messages-empty-icon{width:58px;height:58px;border-radius:18px}
  .messages-main-head{position:sticky;top:0;z-index:20;display:flex!important;flex-direction:row!important;align-items:center!important;padding:10px 12px;background:rgba(7,17,31,.96);backdrop-filter:blur(12px)}
  .mobile-chat-back{display:inline-flex}.messages-main-head .message-user{min-width:0;flex:1}.messages-main-head .avatar-lg{width:42px;height:42px}.messages-main-head strong{display:block;max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-presence-row{margin-top:1px;font-size:.82rem}
  .messages-main-body{flex:1;min-height:0;padding:10px 10px 0;overflow:hidden}.messenger-chat-box{height:100%;min-height:0;max-height:none;overflow-y:auto;padding:8px 4px 18px;scroll-padding-bottom:120px}.chat-message{max-width:86%;padding:12px 14px;border-radius:18px}.chat-message.me{margin-left:auto;border-bottom-right-radius:6px}.chat-message.them{margin-right:auto;border-bottom-left-radius:6px}.chat-message .message-user{gap:8px}.chat-message .avatar{width:34px;height:34px}.chat-message p{overflow-wrap:anywhere}.chat-image,.chat-video{max-width:100%;max-height:52dvh;border-radius:14px}.chat-audio-card audio{width:100%}.chat-file-card{overflow-wrap:anywhere}
  .chat-typing-indicator,.chat-read-receipt{padding:4px 12px 6px;font-size:.82rem}.messenger-compose{position:sticky;bottom:0;z-index:25;padding:9px 10px calc(10px + env(safe-area-inset-bottom));background:rgba(7,17,31,.98);backdrop-filter:blur(14px)}.chat-drop-zone{padding:9px 10px;margin-bottom:8px;border-radius:14px;font-size:.9rem}.messenger-toolbar{gap:8px;margin-bottom:8px}.messenger-tool-btn{width:38px;height:38px;flex:0 0 auto}.compact-coin-field{height:38px;max-width:128px}.compact-coin-field input{width:56px;padding:8px 0}.messenger-compose textarea{min-height:48px;max-height:112px;font-size:16px;border-radius:16px;margin-bottom:8px}.messenger-compose-bottom{display:flex!important;flex-direction:row!important;align-items:flex-end!important;gap:8px}.messenger-compose-bottom>div{min-width:0;flex:1}.messenger-compose-bottom button{width:auto;min-width:84px;padding:12px 15px;border-radius:16px}.chat-attachment-name,#chatAttachmentName{font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.upload-status{padding:10px;border-radius:14px}.upload-status-head{font-size:.86rem}.upload-progress{height:10px}.chat-emoji-picker.is-floating{position:fixed;left:10px;right:10px;bottom:calc(154px + env(safe-area-inset-bottom));max-width:none;z-index:40}
  .topbar-inner{gap:10px}.topbar nav{overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}.topbar nav a{padding:8px 4px}
}
@media (max-width:760px){
  .messages-layout:has(.messages-main:not(.is-empty)) .messages-sidebar{display:none;}
  .messages-layout:has(.messages-main:not(.is-empty)){height:calc(100dvh - 72px);overflow:hidden;}
}
@media (max-width:420px){.chat-message{max-width:92%;}.messages-main-head strong{max-width:36vw}.messenger-compose-bottom button{min-width:76px;padding-left:12px;padding-right:12px}.messages-search-form{grid-template-columns:1fr}.messages-search-form button{width:100%}}
