.recipe-list-tabs {
    display: flex;
    gap: 0.35rem;
    width: fit-content;
    margin: 0 0 1.5rem;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);
}

.recipe-list-tabs a {
    padding: 0.5rem 0.8rem;
    border-radius: 7px;
    color: var(--muted);
    font-weight: 800;
}
.recipe-list-tabs a.active {
    background: var(--paper);
    color: var(--violet-dark);
    box-shadow: 0 3px 10px rgb(38 25 65 / 0.1);
}
.recipe-directory,
.recipe-author-list {
    display: grid;
    gap: 0.8rem;
}
.recipe-author-group,
.recipe-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
}
.recipe-author-group > summary,
.recipe-card > summary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    color: var(--violet-dark);
    font-weight: 900;
    cursor: pointer;
}
.recipe-author-group > summary {
    font-size: 1.08rem;
}
.recipe-author-group > summary::marker,
.recipe-card > summary::marker {
    color: var(--violet-dark);
}
.recipe-author-group[open] > summary,
.recipe-card[open] > summary {
    border-bottom: 1px solid var(--line);
    background: var(--soft);
}
.recipe-count,
.recipe-card-author {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}
.recipe-author-group > .recipe-directory {
    padding: 1rem;
}
.recipe-card-content {
    padding: 1rem;
}
.recipe-card-content > :first-child {
    margin-top: 0;
}
.recipe-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.recipe-sections h3 {
    margin-bottom: 0.35rem;
}
.recipe-sections ul {
    margin-top: 0;
}
.recipe-instructions > :first-child {
    margin-top: 0;
}
.recipe-type-picker {
    margin: 1.25rem 0;
}
.post-form .recipe-type-picker > label {
    margin: 0;
    font-size: 1rem;
    font-weight: 850;
}
.recipe-type-picker > select {
    display: none;
}
.recipe-taxonomy-picker {
    margin-top: 0.4rem;
}
.recipe-taxonomy-picker #recipe-type-choices {
    display: grid;
    gap: 0.8rem;
}
.recipe-taxonomy-picker #recipe-type-choices.is-empty::after {
    padding: 1rem;
    color: var(--muted);
    text-align: center;
    content: attr(data-empty-message);
}
.recipe-taxonomy-picker + .helptext {
    margin: 0.45rem 0 0;
}
.recipe-card-title {
    display: grid;
}
.recipe-card-title small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}
.recipe-card-summary-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-left: auto;
}
.recipe-card-summary-actions form {
    margin: 0;
}
.recipe-favorite {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    min-height: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--violet-dark);
    font-size: 1.35rem;
    line-height: 1;
    place-items: center;
    cursor: pointer;
}
.recipe-favorite.is-favorite {
    border-color: #d65b78;
    background: color-mix(in srgb, #ffdbe4 65%, var(--paper));
    color: #bd3457;
}

.recipe-book-hero {
    position: relative;
    overflow: hidden;
}
.recipe-book-hero::after {
    position: absolute;
    right: clamp(1rem, 5vw, 4rem);
    bottom: -0.35rem;
    color: color-mix(in srgb, var(--hero-ink) 28%, transparent);
    font-size: clamp(4rem, 10vw, 7rem);
    line-height: 1;
    content: "♨";
    pointer-events: none;
    transform: rotate(-8deg);
}
.recipe-book-hero .button {
    position: relative;
    z-index: 1;
}
.recipe-book-controls {
    display: grid;
    grid-template-columns: auto minmax(220px, 420px);
    align-items: end;
    gap: 0.8rem 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--line) 70%, #bd7e51);
    border-radius: 14px;
    background: color-mix(in srgb, var(--paper) 92%, #f4d6aa);
    box-shadow: 0 8px 24px rgb(65 39 20 / 0.08);
}
.recipe-collection-toggle {
    display: flex;
    gap: 0.3rem;
    width: fit-content;
    padding: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--canvas);
}
.recipe-collection-toggle a {
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 800;
}
.recipe-collection-toggle a.active {
    background: var(--paper);
    color: var(--violet-dark);
    box-shadow: 0 2px 8px rgb(40 25 15 / 0.12);
}
.recipe-book-search {
    display: grid;
    gap: 0.3rem;
    font-weight: 800;
}
.recipe-book-search input {
    min-height: 44px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}
.recipe-type-controls {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.65rem;
}
.recipe-type-controls label {
    display: grid;
    flex: 1 1 190px;
    gap: 0.3rem;
    font-weight: 800;
}
.recipe-type-controls select {
    min-height: 42px;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}
.recipe-type-controls button {
    min-height: 42px;
}
.recipe-glossary {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding-top: 0.7rem;
    border-top: 1px dashed color-mix(in srgb, var(--line) 70%, #bd7e51);
}
.recipe-glossary span {
    margin-right: 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.recipe-glossary a {
    display: grid;
    width: 2rem;
    height: 2rem;
    border-radius: 7px 7px 3px 3px;
    background: var(--soft);
    color: var(--violet-dark);
    font-weight: 900;
    place-items: center;
}
.recipe-book {
    position: relative;
    min-height: 360px;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem)
        clamp(2rem, 5vw, 4rem);
    border: 1px solid color-mix(in srgb, var(--line) 65%, #9a623e);
    border-radius: 8px 18px 18px 8px;
    background: repeating-linear-gradient(
        0deg,
        color-mix(in srgb, var(--paper) 98%, #f3dfbd) 0,
        color-mix(in srgb, var(--paper) 98%, #f3dfbd) 31px,
        color-mix(in srgb, var(--line) 35%, transparent) 32px
    );
    box-shadow:
        -8px 8px 0 color-mix(in srgb, var(--violet-dark) 28%, #6d3b25),
        var(--shadow);
}
.recipe-book::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 1rem;
    width: 0.65rem;
    background: radial-gradient(
            circle,
            var(--canvas) 0 35%,
            color-mix(in srgb, var(--line) 75%, #74513b) 38% 52%,
            transparent 55%
        )
        center 1rem/0.65rem 3rem repeat-y;
    content: "";
}
.recipe-letter-group {
    scroll-margin-top: 1rem;
}
.recipe-letter-group + .recipe-letter-group {
    margin-top: 1.35rem;
}
.recipe-letter-group > h2 {
    display: inline-grid;
    min-width: 2.5rem;
    min-height: 2.5rem;
    margin: 0 0 0.55rem;
    border-radius: 8px 12px 4px 4px;
    background: color-mix(in srgb, var(--aqua) 35%, var(--paper));
    color: var(--violet-dark);
    font-family: Georgia, serif;
    place-items: center;
}
.recipe-book .recipe-card {
    border-color: color-mix(in srgb, var(--line) 70%, #bd946c);
    background: color-mix(in srgb, var(--paper) 97%, #f7dfb7);
    box-shadow: 0 4px 12px rgb(67 43 24 / 0.08);
}
.recipe-book .recipe-card > summary {
    min-height: 58px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.08rem;
}
.recipe-book .recipe-card[open] {
    box-shadow: 0 12px 30px rgb(67 43 24 / 0.14);
}
.recipe-book .recipe-card-content {
    padding: clamp(1rem, 3vw, 2rem);
    font-size: 1.05rem;
}
.recipe-book .recipe-instructions {
    line-height: 1.8;
}
.recipe-type-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.recipe-type-tags span {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--aqua) 25%, var(--paper));
    color: var(--violet-dark);
    font-size: 0.8rem;
    font-weight: 850;
}
.recipe-search-empty {
    padding: 1rem;
    text-align: center;
    font-weight: 800;
}

@media (max-width: 520px) {
    .recipe-list-tabs {
        width: 100%;
    }
    .recipe-list-tabs a {
        flex: 1;
        text-align: center;
    }
    .recipe-card-author {
        display: none;
    }
    .recipe-book-controls {
        grid-template-columns: 1fr;
    }
    .recipe-glossary {
        grid-column: 1;
    }
    .recipe-book {
        padding-left: 2.2rem;
    }
}
