:root {
    --bg: #fafaf8;
    --card: #fff;
    --text: #1f2328;
    --muted: #6b7280;
    --accent: #e85d3d;
    --border: #ececec;
    --radius: 16px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 40px; background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
}
.logo { font-weight: 700; font-size: 20px; }
.site-header nav a { margin-left: 20px; color: var(--muted); }
.site-header nav a:hover { color: var(--accent); }

.container { max-width: 1100px; margin: 0 auto; padding: 40px 24px; }

.hero { text-align: center; padding: 40px 0 20px; }
.hero h1 { font-size: 44px; margin: 0 0 8px; letter-spacing: -1px; }
.hero p { color: var(--muted); margin: 0 0 24px; }
.search input {
    width: 100%; max-width: 480px; padding: 14px 20px; font-size: 16px;
    border: 1px solid var(--border); border-radius: 999px; outline: none;
    background: #fff; transition: border .2s;
}
.search input:focus { border-color: var(--accent); }

.grid {
    display: grid; gap: 24px; margin-top: 40px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
    background: var(--card); border-radius: var(--radius);
    overflow: hidden; transition: transform .2s, box-shadow .2s;
    border: 1px solid var(--border);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.07); }
.card-img { aspect-ratio: 4/3; background: #f4f1ec; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.05); }
.placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 60px;
}
.card-body { padding: 20px; }
.badge {
    display: inline-block; padding: 4px 10px; font-size: 12px;
    background: #fff3ef; color: var(--accent); border-radius: 999px;
    font-weight: 600; margin-bottom: 8px;
}
.card-body h2 { font-size: 18px; margin: 4px 0 8px; }
.card-body p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.meta { font-size: 13px; color: var(--muted); }

.recipe { max-width: 900px; margin: 0 auto; }
.recipe-header h1 { font-size: 42px; margin: 0 0 12px; letter-spacing: -1px; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 24px; }
.recipe-meta {
    display: flex; flex-wrap: wrap; gap: 24px;
    padding: 20px; background: #fff; border-radius: var(--radius);
    border: 1px solid var(--border); margin-bottom: 32px;
    font-size: 14px;
}
.recipe-hero {
    width: 100%; border-radius: var(--radius); margin-bottom: 32px;
    aspect-ratio: 16/9; object-fit: cover;
}
.recipe-columns {
    display: grid; grid-template-columns: 1fr 2fr; gap: 40px;
}
@media (max-width: 700px) { .recipe-columns { grid-template-columns: 1fr; } }

.ingredients {
    background: #fff; padding: 24px; border-radius: var(--radius);
    border: 1px solid var(--border); align-self: start;
    position: sticky; top: 100px;
}
.ingredients h2, .steps h2 { font-size: 20px; margin: 0 0 16px; }
.ingredients ul { list-style: none; padding: 0; margin: 0; }
.ingredients li {
    padding: 10px 0; border-bottom: 1px dashed var(--border);
    display: flex; justify-content: space-between; gap: 12px;
}
.ingredients li:last-child { border-bottom: 0; }
.amount { color: var(--muted); font-size: 14px; white-space: nowrap; }

.steps ol { list-style: none; padding: 0; margin: 0; }
.steps li {
    display: flex; gap: 20px; margin-bottom: 24px; align-items: flex-start;
}
.step-num {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.step-text { padding-top: 6px; }

.admin { background: #f4f5f7; padding: 24px; }
.admin-bar {
    max-width: 1000px; margin: 0 auto 24px; display: flex;
    justify-content: space-between; align-items: center;
}
.admin-bar h1 { margin: 0; }
.btn {
    display: inline-block; padding: 10px 18px; background: var(--accent);
    color: #fff; border: 0; border-radius: 10px; cursor: pointer;
    font-size: 14px; font-weight: 600; text-decoration: none;
    transition: filter .2s;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }

.admin-table {
    width: 100%; max-width: 1000px; margin: 0 auto; background: #fff;
    border-radius: var(--radius); border-collapse: collapse; overflow: hidden;
}
.admin-table th, .admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: #fafafa; font-size: 13px; color: var(--muted); }
.actions .link-danger { background: none; border: 0; cursor: pointer; font-size: 16px; }

.recipe-form {
    max-width: 1000px; margin: 0 auto; background: #fff;
    padding: 32px; border-radius: var(--radius);
}
.recipe-form label { display: block; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.recipe-form input, .recipe-form textarea, .recipe-form select {
    width: 100%; padding: 10px 14px; margin-top: 6px;
    border: 1px solid var(--border); border-radius: 10px;
    font-size: 15px; font-family: inherit; font-weight: normal;
}
.recipe-form input:focus, .recipe-form textarea:focus { border-color: var(--accent); outline: none; }
.recipe-form fieldset {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; margin: 20px 0;
}
.recipe-form legend { font-weight: 700; padding: 0 8px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.ing-row, .step-row {
    display: flex; gap: 10px; margin-bottom: 10px; align-items: flex-start;
}
.ing-row input { flex: 1; }
.step-row textarea { flex: 1; }
.remove {
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    width: 40px; height: 40px; cursor: pointer; color: #999;
}
.remove:hover { color: var(--accent); border-color: var(--accent); }
.preview { max-height: 100px; margin-top: 8px; border-radius: 8px; }
.error {
    background: #fee; color: #b00; padding: 12px; border-radius: 10px;
    margin-bottom: 16px;
}
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

.admin-login {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: #f4f5f7; margin: 0;
}
.login-box {
    background: #fff; padding: 40px; border-radius: var(--radius);
    width: 100%; max-width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.08);
}
.login-box h1 { margin: 0 0 20px; font-size: 24px; }
.login-box input {
    width: 100%; padding: 12px 16px; margin-bottom: 12px;
    border: 1px solid var(--border); border-radius: 10px; font-size: 15px;
}
.login-box button {
    width: 100%; padding: 12px; background: var(--accent); color: #fff;
    border: 0; border-radius: 10px; font-size: 15px; font-weight: 600;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: background .2s, border-color .2s;
}
.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.pagination .current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}
.pagination .dots {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: default;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 12px;
    align-items: center;
}
.filters-tags {
    margin: 0 0 24px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}
.filters-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    margin-right: 4px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    color: var(--text);
    transition: all .2s;
}
.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.chip.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.chip .count {
    background: rgba(0,0,0,.08);
    border-radius: 10px;
    padding: 0 8px;
    font-size: 12px;
}
.chip.active .count { background: rgba(255,255,255,.25); }
.chip-sm {
    padding: 5px 12px;
    font-size: 13px;
}
.filter-summary {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 16px;
}
.filter-summary a {
    color: var(--accent);
    text-decoration: underline;
}

/* Recipe page — new blocks */
.category-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: #fff3ef;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.category-link:hover { background: var(--accent); color: #fff; }

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.nutrition {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}
.nutrition > div {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}
.nutrition > div span {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.steps li { align-items: flex-start; }
.step-body { flex: 1; }
.step-image {
    margin-top: 12px;
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

.recipe-tips {
    margin-top: 40px;
    padding: 24px;
    background: #fffef8;
    border: 1px solid #f0e6c8;
    border-radius: var(--radius);
}
.recipe-tips h2 {
    margin-top: 0;
    color: #8a6d1f;
}
.recipe-tips > div {
    font-size: 15px;
    line-height: 1.7;
}

.recipe-ad-top, .recipe-ad-bottom {
    margin: 24px 0;
    text-align: center;
}

/* Related recipes */
.related {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.related h2 {
    font-size: 26px;
    margin: 0 0 20px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.related-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,.07);
}
.related-img {
    aspect-ratio: 4/3;
    background: #f4f1ec;
    overflow: hidden;
}
.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.related-card:hover .related-img img { transform: scale(1.05); }
.related-body {
    padding: 14px 16px 18px;
}
.related-body h3 {
    font-size: 16px;
    margin: 0 0 8px;
    line-height: 1.35;
}
.related-body .meta {
    font-size: 13px;
    color: var(--muted);
}

/* Rating */
.rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.stars {
    display: flex;
    gap: 2px;
}
.star {
    background: transparent;
    border: 0;
    padding: 2px;
    font-size: 26px;
    color: #ddd;
    cursor: pointer;
    line-height: 1;
    transition: color .15s, transform .15s;
}
.star:hover,
.star.hovered,
.star.filled { color: #f5a623; }
.star:hover { transform: scale(1.15); }
.rating[data-rated="1"] .star { cursor: default; }
.rating[data-rated="1"] .star:hover { transform: none; }
.rating-label {
    font-size: 14px;
    color: var(--muted);
}

/* Comments */
.comments {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    width: 100%;
}
.comments h2 {
    font-size: 26px;
    margin: 0 0 20px;
}
#vk_comments, #vk_comments iframe {
    width: 100% !important;
    max-width: 100% !important;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}
.breadcrumbs a {
    color: var(--muted);
    transition: color .2s;
}
.breadcrumbs a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.breadcrumbs .sep {
    color: #ccc;
}
.breadcrumbs .current {
    color: var(--text);
    font-weight: 500;
    /* обрезаем длинные названия */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

/* Header / Nav / Burger */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.logo {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -.5px;
    white-space: nowrap;
}
.main-nav {
    display: flex;
    gap: 6px;
    align-items: center;
}
.main-nav a {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 15px;
    color: var(--text);
    transition: background .2s, color .2s;
}
.main-nav a:hover {
    background: #fff3ef;
    color: var(--accent);
}

/* Burger */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
}
.burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile */
@media (max-width: 900px) {
    .burger { display: flex; }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border-bottom: 1px solid var(--border);
        padding: 8px 16px 16px;
        gap: 2px;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease, padding .3s ease;
        padding-top: 0;
        padding-bottom: 0;
    }
    .main-nav.open {
        max-height: 500px;
        padding-top: 8px;
        padding-bottom: 16px;
    }
    .main-nav a {
        padding: 12px 14px;
        border-radius: 10px;
    }
}

/* Wider container a bit */
.container {
    max-width: 1200px;
}

/* Container / grid adjustments on mobile */
@media (max-width: 600px) {
    .container { padding: 24px 16px; }
    .hero h1 { font-size: 32px; }
    .hero p  { font-size: 15px; }
    .recipe-header h1 { font-size: 28px; }
    .recipe-meta { flex-direction: column; gap: 8px; }
    .recipe-columns { grid-template-columns: 1fr; }
    .ingredients { position: static; }
    .pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 10px; font-size: 13px; }
    .filters { gap: 6px; }
    .chip { padding: 6px 12px; font-size: 13px; }
    .chip-sm { padding: 4px 10px; font-size: 12px; }
    .rating { flex-direction: column; align-items: flex-start; }
    .star { font-size: 32px; }
    .breadcrumbs .current { max-width: 100%; white-space: normal; }
}

/* Icons */
.icon {
    display: inline-block;
    vertical-align: -3px;
    color: inherit;
    flex-shrink: 0;
}
.meta .icon,
.recipe-meta .icon {
    color: var(--accent);
    margin-right: 2px;
}
.placeholder .icon {
    color: #c8c0b4;
}

/* Заголовки с иконками */
.ingredients h2,
.steps h2,
.related h2,
.comments h2,
.recipe-tips h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px !important;
    line-height: 1.3;
    margin-bottom: 16px;
}
.ingredients h2 .icon,
.steps h2 .icon,
.related h2 .icon,
.comments h2 .icon,
.recipe-tips h2 .icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
}
.ingredients h2 .icon,
.steps h2 .icon,
.related h2 .icon,
.comments h2 .icon,
.recipe-tips h2 .icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

/* === Dark theme === */
[data-theme="dark"] {
    --bg: #14171c;
    --card: #1c2027;
    --text: #e7e9ec;
    --muted: #8a93a0;
    --border: #2a2f37;
    --accent: #ff6a45;
}
[data-theme="dark"] body { background: var(--bg); color: var(--text); }

[data-theme="dark"] .site-header {
    background: rgba(20, 23, 28, .92);
    border-bottom-color: var(--border);
}
[data-theme="dark"] .main-nav a:hover { background: rgba(255,106,69,.15); }
[data-theme="dark"] .burger { border-color: var(--border); }
[data-theme="dark"] .burger span { background: var(--text); }

[data-theme="dark"] .card,
[data-theme="dark"] .related-card,
[data-theme="dark"] .chip,
[data-theme="dark"] .pagination a,
[data-theme="dark"] .pagination span,
[data-theme="dark"] .recipe-meta,
[data-theme="dark"] .ingredients,
[data-theme="dark"] .rating,
[data-theme="dark"] .related,
[data-theme="dark"] .nutrition > div,
[data-theme="dark"] .login-box,
[data-theme="dark"] .recipe-form,
[data-theme="dark"] .admin-table {
    background: var(--card);
    border-color: var(--border);
    color: var(--text);
}
[data-theme="dark"] .card-img,
[data-theme="dark"] .related-img { background: #23282f; }
[data-theme="dark"] .badge { background: rgba(255,106,69,.15); }
[data-theme="dark"] .chip.active { background: var(--accent); color: #fff; }
[data-theme="dark"] .pagination .current { background: var(--accent); color: #fff; }

[data-theme="dark"] .recipe-tips {
    background: #24201a;
    border-color: #3a3220;
}
[data-theme="dark"] .recipe-tips h2 { color: #e0b850; }

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #23282f;
    color: var(--text);
    border-color: var(--border);
}
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus { border-color: var(--accent); }

[data-theme="dark"] .admin { background: #14171c; }
[data-theme="dark"] .admin-table th { background: #23282f; }
[data-theme="dark"] .error { background: #3a1a1a; color: #ff9b9b; }
[data-theme="dark"] .btn.ghost { background: #23282f; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .btn.ghost:hover { border-color: var(--accent); }

/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    color: var(--text);
    padding: 0;
    transition: color .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .theme-icon { display: flex; }
.theme-toggle .sun { display: flex; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: flex; }

/* Scroll to top */
.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(232, 93, 61, .35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity .3s, transform .3s, visibility .3s, filter .2s;
    z-index: 100;
}
.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-top:hover { filter: brightness(1.1); }
.scroll-top svg { width: 22px; height: 22px; }

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 24px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
}
.footer-heart {
    display: inline-block;
    color: #e74c3c;
    animation: pulse-heart 1.4s ease-in-out infinite;
    transform-origin: center;
    margin: 0 4px;
}
@keyframes pulse-heart {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.25); }
}

/* Share buttons */
.share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.share-label {
    font-size: 14px;
    color: var(--muted);
    margin-right: 4px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #fff;
    transition: transform .15s, filter .15s;
}
.share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}
.share-btn.vk  { background: #0077FF; }
.share-btn.ok  { background: #EE8208; }
.share-btn.tg  { background: #29A9EB; }

/* === Печать рецепта === */
@media print {
    header, footer, nav,
    .site-header, .site-footer, .main-header, .main-footer,
    .breadcrumbs, .breadcrumb, .crumbs,
    .share-row, .share-buttons, .share,
    .rating, .recipe-rating, .stars,
    .comments, .comments-section, #comments,
    .related, .related-recipes, .similar-recipes,
    .advert, .ads, .banner,
    .to-top, .back-to-top, .scroll-top,
    .sidebar, aside,
    .menu, .main-menu, .mobile-menu,
    .cookie-notice, .cookie-banner {
        display: none !important;
    }

    html, body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
        margin: 0;
        padding: 0;
    }
    a { color: #000 !important; text-decoration: none !important; }

    * {
        box-shadow: none !important;
        text-shadow: none !important;
        border-radius: 0 !important;
    }

    .recipe, .recipe-wrap, .recipe-container, .container, .content, main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .recipe-ingredients, .ingredients,
    .recipe-steps, .steps,
    .recipe-columns, .recipe-grid {
        display: block !important;
        column-count: 1 !important;
        width: 100% !important;
    }

    .recipe-steps img, .steps img, .step img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }

    h1, h2, h3 { page-break-after: avoid; }
    h1 { font-size: 20pt; margin: 0 0 8pt; }
    h2 { font-size: 14pt; margin: 12pt 0 6pt; }

    .step, .recipe-step { page-break-inside: avoid; }
    a[href]::after { content: "" !important; }
}

/* Кнопки «Распечатать» и «Поделиться» — в одну линию */
.recipe-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 16px 0 8px;
}
.recipe-actions > * {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}
.recipe-actions .share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 !important;
}
.recipe-actions .share-label {
    margin: 0 !important;
    line-height: 1 !important;
}
.recipe-actions .share-btn {
    margin: 0 !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

/* === Кнопки «Почта» и «Печать» в блоке Поделиться === */
.share-btn.mail  { background: #6b7280; }
.share-btn.print { background: #374151; color: #fff; border: 0; cursor: pointer; padding: 0; }
.share-btn.print:hover { filter: brightness(1.1); }

/* === Меню «Отправить на почту» === */
.share-mail-wrap {
    position: relative;
    display: inline-flex;
}
.share-mail-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    padding: 6px;
    z-index: 50;
}
.share-mail-wrap.open .share-mail-menu { display: block; }
.share-mail-menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}
.share-mail-menu a:hover { background: #f3f4f6; }

/* На мобильных меню не показываем — клик сразу открывает mailto */
@media (max-width: 768px) {
    .share-mail-menu { display: none !important; }
}

/* === Кнопки «Почта» / «Скопировать ссылку» / «Печать» === */
.share-btn.mail  { background: #6b7280; }
.share-btn.copy  { background: #0ea5e9; color: #fff; border: 0; cursor: pointer; padding: 0; }
.share-btn.copy:hover { filter: brightness(1.1); }
.share-btn.print { background: #374151; color: #fff; border: 0; cursor: pointer; padding: 0; }
.share-btn.print:hover { filter: brightness(1.1); }

/* На всякий случай — если в файле остались правила меню, они больше не нужны */
.share-mail-wrap,
.share-mail-menu { display: none !important; }

/* === Тост «Ссылка скопирована» === */
.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    background: #111827;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 9999;
}
.copy-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
    .copy-toast { transition: none; }
}

/* Static pages */
.static-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 0 20px;
}
.static-page h1 {
    font-size: 36px;
    margin: 0 0 24px;
    letter-spacing: -.5px;
}
.static-content {
    font-size: 16px;
    line-height: 1.75;
}
.static-content h2 { font-size: 22px; margin: 28px 0 12px; }
.static-content h3 { font-size: 18px; margin: 22px 0 10px; }
.static-content p  { margin: 0 0 14px; }
.static-content ul, .static-content ol { padding-left: 24px; margin: 0 0 14px; }
.static-content a  { color: var(--accent); text-decoration: underline; }

/* Footer links */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 8px;
}
.footer-links a {
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    transition: color .2s;
}
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

/* Cookie banner */
.cookie-banner {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 24px;
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
    padding: 18px 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity .3s, transform .3s, visibility .3s;
}
.cookie-banner.show { opacity: 1; visibility: visible; transform: translateY(0); }
.cookie-text {
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}
.cookie-text a { color: var(--accent); text-decoration: underline; }
.cookie-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}
.cookie-more {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}
.cookie-more:hover { color: var(--accent); }
.cookie-accept {
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: filter .2s;
}
.cookie-accept:hover { filter: brightness(1.1); }

[data-theme="dark"] .cookie-banner {
    background: var(--card);
    color: var(--text);
    border-color: var(--border);
}

@media (max-width: 600px) {
    .cookie-banner { flex-direction: column; align-items: stretch; left: 12px; right: 12px; bottom: 12px; }
    .cookie-actions { justify-content: flex-end; }
}

/* === Print === */
@media print {
    .site-header,
    .site-footer,
    .breadcrumbs,
    .rating,
    .share,
    .print-row,
    .comments,
    .related,
    .recipe-ad-top,
    .recipe-ad-bottom,
    .scroll-top,
    .cookie-banner,
    .main-nav,
    .burger,
    .theme-toggle {
        display: none !important;
    }
    body { background: #fff !important; color: #000 !important; }
    .container { max-width: 100% !important; padding: 0 !important; }
    .recipe { max-width: 100% !important; }
    .recipe-columns {
        display: block !important;
    }
    .ingredients {
        position: static !important;
        border: 1px solid #ccc !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }
    .recipe-hero { max-height: 260px; object-fit: cover; }
    .step-image { max-width: 60%; }
    h1 { font-size: 24px !important; }
    h2 { font-size: 18px !important; }
    .recipe-meta { border: 1px solid #ccc !important; }
    .step-num {
        background: #333 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    a { color: #000 !important; text-decoration: none !important; }
}

/* Article page */
.single-article {
    max-width: 800px;
    margin: 0 auto;
}
.article-header {
    margin-bottom: 24px;
}
.article-header h1 {
    font-size: 38px;
    letter-spacing: -.5px;
    margin: 0 0 12px;
    line-height: 1.2;
}
.article-header .meta {
    font-size: 14px;
    color: var(--muted);
}
.article-content {
    font-size: 16px;
    line-height: 1.75;
}
.article-content img {
    border-radius: var(--radius);
    margin: 16px 0;
}
@media (max-width: 600px) {
    .article-header h1 { font-size: 26px; }
}

/* Editor toolbar */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 8px;
    flex-wrap: wrap;
}
.editor-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: border-color .2s, color .2s;
}
.editor-upload:hover { border-color: var(--accent); color: var(--accent); }
.editor-hint { font-size: 13px; color: var(--muted); }
[data-theme="dark"] .editor-upload { background: #23282f; }
