:root {
    --bg: #f2ede6;
    --surface: rgba(255, 251, 245, 0.84);
    --surface-strong: rgba(255, 248, 240, 0.96);
    --ink: #181615;
    --muted: #6f655d;
    --line: rgba(24, 22, 21, 0.1);
    --accent: #18624b;
    --accent-strong: #133d30;
    --accent-soft: #e2f0e9;
    --warm: #b46f49;
    --danger: #8d2618;
    --shadow: 0 28px 70px rgba(38, 30, 20, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(24, 98, 75, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(191, 127, 84, 0.16), transparent 22%),
        linear-gradient(180deg, #f7f2ec 0%, #ece2d5 100%);
}

a {
    color: inherit;
}

.shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.banner {
    padding: 28px 30px 30px;
    position: relative;
    overflow: hidden;
}

.banner::after {
    content: "";
    position: absolute;
    inset: auto -60px -110px auto;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(24, 98, 75, 0.18), transparent 70%);
}

.topbar,
.feed-head,
.toolbar,
.single-post-header,
.link-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.banner-body {
    margin-top: 28px;
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}

.page-title {
    margin: 0 0 16px;
    font-size: clamp(38px, 6vw, 62px);
    line-height: 0.92;
}

.page-copy {
    margin: 0;
    max-width: 42rem;
    line-height: 1.75;
    color: var(--muted);
    font-size: 17px;
}

.section-heading,
.side-title {
    margin: 0 0 12px;
    line-height: 1.05;
}

.section-heading {
    font-size: clamp(28px, 3.6vw, 40px);
}

.side-title {
    font-size: 26px;
}

.banner-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(24, 22, 21, 0.08);
    color: var(--accent-strong);
}

button,
.button,
.ghost-link {
    border-radius: 999px;
    padding: 13px 18px;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button,
.button {
    border: 0;
    color: #f8fff8;
    background: linear-gradient(135deg, #216f56, #184d3d);
    box-shadow: 0 14px 30px rgba(24, 98, 75, 0.26);
}

button:hover,
.button:hover,
.ghost-link:hover,
.post-card:hover {
    transform: translateY(-2px);
}

button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.ghost-button,
.ghost-link {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.4);
    color: var(--ink);
    box-shadow: none;
}

.ghost-button {
    padding: 13px 18px;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(24, 98, 75, 0.4);
    outline-offset: 3px;
}

.logout-form {
    margin: 0;
}

.feed,
.writer-panel,
.writer-sidebar,
.single-post {
    padding: 24px;
}

.feed {
    margin-top: 22px;
}

.hint,
.empty,
.error-box,
.notice {
    border-radius: 18px;
    padding: 14px 16px;
    line-height: 1.65;
}

.hint,
.notice {
    background: var(--accent-soft);
    color: #164938;
}

.empty {
    background: rgba(255, 255, 255, 0.48);
    border: 1px dashed var(--line);
    color: var(--muted);
}

.error-box {
    background: rgba(141, 38, 24, 0.08);
    color: var(--danger);
}

.posts-waterfall {
    columns: 3 280px;
    column-gap: 18px;
}

.post-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 18px;
    padding: 18px 20px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    box-shadow: 0 12px 28px rgba(27, 20, 14, 0.06);
    text-decoration: none;
    color: inherit;
    break-inside: avoid;
    animation: rise 0.35s ease;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    flex-wrap: wrap;
}

.post-card p,
.single-post-content {
    margin: 0;
    white-space: pre-wrap;
}

.post-card p {
    line-height: 1.72;
    font-size: 16px;
}

.post-link {
    display: inline-flex;
    margin-top: 16px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.layout-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    gap: 22px;
    margin-top: 22px;
    align-items: start;
}

form {
    display: grid;
    gap: 14px;
}

textarea {
    width: 100%;
    min-height: 280px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px 18px;
    font: inherit;
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    resize: vertical;
    background: rgba(255, 255, 255, 0.68);
}

.status {
    min-height: 24px;
    color: var(--muted);
}

.status.error {
    color: var(--danger);
}

.text-link {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 600;
}

.text-link:hover {
    text-decoration: underline;
}

.detail-time {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.single-post-content {
    margin-top: 20px;
    line-height: 1.82;
    font-size: 18px;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .layout-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .shell {
        width: min(100%, calc(100% - 20px));
        padding-top: 18px;
    }

    .banner,
    .feed,
    .writer-panel,
    .writer-sidebar,
    .single-post {
        padding: 20px;
    }

    .posts-waterfall {
        columns: 1;
    }
}
