:root {
    --bg: #f4efe5;
    --panel: rgba(255, 252, 246, 0.88);
    --panel-strong: #fffaf0;
    --ink: #16211f;
    --muted: #54615d;
    --accent: #c55a11;
    --accent-dark: #943d00;
    --line: rgba(22, 33, 31, 0.12);
    --shadow: 0 24px 60px rgba(66, 40, 10, 0.14);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(197, 90, 17, 0.16), transparent 28%),
        linear-gradient(135deg, #f5efe6, #e8dcc9 55%, #d9c2a4);
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.shell, .mini-shell {
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.shell--center {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.hero, .mini-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 24px;
}

.panel, .mini-card, .stat-card {
    background: var(--panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.panel { padding: 24px; }
.panel--auth { width: min(460px, calc(100vw - 32px)); }

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--accent-dark);
}

h1, h2, p { margin-top: 0; }
.muted { color: var(--muted); }

.alert {
    padding: 12px 14px;
    margin: 16px 0;
    border-radius: 14px;
    background: rgba(197, 90, 17, 0.12);
    color: var(--accent-dark);
}

.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; }

input, textarea, select, button {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 12px 14px;
    background: var(--panel-strong);
    color: var(--ink);
}

button {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-pills a, .tab {
    border: 1px solid var(--line);
    background: rgba(255, 250, 240, 0.72);
    padding: 10px 14px;
    border-radius: 999px;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 12px;
    margin-bottom: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card { padding: 18px; }
.stat-card span, .metric-line span, .list-item span, summary span:last-child { color: var(--muted); }
.stat-card strong { display: block; margin-top: 8px; font-size: 30px; }

.columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.columns--wide { grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); }

.list-item, .metric-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.editor-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 250, 240, 0.62);
}

.editor-card + .editor-card { margin-top: 12px; }

.list-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 250, 240, 0.62);
}

.list-card + .list-card {
    margin-top: 12px;
}

summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 12px;
}

.badge, .chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(197, 90, 17, 0.12);
    color: var(--accent-dark);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tabbar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.filter-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 18px;
}

.filter-chip {
    width: auto;
    white-space: nowrap;
    border-radius: 999px;
    background: rgba(255, 250, 240, 0.82);
    color: var(--ink);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
}

.tab.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.category-block + .category-block {
    margin-top: 24px;
}

.category-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.mini-card { padding: 18px; }
.mini-card h2 { font-size: 24px; margin-bottom: 10px; }

.card-media {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 14px;
}

.mini-card footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    color: var(--muted);
}

@media (max-width: 860px) {
    .hero, .mini-hero, .columns, .columns--wide {
        grid-template-columns: 1fr;
        display: grid;
    }

    .search-form {
        grid-template-columns: 1fr;
    }
}
