* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(155, 107, 76, .16), transparent 32rem),
        #f7f3ec;
    color: #211b16;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a {
    color: #6d2f18;
}

.site-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #fffaf1 0%, #f0dfcc 100%);
    border-bottom: 1px solid #e1d6c9;
    box-shadow: 0 8px 24px rgba(74, 39, 24, .06);
}

.brand {
    color: #4a2718;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-decoration: none;
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.container {
    flex: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

.page-layout {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
}

.content-column {
    min-width: 0;
}

.sidebar-column {
    position: sticky;
    top: 1rem;
}

.search-form input {
    min-width: 220px;
}

.card,
.poem,
.comment,
.review,
.form,
.messages {
    background: #fffdf8;
    border: 1px solid #e1d6c9;
    border-radius: 14px;
    margin: 1rem 0;
    padding: 1rem;
}

.card,
.poem {
    box-shadow: 0 12px 30px rgba(74, 39, 24, .05);
}

.poem-body {
    font-size: 1.15rem;
    white-space: normal;
}

.muted {
    color: #776b60;
    font-size: .95rem;
}

.lead {
    font-size: 1.1rem;
    font-weight: 600;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 1.25rem;
}

.home-tabs {
    border-bottom: 1px solid #e1d6c9;
    padding-bottom: .75rem;
}

.tabs a,
.button,
button {
    border: 1px solid #9b6b4c;
    border-radius: 999px;
    background: #fffaf1;
    color: #4a2718;
    cursor: pointer;
    display: inline-block;
    padding: .45rem .8rem;
    text-decoration: none;
}

.tabs a.active,
button:hover,
.button:hover {
    background: #ead8c7;
}

input,
textarea,
select {
    border: 1px solid #c8b8a9;
    border-radius: 8px;
    font: inherit;
    max-width: 100%;
    padding: .5rem;
    width: 100%;
}

.inline {
    display: inline;
}

.reply {
    margin-left: 2rem;
}

.comment-header {
    align-items: center;
    display: flex;
    gap: .75rem;
    margin-bottom: .65rem;
}

.comment-avatar-link {
    flex-shrink: 0;
    line-height: 0;
    text-decoration: none;
}

.comment-avatar {
    border: 1px solid #e1d6c9;
    border-radius: 50%;
    display: block;
    height: 40px;
    object-fit: cover;
    width: 40px;
}

.comment-avatar-placeholder {
    align-items: center;
    background: #ead8c7;
    color: #4a2718;
    display: flex;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: 700;
    justify-content: center;
}

.comment-meta {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.comment-author {
    color: #4a2718;
    font-weight: 600;
    text-decoration: none;
}

.comment-author:hover {
    text-decoration: underline;
}

.comment-meta .muted {
    font-size: .85rem;
}

.comment-content {
    margin-left: calc(40px + .75rem);
    min-width: 0;
}

.comment-content textarea {
    box-sizing: border-box;
    display: block;
    max-width: 100%;
    width: 100%;
}

.comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-top: .5rem;
}

.comment-reply-form {
    display: none;
}

.unread {
    border-color: #9b6b4c;
}

.notification-card .notification-title {
    font-size: 1.1rem;
    margin: 0 0 .5rem;
}

.notification-card .notification-title a {
    color: #776b60;
    font-weight: 400;
    text-decoration: none;
}

.notification-card.unread .notification-title a {
    color: #211b16;
    font-weight: 700;
}

.notification-card.unread .notification-title a:hover {
    color: #6d2f18;
}

.social-login {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.ad-banner {
    background:
        linear-gradient(135deg, rgba(255, 250, 241, .96), rgba(234, 216, 199, .72)),
        repeating-linear-gradient(45deg, transparent 0 12px, rgba(155, 107, 76, .06) 12px 13px);
    border: 1px dashed #b88a6a;
    border-radius: 16px;
    color: #4a2718;
    display: grid;
    gap: .25rem;
    margin: 1rem 0;
    min-height: 120px;
    padding: 1rem;
    place-content: center;
    text-align: center;
}

.ad-banner strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
}

.ad-banner span {
    color: #776b60;
}

.ad-banner a {
    font-weight: 700;
    margin-top: .25rem;
}

.ad-kicker {
    color: #9b6b4c;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    margin: 0;
    text-transform: uppercase;
}

.ad-banner-top,
.ad-banner-footer {
    min-height: 96px;
}

.ad-banner-sidebar {
    min-height: 260px;
}

.sidebar-widget {
    background: #fffdf8;
    border: 1px solid #e1d6c9;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(74, 39, 24, .05);
    margin: 0 0 1rem;
    padding: 1rem;
}

.sidebar-widget-head {
    align-items: baseline;
    border-bottom: 1px solid #ead8c7;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
    margin-bottom: .75rem;
    padding-bottom: .5rem;
}

.sidebar-widget-head h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    margin: 0;
}

.category-links {
    font-size: .92rem;
    line-height: 1.7;
}

.category-links a {
    text-decoration: none;
}

.category-links a:hover,
.category-links a.active {
    font-weight: 700;
    text-decoration: underline;
}

.category-sep {
    color: #b88a6a;
    margin: 0 .15rem;
}

.category-more {
    border-top: 1px solid #ead8c7;
    margin: .75rem 0 0;
    padding-top: .65rem;
}

.category-more a {
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}

.category-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.25rem 0;
}

.category-cloud a {
    background: #fffdf8;
    border: 1px solid #e1d6c9;
    border-radius: 999px;
    padding: .45rem .85rem;
    text-decoration: none;
}

.category-cloud a.active,
.category-cloud a:hover {
    background: #ead8c7;
    border-color: #9b6b4c;
}

.site-footer {
    background: #211b16;
    border-top: 4px solid #9b6b4c;
    color: #fffaf1;
    margin-top: 2rem;
    padding: 1.25rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1rem 0;
}

.profile-section {
    border-top: 1px solid #e1d6c9;
    margin-top: 1.25rem;
    padding-top: 1rem;
}

.profile-section h2 {
    font-size: 1.15rem;
    margin: 0 0 .75rem;
}

.profile-form label {
    display: block;
    font-weight: 600;
    margin-bottom: .35rem;
}

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="file"],
.profile-form select,
.profile-form textarea {
    max-width: 100%;
    width: min(100%, 28rem);
}

.help-text,
.form-errors {
    color: #776b60;
    display: block;
    font-size: .9rem;
    margin-top: .25rem;
}

.checkbox-group ul,
.checkbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.checkbox-group li,
.checkbox-group > div > div,
.checkbox-list li {
    margin: .35rem 0;
}

.notification-settings h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem 0 .5rem;
}

.notification-settings h3:first-child {
    margin-top: 0;
}

.info-page section {
    margin-top: 2rem;
}

.info-page section:first-of-type {
    margin-top: 1.25rem;
}

.info-status {
    background: #faf6ef;
    border: 1px solid #e1d6c9;
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.steps-list {
    padding-left: 1.25rem;
}

.steps-list li {
    margin: .75rem 0;
}

.info-table {
    border-collapse: collapse;
    margin: 1rem 0;
    width: 100%;
}

.info-table th,
.info-table td {
    border: 1px solid #e1d6c9;
    padding: .6rem .75rem;
    text-align: left;
}

.info-table th {
    background: #faf6ef;
}

.faq-list dt {
    font-weight: 600;
    margin-top: 1rem;
}

.faq-list dd {
    color: #5c5248;
    margin: .35rem 0 0;
}

.profile-form .checkbox-group label,
.profile-form .checkbox-list label {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    font-weight: 400;
    gap: .5rem;
    margin-bottom: 0;
}

.profile-form .checkbox-group input[type="checkbox"],
.profile-form .checkbox-list input[type="checkbox"] {
    flex-shrink: 0;
    height: 1rem;
    margin: 0;
    width: 1rem;
}

.avatar-field {
    margin: 1rem 0;
}

.avatar-current {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    margin: .5rem 0;
}

.profile-form .avatar-clear {
    color: #776b60;
    display: inline-flex;
    font-size: .95rem;
    font-weight: 400;
    gap: .4rem;
    margin: 0;
}

.avatar-new-preview[hidden] {
    display: none;
}

.avatar-new-preview-label {
    color: #776b60;
    font-size: .9rem;
    margin: .5rem 0 .25rem;
}

.profile-avatar,
.profile-avatar-preview {
    border: 2px solid #e1d6c9;
    border-radius: 50%;
    display: block;
    height: 96px;
    margin: .5rem 0;
    object-fit: cover;
    width: 96px;
}

.profile-avatar-placeholder {
    align-items: center;
    background: #ead8c7;
    color: #4a2718;
    display: flex;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 700;
    justify-content: center;
}

.profile-header-main {
    align-items: start;
    display: flex;
    gap: 1rem;
}

.profile-badge {
    color: #6d2f18;
    font-weight: 600;
}

.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 1.5rem;
    margin: 1rem 0 0;
}

.profile-stats > div {
    min-width: 7.5rem;
}

.profile-stats dt {
    color: #776b60;
    font-size: .85rem;
}

.profile-stats dd {
    font-size: 1.25rem;
    font-weight: 700;
    margin: .15rem 0 0;
}

.profile-about {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-about li {
    margin: .5rem 0;
}

.tag {
    background: #ead8c7;
    border-radius: 999px;
    display: inline-block;
    margin: .15rem .25rem .15rem 0;
    padding: .15rem .55rem;
}

.email-verification-banner {
    background: #fff3d9;
    border-bottom: 1px solid #e8c887;
    color: #5c3d12;
    padding: .75rem 2rem;
    text-align: center;
}

.email-verification-banner p {
    margin: 0;
}

.nav-emphasis {
    color: #8a3b00;
    font-weight: 700;
}

@media (max-width: 860px) {
    .site-header,
    .page-layout {
        display: block;
    }

    .site-header nav {
        margin-top: 1rem;
    }

    .search-form {
        margin: 1rem 0;
    }

    .sidebar-column {
        position: static;
    }
}
