/* 
 * Jello Recipe Management System - Core UI Design Stylesheet
 * Brand Theme: Obsidian Culinary Glass
 * A premium, high-fidelity glassmorphic framework built for mobile-first culinary experiences.
 */

/* Fonts are loaded via <link rel="preconnect"> + <link rel="stylesheet"> in index.html
   (a render-blocking CSS @import here would chain an extra request and delay first paint). */

:root {
    /* Color Palette - HSL Tailored */
    --color-obsidian-base: hsl(224, 25%, 8%);
    --color-surface: #0e141b;
    --color-surface-dim: #0e141b;
    --color-surface-bright: #333a42;
    --color-surface-lowest: #080f15;
    --color-surface-low: #161c23;
    --color-surface-container: #1a2027;
    --color-surface-container-high: #242b32;
    --color-surface-container-highest: #2f353d;

    --color-on-surface: #dde3ed;
    --color-on-surface-variant: #bacbbd;
    --color-inverse-surface: #dde3ed;
    --color-inverse-on-surface: #2b3139;

    --input-bg: rgba(8, 15, 21, 0.6);
    --input-bg-focus: rgba(8, 15, 21, 0.85);

    --color-outline: #859588;
    --color-outline-variant: #3c4a40;

    /* Primary (Vibrant Pink/Magenta Accent) */
    --color-primary: #ff0090;
    --color-on-primary: #ffffff;
    --color-primary-container: #cc0073;
    --color-on-primary-container: #ffffff;
    --color-inverse-primary: #ff4898;

    /* Secondary (Vibrant Cool Blue/Cyan Accent) */
    --color-secondary: #005780;
    --color-on-secondary: #ffffff;
    --color-secondary-container: #004566;
    --color-on-secondary-container: #ffffff;

    /* Tertiary (Warm Honey Accent) */
    --color-tertiary: #FAAD09;
    --color-on-tertiary: #4d2600;
    --color-tertiary-container: #c98a07;
    --color-on-tertiary-container: #ffffff;

    /* Error States */
    --color-error: #ffb4ab;
    --color-on-error: #690005;
    --color-error-container: #93000a;
    --color-on-error-container: #ffdad6;

    /* Glass and Glow Special tokens */
    --surface-glass: rgba(28, 35, 43, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-high: rgba(255, 255, 255, 0.15);
    --neon-glow: rgba(255, 0, 144, 0.45);
    --neon-glow-blue: rgba(0, 87, 128, 0.35);

    /* Elevation. Two layers — a tight contact edge plus a wide, soft lift — reads as depth without
       the large opaque cloud a single 32px/37% shadow produces. Theme-scoped, because a shadow
       tuned for a near-black background turns into grey haze on a light one. */
    --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 8px 24px rgba(0, 0, 0, 0.26);
    --glass-shadow-high: 0 2px 4px rgba(0, 0, 0, 0.32), 0 14px 36px rgba(0, 0, 0, 0.34);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.24), 0 4px 12px rgba(0, 0, 0, 0.20);

    /* Rounded Radius Tokens */
    --radius-sm: 4px;
    --radius-default: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    /* Cards read tighter than panels — one token so every card surface stays in step. */
    --radius-card: 12px;

    /* Height of the fixed TopAppBar. Three things must agree on this number — the bar itself, the
       top padding that stops page content sliding under it, and the sticky offset of the recipe
       filter bar — so it lives here rather than being retyped at each site. */
    --appbar-height: 64px;

    /* Spacing Grid (8px baseline) */
    --spacing-unit: 8px;
    --spacing-margin-mobile: 20px;
    --spacing-margin-desktop: 40px;
    --spacing-gutter: 16px;
    --spacing-stack-sm: 8px;
    --spacing-stack-md: 16px;
    --spacing-stack-lg: 32px;

    /* Performance Animations */
    --transition-spring: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* App-like page: no rubber-band / pull-to-refresh / edge glow dragging the whole page when the content fits the screen. */
html {
    scrollbar-gutter: stable;
}

html, body {
    overscroll-behavior: none;
}

/* Base Body Stylesheet */
body.jello-theme {
    background-color: var(--color-obsidian-base);
    color: var(--color-on-surface);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Panels */
.jello-glass {
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    transition: var(--transition-spring);
}

.jello-glass-high {
    background: var(--surface-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border-high);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow-high);
    transition: var(--transition-spring);
}

/* Responsive Micro-Transitions */
.jello-spring {
    transition: var(--transition-spring);
}

.jello-spring:hover {
    transform: translateY(-2px);
}

.jello-spring:active {
    transform: scale(0.97);
}

/* Brand Text and Neon Effects */
.jello-brand-glow {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--color-primary);
    text-shadow: 0 0 20px var(--neon-glow);
    letter-spacing: -0.02em;
}

.jello-text-gradient-pink {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.jello-text-gradient-blue {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-container) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Elevated Components: Buttons */
.jello-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 52px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    transition: var(--transition-spring);
}

.jello-btn-primary {
    /* Solid jello blue (per review — no gradient). */
    background: #007bb8;
    color: #ffffff;
    box-shadow: 0 0 18px rgba(0, 123, 184, 0.35);
}

.jello-btn-primary:hover {
    /* Lift and brighten only. The pink glow this used to add sat behind a blue button and read as
       a rendering artefact rather than an accent. */
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.jello-btn-primary:active {
    transform: scale(0.96);
}

.jello-btn-secondary {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--color-on-surface);
    border: 1px solid var(--glass-border);
}

.jello-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border-high);
    transform: translateY(-2px);
}

.jello-btn-secondary:active {
    transform: scale(0.96);
}

/* Modern Form Input Controls */
.jello-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* IFTA Label Implementation */
.jello-input-group:has(> .jello-input),
.jello-input-group:has(> .jello-select) {
    position: relative;
    display: block; /* override flex */
}

.jello-input-group:has(> .jello-input) > .jello-input-label,
.jello-input-group:has(> .jello-select) > .jello-input-label {
    position: absolute;
    top: 8px;
    left: 16px;
    font-size: 10px;
    font-weight: 700;
    color: var(--color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    pointer-events: none;
    z-index: 2;
    margin: 0;
}

.jello-input-group:has(> .jello-input) > .jello-input,
.jello-input-group:has(> .jello-select) > .jello-select {
    padding-top: 24px !important;
    padding-bottom: 8px !important;
    padding-left: 16px !important;
    padding-right: 48px; /* Room for mic icon, can be overridden */
    height: 56px !important;
    width: 100%;
}

.jello-input-group:has(> textarea.jello-input) > .jello-input {
    padding-top: 28px !important;
    height: auto !important;
    min-height: 80px !important;
}

.jello-input-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.jello-input {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-on-surface);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    padding: 0 16px;
    height: 48px;
    outline: none;
    box-sizing: border-box;
    transition: var(--transition-spring);
}

/* Hide number spin buttons */
.jello-input[type="number"]::-webkit-inner-spin-button,
.jello-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.jello-input[type="number"] {
    -moz-appearance: textfield;
}

.jello-input::placeholder {
    color: rgba(221, 227, 237, 0.35);
}

.jello-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(26, 217, 139, 0.2);
    background: var(--input-bg-focus);
}

/* Dietary & Tag Chips */
.jello-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    height: 32px;
    border-radius: var(--radius-full);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition-spring);
}

.jello-chip-primary {
    background-color: rgba(255, 72, 152, 0.12);
    color: var(--color-primary);
    border: 1px solid rgba(255, 72, 152, 0.25);
}

.jello-chip-success {
    background-color: rgba(26, 217, 139, 0.14);
    color: #0f9d63;
    border: 1px solid rgba(26, 217, 139, 0.35);
}

.jello-chip-muted {
    background-color: rgba(128, 128, 128, 0.12);
    color: var(--color-on-surface-variant);
    border: 1px solid rgba(128, 128, 128, 0.25);
}

.jello-chip-secondary {
    background-color: rgba(0, 176, 255, 0.12);
    color: var(--color-secondary);
    border: 1px solid rgba(0, 176, 255, 0.25);
}

/* Costing completeness badge — sized to match .jello-chip; colours are mid-tone semantics that stay
   legible on both light and dark grounds (colour-tinted fills, never white-alpha). */
.cost-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    /* Match .jello-chip's box model exactly (content-box: 32 + 6+6 padding + 1+1 border ≈ 46px) so all
       chips on a card share the same height. */
    height: 32px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.cost-badge .cost-badge-sub {
    font-weight: 600;
    opacity: 0.72;
}

.cost-badge.is-full {
    color: #15a34a;
    background-color: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.32);
}

.cost-badge.is-partial {
    color: #d97706;
    background-color: rgba(245, 158, 11, 0.13);
    border-color: rgba(245, 158, 11, 0.34);
}

.cost-badge.is-none {
    color: #6b7280;
    background-color: rgba(107, 114, 128, 0.13);
    border-color: rgba(107, 114, 128, 0.30);
}

.cost-badge.is-sm {
    height: 22px;
    padding: 4px 11px;
    font-size: 11px;
}

/* Animated Glow States */
@keyframes jello-pulse {

    0%,
    100% {
        opacity: 0.55;
        filter: blur(24px);
    }

    50% {
        opacity: 0.75;
        filter: blur(36px);
    }
}

.jello-animate-glow {
    animation: jello-pulse 5s ease-in-out infinite;
}

/* Swipe Actions (Card Overlays) */
.jello-swipe-container {
    position: relative;
    overflow: hidden;
}

.jello-swipe-actions {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    z-index: 1;
}

.jello-swipe-action-btn {
    height: 100%;
    width: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: var(--transition-spring);
}

.jello-swipe-btn-delete {
    background-color: var(--color-secondary-container);
}

.jello-swipe-btn-edit {
    background-color: var(--color-primary-container);
}
.jello-theme-light {
    --color-obsidian-base: #F5F7F9;
    --color-surface: #FFFFFF;
    --color-surface-dim: #f0f2f5;
    --color-surface-bright: #ffffff;
    --color-surface-lowest: #ffffff;
    --color-surface-low: #f8fafc;
    --color-surface-container: #FFFFFF;
    --color-surface-container-high: #f0f2f5;
    --color-surface-container-highest: #e2e8f0;

    --color-on-surface: #1A2229;
    --color-on-surface-variant: #6B7580;
    --color-inverse-surface: #1A2229;
    --color-inverse-on-surface: #F5F7F9;

    --color-outline: #E6E9ED;
    --color-outline-variant: #d1d5db;

    --color-primary: #F2007D;
    --color-on-primary: #ffffff;
    --color-primary-container: #FF4FA6;
    
    --color-secondary: #16303D;
    --color-on-secondary: #ffffff;
    --color-secondary-container: #1F4457;

    --input-bg: #ffffff;
    --input-bg-focus: #ffffff;

    --surface-glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-border-high: rgba(0, 0, 0, 0.15);
    --neon-glow: rgba(242, 0, 125, 0.25);
    --neon-glow-blue: rgba(22, 48, 61, 0.15);

    /* Much lighter than the dark theme: on a near-white ground a shadow only needs to hint at a
       lift. Slightly blue-black rather than neutral grey so it reads as shadow, not dirt. */
    --glass-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 16px rgba(16, 24, 40, 0.07);
    --glass-shadow-high: 0 2px 4px rgba(16, 24, 40, 0.06), 0 12px 28px rgba(16, 24, 40, 0.10);
    --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 3px 8px rgba(16, 24, 40, 0.06);
}

.jello-app-container {
    background-color: var(--color-obsidian-base);
    color: var(--color-on-surface);
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

.jello-btn-dashed {
    background: transparent;
    border: 1px dashed var(--color-primary);
    color: var(--color-primary);
}
.jello-btn-dashed:hover {
    background: rgba(255, 72, 152, 0.08);
}
.jello-btn-dashed:active {
    background: rgba(255, 72, 152, 0.15);
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* ── Voice dictation ─────────────────────────────────────────────────── */
.voice-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--color-surface-container);
    border: 1px solid var(--color-outline-variant);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
    transition: border-color 0.25s ease, background 0.25s ease;
}
.voice-bar.is-recording { border-color: var(--color-error); background: rgba(220, 38, 38, 0.08); }
.voice-bar.is-processing { border-color: var(--color-primary); }

.voice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 10px;
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.05s ease;
}
.voice-btn:active { transform: scale(0.99); }
.voice-btn:disabled { opacity: 0.85; cursor: default; }
.voice-btn.is-recording { background: var(--color-error); color: var(--color-on-error); }

.voice-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: currentColor; animation: voiceBlink 1s infinite;
}
@keyframes voiceBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.voice-spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid currentColor; border-top-color: transparent;
    animation: spin 0.7s linear infinite;
}

.voice-hint { font-size: 12px; color: var(--color-on-surface-variant); margin: 0; }
.voice-error { font-size: 12px; color: var(--color-error); margin: 0; }
.voice-warning { font-size: 12px; font-weight: 600; color: #F59E0B; margin: 6px 0 0 0; }
.voice-summary { font-size: 12px; color: var(--color-on-surface-variant); margin: 0; }
.voice-summary b { color: var(--color-on-surface); }

/* Green pulse on a field freshly filled by voice. */
.field-voice-updated { animation: voiceFillPulse 1.8s ease-in-out; }
@keyframes voiceFillPulse {
    0%   { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.40); border-color: #10B981; }
    50%  { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.18); border-color: #10B981; }
    100% { box-shadow: none; }
}

/* Amber ring on a required field the dictation left empty. */
.field-missing-alert {
    border-color: #F59E0B !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25) !important;
}

/* ── Layer 2: Semantic design-system classes ──────────────────────────
   Promote the most-repeated static inline style clusters so they have
   a single source of truth. Keep using tokens; never hardcode values. */

/* Section headings that appear inside page forms (h2 level). */
.jello-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 8px 0;
    color: var(--color-on-surface);
}

/* Tiny uppercase label used above compact fields (qty, unit, etc.). */
.jello-caption {
    font-size: 9px;
    font-weight: 700;
    color: var(--color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Full-width 44px tall input variant (costing grid, bulk fields). */
.jello-input--full {
    width: 100%;
    box-sizing: border-box;
    height: 44px;
}

/* Standard <select> control styled to match the design system. */
.jello-select {
    background: var(--color-surface-container);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-on-surface);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    padding: 0 6px;
    height: 44px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

/* Inline "RECIPE" / type badge on ingredient rows. */
.jello-inline-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 72, 152, 0.15);
    color: var(--color-primary);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 4px;
}

/* Standard card surface.
   Deliberately opaque, with NO backdrop-filter. A filtered backdrop is rasterised against the
   element's border BOX and several engines fail to clip it to the border RADIUS, so a hard
   rectangle peeks out behind each rounded corner — the squared-off corners visible on recipe
   cards. Cards sit on opaque content anyway, so the blur bought nothing, and dropping it also
   saves a compositing layer per card in a horizontally scrolling strip.
   Shadow and radius come from tokens so both themes stay in step. */
.jello-card {
    background: var(--color-surface-container);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    transition: var(--transition-spring);
    padding: 16px;
}

/* Divider list — column of rows separated by a subtle border. */
.jello-list {
    display: flex;
    flex-direction: column;
}
.jello-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}
.jello-list-item:last-child { border-bottom: none; }

/* Cover image — fills its parent container with cover-crop. */
.jello-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Typography helpers */
.jello-title-sm {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-on-surface);
    margin: 0;
}
.jello-body {
    font-size: 13px;
    color: var(--color-on-surface-variant);
    line-height: 1.5;
}

/* ── Layer 3: Minimal utility layer (long tail only) ──────────────────
   Capped, explicitly-named set. Applied only to atomic declarations
   left over after Layers 1 & 2. NOT a general utility framework. */
.u-flex    { display: flex; }
.u-col     { flex-direction: column; }
.u-center  { align-items: center; }
.u-between { justify-content: space-between; }
.u-gap-4   { gap: 4px; }
.u-gap-8   { gap: 8px; }
.u-gap-12  { gap: 12px; }
.u-gap-16  { gap: 16px; }
.u-w-full  { width: 100%; }
.u-mb-24   { margin-bottom: 24px; }
.u-mt-24   { margin-top: 24px; }
.u-shrink-0 { flex-shrink: 0; }
.u-pos-relative { position: relative; }

/* Shimmer Effect */
.jello-shimmer-block {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: jello-shimmer-anim 1.5s infinite;
}

@keyframes jello-shimmer-anim {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Page shell ──────────────────────────────────────────────────────────────
   The wrapper every routable page opens with. It was copied inline into 15
   pages, drifting into 6 near-identical variants; PageShell.razor applies these
   instead. `color` is inherited from body.jello-theme, so it is not repeated.  */
.jello-page {
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    background: var(--color-obsidian-base);
    padding: calc(var(--appbar-height) + 16px) 20px 40px 20px;
}

/* Phones: a narrow gutter, so lists use the width of the screen (the WhatsApp look) instead of
   losing 40px of it to page margins. */
@media (max-width: 600px) {
    .jello-page { padding-left: 12px; padding-right: 12px; }
}

/* Clears the bottom nav bar so the last row is not trapped underneath it. */
.jello-page--nav { padding-bottom: 100px; }

/* The recipe wizard's own footer already supplies the trailing space. */
.jello-page--form { padding-bottom: 32px; }

/* Pages whose header sits closer under the app bar. */
.jello-page--tight { padding-top: calc(var(--appbar-height) + 11px); }

/* Pages with their own sticky filter bar directly beneath the app bar. */
.jello-page--flush { padding-top: var(--appbar-height); }

/* A page that fills the viewport and scrolls internally rather than as a whole
   (its children manage their own overflow). */
.jello-page--fill {
    height: 100vh;
    max-height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Edge-to-edge: for a full-bleed hero image under the app bar. */
.jello-page--bleed { padding-top: 0; padding-left: 0; padding-right: 0; }

/* ── Back link ───────────────────────────────────────────────────────────────
   Was copied verbatim into 6 pages; BackButton.razor owns it now.             */
.jello-back {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--color-on-surface-variant);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.jello-back svg { width: 18px; height: 18px; }

/* The variant that floats over a hero image instead of sitting above content. */
.jello-back--floating {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    gap: 0;
    justify-content: center;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.94);
    color: #111;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.jello-back--floating svg { width: 22px; height: 22px; }

/* ── Ingredient picker ───────────────────────────────────────────────────────
   Search the canonical catalog and pick from it. Was copied into the recipe
   create/edit forms and the dish add-on editor; IngredientPicker.razor owns it. */
.jello-ing-picker__field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jello-ing-picker__icon {
    width: 16px;
    height: 16px;
    color: var(--color-on-surface-variant);
    flex-shrink: 0;
}

.jello-ing-picker__input-wrap { position: relative; flex: 1; }

.jello-ing-picker__input {
    background: transparent;
    border: none;
    color: var(--color-on-surface);
    outline: none;
    width: 100%;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    padding-right: 32px;
}

.jello-ing-picker__clear {
    background: none;
    border: none;
    color: var(--color-on-surface-variant);
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.jello-ing-picker__results {
    background: var(--color-obsidian-base);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    max-height: 140px;
    overflow-y: auto;
}

.jello-ing-picker__result {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13px;
    cursor: pointer;
    color: var(--color-on-surface);
}

.jello-ing-picker__create { padding: 8px 12px; text-align: center; }

.jello-ing-picker__empty {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--color-on-surface-variant);
}

/* ── Warning panel ───────────────────────────────────────────────────────────
   An amber "this looks like a duplicate, save anyway?" notice. Used by
   SimilarRecipeWarning; the recipe create and edit forms each had a copy.     */
.jello-warn-panel {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-left: 4px solid #F59E0B;
    border-radius: var(--radius-md);
    padding: 14px;
}

.jello-warn-panel__text {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-on-surface);
}

.jello-warn-panel__action {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

/* ── Create-ingredient panel ─────────────────────────────────────────────────
   The inline "add it to the catalog" form shown when a search finds nothing.  */
.jello-new-ing {
    background: var(--color-obsidian-base);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jello-new-ing__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-on-surface);
}

.jello-new-ing__types { display: flex; gap: 12px; margin-top: 4px; flex-wrap: wrap; }

.jello-new-ing__type {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-on-surface);
    cursor: pointer;
}

.jello-new-ing__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ── Ingredient row controls ─────────────────────────────────────────────────
   The quantity chip and the small icon buttons beside it (IngredientQuantityCell). */
.jello-row-qty {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-on-surface);
    background: rgba(0, 176, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

.jello-row-btn {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.jello-row-btn--confirm {
    background: rgba(0, 176, 255, 0.12);
    border: 1px solid var(--color-secondary);
    color: var(--color-secondary);
}

.jello-row-btn--muted {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--color-on-surface-variant);
}

.jello-row-icon {
    background: transparent;
    border: none;
    color: var(--color-on-surface-variant);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.jello-row-icon svg { width: 14px; height: 14px; }
.jello-row-icon--accent { color: var(--color-primary); }
.jello-row-icon--danger { color: rgba(255, 72, 72, 0.6); }
.jello-row-icon--danger:hover { color: var(--color-error); }

/* ── Recipe cards ────────────────────────────────────────────────────────────
   The library's two layouts for the same recipe: a compact row and a cover
   tile in a horizontal strip (RecipeCard).                                    */
/* ── Chip scroller ───────────────────────────────────────────────────────────
   Filter chips on one line, scrolling sideways on a phone instead of wrapping into rows. */
.jello-chip-scroller {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0;
}

.jello-chip-scroller::-webkit-scrollbar { display: none; }

.jello-chip-scroller > * { flex-shrink: 0; white-space: nowrap; }

/* Separates the type chips from the category chips on the same line. */
.jello-chip-divider {
    width: 1px;
    height: 20px;
    background: var(--glass-border);
    margin: 0 2px;
}

.jello-chip-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--color-on-surface-variant);
}

.jello-chip-clear svg { width: 14px; height: 14px; }

/* ── Flat list ───────────────────────────────────────────────────────────────
   Lists read as one continuous list, the way chat apps do: rows sit edge to edge, divided by a
   hairline, with no card box, border or gap around each. The space that used to go on boxes and
   gaps now goes on content. */
.jello-flat-list {
    display: flex;
    flex-direction: column;
}

.jello-flat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    color: var(--color-on-surface);
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease;
}

.jello-flat-row + .jello-flat-row { border-top: 1px solid var(--glass-border); }

.jello-flat-row:active { background: rgba(128, 128, 128, 0.10); }

@media (hover: hover) {
    .jello-flat-row:hover { background: rgba(128, 128, 128, 0.06); }
}

.jello-recipe-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    cursor: pointer;
}

.jello-recipe-row__thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--color-surface-container-highest);
    flex-shrink: 0;
    overflow: hidden;
}

.jello-recipe-row__text { flex: 1; min-width: 0; }

.jello-recipe-row__head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.jello-recipe-row__head .jello-recipe-row__name { flex: 1; min-width: 0; }

.jello-recipe-tile__head { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 6px 0; }
.jello-recipe-tile__head .jello-recipe-tile__name { flex: 1; min-width: 0; margin: 0; }

.jello-recipe-row__name {
    font-size: 14px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--color-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jello-recipe-row__output {
    font-size: 11px;
    color: var(--color-on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jello-recipe-tile {
    flex: 0 0 160px;
    padding: 0;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.jello-recipe-tile__cover {
    width: 100%;
    height: 130px;
    background: var(--color-surface-container-highest);
    position: relative;
    border-radius: calc(var(--radius-card) - 1px) calc(var(--radius-card) - 1px) 0 0;
    overflow: hidden;
}

.jello-recipe-tile__body { padding: 12px; display: flex; flex-direction: column; flex: 1; }

.jello-recipe-tile__name {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--color-on-surface);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jello-recipe-tile__meta {
    margin-top: auto;
    padding-top: 8px;
    font-size: 11px;
    color: var(--color-on-surface-variant);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jello-recipe-tile__output {
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: left;
}

/* ── Allergen / diet icons ───────────────────────────────────────────────────
   Small pictograms on a dish row. Sized so a row stays one line.              */
.jello-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: help;
}

.jello-icon--diet { filter: saturate(1.1); }

/* ── Dish row ────────────────────────────────────────────────────────────────
   One dish, collapsed to a single line of a flat list — no card, just a hairline
   between rows. The head is the expand target and is kept at 48px+ so it stays
   comfortably tappable on a phone.                                             */
.jello-dish-row {
    background: transparent;
}

.jello-dish-row + .jello-dish-row {
    border-top: 1px solid var(--glass-border);
}

.jello-dish-row__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    min-height: 48px;
    cursor: pointer;
}

.jello-dish-row__head:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

/* The name is the dish's identity, so it must never be the thing that gets squeezed away. It was
   the only flexible item here, which meant a long Greek name on a 375px phone shrank to a few
   characters — and vanished entirely below ~340px. It now holds a floor and the decoration yields
   instead. */
.jello-dish-row__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-on-surface);
    flex: 1 1 auto;
    min-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The name takes the free space, so Edit and Delete end at the same edge on every row (a column beside the cost) instead of
   trailing each name at a different distance. */
.jello-dish-row__title { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; }
.jello-dish-row__title .jello-dish-row__name { flex: 1 1 auto; }

.jello-dish-row.is-open .jello-dish-row__name { color: var(--color-primary); }

/* Fixed-width, right-aligned columns so costs and prices line up down the list whatever sits
   to their left. */
.jello-dish-row__cost {
    font-size: 13px;
    font-weight: 800;
    color: #3ddc84;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 64px;
    text-align: right;
    white-space: nowrap;
}

.jello-dish-row__cost.is-partial { color: #ffb03a; }

.jello-dish-row__price {
    font-size: 13px;
    font-weight: 800;
    color: var(--color-on-surface);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 56px;
    text-align: right;
    white-space: nowrap;
}

/* One tappable icon per kind — allergens, diets — each with its count; tapping lists them in a
   modal. Stops the row toggle, so it never expands the dish by accident. */
.jello-dish-row__cost--button { background: none; border: 0; padding: 2px 4px; font-family: inherit; cursor: pointer; border-radius: 6px; }
.jello-dish-row__cost--button:hover { background: rgba(128, 128, 128, 0.12); }
.jello-dish-row__cost--button.is-filtered { text-decoration: underline dotted; }
.jello-dish-row__costmenu { margin: 0 4px 8px 4px; padding: 10px 12px; border: 1px solid var(--glass-border); border-radius: 10px; background: var(--color-surface-container-high); font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.jello-dish-row__costmenu-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--color-on-surface-variant); }
.jello-dish-row__costmenu-line { display: flex; justify-content: space-between; gap: 12px; align-items: center; cursor: pointer; }
.jello-dish-row__costmenu-line .num { font-variant-numeric: tabular-nums; font-weight: 600; }

.jello-dish-row__action { flex-shrink: 0; }
.jello-dish-row__action svg { width: 15px; height: 15px; }

.jello-dish-row__tag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    background: rgba(128, 128, 128, 0.12);
    color: var(--color-on-surface);
}

.jello-dish-row__tag--allergen { background: rgba(255, 176, 58, 0.14); }
.jello-dish-row__tag--diet { background: rgba(61, 220, 132, 0.14); }

.jello-dish-row__tag-count {
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.jello-dish-row__addons {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-on-surface-variant);
    background: rgba(128, 128, 128, 0.16);
    border-radius: 999px;
    padding: 1px 6px;
    flex-shrink: 0;
}

.jello-dish-row__chev {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.jello-dish-row.is-open .jello-dish-row__chev { transform: rotate(180deg); }

/* On the narrowest phones, drop what the row can do without: the menu price is visible on the
   expanded body and the edit row. Cost stays — it is the number the user came for. */
@media (max-width: 360px) {
    .jello-dish-row__price { display: none; }
}

.jello-dish-row__body {
    padding: 4px 4px 12px 4px;
}

/* ── Dish allergen / diet details ─────────────────────────────────────────────
   The modal a dish row's allergen or diet icon opens: the full list, in words. */
.jello-dish-tags-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jello-dish-tags-modal__panel {
    width: 92%;
    max-width: 380px;
    max-height: 80vh;
    max-height: 80dvh;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
}

.jello-dish-tags-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.jello-dish-tags-modal__dish {
    font-size: 12px;
    color: var(--color-on-surface-variant);
    margin-top: 2px;
}

.jello-dish-tags-modal__close {
    flex-shrink: 0;
    display: flex;
    background: rgba(128, 128, 128, 0.1);
    border: none;
    padding: 6px;
    border-radius: 50%;
    color: var(--color-on-surface);
    cursor: pointer;
}

.jello-dish-tags-modal__close svg { width: 20px; height: 20px; }

.jello-dish-tags-modal__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jello-dish-tags-modal__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 2px;
    font-size: 14px;
    color: var(--color-on-surface);
}

.jello-dish-tags-modal__item + .jello-dish-tags-modal__item {
    border-top: 1px solid var(--glass-border);
}

/* ── Add-on type tabs ─────────────────────────────────────────────────────────
   The dish add-ons form, one tab per type. Same underline style as the menu page's tabs; three
   equal columns so the Greek labels fit side by side on a phone.                              */
.jello-addon-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 12px;
}

.jello-addon-tabs__tab {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    color: var(--color-on-surface-variant);
}

.jello-addon-tabs__tab.is-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.jello-addon-tabs__count {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(128, 128, 128, 0.16);
    font-variant-numeric: tabular-nums;
}

.jello-addon-tabs__tab.is-active .jello-addon-tabs__count { background: rgba(255, 72, 152, 0.14); }

/* ── Supplier item row ───────────────────────────────────────────────────────
   Name with its quantity and unit on one line, price with VAT on the right. */
.jello-supplier-item__line { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }

.jello-supplier-item__name { font-size: 14px; font-weight: 600; color: var(--color-on-surface); }

/* "1 τεμ" before the unit price: what the price is for. */
.jello-supplier-item__per {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-on-surface-variant);
    margin-right: 4px;
}

.jello-supplier-item__price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
}

.jello-supplier-item__vat { font-size: 10px; font-weight: 500; color: var(--color-on-surface-variant); }

/* ── Yield tests ─────────────────────────────────────────────────────────────
   The chip on a supplier item and the modal behind it: weigh before, weigh after. */
.jello-yield-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 0;
    padding: 3px 10px;
    border-radius: 9999px;
    border: 1px solid var(--glass-border);
    background: var(--color-surface-container-high);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-on-surface);
    cursor: pointer;
    box-shadow: none;
    transition: all 0.15s ease;
}

.jello-yield-chip:hover {
    background: var(--color-surface-container-highest);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* A scan whose data did not come from AADE. */
.jello-scan-source-warning {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: #c27a00;
    background: rgba(255, 176, 58, 0.10);
    border: 1px solid rgba(255, 176, 58, 0.4);
    border-radius: 8px;
    padding: 8px 10px;
}

/* Per-piece item with no package yield: recipes weighing it are unpriced until one is confirmed. */
.jello-yield-chip.is-needed {
    border-style: solid;
    border-color: rgba(255, 176, 58, 0.5);
    background: rgba(255, 176, 58, 0.10);
    color: #c27a00;
}

.jello-needs-yield-filter {
    margin: 0 0 6px 0;
    font-size: 11px;
    background: rgba(255, 176, 58, 0.10);
    border: 1px solid rgba(255, 176, 58, 0.4);
    color: #c27a00;
}

.jello-needs-yield-filter.is-active { background: #ffb03a; border-color: #ffb03a; color: #1A2229; }

.jello-yield-modal__suggestion {
    margin: 0;
    font-size: 12px;
    color: #c27a00;
    background: rgba(255, 176, 58, 0.10);
    border-radius: 6px;
    padding: 6px 8px;
}

.jello-yield-chip.is-tested,
.jello-yield-chip.is-package {
    border-style: solid;
    border-color: rgba(61, 220, 132, 0.35);
    background: rgba(61, 220, 132, 0.15);
    color: #15803d;
}

[data-theme="dark"] .jello-yield-chip.is-tested,
[data-theme="dark"] .jello-yield-chip.is-package {
    background: rgba(61, 220, 132, 0.20);
    color: #3ddc84;
}

/* Cooking steps: numbered list and the step-by-step editor */
.jello-steps { list-style: none; margin: 12px 0 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.jello-steps li { display: flex; align-items: flex-start; gap: 10px; }
.jello-steps__no { flex: 0 0 auto; min-width: 1.6em; font-family: 'Outfit', sans-serif; font-weight: 700; color: var(--color-primary); text-align: right; }
.jello-steps__text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.6; color: var(--color-on-surface); }
.jello-steps__plain { font-size: 14px; color: var(--color-on-surface-variant); line-height: 1.7; margin: 12px 0 0 0; white-space: pre-wrap; }
.jello-steps--editable { margin-top: 4px; gap: 8px; }
.jello-steps--editable li { align-items: center; gap: 8px; }
/* Editing: the number is a small pink badge, the text box is one line that grows with its text, and the three controls sit on the same line. */
.jello-steps--editable .jello-steps__no {
    width: 26px; height: 26px; min-width: 0; border-radius: 50%; background: var(--color-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 13px; text-align: center;
}
.jello-steps__input { flex: 1; min-width: 0; resize: none; padding: 8px 10px; line-height: 1.4; font-size: 14px; field-sizing: content; min-height: 0; height: auto; }
.jello-steps__actions { display: flex; flex-direction: row; gap: 0; flex: none; }
.jello-steps__actions .jello-row-icon { width: 30px; height: 30px; justify-content: center; }
.jello-steps__actions .jello-row-icon svg { width: 17px; height: 17px; }
.jello-steps-editor { display: flex; flex-direction: column; gap: 10px; }
.jello-steps-editor__hint { margin: 0; font-size: 13px; color: var(--color-on-surface-variant); }
.jello-steps-wizard { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.jello-steps-wizard__panel { width: 100%; max-width: 480px; padding: 22px; display: flex; flex-direction: column; gap: 14px; max-height: 90vh; overflow-y: auto; }
.jello-steps-wizard__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.jello-steps-wizard__head h2 { font-size: 24px; }
.jello-steps-wizard__count { font-size: 12px; color: var(--color-on-surface-variant); }
.jello-steps-wizard__prev { margin: 0; font-size: 12.5px; color: var(--color-on-surface-variant); line-height: 1.5; border-left: 3px solid var(--glass-border); padding-left: 10px; }
.jello-steps-wizard__buttons { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.jello-steps-wizard__cancel { align-self: center; background: none; border: 0; color: var(--color-on-surface-variant); font-size: 13px; cursor: pointer; }

/* Ingredient kind: bought vs sub-recipe (ingredient recipe) */
.jello-type-icon { display: inline-flex; align-items: center; flex-shrink: 0; }
.jello-type-icon svg { width: 15px; height: 15px; }
.jello-type-icon.is-recipe { color: var(--color-primary); }
.jello-type-icon.is-purchased { color: var(--color-secondary); }
.jello-type-toggle { display: inline-flex; border: 1px solid var(--glass-border); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.jello-type-btn { background: transparent; border: 0; padding: 4px 6px; display: inline-flex; align-items: center; cursor: pointer; opacity: .45; }
.jello-type-btn:disabled { cursor: default; }
.jello-type-btn.is-active { opacity: 1; background: rgba(128, 128, 128, 0.14); }
.jello-type-btn:not(.is-active):not(:disabled):hover { opacity: .9; }

.jello-yield-chip.is-done {
    border-style: solid;
    border-color: rgba(15, 157, 99, 0.75);
    background: rgba(26, 217, 139, 0.18);
    color: #0f9d63;
}

/* Some, not all, of a product's supplier items are tested. */
.jello-yield-chip.is-partial {
    border-style: solid;
    border-color: rgba(15, 157, 99, 0.6);
    background: transparent;
    color: #0f9d63;
}

.jello-yield-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jello-yield-modal__panel {
    width: 92%;
    max-width: 420px;
    max-height: 88vh;
    max-height: 88dvh;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jello-yield-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.jello-yield-modal__item { font-size: 12px; color: var(--color-on-surface-variant); margin-top: 2px; }

.jello-yield-modal__hint { font-size: 12px; color: var(--color-on-surface-variant); margin: 0; }

.jello-yield-modal__draft { font-size: 13px; font-weight: 600; color: var(--color-on-surface); margin: 0; }

.jello-yield-modal__error { font-size: 12px; color: var(--color-error); margin: 0; }

.jello-yield-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.jello-yield-form__field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--color-on-surface-variant); }

.jello-yield-form__input { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-on-surface); }

/* Text boxes and drop-downs alike: one height and padding, filling their column, so a quantity and
   its unit line up. The drop-down used to keep .jello-input's 48px and natural width beside a 36px box. */
.jello-yield-form__input input,
.jello-yield-form__input select {
    height: 40px;
    padding: 0 10px;
    font-size: 14px;
    border-radius: 6px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.jello-yield-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(61, 220, 132, 0.08);
}

.jello-yield-summary > div { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }

.jello-yield-summary__label { font-size: 11px; font-weight: 500; color: var(--color-on-surface-variant); }

.jello-yield-tests { list-style: none; margin: 0; padding: 0; }

.jello-yield-tests li {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.jello-yield-tests li + li { border-top: 1px solid var(--glass-border); }

.jello-yield-tests__date { font-size: 11px; color: var(--color-on-surface-variant); }

/* ── Line source ─────────────────────────────────────────────────────────────
   The tag on a recipe line priced from several supplier items, and the picker behind it. */
.jello-line-source-tag {
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 999px;
    border: 1px dashed var(--glass-border);
    background: transparent;
    font-size: 9px;
    font-weight: 700;
    color: var(--color-on-surface-variant);
    cursor: pointer;
    white-space: nowrap;
}

.jello-line-source-tag.is-picked {
    border-style: solid;
    border-color: rgba(61, 155, 233, 0.4);
    color: #3d9be9;
}

.jello-line-source { align-items: center; }

.jello-line-source:disabled { opacity: 0.5; cursor: default; }

.jello-line-source__radio {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--color-on-surface-variant);
    flex-shrink: 0;
    box-sizing: border-box;
}

.jello-line-source.is-selected .jello-line-source__radio {
    border-color: var(--color-primary);
    background: radial-gradient(circle, var(--color-primary) 45%, transparent 50%);
}

.jello-line-source__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.jello-line-source__name { font-size: 14px; font-weight: 600; }

.jello-line-source__item {
    font-size: 11px;
    color: var(--color-on-surface-variant);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jello-line-source__price { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ── Menu section ────────────────────────────────────────────────────────────
   A menu section as a full-width expandable list row: name + count on the left, rename/remove
   and the chevron on the right, a hairline between rows. The dishes open beneath, indented.   */
.jello-section {
    border-bottom: 1px solid var(--glass-border);
}

.jello-section__header {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 52px;
    padding: 6px 0;
}

.jello-section__toggle {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 8px 4px;
    cursor: pointer;
    text-align: left;
    color: var(--color-on-surface);
}

.jello-section__name {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.jello-section.is-open .jello-section__name { color: var(--color-primary); }

/* Kept visible when collapsed, so a closed section still says what it holds. */
.jello-section__count {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-on-surface-variant);
    background: rgba(128, 128, 128, 0.16);
    border-radius: 999px;
    padding: 1px 8px;
    font-variant-numeric: tabular-nums;
}

.jello-section__action,
.jello-section__chev-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-on-surface-variant);
}

.jello-section__action:hover { background: rgba(128, 128, 128, 0.12); color: var(--color-on-surface); }

.jello-section__action svg { width: 18px; height: 18px; }

.jello-section__chev {
    width: 20px;
    height: 20px;
    transition: transform 0.15s ease;
}

.jello-section.is-open .jello-section__chev-btn { color: var(--color-primary); }
.jello-section.is-open .jello-section__chev { transform: rotate(180deg); }

.jello-section__body {
    padding: 0 0 14px 12px;
}

/* ── Dish breakdown ──────────────────────────────────────────────────────────
   The table behind an expanded dish row.                                      */
.jello-breakdown__recipe {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 4px 0 6px 0;
}

.jello-breakdown__recipe-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-on-surface);
}

.jello-breakdown__portions { font-size: 11px; color: var(--color-secondary); font-weight: 700; }

/* Fixed layout with shared column widths (the colgroup in DishBreakdown), so the ingredient
   tables and the add-on table line up column for column instead of each sizing to its content. */
.jello-breakdown__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
    margin-bottom: 10px;
}

.jello-breakdown__col-qty { width: 52px; }
.jello-breakdown__col-unit { width: 44px; }
.jello-breakdown__col-cost { width: 72px; }

.jello-breakdown__table th {
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-secondary);
    font-weight: 700;
    padding: 2px 6px 4px 0;
}

.jello-breakdown__table td {
    padding: 3px 6px 3px 0;
    color: var(--color-on-surface);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.jello-breakdown__table .num { text-align: right; font-variant-numeric: tabular-nums; }
.jello-breakdown__table .is-unpriced { color: var(--color-on-surface-variant); }

.jello-breakdown__table td { overflow-wrap: anywhere; vertical-align: top; }

/* A group heading inside the add-on table: the type, said once for the rows beneath it. */
.jello-breakdown__group th {
    padding: 8px 0 4px 0;
    text-transform: none;
    letter-spacing: normal;
}

/* What the guest is charged for a chargeable add-on, under its name. */
.jello-breakdown__charge {
    display: block;
    font-size: 10px;
    color: var(--color-on-surface-variant);
}

/* The add-on type heading: who pays decides how it is costed, so it must be readable at a glance.
   Colour-coded per type, but the text label is what carries the meaning. */
.jello-breakdown__cat {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 6px;
    border-radius: 999px;
    color: var(--color-on-surface-variant);
    background: rgba(128, 128, 128, 0.14);
}

.jello-breakdown__cat--chargeable { color: var(--color-primary); background: rgba(255, 72, 152, 0.12); }
.jello-breakdown__cat--consumable { color: #3d9be9; background: rgba(61, 155, 233, 0.12); }

.jello-breakdown__sub { background: none; border: 0; padding: 0; font: inherit; color: var(--color-on-surface); text-align: left; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.jello-breakdown__sub:hover { color: var(--color-primary); }
.jello-breakdown__chev { width: 12px; height: 12px; transition: transform 0.15s ease; opacity: .6; }
.jello-breakdown__line.is-open .jello-breakdown__chev { transform: rotate(180deg); }
.jello-breakdown__line:not(.level-0) td { font-size: 12.5px; color: var(--color-on-surface-variant); }
.jello-breakdown__add { margin-left: 8px; width: 22px; height: 22px; line-height: 1; border-radius: 50%; border: 1px solid var(--glass-border); background: transparent; color: var(--color-primary); font-size: 15px; font-weight: 700; cursor: pointer; }
.jello-breakdown__empty td { font-size: 12px; color: var(--color-on-surface-variant); font-style: italic; }

.jello-breakdown__allergens {
    font-size: 11px;
    color: var(--color-on-surface-variant);
    margin: 6px 0;
}

.jello-breakdown__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Placeholder shaped like the ingredient table, so the row does not jump when it loads. */
.jello-breakdown__skeleton {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0 10px 0;
}

.jello-breakdown__skeleton-row {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 37%,
        rgba(255, 255, 255, 0.04) 63%);
    background-size: 400% 100%;
    animation: jello-shimmer-anim 1.4s ease infinite;
}

.jello-breakdown__skeleton-row:nth-child(1) { width: 90%; }
.jello-breakdown__skeleton-row:nth-child(2) { width: 75%; }
.jello-breakdown__skeleton-row:nth-child(3) { width: 82%; }
.jello-breakdown__skeleton-row:nth-child(4) { width: 60%; }

@media (prefers-reduced-motion: reduce) {
    .jello-breakdown__skeleton-row { animation: none; }
}

/* ── Supplier item match row ─────────────────────────────────────────────────
   Pairing one supplier string with a canonical ingredient. Rendered inside a
   modal on the supplier page and inline on the auto-matching page, so the row
   owns no outer spacing.                                                      */
.jello-match-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px;
}

.jello-match-row__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.jello-match-row__supplier {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-secondary);
}

.jello-match-row__raw { font-size: 14px; font-weight: 700; color: var(--color-on-surface); }

.jello-match-row__cleaned {
    display: block;
    font-size: 11px;
    color: var(--color-on-surface-variant);
    margin-top: 2px;
}

.jello-match-row__badges { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.jello-match-row__conf { font-size: 10px; padding: 2px 8px; }
.jello-match-row__conf.is-high    { background: rgba(34, 197, 94, 0.15);  color: #22c55e; }
.jello-match-row__conf.is-medium  { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.jello-match-row__conf.is-low     { background: rgba(255, 255, 255, 0.10); color: var(--color-on-surface-variant); }
.jello-match-row__conf.is-learned { background: rgba(0, 176, 255, 0.15);  color: var(--color-secondary); }

.jello-match-row__refine {
    background: none;
    border: none;
    color: var(--color-on-surface-variant);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
}
.jello-match-row__refine svg { width: 16px; height: 16px; }
.jello-match-row__refine.is-on { color: var(--color-primary); }

.jello-match-row__tokens {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.jello-match-row__hint { font-size: 11px; color: var(--color-on-surface-variant); margin: 0 0 8px 0; }
.jello-match-row__chips { display: flex; flex-wrap: wrap; gap: 6px; }

.jello-match-row__token {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.12s;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: var(--color-on-surface-variant);
    font-weight: 500;
}

.jello-match-row__token.is-on {
    border-color: var(--color-primary);
    background: rgba(255, 72, 152, 0.18);
    color: var(--color-primary);
    font-weight: 700;
}

.jello-match-row__label { font-size: 11px; color: var(--color-on-surface-variant); }

.jello-match-row__search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0 10px;
}

.jello-match-row__search-icon {
    width: 16px;
    height: 16px;
    color: var(--color-on-surface-variant);
    flex-shrink: 0;
}

.jello-match-row__input {
    background: transparent;
    border: none;
    color: var(--color-on-surface);
    outline: none;
    width: 100%;
    font-size: 13px;
    height: 36px;
    padding-right: 32px;
    font-family: 'Inter', sans-serif;
}

.jello-match-row__candidates {
    background: var(--color-obsidian-base);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    max-height: 160px;
    overflow-y: auto;
}

.jello-match-row__candidate {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: var(--color-on-surface);
}

.jello-match-row__candidate.is-selected { background: rgba(255, 72, 152, 0.12); }
.jello-match-row__candidate:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }

.jello-match-row__score { font-size: 10px; color: var(--color-on-surface-variant); flex-shrink: 0; }

.jello-match-row__empty {
    font-size: 12px;
    color: var(--color-on-surface-variant);
    font-style: italic;
    margin: 2px 0 4px 0;
}

.jello-match-row__add-btn {
    font-size: 12px;
    height: 34px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.jello-match-row__add-btn svg { width: 14px; height: 14px; }

/* Invoice photo — offered when the QR's AADE page shows only the invoice's totals. */
.jello-invoice-photo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 16px; }
.jello-invoice-photo__button { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; cursor: pointer; margin: 0; }
.jello-invoice-photo__button svg { width: 20px; height: 20px; flex-shrink: 0; }
.jello-invoice-photo__hint { font-size: 12px; color: var(--color-on-surface-variant); margin: 0; text-align: center; }
.jello-invoice-photo__reading { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--color-on-surface-variant); }
.jello-invoice-photo__error { font-size: 12px; color: var(--color-error); margin: 0; text-align: center; }

/* Package-yield alert: the description states a package content in another unit than the price unit. */
.jello-yield-alert { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #c27a00; vertical-align: -3px; margin-right: 4px; cursor: help; }
.jello-yield-alert svg { width: 16px; height: 16px; }

/* Floating "+" (add dishes) over a menu */
.jello-fab {
    position: fixed;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    z-index: 60;
}
.jello-fab svg { width: 26px; height: 26px; }

/* Menu cart: recipe picker and the cart itself */
.jello-cart { display: flex; flex-direction: column; gap: 6px; padding-bottom: 96px; }
.jello-cart__search { width: 100%; box-sizing: border-box; }
.jello-cart__hint { font-size: 12px; color: var(--color-on-surface-variant); margin: 2px 0 6px 0; }
.jello-cart__note { text-align: center; padding: 20px; color: var(--color-on-surface-variant); }
.jello-cart__group {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
    color: var(--color-on-surface-variant); margin: 10px 0 2px;
}
.jello-cart__pick, .jello-cart__dish {
    display: flex; align-items: center; gap: 6px; padding: 6px 4px;
    border-bottom: 1px solid var(--glass-border); touch-action: pan-y;
}
.jello-cart__pick-name {
    flex: 1; min-width: 0; text-align: left; background: none; border: none; padding: 6px 4px; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--color-on-surface);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jello-cart__add {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(0, 123, 184, 0.12); color: var(--color-secondary); font-size: 20px; line-height: 1;
}
.jello-cart__more { width: 100%; margin-top: 12px; }
.jello-cart__section { padding: 6px 0 10px; }
.jello-cart__section-head { display: flex; align-items: center; gap: 4px; }
.jello-cart__section-name { flex: 1; min-width: 0; height: 34px; font-weight: 700; }
.jello-cart__count { font-size: 12px; color: var(--color-on-surface-variant); padding: 0 4px; }
.jello-cart__dish { cursor: grab; }
.jello-cart__dish.is-dragging { opacity: 0.4; }
.jello-cart__grip {
    color: var(--color-on-surface-variant);
    user-select: none;
    -webkit-user-select: none;
    display: inline-flex; align-items: center; justify-content: center;
    /* A fingertip-sized target: 44px square, centred on the dots, which stay a readable 24px. */
    width: 44px; min-height: 44px; margin: -6px 0 -6px -8px;
    cursor: grab;
    /* A finger dragging the grip must not scroll the page; the pointer handler in jelloUi.js takes over. */
    touch-action: none;
}
.jello-cart__grip svg { width: 24px; height: 24px; pointer-events: none; }
.jello-cart__dish.is-touch-target,
.jello-cart__section.is-touch-target {
    outline: 2px dashed var(--color-primary);
    outline-offset: -2px;
    background: rgba(255, 72, 152, 0.08);
}
/* Keep the bottom action bar above the on-screen keyboard (requirement 1.3). */
.jello-kb-open .jello-cart__bar { bottom: var(--jello-kb-inset, 0px); }
.jello-cart__warning {
    background: rgba(255, 176, 58, 0.10); border: 1px solid rgba(255, 176, 58, 0.28); border-radius: var(--radius-md);
    padding: 10px 12px; font-size: 12px; color: #ffb03a;
}
.jello-cart__error { color: var(--color-error); font-size: 12px; padding: 4px 0; }
.jello-cart__bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap;
    padding: 10px 16px; background: var(--color-surface-container-high); border-top: 1px solid var(--glass-border);
}
.jello-cart__bar-btn { flex: 1; max-width: 320px; }

/* Top-bar logo: white lettering on the dark theme, the brand blue on the light one */
.jello-topbar-logo { height: 34px; width: auto; display: block; }
.jello-topbar-logo--light { display: none; }
.jello-theme-light .jello-topbar-logo--dark { display: none; }
.jello-theme-light .jello-topbar-logo--light { display: block; }

/* Allergen chips: red-tinted, with text dark enough to read on it (the plain error red on a pale tint was near-invisible) */
.jello-tags__allergen {
    background: rgba(255, 72, 72, 0.12);
    border: 1px solid rgba(255, 72, 72, 0.4);
    color: #fecaca;
    font-weight: 600;
}
.jello-theme-light .jello-tags__allergen {
    background: #fee2e2;
    border-color: #f87171;
    color: #7f1d1d;
}

/* "+" beside the Cooking instructions label: opens the step wizard */
.jello-steps-editor__title { display: flex; align-items: center; gap: 8px; }
.jello-steps-editor__plus {
    width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
    background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center;
}
.jello-steps-editor__plus svg { width: 14px; height: 14px; }

/* Tab panes for in-page navigation (e.g. MenuDetail) */
.menu-tab-pane {
    flex: 1;
    min-height: 0;
    width: 100%;
}
.menu-tab-pane.is-hidden {
    display: none !important;
}

/* ── Price request: market-list selection and the supplier sheet ───────────────────────────── */
.jello-pr-top { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; flex-shrink: 0; }
.jello-pr-search { position: relative; display: flex; align-items: center; }
.jello-pr-search svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--color-on-surface-variant); pointer-events: none; }
.jello-pr-search input {
    width: 100%; box-sizing: border-box; height: 44px; padding: 0 14px 0 38px; border-radius: 12px; border: 1px solid var(--glass-border);
    background: var(--color-surface-container-high); color: var(--color-on-surface); font-size: 14px; outline: none;
}
.jello-pr-search input:focus { border-color: var(--color-secondary); }
.jello-pr-start { align-self: flex-end; font-size: 12px; padding: 6px 12px; display: flex; align-items: center; gap: 6px; }
.jello-pr-selbar {
    display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: var(--color-surface-container-high);
}
.jello-pr-count { font-size: 13px; font-weight: 700; color: #fff; background: var(--color-primary); padding: 3px 12px; border-radius: 999px; }
.jello-pr-link { background: none; border: none; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--color-secondary); padding: 4px; }
.jello-pr-link--muted { color: var(--color-on-surface-variant); font-weight: 600; }

.jello-pr-card {
    background: var(--color-surface-container-high); border: 1px solid var(--glass-border); border-radius: 16px; padding: 6px 10px 8px; margin-bottom: 14px;
}
.jello-pr-card__head { display: flex; align-items: center; gap: 10px; padding: 8px 2px; }
.jello-pr-card__title { flex: 1; min-width: 0; margin: 0; font-family: 'Outfit', sans-serif; font-size: 17px; font-weight: 700; color: var(--color-on-surface); display: flex; align-items: center; gap: 8px; }
.jello-pr-chev { background: none; border: none; cursor: pointer; color: var(--color-on-surface-variant); display: flex; padding: 4px; }
.jello-pr-chev svg { width: 20px; height: 20px; transition: transform 0.2s; }
.jello-pr-chev.is-collapsed svg { transform: rotate(-90deg); }
.jello-pr-pill {
    display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; line-height: 1; padding: 3px 8px; border-radius: 999px;
    background: rgba(128, 128, 128, 0.16); color: var(--color-on-surface-variant);
}
.jello-pr-pill--info { background: rgba(0, 123, 184, 0.16); color: var(--color-secondary); }
.jello-pr-pill--on-blue { background: rgba(255, 255, 255, 0.25); color: #fff; }

.jello-pr-cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border: none; border-radius: 10px; cursor: pointer;
    background: var(--color-secondary); color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}
.jello-pr-cta svg { width: 18px; height: 18px; }
.jello-pr-cta:disabled { opacity: 0.5; cursor: default; box-shadow: none; }

/* The supplier sheet */
.jello-sheet-overlay { position: fixed; inset: 0; z-index: 220; display: flex; align-items: flex-end; justify-content: center; background: rgba(15, 23, 42, 0.4); }
.jello-sheet {
    width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; box-sizing: border-box;
    background: var(--color-surface-container-high); border-radius: 22px 22px 0 0; box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.18);
}
.jello-sheet__head { padding: 8px 16px 10px; flex-shrink: 0; }
.jello-sheet__grab { width: 48px; height: 4px; border-radius: 99px; background: var(--color-outline-variant, #bfc7d2); margin: 0 auto 10px; }
.jello-sheet__body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 12px; display: flex; flex-direction: column; gap: 16px; }
.jello-sheet__foot { flex-shrink: 0; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--glass-border); }
.jello-pr-step { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: rgba(0, 123, 184, 0.16); color: var(--color-secondary); }
.jello-pr-supplier {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--glass-border); background: transparent; color: var(--color-on-surface);
}
.jello-pr-supplier.is-on { border-color: var(--color-primary); background: rgba(255, 0, 144, 0.06); }
.jello-pr-supplier:disabled { cursor: default; opacity: 0.6; }
.jello-pr-check {
    width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px; border: 1.5px solid var(--glass-border); display: flex; align-items: center; justify-content: center; color: #fff;
}
.jello-pr-supplier.is-on .jello-pr-check { background: var(--color-primary); border-color: var(--color-primary); }
.jello-pr-check svg { width: 14px; height: 14px; }
.jello-pr-notice { display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: rgba(0, 123, 184, 0.10); border: 1px solid rgba(0, 123, 184, 0.25); font-size: 12px; color: var(--color-on-surface); }
.jello-pr-preview { border-radius: 12px; border: 1px solid var(--glass-border); padding: 12px; font-size: 12px; display: flex; flex-direction: column; gap: 6px; }
.jello-pr-preview__quote { margin: 4px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(128, 128, 128, 0.10); font-style: italic; line-height: 1.5; }

/* Ingredient pictogram (an emoji) before an ingredient's name */
.jello-ing-icon {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 1.5em; height: 1.5em; margin-right: 6px; line-height: 1; font-size: 1.1em;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
/* No icon: a quiet round tile with the initial, so names still line up */
.jello-ing-icon--none {
    border-radius: 50%; background: rgba(128, 128, 128, 0.16); color: var(--color-on-surface-variant);
    font-family: 'Outfit', 'Inter', sans-serif; font-size: 0.8em; font-weight: 700;
}

.jello-pr-card__name {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; background: none; border: none; padding: 6px 0; cursor: pointer;
    font: inherit; color: inherit;
}

/* Routing: what each supplier is asked for */
.jello-pr-route { border: 1px solid var(--glass-border); border-radius: 12px; }
.jello-pr-route.is-on { border-color: var(--color-primary); background: rgba(255, 0, 144, 0.04); }
.jello-pr-route__head { display: flex; align-items: center; gap: 8px; padding-right: 6px; }
.jello-pr-route__main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; padding: 12px; background: none; border: none; cursor: pointer; color: var(--color-on-surface); }
.jello-pr-route__main:disabled { cursor: default; opacity: 0.6; }
.jello-pr-route.is-on .jello-pr-check { background: var(--color-primary); border-color: var(--color-primary); }
.jello-pr-route__body { padding: 4px 12px 10px; border-top: 1px solid var(--glass-border); }
.jello-pr-route__group { padding: 2px 0; }
.jello-pr-route__grouphead { display: flex; align-items: center; gap: 10px; }
.jello-pr-route__items { display: flex; flex-direction: column; gap: 4px; padding: 2px 0 6px 27px; }
.jello-pr-route__item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }

/* Market list row: the icon, then the name with what it is used in and where it stands underneath */
.jello-pr-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.jello-pr-row .jello-ing-icon { margin-right: 0; font-size: 1.35em; }
.jello-pr-row__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.jello-pr-row__name { font-size: 14px; font-weight: 600; color: var(--color-on-surface); overflow-wrap: anywhere; }
.jello-pr-row__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.jello-pr-row__meta:empty { display: none; }
/* The note a chef leaves for the suppliers, under the ingredient's name while picking. */
.jello-pr-note { height: 30px; padding: 0 10px; font-size: 13px; flex: 1 1 100%; min-width: 0; border-radius: 8px; box-sizing: border-box; }

/* "Used in: Moussaka, Pasta +2" — plain italic text under the name, not a badge */
.jello-pr-row__dishes { font-size: 12px; font-style: italic; color: var(--color-on-surface-variant); }

/* The supplier drawer: a sheet from the right that holds one bag per supplier */
.jello-drawer-overlay { align-items: stretch; justify-content: flex-end; }
.jello-drawer {
    width: min(460px, calc(100vw - 52px)); max-width: calc(100vw - 52px); max-height: none; height: 100%; border-radius: 22px 0 0 22px;
    box-shadow: -4px 0 24px rgba(15, 23, 42, 0.18); animation: jello-drawer-in 0.22s ease-out;
}
@keyframes jello-drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.jello-pr-route.is-disabled { opacity: 0.6; }
.jello-bag__empty { margin: 8px 0 2px; font-size: 12px; color: var(--color-on-surface-variant); text-align: center; padding: 10px 0; }
.jello-bag__row { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 13px; }
.jello-pr-row__bag { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: rgba(255, 0, 144, 0.12); color: var(--color-primary); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jello-drawer { position: relative; }
.jello-pr-tab {
    position: fixed; right: 0; top: 36%; z-index: 60; width: 48px; padding: 14px 0 12px; border: none; cursor: pointer; color: #fff;
    display: flex; flex-direction: column; align-items: center; gap: 10px; border-radius: 24px 0 0 24px;
    background: var(--color-secondary, #255d8c); box-shadow: -2px 4px 14px rgba(15, 23, 42, 0.22);
}
.jello-pr-tab:disabled { opacity: 0.55; cursor: default; }
.jello-pr-tab svg { width: 24px; height: 24px; }
.jello-pr-tab__label { writing-mode: vertical-rl; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.jello-pr-tab__badge {
    min-width: 30px; height: 30px; border-radius: 50%; background: var(--color-primary); display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
}
.jello-pr-tab--sheet { position: absolute; left: -48px; right: auto; top: 36%; z-index: 1; border-radius: 24px 0 0 24px; }
.jello-pr-sent { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(22, 163, 74, 0.16); color: #16a34a; white-space: nowrap; }
.jello-pr-sent svg { width: 12px; height: 12px; }
.jello-pr-cta.is-sent { background: #16a34a; box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25); }
.jello-pr-cta.is-sent::before { content: "✓"; font-weight: 800; }

/* ── Recipe sharing ───────────────────────────────────────────────────────── */
.share-sheet__body { padding: 4px 20px 24px; }
.share-sheet__note { font-size: 13px; color: var(--color-on-surface-variant); margin: 12px 0; }
.share-sheet__link { font-size: 13px; word-break: break-all; padding: 10px 12px; border: 1px solid var(--glass-border); border-radius: 10px; background: rgba(128,128,128,0.06); }
.share-sheet__actions { display: flex; gap: 8px; margin-top: 12px; }
.share-sheet__actions .jello-btn { flex: 1; }
.share-sheet__status { font-size: 12px; color: var(--color-secondary); margin: 8px 0 0; }
.share-sheet__error { color: var(--color-error); font-size: 13px; margin: 12px 0 8px; }
.share-sheet__sub { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-on-surface-variant); margin: 20px 0 6px; }
.share-sheet__links { list-style: none; margin: 0; padding: 0; }
.share-sheet__row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--glass-border); }
.share-sheet__row.is-revoked { opacity: 0.55; }
.share-sheet__row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; }
.share-sheet__row-date { font-weight: 700; }
.share-sheet__row-stats, .share-sheet__off { color: var(--color-on-surface-variant); }
.share-sheet__row .jello-btn { height: 32px; padding: 0 12px; font-size: 12px; }

/* No app bar on this page, so no room is kept for it. */
.jello-page.shared-recipe-page { padding-top: 12px; }
.shared-recipe { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; box-sizing: border-box; }
.shared-recipe__brand { display: flex; justify-content: center; padding: 8px 0 16px; }
.shared-recipe__logo { width: 120px; height: auto; }
.shared-recipe__by { font-size: 12px; font-weight: 700; color: var(--color-primary); margin: 0 0 8px; }
.shared-recipe__photo { width: 100%; max-height: 280px; object-fit: cover; border-radius: 16px; margin-bottom: 12px; }
.shared-recipe__name { font-family: 'Outfit', sans-serif; font-size: 26px; margin: 0 0 6px; line-height: 1.2; }
.shared-recipe__desc { font-size: 14px; color: var(--color-on-surface-variant); margin: 0 0 8px; }
.shared-recipe__facts { font-size: 13px; font-weight: 700; color: var(--color-primary); margin: 0 0 16px; }
.shared-recipe__actions { margin-bottom: 16px; }
.shared-recipe__actions .jello-btn { width: 100%; }
.shared-recipe__error { color: var(--color-error); font-size: 13px; }
.shared-recipe__install { border: 1px solid var(--glass-border); border-radius: 14px; padding: 14px; margin-bottom: 20px; background: rgba(0, 123, 184, 0.06); }
.shared-recipe__install p { font-size: 13px; color: var(--color-on-surface-variant); margin: 6px 0 10px; }
.shared-recipe__install-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.shared-recipe__install-buttons .jello-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.shared-recipe__ios { margin: 10px 0 0 !important; font-size: 12px !important; }
.shared-recipe__section { margin-bottom: 22px; }
.shared-recipe__sub { padding-left: 12px; border-left: 3px solid var(--glass-border); }
.shared-recipe__lines { list-style: none; margin: 0; padding: 0; }
.shared-recipe__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--glass-border); }
.shared-recipe__qty { font-weight: 700; color: var(--color-secondary); white-space: nowrap; }
.shared-recipe__chips { margin-bottom: 20px; }
.shared-recipe__gone { text-align: center; padding: 40px 12px; }

/* Ingredient type key: the info button above the bought / sub-recipe toggles, and its explanation. */
.type-info { display: flex; justify-content: flex-end; padding-right: 66px; margin-bottom: -2px; }
.type-info__btn { background: transparent; border: 0; padding: 2px; display: inline-flex; color: var(--color-on-surface-variant); cursor: pointer; border-radius: 50%; }
.type-info__btn svg { width: 18px; height: 18px; }
.type-info__btn:hover { color: var(--color-primary); }
.type-info__overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.type-info__panel { width: 100%; max-width: 420px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.type-info__title { margin: 0; font-size: 17px; font-weight: 700; }
.type-info__row { display: flex; gap: 12px; align-items: flex-start; }
.type-info__row .jello-type-icon { margin-top: 2px; }
.type-info__row strong { font-size: 14px; }
.type-info__row p { margin: 2px 0 0; font-size: 13px; color: var(--color-on-surface-variant); line-height: 1.45; }
.type-info__switch { margin: 0; font-size: 13px; color: var(--color-on-surface-variant); line-height: 1.45; border-top: 1px solid var(--glass-border); padding-top: 12px; }
.type-info__close { align-self: stretch; height: 44px; }

/* Section title centred between two thin wavy lines (the ingredients header). The wave is a mask so it takes the text colour. */
.jello-section-title--wavy { display: flex; align-items: center; justify-content: center; gap: 12px; }
.jello-section-title--wavy::before,
.jello-section-title--wavy::after {
    content: "";
    flex: 1;
    height: 8px;
    background: var(--color-on-surface-variant, currentColor);
    opacity: .85;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 4 Q4 0 8 4 T16 4' fill='none' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E") repeat-x center / 16px 8px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 4 Q4 0 8 4 T16 4' fill='none' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E") repeat-x center / 16px 8px;
}
