:root {
    --red: #d52b1e;
    --red-dark: #a81f15;
    --white: #ffffff;
    --bg: #ffffff;
    --text: #1c1c1c;
    --text-muted: #6b6b6b;
    --border: #e6e6e6;
    --radius: 14px;
    --max-width: 560px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header ---------- */
.site-header {
    background: var(--red);
    color: var(--white);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header__title {
    font-weight: 600;
    font-size: 16px;
    color: var(--white);
}

.site-header__upload {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.site-header__upload:active { transform: scale(0.94); }

/* ---------- Main ---------- */
.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
}

/* ---------- Month jump nav ---------- */
.month-jump {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 18px;
    -webkit-overflow-scrolling: touch;
}

.month-jump a {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--red);
    border: 1px solid var(--red);
    border-radius: 999px;
    padding: 5px 12px;
    white-space: nowrap;
}

/* ---------- Path (Startseite) ---------- */
.path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}

.path__node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 0;
}

.path__node--left { align-self: center; margin-right: 90px; }
.path__node--right { align-self: center; margin-left: 90px; }

.path__circle-link { display: block; }

.path__circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border: 3px solid transparent;
}

.path__circle--newest { border-color: var(--red); }

.path__circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.path__circle-icon {
    font-size: 22px;
    color: var(--text-muted);
}

.path__star {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--red);
    color: var(--white);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.path__label { display: block; margin-top: 6px; }

.path__title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    max-width: 130px;
}

.path__date {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---------- Blur-up Lazy Load ---------- */
.lazy-blur {
    filter: blur(14px);
    transition: filter 0.4s ease-out;
    background: #eee;
}
.lazy-blur.is-loaded { filter: blur(0); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--red);
    color: var(--white);
    padding: 18px 20px 22px;
    margin-top: 30px;
}

.site-footer__stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.stat { text-align: center; }
.stat__value { display: block; font-size: 16px; font-weight: 600; }
.stat__label { display: block; font-size: 10px; color: rgba(255,255,255,0.75); margin-top: 2px; }

.site-footer__leaves {
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

/* ---------- Post page ---------- */
.post__meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.post__times span { margin-right: 8px; }

.post__meta-buttons { display: flex; gap: 8px; }

.post__share {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    color: var(--text);
}

.post__delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    width: 30px;
    height: 30px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.post__delete:active { transform: scale(0.94); }

.post__title { font-size: 22px; margin: 0 0 4px; font-weight: 600; }
.post__date { font-size: 13px; color: var(--text-muted); margin: 0 0 16px; }
.post__location { color: var(--text-muted); }

.carousel { position: relative; margin-bottom: 16px; border-radius: var(--radius); overflow: hidden; }
.carousel__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.carousel__slide {
    width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.carousel__dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.carousel__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    border: none;
    padding: 0;
}
.carousel__dot.is-active { background: var(--white); }

.post__body { font-size: 15px; line-height: 1.7; margin-bottom: 20px; white-space: pre-line; }

.reactions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.reaction-btn {
    background: #fbeceb;
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    color: var(--red-dark);
}
.reaction-btn:active { transform: scale(0.95); }
.reaction-count { font-size: 12px; font-weight: 500; }

.post__prevnext {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--red);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    margin-bottom: 24px;
}
.post__prev, .post__next { max-width: 48%; }
.post__next { text-align: right; margin-left: auto; }

/* ---------- Comments ---------- */
.comments__heading { font-size: 16px; margin-bottom: 12px; }
.comments__empty { color: var(--text-muted); font-size: 13px; }

.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.comment__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fbeceb;
    color: var(--red-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.comment__author { font-size: 12px; font-weight: 600; margin: 0; }
.comment__body { font-size: 13px; margin: 2px 0 0; color: var(--text); }

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    background: #fafafa;
    border-radius: var(--radius);
    padding: 14px;
}
.comment-form label { font-size: 12px; color: var(--text-muted); }
.comment-form input,
.comment-form textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    resize: vertical;
    min-height: 38px;
}
.comment-form textarea { min-height: 64px; }
.comment-form__counter { font-size: 11px; color: var(--text-muted); align-self: flex-end; }
.comment-form button,
.upload-form button,
.password-gate button {
    background: var(--red);
    color: var(--white);
    border: none;
    font-weight: 600;
    font-size: 14px;
    padding: 11px;
    border-radius: 10px;
    margin-top: 4px;
}
.comment-form button:active,
.upload-form button:active,
.password-gate button:active { transform: scale(0.98); }
.comment-form__error { color: var(--red-dark); font-size: 12px; }

/* ---------- Upload / password gate ---------- */
.password-gate, .upload-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.password-gate h1, .upload-form h1 { font-size: 18px; margin: 0 0 4px; }
.password-gate__hint { font-size: 13px; color: var(--text-muted); margin: 0 0 6px; }

.password-gate input,
.upload-form input[type="text"],
.upload-form textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.upload-form textarea { min-height: 80px; resize: vertical; }
.upload-form label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.form-error { color: var(--red-dark); font-size: 13px; }

.dropzone {
    border: 2px dashed #cfcfcf;
    border-radius: var(--radius);
    padding: 28px 12px;
    text-align: center;
    cursor: pointer;
}
.dropzone.is-dragover { border-color: var(--red); background: #fbeceb; }
.dropzone__hint { font-size: 13px; color: var(--text-muted); margin: 0; }

.dropzone__previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.preview-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    position: relative;
}
.preview-thumb-wrap { position: relative; }
.preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    font-size: 10px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Small screens ---------- */
@media (max-width: 400px) {
    .path__node--left { margin-right: 60px; }
    .path__node--right { margin-left: 60px; }
}
