body {
    padding-top: 0;
}

/* Global type scheme: consistent everywhere, with optional hand-accent */
:root{
    --font-base: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

html, body{
    font-family: var(--font-base);
}

/* Use the same family for headings too (Bootstrap sometimes varies by component/theme) */
h1, h2, h3, h4, h5, h6{
    font-family: var(--font-base);
}

body {
    background-color: #f6f1e7;
    background-image: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 55%),
    radial-gradient(ellipse at bottom, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0) 60%),
    repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.015),
            rgba(0, 0, 0, 0.015) 1px,
            rgba(255, 255, 255, 0.015) 2px,
            rgba(255, 255, 255, 0.015) 4px
    );
    background-attachment: fixed;
}

/* Recipe title: make it consistent with the site (less disjointed),
   while keeping the highlight/underline styling you already like. */
.recipe-title {
    position: relative;
    display: inline-block;

    padding: 0.2rem 0.7rem 0.35rem;
    margin-left: -0.15rem;

    font-family: var(--font-base);
    font-weight: 800;
    letter-spacing: -0.02em;

    background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.0), rgba(255, 255, 255, 0.0) 55%, rgba(255, 255, 255, 0.55) 55%, rgba(255, 255, 255, 0.55)),
            linear-gradient(90deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0));
    border-radius: 0.85rem;

    box-shadow:
            inset 0 -1px 0 rgba(0, 0, 0, 0.08),
            0 1px 0 rgba(255, 255, 255, 0.45);
}

.recipe-title::after {
    content: "";
    position: absolute;
    left: 0.7rem;
    right: 0.7rem;
    bottom: -0.35rem;

    height: 6px;
    border-radius: 999px;
    transform: rotate(-1.2deg);

    background: linear-gradient(
            90deg,
            rgba(13, 110, 253, 0),
            rgba(13, 110, 253, 0.55),
            rgba(13, 110, 253, 0)
    );
    filter: blur(0.15px);
    opacity: 0.95;
}

/* Drag Handle styling */
.drag-handle {
        cursor: grab;
        user-select: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border: 1px solid #ced4da;
        border-radius: 0.375rem;
        background: #f8f9fa;
        color: #6c757d;
        font-size: 1rem;
        line-height: 1;
    }
    .drag-handle:active {
        cursor: grabbing;
    }
    tr.sortable-ghost {
        opacity: 0.45;
    }

/* Active recipe highlight in the sidebar */
#itemList .nav-link.active {
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    border-radius: 0.375rem;
}

/* A consistent "paper surface" used for navbar + main content */
.paper-surface {
    background-color: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Navbar: warm paper strip that matches the page */
.navbar-paper {
    background-color: rgba(246, 241, 231, 0.92);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.section-card .list-group-item {
    background-color: transparent;
}

.section-card .form-control {
    background-color: rgba(255, 255, 255, 0.85);
}

.recipe-description {
    color: var(--bs-body-color);
    font-weight: 350;
}

.recipe-description-panel {
    padding-right: 1rem;
    /*border-right: 1px solid rgba(0, 0, 0, 0.12);*/
}

.recipe-meta-panel {
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.48);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    line-height: 1.55;
}

.recipe-meta-panel > div + div {
    margin-top: 0.45rem;
}


/* Sexy section titles (Ingredients / Directions) */
.recipe-section-title {
    position: relative;
    display: inline-block;
    padding: 0.15rem 0.6rem 0.25rem;
    border-radius: 0.55rem;

    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;

    background: linear-gradient(90deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0));
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.10);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.recipe-section-title::after {
    content: "";
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: -0.4rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(
            90deg,
            rgba(13, 110, 253, 0),
            rgba(13, 110, 253, 0.45),
            rgba(13, 110, 253, 0)
    );
    opacity: 0.9;
}

/* Reusable header row styling for Ingredients + Directions */
.recipe-group-header {
    display: block;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-weight: 800;
    text-align: left;
    letter-spacing: 0.02em;
}

/* ... existing code ... */

.recipe-tags .badge {
    font-weight: 500;
    letter-spacing: 0.1px;
}

.recipe-meta-sep {
    height: 10px;
    width: 100%;
    opacity: .5;
    background: repeat-x center / 120px 10px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M2 6 C 12 2, 22 10, 32 6 S 52 2, 62 6 S 82 10, 92 6 S 112 2, 118 6' fill='none' stroke='%231f2937' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ... existing code ... */
/* Comments: extra-subtle paper panel (lighter than the other tinted cards) */
.comments-card {
    background-color: rgba(255, 255, 255, 0.45);
    border-color: rgba(0, 0, 0, 0.06);
}

/* Keep list items transparent so the card tint shows through */
.comments-card .list-group-item {
    background-color: transparent;
}


@media print {
    @page {
        size: letter;
        margin: 0.6in;
    }

    html, body {
        background: #fff !important;
        color: #000 !important;
    }

    /* Hide chrome */
    .no-print,
    nav,
    .navbar,
    .btn,
    button {
        display: none !important;
    }

    /* Use full width for print */
    .container {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Remove card look */
    .card,
    .paper-surface,
    .section-card {
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    /* Typography */
    .recipe-print h1 {
        font-size: 18pt;
        margin: 0 0 0.15in 0;
    }

    .recipe-print .recipe-description {
        font-size: 11pt;
        line-height: 1.35;
        margin: 0 0 0.2in 0;
    }

    .recipe-meta-sep { opacity: .55; }

    /* IMPORTANT: don't turn Bootstrap .row into grid (causes print overlap) */
    .recipe-print-body.row {
        display: block !important;
        margin: 0 !important;          /* neutralize Bootstrap negative row margins */
        padding: 0 !important;
    }

    /* Create a stable print layout using our wrapper instead */
    .recipe-print-body {
        display: grid !important;
        grid-template-columns: 2.2in 1fr;
        column-gap: 0.25in;
        align-items: start;
    }

    /* Neutralize Bootstrap column padding/gutters inside the print grid */
    .recipe-print-body > .recipe-print-ingredients,
    .recipe-print-body > .recipe-print-directions {
        padding: 0 !important;
        margin: 0 !important;
        width: auto !important;
        max-width: none !important;
        flex: none !important;
    }

    /* Keep list content from doing anything weird */
    .recipe-print-directions ol,
    .recipe-print-directions li {
        position: static !important;
        float: none !important;
        clear: none !important;
        overflow: visible !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: anywhere;
    }

    /* Tighten up the space between description and the main grid */
    .recipe-print-header {
        margin-bottom: 0.12in !important; /* overrides Bootstrap mb-4 */
    }

    .recipe-print-description .card-body {
        padding-top: 0 !important;        /* overrides py-2 */
        padding-bottom: 0 !important;
    }

    .recipe-print .recipe-description {
        margin-bottom: 0.08in !important; /* overrides mb-3 + our earlier margin */
    }

    /* Reduce header spacing inside sections (Ingredients/Directions) */
    .recipe-print-ingredients h2,
    .recipe-print-directions h2 {
        margin-bottom: 0.08in !important; /* overrides mb-3 */
    }

    /* Keep section titles clean on paper */
    .recipe-section-title {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .recipe-section-title::after {
        display: none !important;
    }

    /* Keep recipe title clean on paper */
    .recipe-title {
        font-family: inherit !important;
        background: transparent !important;
        box-shadow: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
    }

    .recipe-title::after {
        display: none !important;
    }

    /* Avoid awkward splits */
    h2 {
        page-break-after: avoid;
        break-after: avoid;
    }

    ul, ol, dl {
        margin-bottom: 0 !important;
    }

    li {
        font-size: 10.5pt;
        line-height: 1.3;
    }

    /* Ingredients list: remove list-group separators/padding for compact print */
    .list-group-item {
        border: 0 !important;
        padding-top: 0.05in !important;
        padding-bottom: 0.05in !important;
    }
}