/* Shared DroBinG appearance, taken from the homepage. */
:root {
    color-scheme: dark;
    --bg: #11100f;
    --panel: #1b1917;
    --line: #40362a;
    --muted: #a99e8f;
    --green: #d8b778;
    --blue: #f0d49c
}

* {
    box-sizing: border-box
}

html {
    min-height: 100%;
    background: #11100f;
    scroll-behavior: smooth
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse 70% 40% at 80% 0%, #30251b 0, transparent 78%), #11100f;
    background-repeat: no-repeat;
    color: #f5eee4;
    font: 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, sans-serif
}

.wrap {
    width: min(1240px, calc(100% - 44px));
    margin-inline: auto
}

.site-header {
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #ffffff12;
    padding: 0
}

.site-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none
}

.site-brand::before {
    content: none !important
}

.site-brand img {
    display: block;
    width: 78px;
    height: 42px;
    object-fit: contain
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14px;
    white-space: nowrap;
    color: #bac8d8
}

.site-nav a {
    display: inline-flex !important;
    color: inherit;
    text-decoration: none
}

.site-nav a:hover,
.site-nav a.active {
    color: #dfbc7e
}

button,
.btn,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 21px;
    border: 1px solid #d7b679;
    border-radius: 8px;
    background: #d7b679;
    color: #18130d;
    box-shadow: none;
    cursor: pointer;
    font: 750 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
    text-decoration: none;
    transition: background .2s
}

button:hover,
.btn:hover,
.button:hover {
    background: #e9cd99;
    transform: none
}

button.secondary,
.btn.secondary,
button[data-command],
button[data-block] {
    background: transparent;
    border-color: #65513b;
    color: #e9d4b0
}

button.secondary:hover,
.btn.secondary:hover,
button[data-command]:hover,
button[data-block]:hover {
    background: #30261d
}

button:disabled,
.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none
}

.site-footer {
    border-top: 1px solid #413629;
    padding: 32px 0 40px;
    color: #8397ad;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap
}

.site-footer a {
    color: inherit;
    text-decoration: none
}

.site-footer a:hover {
    color: #f5eee4
}

[hidden] {
    display: none !important
}

:focus-visible {
    outline: 2px solid #f0d49c;
    outline-offset: 3px
}

@media(max-width:820px) {
    .site-nav {
        gap: 15px
    }
}

@media(max-width:700px) {
    .wrap {
        width: calc(100% - 28px)
    }

    .site-header {
        height: 74px;
        gap: 12px
    }

    .site-brand img {
        width: 56px;
        height: 34px
    }

    .site-nav {
        gap: 12px;
        font-size: 13px
    }
}

@media(max-width:530px) {
    .site-footer {
        flex-direction: column
    }

    .site-nav {
        gap: 10px;
        font-size: 12px
    }
}

@media(max-width:360px) {
    .site-nav {
        gap: 7px;
        font-size: 11px
    }

    .site-header {
        gap: 8px
    }
}

html {
    scrollbar-gutter: stable
}

.authbox .link {
    color: #e4c48c;
    background: transparent;
    border: 0;
    box-shadow: none
}

.authbox .link:hover {
    color: #f0d49c;
    background: transparent
}

.roi {
    color: #f0d49c
}

.field:focus-within {
    border-color: #d7b679
}

.account-strip {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    min-height: 72px;
    padding-block: 10px
}

.account-strip .btn {
    font-size: 14px;
    padding: 9px 15px
}

.account-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #f5eee4;
    text-decoration: none;
    font-size: 13px
}

.account-chip strong {
    display: block;
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.avatar-small {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #65513b;
    flex-shrink: 0
}

.role-badge {
    display: inline-block;
    font-size: 11px;
    line-height: 1.4;
    padding: 3px 8px;
    border: 1px solid #65513b;
    border-radius: 99px;
    background: #2c241b;
    color: #e4c48c
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px
}

.comment-head small {
    color: #a99e8f
}

.profile-panel {
    max-width: 760px
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    min-width: 0
}

.profile-summary h2 {
    overflow-wrap: anywhere
}

.avatar-large {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #65513b;
    flex-shrink: 0
}

.avatar-placeholder {
    display: grid;
    place-items: center;
    color: #dfbc7e;
    background: #30261d;
    font-size: 40px
}

.profile-message {
    min-height: 28px
}

.hint {
    font-size: 13px;
    color: #b9ac9a
}

.profile-panel input {
    max-width: 100%
}

#posts .cover {
    max-height: 320px
}

@media(max-width:600px) {
    .account-strip {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-start;
        min-height: 100px
    }

    .account-chip strong {
        max-width: 180px
    }

    .account-chip>span:last-child {
        display: none
    }

    .profile-summary {
        gap: 16px
    }

    .avatar-large {
        width: 80px;
        height: 80px
    }

    .profile-summary h2 {
        font-size: 22px
    }
}

.login-panel {
    max-width: 560px
}

.login-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px
}

.account-strip [data-user-logout] {
    font-size: 14px;
    padding: 9px 15px
}

#list.folder-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 30px
}

.folder-card.secondary {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    padding: 20px;
    text-align: left;
    min-width: 0;
    width: 100%;
    border: 1px solid #65513b;
    border-radius: 0 14px 14px 14px;
    background: linear-gradient(145deg, #211c18, #151312);
    color: #f5eee4;
    white-space: normal
}

.folder-card.secondary:before {
    content: "";
    position: absolute;
    top: -12px;
    left: -1px;
    width: 48%;
    height: 13px;
    background: #30261d;
    border: 1px solid #65513b;
    border-bottom: 0;
    border-radius: 10px 14px 0 0
}

.folder-card.secondary:hover {
    background: #30261d;
    transform: none
}

.folder-tab {
    color: #d7b679;
    font-size: 12px;
    font-weight: 650
}

.folder-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
    background: #11100f;
    border: 1px solid #40362a
}

.folder-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.folder-placeholder {
    font-size: 68px;
    color: #d7b679
}

.folder-title {
    font-size: 18px;
    line-height: 1.4;
    overflow-wrap: anywhere
}

.folder-card small {
    font-size: 12px;
    color: #b9ac9a
}

#folderBrowser>#new {
    margin-bottom: 12px
}

@media(max-width:820px) {
    #list.folder-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media(max-width:530px) {
    #list.folder-grid {
        grid-template-columns: 1fr
    }

    .account-strip {
        gap: 8px
    }

    .login-options button {
        width: 100%
    }
}

@media(max-width:600px) {
    .account-strip {
        min-height: 116px
    }

    .account-strip .account-chip {
        flex-basis: 100%;
        width: 100%
    }
}

.login-panel form>button {
    margin-top: 20px
}

.login-panel input {
    margin-bottom: 0
}

/* Unified site drawer. */
body.site-menu-open { overflow: hidden; }
.site-header .open-btn { padding: 10px 18px; font-size: 14px; }
.menu-backdrop { position: fixed; inset: 0; z-index: 9998; background: #0009; backdrop-filter: blur(3px); }
.sidebar { position: fixed; inset: 0 0 0 auto; width: min(360px, 100%); height: 100dvh; height: 100vh; height: 100dvh; z-index: 9999; display: flex; flex-direction: column; gap: 22px; padding: 26px 22px max(22px, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(ellipse at top right, #35281b, transparent 65%), #171411; color: #f5eee4; border-left: 1px solid #65513b; box-shadow: -18px 0 55px #0007; }
.menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.menu-heading h2 { margin: 0; font-size: 20px; color: #f0d49c; }
.sidebar .close-btnMenu { position: static; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid #65513b; border-radius: 10px; background: #241e17; color: #e9d4b0; font-size: 28px; line-height: 1; }
.sidebar .close-btnMenu:hover { background: #3b2e20; }
.menu-account { padding-bottom: 22px; border-bottom: 1px solid #40362a; }
.sidebar .menu-button { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-height: 48px; margin: 0; padding: 12px 16px; border: 1px solid #51412f; border-radius: 10px; background: #241e17; color: #ead9ba; font: 600 14px/1.5 Inter, system-ui, sans-serif; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.sidebar .menu-button:hover, .sidebar .menu-button.is-current { background: #3b2e20; border-color: #b99760; color: #ffe1a6; }
.sidebar .menu-login { background: #d7b679; color: #18130d; border-color: #d7b679; justify-content: center; }
.sidebar .menu-login:hover { background: #e9cd99; color: #18130d; }
.sidebar .menu-profile { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; margin: 0; padding: 14px 12px; border: 1px solid #65513b; border-radius: 12px; background: #241e17; color: #f5eee4; text-align: left; }
.sidebar .menu-profile:hover { background: #30261d; }
.menu-avatar { position: relative; display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; background: #403020; color: #d7b679; border: 1px solid #65513b; border-radius: 50%; font-size: 28px; }
.sidebar .menu-avatar .avatar-small { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.menu-identity { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; flex: 1; }
.sidebar .menu-identity strong { display: block; width: 100%; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.sidebar .role-badge { max-width: 100%; font-weight: 500; white-space: normal; }
.menu-profile-arrow { color: #d7b679; font-size: 26px; }
.sidebar .links-container { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.menu-chevron { margin-left: auto; font-size: 20px; transition: transform .15s; }
.menu-project-toggle[aria-expanded="true"] .menu-chevron { transform: rotate(180deg); }
.menu-submenu { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0 14px; padding-left: 14px; border-left: 1px solid #806440; }
.sidebar .menu-submenu .menu-button { background: #1b1713; font-weight: 500; }
.menu-bottom { margin-top: auto; padding-top: 22px; border-top: 1px solid #40362a; }
.menu-bottom p { margin: 18px 0 0; color: #a99e8f; font-size: 12px; letter-spacing: .06em; }
.sidebar .menu-logout { background: transparent; }
@media(max-width: 400px) { .sidebar { padding-inline: 16px; } }
