:root {
    font-family: Arial, sans-serif;
    color: #26332d;
    background: #f1f6f1;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    line-height: 1.6;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px max(24px, calc((100% - 900px) / 2));
    background: #ffffff;
    border-bottom: 1px solid #dce8dd;
}

header > a,
.brand-group > a:first-child {
    color: #176b3a;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-button {
    display: inline-block;
    padding: 6px 13px;
    color: #ffffff !important;
    background: #b42318;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
}

.admin-button:hover,
.admin-danger:hover {
    background: #8f1d15;
    text-decoration: none;
}

.admin-danger {
    color: #ffffff;
    background: #b42318;
}

.admin-user,
.admin-post {
    margin-top: 14px;
}

.admin-post-image {
    display: block;
    max-width: 100%;
    max-height: 560px;
    margin-top: 12px;
    border-radius: 12px;
    object-fit: contain;
}

.admin-post-delete {
    margin-bottom: 0;
}

.admin-user form {
    margin-bottom: 0;
}

.admin-hidden-badge {
    display: inline-block;
    padding: 3px 9px;
    color: #713c32;
    background: #f4e9e6;
    border-radius: 999px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

nav a,
main a {
    color: #176b3a;
}

nav a {
    text-decoration: none;
}

nav a:hover,
main a:hover {
    text-decoration: underline;
}

main {
    width: min(760px, calc(100% - 32px));
    margin: 36px auto;
}

section {
    margin-bottom: 22px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e0e9e1;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgb(35 70 45 / 6%);
}

#beitrag-erstellen {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
    padding: 18px 22px;
    background: #e0efe3;
    border-color: #c7ddcb;
}

#beitrag-erstellen h2 {
    margin-bottom: 8px;
    font-size: 1.4rem;
}

#beitrag-erstellen form {
    gap: 8px;
    margin: 10px 0 0;
}

#beitrag-erstellen textarea {
    min-height: 72px;
}

#beitraege.home-feed {
    background: #e9edeb;
    border-color: #d4dcda;
}

#beitraege.home-feed article {
    background: #ffffff;
}

h1,
h2,
h3 {
    color: #176b3a;
    line-height: 1.25;
}

h1 {
    margin-top: 0;
    font-size: 2.2rem;
}

h2 {
    margin-top: 0;
}

form {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.report-actions form {
    margin: 0;
}

label {
    font-weight: bold;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px;
    color: #26332d;
    background: #ffffff;
    border: 1px solid #b9cbbb;
    border-radius: 8px;
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #b9dfc3;
    border-color: #27834a;
}

button {
    justify-self: start;
    padding: 11px 18px;
    color: #ffffff;
    background: #237744;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #185d33;
}

.post-delete-form button,
.like-row button {
    padding: 6px 9px;
    font-size: 0.85rem;
    line-height: 1.2;
}

article {
    margin-top: 18px;
    padding: 18px;
    background: #f7faf7;
    border: 1px solid #e0e9e1;
    border-radius: 12px;
}

article h3 {
    margin: 0 0 4px;
}

article time {
    color: #647268;
    font-size: 0.9rem;
}

article p {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.post-content,
.comment {
    color: #174f2d;
}

.post-content {
    margin-top: 12px;
    padding: 12px 14px;
    background: #ecefed;
    border-radius: 10px;
}

.home-feed .post-content {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.65;
    color: #006400;
}

#beitraege.home-feed article p.post-content {
    color: #006400;
}

.comments {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #e0e9e1;
}

.comment-delete-form {
    display: inline-flex;
    margin: 4px 0;
}

.comment-delete-form button,
.report-form button,
.report-toggle {
    padding: 5px 9px;
    color: #713c32;
    background: #f4e9e6;
    font-size: 0.85rem;
}

.report-details {
    margin-top: 10px;
}

.report-toggle {
    display: inline-block;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    list-style: none;
    transform: scale(0.75);
    transform-origin: left center;
}

.report-toggle::-webkit-details-marker {
    display: none;
}

.report-form {
    margin: 8px 0;
}

.comments h4 {
    margin: 0 0 8px;
    color: #176b3a;
}

.profile-bio {
    padding: 12px 14px;
    background: #f7faf7;
    border-radius: 10px;
}

.profile-details {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.profile-details > div {
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e9e1;
}

.profile-details dt {
    color: #647268;
    font-size: 0.9rem;
    font-weight: bold;
}

.profile-details dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #dce8dd;
}

.small-avatar {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 50%;
    vertical-align: middle;
}

.tiny-avatar {
    width: 24px;
    height: 24px;
    object-fit: cover;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: middle;
}

.visibility-badge {
    display: inline-block;
    margin: 6px 0;
    padding: 3px 9px;
    color: #31553d;
    background: #e7f2e9;
    border-radius: 999px;
    font-size: 0.85rem;
}

.comment {
    margin: 6px 0;
    padding: 8px 10px;
    background: #ffffff;
    border-radius: 8px;
}

.like-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    scroll-margin-top: 24px;
}

.like-row form {
    display: block;
    margin: 0;
}

@media (max-width: 600px) {
    header {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        gap: 12px;
    }

    main {
        margin-top: 20px;
    }

    section {
        padding: 18px;
    }
}
