:root {
    --bg: #FCFFF7;
    --surface: #ffffff;
    --surface2: #F0F5EB;
    --border: #DCE8D6;
    --accent: #046865;
    --accent2: #21A0A0;
    --accent3: #E53D00;
    --accent4: #7A9E00;
    --text: #0F2322;
    --text-muted: #5E7A78;
    --text-mid: #2A4440;
    --bg-glass: rgba(252, 255, 247, 0.94);
    --overlay: rgba(0, 0, 0, 0.4);
    --bg-content: #FCFFF7;
    --header-h: 64px;
  --cat-accent: var(--accent);
  --font-serif: 'Playfair Display', serif;

  }

  [data-theme="dark"] {
    --bg: #0A1F1E;
    --surface: #112221;
    --surface2: #1A3331;
    --border: #1F4441;
    --accent: #21A0A0;
    --accent2: #C6DE57;
    --accent3: #E53D00;
    --accent4: #046865;
    --text: #FCFFF7;
    --text-muted: #6B9090;
    --text-mid: #A8C8C8;
    --bg-glass: rgba(10, 31, 30, 0.94);
    --overlay: rgba(0, 0, 0, 0.6);
    --bg-content: #0A1F1E;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  [hidden] { display: none !important; }

  @keyframes skel-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
  }

  .skel {
    display: block;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--border) 25%, var(--surface2) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: skel-shimmer 1.5s ease infinite;
  }

  .skel-heading {
    height: 1.85rem;
    width: 55%;
    margin-bottom: 0.25rem;
  }

  .skel-subtext {
    height: 0.875rem;
    width: 40%;
  }

  body {
    background: var(--bg-content);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    min-height: 100vh;
    overflow-x: hidden;
  }


  .logo-block {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  .logo-block h1 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--text);
    white-space: nowrap;
  }

  .logo-block h1 em {
    font-style: italic;
    color: var(--accent);
  }

  .logo-block p {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.01em;
  }

  .theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    padding: 0;
    line-height: inherit;
  }

  .theme-toggle:hover { color: var(--text); }

  /* Auth button */
  .auth-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    min-height: 40px;
    white-space: nowrap;
  }

  .auth-btn:hover { border-color: var(--accent); color: var(--accent); }

  .admin-new-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--accent);
    border: none;
    border-radius: 20px;
    color: #fff;
    padding: 0.3rem 0.9rem;
    cursor: pointer;
    min-height: 40px;
  }
  .admin-new-btn:hover { opacity: 0.9; }

  .modal-admin-edit {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    background: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    padding: 0 0.75rem;
    height: 40px;
    cursor: pointer;
    white-space: nowrap;
  }
  .modal-admin-edit:hover { border-color: var(--accent); color: var(--accent); }

  .auth-btn.signed-in { border-color: var(--border); color: var(--text); }

  /* ─── Site header ──────────────────────────────────────────────────────────── */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    height: var(--header-h);
    /* Extend behind iOS status bar */
    padding-top: env(safe-area-inset-top);
    height: calc(var(--header-h) + env(safe-area-inset-top));
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: flex-end;
  }

  .site-header-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 2rem;
    position: relative;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-shrink: 0;
  }

  .header-sep { display: none; }

  .header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    pointer-events: none;
  }
  .header-center .search-input { pointer-events: auto; }

  .header-center .search-input {
    max-width: 420px;
    width: 100%;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
  }

  /* Profile dropdown */
  .profile-wrap {
    position: relative;
  }

  .profile-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 176px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 150;
  }

  [data-theme="dark"] .profile-dropdown {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .profile-dd-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 40px;
    padding: 0 0.75rem;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
  }

  .profile-dd-item:hover { background: var(--surface2); }

  .profile-dd-item--danger { color: var(--accent3); }
  .profile-dd-item--danger:hover { background: rgba(229, 61, 0, 0.08); }

  .profile-dd-sep {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
  }

  /* Login modal */
  #loginModal {
    max-width: 400px;
  }

  .login-modal-inner {
    display: flex;
    flex-direction: column;
  }

  .login-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
  }

  .login-modal-logo {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text);
  }

  .login-modal-logo em {
    font-style: italic;
    color: var(--accent);
  }

  .login-modal-body {
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .login-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
  }

  .google-signin-btn {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    min-height: 48px;
    padding: 0 1.25rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
  }

  .google-signin-btn:hover {
    background: var(--surface2);
    border-color: var(--text-muted);
  }

  /* Settings modal */
  #settingsModal {
    max-width: 460px;
  }

  .settings-modal-body {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .settings-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .settings-section-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
  }

  .settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .settings-row-label {
    font-size: 0.875rem;
    color: var(--text);
  }

  .theme-option-group {
    display: flex;
    gap: 2px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
  }

  .theme-opt {
    padding: 0.3rem 0.75rem;
    min-height: 34px;
    border: none;
    border-radius: 6px;
    background: none;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
  }

  .theme-opt.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  [data-theme="dark"] .theme-opt.active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  /* Sidebar header label */
  .sidebar-header-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    flex: 1;
  }

  .auth-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    color: transparent;
  }

  .auth-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Layout */
  .layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    align-items: start;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: var(--header-h);
    height: calc(100dvh - var(--header-h));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface2);
    border-right: 1px solid var(--border);
  }

  .sheet-handle { display: none; }

  .sidebar-header {
    display: none;
  }

  .sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem;
  }

  .sidebar-section {
    padding: 1.25rem 0;
  }

  .sidebar-section + .sidebar-section {
    border-top: 1px solid var(--border);
  }

  .sidebar-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.625rem;
  }

  .sidebar-label.sidebar-collapsible-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-align: left;
  }

  .sidebar-collapsible-toggle::after {
    content: '+';
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1;
  }

  .sidebar-collapsible-toggle[aria-expanded="true"]::after {
    content: '−';
  }

  .sidebar-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 5px;
    cursor: pointer;
    color: var(--text-mid);
    font-size: 0.875rem;
    user-select: none;
    min-height: 40px;
  }

  .sidebar-option:hover {
    background: var(--surface2);
    color: var(--text);
  }

  .sidebar-option input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    min-width: 15px;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    background: var(--surface);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }

  .sidebar-option input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
  }

  .sidebar-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1.5px;
    width: 4px;
    height: 7px;
    border: 1.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
  }

  .time-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .time-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    padding: 0 0.875rem;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-muted);
    cursor: pointer;
  }

  .time-btn:hover { color: var(--text); border-color: var(--text-muted); }

  .time-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }

  .search-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    outline: none;
  }

  .search-input::placeholder { color: var(--text-muted); }
  .search-input:focus { border-color: var(--accent); }

  .mobile-filter-toggle {
    display: none;
  }

  /* Main content */
  main {
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .header-slogan {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.01em;
  }

  .slogan-text {
    display: inline-grid;
  }

  .slogan-a,
  .slogan-b {
    grid-area: 1 / 1;
    transition: opacity 1.4s ease;
    white-space: nowrap;
  }

  .slogan-b { opacity: 0; }

  .header-slogan.show-b .slogan-a { opacity: 0; }
  .header-slogan.show-b .slogan-b { opacity: 1; }

  .main-body {
    padding: 0 0 4rem;
  }

  .content-hero {
    background: var(--surface);
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
  }

  .section-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .section-header h2 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text);
  }

  .section-count {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
  }

  .category-section {
    margin-bottom: 3.5rem;
    padding: 0 2rem;
  }

  .category-section.hidden { display: none; }

  .cat-dot {
    display: none;
    margin-right: 0.5rem;
    vertical-align: middle;
  }

  .cat-breakfast { --cat-accent: var(--accent); }
  .cat-lunch     { --cat-accent: var(--accent2); }
  .cat-dinner    { --cat-accent: var(--accent3); }
  .cat-snack     { --cat-accent: var(--accent4); }

  .cat-breakfast .cat-dot { background: var(--accent); }
  .cat-lunch .cat-dot { background: var(--accent2); }
  .cat-dinner .cat-dot { background: var(--accent3); }
  .cat-snack .cat-dot { background: var(--accent4); }

  .card-image {
    background: linear-gradient(
      var(--card-angle, 135deg),
      hsl(var(--card-hue, 150), 30%, 93%) 0%,
      hsl(calc(var(--card-hue, 150) + var(--card-spread, 28)), 25%, 87%) 100%
    );
  }

  [data-theme="dark"] .card-image {
    background: linear-gradient(
      var(--card-angle, 135deg),
      hsl(var(--card-hue, 150), 20%, 11%) 0%,
      hsl(calc(var(--card-hue, 150) + var(--card-spread, 28)), 16%, 16%) 100%
    );
  }

  .card-image {
    margin: -1.5rem -1.5rem 1.25rem -1.5rem;
    height: 130px;
    border-radius: 5px 5px 0 0;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
  }

  .card-time-chip {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--text);
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 0.25rem 0.6rem;
    line-height: 1;
    pointer-events: none;
  }

  .card-time-chip svg {
    opacity: 0.7;
    flex-shrink: 0;
  }

  .card-emoji-grid {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    opacity: 1;
  }

  .card-emoji-row {
    display: flex;
    flex-shrink: 0;
    width: 200%;
  }

  .card-emoji-row.offset {
    transform: translateX(-10%);
  }

  .card-emoji-row span {
    font-size: 3.5rem;
    line-height: 1;
    padding: 0.12rem 0.1rem;
    flex-shrink: 0;
  }

  .recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
  }

  /* Recipe Card */
  .recipe-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .recipe-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .recipe-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 6px;
  }

  .cat-breakfast .recipe-card::before { background: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 5%, transparent) 0%, transparent 22%); }
  .cat-lunch .recipe-card::before { background: linear-gradient(to bottom, color-mix(in srgb, var(--accent2) 5%, transparent) 0%, transparent 22%); }
  .cat-dinner .recipe-card::before { background: linear-gradient(to bottom, color-mix(in srgb, var(--accent3) 5%, transparent) 0%, transparent 22%); }
  .cat-snack .recipe-card::before { background: linear-gradient(to bottom, color-mix(in srgb, var(--accent4) 5%, transparent) 0%, transparent 22%); }

  .recipe-card:hover {
    border-color: var(--accent);
  }


  .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    min-height: 0;
  }

  .card-meta:empty {
    margin-bottom: 0;
  }

  .card-stats {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
  }
  .card-time {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
  }
  .card-last-cooked {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.8;
  }


  /* Search highlight */
  .card-title mark, .card-desc mark {
    background: none;
    color: var(--accent);
    font-style: inherit;
    font-weight: 700;
  }

  .card-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: lowercase;
  }

  .card-title::first-letter {
    text-transform: uppercase;
  }

  .card-desc {
    font-size: 0.875rem;
    color: var(--text-mid);
    line-height: 1.5;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }


  .card-fav {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
  }
  .card-fav:hover { border-color: #e05555; color: #e05555; }
  .card-fav.active { background: #e05555; border-color: #e05555; color: #fff; }

  .card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
  }
  .card-cook-btn, .card-shop-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .card-shop-btn svg {
    display: flex;
  }
  .card-cook-btn {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
    font-weight: 500;
  }
  .card-cook-btn:hover { opacity: 0.9; }
  .card-shop-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
  }
  .card-shop-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
  .card-shop-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

  .card-admin-btn {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    padding: 0 0.6rem;
    border-radius: 6px;
    border: 1.5px dashed var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    min-height: 36px;
  }
  .card-admin-btn:hover { border-color: var(--accent); color: var(--accent); }

  /* Admin modal */
  #adminModal .modal-body { padding: 1.5rem 2rem; }

  .admin-footer-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
  }

  .admin-save-btn {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    min-height: 40px;
  }
  .admin-save-btn:hover { opacity: 0.9; }
  .admin-save-btn:disabled { opacity: 0.5; cursor: default; }

  .admin-delete-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    min-height: 40px;
  }
  .admin-delete-btn:hover { border-color: #c0392b; color: #c0392b; }
  .admin-delete-btn:disabled { opacity: 0.5; cursor: default; }

  .admin-sub-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
  }

  .admin-form-error {
    margin: 0 1.5rem 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: #fdecea;
    color: #c0392b;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
  }

  [data-theme="dark"] .admin-form-error { background: #3d1a1a; color: #e57373; }

  /* Mobile search bar (below header, scrolls away) */
  .mobile-search-bar {
    display: none;
  }

  /* Filter FAB (mobile only) */
  .filter-fab {
    display: none;
  }

  /* Shopping list FAB */
  .shop-fab {
    position: fixed;
    bottom: max(2rem, calc(1rem + env(safe-area-inset-bottom)));
    right: 2rem;
    z-index: 50;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0 1.25rem;
    height: 44px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .shop-fab:hover { opacity: 0.9; }

  /* Shopping list modal */
  .shop-modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .shop-modal-header .modal-title { margin: 0; }

  .shop-copy-btn {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
    border-radius: 8px;
    padding: 0 1.25rem;
    height: 44px;
    cursor: pointer;
  }
  .shop-copy-btn:hover { opacity: 0.9; }
  #shopModal .modal-body { padding: 1.5rem 2rem; }
  .shop-recipe-group { margin-bottom: 1.25rem; }
  .shop-recipe-title {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.375rem;
    text-transform: lowercase;
  }
  .shop-recipe-title::first-letter { text-transform: uppercase; }
  .shop-ing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text);
  }
  .shop-ing:last-child { border-bottom: none; }
  .shop-ing-amount { font-family: 'Fira Code', monospace; font-size: 0.8rem; color: var(--accent); min-width: 90px; flex-shrink: 0; }
  .shop-footer-row { display: flex; gap: 0.75rem; }
  .shop-clear-btn {
    height: 44px;
    padding: 0 1.25rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .shop-clear-btn:hover { border-color: #e05555; color: #e05555; }


  /* Modal */
  dialog:not([open]) { display: none; }

  dialog {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    padding: 0;
    max-width: 680px;
    width: calc(100% - 3rem);
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    margin: 0;
  }

  dialog::backdrop {
    background: rgba(18, 30, 25, 0.65);
  }

  [data-theme="dark"] dialog::backdrop {
    background: rgba(8, 12, 10, 0.88);
  }

  /* Recipe modal — fixed top bar (always 56px, no layout shift) */
  .modal-bar {
    flex-shrink: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    gap: 0.75rem;
  }

  .modal-bar-title {
    flex: 1;
    min-width: 0;
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .modal-bar--scrolled .modal-bar-title { opacity: 1; }

  .modal-bar-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
  }

  /* Artwork — scrolls naturally with content */
  .modal-artwork {
    position: relative;
    height: 200px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(
      var(--card-angle, 135deg),
      hsl(var(--card-hue, 150), 30%, 93%) 0%,
      hsl(calc(var(--card-hue, 150) + var(--card-spread, 28)), 25%, 87%) 100%
    );
  }

  [data-theme="dark"] .modal-artwork {
    background: linear-gradient(
      var(--card-angle, 135deg),
      hsl(var(--card-hue, 150), 20%, 11%) 0%,
      hsl(calc(var(--card-hue, 150) + var(--card-spread, 28)), 16%, 16%) 100%
    );
  }

  /* Title/stats strip below artwork, in scroll flow */
  .modal-header-bottom {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem 1.25rem;
  }

  .modal-fav {
    position: static;
    z-index: 2;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  .modal-fav:hover { border-color: #e05555; color: #e05555; }
  .modal-fav.active { background: #e05555; border-color: #e05555; color: #fff; }

  .modal-footer {
    flex-shrink: 0;
    padding: 1rem 2rem;
    padding-bottom: max(1rem, calc(0.75rem + env(safe-area-inset-bottom)));
    border-top: 1px solid var(--border);
    background: var(--surface);
  }

  .modal-shop-btn {
    width: auto;
    height: 48px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
  }
  .modal-shop-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
  .modal-shop-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }





  .modal-close {
    position: static;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
  }

  .modal-close:focus { outline: none; }
  .modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .modal-close:hover { border-color: var(--text); color: var(--text); }

  .modal-cat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 0.4rem;
  }

  .modal-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 0.5rem;
  }

  .modal-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .stat {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--text-muted);
  }

  .stat span {
    color: var(--text-mid);
  }

  @keyframes star-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
  }

  .star-row--loading svg {
    color: var(--border);
    animation: star-pulse 1.2s ease-in-out infinite;
  }

  .star-row--loading .star-btn:nth-child(2) svg { animation-delay: 0.12s; }
  .star-row--loading .star-btn:nth-child(3) svg { animation-delay: 0.24s; }
  .star-row--loading .star-btn:nth-child(4) svg { animation-delay: 0.36s; }
  .star-row--loading .star-btn:nth-child(5) svg { animation-delay: 0.48s; }

  /* ── Card stars ── */
  .card-stars {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-bottom: 0.35rem;
  }

  .card-star {
    font-size: 0.65rem;
    color: var(--text-muted);
  }

  .card-star.filled {
    color: #C8960C;
  }

  [data-theme="dark"] .card-star.filled {
    color: #D4A843;
  }

  .card-star-count {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-left: 0.2rem;
  }

  .card-star-total {
    opacity: 0.65;
  }

  /* ── Star ratings ── */
  .modal-rating {
    min-height: 1.5rem;
  }

  .star-rating {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .star-row-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .star-feedback {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
  }

  .star-feedback-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface2);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    resize: none;
  }

  .star-feedback-btn {
    align-self: flex-start;
    height: 36px;
    padding: 0 1rem;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .star-feedback-btn:disabled { opacity: 0.6; cursor: default; }

  .star-feedback-thanks {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
  }

  .star-row {
    display: flex;
    gap: 0;
    margin-left: -0.15rem;
  }

  .star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 0.1rem;
    min-height: 40px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
    font-size: 1.2rem;
  }

  .star-btn.filled {
    color: #C8960C;
  }

  .star-btn.preview {
    color: #D4A843;
  }

  .star-btn:disabled {
    cursor: default;
    opacity: 0.6;
  }

  [data-theme="dark"] .star-btn.filled {
    color: #D4A843;
  }

  [data-theme="dark"] .star-btn.preview {
    color: #E8C060;
  }

  .star-meta {
    font-family: 'Fira Code', monospace;
    font-size: 0.725rem;
    color: var(--text-muted);
  }

  .star-meta--empty,
  .star-meta--loading {
    font-style: italic;
  }

  .modal-body {
    padding: 0;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    flex: 1;
    contain: layout style;
  }

  .modal-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
  }

  .modal-section-title:first-child { margin-top: 0; }

  .ingredient-list {
    list-style: none;
  }

  .ingredient-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
  }

  .ingredient-list li:last-child { border-bottom: none; }

  .ing-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
  }

  .ing-row input[type="checkbox"] {
    width: 16px; height: 16px;
    min-width: 16px;
    accent-color: var(--accent);
    cursor: pointer;
  }

  .ing-row:has(input:checked) .ing-amount,
  .ing-row:has(input:checked) .ing-item,
  .ing-row:has(input:checked) .step-num,
  .ing-row:has(input:checked) span:not(.ing-amount):not(.step-num) {
    opacity: 0.35;
    text-decoration: line-through;
  }

  .ing-amount {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    min-width: 110px;
  }

  .steps-list {
    list-style: none;
  }

  .steps-list li {
    display: flex;
    padding: 0.6rem 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-mid);
    border-bottom: 1px solid var(--border);
  }

  .steps-list li:last-child { border-bottom: none; }

  .step-num {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    min-width: 1.5rem;
    padding-top: 0.2rem;
  }

  .step-duration {
    display: inline-block;
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--surface2);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    margin-left: 0.5rem;
    vertical-align: middle;
    white-space: nowrap;
  }

  .modal-two-col {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
  }

  .modal-col {
    flex: 1;
    min-width: 0;
  }

  .modal-bottom-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-top: 0.5rem;
  }

  .modal-bottom-col {
    flex: 1;
    min-width: 0;
  }

  .modal-tips {
    font-size: 0.875rem;
    color: var(--text-mid);
    line-height: 1.6;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
  }

  /* Serving selector */
  .serving-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .serving-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 0.25rem;
  }
  .serving-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .serving-btn:hover { border-color: var(--accent); color: var(--accent); }
  .serving-count {
    font-size: 0.875rem;
    color: var(--text);
    min-width: 1.5ch;
    text-align: center;
  }

  /* Nutrition panel */
  .nutrition-block { margin-top: 1.5rem; }
  .nutrition-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; max-width: 320px; }
  .nutrition-panel {
    display: table;
    width: 100%;
    min-width: 240px;
    max-width: 320px;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.8rem;
  }
  .nutrition-row {
    display: table-row;
  }
  .nutrition-label,
  .nutrition-value {
    display: table-cell;
    padding: 0.2rem 1rem 0.2rem 0;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    vertical-align: baseline;
  }
  .nutrition-row:last-child .nutrition-label,
  .nutrition-row:last-child .nutrition-value { border-bottom: none; }
  .nutrition-row.energy .nutrition-label,
  .nutrition-row.energy .nutrition-value { font-weight: 600; color: var(--text); }
  .nutrition-row.sub .nutrition-label { padding-left: 1rem; font-size: 0.75rem; color: var(--text-muted); }
  .nutrition-label { color: var(--text-mid); }
  .nutrition-value { font-family: 'Fira Code', monospace; color: var(--text); font-variant-numeric: tabular-nums; text-align: right; padding-right: 0; }
  .nutrition-kj { font-size: 0.75rem; color: var(--text-muted); margin-left: 0.4rem; }

  /* Empty state */
  .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    display: none;
  }

  /* Skeleton loading */
  @keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  .recipe-card.skeleton {
    min-height: 378px;
    background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s ease infinite;
    border-top-color: var(--border);
    box-shadow: none;
    pointer-events: none;
  }

  /* Pantry (in sidebar) */
  .pantry-view-toggle {
    display: inline-flex;
    background: var(--surface2);
    border-radius: 6px;
    padding: 2px;
    margin-bottom: 0.875rem;
  }

  .pvt-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0 0.75rem;
    height: 36px;
    border-radius: 4px;
    cursor: pointer;
  }

  .pvt-btn.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  .pantry-group { margin-bottom: 0.875rem; }
  .pantry-group:last-child { margin-bottom: 0; }

  .pantry-group-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
  }

  .pantry-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 5px;
    cursor: pointer;
    color: var(--text-mid);
    font-size: 0.875rem;
    user-select: none;
    min-height: 40px;
  }

  .pantry-option:hover {
    background: var(--surface2);
    color: var(--text);
  }

  .pantry-option input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    min-width: 15px;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    background: var(--surface);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }

  .pantry-option input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
  }

  .pantry-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1.5px;
    width: 4px;
    height: 7px;
    border: 1.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
  }

  .pantry-clear {
    font-size: 0.875rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    margin-top: 0.5rem;
    display: block;
  }

  .pantry-clear:hover { color: var(--text); }

  /* Card match chip */
  .card-match {
    display: none;
    font-size: 0.75rem;
    font-family: 'Fira Code', monospace;
    letter-spacing: 0.03em;
    padding: 0 0.5rem;
    height: 22px;
    border-radius: 999px;
    align-items: center;
    white-space: nowrap;
    font-weight: 500;
    margin-top: 0.5rem;
  }
  .card-match.visible    { display: inline-flex; }
  .card-match.match-low  { background: var(--surface2); color: var(--text-muted); }
  .card-match.match-mid  { background: #c97820; color: #fff; }
  .card-match.match-high { background: #3a9e5f; color: #fff; }

  /* Greeting block */
  .greeting-block {
    width: 100%;
    margin-bottom: 1rem;
  }

  .greeting-heading {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 0.75rem;
  }

  .greeting-suggestion {
    font-size: 0.875rem;
    color: var(--text-muted);
    width: 100%;
  }

  /* Greeting card */
  .greeting-inline {
    font-size: 0.875rem;
    color: var(--text-muted);
  }
  .greeting-inline a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
  }
  .greeting-inline a:hover { color: var(--text); }

  /* Sidebar footer */
  .sidebar-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background: var(--bg);
    padding: 0.625rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
  }

  .sidebar-count {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
  }

  .sidebar-filter-chips {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
  }

  #filterSummary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .filter-all-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
  }

  .filter-on-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .sidebar-reset-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
    flex-shrink: 0;
  }

  .sidebar-reset-btn:not(:disabled):hover { color: var(--text); }
  .sidebar-reset-btn:disabled { cursor: default; }

  /* Sort bar */
  .sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.625rem 2rem 1rem;
  }

  .sort-bar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
  }

  .filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-mid);
    padding: 0 0.75rem;
    height: 32px;
    border-radius: 999px;
  }

  .filter-pill-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
  }

  .filter-pill-remove:hover { color: var(--text); }

  .sort-control { flex-shrink: 0; display: flex; align-items: center; gap: 0.375rem; }

  .sort-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
  }

  .sort-select {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0 2.25rem 0 0.75rem;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2386867f' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    outline: none;
  }

  .sort-select:focus { border-color: var(--accent); }

  .sort-dir-btn {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .sort-dir-btn:hover { border-color: var(--accent); color: var(--accent); }

  /* Scrollbar */
  /* Filter resume card */
  .filter-resume-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    margin: 1rem 0 0;
  }

  .filter-resume-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }

  .filter-resume-text em {
    font-style: normal;
    color: var(--text);
  }

  .filter-resume-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
  }

  .filter-resume-apply {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0 0.75rem;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
  }

  .filter-resume-dismiss {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
  }

  .filter-resume-dismiss:hover { color: var(--text); }

  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

  /* Mobile sheet overlay */
  .sheet-backdrop {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 200;
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
  }

  .sheet-backdrop.open { opacity: 1; pointer-events: auto; }

  .sheet-close-btn { display: none; }
  .sheet-apply-btn { display: none; }

  /* Share button */
  .modal-share {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    background: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    padding: 0 0.75rem;
    height: 40px;
    cursor: pointer;
    white-space: nowrap;
  }
  .modal-share:hover { border-color: var(--accent); color: var(--accent); }

  /* Modal footer two-button layout */
  .modal-footer-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .modal-cook-btn {
    height: 48px;
    padding: 0 1rem;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
  }
  .modal-cook-btn:hover { opacity: 0.9; }
  .modal-cook-btn svg, .modal-shop-btn svg { display: block; flex-shrink: 0; }

  /* Cooking mode dialog — full screen, inherits page theme */
  #cookModal {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    translate: none !important;
    transform: none !important;
    top: 0 !important;
    left: 0 !important;
    background: var(--bg);
    color: var(--text);
  }
  .cook-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1.5rem;
    padding-top: max(1rem, calc(0.75rem + env(safe-area-inset-top)));
    padding-bottom: 0.875rem;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
  }
  .cook-header-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .cook-step-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    height: 36px;
    border-bottom: 1px solid var(--border);
  }

  .cook-step-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
  }
  .cook-recipe-title {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .cook-ingredients-toggle {
    height: 40px;
    padding: 0 0.875rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
  }
  .cook-ingredients-toggle[aria-expanded="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
  .cook-close {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  .cook-ingredients-panel {
    flex-shrink: 0;
    max-height: 40vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
  }
  .cook-ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .cook-ing-row {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text);
  }
  .cook-ing-amount {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    min-width: 80px;
    flex-shrink: 0;
  }
  .cook-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .cook-step-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2rem 2.5rem 1.5rem;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  [data-theme="light"] .cook-step-card {
    background: var(--surface);
    border-color: var(--border-hover, var(--border));
  }
  .cook-timer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .cook-timer-display {
    font-family: 'Fira Code', monospace;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
    min-width: 4.5ch;
  }

  .cook-timer-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .cook-timer-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
  }

  .cook-timer-play-btn:hover { background: var(--accent); color: #fff; }
  .cook-timer-play-btn:disabled { opacity: 0.35; cursor: default; }
  .cook-timer-play-btn:disabled:hover { background: transparent; color: var(--accent); }

  .cook-timer-reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0.5;
  }

  .cook-timer-reset-btn:hover { opacity: 1; color: var(--text); }

  .cook-hint {
    display: block;
    text-align: center;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 32px;
    width: 100%;
    max-width: 520px;
  }

  /* Hide keyboard hints on touch-only devices */
  @media (hover: none) and (pointer: coarse) {
    .cook-hint { display: none; }
  }

  /* ── Done screen ── */
  .cook-done-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.625rem;
    padding: 1rem 0;
  }

  .cook-done-check {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    margin-bottom: 0.5rem;
    position: relative;
    flex-shrink: 0;
  }

  .cook-done-check::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 26px;
    height: 14px;
    border-left: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg) translate(1px, -3px);
  }

  .cook-done-heading {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
    margin: 0;
  }

  .cook-done-body {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-muted);
    margin: 0;
  }

  .cook-done-time {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin: 0.25rem 0 0;
  }

  .cook-done-rating-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    min-height: 160px;
    opacity: 0;
    transition: opacity 300ms ease;
  }

  .cook-done-rating-section.visible {
    opacity: 1;
  }

  .cook-done-rating-section.already-rated .cook-done-divider,
  .cook-done-rating-section.already-rated .cook-done-rating-label,
  .cook-done-rating-section.already-rated .cook-done-stars,
  .cook-done-rating-section.already-rated .cook-done-keyboard-hint {
    display: none;
  }

  .cook-done-divider {
    width: 100%;
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
  }

  .cook-done-rating-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 0.625rem;
  }

  .cook-done-stars {
    display: flex;
    gap: 0.25rem;
    transition: opacity 200ms ease;
  }

  @keyframes rating-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
  }

  .cook-done-stars.rating-loading {
    animation: rating-pulse 600ms ease-in-out infinite;
  }

  .cook-done-star-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--border);
    display: flex;
    align-items: center;
    min-height: 40px;
  }

  .cook-done-star-btn.filled { color: #C8960C; }
  [data-theme="dark"] .cook-done-star-btn.filled { color: #D4A843; }
  .cook-done-star-btn:hover { color: var(--accent); }

  .cook-done-feedback {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.25rem;
  }

  /* Keep space reserved even when hidden so card height doesn't shift */
  .cook-done-feedback[hidden] {
    display: flex !important;
    visibility: hidden;
    pointer-events: none;
  }

  .cook-done-feedback-input {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    padding: 0.625rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    resize: none;
    box-sizing: border-box;
  }

  .cook-done-feedback-input:focus { outline: none; border-color: var(--accent); }

  .cook-done-feedback-btn {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 1rem;
    border-radius: 6px;
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    min-height: 40px;
  }

  .cook-done-feedback-btn:hover { background: var(--accent); color: #fff; }
  .cook-done-feedback-btn:disabled { opacity: 0.5; cursor: default; }
  .cook-done-feedback-btn:disabled:hover { background: transparent; color: var(--accent); }

  .cook-done-feedback-thanks {
    display: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
  }

  .cook-done-rating-section {
    position: relative;
  }

  .cook-done-rating-section.rating-submitted .cook-done-rating-label,
  .cook-done-rating-section.rating-submitted .cook-done-stars,
  .cook-done-rating-section.rating-submitted .cook-done-keyboard-hint,
  .cook-done-rating-section.rating-submitted .cook-done-feedback {
    visibility: hidden;
    pointer-events: none;
  }

  .cook-done-rating-section.rating-submitted .cook-done-feedback-thanks {
    display: block;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cook-done-keyboard-hint {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 0;
  }

  .cook-done-btn {
    margin-top: auto;
    height: 48px;
    padding: 0 2rem;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cook-done-btn:hover { opacity: 0.9; }

  @media (hover: none) and (pointer: coarse) {
    .cook-done-btn { display: flex !important; }
  }


  @keyframes cook-done-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
  }

  .cook-done-fading {
    animation: cook-done-fade-out 350ms ease forwards;
  }

  .modal-content {
    padding: 1.5rem 2rem 2rem;
  }

  .modal-header-bottom .modal-title {
    margin-bottom: 0.25rem;
  }
  .cook-step-text {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 3.5vw, 1.875rem);
    line-height: 1.55;
    text-align: left;
    color: var(--text);
    margin: 0;
    white-space: pre-line;
  }
  .cook-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    padding-bottom: max(1.5rem, calc(1rem + env(safe-area-inset-bottom)));
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    gap: 1rem;
  }
  .cook-nav-btn {
    width: 56px; height: 56px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .cook-nav-btn:hover { border-color: var(--accent); color: var(--accent); }
  .cook-nav-btn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }
  .cook-nav-btn#cookNext { background: var(--accent); border-color: var(--accent); color: #fff; }
  .cook-nav-btn#cookNext:hover { opacity: 0.9; }
  .cook-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
  }
  .cook-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
  }
  .cook-dot.active {
    background: var(--accent);
    width: 20px;
    border-radius: 3px;
  }

  /* Onboarding tip */


  /* Recipe submission form */
  .submit-section {
    margin-bottom: 1.75rem;
  }
  .submit-section-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  .submit-field {
    margin-bottom: 0.75rem;
  }
  .submit-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
  }
  .submit-input {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--text);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    box-sizing: border-box;
    resize: vertical;
  }
  .submit-input:focus { outline: none; border-color: var(--accent); }
  .submit-add-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    height: 28px;
  }
  .submit-add-btn:hover { border-color: var(--accent); color: var(--accent); }
  .submit-ing-row, .submit-step-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.5rem;
  }
  .sf-ing-amount { width: 70px; flex-shrink: 0; }
  .sf-ing-unit { width: 60px; flex-shrink: 0; }
  .sf-ing-item { flex: 1; }
  .submit-step-num {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 0.6rem;
    width: 1.5rem;
    flex-shrink: 0;
    text-align: right;
  }
  .submit-step-row .submit-input { flex: 1; }
  .submit-rm-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    width: 32px; height: 36px;
    cursor: pointer;
    font-size: 1rem;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .submit-rm-btn:hover { border-color: #e05555; color: #e05555; }
  .submit-nutrition-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .submit-json {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    min-height: 200px;
    color: var(--text);
    background: var(--surface2);
  }

  @media (max-width: 768px) {
    .layout { grid-template-columns: 1fr; }

    .sidebar {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      top: auto;
      height: auto;
      max-height: 92vh;
      max-height: 92dvh;
      overflow: hidden;
      border-right: none;
      border-top: 1px solid var(--border);
      border-radius: 16px 16px 0 0;
      z-index: 201;
      transform: translateY(110%);
      background: var(--surface);
      transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    }

    .sidebar.open { transform: translateY(0); }

    .sheet-handle {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      padding: 1rem 0 0.5rem;
      flex-shrink: 0;
      cursor: grab;
      touch-action: pan-y;
    }
    .sheet-handle::after {
      content: '';
      width: 36px;
      height: 4px;
      background: var(--border);
      border-radius: 2px;
    }

    .sidebar-header {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding: 0.75rem 1.25rem;
      background: var(--surface);
    }
    .sidebar-header-label { display: none; }

    .sheet-close-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      width: 40px;
      height: 40px;
      background: none;
      border: 1px solid var(--border);
      border-radius: 50%;
      color: var(--text-muted);
      font-size: 0.875rem;
      cursor: pointer;
    }

    .sheet-close-btn:hover { border-color: var(--text); color: var(--text); }

    .sidebar-body {
      overflow-y: auto;
      overscroll-behavior: contain;
      max-height: calc(92vh - var(--header-h) - 3.5rem);
      max-height: calc(92dvh - var(--header-h) - 3.5rem);
    }

    .sheet-apply-btn {
      display: block;
      position: sticky;
      bottom: 0;
      width: 100%;
      background: var(--surface);
      border: none;
      padding: 0.75rem 1.25rem;
      padding-bottom: max(2rem, calc(1.5rem + env(safe-area-inset-bottom)));
      cursor: pointer;
      font-size: 0;
      color: transparent;
    }
    .sheet-apply-btn::before {
      content: 'Apply filters';
      display: block;
      background: var(--accent);
      color: #fff;
      font-family: 'Inter', sans-serif;
      font-size: 0.875rem;
      font-weight: 500;
      border-radius: 8px;
      padding: 0.75rem 1rem;
      text-align: center;
    }

    /* ── Header: single slim row, no search ── */
    .header-sep { display: none; }
    .header-slogan { display: none; }
    .header-center { display: none; }
    .site-header {
      height: calc(var(--header-h) + env(safe-area-inset-top));
      align-items: flex-end;
    }
    .site-header-inner {
      padding: 0 1rem 0;
      height: var(--header-h);
      align-items: center;
    }
    .header-left { flex: 1; }
    .header-right { flex-shrink: 0; }

    /* ── Mobile search bar (normal flow, scrolls away) ── */
    .mobile-search-bar {
      display: block;
      padding: 0.625rem 1rem;
      background: var(--bg);
      border-bottom: 1px solid var(--border);
    }
    .mobile-search-bar .search-input {
      width: 100%;
      font-size: 16px;
    }

    /* ── Filter FAB ── */
    .filter-fab {
      display: flex;
      position: fixed;
      bottom: max(1.5rem, calc(1rem + env(safe-area-inset-bottom)));
      left: 1.25rem;
      z-index: 50;
      align-items: center;
      gap: 0.375rem;
      background: var(--surface);
      border: 1.5px solid var(--border);
      color: var(--text);
      border-radius: 100px;
      font-family: 'Inter', sans-serif;
      font-size: 0.875rem;
      font-weight: 500;
      padding: 0 1.25rem;
      height: 48px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.12);
      cursor: pointer;
    }
    .filter-fab.open {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }
    [data-theme="dark"] .filter-fab { box-shadow: 0 4px 20px rgba(0,0,0,0.35); }

    /* ── Layout & cards ── */
    .main-body { padding: 0 0 6rem; }
    .content-hero { padding: 1.25rem 1.25rem 1.25rem; }
    .category-section { padding: 0 1.25rem; }
    .recipe-grid { grid-template-columns: 1fr; }
    .modal-content, .modal-footer { padding-left: 1.25rem; padding-right: 1.25rem; }
    .modal-footer { padding-bottom: max(1.25rem, calc(0.5rem + env(safe-area-inset-bottom))); }
    .nutrition-panel, .nutrition-header { max-width: 100%; }
    .search-input { font-size: 16px; }
    .sort-bar { flex-direction: column; align-items: stretch; gap: 0.625rem; padding: 0.875rem 1.25rem; }
    .sort-bar-left { flex: unset; width: 100%; }
    .sort-control { justify-content: flex-start; }
    .filter-all-label { font-size: 0; }
    .filter-all-label::after { content: 'Showing all recipes'; font-size: 0.75rem; }

    /* ── Modals ── */
    dialog {
      width: 100%;
      max-width: 100%;
      position: fixed;
      top: 5dvh;
      bottom: 0;
      left: 0;
      right: 0;
      height: 95dvh;
      max-height: 95dvh;
      border-radius: 16px 16px 0 0;
      translate: none;
      transform: none;
    }

    /* Login + settings: short sheets from bottom */
    #loginModal, #settingsModal {
      top: auto;
      height: auto;
      max-height: 75dvh;
    }

    /* Cook mode is always full screen */
    #cookModal {
      top: 0 !important;
      height: 100% !important;
      max-height: 100% !important;
      border-radius: 0 !important;
    }

    .modal-cook-btn, .modal-shop-btn { height: 44px; font-size: 0.85rem; }
    .submit-nutrition-grid { grid-template-columns: 1fr; }

    /* Recipe modal header */
    .modal-artwork { height: 140px; }
    .modal-header-bottom { padding: 0.875rem 1.25rem 1rem; }
    .modal-header-bottom .modal-title { font-size: 1.35rem; }

    /* Cook mode mobile */
    .cook-step-card { padding: 1.25rem 1.25rem 1rem; }
    .cook-step-text { font-size: 1rem; }
    .cook-body { padding: 1.25rem; }

  }