:root {
  --ink: #1a1208; --parchment: #faf7f2; --gold: #c8973a;
  --dark: #2c2416; --border: #d4c9b0; --muted: #7a6a50; --body-col: #5a4e3c;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { font-family: 'Source Sans 3', sans-serif; background: #1c1710; color: #e8dfc8; min-height: 100vh; display: flex; flex-direction: column; }

/* ── AUTH (legacy) ── */
.landing-body { display: flex; flex-direction: column; min-height: 100vh; }
.auth-screen { flex: 1; display: flex; align-items: center; justify-content: center; background: #1c1710; background-image: radial-gradient(ellipse at 30% 40%, #2c2010 0%, transparent 60%), radial-gradient(ellipse at 70% 70%, #1a1008 0%, transparent 50%); }
.auth-box { background: #241e14; border: 1px solid #3a3020; padding: 48px 40px; text-align: center; max-width: 380px; width: 90%; }
.auth-logo { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: var(--parchment); margin-bottom: 10px; }
.auth-logo span { color: var(--gold); }
.auth-sub { font-size: 12px; font-weight: 300; color: #9a8c78; margin-bottom: 32px; line-height: 1.6; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: var(--parchment); color: var(--ink); border: none; padding: 13px 20px; font-family: 'Source Sans 3', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.2s; margin-bottom: 16px; text-decoration: none; }
.google-btn:hover { background: #fff; }
.auth-note { font-size: 10px; font-weight: 300; color: #5a5040; }

/* ── TOP BAR ── */
.topbar {
  background: var(--dark);
  border-bottom: 3px solid var(--gold);
  padding: 14px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  gap: 24px;
}
.topbar-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--parchment); }
.topbar-title span { color: var(--gold); }
.topbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700;
  color: var(--parchment); text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}
.topbar-brand span { color: var(--gold); }
.land-logo,
.app-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.logo-mark {
  width: 22px;
  height: 16px;
  flex-shrink: 0;
  position: relative;
  top: -1px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.topbar-link {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: #9a8c78;
  text-decoration: none; transition: color 0.2s;
}
.topbar-link:hover, .topbar-link.active { color: var(--gold); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.topbar-auth-slot { display: inline-block; min-width: 56px; text-align: center; }
.user-info { display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gold); }
.user-name { font-size: 11px; font-weight: 300; color: #9a8c78; }
.topbar-pro-badge {
  background: var(--gold);
  color: var(--dark);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  margin-left: 4px;
}
.signout-btn {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: #c8b898;
  text-decoration: none; transition: color 0.2s;
}
.signout-btn:hover { color: var(--gold); }
.nav-signin-btn {
  background: var(--gold); color: var(--dark);
  padding: 8px 18px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; transition: background 0.2s;
}
.nav-signin-btn:hover { background: #d9a840; }

/* ── LAYOUT ── */
.main { display: flex; flex: 1; overflow: hidden; }

/* ── SIDEBAR ── */
.sidebar { width: 300px; flex-shrink: 0; background: #241e14; border-right: 1px solid #3a3020; display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.tabs { display: flex; flex-shrink: 0; border-bottom: 1px solid #3a3020; }
.sidebar-tabs-content { flex: 1; overflow-y: auto; }
.tab {
  flex: 1; padding: 13px 8px; text-align: center;
  font-size: 10px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: #9a8c78;
  cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s;
}
.tab.active { color: #d4a840; border-bottom-color: #d4a840; }
.tab-pro-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.tab-panel { flex: 1; overflow-y: auto; display: none; flex-direction: column; }
.tab-panel.active { display: flex; }

.panel-section { padding: 15px 18px; border-bottom: 1px solid #3a3020; }
.panel-section:last-child { border-bottom: none; }
.panel-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: #c8b898; margin-bottom: 9px;
}

input[type="password"], input[type="text"], textarea {
  width: 100%; background: #1a1510; border: 1px solid #4a4030;
  color: #f0e8d8; font-family: 'Source Sans 3', sans-serif;
  font-size: 14px; font-weight: 300; padding: 9px 11px; line-height: 1.5;
  outline: none; transition: border-color 0.2s; resize: vertical;
}
input[type="password"]:focus, input[type="text"]:focus, textarea:focus { border-color: var(--gold); }
input::placeholder, textarea::placeholder { color: #6a5e4a; }
.hint {
  font-size: 12px; font-weight: 300; color: #9a8c78;
  margin-top: 7px; line-height: 1.6;
}
.input-hint {
  font-size: 10px;
  color: #6a5e4a;
  line-height: 1.6;
  margin-top: 6px;
}
kbd {
  font-size: 9px;
  background: #3a3020;
  color: #c8b898;
  padding: 1px 5px;
  border-radius: 2px;
  font-family: 'Source Sans 3', sans-serif;
}
textarea.recipe-input { min-height: 150px; }

/* ── INPUT MODE TOGGLE ── */
.input-mode-toggle {
  display: flex;
  gap: 0;
  border: 1px solid #3a3020;
  overflow: hidden;
}
.imt-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #7a6e5a;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
}
.imt-btn:first-child { border-right: 1px solid #3a3020; }
.imt-btn:hover { color: #c8b898; background: #1a1510; }
.imt-btn.active { background: #2c2416; color: var(--gold); }
.imt-btn[data-pro="true"] { opacity: 0.7; }
.imt-btn[data-pro="true"]:hover { opacity: 1; }

.imt-pro-badge {
  background: var(--gold);
  color: var(--dark);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 1px 4px;
  text-transform: uppercase;
}

.btn-primary {
  width: 100%; background: var(--gold); color: var(--dark); border: none;
  padding: 14px; font-family: 'Source Sans 3', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; cursor: pointer; transition: background 0.2s;
}
.btn-primary:hover { background: #d9a840; }
.btn-primary:disabled { background: #5a4e30; color: #8a7a50; cursor: not-allowed; }

.btn-secondary {
  width: 100%; background: transparent; color: #c8b898;
  border: 1px solid #4a4030; padding: 11px;
  font-family: 'Source Sans 3', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; transition: all 0.2s; margin-top: 8px;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-secondary:disabled {
  border-color: #4a4030;
  color: #6a5e4a;
  cursor: not-allowed;
  opacity: 0.75;
}
.btn-secondary:disabled:hover {
  border-color: #4a4030;
  color: #6a5e4a;
}
.btn-signin-save {
  width: 100%;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 11px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.2s;
}
.btn-signin-save:hover {
  background: var(--gold);
  color: var(--dark);
}
.signin-wrap-copy {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.5;
  color: #bda985;
}
.signin-wrap-copy a {
  color: #d8b16c;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.signin-wrap-copy a:hover {
  color: var(--gold);
}

.status-msg {
  font-size: 13px; font-weight: 300; color: #d4a84a;
  margin-top: 8px; min-height: 18px;
}
.error-msg {
  font-size: 13px; font-weight: 300; color: #c87060; margin-top: 8px;
}
.upgrade-prompt {
  background: #2c2010;
  border: 1px solid var(--gold);
  border-left: 3px solid var(--gold);
  padding: 12px 14px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 300;
  color: #e8dfc8;
  line-height: 1.5;
}
.upgrade-prompt-later {
  margin-top: 8px;
  background: transparent;
  border: none;
  color: #b9a07a;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
}
.upgrade-prompt-later:hover { color: var(--gold); }

.badge { display: inline-block; background: var(--gold); color: var(--dark); font-size: 8px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 6px; margin-left: 7px; vertical-align: middle; }

/* ── LIBRARY ── */
.repo-empty { padding: 24px 18px; font-size: 12px; font-weight: 300; color: #5a5040; font-style: italic; text-align: center; }
.repo-loading { padding: 24px 18px; font-size: 11px; color: #5a5040; text-align: center; }
.repo-item { padding: 12px 18px; border-bottom: 1px solid #3a3020; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; transition: background 0.15s; }
.repo-item:hover { background: #2e2618; }
.repo-item.active { background: #352c1c; border-left: 2px solid var(--gold); }
.repo-item-info { flex: 1; min-width: 0; }
.repo-item-title {
  font-family: 'Playfair Display', serif; font-size: 14px;
  font-weight: 700; color: #e8dfc8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.repo-item-meta { font-size: 11px; font-weight: 300; color: #7a6e5a; margin-top: 3px; }
.repo-count {
  font-size: 10px; font-weight: 600; color: #7a6e5a;
  letter-spacing: 0.1em; padding: 11px 18px;
  border-bottom: 1px solid #3a3020; text-transform: uppercase;
}
.btn-danger { background: transparent; color: #8a5050; border: none; padding: 4px 7px; font-size: 11px; cursor: pointer; transition: color 0.2s; }
.btn-danger:hover { color: #c87060; }
.account-info { font-size: 11px; font-weight: 300; color: #9a8c78; line-height: 1.7; }
.account-info strong { color: #e8dfc8; font-weight: 600; }
.plan-badge-pro {
  background: var(--gold);
  color: var(--dark);
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  display: inline-block;
  padding: 3px 8px;
}
.plan-date {
  font-size: 11px;
  font-weight: 400;
  color: #9a8c78;
  margin: 4px 0 10px;
  letter-spacing: 0.02em;
}
.plan-date-cancelled {
  color: #c87060;
}
.plan-badge-free {
  background: #1a1510;
  color: #8c7a5b;
  border: 1px solid #3a3020;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  display: inline-block;
  padding: 3px 8px;
}
.btn-cancel-subscription {
  width: 100%;
  background: #3a1b18;
  color: #efc2bb;
  border: 1px solid #8f3d31;
  padding: 11px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 10px;
}
.btn-cancel-subscription:hover { background: #4a2320; }
.btn-cancel-subscription:disabled { opacity: 0.6; cursor: not-allowed; }
.cancel-status {
  min-height: 18px;
  margin-top: 8px;
  font-size: 12px;
  color: #bcae92;
}
.settings-support-link {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #3a3020;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-support-link a {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.06em;
}
.settings-support-link a:hover { text-decoration: underline; }
.settings-support-hint {
  font-size: 10px;
  font-weight: 300;
  color: #6a5e4a;
  line-height: 1.5;
}
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid #2a2010;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.sidebar-footer-link {
  font-size: 10px;
  font-weight: 400;
  color: #5a4e3c;
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.15s;
}
.sidebar-footer-link:hover { color: var(--gold); }
.sidebar-footer-sep {
  font-size: 10px;
  color: #3a3020;
}

/* ── LIBRARY ITEM ACTIONS ── */
.repo-item-actions {
  display: flex; gap: 0;
  border-bottom: 1px solid #3a3020;
  background: #1e1810;
}
.repo-action-btn {
  flex: 1; background: transparent; border: none;
  border-right: 1px solid #3a3020;
  color: #9a8c78; font-family: 'Source Sans 3', sans-serif;
  font-size: 9px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 9px 4px;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.repo-action-btn:last-child { border-right: none; }
.repo-action-btn:hover { background: #2a2418; color: var(--gold); }
.repo-action-btn.locked { opacity: 0.5; cursor: not-allowed; }
.repo-action-btn.locked:hover { background: transparent; color: #9a8c78; }
.repo-action-btn[data-locked="true"] { opacity: 0.5; cursor: not-allowed; }
.repo-action-btn[data-locked="true"]:hover { background: transparent; color: #9a8c78; }

.repo-action-pro {
  background: var(--gold); color: var(--dark);
  font-size: 6px; font-weight: 700; letter-spacing: 0.08em;
  padding: 1px 3px; text-transform: uppercase;
}

.repo-action-edit  { }
.repo-action-share { }
.repo-action-print { }

/* ── INLINE EDIT PANEL ── */
.repo-edit-panel {
  background: #1a1510;
  border-bottom: 1px solid #3a3020;
  padding: 12px 14px;
  animation: slideDown 0.15s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.repo-edit-textarea {
  width: 100%; background: #0f0d0a;
  border: 1px solid #3a3020; color: #e8dfc8;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px; font-weight: 300; line-height: 1.6;
  padding: 8px 10px; resize: vertical;
  min-height: 120px; max-height: 280px;
  outline: none; transition: border-color 0.2s;
}
.repo-edit-textarea:focus { border-color: var(--gold); }
.repo-edit-actions {
  display: flex; gap: 8px; margin-top: 8px; align-items: center;
}
.repo-edit-regen {
  flex: 1; background: var(--gold); color: var(--dark); border: none;
  padding: 9px 12px; font-family: 'Source Sans 3', sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; cursor: pointer; transition: background 0.2s;
}
.repo-edit-regen:hover    { background: #d9a840; }
.repo-edit-regen:disabled { background: #5a4e30; color: #8a7a50; cursor: not-allowed; }
.repo-edit-cancel {
  background: transparent; border: 1px solid #3a3020; color: #6a5e4a;
  padding: 9px 12px; font-family: 'Source Sans 3', sans-serif;
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer; transition: all 0.2s;
}
.repo-edit-cancel:hover { border-color: #6a5e4a; color: #9a8c78; }
.repo-edit-status {
  font-size: 11px; font-weight: 300; color: var(--gold);
  margin-top: 7px; min-height: 14px;
}
.repo-edit-save {
  width: 100%; background: transparent;
  border: 1px solid var(--gold); color: var(--gold);
  padding: 9px; font-family: 'Source Sans 3', sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; cursor: pointer; margin-top: 8px;
  transition: all 0.2s;
}
.repo-edit-save:hover    { background: var(--gold); color: var(--dark); }
.repo-edit-save:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── PREVIEW ── */
.preview-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 32px;
  box-sizing: border-box;
  background-color: #f0ebe0;
  background-image:
    linear-gradient(rgba(200,151,58,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,151,58,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.cards-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  width: max-content;
  margin: 0 auto;
  transform-origin: top center;
}

/* ── GHOST CARD ── */
@keyframes ghostPulse {
  0%, 100% { opacity: 0.82; }
  50%       { opacity: 0.62; }
}

.ghost-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 360px;
  padding: 24px;
  box-sizing: border-box;
}
.ghost-card {
  width: 100%;
  max-width: 660px;
  background: rgba(250,247,242,0.78);
  border: 1.5px dashed rgba(200,151,58,0.42);
  position: relative;
  animation: ghostPulse 2.8s ease-in-out infinite;
  display: flex;
  flex-direction: column;
}
.ghost-top-band {
  height: 18px;
  background: rgba(44,36,22,0.16);
  display: flex;
  align-items: center;
  padding: 0 12px;
}
.ghost-band-bar {
  width: 80px;
  height: 4px;
  background: rgba(200,151,58,0.3);
  border-radius: 1px;
}
.ghost-gold-accent {
  height: 4px;
  background: rgba(200,151,58,0.26);
}
.ghost-body {
  display: flex;
  flex: 1;
  padding: 16px;
  min-height: 260px;
}
.ghost-left {
  flex: 0 0 44%;
  padding-right: 14px;
  display: flex;
  flex-direction: column;
}
.ghost-right {
  flex: 1;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
}
.ghost-col-divider {
  width: 1px;
  background: rgba(212,201,176,0.62);
  flex-shrink: 0;
}

.ghost-eyebrow {
  height: 5px;
  width: 80px;
  background: rgba(200,151,58,0.34);
  margin-bottom: 10px;
  border-radius: 1px;
}
.ghost-title-line {
  height: 14px;
  background: rgba(44,36,22,0.18);
  margin-bottom: 6px;
  border-radius: 2px;
}
.ghost-text-line {
  height: 7px;
  background: rgba(44,36,22,0.12);
  margin-bottom: 5px;
  border-radius: 1px;
}
.ghost-section-label {
  height: 5px;
  width: 70px;
  background: rgba(200,151,58,0.3);
  margin-bottom: 8px;
  border-radius: 1px;
}
.ghost-footer-line {
  height: 6px;
  background: rgba(44,36,22,0.1);
  margin-top: 12px;
  border-radius: 1px;
}
.ghost-table-header {
  height: 14px;
  background: rgba(44,36,22,0.2);
  margin-bottom: 2px;
}
.ghost-table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 14px;
  padding: 0 4px;
  margin-bottom: 2px;
  background: rgba(250,247,242,0.5);
}
.ghost-row-alt { background: rgba(244,239,230,0.5); }
.ghost-cell {
  height: 6px;
  background: rgba(44,36,22,0.12);
  border-radius: 1px;
}

.ghost-step {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.ghost-step-num {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(200,151,58,0.34);
  flex-shrink: 0;
  margin-top: 2px;
}
.ghost-step-content { flex: 1; }
.ghost-step-verb {
  height: 6px;
  width: 36px;
  background: rgba(44,36,22,0.2);
  margin-bottom: 6px;
  border-radius: 1px;
}

/* Width utilities */
.ghost-w-15 { width: 15%; } .ghost-w-18 { width: 18%; }
.ghost-w-20 { width: 20%; } .ghost-w-40 { width: 40%; }
.ghost-w-45 { width: 45%; } .ghost-w-50 { width: 50%; }
.ghost-w-55 { width: 55%; } .ghost-w-60 { width: 60%; }
.ghost-w-65 { width: 65%; } .ghost-w-70 { width: 70%; }
.ghost-w-75 { width: 75%; } .ghost-w-80 { width: 80%; }
.ghost-w-85 { width: 85%; } .ghost-w-90 { width: 90%; }

/* CTA overlay */
.ghost-cta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  background: rgba(240,235,224,0.22);
}
.ghost-cta-icon {
  font-size: 22px;
  color: rgba(200,151,58,0.78);
  line-height: 1;
}
.ghost-cta-text {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  color: rgba(200,151,58,0.88);
  letter-spacing: 0.02em;
}

/* On wide screens, show two cards side by side */
@media (min-width: 1400px) {
  .cards-wrapper.two-cards {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 48px;
  }
  .cards-wrapper.two-cards .card-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

.card-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: #9a8878;
  margin-bottom: 8px; text-align: center;
}

/* ── RECIPE CARD ── */
.recipe-card {
  width: 6in; height: 4in;
  background: var(--parchment);
  position: relative; overflow: hidden;
  box-shadow: 0 4px 24px rgba(44,36,22,0.18), 0 1px 4px rgba(44,36,22,0.1);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.recipe-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 10; opacity: 0.5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"); }
.c-top-band   { background: var(--dark); height: 5px; flex-shrink: 0; }
.c-accent-bar { background: var(--gold); height: 3px; flex-shrink: 0; }
.c-body { display: flex; flex: 1; overflow: hidden; padding-bottom: 24px; box-sizing: border-box; }

.c-left { flex: 0 0 44%; min-width: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 11px 11px 18px 13px; gap: 7px; position: relative; z-index: 2; overflow: visible; }
.c-eyebrow { font-size: 7pt; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 2px; }
.c-title { font-family: 'Playfair Display', serif; font-size: 14pt; font-weight: 700; color: var(--ink); line-height: 1.1; }
.c-subtitle { font-family: 'Playfair Display', serif; font-style: italic; font-size: 8.5pt; color: var(--muted); margin-top: 1px; }
.c-author { font-size: 7.5pt; font-weight: 400; color: #9a8c78; margin-top: 2px; font-style: italic; font-family: 'Playfair Display', serif; }
.c-section-label { font-size: 7pt; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }

.c-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.c-thead { background: var(--dark); }
.c-th { font-family: 'Source Sans 3', sans-serif; font-size: 6.5pt; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #e8dfc8; padding: 3px 5px; }
.c-th-left { text-align: left; width: calc(100% - 74px); }
.c-th-right { text-align: right; width: 74px; min-width: 74px; max-width: 74px; padding-right: 6px; white-space: nowrap; }
.c-td { padding: 1.5px 5px; font-size: 8pt; color: var(--body-col); font-weight: 300; white-space: normal; }
.c-table-compact .c-td { padding: 1px 5px; font-size: 7pt; }
.c-table-compact .c-th { padding: 2px 5px; font-size: 6pt; }
.c-td-name { text-align: left; width: calc(100% - 74px); font-weight: 400; white-space: normal; overflow-wrap: anywhere; word-break: break-word; line-height: 1.3; padding-right: 4px; }
.c-td-amt { text-align: right; width: 74px; min-width: 74px; max-width: 74px; padding-right: 6px; white-space: nowrap; font-family: 'Playfair Display', serif; font-weight: 700; color: var(--ink); }
.c-tr-even { background: #f4efe6; }

.c-left-footer { margin-top: auto; margin-bottom: 6px; font-size: 7.5pt; font-weight: 300; color: #9a8c78; line-height: 1.4; border-top: 1px solid var(--border); padding-top: 5px; padding-bottom: 8px; flex-shrink: 0; }
.c-right { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 11px 13px 18px 11px; position: relative; z-index: 2; overflow: visible; }
.c-step { display: flex; gap: 6px; align-items: baseline; margin-bottom: 3px; }
.c-step-num { font-family: 'Playfair Display', serif; font-size: 8pt; font-weight: 700; color: var(--gold); min-width: 14px; flex-shrink: 0; }
.c-step-label { font-weight: 600; color: var(--ink); font-size: 7pt; text-transform: uppercase; letter-spacing: 0.06em; margin-right: 3px; }
.c-step-text { font-size: 8pt; color: #3a3028; font-weight: 300; line-height: 1.25; }
.c-card-footer { border-top: 1px solid var(--border); padding-top: 5px; padding-bottom: 8px; margin-bottom: 6px; display: flex; justify-content: space-between; flex-shrink: 0; }
.c-footer-note { font-size: 7.5pt; font-weight: 300; color: #9a8c78; font-style: italic; font-family: 'Playfair Display', serif; }
.c-tip-note,
.c-footer-note { display: inline-block; margin-bottom: 2px; padding-bottom: 2px; }
.c-steps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; flex: 1; }

.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 12px; opacity: 0.3; }
.placeholder p { font-family: 'Playfair Display', serif; font-style: italic; font-size: 13px; color: var(--muted); }

.app-footer {
  position: fixed; bottom: 0; right: 0;
  padding: 6px 16px;
  font-size: 10px; font-weight: 300; color: #6a5e4a;
  display: flex; gap: 14px; align-items: center;
  background: rgba(24,18,8,0.7);
}
.app-footer-brand {
  color: #c8b898;
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  font-weight: 700;
}
.app-footer a { color: #9a8c78; text-decoration: none; transition: color 0.2s; }
.app-footer a:hover { color: var(--gold); }

.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--dark); border-top: 2px solid var(--gold);
  padding: 14px 32px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; z-index: 1000;
  font-size: 12px; font-weight: 300; color: #9a8c78;
}
.cookie-banner a { color: var(--gold); }
.cookie-btn {
  background: var(--gold); color: var(--dark); border: none;
  padding: 8px 20px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background 0.2s;
}
.cookie-btn:hover { background: #d9a840; }

/* ── PRINT ── */
@media print {
  @page { size: 6in 4in; margin: 0; }
  body { background: none !important; }
  .sidebar, .topbar, .card-label, .app-footer { display: none !important; }
  .ghost-wrap { display: none !important; }
  .main { display: block !important; }
  .preview-area { padding: 0 !important; background: none !important; display: block !important; }
  .cards-wrapper { gap: 0 !important; transform: none !important; margin-bottom: 0 !important; }
  .cards-wrapper.two-cards { flex-direction: column !important; }
  .recipe-card { box-shadow: none !important; page-break-after: always; }
}

@media (max-width: 1100px) {
  .topbar {
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 10px;
  }
  .topbar-right {
    justify-content: flex-end;
    flex-wrap: wrap;
    width: 100%;
    gap: 16px;
  }
}

/* ── PRINT GUIDE ── */
.print-guide-toggle {
  width: 100%; background: transparent; border: none;
  color: #9a8c78; font-family: 'Source Sans 3', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-align: left; padding: 8px 0 4px; cursor: pointer;
  transition: color 0.2s;
}
.print-guide-toggle:hover { color: var(--gold); }

.print-guide-intro {
  font-size: 11px; font-weight: 300; color: #9a8c78;
  line-height: 1.5; margin: 8px 0 12px;
}

.print-guide-rule {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 10px;
}
.print-guide-num {
  font-family: 'Playfair Display', serif; font-size: 13px;
  font-weight: 700; color: var(--gold); min-width: 16px;
  flex-shrink: 0; line-height: 1.3;
}
.print-guide-title {
  font-size: 11px; font-weight: 600; color: #c8b898;
  margin-bottom: 2px; letter-spacing: 0.04em;
}
.print-guide-text {
  font-size: 10px; font-weight: 300; color: #7a6e5a; line-height: 1.5;
}

/* Browser tabs */
.print-browser-tabs {
  display: flex; gap: 3px; margin: 14px 0 8px; flex-wrap: wrap;
}
.pbr-tab {
  background: #1a1510; border: 1px solid #3a3020;
  color: #6a5e4a; font-family: 'Source Sans 3', sans-serif;
  font-size: 9px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 4px 8px; cursor: pointer;
  transition: all 0.15s;
}
.pbr-tab:hover { border-color: var(--gold); color: #9a8c78; }
.pbr-tab.active { background: #2c2416; border-color: var(--gold); color: var(--gold); }

/* Step list */
.pbr-steps {
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px;
}
.pbr-step {
  font-size: 11px; font-weight: 300; color: #9a8c78;
  padding-left: 12px; position: relative; line-height: 1.5;
}
.pbr-step::before {
  content: '→'; position: absolute; left: 0;
  color: var(--gold); font-size: 9px; top: 2px;
}
.pbr-step strong { color: #c8b898; font-weight: 600; }
.pbr-key {
  display: inline-block; background: #1a1510; border: 1px solid #3a3020;
  color: #9a8c78; font-size: 9px; padding: 1px 5px;
  font-family: monospace; border-radius: 2px;
}

.print-shop-link {
  display: block; font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); text-decoration: none;
  margin-top: 4px; transition: color 0.2s;
}
.print-shop-link:hover { color: #d9a840; }

/* ══════════════════════════════════════════
   CARD THEMES
   ══════════════════════════════════════════ */

/* ── THEME: LIGHT & AIRY ── */
.recipe-card.theme-airy {
  background: #ffffff;
}
.recipe-card.theme-airy .c-top-band { background: #8faa8f; height: 4px; }
.recipe-card.theme-airy .c-accent-bar { background: #b8cdb8; height: 2px; }
.recipe-card.theme-airy .c-eyebrow { color: #6a8f6a; }
.recipe-card.theme-airy .c-title { color: #1a2a1a; }
.recipe-card.theme-airy .c-subtitle { color: #6a7a6a; }
.recipe-card.theme-airy .c-author { color: #8a9a8a; }
.recipe-card.theme-airy .c-section-label { color: #6a8f6a; }
.recipe-card.theme-airy .c-thead { background: #4a6a4a; }
.recipe-card.theme-airy .c-th { color: #f0f4f0; }
.recipe-card.theme-airy .c-td { color: #3a4a3a; }
.recipe-card.theme-airy .c-td-amt { color: #1a2a1a; }
.recipe-card.theme-airy .c-tr-even { background: #f0f4f0; }
.recipe-card.theme-airy .c-step-num { color: #6a8f6a; }
.recipe-card.theme-airy .c-step-label { color: #1a2a1a; }
.recipe-card.theme-airy .c-step-text { color: #3a4a3a; }
.recipe-card.theme-airy .c-left { border-right-color: #d0dcd0; }
.recipe-card.theme-airy .c-left-footer { color: #8a9a8a; border-top-color: #d0dcd0; }
.recipe-card.theme-airy .c-card-footer { border-top-color: #d0dcd0; }
.recipe-card.theme-airy .c-footer-note { color: #8a9a8a; }
.recipe-card.theme-airy .badge { background: #6a8f6a; color: #fff; }

/* ── THEME: RUSTIC ── */
.recipe-card.theme-rustic {
  background: #c4a882;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
}
.recipe-card.theme-rustic .c-top-band { background: #3d2610; height: 6px; }
.recipe-card.theme-rustic .c-accent-bar { background: #a0522d; height: 2px; }
.recipe-card.theme-rustic .c-eyebrow { color: #a0522d; letter-spacing: 0.22em; }
.recipe-card.theme-rustic .c-title { color: #1a0e06; }
.recipe-card.theme-rustic .c-subtitle { color: #6b4c2a; }
.recipe-card.theme-rustic .c-author { color: #8a6a4a; }
.recipe-card.theme-rustic .c-section-label { color: #a0522d; }
.recipe-card.theme-rustic .c-thead { background: #3d2610; }
.recipe-card.theme-rustic .c-th { color: #e8d5b8; }
.recipe-card.theme-rustic .c-td { color: #4a3020; }
.recipe-card.theme-rustic .c-td-amt { color: #1a0e06; }
.recipe-card.theme-rustic .c-tr-even { background: #b89870; }
.recipe-card.theme-rustic .c-step-num { color: #a0522d; }
.recipe-card.theme-rustic .c-step-label { color: #1a0e06; }
.recipe-card.theme-rustic .c-step-text { color: #3a2010; }
.recipe-card.theme-rustic .c-left { border-right-color: #9a7a5a; }
.recipe-card.theme-rustic .c-left-footer { color: #7a5a3a; border-top-color: #9a7a5a; }
.recipe-card.theme-rustic .c-card-footer { border-top-color: #9a7a5a; }
.recipe-card.theme-rustic .c-footer-note { color: #7a5a3a; }
.recipe-card.theme-rustic .badge { background: #a0522d; color: #fff; }

/* ── THEME: MODERN ── */
.recipe-card.theme-modern {
  background: #ffffff;
}
.recipe-card.theme-modern .c-top-band { background: #1a1a1a; height: 6px; }
.recipe-card.theme-modern .c-accent-bar { background: #d0d0d0; height: 1px; }
.recipe-card.theme-modern .c-eyebrow {
  color: #888; font-family: 'Source Sans 3', sans-serif;
  font-size: 6.5pt; letter-spacing: 0.2em;
}
.recipe-card.theme-modern .c-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13pt; font-weight: 700; color: #111; letter-spacing: -0.02em;
}
.recipe-card.theme-modern .c-subtitle {
  font-family: 'Source Sans 3', sans-serif;
  font-style: normal; font-size: 8pt; color: #666;
}
.recipe-card.theme-modern .c-author {
  font-family: 'Source Sans 3', sans-serif;
  font-style: normal; color: #aaa;
}
.recipe-card.theme-modern .c-section-label { color: #333; }
.recipe-card.theme-modern .c-thead { background: #1a1a1a; }
.recipe-card.theme-modern .c-th { color: #fff; letter-spacing: 0.1em; }
.recipe-card.theme-modern .c-td { color: #444; }
.recipe-card.theme-modern .c-td-amt {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700; color: #111;
}
.recipe-card.theme-modern .c-tr-even { background: #f5f5f5; }
.recipe-card.theme-modern .c-step-num { color: #333; }
.recipe-card.theme-modern .c-step-label {
  font-family: 'Source Sans 3', sans-serif; color: #111;
}
.recipe-card.theme-modern .c-step-text { color: #444; }
.recipe-card.theme-modern .c-left { border-right-color: #e0e0e0; }
.recipe-card.theme-modern .c-left-footer { color: #999; border-top-color: #e0e0e0; }
.recipe-card.theme-modern .c-card-footer { border-top-color: #e0e0e0; }
.recipe-card.theme-modern .c-footer-note {
  font-family: 'Source Sans 3', sans-serif; font-style: normal; color: #999;
}
.recipe-card.theme-modern .badge { background: #1a1a1a; color: #fff; }

/* ── THEME SELECTOR ── */
.theme-selector {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px;
}
.theme-swatch {
  width: 48px; height: 32px; border: 2px solid transparent;
  cursor: pointer; transition: border-color 0.15s; position: relative;
  overflow: hidden; flex-shrink: 0;
}
.theme-swatch.active { border-color: var(--gold); }
.theme-swatch:hover { border-color: #7a6a50; }
.theme-swatch-band { height: 5px; }
.theme-swatch-body { flex: 1; height: 27px; }
.theme-swatch-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: 6px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; text-align: center;
  padding: 1px 0; background: rgba(0,0,0,0.3); color: #fff;
}

/* Pro lock overlay on swatches */
.theme-swatch.locked { opacity: 0.45; cursor: not-allowed; }
.theme-swatch.locked::after {
  content: '⚷';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%);
  font-size: 11px; color: rgba(255,255,255,0.8);
}
