:root {
    color-scheme: dark;
    --background: #2A1F25;
    --card: #44353D;
    --accent: #D79AAE;
    --text: #E3DAD8;
    --muted: #A89AA0;
    --deep: #32252B;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--background);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.messages {
    position: fixed;
    z-index: 100;
    top: 14px;
    left: 50%;
    width: min(92%, 520px);
    transform: translateX(-50%);
}

.message {
    padding: 12px 15px;
    border: 1px solid var(--accent);
    border-radius: 14px;
    background: var(--card);
}

.desktop-shell {
    display: grid;
    grid-template-columns: 168px 500px 250px;
    gap: 18px;
    width: 954px;
    margin: 16px auto;
    align-items: start;
}

.sidebar-card,
.feed-panel,
.right-profile,
.right-card {
    border-radius: 22px;
    background: var(--card);
}

.sidebar-card {
    position: sticky;
    top: 16px;
    display: flex;
    min-height: 585px;
    flex-direction: column;
    padding: 20px 14px 14px;
}

.sidebar-brand {
    display: grid;
    gap: 4px;
    padding: 0 8px 22px;
}

.sidebar-brand small {
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.sidebar-brand strong {
    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 500;
}

.sidebar-brand span {
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
}

.sidebar-nav a {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 11px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.sidebar-nav a.active {
    background: var(--accent);
    color: var(--background);
}

.sidebar-nav svg {
    width: 16px;
    height: 16px;
}

.privacy-card {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 9px;
    margin-top: auto;
    padding: 13px 10px;
    border-radius: 15px;
    background: var(--deep);
}

.privacy-symbol {
    color: var(--accent);
    font-size: 20px;
}

.privacy-card strong {
    font-size: 11px;
}

.privacy-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.feed-panel {
    min-height: 585px;
    overflow: hidden;
}

.feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 57px;
    padding: 10px 15px;
    border-bottom: 1px solid var(--background);
}

.feed-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feed-brand img,
.feed-brand > .avatar-letter {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-letter {
    display: inline-grid;
    place-items: center;
    background: var(--deep);
    color: var(--accent);
    font-family: Georgia, serif;
    font-weight: 700;
}

.feed-brand div {
    display: grid;
    gap: 2px;
}

.feed-brand small {
    color: var(--muted);
    font-size: 8px;
}

.feed-brand strong {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 500;
}

.header-buttons {
    display: flex;
    gap: 6px;
}

.header-buttons button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--background);
    border-radius: 10px;
    background: var(--card);
    color: var(--accent);
}

.header-buttons svg {
    width: 17px;
    height: 17px;
}

.status-strip {
    display: grid;
    grid-template-columns: 7px 1fr auto;
    align-items: center;
    gap: 8px;
    margin: 10px 14px 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--deep);
    color: var(--muted);
    font-size: 9px;
}

.status-strip strong {
    color: var(--text);
}

.status-strip small {
    color: var(--muted);
    font-size: 8px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.stories-block {
    padding: 16px 14px 10px;
}

.section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-row h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 17px;
    font-weight: 500;
}

.section-row a {
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
}

.stories-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-top: 13px;
    scrollbar-width: none;
}

.stories-row::-webkit-scrollbar {
    display: none;
}

.story {
    display: grid;
    flex: 0 0 48px;
    justify-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 7px;
    text-align: center;
}

.story > span:last-child {
    overflow: hidden;
    width: 48px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-avatar {
    position: relative;
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    padding: 2px;
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.story-avatar img,
.story-avatar > .avatar-letter {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.story-avatar b {
    position: absolute;
    right: -2px;
    bottom: -2px;
    display: grid;
    width: 15px;
    height: 15px;
    place-items: center;
    border: 2px solid var(--card);
    border-radius: 50%;
    background: var(--accent);
    color: var(--background);
    font-size: 11px;
}

.quick-post {
    display: grid;
    grid-template-columns: 32px 1fr 24px;
    align-items: center;
    gap: 9px;
    margin: 6px 14px 16px;
    padding: 10px;
    border-radius: 12px;
    background: var(--deep);
}

.quick-post img,
.quick-post > .avatar-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.quick-post > span:nth-child(2) {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-post svg {
    width: 17px;
    height: 17px;
    color: var(--accent);
}

.feed-heading {
    padding: 0 14px 10px;
}

.feed-heading > span {
    color: var(--accent);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.feed-heading > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.feed-heading h1 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 21px;
    font-weight: 500;
}

.feed-heading small {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--background);
    font-size: 9px;
    font-weight: 700;
}

.post-list {
    display: grid;
    gap: 12px;
    padding: 0 14px 18px;
}

.post-card,
.empty-card {
    overflow: hidden;
    border-radius: 15px;
    background: var(--deep);
}

.post-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 11px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-user img,
.post-user > .avatar-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-user > span:last-child {
    display: grid;
    gap: 2px;
}

.post-user strong {
    font-size: 10px;
}

.post-user small {
    color: var(--muted);
    font-size: 8px;
}

.post-card header button {
    border: 0;
    background: var(--deep);
    color: var(--muted);
}

.post-photo {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.post-body {
    padding: 10px 12px 12px;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.post-actions form {
    margin: 0;
}

.post-actions button,
.post-actions > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: var(--deep);
    color: var(--muted);
    font-size: 9px;
}

.post-actions svg {
    width: 16px;
    height: 16px;
    color: var(--text);
}

.caption,
.comment {
    margin: 7px 0;
    font-size: 10px;
    line-height: 1.45;
}

.caption strong,
.comment strong {
    color: var(--accent);
}

.comment {
    color: var(--muted);
}

.comment-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px;
    margin-top: 9px;
}

.comment-form input {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid var(--card);
    border-radius: 9px;
    background: var(--deep);
    color: var(--text);
    font-size: 9px;
}

.comment-form button {
    border: 0;
    background: var(--deep);
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
}

.empty-card {
    display: grid;
    justify-items: center;
    padding: 38px 20px;
    text-align: center;
}

.empty-card > svg {
    width: 34px;
    height: 34px;
    color: var(--accent);
}

.empty-card h2 {
    margin: 12px 0 5px;
    font-family: Georgia, serif;
    font-size: 19px;
    font-weight: 500;
}

.empty-card p {
    margin: 0 0 15px;
    color: var(--muted);
    font-size: 10px;
}

.primary-button {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    background: var(--accent);
    color: var(--background);
    font-size: 10px;
    font-weight: 700;
}

.mobile-discovery {
    display: none;
}

.right-column {
    display: grid;
    gap: 12px;
}

.right-profile,
.right-card {
    padding: 14px;
}

.right-profile-head {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 9px;
}

.right-profile img,
.right-profile .avatar-letter {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.right-profile-head > div {
    display: grid;
    gap: 2px;
}

.right-profile strong,
.right-title strong,
.event-row strong,
.safety-card strong {
    font-size: 9px;
}

.right-profile small,
.right-title small,
.event-row small {
    color: var(--muted);
    font-size: 7px;
}

.right-profile a {
    color: var(--accent);
    font-size: 8px;
    font-weight: 700;
}

.right-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--background);
}

.event-row {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 9px;
    padding: 10px 0;
    border-bottom: 1px solid var(--background);
}

.event-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.date-square,
.event-symbol {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    background: var(--deep);
    color: var(--accent);
}

.date-square strong {
    font-size: 10px;
}

.date-square small {
    font-size: 6px;
}

.event-row > div {
    display: grid;
    gap: 3px;
}

.safety-card {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 10px;
}

.safety-circle {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--background);
    font-weight: 700;
}

.safety-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.45;
}

.mobile-nav,
.simple-page {
    display: none;
}

@media (max-width: 1000px) {
    .desktop-shell {
        grid-template-columns: 168px 500px;
        width: 686px;
    }

    .right-column {
        display: none;
    }
}

@media (max-width: 730px) {
    .desktop-shell {
        display: block;
        width: 100%;
        margin: 0;
    }

    .sidebar-card,
    .right-column {
        display: none;
    }

    .feed-panel {
        min-height: 100vh;
        border-radius: 0;
        padding-bottom: 72px;
    }

    .mobile-nav {
        position: fixed;
        z-index: 70;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        min-height: 64px;
        background: var(--deep);
        border-top: 1px solid var(--card);
    }

    .mobile-nav a {
        display: grid;
        place-items: center;
        align-content: center;
        gap: 4px;
        color: var(--muted);
        font-size: 9px;
    }

    .mobile-nav svg {
        width: 18px;
        height: 18px;
        color: var(--text);
    }

    .mobile-discovery {
        display: grid;
        gap: 8px;
        margin: 0 14px 18px;
        padding: 12px;
        border-radius: 12px;
        background: var(--deep);
    }

    .mobile-discovery span {
        color: var(--accent);
        font-size: 10px;
        font-weight: 700;
    }

    .mobile-discovery input {
        padding: 9px 10px;
        border: 1px solid var(--card);
        border-radius: 9px;
        background: var(--deep);
        color: var(--text);
    }
}
