:root {
    --bg: #fbf7f1;
    --surface: #fffdf9;
    --ink: #332822;
    --muted: #756a63;
    --line: #eadfd4;
    --accent: #f47f45;
    --accent-dark: #c45f30;
    --danger: #c83f4d;
    --mint: #dff3ea;
    --rose: #ffe1e6;
    --sky: #dff0fb;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
}
a { color: var(--accent-dark); text-decoration: none; }
main { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 52px; }
.site-header, .site-footer, .admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 24px;
    background: rgba(255, 253, 249, 0.92);
    border-bottom: 1px solid var(--line);
}
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.site-header nav a, .sidebar a {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}
.site-header nav a.active, .sidebar a.active { background: #fff1e8; color: var(--accent-dark); }
.brand { font-weight: 900; letter-spacing: .04em; color: var(--ink); }
.hero {
    display: grid;
    grid-template-columns: 1.5fr .9fr;
    gap: 20px;
    align-items: stretch;
    padding: 32px 0;
}
.hero h1, .page-header h1 { margin: 6px 0 10px; font-size: clamp(34px, 5vw, 58px); line-height: 1; }
.hero p, .page-header p { color: var(--muted); font-size: 18px; max-width: 720px; }
.hero-panel, .card, .feed-card, .auth-card, .empty-state {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(74, 51, 36, .06);
}
.hero-panel { padding: 24px; display: grid; align-content: center; }
.grid { display: grid; gap: 16px; margin: 16px 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card, .feed-card, .empty-state { padding: 18px; }
.card h2, .feed-card h2 { margin: 8px 0; font-size: 20px; }
.card p, .feed-card p { color: var(--muted); }
.badge {
    display: inline-flex;
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff1e8;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 800;
}
.button, button {
    appearance: none;
    border: 1px solid var(--line);
    background: #fffaf5;
    color: var(--ink);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 800;
}
.button.primary, button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.danger, button.danger { background: var(--danger); border-color: var(--danger); color: white; }
.button.small { padding: 7px 10px; font-size: 13px; }
.actions, .actions-row, .toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.meta { color: var(--muted); font-size: 14px; margin-top: 10px; }
.feed-list { display: grid; gap: 16px; max-width: 760px; }
.feed-header { display: flex; justify-content: space-between; gap: 12px; }
.feed-header span { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.media-block {
    display: grid;
    place-items: center;
    min-height: 220px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f5e2cc, #fff8ee);
    color: var(--accent-dark);
    font-weight: 900;
    margin: 12px 0;
}
.media-block.large { min-height: 360px; font-size: 32px; }
.detail-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; align-items: start; }
.list-row { border-top: 1px solid var(--line); padding: 12px 0; }
.list-row span { display: block; color: var(--muted); font-size: 13px; }
.map-placeholder {
    min-height: 320px;
    display: grid;
    place-items: center;
    border: 1px dashed #d8c7b8;
    border-radius: 8px;
    background: #f4efe8;
    color: var(--muted);
    font-weight: 900;
}
.form-card { display: grid; gap: 14px; max-width: 720px; }
label { display: grid; gap: 6px; font-weight: 800; }
input, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: white;
    color: var(--ink);
    font: inherit;
}
.checkbox { display: flex; align-items: center; gap: 10px; }
.checkbox input { width: auto; }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    background: #fffdf9;
    border-right: 1px solid var(--line);
}
.admin-main { min-width: 0; }
.admin-main main, .admin-main > section, .admin-main > .page-header { width: auto; }
.toolbar { margin: 14px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; }
.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.auth-card { width: min(440px, 100%); padding: 24px; }
.auth-card form { display: grid; gap: 14px; }
.site-footer { border-top: 1px solid var(--line); border-bottom: 0; justify-content: center; flex-wrap: wrap; color: var(--muted); }

@media (max-width: 860px) {
    .hero, .detail-layout, .grid.two, .grid.three, .grid.four, .admin-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; border-right: 0; border-bottom: 1px solid var(--line); }
    .site-header { align-items: flex-start; flex-direction: column; }
}
