:root {
    color-scheme: light;
    --bg: #f4f0e8;
    --bg-accent: #dcefe4;
    --bg-accent-2: #efe4c9;
    --ink: #1d1b17;
    --muted: #5e574f;
    --card: rgba(255, 253, 249, 0.88);
    --card-strong: #fffaf1;
    --border: #d6cdbc;
    --border-strong: #bdb39d;
    --shadow: 0 24px 60px rgba(40, 28, 12, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
    line-height: 1.55;
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(204, 232, 217, 0.8) 0%, transparent 55%),
        radial-gradient(900px 420px at -10% 95%, rgba(236, 220, 182, 0.85) 0%, transparent 60%),
        linear-gradient(180deg, #fbf8f2 0%, var(--bg) 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: -1;
    border-radius: 999px;
    filter: blur(6px);
    opacity: 0.7;
}

body::before {
    top: 84px;
    right: -120px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(206, 226, 214, 0.9) 0%, rgba(206, 226, 214, 0) 70%);
}

body::after {
    left: -100px;
    bottom: 50px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(238, 223, 193, 0.95) 0%, rgba(238, 223, 193, 0) 72%);
}

code {
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
        monospace;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
}

a {
    color: #214b3d;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

a:hover {
    color: #14352b;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -64px;
    z-index: 20;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: #fffdf8;
    color: var(--ink);
    text-decoration: none;
    transition: top 120ms ease;
}

.skip-link:focus {
    top: 16px;
}

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

.site-header,
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 4px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(214, 205, 188, 0.7);
    background: linear-gradient(180deg, rgba(251, 248, 242, 0.94), rgba(251, 248, 242, 0.78));
    backdrop-filter: blur(10px);
}

.site-brand {
    display: grid;
    gap: 2px;
}

.site-brand-link {
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.site-brand-link:hover {
    color: var(--ink);
}

.site-brand-tagline {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.site-account {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.site-account-label {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.site-account-button {
    border: 1px solid rgba(189, 179, 157, 0.9);
    border-radius: 999px;
    padding: 9px 13px;
    background: rgba(255, 255, 255, 0.65);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border: 1px solid rgba(189, 179, 157, 0.9);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.92rem;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.88);
    border-color: #a99d86;
}

.site-content {
    padding: 4px 0 18px;
}

.site-footer {
    color: var(--muted);
    border-top: 1px solid rgba(214, 205, 188, 0.7);
    font-size: 0.88rem;
}

.site-footer p {
    margin: 0;
    max-width: 46rem;
}

.layout-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 18px 20px 24px;
}

.feed-layout,
.compose-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(250px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.feed-main,
.compose-main,
.feed-sidebar,
.compose-sidebar {
    display: grid;
    gap: 16px;
}

.feed-header {
    margin-bottom: 0;
}

.sidebar-panel {
    display: grid;
    gap: 12px;
}

.sidebar-panel .post-links {
    display: grid;
    gap: 8px;
}

.compose-kicker {
    margin: 0;
    color: #756040;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.compose-note-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), var(--card));
    border: 1px solid rgba(214, 205, 188, 0.9);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.panel::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #7a9f8e 0%, #c6a76b 52%, #9e8f7a 100%);
}

h1,
h2,
h3,
dt {
    font-family: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
}

button,
input,
textarea,
select {
    border-color: var(--border-strong);
    transition:
        border-color 120ms ease,
        box-shadow 120ms ease,
        transform 120ms ease,
        background-color 120ms ease;
}

button:hover,
input:hover,
textarea:hover,
select:hover {
    border-color: #a99d86;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid #5f8f79;
    outline-offset: 2px;
}

button:active {
    transform: translateY(1px);
}

@media (max-width: 720px) {
    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .site-account {
        margin-left: 0;
    }

    .site-shell {
        width: min(100% - 20px, 1120px);
        padding-top: 12px;
    }

    .layout-wrap {
        padding-left: 0;
        padding-right: 0;
    }

    .feed-layout,
    .compose-layout {
        grid-template-columns: 1fr;
    }
}
