:root {
    --bg: #fffdf8;
    --text: #1b1b1b;
    --muted: #666;
    --card: #ffffff;
    --line: #ece7db;
    --accent: #d8662c;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}
a { color: var(--accent); }
button { font: inherit; }
input[type="search"],
input[type="number"] {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}
.site-header, .site-footer {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.site-footer { border-top: 1px solid var(--line); border-bottom: 0; margin-top: 48px; padding: 24px 0; }
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
}
.logo {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 24px;
}
.search-form { position: relative; flex: 1; max-width: 420px; }
.search-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 16px 40px rgba(0,0,0,.08);
    z-index: 50;
}
.search-results a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
}
.search-results a:hover { background: #f8f4eb; }
.hero { padding: 32px 0 8px; }
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 24px 0 16px;
}
.grid.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--text);
}
.chip span {
    color: var(--muted);
    font-size: 14px;
}
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
}
.card-image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 12px;
    display: block;
}
.card-image.placeholder {
    aspect-ratio: 16/10;
    border-radius: 14px;
    background: linear-gradient(135deg, #f5ddc5, #f8efe7);
    margin-bottom: 12px;
}
.card a { color: inherit; text-decoration: none; }
.recipe-header, .ingredients-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 20px;
}
.recipe-actions,
.ingredients-header,
.cooking-mode-head,
.cooking-controls,
.rating-stars {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.button,
.star-button {
    border: 1px solid var(--line);
    background: #fff7f1;
    color: var(--text);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
}
.button.is-active,
.star-button:hover {
    background: #ffe4d4;
}
.star-button:disabled {
    opacity: .6;
    cursor: not-allowed;
}
.recipe-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); }
.recipe-main-image {
    width: 100%;
    max-width: 860px;
    border-radius: 18px;
    display: block;
    object-fit: cover;
}
.recipe-excerpt {
    font-size: 18px;
}
.ingredients-box ul { padding-left: 18px; }
.ingredient-name { font-weight: 500; }
.muted { color: var(--muted); }
.success { color: #1f7a38; }
.error { color: #b42318; }
.faq-item + .faq-item { margin-top: 16px; }
.cooking-step-card {
    background: #fff7f1;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    font-size: 22px;
    line-height: 1.6;
}
.recipe-page.is-cooking-mode .no-print {
    display: none !important;
}
.search-results .empty {
    padding: 10px 12px;
    color: var(--muted);
}
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0;
}
.page-link {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    text-decoration: none;
    color: var(--text);
}
.page-link.is-current {
    background: #ffe4d4;
    border-color: #ffc7a8;
}
.breadcrumbs { margin: 24px 0 12px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
@media (max-width: 700px) {
    .site-header .container, .section-head { flex-direction: column; align-items: stretch; }
    .search-form { max-width: none; }
    .cooking-step-card { font-size: 18px; }
}
