@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Playfair+Display:wght@600;700;800;900&display=swap');

/* =========================================================
   Mother's Day Cookbook PWA — Final Safe Visual Upgrade
   CAPSforge-style dark glassmorphism theme
   Replace styles.css only. Do not edit recipes-data.js.
   ========================================================= */

:root {
  --app-food-bg: url('./assets/recipe-images/boeka-lamb-shanks.jpg');

  --accent: #d8a7b3;
  --accent-soft: rgba(216, 167, 179, 0.18);
  --page-bg: #0f0c0d;
  --card-bg: rgba(255, 255, 255, 0.05);
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.10);
  --shadow: rgba(0, 0, 0, 0.34);

  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-highlight: rgba(255, 255, 255, 0.075);
  --glass-blur: blur(25px) saturate(1.18);

  --text-main: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.82);
  --text-muted: rgba(255, 255, 255, 0.58);

  --deep-plum: #6b2f5b;
  --berry: #c75a84;
  --spice-gold: #b7792b;
  --champagne: #f5dcc6;

  --radius-xl: 34px;
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 16px;

  --nav-height: 84px;
  --safe-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 34px);

  --shadow-layered:
    0 8px 18px rgba(0, 0, 0, 0.20),
    0 20px 46px rgba(0, 0, 0, 0.18),
    0 44px 90px rgba(0, 0, 0, 0.24);
  --shadow-soft:
    0 8px 22px rgba(0, 0, 0, 0.16),
    0 18px 42px rgba(0, 0, 0, 0.14);

  --transition-fast: 160ms ease;
  --transition-mid: 240ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-main);
  background: #0f0c0d;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: var(--app-food-bg);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.4;
  transform: scale(1.04);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
    radial-gradient(circle at 88% 20%, rgba(245, 220, 198, 0.11), transparent 30%),
    linear-gradient(180deg, rgba(7, 6, 7, 0.72), rgba(9, 7, 8, 0.82) 54%, rgba(5, 4, 5, 0.92));
  pointer-events: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input,
label {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

/* =========================================================
   Typography
   ========================================================= */

h1,
h2,
h3,
.hero h1,
.hero h2,
.panel-header h2,
.author-card-title,
.section-card-title,
.recipe-link-main strong,
.recipe-type,
.lock-copy h1 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.025em;
}

p,
span,
li,
label,
input,
button,
small,
.note-card,
.block-note,
.empty-state {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

strong {
  color: #fff;
}

/* =========================================================
   Shell and page grids
   ========================================================= */

.page-shell {
  min-height: 100vh;
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 24px 18px calc(var(--safe-bottom) + 20px);
}

.page-grid {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.home-grid,
.author-grid,
.section-grid,
.simple-grid,
.shopping-grid,
.recipe-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.home-grid > .hero-home {
  grid-column: span 8;
  min-height: 300px;
}

.home-grid > .side-stack {
  grid-column: span 4;
}

.home-grid > .author-index-panel {
  grid-column: span 12;
}

.author-grid > .hero-author {
  grid-column: span 8;
}

.author-grid > .author-about-card {
  grid-column: span 4;
}

.author-grid > .panel-card:not(.author-about-card) {
  grid-column: span 12;
}

.section-grid > .hero-author,
.section-grid > .panel-card,
.simple-grid > .hero-home,
.simple-grid > .panel-card,
.shopping-grid > .hero-home,
.shopping-grid > .panel-card {
  grid-column: span 12;
}

.recipe-grid > .recipe-hero-card {
  grid-column: span 12;
}

.recipe-grid > .recipe-photo-card {
  grid-column: span 5;
}

.recipe-grid > .ingredient-card {
  grid-column: span 7;
}

.recipe-grid > .method-card {
  grid-column: span 12;
}

.side-stack {
  display: grid;
  gap: 18px;
}

/* =========================================================
   Glassmorphism core
   ========================================================= */

.hero,
.panel-card,
.info-card,
.recipe-link-card,
.author-card,
.section-card,
.check-row,
.note-card,
.lock-card-v35,
.search-input,
.count-bubble,
.pill,
.mini-tag,
.nav-pill,
.ghost-button,
.primary-button,
.speaker-toggle,
.empty-state,
.about-photo-placeholder,
.block-heading,
.block-note {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
}

.hero,
.panel-card,
.info-card,
.recipe-link-card,
.author-card,
.section-card,
.check-row,
.note-card,
.lock-card-v35 {
  position: relative;
  overflow: hidden;
}

.hero::before,
.panel-card::before,
.info-card::before,
.recipe-link-card::before,
.author-card::before,
.section-card::before,
.check-row::before,
.note-card::before,
.lock-card-v35::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.018) 46%, rgba(255, 255, 255, 0.045));
  z-index: 0;
}

.hero > *,
.panel-card > *,
.info-card > *,
.recipe-link-card > *,
.author-card > *,
.section-card > *,
.check-row > *,
.note-card > *,
.lock-card-v35 > * {
  position: relative;
  z-index: 1;
}

.hero,
.panel-card,
.info-card {
  border-radius: var(--radius-xl);
}

.hero {
  min-height: 250px;
  padding: 34px;
  box-shadow: var(--shadow-layered);
}

.panel-card,
.info-card {
  padding: 24px;
}

.hero-floral {
  position: absolute;
  inset: 0;
  background-image: url('./assets/roses-overlay.svg'), url('./assets/flowers.png');
  background-repeat: no-repeat;
  background-position: right 16px center, right center;
  background-size: 380px auto, 460px auto;
  opacity: 0.16;
  filter: saturate(0.9) blur(0.2px);
  pointer-events: none;
  z-index: 0;
}

.hero::after,
.panel-card::after,
.info-card::after {
  content: '';
  position: absolute;
  inset: auto -18% -38% 38%;
  height: 220px;
  pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 24%, transparent), transparent 64%);
  z-index: 0;
}

/* =========================================================
   Header and floating bottom navigation
   ========================================================= */

.site-header {
  width: 100%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-line {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-button {
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.20em;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 10px 14px;
  border-radius: 999px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.top-nav {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  width: min(calc(100% - 18px), 780px);
  min-height: var(--nav-height);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(25px) saturate(1.20);
  -webkit-backdrop-filter: blur(25px) saturate(1.20);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.22),
    0 24px 58px rgba(0, 0, 0, 0.26),
    0 44px 90px rgba(0, 0, 0, 0.30);
}

.nav-pill {
  min-height: 58px;
  padding: 10px 8px;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

.nav-pill.active {
  color: #fff;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.16), transparent 42%),
    color-mix(in srgb, var(--accent) 32%, rgba(255,255,255,0.06));
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 18px color-mix(in srgb, var(--accent) 18%, transparent);
}

.tiny-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

/* =========================================================
   Hero text and cards
   ========================================================= */

.eyebrow {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.82rem;
  font-weight: 900;
  margin-bottom: 16px;
}

.hero h1,
.hero h2 {
  margin: 0 0 14px;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 0.92;
  text-shadow: 0 10px 35px rgba(0, 0, 0, 0.34);
}

.hero p,
.panel-header p,
.info-card p,
.author-card-sub,
.section-card-sub,
.recipe-link-main span,
.about-layout p,
.progress-note,
.empty-state {
  color: var(--text-soft);
  line-height: 1.58;
}

.hero p {
  max-width: 900px;
  font-size: 1.08rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-header h2,
.info-card h2,
.recipe-category-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.05;
}

.panel-header p,
.info-card p {
  margin: 0;
}

.info-card h2 {
  margin-bottom: 8px;
}

.meta-row,
.author-card-meta,
.section-card-meta,
.hero-actions,
.recipe-hero-actions,
.recipe-link-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pill,
.count-bubble,
.mini-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 999px;
  color: rgba(255,255,255,0.88);
  font-size: 0.86rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.07);
}

.pill.accent,
.count-bubble {
  background: color-mix(in srgb, var(--accent) 28%, rgba(255,255,255,0.055));
  color: #fff;
  border-color: rgba(255,255,255,0.12);
}

/* =========================================================
   Bento author/category/recipe cards
   ========================================================= */

.author-card-list,
.section-card-list,
.recipe-page-list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.author-card,
.section-card {
  grid-column: span 4;
  min-height: 170px;
  padding: 20px;
  border-radius: var(--radius-lg);
  text-align: left;
  color: #fff;
  transition: transform var(--transition-fast), box-shadow var(--transition-mid), border-color var(--transition-mid), background var(--transition-mid);
}

.author-card:nth-child(6n + 1),
.section-card:nth-child(4n + 1) {
  grid-column: span 5;
  min-height: 210px;
}

.author-card:nth-child(6n + 2),
.section-card:nth-child(4n + 2) {
  grid-column: span 7;
}

.author-card:nth-child(6n + 3),
.author-card:nth-child(6n + 4),
.author-card:nth-child(6n + 5) {
  grid-column: span 4;
}

.author-card::after,
.section-card::after,
.recipe-link-card::after {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  right: -72px;
  bottom: -76px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--local-accent, var(--accent)) 34%, transparent), transparent 67%);
  pointer-events: none;
}

.author-card-title,
.section-card-title {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
}

.author-card-sub,
.section-card-sub {
  margin-bottom: 18px;
}

.recipe-category-block {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.recipe-category-block:last-child {
  margin-bottom: 0;
}

.recipe-category-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}

.recipe-category-head span {
  color: var(--text-muted);
  font-weight: 800;
}

.recipe-link-card {
  grid-column: span 6;
  min-height: 116px;
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 12px;
}

.recipe-link-main {
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: #fff;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 7px;
}

.recipe-link-main strong {
  font-size: 1.34rem;
  line-height: 1.08;
}

.recipe-link-actions {
  padding: 14px;
  align-self: center;
  justify-self: end;
}

/* =========================================================
   Buttons and inputs
   ========================================================= */

.primary-button,
.ghost-button,
.search-input,
.lock-form input,
.lock-form button {
  min-height: 50px;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.primary-button {
  color: #fff;
  background:
    radial-gradient(circle at 30% 10%, rgba(255,255,255,0.22), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 84%, white 16%), var(--accent));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 12px 28px color-mix(in srgb, var(--accent) 28%, transparent),
    0 20px 42px rgba(0,0,0,0.22);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.ghost-button.small {
  min-height: 42px;
  padding: 9px 13px;
  font-size: 0.86rem;
}

button:active,
.nav-card:active,
.recipe-link-main:active,
.check-row:active {
  transform: scale(0.98);
}

.primary-button:hover,
.nav-pill:hover,
.ghost-button:hover,
.nav-card:hover,
.recipe-link-main:hover,
.author-card:hover,
.section-card:hover,
.recipe-link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-layered);
}

.search-input,
.lock-form input {
  width: 100%;
  color: #fff;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
}

.search-input::placeholder,
.lock-form input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

/* =========================================================
   About/profile layout
   ========================================================= */

.about-layout {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: start;
}

.about-photo-placeholder {
  min-height: 150px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.about-photo-img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.about-photo-inner {
  color: rgba(255, 255, 255, 0.62);
  font-weight: 900;
}

.note-card {
  margin-top: 14px;
  padding: 15px 16px;
  border-radius: 20px;
  color: rgba(255,255,255,0.76);
  line-height: 1.5;
}

/* =========================================================
   Recipe page
   ========================================================= */

.recipe-hero-card {
  padding-top: 94px;
}

.recipe-hero-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: end;
}

.recipe-type {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 36px;
  margin-bottom: 13px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--accent) 24%, rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.10);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.recipe-hero-card h1 {
  margin: 0 0 10px;
  font-family: 'Playfair Display', Georgia, serif;
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.94;
  text-shadow: 0 12px 38px rgba(0,0,0,0.38);
}

.recipe-hero-card p {
  color: var(--text-soft);
}

.recipe-photo-card {
  padding: 10px;
}

.recipe-photo-card img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 22px 48px rgba(0,0,0,0.26);
}

.block-heading {
  width: max-content;
  max-width: 100%;
  margin: 16px 0 6px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: 0.78rem;
  background: color-mix(in srgb, var(--accent) 25%, rgba(255,255,255,0.05));
}

.block-note {
  padding: 14px 16px;
  border-radius: 20px;
  color: var(--text-soft);
  line-height: 1.5;
}

.progress-note {
  margin-top: 14px;
  font-size: 0.92rem;
}

/* =========================================================
   Speaker toggle and voice state
   ========================================================= */

.speaker-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 5;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,0.07);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.speaker-toggle.on {
  background:
    radial-gradient(circle at 25% 15%, rgba(255,255,255,0.20), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 86%, white 14%), var(--accent));
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.10),
    0 0 24px color-mix(in srgb, var(--accent) 28%, transparent),
    0 18px 42px rgba(0,0,0,0.26);
}

.speaker-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.speaker-icon {
  font-size: 1.15rem;
}

.speaker-label {
  color: #fff;
  font-weight: 900;
}

/* =========================================================
   Checklist / Method / Shopping list
   ========================================================= */

.check-list,
.shopping-check-list {
  display: grid;
  gap: 14px;
}

.check-row {
  min-height: 82px;
  padding: 18px 18px;
  border-radius: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: #fff;
  transition: transform var(--transition-fast), box-shadow var(--transition-mid), background var(--transition-mid), border-color var(--transition-mid);
}

.shopping-list-card .check-row {
  min-height: 96px;
  padding: 22px 20px;
}

.check-row.checked {
  background: rgba(255,255,255,0.08);
}

.check-row span {
  flex: 1;
  color: rgba(255,255,255,0.91);
  font-size: 1.02rem;
  line-height: 1.55;
}

.shopping-list-card .check-row span {
  font-size: 1.12rem;
  font-weight: 650;
}

.check-row input[type='checkbox'] {
  appearance: none;
  width: 31px;
  height: 31px;
  min-width: 31px;
  min-height: 31px;
  margin: 2px 0 0;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,0.10);
  border: 2px solid rgba(255,255,255,0.36);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.check-row input[type='checkbox']::after {
  content: '✓';
  color: #fff;
  font-size: 0.95rem;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.check-row input[type='checkbox']:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.check-row input[type='checkbox']:checked::after {
  opacity: 1;
  transform: scale(1);
}

.check-row.just-checked {
  animation: checkScaleDown 155ms ease-out;
}

@keyframes checkScaleDown {
  0% { transform: scale(1); }
  45% { transform: scale(0.976); }
  100% { transform: scale(1); }
}

.method-card .check-row.active-step {
  border-color: color-mix(in srgb, var(--accent) 48%, rgba(255,255,255,0.10));
  background:
    radial-gradient(circle at 17% 22%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 42%),
    rgba(255,255,255,0.09);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent),
    0 0 22px color-mix(in srgb, var(--accent) 26%, transparent),
    0 0 52px color-mix(in srgb, var(--accent) 20%, transparent),
    0 22px 48px rgba(0,0,0,0.28);
}

.method-card .check-row.active-step span::before {
  content: 'Current step';
  display: block;
  width: max-content;
  max-width: 100%;
  margin-bottom: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--accent) 45%, rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.method-card,
.ingredient-card,
.shopping-list-card,
.recipe-photo-card {
  scroll-margin-bottom: calc(170px + env(safe-area-inset-bottom));
}

/* =========================================================
   Search / empty states / lock page
   ========================================================= */

.empty-state {
  padding: 24px;
  border-radius: 24px;
  text-align: center;
}

.lock-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lock-card-v35 {
  width: min(520px, 100%);
  border-radius: 34px;
  padding: 32px;
  box-shadow: var(--shadow-layered);
}

.lock-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(2.3rem, 10vw, 4.2rem);
  line-height: 0.94;
}

.lock-copy p,
.lock-note {
  color: var(--text-soft);
  line-height: 1.55;
}

.lock-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.lock-form button {
  color: #fff;
  background: var(--accent);
  border: 1px solid rgba(255,255,255,0.12);
}

.lock-error {
  min-height: 20px;
  margin: 2px 0 0;
  color: #ffd6df;
  font-weight: 800;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1040px) {
  .home-grid > .hero-home,
  .home-grid > .side-stack,
  .home-grid > .author-index-panel,
  .author-grid > .hero-author,
  .author-grid > .author-about-card,
  .author-grid > .panel-card:not(.author-about-card),
  .recipe-grid > .recipe-photo-card,
  .recipe-grid > .ingredient-card,
  .recipe-grid > .method-card {
    grid-column: span 12;
  }

  .author-card,
  .section-card,
  .author-card:nth-child(6n + 1),
  .author-card:nth-child(6n + 2),
  .author-card:nth-child(6n + 3),
  .author-card:nth-child(6n + 4),
  .author-card:nth-child(6n + 5),
  .section-card:nth-child(4n + 1),
  .section-card:nth-child(4n + 2) {
    grid-column: span 6;
  }

  .recipe-link-card {
    grid-column: span 12;
  }

  .recipe-hero-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --nav-height: 78px;
  }

  .page-shell {
    padding: 16px 12px calc(var(--safe-bottom) + 22px);
  }

  .site-header {
    margin-bottom: 14px;
  }

  .brand-button {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    padding: 9px 11px;
  }

  .hero,
  .panel-card,
  .info-card {
    border-radius: 28px;
    padding: 22px;
  }

  .hero h1,
  .hero h2,
  .recipe-hero-card h1 {
    font-size: clamp(2.45rem, 13vw, 4.2rem);
  }

  .author-card,
  .section-card,
  .author-card:nth-child(n),
  .section-card:nth-child(n) {
    grid-column: span 12;
    min-height: 150px;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-photo-placeholder,
  .about-photo-img {
    min-height: 220px;
  }

  .panel-header,
  .recipe-category-head {
    display: grid;
    gap: 8px;
  }

  .recipe-link-card {
    grid-template-columns: 1fr;
  }

  .recipe-link-actions {
    width: 100%;
    justify-self: stretch;
    padding: 0 16px 16px;
  }

  .recipe-link-actions .ghost-button,
  .recipe-link-actions .primary-button {
    width: 100%;
  }

  .speaker-toggle {
    top: 18px;
    right: 18px;
    min-height: 52px;
    padding: 11px 14px;
  }

  .speaker-label {
    display: none;
  }

  .recipe-hero-card {
    padding-top: 86px;
  }

  .top-nav {
    width: min(calc(100% - 14px), 620px);
    min-height: 78px;
    gap: 7px;
    padding: 8px;
    border-radius: 24px;
  }

  .nav-pill {
    min-height: 58px;
    border-radius: 18px;
    font-size: 0.72rem;
    padding: 7px 5px;
    line-height: 1.1;
    flex-direction: column;
  }

  .tiny-count {
    height: 19px;
    min-width: 19px;
    font-size: 0.68rem;
    padding: 0 5px;
  }

  .check-row {
    min-height: 84px;
    padding: 18px 16px;
    border-radius: 22px;
  }

  .shopping-list-card .check-row {
    min-height: 98px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* V4.2.18 global kitchen timer */
.timer-grid {
  grid-template-columns: minmax(0, 1fr);
}

.timer-hero h1 {
  font-size: clamp(3rem, 14vw, 8rem);
  letter-spacing: -0.08em;
  margin: 0.15em 0;
  font-variant-numeric: tabular-nums;
}

.timer-control-row,
.timer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.timer-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(120px, 0.75fr) auto;
  gap: 0.9rem;
  align-items: end;
}

.timer-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.timer-card .note-card {
  margin-top: 1rem;
}

.nav-pill .tiny-count[data-timer-display] {
  min-width: 3.8em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .timer-form {
    grid-template-columns: 1fr;
  }
  .timer-hero h1 {
    font-size: clamp(3rem, 22vw, 6rem);
  }
}

/* V4.2.19 timer buzzer / mobile vibration alert */
.timer-done-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 9999;
  width: min(92vw, 420px);
  transform: translate(-50%, 130%);
  opacity: 0;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(43, 24, 13, 0.94);
  color: #fff5dc;
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
  transition: transform 220ms ease, opacity 220ms ease;
}
.timer-done-banner.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
.timer-done-banner strong {
  font-size: 1.15rem;
}
.timer-done-banner span {
  font-size: 0.95rem;
  opacity: 0.9;
}
.timer-done-banner button {
  justify-self: end;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  color: #2b180d;
  background: #ffe0a3;
}


/* V4.2.23 integrated heritage rebuild */
.heritage-shell {
  background:
    radial-gradient(circle at top left, rgba(244,201,126,.12), transparent 40rem),
    linear-gradient(135deg, #3a1709 0%, #7b3f1b 42%, #2b1208 100%);
}

.heritage-shell .site-header,
.heritage-shell .panel-card,
.heritage-shell .hero {
  border-color: rgba(218, 177, 115, 0.45);
  box-shadow: 0 24px 70px rgba(25, 9, 3, 0.28), inset 0 1px 0 rgba(255,255,255,0.46);
}

.heritage-hero {
  background:
    linear-gradient(135deg, rgba(255,246,229,0.95), rgba(241,220,181,0.9)),
    radial-gradient(circle at top right, rgba(160, 95, 38, 0.16), transparent 18rem);
}

.heritage-shell .eyebrow,
.heritage-shell h1,
.heritage-shell h2,
.heritage-shell strong,
.heritage-shell .recipe-type,
.heritage-shell .author-card-title,
.heritage-shell .section-card-title {
  color: #4e220d;
}

.heritage-shell .panel-card,
.heritage-shell .section-card,
.heritage-shell .recipe-link-card,
.heritage-shell .author-about-card,
.heritage-shell .ingredient-card,
.heritage-shell .method-card,
.heritage-shell .recipe-photo-card {
  background: linear-gradient(180deg, rgba(255,249,238,0.98), rgba(243,226,196,0.94));
}

.heritage-author-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.heritage-library-grid {
  grid-template-columns: minmax(0, 1.65fr) 320px;
  gap: 24px;
  align-items: start;
}

.heritage-library-hero {
  grid-column: 1 / -1;
}

.heritage-reader-card {
  display: grid;
  gap: 16px;
}

.heritage-reader-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.heritage-reader-meta {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(139, 78, 36, 0.12);
  color: #5a3117;
  font-weight: 600;
}

.heritage-reader-frame {
  border-radius: 28px;
  border: 1px solid rgba(139, 78, 36, 0.18);
  background: linear-gradient(180deg, #4d210e, #260f06);
  padding: 18px;
  min-height: 70vh;
}

.heritage-page-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(70vh - 36px);
}

.heritage-page-stage {
  width: 100%;
  min-height: calc(70vh - 60px);
  overflow: hidden;
  border-radius: 22px;
  background: #f1e1c3;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  position: relative;
  cursor: grab;
}

.heritage-page-stage.dragging { cursor: grabbing; }

.heritage-page-stage img {
  max-width: 100%;
  max-height: calc(70vh - 70px);
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.08s linear;
  box-shadow: 0 18px 48px rgba(0,0,0,0.28);
  border-radius: 14px;
}

.heritage-scroll-pages {
  display: grid;
  gap: 18px;
  max-height: calc(70vh - 36px);
  overflow: auto;
  padding-right: 4px;
}

.heritage-scroll-page {
  border: 0;
  background: rgba(255, 247, 233, 0.98);
  border-radius: 18px;
  padding: 12px;
  display: grid;
  gap: 10px;
  justify-items: center;
  color: #4e220d;
}

.heritage-scroll-page.active,
.heritage-page-link.active {
  outline: 2px solid #b77333;
  background: #fff4df;
}

.heritage-scroll-page img {
  width: 100%;
  max-width: 900px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.2);
}

.heritage-page-jump {
  position: sticky;
  top: 1.5rem;
}

.heritage-page-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 10px;
  max-height: 75vh;
  overflow: auto;
}

.heritage-page-link {
  border-radius: 14px;
  border: 1px solid rgba(139, 78, 36, 0.2);
  padding: 10px;
  font-weight: 700;
  color: #5a3117;
  background: rgba(255,248,234,0.88);
}

.heritage-spice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.heritage-spice-card {
  display: grid;
  gap: 12px;
  text-align: left;
}

.heritage-spice-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 18px;
}

.heritage-spice-card span {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.35rem 0;
}

.heritage-photo-card {
  display: grid;
  gap: 14px;
}

.heritage-photo-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .heritage-library-grid {
    grid-template-columns: 1fr;
  }

  .heritage-page-jump {
    position: static;
  }

  .heritage-reader-frame,
  .heritage-page-stage {
    min-height: 58vh;
  }
}


/* =========================================================
   v4.2.25 Cape Malay Heritage readability repair
   ========================================================= */
.heritage-shell {
  --heritage-ink: #351707;
  --heritage-brown: #5b260f;
  --heritage-copper: #a8642d;
  --heritage-cream: #fff4df;
  color: var(--heritage-ink);
}

.heritage-shell p,
.heritage-shell li,
.heritage-shell span,
.heritage-shell .recipe-link-main span,
.heritage-shell .panel-header p,
.heritage-shell .method-card,
.heritage-shell .ingredient-card,
.heritage-shell .empty-state,
.heritage-shell .check-row,
.heritage-shell .recipe-meta,
.heritage-shell .heritage-photo-meta {
  color: rgba(53, 23, 7, 0.92) !important;
}

.heritage-shell .ghost-button,
.heritage-shell .heritage-page-link,
.heritage-shell .heritage-scroll-page,
.heritage-shell .search-input {
  color: var(--heritage-brown) !important;
  background: linear-gradient(180deg, rgba(255,250,239,0.98), rgba(240,213,173,0.96)) !important;
  border: 1px solid rgba(103, 48, 19, 0.22) !important;
  text-shadow: none !important;
}

.heritage-shell .primary-button,
.heritage-shell .pill.accent,
.heritage-shell .heritage-page-link.active {
  color: #fff7ea !important;
  background: linear-gradient(180deg, #b56f2d, #7b3a17) !important;
  border-color: rgba(255, 233, 190, 0.34) !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.28);
}

.heritage-shell .top-nav {
  background: linear-gradient(135deg, rgba(61, 24, 9, 0.92), rgba(132, 66, 25, 0.88)) !important;
  border-color: rgba(255, 224, 174, 0.26) !important;
}

.heritage-shell .nav-pill {
  color: #fff2d8 !important;
  background: rgba(255, 240, 212, 0.12) !important;
  border-color: rgba(255, 224, 174, 0.18) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.42);
}

.heritage-shell .nav-pill.active {
  color: #431c09 !important;
  background: linear-gradient(180deg, #fff0cf, #d59b5f) !important;
  text-shadow: none;
}

.heritage-reader-page .top-nav {
  display: none;
}

.heritage-reader-page .page-grid {
  padding-bottom: 24px;
}

.heritage-library-grid {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
}

.heritage-reader-card {
  min-width: 0;
}

.heritage-reader-toolbar {
  position: sticky;
  top: 8px;
  z-index: 6;
  background: linear-gradient(180deg, rgba(255,245,224,0.98), rgba(244,220,187,0.96));
  border: 1px solid rgba(103,48,19,0.18);
  border-radius: 24px;
  padding: 10px;
  box-shadow: 0 18px 42px rgba(35,13,4,0.16);
}

.heritage-reader-toolbar .ghost-button {
  min-height: 44px;
  padding: 9px 14px;
  box-shadow: 0 7px 18px rgba(58, 23, 7, 0.11);
}

.heritage-reader-frame {
  min-height: 82vh;
  padding: clamp(12px, 2vw, 26px);
  border-radius: 30px;
  background: radial-gradient(circle at top, #fff0cb 0, #7a3415 38%, #321307 100%);
}

.heritage-page-shell {
  min-height: calc(82vh - 52px);
}

.heritage-page-stage {
  min-height: calc(82vh - 84px);
  background: #efe0bf;
  border: 12px solid rgba(62, 24, 9, 0.82);
  box-shadow: inset 0 0 0 2px rgba(255,234,189,0.36), 0 22px 60px rgba(0,0,0,0.32);
}

.heritage-page-stage img {
  max-width: min(100%, 980px);
  max-height: calc(82vh - 122px);
  background: white;
  border-radius: 10px;
}

.heritage-page-jump {
  max-height: 82vh;
  overflow: hidden;
}

.heritage-page-list {
  max-height: calc(82vh - 90px);
}

.heritage-page-link {
  min-height: 46px;
  font-size: 1rem;
}

.recipe-open-card .hero,
.heritage-shell .recipe-hero {
  color: var(--heritage-ink) !important;
}

.heritage-shell .check-row {
  background: linear-gradient(180deg, rgba(255,251,242,0.99), rgba(246,230,202,0.98)) !important;
  border-color: rgba(103,48,19,0.14) !important;
}

@media (max-width: 980px) {
  .heritage-reader-page .top-nav { display: grid; }
  .heritage-reader-frame,
  .heritage-page-stage,
  .heritage-page-shell { min-height: 64vh; }
  .heritage-page-stage img { max-height: calc(64vh - 96px); }
}


/* =========================================================
   v4.3.1 Heritage insert test fixes
   ========================================================= */
.check-row input[type='checkbox'] {
  border-width: 3px !important;
  border-color: rgba(91, 38, 15, 0.72) !important;
  background: rgba(255, 253, 246, 0.96) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    0 0 0 2px rgba(255,255,255,0.45),
    0 8px 18px rgba(49, 20, 8, 0.14) !important;
}

.check-row input[type='checkbox']::after {
  color: #5b260f !important;
  font-size: 1.08rem !important;
  font-weight: 1000 !important;
}

.check-row input[type='checkbox']:checked {
  background: var(--accent) !important;
  border-color: rgba(91, 38, 15, 0.86) !important;
}

.check-row input[type='checkbox']:checked::after {
  color: #fffaf0 !important;
}

.heritage-library-grid.no-page-index {
  grid-template-columns: minmax(0, 1fr) !important;
}

.heritage-library-grid.no-page-index .heritage-reader-card {
  grid-column: 1 / -1;
}

.heritage-library-grid.no-page-index .heritage-library-hero {
  grid-column: 1 / -1;
}

.heritage-reader-toolbar .ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.heritage-page-stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(80vh - 120px);
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.35);
}

.heritage-reader-frame {
  min-height: 78vh !important;
}

.heritage-page-stage,
.heritage-page-shell {
  min-height: calc(78vh - 42px) !important;
}

@media (max-width: 760px) {
  .heritage-reader-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .heritage-reader-meta {
    grid-column: 1 / -1;
    text-align: center;
  }
  .heritage-page-stage img {
    max-height: calc(76vh - 130px);
  }
}


/* =========================================================
   v4.3.2 Heritage batch 2 + readable method styling
   ========================================================= */
.heritage-shell .ingredient-card,
.heritage-shell .method-card,
.heritage-shell .recipe-photo-card,
.heritage-shell .section-card,
.heritage-shell .recipe-link-card {
  background: linear-gradient(180deg, rgba(255,250,240,0.98), rgba(239,215,181,0.96)) !important;
  border: 1px solid rgba(100, 43, 15, 0.22) !important;
  color: #351707 !important;
  text-shadow: none !important;
}

.heritage-shell .ingredient-card .panel-header h2,
.heritage-shell .method-card .panel-header h2,
.heritage-shell .panel-header h2,
.heritage-shell .section-card-title,
.heritage-shell .recipe-link-main strong,
.heritage-shell .recipe-type,
.heritage-shell h1,
.heritage-shell h2,
.heritage-shell h3 {
  color: #5b260f !important;
  text-shadow: none !important;
}

.heritage-shell .ingredient-card .panel-header p,
.heritage-shell .method-card .panel-header p,
.heritage-shell .check-row span,
.heritage-shell .method-card .check-row span,
.heritage-shell .ingredient-card .check-row span,
.heritage-shell .progress-note,
.heritage-shell .block-note,
.heritage-shell .block-heading {
  color: #351707 !important;
  text-shadow: none !important;
}

.heritage-shell .method-card .check-row,
.heritage-shell .ingredient-card .check-row {
  background: linear-gradient(180deg, rgba(255,252,246,1), rgba(246,228,197,0.98)) !important;
  border: 1px solid rgba(92, 38, 15, 0.16) !important;
  box-shadow: 0 10px 24px rgba(54, 23, 9, 0.18), inset 0 1px 0 rgba(255,255,255,0.72) !important;
}

.heritage-shell .method-card .check-row.checked,
.heritage-shell .ingredient-card .check-row.checked {
  background: linear-gradient(180deg, rgba(239,216,181,0.98), rgba(217,182,137,0.96)) !important;
}

.heritage-shell .method-card .check-row.active-step {
  background: linear-gradient(180deg, rgba(255,247,229,1), rgba(239,206,160,0.98)) !important;
  border-color: rgba(166, 100, 45, 0.55) !important;
}

.heritage-shell .method-card .check-row.active-step span::before {
  color: #fff7ea !important;
  background: linear-gradient(180deg, #a8642d, #6b2f13) !important;
  border-color: rgba(255, 233, 190, 0.4) !important;
}

.heritage-shell .progress-note {
  margin-top: 18px;
  font-weight: 800;
  color: #5b260f !important;
}

.author-card.heritage-main-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 237, 194, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(255, 244, 223, 0.18), rgba(160, 83, 31, 0.22)) !important;
  border: 2px solid rgba(255, 218, 155, 0.42) !important;
  box-shadow: 0 18px 50px rgba(83, 34, 12, 0.32), inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

.author-card.heritage-main-card::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 226, 170, 0.16);
}

.heritage-card-badge {
  display: inline-flex;
  width: max-content;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff0cf, #d79a5b);
  color: #54240d;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.heritage-recipe-link-card {
  border-left: 6px solid #a8642d !important;
}


/* =========================================================
   v4.3.3 Heritage library mobile control dock + recipe cleanup
   ========================================================= */
.heritage-reader-page .top-nav {
  display: none !important;
}

.heritage-reader-page .page-grid {
  padding-bottom: calc(118px + env(safe-area-inset-bottom)) !important;
}

.heritage-reader-page .heritage-reader-toolbar {
  position: fixed !important;
  left: max(10px, env(safe-area-inset-left)) !important;
  right: max(10px, env(safe-area-inset-right)) !important;
  bottom: max(10px, env(safe-area-inset-bottom)) !important;
  top: auto !important;
  z-index: 60 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 10px !important;
  border-radius: 26px !important;
  background: linear-gradient(135deg, rgba(61, 24, 9, 0.94), rgba(132, 66, 25, 0.92)) !important;
  border: 1px solid rgba(255, 224, 174, 0.26) !important;
  box-shadow: 0 18px 44px rgba(35,13,4,0.38), inset 0 1px 0 rgba(255,255,255,0.16) !important;
  backdrop-filter: blur(12px) !important;
}

.heritage-reader-page .heritage-reader-toolbar::-webkit-scrollbar {
  height: 0;
}

.heritage-reader-page .heritage-reader-toolbar .ghost-button,
.heritage-reader-page .heritage-reader-toolbar .primary-button {
  flex: 0 0 auto !important;
  min-width: max-content !important;
  min-height: 48px !important;
  padding: 10px 16px !important;
  border-radius: 20px !important;
  font-size: clamp(0.84rem, 2.6vw, 1rem) !important;
  font-weight: 950 !important;
  color: #fff2d8 !important;
  background: rgba(255, 240, 212, 0.12) !important;
  border: 1px solid rgba(255, 224, 174, 0.18) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.42) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(0,0,0,0.22) !important;
}

.heritage-reader-page .heritage-reader-toolbar .ghost-button:disabled {
  opacity: 0.38 !important;
}

.heritage-reader-page .heritage-reader-meta {
  flex: 0 0 auto !important;
  min-height: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 18px !important;
  border-radius: 20px !important;
  color: #431c09 !important;
  background: linear-gradient(180deg, #fff0cf, #d59b5f) !important;
  border: 1px solid rgba(255, 233, 190, 0.34) !important;
  font-size: clamp(0.9rem, 2.8vw, 1.05rem) !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

.heritage-reader-page .heritage-reader-card {
  padding-bottom: 122px !important;
}

.heritage-reader-page .heritage-reader-frame {
  margin-bottom: 0 !important;
}

@media (max-width: 760px) {
  .heritage-reader-page .heritage-library-hero {
    display: none !important;
  }
  .heritage-reader-page .heritage-reader-card {
    padding: 10px 8px 128px !important;
    border-radius: 22px !important;
  }
  .heritage-reader-page .heritage-reader-frame {
    min-height: calc(100vh - 145px) !important;
    padding: 8px !important;
    border-radius: 18px !important;
  }
  .heritage-reader-page .heritage-page-shell,
  .heritage-reader-page .heritage-page-stage {
    min-height: calc(100vh - 176px) !important;
  }
  .heritage-reader-page .heritage-page-stage {
    border-width: 7px !important;
    border-radius: 18px !important;
  }
  .heritage-reader-page .heritage-page-stage img {
    max-height: calc(100vh - 210px) !important;
  }
  .heritage-reader-page .heritage-reader-toolbar {
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    padding: 8px !important;
    gap: 7px !important;
  }
  .heritage-reader-page .heritage-reader-toolbar .ghost-button,
  .heritage-reader-page .heritage-reader-toolbar .primary-button,
  .heritage-reader-page .heritage-reader-meta {
    min-height: 44px !important;
    padding: 9px 13px !important;
    border-radius: 18px !important;
  }
}

.heritage-shell .method-card .check-row span,
.heritage-shell .ingredient-card .check-row span,
.heritage-shell .check-row span {
  color: #351707 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.heritage-shell .method-card .check-row,
.heritage-shell .ingredient-card .check-row {
  color: #351707 !important;
}

.heritage-shell .check-row input[type='checkbox'] {
  background: rgba(255,255,255,0.58) !important;
  border: 3px solid rgba(92, 38, 15, 0.78) !important;
}

.heritage-shell .check-row input[type='checkbox']::after {
  color: #5b260f !important;
  font-size: 1.05rem !important;
}


/* v4.4.0 PIN locker and heritage removal polish */
.pin-lock-card { max-width: 760px; }
.pin-lock-form .pin-input {
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  letter-spacing: 0.45em;
  text-align: center;
  font-weight: 800;
}
.lock-help {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted, #7c666f);
}
