/* Akamix – Indie / Midnight Arcade Zine */

:root {
    --bg: #0a0810;
    --bg-paper: #120e1a;
    --bg-card: #181222;
    --bg-input: #1f1830;
    --bg-hover: #2a2040;
    --bg-elevated: #14101c;

    --ink: #f2ebe0;
    --text: #f2ebe0;
    --text-muted: #9d8fb8;
    --text-dim: #5c5270;

    --coral: #ff6b5b;
    --violet: #c084fc;
    --mint: #5eecc8;
    --amber: #ffc857;

    --accent: var(--coral);
    --accent-2: var(--violet);
    --accent-hover: #e85545;
    --accent-soft: rgba(255, 107, 91, 0.12);
    --accent-glow: transparent;

    --cyan: var(--mint);
    --green: var(--mint);
    --red: #ff453a;
    --yellow: var(--amber);

    --border: #3d3255;
    --border-light: #4d4068;

    --shadow: 3px 3px 0 var(--violet);
    --shadow-sm: 2px 2px 0 var(--coral);

    --radius: 0;

    --font-display: 'Syne', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-body: 'DM Sans', sans-serif;
    --font: var(--font-body);

    --toolbar-h: 52px;
    --sidebar-w: 240px;
    --widgets-w: 280px;
    --mobile-nav-h: 56px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border-radius: var(--radius); }

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 60% 40% at 15% 20%, rgba(192, 132, 252, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 50% 35% at 85% 75%, rgba(255, 107, 91, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 50% 50%, rgba(94, 236, 200, 0.03) 0%, transparent 60%);
}

a { color: var(--coral); text-decoration: none; transition: color 0.12s; }
a:hover { color: var(--mint); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; border-radius: var(--radius); }
button { cursor: pointer; border: none; background: none; }

h1, h2, h3 { font-family: var(--font-display); }

/* ── App Shell ───────────────────────────────────────── */

.es-app {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    position: relative;
    z-index: 1;
}

.es-toolbar {
    position: sticky;
    top: 0;
    z-index: 200;
    height: calc(var(--toolbar-h) + var(--safe-top));
    padding-top: var(--safe-top);
    background: var(--bg-elevated);
    border-bottom: 3px solid var(--border);
    box-shadow: var(--shadow);
}

.es-toolbar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--toolbar-h);
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.es-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    flex-shrink: 0;
}

.es-logo__mark {
    width: 32px;
    height: 32px;
    background: var(--coral);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.9375rem;
    border: 2px solid var(--ink);
    box-shadow: var(--shadow-sm);
}

.es-logo__text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
    text-transform: lowercase;
}

.es-logo__dot { color: var(--coral); }

.es-search {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    padding: 0 12px;
    height: 36px;
    transition: border-color 0.12s, box-shadow 0.12s;
    font-family: var(--font-mono);
}

.es-search:focus-within {
    border-color: var(--mint);
    box-shadow: 0 0 0 1px var(--mint);
}

.es-search svg { color: var(--text-dim); flex-shrink: 0; }

.es-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
}

.es-search input::placeholder { color: var(--text-dim); }

.es-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.es-toolbar__btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    position: relative;
    text-decoration: none;
    border: 2px solid transparent;
    transition: color 0.12s, background 0.12s, border-color 0.12s;
}

.es-toolbar__btn:hover,
.es-toolbar__btn.active {
    background: var(--bg-hover);
    color: var(--ink);
    text-decoration: none;
    border-color: var(--border);
}

.es-toolbar__btn.active { color: var(--coral); }

.es-toolbar__btn--badge .es-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    background: var(--coral);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-elevated);
}

.es-toolbar__avatar {
    margin-left: 4px;
    text-decoration: none;
}

.es-toolbar__avatar .es-avatar {
    border: 2px solid var(--ink);
    box-shadow: var(--shadow-sm);
}

.es-layout {
    flex: 1;
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: calc(var(--mobile-nav-h) + var(--safe-bottom));
}

.es-sidebar, .es-widgets { display: none; }

.es-main {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: var(--bg-paper);
}

.es-stream {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* ── Mobile Nav (App Tab Bar) ────────────────────────── */

.es-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    background: var(--bg-elevated);
    border-top: 3px solid var(--border);
    height: calc(var(--mobile-nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    box-shadow: 0 -2px 0 var(--violet);
}

.es-mobile-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    padding: 6px 0 4px;
    position: relative;
    transition: color 0.12s, background 0.12s;
    border-right: 1px solid var(--border);
}

.es-mobile-nav__item:last-child { border-right: none; }

.es-mobile-nav__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: transparent;
    transition: background 0.12s;
}

.es-mobile-nav__item.active {
    color: var(--bg);
    background: var(--ink);
}

.es-mobile-nav__item.active::before {
    background: var(--coral);
}

.es-mobile-nav__item.active svg { stroke: var(--bg); }

.page-login .es-mobile-nav,
.page-register .es-mobile-nav,
.page-login .es-sidebar,
.page-register .es-sidebar,
.page-login .es-widgets,
.page-register .es-widgets { display: none !important; }

.page-login .es-main,
.page-register .es-main { padding-bottom: 0; }

/* ── Sidebar ─────────────────────────────────────────── */

.es-user-card {
    background: var(--bg-card);
    border: 2px solid var(--ink);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.es-user-card__cover {
    display: block;
    height: 72px;
    background: linear-gradient(135deg, var(--violet) 0%, var(--coral) 100%);
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid var(--border);
    text-decoration: none;
}

.es-user-card__body {
    padding: 0 14px 16px;
    margin-top: -30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.es-user-card__avatar {
    display: inline-flex;
    line-height: 0;
    border: 3px solid var(--bg-card);
    box-shadow: var(--shadow-sm);
    background: var(--bg-card);
    text-decoration: none;
}

.es-user-card__avatar .es-avatar,
.es-user-card__avatar .es-avatar--img {
    display: block;
}

.es-user-card__name {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9375rem;
    margin-top: 10px;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.es-user-card__name:hover { color: var(--coral); }

.es-user-card__role {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    color: var(--text-dim);
    margin-top: 6px;
    display: inline-block;
    padding: 3px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.es-nav {
    background: var(--bg-card);
    border: 2px solid var(--border);
    padding: 4px 0;
}

.es-nav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.12s;
}

.es-nav__item:hover { background: var(--bg-hover); color: var(--ink); text-decoration: none; }

.es-nav__item.active {
    background: var(--accent-soft);
    color: var(--coral);
    border-left-color: var(--coral);
    text-decoration: none;
}

.es-nav__divider { height: 2px; background: var(--border); margin: 6px 14px; }

.es-nav__label {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 14px 4px;
}

.es-nav__sub {
    display: block;
    padding: 6px 14px 6px 28px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.12s;
}

.es-nav__sub:hover { color: var(--ink); text-decoration: none; }

/* ── Widgets ─────────────────────────────────────────── */

.es-widget {
    background: var(--bg-card);
    border: 2px solid var(--border);
    margin-bottom: 12px;
}

.es-widget__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 2px solid var(--border);
}

.es-widget__head h3 {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    position: relative;
    padding-bottom: 4px;
}

.es-widget__head h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--coral);
}

.es-widget__meta {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-dim);
}

.es-widget__link {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--coral);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.es-online-list { list-style: none; }

.es-online-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: background 0.12s;
}

.es-online-list li a:hover { background: var(--bg-hover); text-decoration: none; }

.es-online-dot {
    width: 6px;
    height: 6px;
    background: var(--mint);
    margin-left: auto;
}

.es-suggest-list { list-style: none; }

.es-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.es-suggest-item:last-child { border-bottom: none; }

.es-suggest-item__user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}

.es-suggest-item__user strong { display: block; font-size: 0.8125rem; }
.es-suggest-item__user small { display: block; font-size: 0.6875rem; color: var(--text-dim); }

.es-event-list { list-style: none; }

.es-event-list li a {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: background 0.12s;
}

.es-event-list li:last-child a { border-bottom: none; }
.es-event-list li a:hover { background: var(--bg-hover); text-decoration: none; }

.es-event-list__date {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    color: var(--violet);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.es-event-list__title { display: block; font-size: 0.8125rem; font-weight: 600; margin: 2px 0; }
.es-event-list__meta { display: block; font-size: 0.6875rem; color: var(--text-dim); }

.es-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; }

.es-tag {
    padding: 4px 8px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.12s;
    transform: rotate(-1deg);
}

.es-tag:hover {
    border-color: var(--coral);
    color: var(--coral);
    text-decoration: none;
    transform: rotate(1deg) translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ── Avatar ──────────────────────────────────────────── */

.es-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--avatar-size, 40px);
    height: var(--avatar-size, 40px);
    background: var(--avatar-color, var(--coral));
    color: var(--bg);
    font-weight: 600;
    font-size: calc(var(--avatar-size, 40px) * 0.38);
    flex-shrink: 0;
    border: 2px solid var(--ink);
    object-fit: cover;
}

.es-avatar--img {
    display: inline-block;
    background: var(--bg-input);
}

/* ── Buttons ─────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.8125rem;
    border: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.08s, box-shadow 0.12s;
}

.btn--primary {
    background: var(--coral);
    color: var(--bg);
    border-color: var(--coral);
    box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    text-decoration: none;
}

.btn--primary:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.btn--primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn--outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--border-light);
}

.btn--outline:hover {
    border-color: var(--coral);
    color: var(--coral);
    text-decoration: none;
}

.btn--ghost { background: transparent; color: var(--text-muted); }
.btn--ghost:hover { background: var(--bg-hover); text-decoration: none; }

.btn--sm { padding: 6px 12px; font-size: 0.75rem; }
.btn--xs { padding: 4px 10px; font-size: 0.6875rem; }
.btn--lg { padding: 11px 20px; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* ── Page Title ──────────────────────────────────────── */

.es-page-title {
    padding: 16px;
    border-bottom: 2px solid var(--border);
    background: var(--bg-elevated);
}

.es-page-title h1 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.es-page-title p {
    font-size: 0.8125rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.es-page-title--row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.es-live-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--bg);
    background: var(--mint);
    padding: 2px 8px;
    border: 2px solid var(--mint);
    vertical-align: middle;
    margin-left: 8px;
    animation: es-live-pulse 2s ease infinite;
}

/* ── Story Form ──────────────────────────────────────── */

.es-story-form {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
}

.es-story-form__head { padding: 14px 16px; }

.es-story-form__user { display: flex; align-items: center; gap: 12px; }

.es-story-form__trigger {
    flex: 1;
    text-align: left;
    background: var(--bg-input);
    border: 2px solid var(--border);
    padding: 10px 14px;
    color: var(--text-dim);
    font-size: 0.875rem;
    transition: border-color 0.12s;
    min-width: 0;
}

.es-story-form__trigger-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.es-story-form__trigger:hover { border-color: var(--border-light); color: var(--text-muted); }

.es-story-form__types {
    display: flex;
    border-top: 2px solid var(--border);
}

.es-story-form__types--modal { margin-bottom: 16px; border: 2px solid var(--border); }

.es-story-type {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-right: 1px solid var(--border);
    transition: all 0.12s;
}

.es-story-type:last-child { border-right: none; }
.es-story-type svg { color: var(--text-muted); }
.es-story-type:hover { background: var(--bg-hover); color: var(--text-muted); }
.es-story-type.active { background: var(--accent-soft); color: var(--coral); }
.es-story-type.active svg { color: var(--coral); }

/* ── Stream Filters ──────────────────────────────────── */

.es-stream-filters,
.es-filter-bar {
    display: flex;
    gap: 0;
    background: var(--bg-elevated);
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.es-stream-filters::-webkit-scrollbar,
.es-filter-bar::-webkit-scrollbar { display: none; }

.es-filter {
    flex-shrink: 0;
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    border-right: 1px solid var(--border);
    white-space: nowrap;
    transition: all 0.12s;
    position: relative;
}

.es-filter:last-child { border-right: none; }
.es-filter:hover { color: var(--text-muted); background: var(--bg-hover); }

.es-filter.active {
    color: var(--coral);
    background: var(--accent-soft);
}

.es-filter.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--coral);
}

.es-search--page {
    display: flex;
    max-width: none;
    margin: 0;
    height: 44px;
    border-left: none;
    border-right: none;
    border-top: none;
}

/* ── Stream Items ────────────────────────────────────── */

.es-stream-list { display: flex; flex-direction: column; }

.es-stream-item {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    border-left: 4px solid var(--coral);
    position: relative;
    box-shadow: var(--shadow-sm);
    margin: 0 0 -2px;
}

.es-stream-item--new {
    animation: es-post-in 0.6s ease;
    background: rgba(255, 107, 91, 0.06);
}

@keyframes es-post-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.es-stream-item__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 8px;
}

.es-stream-item__avatar { flex-shrink: 0; text-decoration: none; }

.es-stream-item__meta { flex: 1; min-width: 0; }

.es-stream-item__author {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--ink);
    text-decoration: none;
}

.es-stream-item__author:hover { color: var(--coral); text-decoration: none; }

.es-stream-item__time {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-dim);
    margin-top: 1px;
}

.es-stream-item__menu {
    color: var(--text-dim);
    font-size: 1.125rem;
    padding: 4px 8px;
    border: 2px solid transparent;
    transition: all 0.12s;
}

.es-stream-item__menu:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    color: var(--ink);
}

.es-stream-item__body { padding: 0 16px 12px; }

.es-stream-item__text {
    font-size: 0.875rem;
    line-height: 1.6;
    word-break: break-word;
    color: var(--text);
}

.es-stream-item__media {
    margin-top: 10px;
    border: 2px solid var(--ink);
    overflow: hidden;
}

.es-stream-item__media img { width: 100%; }

.es-stream-item__media-ph {
    aspect-ratio: 16/9;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 1.25rem;
}

.es-link-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 12px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.es-link-box:hover {
    border-color: var(--violet);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.es-link-box__icon { font-size: 1.25rem; }
.es-link-box strong { display: block; font-size: 0.8125rem; }
.es-link-box span { display: block; font-size: 0.6875rem; color: var(--text-dim); margin-top: 2px; }

.es-stream-item__stats {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

.es-stream-item__actions { display: flex; border-top: 2px solid var(--border); }

.es-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    border-right: 1px solid var(--border);
    transition: all 0.12s;
}

.es-action:last-child { border-right: none; }
.es-action:hover { background: var(--bg-hover); color: var(--text-muted); }
.es-action.active { color: var(--coral); background: var(--accent-soft); }

.es-reactions {
    position: absolute;
    bottom: 48px;
    left: 16px;
    display: none;
    gap: 0;
    background: var(--bg-card);
    border: 2px solid var(--ink);
    padding: 4px;
    z-index: 10;
    box-shadow: var(--shadow);
}

.es-reactions.is-open { display: flex; }

.es-reactions[hidden] { display: none !important; }
.es-comments[hidden] { display: none !important; }
.es-mod-dropdown[hidden] { display: none !important; }

.es-reactions button { font-size: 1.25rem; padding: 4px 6px; transition: background 0.1s; }
.es-reactions button:hover { background: var(--bg-hover); }

/* ── Profile ─────────────────────────────────────────── */

.es-profile { padding: 0 !important; background: transparent !important; border: none !important; }

.es-profile-cover {
    position: relative;
}

.es-profile-cover__img {
    height: 180px;
    background: var(--bg-input) center / cover no-repeat;
    border-bottom: 2px solid var(--border);
}

.es-profile-cover__edit {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
}

.es-profile-cover__edit input { display: none; }

.es-profile-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    padding: 0 16px;
    margin-top: -48px;
}

.es-profile-head__avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.es-profile-head__avatar {
    border: 3px solid var(--ink);
    line-height: 0;
    box-shadow: var(--shadow);
}

.es-profile-head__avatar-edit {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.12s;
}

.es-profile-head__avatar-edit:hover {
    color: var(--ink);
    border-color: var(--coral);
}

.es-profile-head__avatar-edit input { display: none; }

.es-profile-head__info {
    flex: 1;
    min-width: 0;
}

.es-profile-head__info h1 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 800;
    margin-top: 8px;
    letter-spacing: -0.02em;
}

.es-profile-head__info > p {
    font-size: 0.8125rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.es-profile-head__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-dim);
}

.es-profile-head__actions {
    margin-left: auto;
    padding-bottom: 4px;
}

.es-profile-about {
    margin: 12px 16px 0;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 2px solid var(--ink);
    font-size: 0.875rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.es-profile-stats {
    display: flex;
    margin: 12px 16px 0;
    background: var(--bg-card);
    border: 2px solid var(--border);
}

.es-profile-stats > div {
    flex: 1;
    text-align: center;
    padding: 12px 6px;
    border-right: 1px solid var(--border);
}

.es-profile-stats > div:last-child { border-right: none; }

.es-profile-stats strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--ink);
}

.es-profile-stats span {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.es-profile-nav {
    display: flex;
    overflow-x: auto;
    margin: 12px 16px 0;
    background: var(--bg-card);
    border: 2px solid var(--border);
    -webkit-overflow-scrolling: touch;
}

.es-profile-nav__item {
    flex-shrink: 0;
    padding: 11px 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    border-right: 1px solid var(--border);
    transition: all 0.12s;
    position: relative;
}

.es-profile-nav__item.active { color: var(--coral); }

.es-profile-nav__item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--coral);
}

.es-profile-feed { padding: 0; display: flex; flex-direction: column; }

.es-profile-panels { display: block; }

.es-profile-panel[hidden] { display: none !important; }

.es-profile-details {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.es-profile-details__section h3 {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--coral);
    display: inline-block;
}

.es-profile-details__section p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.es-profile-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.es-profile-photo {
    aspect-ratio: 1;
    border-right: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    overflow: hidden;
    background: var(--bg-input);
}

.es-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.es-profile-photo__ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-dim);
}

.es-profile-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.es-profile-form__media {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
}

.es-profile-form__avatar,
.es-profile-form__banner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.es-profile-form__banner-preview {
    width: 100%;
    height: 72px;
    background: var(--bg-input) center / cover no-repeat;
    border: 2px solid var(--border);
}

.es-profile-form label.btn input { display: none; }

.es-modal__box--profile { max-width: 520px; }

.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    color: var(--text);
    outline: none;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.12s;
}

.form-group textarea:focus { border-color: var(--coral); }

.es-modal__close {
    font-size: 1.5rem;
    color: var(--text-dim);
    padding: 4px 8px;
    line-height: 1;
}

.es-modal__close:hover { color: var(--ink); }

@media (max-width: 899px) {
    .es-profile-form__media { grid-template-columns: 1fr; }
    .es-profile-photos { grid-template-columns: repeat(2, 1fr); }
}

/* ── People & Groups ─────────────────────────────────── */

.es-people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0;
}

.es-person-card {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    border-right: 2px solid var(--border);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    min-width: 0;
}

.es-person-card__cover {
    display: block;
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--violet) 0%, var(--coral) 50%, var(--mint) 100%);
    border-bottom: 2px solid var(--border);
    opacity: 0.75;
    flex-shrink: 0;
}

.es-person-card__avatar {
    display: inline-flex;
    margin-top: -28px;
    position: relative;
    z-index: 1;
    border: 2px solid var(--bg-card);
    flex-shrink: 0;
}

.es-person-card__name {
    display: block;
    font-weight: 600;
    font-size: 0.8125rem;
    margin-top: 6px;
    padding: 0 10px;
    color: var(--ink);
    text-decoration: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.es-person-card__bio {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-dim);
    margin: 2px 0;
    padding: 0 10px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.es-person-card__meta {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    padding: 0 10px;
}

.es-person-card .btn {
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.es-groups-grid {
    display: flex;
    flex-direction: column;
}

.es-group-card {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    border-left: 4px solid var(--violet);
}

.es-group-card__cover {
    height: 72px;
    background: var(--bg-input);
    border-bottom: 2px solid var(--border);
}

.es-group-card__body { padding: 14px 16px; }

.es-group-card__cat {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    color: var(--violet);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.es-group-card h3 { font-size: 0.9375rem; margin: 4px 0 6px; font-weight: 600; }
.es-group-card p { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; }

.es-group-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-dim);
}

/* ── Events, Explore, Auth, Modal, Empty ───────────── */

.filter-pills {
    display: flex;
    gap: 0;
    overflow-x: auto;
    background: var(--bg-elevated);
    border-bottom: 2px solid var(--border);
}

.filter-pill {
    flex-shrink: 0;
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    border-right: 1px solid var(--border);
    white-space: nowrap;
    transition: all 0.12s;
    position: relative;
}

.filter-pill.active { color: var(--coral); background: var(--accent-soft); }

.filter-pill.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--coral);
}

.filter-pill:hover { color: var(--text-muted); background: var(--bg-hover); }

.events-list__grid { display: flex; flex-direction: column; }

.events-featured {
    padding: 16px;
    border-bottom: 2px solid var(--border);
}

.events-featured__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.events-list__header {
    padding: 16px 16px 0;
}

.event-card {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: background 0.12s, box-shadow 0.12s;
    position: relative;
}

.event-card:hover {
    background: var(--bg-hover);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.event-card--featured {
    border-left: 4px solid var(--amber);
}

.event-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bg);
    background: var(--amber);
    padding: 2px 8px;
    border: 2px solid var(--amber);
}

.event-card__date-block {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: var(--bg-input);
    border: 2px solid var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.event-card__day {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
}

.event-card__month {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.event-card__info { flex: 1; min-width: 0; }

.event-card__category {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    color: var(--violet);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.event-card__title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 4px 0;
}

.event-card__summary {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 6px;
}

.event-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-dim);
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
}

.empty-state__icon { font-size: 2rem; margin-bottom: 12px; opacity: 0.5; }

.empty-state h2 {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.empty-state p { color: var(--text-dim); font-size: 0.8125rem; }

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100dvh - var(--toolbar-h));
    padding: 24px 16px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 32px 24px;
    background: var(--bg-card);
    border: 2px solid var(--ink);
    box-shadow: var(--shadow);
}

.auth-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    text-decoration: none;
}

.auth-card__logo:hover { text-decoration: none; }

.auth-card h1 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.02em;
}

.auth-card__sub {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8125rem;
    margin: 8px 0 24px;
}

.auth-card__footer { text-align: center; margin-top: 20px; font-size: 0.8125rem; color: var(--text-muted); }
.auth-card__footer a { font-weight: 600; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    color: var(--text);
    outline: none;
    transition: border-color 0.12s;
}

.form-group input:focus { border-color: var(--coral); }

.alert--error {
    background: rgba(255, 69, 58, 0.1);
    color: var(--red);
    border: 2px solid rgba(255, 69, 58, 0.3);
    padding: 10px 12px;
    font-size: 0.8125rem;
    margin-bottom: 14px;
}

.es-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

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

.es-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 16, 0.85);
}

.es-modal__box {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: 90dvh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 2px solid var(--ink);
    border-bottom: none;
    box-shadow: var(--shadow);
}

.es-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 2px solid var(--border);
}

.es-modal__head h2 {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
}

.es-modal__body { padding: 16px; }

.es-modal__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 2px solid var(--border);
}

.es-composer-body { display: flex; flex-direction: column; gap: 12px; }

.es-composer-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.es-composer-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.9375rem;
    line-height: 1.6;
    resize: none;
    outline: none;
    min-height: 120px;
}

.es-composer-tools {
    display: flex;
    gap: 4px;
    padding-top: 12px;
    border-top: 2px solid var(--border);
}

.es-composer-tools button {
    padding: 7px 10px;
    font-size: 0.9375rem;
    border: 2px solid var(--border);
    background: var(--bg-input);
    transition: all 0.12s;
}

.es-composer-tools button:hover {
    border-color: var(--violet);
    background: var(--bg-hover);
}

.es-privacy-select {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    outline: none;
}

.es-privacy-select:focus { border-color: var(--coral); }

.es-empty {
    text-align: center;
    padding: 48px 24px;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
}

.es-empty__icon { font-size: 2rem; margin-bottom: 12px; opacity: 0.5; }

.es-empty h2 {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.es-empty p { color: var(--text-dim); font-size: 0.8125rem; margin-bottom: 16px; }

/* ── Comments ──────────────────────────────────────── */

.es-comments {
    border-top: 2px solid var(--border);
    padding: 12px 16px;
    background: var(--bg-elevated);
}

.es-comments__list { margin-bottom: 10px; max-height: 280px; overflow-y: auto; }
.es-comments__empty { font-size: 0.75rem; color: var(--text-dim); padding: 6px 0; }

.es-comment {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.es-comment:last-child { border-bottom: none; }
.es-comment__body { flex: 1; font-size: 0.8125rem; }
.es-comment__body strong { font-weight: 600; }

.es-comment__time {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    color: var(--text-dim);
    margin-left: 6px;
}

.es-comment__body p { margin-top: 2px; color: var(--text-muted); line-height: 1.5; }

.es-comments__form { display: flex; align-items: center; gap: 8px; }

.es-comments__form input {
    flex: 1;
    padding: 9px 12px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    color: var(--text);
    outline: none;
    transition: border-color 0.12s;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.es-comments__form input:focus { border-color: var(--coral); }

/* ── Moderation ──────────────────────────────────────── */

.es-mod-banner {
    background: var(--amber);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 16px;
    text-align: center;
}

.es-stream-item--hidden { border-left-color: var(--amber); opacity: 0.85; }
.es-mod-menu { position: relative; }

.es-mod-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 50;
    background: var(--bg-card);
    border: 2px solid var(--ink);
    min-width: 160px;
    box-shadow: var(--shadow);
}

.es-mod-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    font-size: 0.8125rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}

.es-mod-dropdown button:hover { background: var(--bg-hover); }
.es-mod-dropdown button[data-mod-action="delete"] { color: var(--red); }

.es-mod-table-wrap { overflow-x: auto; border: 2px solid var(--border); }

.es-mod-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }

.es-mod-table th {
    background: var(--bg-input);
    text-align: left;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    border-bottom: 2px solid var(--border);
}

.es-mod-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.es-mod-table tr.is-hidden { background: rgba(255, 200, 87, 0.06); }

.es-mod-status {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.es-mod-actions { white-space: nowrap; }

.es-mod-delete:hover { border-color: var(--red) !important; color: var(--red) !important; }

/* ── Toast ───────────────────────────────────────────── */

.es-toast-container {
    position: fixed;
    top: calc(var(--toolbar-h) + var(--safe-top) + 10px);
    right: 12px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.es-toast {
    padding: 11px 16px;
    background: var(--bg-card);
    border: 2px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 240px;
    max-width: 360px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    pointer-events: auto;
    box-shadow: var(--shadow-sm);
}

.es-toast.is-visible { opacity: 1; transform: translateY(0); }
.es-toast--success { border-left: 4px solid var(--mint); }
.es-toast--error { border-left: 4px solid var(--red); }
.es-toast--warn { border-left: 4px solid var(--amber); }
.es-toast--info { border-left: 4px solid var(--coral); }

.es-live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--mint);
    margin-left: 8px;
    vertical-align: middle;
    animation: es-live-pulse 2s ease infinite;
}

@keyframes es-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.es-comment__delete {
    position: absolute;
    top: 6px;
    right: 0;
    color: var(--text-dim);
    font-size: 1rem;
    padding: 2px 6px;
}

.es-comment__delete:hover { color: var(--red); }

#topnav, #headline, hr, input._post_token { display: none !important; }

/* ── Desktop ─────────────────────────────────────────── */

@media (min-width: 900px) {
    .es-mobile-nav { display: none; }
    .es-layout { padding-bottom: 0; }

    .es-sidebar {
        display: block;
        width: var(--sidebar-w);
        flex-shrink: 0;
        padding: 16px 0 16px 16px;
        position: sticky;
        top: calc(var(--toolbar-h) + var(--safe-top));
        height: calc(100dvh - var(--toolbar-h) - var(--safe-top));
        overflow-y: auto;
    }

    .es-widgets {
        display: block;
        width: var(--widgets-w);
        flex-shrink: 0;
        padding: 16px 16px 16px 0;
        position: sticky;
        top: calc(var(--toolbar-h) + var(--safe-top));
        height: calc(100dvh - var(--toolbar-h) - var(--safe-top));
        overflow-y: auto;
    }

    .es-main {
        padding: 0;
        border-left: 2px solid var(--border);
        border-right: 2px solid var(--border);
    }

    .es-stream-list { gap: 0; }

    .es-people-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
        padding: 16px;
    }

    .es-person-card {
        border: 2px solid var(--border);
        box-shadow: var(--shadow-sm);
    }

    .es-groups-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 12px;
        padding: 16px;
    }

    .es-group-card {
        border: 2px solid var(--border);
        box-shadow: var(--shadow-sm);
    }

    .es-profile-feed { padding: 16px; gap: 0; }

    .events-list__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .events-featured__grid { grid-template-columns: repeat(3, 1fr); }

    .es-modal {
        align-items: center;
        padding: 20px;
    }

    .es-modal__box { border-bottom: 2px solid var(--ink); }
}

@media (max-width: 899px) {
    .es-toolbar .es-search { display: none; }
    .es-logo__text { display: none; }
    .es-toolbar { box-shadow: none; }

    .es-toolbar__actions .es-toolbar__btn:not(.es-toolbar__btn--badge):not(.es-toolbar__avatar) {
        display: none;
    }

    .es-toast-container {
        left: 12px;
        right: 12px;
    }

    .es-toast { max-width: none; }

    /* iOS: kein Auto-Zoom bei Inputs (min. 16px) */
    input,
    textarea,
    select,
    .es-story-form__trigger,
    .es-composer-input,
    .es-comments__form input {
        font-size: 16px;
    }

    /* Feed & Posts – cleaner mobile layout */
    .es-stream-item {
        margin: 0;
        border-left: none;
        box-shadow: none;
    }

    .es-stream-item__head { padding: 12px 14px 6px; }
    .es-stream-item__body { padding: 0 14px 12px; }
    .es-stream-item__text { font-size: 0.9375rem; line-height: 1.65; }

    .es-stream-item__media {
        margin-left: -14px;
        margin-right: -14px;
        border-left: none;
        border-right: none;
    }

    .es-action {
        padding: 14px 6px;
        min-height: 48px;
        font-size: 0.6875rem;
    }

    .es-action svg { width: 20px; height: 20px; }

    /* Composer inline */
    .es-story-form__head { padding: 12px 14px; }

    .es-story-form__trigger {
        min-height: 44px;
        padding: 11px 14px;
    }

    .es-story-form__types {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .es-story-form__types::-webkit-scrollbar { display: none; }

    .es-story-type {
        flex: 0 0 auto;
        min-width: 68px;
        padding: 10px 8px;
    }

    /* Composer modal – fullscreen sheet */
    body.es-modal-open {
        overflow: hidden;
        touch-action: none;
    }

    .es-modal {
        align-items: stretch;
        padding: 0;
    }

    .es-modal__box {
        max-height: none;
        height: 100dvh;
        height: 100svh;
        display: flex;
        flex-direction: column;
        border-bottom: 2px solid var(--ink);
        padding-bottom: var(--safe-bottom);
    }

    .es-modal__body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .es-modal__foot {
        flex-shrink: 0;
        padding-bottom: calc(12px + var(--safe-bottom));
    }

    .es-composer-input {
        min-height: 140px;
        font-size: 16px;
        line-height: 1.65;
    }

    .es-story-form__types--modal {
        flex-shrink: 0;
        overflow-x: auto;
    }

    .es-page-title { padding: 14px; }
    .es-page-title h1 { font-size: 1.0625rem; }

    .es-filter,
    .filter-pill {
        padding: 12px 14px;
        min-height: 44px;
    }
}

/* ── Explore Page ────────────────────────────────────── */

.explore-section {
    padding: 16px;
    border-bottom: 2px solid var(--border);
}

.section-title {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 12px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--violet);
    display: inline-block;
}

.hashtag-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: 2px solid var(--border);
}

.hashtag-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    background: var(--bg-card);
    border-right: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: background 0.12s, box-shadow 0.12s;
}

.hashtag-card:nth-child(2n) { border-right: none; }

.hashtag-card:hover {
    background: var(--bg-hover);
    text-decoration: none;
    box-shadow: inset 4px 0 0 var(--coral);
}

.hashtag-card__tag { font-size: 0.8125rem; font-weight: 600; color: var(--coral); }
.hashtag-card__count { font-family: var(--font-mono); font-size: 0.625rem; color: var(--text-dim); }

.profile-suggestions { display: flex; flex-direction: column; }

.profile-suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.profile-suggestion:last-child { border-bottom: none; }

.profile-suggestion .avatar,
.profile-suggestion .es-avatar { flex-shrink: 0; }

.profile-suggestion__info { flex: 1; min-width: 0; }
.profile-suggestion__name { display: block; font-size: 0.8125rem; font-weight: 600; }
.profile-suggestion__bio { display: block; font-size: 0.6875rem; color: var(--text-dim); margin-top: 1px; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 2px solid var(--border);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--bg-card);
    border-right: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: background 0.12s, box-shadow 0.12s;
}

.category-card:nth-child(3n) { border-right: none; }

.category-card:hover {
    background: var(--bg-hover);
    text-decoration: none;
    box-shadow: inset 0 -3px 0 var(--cat-color, var(--coral));
}

.category-card__icon { font-size: 1.25rem; }

.category-card__label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--avatar-size, 40px);
    height: var(--avatar-size, 40px);
    background: var(--avatar-color, var(--coral));
    color: var(--bg);
    font-weight: 600;
    font-size: calc(var(--avatar-size, 40px) * 0.38);
    flex-shrink: 0;
    border: 2px solid var(--ink);
}

/* ── Story Bar ───────────────────────────────────────── */

.story-bar {
    background: var(--bg-elevated);
    border-bottom: 2px solid var(--border);
    padding: 12px 0;
}

.story-bar__scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.story-bar__scroll::-webkit-scrollbar { display: none; }

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    width: 64px;
    background: none;
    border: none;
    cursor: pointer;
}

.story-item__ring {
    width: 56px;
    height: 56px;
    border: 2px solid var(--border-light);
    padding: 2px;
}

.story-item__ring--active {
    border-color: var(--story-color, var(--coral));
    box-shadow: var(--shadow-sm);
}

.story-item__avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--bg);
}

.story-item__avatar--add {
    background: var(--bg-input);
    color: var(--text-muted);
}

.story-item__name {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    color: var(--text-dim);
    text-align: center;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-viewer {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-viewer[hidden] { display: none; }

.story-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: #000;
}

.story-viewer__content {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 100%;
    max-height: 100dvh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    border: 2px solid var(--ink);
}

.story-viewer__progress {
    height: 3px;
    background: var(--border);
}

.story-viewer__progress-bar {
    height: 100%;
    width: 40%;
    background: var(--coral);
}

.story-viewer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.story-viewer__user { display: flex; align-items: center; gap: 8px; }

.story-viewer__avatar {
    width: 32px;
    height: 32px;
    background: var(--coral);
    border: 2px solid var(--ink);
}

.story-viewer__name { font-size: 0.8125rem; font-weight: 600; }

.story-viewer__close {
    font-size: 1.5rem;
    color: var(--text-muted);
    padding: 4px 8px;
}

.story-viewer__body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-viewer__placeholder {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.875rem;
}

@media (min-width: 900px) {
    .hashtag-grid { grid-template-columns: repeat(4, 1fr); }
    .hashtag-card:nth-child(2n) { border-right: 2px solid var(--border); }
    .hashtag-card:nth-child(4n) { border-right: none; }
    .category-grid { grid-template-columns: repeat(6, 1fr); }
    .category-card:nth-child(3n) { border-right: 2px solid var(--border); }
    .category-card:nth-child(6n) { border-right: none; }
}
