.sommy-page {
    width: 100%;
    margin: 0;
    padding: 0 0 2.5rem;
}

.sommy-hero-grid { display: block; }
.sommy-hero-character { display: none; }

@media (min-width: 768px) {
    .sommy-hero-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 22rem;
        gap: 3rem;
        align-items: start;
    }

    .sommy-hero-character {
        display: block;
        position: relative;
        min-width: 0;
    }

    .sommy-hero-character__image {
        display: block;
        width: 100%;
        height: auto;
        max-width: 22rem;
        margin-left: auto;
        user-select: none;
        pointer-events: none;
    }
}

.sommy-prefs__back {
    color: #730a16;
    background: transparent;
    border: 0;
    outline: none;
}

.sommy-prefs__back:hover { color: #b5191f; }

.sommy-prefs__back:focus-visible,
.sommy-prefs__submit:focus-visible,
.sommy-pref__chip:focus-visible {
    outline: 2px solid #730a16;
    outline-offset: 2px;
}

.sommy-prefs__submit {
    color: #ffffff;
    background: #b5191f;
    border: 0;
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.sommy-prefs__submit:hover {
    background: #730a16;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(181, 25, 31, 0.18);
}

.sommy-prefs__title { color: #111827; }

.sommy-prefs__panel {
    width: 100%;
    margin: 0;
}

.sommy-prefs__summary {
    background: #ffffff;
    border: 1px solid rgba(181, 25, 31, 0.18);
    color: #1f2937;
    box-shadow: 0 6px 16px rgba(24, 3, 6, 0.04);
}

.sommy-prefs__summary-label { color: #730a16; }

/* One preference form, with aligned labels and quiet section dividers. */
.sommy-pref__grid {
    display: grid;
    background: #fff;
    border: 1px solid #e3d9d0;
    border-radius: 1rem;
    padding: 0 1.5rem;
}
.sommy-pref__group {
    min-width: 0;
    display: grid;
    grid-template-columns: 11.5rem minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
    padding: 1.25rem 0;
}
.sommy-pref__group + .sommy-pref__group { border-top: 1px solid #eee7e1; }
.sommy-pref__head { display: flex; align-items: center; min-height: 3rem; }
.sommy-pref__label { margin: 0; color: #1f2937; font-size: 1rem; line-height: 1.4; font-weight: 600; }
.sommy-pref__options,
.sommy-pref__sparkling { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.625rem; }
.sommy-pref__options--countries { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sommy-root .sommy-pref__chip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 3rem;
    padding: 0.625rem 1.5rem 0.625rem 0.75rem;
    border: 1px solid #d8d2cc;
    border-radius: 0.5rem;
    background: #faf8f6;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.sommy-root .sommy-pref__chip:hover { border-color: #a68f86; background: #f4ece6; }
.sommy-root .sommy-pref__chip--selected,
.sommy-root .sommy-pref__chip--selected:hover { border-color: #730a16; background: #730a16; color: #fff; }
.sommy-root .sommy-pref__check { visibility: hidden; position: absolute; right: 0.5rem; font-weight: 600; }
.sommy-root .sommy-pref__chip[aria-pressed="true"] .sommy-pref__check { visibility: visible; }
.sommy-root .sommy-pref__options--countries .sommy-pref__chip { min-height: 3.25rem; font-size: 0.8125rem; }
.sommy-root--preferences .sommy-page { max-width: 72rem; margin-inline: auto; }
.sommy-root--preferences .sommy-guided__dish { max-width: 74ch; margin-bottom: 1.5rem; color: #555e6a; }
.sommy-root--preferences .sommy-step__title,
.sommy-root--preferences .sommy-guided h1 { margin-bottom: 0.625rem; font-size: 2rem; font-weight: 600; }
.sommy-root .sommy-preferences__actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.25rem; }
.sommy-preferences__actions > :first-child { margin-right: auto; }
.sommy-pref__clear { min-height: 2.75rem; padding: 0.5rem 0; border: 0; background: transparent; color: #730a16; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sommy-pref__clear:focus-visible { outline: 2px solid #730a16; outline-offset: 3px; }
@media (min-width: 768px) {
    .sommy-root--preferences .sommy-progress > ol { gap: 0.375rem; }
    .sommy-root--preferences .sommy-progress li { gap: 0.375rem; }
    .sommy-root--preferences .sommy-steps__pill { padding: 0.375rem 0.625rem; font-size: 0.8125rem; }
    .sommy-root--preferences .sommy-steps__pill--completed { color: #555e6a; border-color: transparent; }
    .sommy-root--preferences .sommy-steps__pill--completed:hover { color: #730a16; background: #eee2d9; }
    .sommy-root--preferences .sommy-steps__sep { max-width: 0.75rem; }
}
@media (max-width: 1023px) {
    .sommy-pref__group { grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; }
    .sommy-pref__options--countries { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .sommy-pref__grid { padding: 0 1rem; border-radius: 0.875rem; }
    .sommy-pref__group { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; padding: 1.125rem 0; }
    .sommy-pref__head { min-height: 0; }
    .sommy-pref__options,
    .sommy-pref__sparkling,
    .sommy-pref__options--countries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sommy-root--preferences .sommy-step__title,
    .sommy-root--preferences .sommy-guided h1 { font-size: 1.5rem; }
    .sommy-root .sommy-preferences__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; }
    .sommy-preferences__actions .sommy-pref__clear { justify-self: end; }
    .sommy-preferences__actions > :last-child { grid-column: 1 / -1; width: 100%; margin-top: 0; }
}

/* Keep the first question and text entry together, ahead of discovery content. */
.sommy-start__header { margin: 1rem 0 1.25rem; max-width: 42rem; }
.sommy-start__header h1 { color: #111827; font-size: 1.75rem; line-height: 1.15; margin: 0 0 0.5rem; font-weight: 700; }
.sommy-start__header p { color: #4b5563; font-size: 1rem; line-height: 1.45; margin: 0; }
.sommy-start__question { color: #111827; font-size: 1.25rem; line-height: 1.3; font-weight: 600; margin: 0 0 0.75rem; }
.sommy-start__choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; }
.sommy-start__choice { min-height: 3rem; padding: 0.75rem 1rem; border: 1px solid #d8d2cc; border-radius: 0.75rem; background: #fff; color: #730a16; font-size: 1rem; font-weight: 600; text-align: center; cursor: pointer; }
.sommy-start__choice:hover, .sommy-start__choice[aria-pressed="true"] { border-color: #b5191f; background: rgba(181, 25, 31, 0.05); }
.sommy-ingredient-toggle { display: none; }
@media (max-width: 767px) {
    #sommy-main-ingredients:not([data-expanded="true"]) .sommy-ingredient-option--extra { display: none; }
    .sommy-ingredient-toggle { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.75rem; margin: 0.75rem auto 0; padding: 0.5rem 0.75rem; border: 0; background: transparent; color: #730a16; font-size: 0.9375rem; font-weight: 600; cursor: pointer; }
    .sommy-ingredient-toggle:hover { text-decoration: underline; }
    .sommy-ingredient-toggle:focus-visible { outline: 2px solid #730a16; outline-offset: 3px; border-radius: 0.375rem; }
}
.sommy-start__divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 1.125rem; color: #730a16; font-size: 1rem; font-weight: 600; }
.sommy-start__divider::before, .sommy-start__divider::after { content: ''; flex: 1; height: 1px; background: #cfc6be; }
.sommy-start__form { margin-top: 0; }
.sommy-start__label { display: block; font-size: 1.125rem; line-height: 1.3; font-weight: 600; margin-bottom: 0.625rem; color: #111827; }
.sommy-start__input { display: block; width: 100%; min-height: 5rem; padding: 0.75rem; border: 1px solid #9f9c9a; border-radius: 0.75rem; font-size: 1rem; color: #111827; background: #fff; resize: vertical; }
.sommy-start__submit { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; margin-top: 0.75rem; padding: 0.75rem 1.25rem; background: #b5191f; color: #fff; border: 0; border-radius: 0.75rem; font-size: 1rem; font-weight: 600; cursor: pointer; }
.sommy-start__submit:hover { background: #730a16; }
.sommy-start__form .sommy-start__submit { width: 100%; }
.sommy-start__submit:disabled, .sommy-start__choice:disabled { opacity: 0.6; cursor: wait; }
.sommy-start__choice:focus-visible, .sommy-start__submit:focus-visible, .sommy-start__input:focus-visible,
.sommy-optional summary:focus-visible, .sommy-start__help summary:focus-visible { outline: 2px solid #730a16; outline-offset: 3px; }
.sommy-start__help { margin-top: 1rem; font-size: 0.875rem; color: #4b5563; }
.sommy-start__help summary, .sommy-optional summary { cursor: pointer; color: #730a16; font-weight: 500; padding: 0.5rem 0; }
.sommy-help-card { margin-top: 0.75rem; padding: 1.25rem; background: #fff; border: 1px solid #e9dcd1; border-radius: 0.75rem; box-shadow: 0 1px 3px rgba(24, 3, 6, 0.1); }
.sommy-help-card h2 { margin: 0 0 1.25rem; color: #1f2937; font-size: 1.25rem; line-height: 1.3; font-weight: 700; }
.sommy-help-card__steps { display: grid; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.sommy-help-card__step { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); align-items: start; gap: 0.875rem; }
.sommy-help-card__number { display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: #b5191f; color: #fff; font-size: 1rem; font-weight: 600; }
.sommy-help-card h3 { margin: 0 0 0.5rem; color: #1f2937; font-size: 1.0625rem; line-height: 1.4; font-weight: 600; }
.sommy-help-card p { margin: 0; color: #6b7280; font-size: 0.9375rem; line-height: 1.65; }
@media (min-width: 1024px) {
    .sommy-help-card { padding: 1.5rem; }
    .sommy-help-card__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
}
.sommy-input-error { color: #a0141b; font-size: 0.9375rem; line-height: 1.5; margin: 0.75rem 0; }
.sommy-guided { max-width: 54rem; margin: 1rem 0 2rem; }
.sommy-guided h1 { color: #111827; font-size: 1.5rem; line-height: 1.25; font-weight: 600; margin: 0 0 1rem; }
[data-sommy-step] { scroll-margin-top: 9rem; }
.sommy-guided__dish { color: #4b5563; margin: 0 0 1rem; }
.sommy-guided__actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.25rem 0; }
.sommy-guided__actions button { min-height: 2.75rem; }
.sommy-guided__actions .sommy-start__submit { margin-top: 0; }
.sommy-optional { border-top: 1px solid #e9dcd1; padding: 0.5rem 0; }
.sommy-optional__fields { display: grid; gap: 1rem; padding: 0.75rem 0; }
.sommy-optional__fields label span { display: block; margin-bottom: 0.375rem; }
.sommy-optional__fields input { width: 100%; padding: 0.75rem; border: 1px solid #9f9c9a; border-radius: 0.5rem; font-size: 1rem; }
.sommy-discover { margin-top: 1.5rem; }
@media (min-width: 768px) {
    .sommy-start__header h1 { font-size: 2.5rem; }
    .sommy-start__choices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sommy-start__choices--ingredients { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sommy-start__form .sommy-start__submit { width: auto; }
    .sommy-hero-grid { grid-template-columns: minmax(0, 1fr) 16rem; gap: 2rem; }
    .sommy-hero-character__image { max-width: 16rem; }
}
@media (prefers-reduced-motion: reduce) {
    .sommy-root *, .sommy-root *::before, .sommy-root *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.sommy-discovery-categories { border-top: 1px solid #e9dcd1; padding-top: 1.25rem; }
.sommy-discovery-categories__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.sommy-discovery-categories__head h2 { font-size: 1.25rem; font-weight: 600; color: #111827; margin: 0; }
.sommy-discovery-categories__head a { color: #730a16; font-size: 0.875rem; text-decoration: underline; }
.sommy-discovery-categories__list { display: grid; gap: 0.5rem; }
.sommy-discovery-categories__item { display: flex; align-items: center; gap: 0.75rem; min-height: 3.5rem; border: 1px solid #e9dcd1; border-radius: 0.75rem; padding: 0.5rem 0.75rem; color: #111827; font-size: 0.9375rem; }
.sommy-discovery-categories__item:hover { border-color: #b5191f; }
.sommy-discovery-categories__item img { width: 2.5rem; height: 2.5rem; object-fit: cover; border-radius: 0.375rem; }
.sommy-discovery-categories__count { margin-left: auto; white-space: nowrap; color: #6b7280; font-size: 0.75rem; }
@media (min-width: 1024px) { .sommy-discovery-categories__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Sommy controls: readable states, keyboard focus and compact touch layouts. */
.sommy-root .sommy-step__hint,
.sommy-root .sommy-steps__mobile-meta { color: #555e6a; }
.sommy-root .sommy-step__instruction { margin: -0.625rem 0 1rem; font-size: 0.875rem; line-height: 1.5; }
.sommy-root .sommy-step__option { min-width: 0; overflow-wrap: anywhere; }
.sommy-root .sommy-step__back,
.sommy-root .sommy-start__help > summary { min-height: 2.75rem; }
.sommy-root .sommy-guided { max-width: none; }
.sommy-root .sommy-guided__dish { max-width: 70ch; overflow-wrap: anywhere; font-size: 0.9375rem; line-height: 1.6; }
.sommy-root .sommy-request-error { padding: 0.875rem 1rem; border-left: 3px solid #a0141b; background: #fff; border-radius: 0.25rem; scroll-margin-top: 9rem; }
.sommy-request-notice { color: #4b5563; font-size: 0.9375rem; line-height: 1.5; }
.sommy-root button:disabled { cursor: not-allowed; }
.sommy-root .sommy-steps__pill { min-height: 2.75rem; }
@media (max-width: 767px) {
    .sommy-progress > ol { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.25rem; }
    .sommy-progress > ol > li { display: block; }
    .sommy-root .sommy-steps__pill { width: 100%; padding: 0; justify-content: center; }
    .sommy-root .sommy-step__actions { gap: 0.5rem; }
    .sommy-root .sommy-step__next { text-align: center; justify-content: center; padding: 0.75rem; }
    .sommy-root .sommy-step__next svg { flex-shrink: 0; }
    .sommy-root .sommy-guided__actions { gap: 0.5rem; }
    .sommy-root .sommy-guided__actions .sommy-start__submit { padding: 0.75rem; }
}
.sommy-loading { width: min(26rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); margin: auto; padding: 1.5rem; color: #111827; background: #fff; border: 1px solid #e9dcd1; border-radius: 1rem; box-shadow: 0 16px 56px rgba(24, 3, 6, 0.2); }
.sommy-loading::backdrop { background: rgba(24, 3, 6, 0.4); }
.sommy-loading__content { display: flex; gap: 1rem; align-items: start; }
.sommy-loading h2 { margin: 0 0 0.5rem; font-size: 1.125rem; line-height: 1.4; font-weight: 600; }
.sommy-loading p { margin: 0; color: #4b5563; font-size: 0.9375rem; line-height: 1.55; }
.sommy-loading__spinner { flex-shrink: 0; color: #b5191f; animation: sommy-spin 1s linear infinite; }
@keyframes sommy-spin { to { transform: rotate(360deg); } }
.sommy-loading__cancel { min-height: 2.75rem; margin-top: 1.25rem; padding: 0.5rem 0.875rem; border: 1px solid #730a16; border-radius: 0.5rem; color: #730a16; background: #fff; font-size: 0.9375rem; cursor: pointer; }
.sommy-loading__cancel:hover { background: #faf4ee; }
.sommy-loading__cancel:focus-visible { outline: 2px solid #730a16; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .sommy-loading__spinner { animation: none; } }
.sommy-root .sommy-progress { scroll-margin-top: 9rem; }
@media (max-width: 767px) {
    .sommy-root .sommy-progress { scroll-margin-top: 6rem; }
    .sommy-root .sommy-start__header { margin-top: 0.75rem; margin-bottom: 1rem; }
    .sommy-root .sommy-start__header h1 { font-size: 1.625rem; }
    .sommy-root .sommy-step__instruction { margin-bottom: 0.75rem; }
    .sommy-root .sommy-ingredient-toggle { margin-top: 0.5rem; }
    .sommy-root .sommy-start__divider { margin-top: 1rem; margin-bottom: 0.75rem; }
    .sommy-root .sommy-start__submit { margin-top: 0.5rem; }
}
.sommy-root .sommy-step__option { hyphens: auto; }
@media (max-width: 767px) { .sommy-root .sommy-step__option { padding: 0.875rem 0.625rem; } }
.sommy-request-error > p { margin: 0; }
.sommy-request-retry { min-height: 2.75rem; margin-top: 0.5rem; padding: 0.5rem 0.875rem; color: #730a16; border: 1px solid #730a16; border-radius: 0.5rem; background: #fff; font-weight: 600; }
.sommy-request-retry:focus-visible { outline: 2px solid #730a16; outline-offset: 3px; }
.sommy-root .sommy-step__next { min-height: 2.75rem; }
.sommy-root .sommy-discovery-categories__count { color: #555e6a; }
