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

    :root {
      --bg: #F4EFE6;
      --surface: #FDFAF5;
      --ink: #1E1A14;
      --brown-deep: #3D2B1F;
      --terracotta: #C0522A;
      --sage: #5E8C61;
      --straw: #D4A843;
      --muted: #7A6A58;
      --border: #DDD3C0;
      --card: #FFFFFF;
      --shadow: rgba(61, 43, 31, 0.07);
      --breakfast-c: #C0522A;
      --lunch-c: #5E8C61;
      --dinner-c: #3D6B9C;
    }

    body {
      background: var(--bg);
      font-family: 'Epilogue', sans-serif;
      color: var(--ink);
      min-height: 100vh;
    }

    /* ── HERO ── */
    .hero {
      background: var(--brown-deep);
      color: var(--bg);
      padding: 48px 32px 40px;
      position: relative;
      overflow: hidden;
    }

    .hero-texture {
      position: absolute;
      inset: 0;
      background-image: radial-gradient(circle at 80% 20%, rgba(192, 82, 42, 0.25) 0%, transparent 55%), radial-gradient(circle at 15% 85%, rgba(94, 140, 97, 0.18) 0%, transparent 45%);
      pointer-events: none;
    }

    .hero-inner {
      max-width: 980px;
      margin: 0 auto;
      position: relative;
      z-index: 1;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 24px;
    }

    .hero-left {}

    .hero-eyebrow {
      font-family: 'Inconsolata', monospace;
      font-size: 11px;
      letter-spacing: 3.5px;
      text-transform: uppercase;
      color: var(--straw);
      margin-bottom: 10px;
    }

    .hero h1 {
      font-family: 'Cormorant Garamond', serif;
      font-size: clamp(2rem, 5vw, 3.6rem);
      font-weight: 700;
      line-height: 1.08;
    }

    .hero h1 em {
      color: var(--straw);
      font-style: italic;
    }

    .hero-sub {
      font-size: 13px;
      color: #B8A898;
      margin-top: 10px;
      line-height: 1.6;
    }

    /* Week Navigator */
    .week-nav {
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(255, 255, 255, 0.07);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 14px;
      padding: 14px 18px;
    }

    .week-nav button {
      background: none;
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 8px;
      color: rgba(255, 255, 255, 0.7);
      width: 34px;
      height: 34px;
      cursor: pointer;
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
    }

    .week-nav button:hover:not(:disabled) {
      background: rgba(255, 255, 255, 0.12);
      color: #fff;
    }

    .week-nav button:disabled {
      opacity: 0.3;
      cursor: default;
    }

    .week-info {
      text-align: center;
      min-width: 130px;
    }

    .week-code {
      font-family: 'Inconsolata', monospace;
      font-size: 11px;
      letter-spacing: 2px;
      color: var(--straw);
      display: block;
    }

    .week-label {
      font-size: 13px;
      color: rgba(255, 255, 255, 0.85);
      font-weight: 500;
      display: block;
      margin-top: 3px;
    }

    /* Season tags */
    .hero-tags {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 14px;
    }

    .tag {
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 100px;
      padding: 5px 13px;
      font-size: 11px;
      font-weight: 500;
      color: rgba(255, 255, 255, 0.7);
    }

    .tag.season {
      border-color: var(--sage);
      color: #A8D4AB;
    }

    .tag.highlight {
      border-color: var(--straw);
      color: #F0D080;
    }

    /* ── NAV BAR ── */
    .nav-bar {
      background: var(--card);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 200;
      box-shadow: 0 2px 16px var(--shadow);
    }

    .nav-inner {
      max-width: 980px;
      margin: 0 auto;
      display: flex;
      overflow-x: auto;
      scrollbar-width: none;
    }

    .nav-inner::-webkit-scrollbar {
      display: none;
    }

    .nav-tab {
      flex-shrink: 0;
      padding: 14px 18px;
      border: none;
      background: none;
      cursor: pointer;
      font-family: 'Epilogue', sans-serif;
      font-size: 12.5px;
      font-weight: 500;
      color: var(--muted);
      border-bottom: 3px solid transparent;
      transition: all 0.18s;
      white-space: nowrap;
    }

    .nav-tab:hover {
      color: var(--terracotta);
    }

    .nav-tab.active {
      color: var(--terracotta);
      border-bottom-color: var(--terracotta);
      font-weight: 600;
    }

    .nav-tab.grocery-tab {
      color: var(--sage);
    }

    .nav-tab.grocery-tab.active {
      color: var(--sage);
      border-bottom-color: var(--sage);
    }

    /* ── MAIN ── */
    .main {
      max-width: 980px;
      margin: 0 auto;
      padding: 32px 20px 80px;
    }

    /* Loading / Error states */
    .state-box {
      text-align: center;
      padding: 80px 20px;
    }

    .state-box .icon {
      font-size: 48px;
      margin-bottom: 16px;
    }

    .state-box h3 {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.5rem;
      margin-bottom: 8px;
    }

    .state-box p {
      color: var(--muted);
      font-size: 14px;
    }

    /* ── DAY VIEW ── */
    .view {
      display: none;
    }

    .view.active {
      display: block;
    }

    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(12px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .day-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
      padding-bottom: 20px;
      margin-bottom: 28px;
      border-bottom: 2px solid var(--border);
      animation: fadeUp 0.3s ease both;
    }

    .day-label {
      font-family: 'Inconsolata', monospace;
      font-size: 11px;
      letter-spacing: 3px;
      text-transform: uppercase;
      color: var(--muted);
      display: block;
      margin-bottom: 4px;
    }

    .day-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 2rem;
      font-weight: 700;
    }

    .macro-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .mbadge {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 8px 14px;
      text-align: center;
      min-width: 60px;
    }

    .mbadge .mv {
      font-family: 'Inconsolata', monospace;
      font-size: 17px;
      font-weight: 500;
      display: block;
      color: var(--terracotta);
    }

    .mbadge .ml {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--muted);
      display: block;
      margin-top: 2px;
    }

    .mbadge.kcal .mv {
      color: var(--brown-deep);
      font-size: 19px;
    }

    /* ── MEAL CARDS ── */
    .meals-grid {
      display: grid;
      gap: 14px;
      margin-bottom: 8px;
    }

    .mcard {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 20px 22px 18px;
      box-shadow: 0 2px 8px var(--shadow);
      transition: box-shadow 0.2s, transform 0.2s;
      animation: fadeUp 0.3s ease both;
    }

    .mcard:hover {
      box-shadow: 0 6px 24px rgba(61, 43, 31, 0.12);
      transform: translateY(-1px);
    }

    .mcard.is-lunch {
      border-left: 4px solid var(--sage);
    }

    .mcard.is-dinner {
      border-left: 4px solid #B8CBE0;
    }

    .mcard:nth-child(1) {
      animation-delay: .04s
    }

    .mcard:nth-child(2) {
      animation-delay: .08s
    }

    .mcard:nth-child(3) {
      animation-delay: .12s
    }

    .mtype {
      font-family: 'Inconsolata', monospace;
      font-size: 10px;
      letter-spacing: 2.5px;
      text-transform: uppercase;
      font-weight: 500;
      margin-bottom: 7px;
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .mtype::before {
      content: '';
      display: inline-block;
      width: 6px;
      height: 6px;
      border-radius: 50%;
    }

    .mtype.breakfast {
      color: var(--breakfast-c);
    }

    .mtype.breakfast::before {
      background: var(--breakfast-c);
    }

    .mtype.lunch {
      color: var(--lunch-c);
    }

    .mtype.lunch::before {
      background: var(--lunch-c);
    }

    .mtype.dinner {
      color: var(--dinner-c);
    }

    .mtype.dinner::before {
      background: var(--dinner-c);
    }

    .meal-badge {
      display: inline-block;
      font-family: 'Inconsolata', monospace;
      font-size: 9px;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      padding: 3px 10px;
      border-radius: 100px;
      margin-left: 8px;
    }

    .meal-badge.copieux {
      background: #E8F5E9;
      color: #2E6B31;
      border: 1px solid #A8D4AB;
    }

    .meal-badge.leger {
      background: #E3EEF8;
      color: #2A4F72;
      border: 1px solid #9DBCD8;
    }

    .mname {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.28rem;
      font-weight: 700;
      line-height: 1.25;
      margin-bottom: 10px;
    }

    .mmeta {
      display: flex;
      gap: 18px;
      flex-wrap: wrap;
      margin-bottom: 11px;
    }

    .mmeta-item {
      font-size: 12px;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .mingredients {
      font-size: 13.5px;
      color: #3A3028;
      line-height: 1.75;
    }

    .mingredients strong {
      font-weight: 600;
    }

    .mswap {
      margin-top: 12px;
      background: #F9F5EE;
      border-left: 3px solid var(--straw);
      border-radius: 0 8px 8px 0;
      padding: 9px 13px;
      font-size: 12.5px;
      color: var(--brown-deep);
    }

    .mswap .swap-label {
      font-family: 'Inconsolata', monospace;
      font-size: 9.5px;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: var(--straw);
      font-weight: 500;
      display: block;
      margin-bottom: 3px;
    }

    .mfoot {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 13px;
      padding-top: 13px;
      border-top: 1px solid var(--border);
    }

    .mchip {
      font-family: 'Inconsolata', monospace;
      font-size: 11px;
      background: var(--bg);
      border-radius: 5px;
      padding: 3px 8px;
      color: var(--brown-deep);
    }

    .prep-note {
      margin-top: 24px;
      background: linear-gradient(135deg, #EFF7F0 0%, #E8F3F9 100%);
      border: 1px solid #C8DEC9;
      border-radius: 12px;
      padding: 16px 20px;
      font-size: 13px;
      color: #2E4A30;
      line-height: 1.7;
      animation: fadeUp 0.3s ease 0.2s both;
    }

    .prep-note strong {
      font-weight: 600;
      display: block;
      margin-bottom: 5px;
      font-size: 11px;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: var(--sage);
    }

    /* ── GROCERY VIEW ── */
    .grocery-head {
      margin-bottom: 28px;
      animation: fadeUp 0.3s ease both;
    }

    .grocery-head h2 {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.9rem;
      font-weight: 700;
      margin-bottom: 5px;
    }

    .grocery-head p {
      font-size: 13.5px;
      color: var(--muted);
    }

    .grocery-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 16px;
    }

    .gcol {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 18px 20px;
      animation: fadeUp 0.3s ease both;
    }

    .gcol:nth-child(1) {
      animation-delay: .04s
    }

    .gcol:nth-child(2) {
      animation-delay: .08s
    }

    .gcol:nth-child(3) {
      animation-delay: .12s
    }

    .gcol:nth-child(4) {
      animation-delay: .16s
    }

    .gcol:nth-child(5) {
      animation-delay: .20s
    }

    .gcol:nth-child(6) {
      animation-delay: .24s
    }

    .gcol-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.05rem;
      font-weight: 700;
      margin-bottom: 12px;
      padding-bottom: 10px;
      border-bottom: 2px solid var(--border);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .gcol ul {
      list-style: none;
    }

    .gcol ul li {
      font-size: 13px;
      padding: 6px 0;
      border-bottom: 1px solid #F0E8DA;
      color: #3A3028;
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 6px;
    }

    .gcol ul li:last-child {
      border-bottom: none;
    }

    .gcol ul li .qty {
      font-family: 'Inconsolata', monospace;
      font-size: 11.5px;
      color: var(--muted);
      flex-shrink: 0;
    }

    /* Grocery section with second title */
    .gcol-section {
      margin-top: 20px;
    }

    .gcol-section .gcol-title {
      margin-top: 0;
    }

    .tip-box {
      margin-top: 28px;
      background: var(--brown-deep);
      color: var(--bg);
      border-radius: 14px;
      padding: 22px 24px;
      animation: fadeUp 0.3s ease 0.28s both;
    }

    .tip-box h3 {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.2rem;
      font-weight: 700;
      color: var(--straw);
      margin-bottom: 12px;
    }

    .tip-box ul {
      list-style: none;
      display: grid;
      gap: 8px;
    }

    .tip-box ul li {
      font-size: 13px;
      line-height: 1.6;
      padding-left: 18px;
      position: relative;
      color: #C8B8A2;
    }

    .tip-box ul li::before {
      content: '→';
      position: absolute;
      left: 0;
      color: var(--terracotta);
      font-weight: 600;
    }

    /* Empty week placeholder */
    .empty-week {
      text-align: center;
      padding: 60px 20px;
      animation: fadeUp 0.3s ease both;
    }

    .empty-week .icon {
      font-size: 56px;
      margin-bottom: 20px;
    }

    .empty-week h3 {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.8rem;
      margin-bottom: 10px;
    }

    .empty-week p {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.7;
      max-width: 420px;
      margin: 0 auto 24px;
    }

    .empty-week .gemini-prompt {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px 20px;
      font-size: 13px;
      color: #3A3028;
      text-align: left;
      max-width: 560px;
      margin: 0 auto;
      line-height: 1.7;
    }

    .empty-week .gemini-prompt strong {
      font-family: 'Inconsolata', monospace;
      font-size: 11px;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: var(--sage);
      display: block;
      margin-bottom: 8px;
    }
