
      *,
      *::before,
      *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }

      :root {
        --bg: #080c14;
        --bg-elevated: #0d131f;
        --bg-card: rgba(16, 22, 34, 0.6);
        --saffron: #f5a623;
        --saffron-light: #ffd700;
        --saffron-glow: rgba(245, 166, 35, 0.16);
        --saffron-dim: rgba(245, 166, 35, 0.08);
        --saffron-border: rgba(245, 166, 35, 0.28);
        --blush: #f2ddd0;
        --rose-gold: #d4a89a;
        --cream: #faf5f0;
        --text-primary: #ffffff;
        --text-secondary: rgba(242, 221, 208, 0.72);
        --text-muted: rgba(242, 221, 208, 0.4);
        --text-faint: rgba(255, 255, 255, 0.2);
        --glass-bg: rgba(255, 255, 255, 0.03);
        --glass-border: rgba(255, 255, 255, 0.07);
        --glass-border-hover: rgba(245, 166, 35, 0.35);
        --font-primary: "Syne", sans-serif;
        --font-editorial: "Cormorant Garamond", serif;
        --font-mono: "JetBrains Mono", monospace;
        --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
      }

      html {
        height: 100%;
        scrollbar-gutter: stable;
      }

      body {
        min-height: 100dvh;
        height: 100dvh;
        font-family: var(--font-primary);
        background: var(--bg);
        color: var(--text-primary);
        -webkit-font-smoothing: antialiased;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }

      /* ── Background & Atmosphere ── */
      .ac-bg {
        position: fixed;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        overflow: hidden;
      }
      .ac-bg__image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.09;
        filter: brightness(0.5) contrast(1.15) saturate(1.2);
      }
      .ac-bg__aurora {
        position: absolute;
        top: -15%;
        left: 50%;
        transform: translateX(-50%);
        width: min(1000px, 120vw);
        height: 600px;
        background: radial-gradient(
          ellipse at center,
          rgba(245, 166, 35, 0.09) 0%,
          rgba(212, 168, 154, 0.04) 40%,
          transparent 70%
        );
        filter: blur(60px);
        animation: auroraBreath 10s ease-in-out infinite alternate;
      }
      .ac-bg__overlay {
        position: absolute;
        inset: 0;
        background:
          radial-gradient(circle at 50% 10%, rgba(245, 166, 35, 0.04) 0%, transparent 65%),
          linear-gradient(
            to bottom,
            rgba(8, 12, 20, 0.4) 0%,
            rgba(8, 12, 20, 0.85) 50%,
            var(--bg) 100%
          );
      }
      @keyframes auroraBreath {
        0% { opacity: 0.6; transform: translateX(-50%) scale(0.95); }
        100% { opacity: 1; transform: translateX(-50%) scale(1.08); }
      }

      /* The shared fixed header occupies the same reserved height as every
         main page. Keep the console's existing internal scroll container. */
      body { padding-top: var(--nav-h); line-height: normal; }
      .nav { line-height: 1.6; }

      /* ── Thread Tools ── */
      .ac-tools {
        position: absolute;
        top: 20px;
        right: clamp(1rem, 3.5vw, 2.5rem);
        display: flex;
        gap: 10px;
        z-index: 15;
      }
      .ac-tool {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: rgba(16, 22, 34, 0.7);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        color: var(--text-secondary);
        display: none;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        position: relative;
        transition: all 0.3s var(--ease-out-expo);
      }
      .ac-tool.visible {
        display: inline-flex;
      }
      .ac-tool:hover {
        color: var(--saffron);
        border-color: var(--saffron-border);
        background: rgba(245, 166, 35, 0.09);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
      }
      .ac-tool::after {
        content: attr(data-tip);
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        white-space: nowrap;
        font-family: var(--font-mono);
        font-size: 0.58rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--blush);
        background: rgba(8, 12, 20, 0.95);
        border: 1px solid var(--glass-border);
        border-radius: 8px;
        padding: 6px 10px;
        opacity: 0;
        transform: translateY(-4px);
        pointer-events: none;
        transition: opacity 0.2s, transform 0.2s;
      }
      .ac-tool:hover::after,
      .ac-tool:focus-visible::after {
        opacity: 1;
        transform: translateY(0);
      }

      /* ── Past-Chats Drawer ── */
      .ac-history-backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(4, 6, 10, 0.65);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
      }
      .ac-history-backdrop.open {
        opacity: 1;
        pointer-events: auto;
      }
      .ac-history {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 41;
        width: min(390px, 92vw);
        background: rgba(10, 14, 24, 0.98);
        border-left: 1px solid var(--glass-border);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
      }
      .ac-history.open {
        transform: translateX(0);
      }
      .ac-history__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 22px 24px 18px;
        border-bottom: 1px solid var(--glass-border);
        flex-shrink: 0;
      }
      .ac-history__title {
        font-family: var(--font-editorial);
        font-size: 1.4rem;
        font-style: italic;
        font-weight: 400;
        color: var(--blush);
      }
      .ac-history__close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: transparent;
        border: 1px solid var(--glass-border);
        color: var(--text-secondary);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s;
      }
      .ac-history__close:hover {
        color: var(--saffron);
        border-color: var(--saffron-border);
      }
      .ac-history__list {
        flex: 1;
        overflow-y: auto;
        padding: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        scrollbar-width: thin;
      }
      .ac-hist-item {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 10px;
        border: 1px solid transparent;
        border-radius: 12px;
        transition: all 0.25s;
      }
      .ac-hist-item:hover {
        background: var(--glass-bg);
        border-color: var(--glass-border);
      }
      .ac-hist-item.active {
        border-color: var(--saffron-border);
        background: rgba(245, 166, 35, 0.06);
      }
      .ac-hist-item__main {
        background: none;
        border: none;
        cursor: pointer;
        text-align: left;
        padding: 12px 0 12px 14px;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 5px;
        border-radius: 12px;
      }
      .ac-hist-item__title {
        font-family: var(--font-primary);
        font-size: 0.88rem;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.9);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .ac-hist-item__meta {
        font-family: var(--font-mono);
        font-size: 0.58rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--text-muted);
      }
      .ac-hist-item__del {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-muted);
        width: 40px;
        height: 40px;
        margin-right: 6px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.25s;
      }
      .ac-hist-item__del:hover {
        color: rgba(229, 92, 84, 0.95);
        background: rgba(229, 92, 84, 0.08);
      }
      .ac-hist-item__del.armed {
        color: rgba(229, 92, 84, 0.95);
        background: rgba(229, 92, 84, 0.14);
      }
      .ac-history__empty {
        padding: 48px 24px;
        text-align: center;
        color: var(--text-muted);
        font-size: 0.88rem;
        line-height: 1.7;
      }

      /* ── Page Body ── */
      .ac-body {
        position: relative;
        z-index: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }

      .ac-body.is-welcome {
        overflow-y: auto;
        scrollbar-width: thin;
      }
      .ac-body.is-welcome .ac-chat {
        flex: 0 0 auto;
        min-height: 0;
        overflow: visible;
      }
      .ac-body.is-welcome .ac-messages {
        display: none;
      }

      /* ── Chat Output Area ── */
      .ac-chat {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 860px;
        margin: 0 auto;
        padding: 0 clamp(1rem, 4vw, 2.5rem);
        overflow-y: auto;
        scrollbar-width: none;
        min-height: 0;
      }
      .ac-chat::-webkit-scrollbar {
        display: none;
      }
      .ac-messages {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 2.5rem 0 2rem;
      }

      /* ── Welcome & Hero Cluster ── */
      .ac-welcome {
        width: 100%;
        max-width: 820px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2.5rem 1rem 1.5rem;
        animation: fadeUp 0.8s var(--ease-out-expo) both;
      }

      /* Luxury Intelligence Flame Sigil */
      .ac-sigil {
        position: relative;
        width: 80px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 1.8rem;
      }
      .ac-sigil__halo {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(245, 166, 35, 0.22) 0%, transparent 70%);
        filter: blur(12px);
        animation: sigilPulse 3.6s ease-in-out infinite alternate;
      }
      .ac-sigil__ring-outer {
        position: absolute;
        inset: 2px;
        border-radius: 50%;
        border: 1px dashed rgba(245, 166, 35, 0.28);
        animation: sigilSpin 30s linear infinite;
      }
      .ac-sigil__ring-inner {
        position: absolute;
        inset: 10px;
        border-radius: 50%;
        background: rgba(16, 22, 34, 0.85);
        border: 1px solid rgba(245, 166, 35, 0.4);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 12px rgba(245, 166, 35, 0.12);
        display: flex;
        align-items: center;
        justify-content: center;
      }
      @keyframes sigilSpin {
        to { transform: rotate(360deg); }
      }
      @keyframes sigilPulse {
        0% { opacity: 0.5; transform: scale(0.92); }
        100% { opacity: 1; transform: scale(1.15); }
      }

      .ac-welcome__eyebrow {
        font-family: var(--font-mono);
        font-size: 0.65rem;
        letter-spacing: 0.32em;
        text-transform: uppercase;
        color: var(--saffron);
        opacity: 0.85;
        margin-bottom: 0.85rem;
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .ac-welcome__eyebrow::before,
      .ac-welcome__eyebrow::after {
        content: "";
        width: 16px;
        height: 1px;
        background: linear-gradient(to right, transparent, var(--saffron));
        opacity: 0.6;
      }
      .ac-welcome__eyebrow::after {
        background: linear-gradient(to left, transparent, var(--saffron));
      }

      .ac-welcome__title {
        font-family: var(--font-editorial);
        font-size: clamp(2.3rem, 5.5vw, 3.4rem);
        font-weight: 300;
        color: var(--cream);
        line-height: 1.12;
        margin-bottom: 1rem;
        letter-spacing: -0.01em;
      }
      .ac-welcome__title em {
        font-style: italic;
        font-weight: 400;
        background: linear-gradient(135deg, #ffd700 0%, #f5a623 45%, #f2ddd0 90%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
      }

      .ac-welcome__sub {
        font-family: var(--font-primary);
        font-size: 1.02rem;
        font-weight: 300;
        color: var(--text-secondary);
        max-width: 520px;
        line-height: 1.7;
        margin: 0 auto 2.2rem;
      }

      /* ── Master Segmented Mode Switcher (Pantry vs Science) ── */
      .ac-mode-switch {
        display: flex;
        position: relative;
        background: rgba(14, 20, 32, 0.8);
        border: 1px solid var(--glass-border);
        border-radius: 100px;
        padding: 5px;
        margin: 0 auto 2.5rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
      }
      .ac-mode-btn {
        position: relative;
        z-index: 2;
        background: transparent;
        border: none;
        color: var(--text-secondary);
        font-family: var(--font-primary);
        font-size: 0.86rem;
        font-weight: 500;
        letter-spacing: 0.04em;
        padding: 10px 24px;
        border-radius: 100px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 9px;
        transition: color 0.3s ease;
        -webkit-tap-highlight-color: transparent;
      }
      .ac-mode-btn svg {
        transition: transform 0.3s ease;
      }
      .ac-mode-btn.active {
        color: #080c14;
        font-weight: 600;
      }
      .ac-mode-btn.active svg {
        stroke: #080c14;
        transform: scale(1.08);
      }
      .ac-mode-slider {
        position: absolute;
        top: 5px;
        left: 5px;
        height: calc(100% - 10px);
        background: var(--saffron);
        border-radius: 100px;
        box-shadow: 0 4px 16px rgba(245, 166, 35, 0.35);
        transition: transform 0.4s var(--ease-out-expo), width 0.4s var(--ease-out-expo);
        z-index: 1;
        pointer-events: none;
      }

      /* ── Mode Panels ── */
      .ac-mode-panel {
        width: 100%;
        max-width: 760px;
        display: flex;
        flex-direction: column;
        align-items: center;
        animation: fadeUp 0.5s var(--ease-out-expo) both;
      }
      .ac-mode-panel.is-hidden {
        display: none;
      }

      /* ══ PANTRY RESCUE PANEL ══ */
      .ac-pantry-card {
        width: 100%;
        background: rgba(14, 20, 32, 0.7);
        border: 1px solid var(--glass-border);
        border-radius: 20px;
        padding: 24px clamp(18px, 4vw, 32px);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
        text-align: left;
        margin-bottom: 2rem;
      }
      .ac-pantry-card__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
      }
      .ac-pantry-card__title {
        font-family: var(--font-editorial);
        font-size: clamp(1.4rem, 3.5vw, 1.8rem);
        font-style: italic;
        font-weight: 400;
        color: var(--cream);
      }
      .ac-pantry-card__badge {
        font-family: var(--font-mono);
        font-size: 0.6rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--saffron);
        background: var(--saffron-dim);
        border: 1px solid var(--saffron-border);
        padding: 4px 10px;
        border-radius: 100px;
      }
      .ac-pantry-card__hint {
        font-size: 0.92rem;
        color: var(--text-secondary);
        font-weight: 300;
        margin-bottom: 18px;
        line-height: 1.5;
      }

      /* Interactive Chip Field */
      .ac-pantry__field {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
        min-height: 58px;
        background: rgba(8, 12, 20, 0.75);
        border: 1px solid var(--glass-border);
        border-radius: 14px;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
        cursor: text;
      }
      .ac-pantry__field.is-focused {
        border-color: var(--saffron-border);
        box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.1);
      }
      .ac-pantry__input {
        flex: 1 1 140px;
        min-width: 140px;
        border: none;
        outline: none;
        background: transparent;
        color: var(--text-primary);
        font-family: var(--font-primary);
        font-size: 0.98rem;
        font-weight: 300;
        caret-color: var(--saffron);
        padding: 6px 2px;
      }
      .ac-pantry__input::placeholder {
        color: var(--text-muted);
      }

      /* Pantry Pill */
      .ac-pill {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 8px 6px 14px;
        background: rgba(245, 166, 35, 0.1);
        border: 1px solid rgba(245, 166, 35, 0.3);
        border-radius: 100px;
        color: var(--cream);
        font-family: var(--font-primary);
        font-size: 0.88rem;
        font-weight: 400;
        line-height: 1;
        white-space: nowrap;
        animation: acPillIn 0.24s var(--ease-out-expo) both;
      }
      .ac-pill.is-leaving {
        animation: acPillOut 0.2s ease forwards;
      }
      .ac-pill__x {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        border: none;
        border-radius: 50%;
        background: rgba(245, 166, 35, 0.16);
        color: var(--saffron);
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease;
        -webkit-tap-highlight-color: transparent;
      }
      .ac-pill__x:hover {
        background: rgba(245, 166, 35, 0.32);
        transform: scale(1.1);
      }
      @keyframes acPillIn {
        from { opacity: 0; transform: scale(0.85) translateY(4px); }
        to { opacity: 1; transform: scale(1) translateY(0); }
      }
      @keyframes acPillOut {
        to { opacity: 0; transform: scale(0.85); }
      }

      /* Quick-Add Chips */
      .ac-pantry__quick {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 18px;
      }
      .ac-pantry__quick-label {
        width: 100%;
        font-family: var(--font-mono);
        font-size: 0.62rem;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: var(--text-muted);
        margin-bottom: 2px;
      }
      .ac-quick-chip {
        padding: 7px 14px;
        min-height: 36px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--glass-border);
        border-radius: 100px;
        color: var(--text-secondary);
        font-family: var(--font-primary);
        font-size: 0.84rem;
        font-weight: 300;
        cursor: pointer;
        transition: all 0.25s var(--ease-out-expo);
        -webkit-tap-highlight-color: transparent;
      }
      .ac-quick-chip:hover {
        border-color: var(--saffron-border);
        color: var(--blush);
        background: var(--saffron-dim);
        transform: translateY(-1px);
      }
      .ac-quick-chip.is-used {
        opacity: 0.3;
        pointer-events: none;
      }

      /* Actions Row */
      .ac-pantry__actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 16px;
        margin-top: 24px;
        padding-top: 16px;
        border-top: 1px solid var(--glass-border);
      }
      .ac-pantry__go {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 13px 28px;
        min-height: 48px;
        background: var(--saffron);
        border: none;
        border-radius: 12px;
        color: #080c14;
        font-family: var(--font-primary);
        font-size: 0.95rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        cursor: pointer;
        transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s ease, opacity 0.25s ease;
        -webkit-tap-highlight-color: transparent;
      }
      .ac-pantry__go:not(:disabled):hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 28px rgba(245, 166, 35, 0.32);
      }
      .ac-pantry__go:disabled {
        opacity: 0.38;
        cursor: not-allowed;
      }
      .ac-pantry__go svg {
        transition: transform 0.25s ease;
      }
      .ac-pantry__go:not(:disabled):hover svg {
        transform: translateX(4px);
      }
      .ac-pantry__ask {
        background: none;
        border: none;
        padding: 4px 0;
        color: var(--text-muted);
        font-family: var(--font-primary);
        font-size: 0.88rem;
        font-weight: 300;
        cursor: pointer;
        transition: color 0.25s ease;
      }
      .ac-pantry__ask:hover {
        color: var(--saffron);
      }
      .ac-pantry__ask em {
        font-family: var(--font-editorial);
        font-style: italic;
        color: var(--rose-gold);
      }

      /* ══ CULINARY SCIENCE PANEL ══ */
      .ac-science-panel {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
      }

      /* Pillar Toggle (Adults / Kids / Dogs) */
      .ac-pillar-toggle {
        display: flex;
        position: relative;
        background: rgba(14, 20, 32, 0.8);
        border: 1px solid var(--glass-border);
        border-radius: 100px;
        padding: 4px;
        margin: 0 auto 18px;
        width: fit-content;
      }
      .ac-toggle-btn {
        position: relative;
        z-index: 2;
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-family: var(--font-mono);
        font-size: 0.62rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        padding: 8px 20px;
        border-radius: 100px;
        cursor: pointer;
        transition: color 0.3s;
        -webkit-tap-highlight-color: transparent;
      }
      .ac-toggle-btn.active {
        color: #080c14;
        font-weight: 600;
      }
      .ac-toggle-slider {
        position: absolute;
        top: 4px;
        left: 4px;
        height: calc(100% - 8px);
        background: var(--saffron);
        border-radius: 100px;
        transition: transform 0.4s var(--ease-out-expo), width 0.4s var(--ease-out-expo);
        z-index: 1;
        pointer-events: none;
      }

      /* Glass Input Box */
      .ac-input-glass {
        width: 100%;
        display: flex;
        align-items: flex-end;
        gap: 12px;
        background: rgba(16, 22, 34, 0.75);
        border: 1px solid var(--glass-border);
        border-radius: 18px;
        padding: 14px 14px 14px 22px;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
        transition: border-color 0.4s, box-shadow 0.4s;
        position: relative;
        margin-bottom: 2rem;
      }
      .ac-input-glass:focus-within {
        border-color: var(--saffron-border);
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 32px rgba(245, 166, 35, 0.08);
      }

      .ac-input {
        flex: 1;
        background: transparent;
        border: none;
        outline: none;
        resize: none;
        font-family: var(--font-primary);
        font-size: 1.02rem;
        font-weight: 400;
        color: var(--text-primary);
        line-height: 1.55;
        max-height: 140px;
        padding: 6px 0;
        scrollbar-width: none;
        caret-color: var(--saffron);
      }
      .ac-input::placeholder {
        color: var(--text-muted);
        font-weight: 300;
      }

      .ac-send {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: all 0.3s var(--ease-out-expo);
        opacity: 0.4;
      }
      .ac-send.ready {
        opacity: 1;
        background: rgba(245, 166, 35, 0.14);
        border-color: var(--saffron-border);
        color: var(--saffron);
      }
      .ac-send.ready:hover {
        background: var(--saffron);
        color: #080c14;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(245, 166, 35, 0.3);
      }
      .ac-send:disabled {
        cursor: not-allowed;
      }

      /* Soft Gate Overlay */
      .ac-paywall-block {
        position: absolute;
        inset: 0;
        z-index: 20;
        border-radius: 18px;
        background: rgba(8, 12, 20, 0.88);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid var(--saffron-border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 clamp(16px, 3vw, 28px);
      }
      /* Gated composer: the paywall overlay is translucent glass, so the
         composer's own placeholder ghosts through it (caught live 2026-08-28:
         "Ask about Maillard kinetics..." bleeding through "Sign in to access
         AI Chef"). When the paywall inside a glass is shown (inline
         display:flex, how all three JS toggle sites set it), hide the
         composer's ink — visibility keeps the layout so the glass holds its
         shape. */
      .ac-input-glass:has(> .ac-paywall-block[style*="flex"]) .ac-input,
      .ac-input-glass:has(> .ac-paywall-block[style*="flex"]) .ac-send {
        visibility: hidden;
      }
      .ac-paywall-msg {
        font-family: var(--font-editorial);
        font-size: 1.15rem;
        color: var(--cream);
        font-style: italic;
      }
      .ac-paywall-cta {
        padding: 10px 24px;
        border-radius: 100px;
        background: var(--saffron);
        color: #080c14;
        font-family: var(--font-mono);
        font-size: 0.64rem;
        font-weight: 600;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        text-decoration: none;
        transition: transform 0.3s, box-shadow 0.3s;
      }
      .ac-paywall-cta:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(245, 166, 35, 0.28);
      }

      /* ══ Editorial Bento Grid (Curated Science Inquiries) ══ */
      .ac-bento {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        margin-top: 8px;
      }
      .ac-bento-card {
        background: rgba(14, 20, 32, 0.6);
        border: 1px solid var(--glass-border);
        border-radius: 16px;
        padding: 18px 20px;
        text-align: left;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        gap: 6px;
        transition: all 0.3s var(--ease-out-expo);
        -webkit-tap-highlight-color: transparent;
      }
      .ac-bento-card:hover {
        background: rgba(245, 166, 35, 0.05);
        border-color: var(--saffron-border);
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 20px rgba(245, 166, 35, 0.06);
      }
      .ac-bento-card__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
      .ac-bento-card__tag {
        font-family: var(--font-mono);
        font-size: 0.58rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--saffron);
      }
      .ac-bento-card__icon {
        color: var(--rose-gold);
        opacity: 0.7;
        transition: transform 0.3s;
      }
      .ac-bento-card:hover .ac-bento-card__icon {
        transform: translate(2px, -2px);
        color: var(--saffron);
        opacity: 1;
      }
      .ac-bento-card__title {
        font-family: var(--font-editorial);
        font-size: 1.15rem;
        font-style: italic;
        color: var(--cream);
        line-height: 1.25;
      }
      .ac-bento-card__prompt {
        font-family: var(--font-primary);
        font-size: 0.84rem;
        font-weight: 300;
        color: var(--text-muted);
        line-height: 1.45;
      }
      @media (max-width: 640px) {
        .ac-bento {
          grid-template-columns: 1fr;
        }
      }

      /* ── Console Footer ── */
      .ac-console-wrapper {
        flex-shrink: 0;
        position: relative;
        z-index: 10;
        padding: 0 clamp(1rem, 4vw, 2.5rem) max(1.5rem, env(safe-area-inset-bottom));
        background: linear-gradient(to top, rgba(8, 12, 20, 0.98) 45%, transparent);
        width: 100%;
        max-width: 860px;
        margin: 0 auto;
      }
      .ac-console-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 14px;
        padding: 0 8px;
      }
      .ac-disclaimer {
        font-family: var(--font-mono);
        font-size: 0.62rem;
        letter-spacing: 0.08em;
        color: var(--text-faint);
        text-transform: uppercase;
      }
      .ac-quota {
        font-family: var(--font-mono);
        font-size: 0.62rem;
        letter-spacing: 0.12em;
        color: var(--saffron);
        opacity: 0.85;
      }

      /* ── Messages & AI Dialogue ── */
      .ac-msg {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        animation: fadeUp 0.5s ease both;
      }
      .ac-msg--user {
        align-items: flex-end;
      }
      .ac-msg--user .ac-msg__bubble {
        background: rgba(245, 166, 35, 0.09);
        border: 1px solid rgba(245, 166, 35, 0.22);
        color: var(--blush);
        border-radius: 18px 18px 4px 18px;
        padding: 14px 22px;
        font-family: var(--font-primary);
        font-size: 1rem;
        max-width: 82%;
        line-height: 1.6;
        font-weight: 400;
      }

      .ac-msg--chef {
        align-items: flex-start;
      }
      .ac-msg--chef .ac-msg__bubble {
        background: rgba(14, 20, 32, 0.7);
        border: 1px solid var(--glass-border);
        color: rgba(255, 255, 255, 0.9);
        border-radius: 4px 18px 18px 18px;
        padding: 24px 32px;
        font-family: var(--font-primary);
        font-size: 1.04rem;
        width: 100%;
        line-height: 1.75;
        font-weight: 300;
        position: relative;
        overflow: hidden;
      }
      .ac-msg--chef .ac-msg__bubble::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(to bottom, var(--saffron), transparent);
      }

      /* Markdown & Triptychs */
      .ac-msg__bubble h3 {
        font-family: var(--font-editorial);
        font-size: 1.45rem;
        font-weight: 400;
        font-style: italic;
        color: var(--saffron);
        margin: 1.5rem 0 0.75rem;
        letter-spacing: 0.02em;
      }
      .ac-msg__bubble h3:first-child {
        margin-top: 0;
      }
      .ac-msg__bubble p {
        margin-bottom: 1.2rem;
      }
      .ac-msg__bubble p:last-child {
        margin-bottom: 0;
      }
      .ac-msg__bubble strong {
        color: var(--blush);
        font-weight: 500;
      }
      .ac-msg__bubble em {
        font-family: var(--font-editorial);
        font-style: italic;
        color: var(--rose-gold);
      }
      .ac-msg__bubble ul,
      .ac-msg__bubble ol {
        margin: 0 0 1.5rem 1.5rem;
        padding: 0;
      }
      .ac-msg__bubble li {
        margin-bottom: 0.5rem;
        padding-left: 0.5rem;
      }

      .ac-triptych {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
        margin-top: 1.5rem;
      }
      .ac-triptych-card {
        background: rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 14px;
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
      }
      .ac-triptych-card h4 {
        font-family: var(--font-editorial);
        font-size: 1.3rem;
        color: var(--saffron);
        font-weight: 400;
        font-style: italic;
      }

      /* Grounding Attribution & Error */
      .ac-source {
        display: inline-flex;
        align-items: baseline;
        gap: 0.5em;
        margin: 12px 0 0 4px;
        padding: 0;
        font-family: var(--font-mono);
        font-size: 0.62rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--text-muted);
        text-decoration: none;
        border-bottom: 1px solid transparent;
        transition: color 0.25s ease, border-color 0.25s ease;
      }
      .ac-source:hover,
      .ac-source:focus-visible {
        color: var(--saffron);
        border-bottom-color: rgba(245, 166, 35, 0.35);
      }
      .ac-source__mark {
        flex: 0 0 auto;
        width: 14px;
        height: 1px;
        background: var(--saffron);
        opacity: 0.55;
        transform: translateY(-3px);
      }
      .ac-source__name {
        color: var(--text-secondary);
      }
      .ac-source:hover .ac-source__name {
        color: var(--saffron);
      }

      .ac-msg__actions {
        display: flex;
        padding-left: 4px;
      }
      .ac-copy-btn {
        background: none;
        border: none;
        cursor: pointer;
        font-family: var(--font-mono);
        font-size: 0.62rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--text-muted);
        padding: 4px 6px;
        transition: color 0.3s;
      }
      .ac-copy-btn:hover {
        color: var(--saffron);
      }

      .ac-science-hook {
        margin-top: auto;
        padding-top: 12px;
        border-top: 1px solid rgba(245, 166, 35, 0.1);
        font-size: 0.9rem;
        color: var(--rose-gold);
        display: flex;
        gap: 8px;
        align-items: flex-start;
      }

      /* Processing / Loader */
      .ac-processing {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 10px 0;
        position: relative;
      }
      .ac-processing__ring {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        border: 2px solid rgba(245, 166, 35, 0.2);
        border-top-color: var(--saffron);
        animation: spin 1s linear infinite;
      }
      .ac-processing__text {
        font-family: var(--font-mono);
        font-size: 0.75rem;
        letter-spacing: 0.12em;
        color: var(--saffron);
        text-transform: uppercase;
      }
      @keyframes spin {
        100% { transform: rotate(360deg); }
      }

      /* ── Pantry Result Cards ── */
      .ac-pantry-results {
        width: 100%;
      }
      .ac-pantry-section {
        margin-bottom: 28px;
      }
      .ac-pantry-section:last-child {
        margin-bottom: 0;
      }
      .ac-pantry-section__title {
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: var(--font-editorial);
        font-size: 1.35rem;
        font-weight: 400;
        font-style: italic;
        color: var(--saffron);
        margin: 0 0 4px;
      }
      .ac-pantry-section__hint {
        font-family: var(--font-primary);
        font-size: 0.86rem;
        font-weight: 300;
        color: var(--text-muted);
        margin: 0 0 16px;
      }
      .ac-pantry-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
      }
      .ac-rcard {
        display: flex;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 14px;
        overflow: hidden;
        animation: fadeUp 0.5s ease both;
        transition: transform 0.3s var(--ease-out-expo), border-color 0.3s ease;
      }
      .ac-rcard:hover {
        transform: translateY(-3px);
        border-color: var(--saffron-border);
      }
      .ac-rcard__thumb {
        width: 100%;
        aspect-ratio: 16 / 10;
        object-fit: cover;
        background: rgba(255, 255, 255, 0.03);
        display: block;
      }
      .ac-rcard__body {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 16px 16px 18px;
        flex: 1;
      }
      .ac-rcard__cuisine {
        font-family: var(--font-mono);
        font-size: 0.6rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--text-muted);
      }
      .ac-rcard__name {
        font-family: var(--font-editorial);
        font-size: 1.3rem;
        font-weight: 500;
        line-height: 1.2;
        color: var(--text-primary);
      }
      .ac-rcard__status {
        display: flex;
        align-items: flex-start;
        gap: 7px;
        font-size: 0.85rem;
        font-weight: 300;
        color: var(--text-secondary);
      }
      .ac-rcard__status--ready {
        color: #7ed9a0;
      }
      .ac-rcard__missing {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 2px;
      }
      .ac-miss {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 5px 6px 5px 10px;
        background: rgba(245, 166, 35, 0.08);
        border: 1px solid rgba(245, 166, 35, 0.2);
        border-radius: 999px;
        font-size: 0.78rem;
        color: var(--blush);
      }
      .ac-miss__add {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        border: none;
        border-radius: 999px;
        background: rgba(245, 166, 35, 0.16);
        color: var(--saffron);
        cursor: pointer;
        transition: background 0.2s ease;
      }
      .ac-miss__add:hover {
        background: rgba(245, 166, 35, 0.32);
      }
      .ac-miss__add.is-added {
        background: rgba(126, 217, 160, 0.2);
        color: #7ed9a0;
        pointer-events: none;
      }
      .ac-rcard__cook {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-top: auto;
        padding-top: 12px;
        color: var(--saffron);
        font-size: 0.9rem;
        font-weight: 500;
        text-decoration: none;
        transition: gap 0.25s ease, color 0.25s ease;
      }
      .ac-rcard__cook:hover {
        gap: 12px;
        color: var(--saffron-light);
      }
      .ac-pantry-shoplist-note {
        width: 100%;
        margin-top: 6px;
        font-size: 0.78rem;
        color: var(--text-muted);
      }
      .ac-pantry-shoplist-note a {
        color: var(--saffron);
        text-decoration: none;
      }
      .ac-pantry-shoplist-note a:hover {
        text-decoration: underline;
      }

      .ac-pantry-invent__text {
        margin: 0 0 16px;
      }
      .ac-pantry-invent__btn {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 12px 22px;
        min-height: 44px;
        background: rgba(245, 166, 35, 0.12);
        border: 1px solid var(--saffron-border);
        border-radius: 12px;
        color: var(--saffron);
        font-size: 0.9rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.25s var(--ease-out-expo);
      }
      .ac-pantry-invent__btn:hover {
        background: rgba(245, 166, 35, 0.22);
        transform: translateY(-2px);
      }

      /* Error State */
      .ac-msg--error .ac-msg__bubble::before {
        background: linear-gradient(to bottom, rgba(229, 92, 84, 0.9), transparent);
      }
      .ac-error__title {
        display: block;
        color: var(--blush);
      }
      .ac-error__detail {
        display: block;
        margin-top: 8px;
        font-family: var(--font-mono);
        font-size: 0.62rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--text-muted);
      }
      .ac-retry-btn {
        margin-top: 16px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 18px;
        border-radius: 100px;
        background: rgba(245, 166, 35, 0.1);
        border: 1px solid rgba(245, 166, 35, 0.3);
        color: var(--saffron);
        font-family: var(--font-mono);
        font-size: 0.62rem;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        cursor: pointer;
        transition: background 0.3s, transform 0.3s;
      }
      .ac-retry-btn:hover {
        background: rgba(245, 166, 35, 0.18);
        transform: translateY(-1px);
      }

      @keyframes fadeUp {
        from {
          opacity: 0;
          transform: translateY(16px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }

      /* Focus Ring */
      .ac-mode-btn:focus-visible,
      .ac-quick-chip:focus-visible,
      .ac-toggle-btn:focus-visible,
      .ac-send:focus-visible,
      .ac-pantry__go:focus-visible,
      .ac-tool:focus-visible,
      .ac-history__close:focus-visible,
      .ac-hist-item__main:focus-visible,
      .ac-hist-item__del:focus-visible,
      .ac-retry-btn:focus-visible,
      .ac-copy-btn:focus-visible,
      .ac-paywall-cta:focus-visible {
        outline: 2px solid rgba(245, 166, 35, 0.75);
        outline-offset: 3px;
      }

      /* Reduced Motion */
      @media (prefers-reduced-motion: reduce) {
        .ac-welcome,
        .ac-msg,
        .ac-mode-panel,
        .ac-pill,
        .ac-rcard {
          animation: none !important;
        }
        .ac-sigil__ring-outer,
        .ac-sigil__halo,
        .ac-bg__aurora {
          animation: none !important;
        }
        .ac-mode-slider,
        .ac-toggle-slider,
        .ac-history,
        .ac-history-backdrop {
          transition: none !important;
        }
      }

      /* Mobile Tap Target Floor */
      @media (max-width: 860px) {
        .ac-tool,
        .ac-quick-chip,
        .ac-toggle-btn,
        .ac-mode-btn,
        .ac-pantry__ask,
        .ac-history__close {
          min-height: 44px;
        }
        .ac-pantry__input {
          font-size: 16px;
        }
      }

/* AI Chef workspace: existing rasa palette, one task surface and one scroller. */
body { --text-muted: var(--rose-gold); --text-faint: var(--text-secondary); }
.ac-bg__aurora { animation: none; filter: none; }
.ac-bg__image { display: none; }
.ac-body { min-height: 0; overflow: clip; }
.ac-body.is-welcome { overflow-y: auto; }
.ac-chat { max-width: 1260px; padding: 0 40px; scrollbar-width: thin; }
.ac-welcome { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr); align-items: start; gap: clamp(40px, 6vw, 88px); max-width: none; text-align: left; padding: 68px 0 48px; animation: none; }
.ac-intro { min-width: 0; }
.ac-welcome__eyebrow { opacity: 1; margin: 0 0 24px; font-size: 11px; letter-spacing: .2em; }
.ac-welcome__eyebrow::before, .ac-welcome__eyebrow::after { display: none; }
.ac-welcome__title { font-size: clamp(44px, 4.3vw, 68px); line-height: 1.04; font-weight: 400; letter-spacing: -.025em; margin-bottom: 24px; color: var(--blush); }
.ac-welcome__title span { color: var(--saffron); }
.ac-welcome__sub { margin: 0; max-width: 38ch; font-size: 16px; line-height: 1.8; color: var(--text-secondary); }
.ac-kitchen-note { margin: 32px 0 0; }
.ac-kitchen-note img { display: block; width: 100%; height: 182px; object-fit: cover; object-position: center 58%; border-radius: 10px; }
.ac-kitchen-note figcaption { padding-top: 18px; }
.ac-note-label, .ac-field-label { display: block; font: 10px/1.6 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--rose-gold); }
.ac-kitchen-note strong { display: block; font: 400 25px/1.2 var(--font-editorial); color: var(--blush); margin: 8px 0; }
.ac-kitchen-note p, .ac-greeting { color: var(--text-secondary); font-size: 13px; line-height: 1.7; }
.ac-greeting { margin-top: 24px; }
.ac-workspace { min-width: 0; border: 1px solid var(--glass-border); border-radius: 18px; background: var(--bg-elevated); overflow: clip; }
.ac-mode-switch { width: 100%; display: grid; grid-template-columns: 1fr 1fr; border: 0; border-bottom: 1px solid var(--glass-border); border-radius: 0; padding: 0; margin: 0; background: none; box-shadow: none; }
.ac-mode-slider, .ac-toggle-slider { display: none; }
.ac-mode-btn { min-width: 0; min-height: 72px; padding: 18px 8px; border-radius: 0; justify-content: center; border-bottom: 2px solid transparent; font-size: 14px; color: var(--text-secondary); transition: color 160ms, background-color 160ms; }
.ac-mode-btn.active { color: var(--saffron); background: var(--saffron-dim); border-bottom-color: var(--saffron); box-shadow: none; }
.ac-mode-panel { width: 100%; animation: none; }
.ac-mode-panel.is-hidden { display: none; }
.ac-pantry-card, .ac-science-panel { padding: 32px; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; }
.ac-pantry-card:hover { transform: none; border-color: transparent; box-shadow: none; }
.ac-pantry-card__header { display: block; }
.ac-pantry-card__title, .ac-science-title { font: 400 clamp(28px, 2.6vw, 38px)/1.16 var(--font-editorial); font-style: normal; color: var(--blush); }
.ac-pantry-card__badge { display: none; }
.ac-pantry-card__hint, .ac-science-dek { font-size: 14px; line-height: 1.8; color: var(--text-secondary); margin: 14px 0 24px; }
.ac-field-label { margin-bottom: 10px; }
.ac-pantry__field { min-height: 104px; align-content: flex-start; border-radius: 10px; padding: 16px; border-color: var(--saffron-border); background: var(--bg); }
.ac-pantry__input { min-width: 140px; font-size: 16px; }
.ac-input-hint, .ac-staples { color: var(--text-secondary); font-size: 12px; line-height: 1.75; margin-top: 12px; }
.ac-staples { border-top: 1px solid var(--glass-border); padding-top: 20px; margin-top: 24px; }
.ac-pantry__quick { margin: 24px 0; gap: 8px; }
.ac-pantry__quick-label { width: 100%; color: var(--rose-gold); margin-bottom: 4px; }
.ac-quick-chip { min-height: 40px; padding: 8px 14px; font-size: 13px; background: none; border-color: var(--glass-border); }
.ac-quick-chip:hover, .ac-quick-chip.used { transform: none; color: var(--saffron); border-color: var(--saffron-border); }
.ac-pantry__actions { gap: 16px; align-items: center; flex-wrap: wrap; }
.ac-pantry__go { min-height: 48px; padding: 14px 24px; border-radius: 8px; box-shadow: none; font-size: 13px; }
.ac-pantry__go:hover { transform: none; box-shadow: none; }
.ac-pantry__ask { min-height: 44px; font-size: 12px; color: var(--text-secondary); }
.ac-pantry__ask:hover { color: var(--saffron); }
.ac-pillar-toggle { margin: 0 0 24px; max-width: 100%; padding: 4px; box-shadow: none; border-radius: 8px; backdrop-filter: none; }
.ac-toggle-btn { min-height: 44px; padding: 10px 12px; font-size: 10px; border-radius: 5px; }
.ac-toggle-btn.active { background: var(--saffron-dim); color: var(--saffron); }
.ac-input-glass { border-radius: 10px; background: var(--bg); backdrop-filter: none; box-shadow: none; min-height: 130px; }
.ac-input { font-size: 16px; }
.ac-paywall-block { background: var(--bg-elevated); backdrop-filter: none; border-radius: 10px; gap: 14px; padding: 18px; text-align: center; }
.ac-paywall-msg { color: var(--blush); font-size: 15px; }
.ac-paywall-cta { min-height: 44px; display: inline-flex; align-items: center; }
.ac-starter-label { margin-top: 28px; }
.ac-bento { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-top: 0; }
.ac-bento-card { display: flex; flex-direction: column; text-align: left; padding: 18px 0; background: none; border: 0; border-top: 1px solid var(--glass-border); border-radius: 0; box-shadow: none; min-width: 0; cursor: pointer; }
.ac-bento-card:hover { background: none; transform: none; box-shadow: none; }
.ac-bento-card__tag { color: var(--rose-gold); font-size: 9px; }
.ac-bento-card__title { font: 400 23px/1.2 var(--font-editorial); margin: 10px 0; color: var(--blush); }
.ac-prompt-action { color: var(--saffron); font: 11px/1.6 var(--font-primary); margin-top: auto; }
.ac-bento-card:hover .ac-prompt-action { text-decoration: underline; text-underline-offset: 4px; }
.ac-body.is-welcome .ac-console-wrapper { display: none !important; }
.ac-console-wrapper { width: min(850px, 100%); padding: 12px 24px 20px; margin: 0 auto; background: var(--bg); flex-shrink: 0; }
.ac-console-wrapper .ac-input-glass { min-height: 66px; }
.ac-console-wrapper .ac-pillar-toggle { margin-bottom: 10px; }
.ac-console-footer { gap: 16px; }
.ac-disclaimer, .ac-quota { font-size: 10px; line-height: 1.6; color: var(--text-secondary); letter-spacing: 0; text-transform: none; }
.ac-messages { max-width: 850px; padding-top: 68px; }
.ac-msg__bubble { backdrop-filter: none; }
.ac-rcard, .ac-rcard:hover { transform: none; box-shadow: none; }
.ac-rcard__thumb { transition: none; }
.ac-rcard:hover .ac-rcard__thumb { transform: none; }
.ac-tool { width: 44px; height: 44px; backdrop-filter: none; }
.ac-tool:hover { transform: none; box-shadow: none; }
.ac-history-backdrop { z-index: 201; backdrop-filter: none; background: rgba(8,12,20,.8); }
.ac-history { z-index: 202; }
.ac-history__close, .ac-hist-item__del { min-width: 44px; min-height: 44px; }
.ac-body :is(button,a,input,textarea):focus-visible, .ac-history :is(button,a):focus-visible { outline: 2px solid var(--saffron); outline-offset: 4px; }
.ac-body button { transition-property: color, background-color, border-color, opacity; transition-duration: 160ms; }
@media(max-width: 900px) {
 .ac-chat { padding: 0 24px; }
 .ac-welcome { gap: 32px; grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr); padding-top: 40px; }
 .ac-pantry-card, .ac-science-panel { padding: 24px; }
 .ac-welcome__title { font-size: 46px; }
 .ac-bento { grid-template-columns: 1fr; }
}
@media(max-width: 680px) {
 .ac-chat { padding: 0 20px; }
 .ac-welcome { display: flex; align-items: stretch; gap: 28px; padding: 32px 0 28px; }
 .ac-welcome__eyebrow { margin-bottom: 14px; }
 .ac-welcome__title { font-size: 44px; }
 .ac-welcome__sub { font-size: 14px; }
 .ac-kitchen-note, .ac-greeting { display: none; }
 .ac-pantry-card, .ac-science-panel { padding: 24px 20px; }
 .ac-pantry-card__title, .ac-science-title { font-size: 32px; }
 .ac-mode-btn { min-height: 60px; font-size: 12px; }
 .ac-mode-btn svg { display: none; }
 .ac-quick-chip { min-height: 44px; }
 .ac-console-wrapper { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
 .ac-console-footer { flex-direction: column; align-items: flex-start; gap: 4px; }
 .ac-toggle-btn { padding: 10px 8px; }
 .ac-pantry__go { width: 100%; }
 .ac-pantry__ask { width: 100%; }
 .ac-tools { top: 8px; }
 .ac-history { width: min(390px,100vw); }
}
@media(prefers-reduced-motion: reduce) {
 .ac-body *, .ac-history, .ac-history-backdrop, .ac-bg * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.ac-mode-btn.active svg { color: var(--saffron); }
.ac-quick-chip.is-used { opacity: 1; color: var(--saffron); background: var(--saffron-dim); border-color: var(--saffron-border); }
.ac-pill { max-width: 100%; overflow-wrap: anywhere; }
.ac-pill__x { width: 32px; min-height: 32px; flex-shrink: 0; }
.ac-results-title { font: 400 38px/1.15 var(--font-editorial); color: var(--blush); }
.ac-results-summary { color: var(--text-secondary); font-size: 14px; line-height: 1.7; margin: 16px 0; overflow-wrap: anywhere; }
.ac-results-edit { min-height: 44px; background: none; color: var(--saffron); border: 1px solid var(--saffron-border); padding: 10px 16px; border-radius: 8px; cursor: pointer; margin-bottom: 28px; font: 13px var(--font-primary); }
.ac-msg--user .ac-msg__bubble { white-space: pre-wrap; overflow-wrap: anywhere; }
.ac-copy-btn, .ac-rcard__cook, .ac-miss__add { min-height: 44px; }
.ac-science-panel { text-align: left; }
.ac-science-panel .ac-field-label { text-align: left; }
.ac-paywall-msg { font-family: var(--font-primary); font-style: normal; line-height: 1.7; }
.ac-paywall-block { flex-wrap: wrap; }
.ac-input-glass:focus-within { box-shadow: none; }
.ac-input-glass { margin-bottom: 20px; }
.ac-science-panel { align-items: stretch; }
.ac-science-panel .ac-pillar-toggle { align-self: flex-start; }
.ac-mode-btn.active svg { stroke: var(--saffron); }
.ac-quick-chip, .ac-pill__x { min-height: 44px; }
.ac-pill__x { min-width: 44px; }
/* Recipe discovery uses a readable recipe list, not chat-sized tiles. */
.ac-body[data-view="pantry-results"] .ac-console-wrapper { display: none !important; }
.ac-messages:has(.ac-pantry-results) { max-width: 980px; }
.ac-msg:has(.ac-pantry-results) .ac-msg__bubble { border: 0; background: none; box-shadow: none; padding: 0; }
.ac-pantry-grid { grid-template-columns: 1fr; gap: 20px; }
.ac-rcard { display: grid; grid-template-columns: 180px minmax(0,1fr); border: 1px solid var(--glass-border); border-radius: 12px; overflow: clip; }
.ac-rcard__thumb { width: 180px; height: 100%; min-height: 180px; object-fit: cover; }
.ac-rcard__body { padding: 24px; }
.ac-rcard__name { font-size: 30px; font-style: normal; }
.ac-rcard__cook { display: inline-flex; align-items: center; align-self: flex-start; }
.ac-pantry-section__title { font-size: 30px; font-style: normal; color: var(--blush); }
@media(max-width: 680px) {
 .ac-rcard { grid-template-columns: 104px minmax(0,1fr); }
 .ac-rcard__thumb { width: 104px; }
 .ac-rcard__body { padding: 16px; }
 .ac-rcard__name { font-size: 26px; }
 .ac-results-title { font-size: 34px; }
 .ac-rcard__cuisine { overflow-wrap: anywhere; }
}
.ac-msg:has(.ac-pantry-results) .ac-msg__bubble::before { display: none; }
.ac-results-title:focus { outline: 2px solid var(--saffron); outline-offset: 6px; }
.ac-msg .ac-pantry-results .ac-pantry-section__title { font-size: 30px; font-style: normal; color: var(--blush); }
.ac-rcard__status--ready { color: var(--saffron); }

/* The prep surface: food is the control, and selections become the working list. */
.ac-workspace {
  --prep-gap: 20px;
  --prep-radius: 12px;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}
.ac-workspace .ac-mode-switch {
  width: min(100%, 360px);
  max-width: 100%;
  margin: 0 0 16px;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  background: var(--bg);
}
.ac-workspace .ac-mode-btn {
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: .015em;
}
.ac-workspace .ac-mode-btn.active { background: var(--saffron-dim); color: var(--saffron); }
.ac-workspace .ac-mode-btn svg { transform: none; }
.ac-workspace .ac-pantry-card, .ac-workspace .ac-science-panel {
  padding: 28px;
  border: 1px solid var(--glass-border);
  border-radius: var(--prep-radius);
  background: var(--bg-elevated);
}
.ac-workspace .ac-pantry-card__header { margin-bottom: 0; }
.ac-workspace .ac-pantry-card__title, .ac-workspace .ac-science-title { font-size: clamp(32px, 2.8vw, 42px); }
.ac-workspace .ac-pantry-card__hint, .ac-workspace .ac-science-dek { margin: 10px 0 24px; font-size: 13px; line-height: 1.7; }
.ac-shelf-heading, .ac-prep-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ac-shelf-heading .ac-field-label, .ac-prep-heading .ac-field-label { margin: 0; font-size: 9px; letter-spacing: .1em; }
.ac-shelf-hint, .ac-prep-count { font: 11px/1.6 var(--font-primary); color: var(--text-secondary); }
.ac-prep-count { color: var(--rose-gold); }
.ac-workspace .ac-pantry__quick { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px 8px; margin: 12px 0 20px; }
.ac-workspace .ac-quick-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  padding: 0 0 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--blush);
  overflow: hidden;
  opacity: 1;
  background: none;
}
.ac-ingredient-photo {
  display: block;
  width: 100%;
  max-width: 80px;
  margin-inline: auto;
  aspect-ratio: 9 / 8;
  background-image: url('../Images/chef-pantry-ingredients.webp');
  background-size: 400% 300%;
  background-repeat: no-repeat;
  /* Feather the photographic backdrop into the app's existing navy surface. */
  mask-image: radial-gradient(ellipse 70% 72% at 50% 50%, #000 50%, transparent 100%);
}
.ac-ingredient-name { padding: 0 2px; font: 11px/1.5 var(--font-primary); }
.ac-ingredient-mark { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--bg-elevated); color: var(--rose-gold); }
.ac-ingredient-mark svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ac-ingredient-check { display: none; }
.ac-workspace .ac-quick-chip:hover { background: var(--glass-bg); border-color: var(--glass-border); color: var(--blush); }
.ac-workspace .ac-quick-chip.is-used { pointer-events: auto; background: var(--saffron-dim); border-color: var(--saffron-border); color: var(--saffron); }
.ac-quick-chip.is-used .ac-ingredient-mark { background: var(--saffron); color: var(--bg); }
.ac-quick-chip.is-used .ac-ingredient-plus { display: none; }
.ac-quick-chip.is-used .ac-ingredient-check { display: block; }
.ac-workspace .ac-pantry__field { min-height: 56px; margin-top: 10px; padding: 6px 12px; align-items: center; align-content: center; gap: 6px; border-radius: 8px; border-color: var(--glass-border-hover); }
.ac-workspace .ac-pantry__input { min-height: 44px; min-width: 120px; font-size: 16px; }
.ac-workspace .ac-pill { white-space: normal; min-height: 32px; gap: 0; padding: 0 0 0 10px; border-radius: 5px; font-size: 12px; animation: none; }
.ac-workspace .ac-pill__x, .ac-workspace .ac-pill__x:hover { background: none; transform: none; width: 44px; min-width: 44px; height: 44px; }
.ac-workspace .ac-input-hint { font-size: 11px; margin: 8px 0 20px; }
.ac-workspace .ac-pantry__actions { margin-top: 0; display: grid; grid-template-columns: 1fr auto; padding-top: 0; border-top: 0; gap: 20px; }
.ac-workspace .ac-pantry__go { justify-content: center; min-height: 48px; width: 100%; border-radius: 8px; font-size: 13px; }
.ac-workspace .ac-pantry__go:disabled { opacity: 1; background: var(--saffron-dim); color: var(--rose-gold); border: 1px solid var(--saffron-border); cursor: not-allowed; }
.ac-workspace .ac-pantry__ask { font-size: 11px; }
.ac-pantry-footnote { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--glass-border); font: 10px/1.8 var(--font-primary); color: var(--text-secondary); }
.ac-workspace .ac-staples { border: 0; padding: 0; margin: 0; font-size: 10px; }
.ac-staples summary { cursor: pointer; min-height: 44px; padding: 10px 0; margin-top: -10px; color: var(--rose-gold); }
.ac-staples p { max-width: 40ch; padding: 4px 0; }
.ac-staples summary:focus-visible { outline: 2px solid var(--saffron); outline-offset: 4px; }
.ac-workspace .ac-bento { grid-template-columns: 1fr; gap: 0; }
.ac-workspace .ac-bento-card { flex-direction: row; align-items: center; gap: 18px; padding: 16px 0; }
.ac-question-photo { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.ac-question-copy { display: flex; flex-direction: column; min-width: 0; }
.ac-workspace .ac-bento-card__title { font-size: 25px; margin: 5px 0; }
.ac-workspace .ac-bento-card__tag { font-size: 9px; }
.ac-workspace .ac-prompt-action { font-size: 10px; }
.ac-workspace .ac-bento-card:hover .ac-bento-card__title { color: var(--saffron); }
@media (min-width: 1051px) {
 .ac-workspace .ac-pantry-card { padding: 24px; }
 .ac-workspace .ac-pantry-card__title { font-size: 38px; }
 .ac-workspace .ac-pantry-card__hint { margin-bottom: 16px; }
 .ac-workspace .ac-ingredient-photo { max-width: 72px; }
 .ac-workspace .ac-pantry__quick { margin-bottom: 16px; gap: 8px; }
 .ac-workspace .ac-bento { grid-template-columns: 1fr 1fr; gap: 0 24px; }
 .ac-workspace .ac-bento-card { align-items: flex-start; gap: 12px; }
 .ac-question-photo { width: 54px; height: 64px; }
 .ac-workspace .ac-bento-card__title { font-size: 23px; }
}
@media (min-width: 681px) and (max-width: 1050px) {
  .ac-workspace .ac-pantry__quick { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .ac-workspace .ac-mode-btn { padding: 10px 12px; font-size: 11px; }
  .ac-workspace .ac-pantry-card, .ac-workspace .ac-science-panel { padding: 20px; }
  .ac-workspace .ac-pantry__actions { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 680px) {
  .ac-workspace .ac-mode-switch { margin-bottom: 20px; width: 100%; }
  .ac-workspace .ac-mode-btn { font-size: 12px; padding: 10px 8px; }
  .ac-workspace .ac-pantry-card, .ac-workspace .ac-science-panel { padding: 20px 16px; }
  .ac-workspace .ac-pantry__quick { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px 6px; }
  .ac-workspace .ac-pantry__input { font-size: 16px; }
  .ac-workspace .ac-pantry__actions { grid-template-columns: 1fr; gap: 4px; }
  .ac-workspace .ac-pantry__ask { width: auto; justify-self: center; }
  .ac-workspace .ac-pantry-card__hint { font-size: 12px; }
  .ac-workspace .ac-bento-card__title { font-size: 23px; }
  .ac-question-photo { width: 60px; height: 68px; }
  .ac-ingredient-name { font-size: 10px; }
}
@media (max-width: 350px) { .ac-workspace .ac-pantry__quick { grid-template-columns: repeat(3,minmax(0,1fr)); } }
