/* ============================================
   Everything Art — Redesign Overlay (17 May 2026)
   Appended on top of styles.css; existing rules untouched.
   Token overrides + new component classes.
   ============================================ */

:root {
  --warm-bg: #F5F1EB;
  --text-primary: #14110F;
  --light-grey: #E8E3DD;
  --kraft: #C19467;
  --kraft-deep: #6F4D2A;
  --ink-2: #5A524A;
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

body {
  font-family: var(--font-primary);
  background: var(--warm-bg);
  color: var(--text-primary);
  font-weight: 400;
}

/* The redesign no longer relies on Poppins/Cormorant — keep system stack everywhere. */
.scan-logo, .scan-prompt, .picker-hero h2, .picker-hero h2 .accent, .picker-subtitle,
.card-body h3, .card-body p, .gallery-header h2, .gallery-header p,
.filter-chip, .gi-label, .modal-content h2, .modal-content p,
.nav-item .nav-label, .technique-body h3, .technique-body p, .technique-number,
.guide-section-title, .guide-description, .works-card h3, .avoid-card h3,
.works-card ul, .avoid-card ul, .video-info h3, .video-duration,
.product-tag, .scan-skip-btn, .camera-denied h2, .camera-denied p,
.btn-primary, .about-panel h2, .about-tagline, .about-text, .about-link {
  font-family: var(--font-primary);
}

/* ---- Brandbar (top of each tab) ---- */
.ea-brandbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 22px 4px;
  gap: 8px;
}
.ea-brandbar__logo {
  height: 94px;
  width: auto;
  display: block;
  cursor: pointer;
  margin-bottom: 2px;
}
@media (max-width: 420px) {
  .ea-brandbar__logo { height: 84px; }
}
.ea-brandbar__row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ea-brandbar__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}
.ea-brandbar__chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-transform: uppercase;
}

/* ---- View backgrounds (override picker/guide/gallery to warm-bg) ---- */
#home-view, #journal-view, #picker-view, #guide-view, #gallery-view {
  background: var(--warm-bg);
}
.view {
  padding-bottom: 0;
}

/* ---- Hero (Home) ---- */
.hero {
  position: relative;
  margin: 6px 14px 20px;
  border-radius: 22px;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 22px 22px;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(135deg, #d8a574 0%, #b27a44 60%, #6f4d2a 100%);
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 100% 0%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, black 20%, transparent 70%);
}
.hero__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
  align-self: flex-start;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}
/* Logo mark removed from the pill — text only. Rule kept (harmless) in case
   an image is ever put back. `gap` only applies between children, so the
   single span sits correctly with no stray spacing. */
.hero__brand img {
  height: 12px;
  filter: brightness(0) invert(1);
}
.hero__title {
  font-weight: 700;
  font-size: 46px;
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  font-weight: 300;
  display: block;
  opacity: 0.95;
}
.hero__sub {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
  margin: 14px 0 18px;
  max-width: 30ch;
}
.hero__ctas {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 700;
  transition: transform 100ms ease, background 200ms ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--text-primary); color: #fff; }
.btn--light { background: #fff; color: var(--text-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.btn--ghost-light {
  background: rgba(255,255,255,0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn--ghost-dark {
  background: var(--warm-bg);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--light-grey);
}
.btn--full { width: 100%; }

/* ---- Quick scan card (Home) ---- */
.qscan {
  margin: 0 14px;
  background: var(--text-primary);
  color: #fff;
  border-radius: 16px;
  padding: 16px 16px 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.qscan__grid {
  position: absolute; inset: 0; opacity: 0.5;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 18px 18px;
}
.qscan__txt { position: relative; }
.qscan__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 3px;
}
.qscan__sub {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  line-height: 1.45;
}
.qscan__cta {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #fff;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  position: relative;
  cursor: pointer;
}

/* ---- Section heading ---- */
.sechead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 22px 10px;
}
.sechead__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.sechead__more {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---- Paper grid card (.pcard) ---- */
.papers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 14px 12px;
}
.pcard {
  text-align: left;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  width: 100%;
  border: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 200ms ease;
}
.pcard:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,17,15,0.08); }
.pcard__img {
  width: 100%;
  aspect-ratio: 4/3.2;
  background-size: cover;
  background-position: center;
  position: relative;
}
.pcard__chip {
  position: absolute;
  top: 8px; left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.pcard__chip-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.pcard__body { padding: 10px 12px 12px; }
/* C5: bumped card body-copy sizes for younger readers (kid accessibility). */
.pcard__name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.pcard__tag { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.4; }

/* ---- Horizontal scroll tile ---- */
.hscroll {
  display: flex;
  gap: 10px;
  padding: 4px 14px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex-shrink: 0; scroll-snap-align: start; }
.ttile {
  width: 220px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  padding: 0;
  border: none;
  cursor: pointer;
}
/* Square, for the same reason as .reader-hero: a 130px band across a square
   artwork showed only a horizontal stripe through the middle of it. */
.ttile__img {
  aspect-ratio: 1;
  height: auto;
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}
.ttile__num {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 3px 8px;
  border-radius: 999px;
}
.ttile__body { padding: 10px 12px 12px; }
.ttile__name { font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }

/* ---- Home footer ---- */
.ea-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 14px 12px;
}
.ea-footer img { height: 26px; width: auto; display: block; }
.ea-footer__txt {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kraft-deep);
}
.ea-footer__about {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  text-decoration: underline;
  cursor: pointer;
  margin-left: 6px;
}

/* ---- Guide hero (overrides existing .guide-hero) ---- */
#guide-view .guide-hero {
  position: relative;
  height: 320px;
  padding: 22px 22px 24px;
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
#guide-view .guide-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.6) 100%);
  z-index: 0;
  pointer-events: none;
}
#guide-view .guide-hero > * { position: relative; z-index: 1; }

.guide-hero__top { display: flex; justify-content: space-between; align-items: flex-start; }
.guide-hero__actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.guide-hero__bottom { display: flex; flex-direction: column; align-items: flex-start; }
.gbtn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}
.gbtn--saved { background: #fff; color: var(--text-primary); }

.guide-hero__name {
  font-size: 42px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0;
  color: #fff;
}
.guide-hero__chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #fff;
}
.guide-hero__tag {
  font-size: 14px;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  margin-top: 4px;
}

#guide-view .guide-body {
  padding: 18px 22px 6px;
}
#guide-view .guide-body p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}
.guide-pad { padding: 0 14px 16px; }

/* ---- Works / Avoid ---- */
.wa {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px 14px 6px;
}
.wa__col {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
}
.wa__head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.wa__col--use .wa__head { color: #2c8b57; }
.wa__col--avoid .wa__head { color: #b94e3a; }
.wa__list { list-style: none; padding: 0; margin: 0; }
.wa__list li {
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.45;
  padding: 6px 0;
  border-top: 1px solid var(--light-grey);
}
.wa__list li:first-child { border-top: 0; padding-top: 0; }

/* ---- Technique card ---- */
.tcard {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border-radius: 14px;
  margin-bottom: 8px;
}
/* Activity artwork thumbnail. Only applied when a real image resolved, so
   image-less cards keep the original "auto 1fr" two-column layout. */
.tcard--withimg {
  grid-template-columns: auto 72px 1fr;
  align-items: start;
}
.tcard__img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background-color: var(--warm-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (max-width: 380px) {
  .tcard--withimg { grid-template-columns: auto 56px 1fr; gap: 10px; }
  .tcard__img { width: 56px; height: 56px; border-radius: 10px; }
}
.tcard__num {
  font-size: 28px;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1;
  width: 36px;
  font-feature-settings: "ss01" on;
}
.tcard__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.tcard__actions { display: flex; gap: 6px; flex-shrink: 0; }
.tcard__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.tcard__desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
  margin: 0;
}
.savebtn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--warm-bg);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 150ms;
  border: none;
  cursor: pointer;
}
.savebtn[data-saved="true"] { background: var(--text-primary); color: #fff; }
.savebtn--sm { width: 26px; height: 26px; }
.savebtn--sm svg { width: 12px; height: 12px; }

.technique-products {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tcard .product-tag {
  background: var(--warm-bg);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

/* ---- Ideas page head + chip filter ---- */
.pageHead {
  padding: 6px 22px 12px;
}
.pageHead__eye {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.pageHead__title {
  font-size: 38px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
  color: var(--text-primary);
}
.pageHead__title em { font-style: italic; font-weight: 300; }
.pageHead__sub {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin-top: 10px;
  max-width: 36ch;
}
.filters {
  display: flex;
  gap: 6px;
  padding: 12px 18px 14px;
  overflow-x: auto;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--light-grey);
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all 150ms;
  white-space: nowrap;
  cursor: pointer;
}
.chip[aria-pressed="true"] {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}
.chip__dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ---- Masonry gallery ---- */
.gallery {
  columns: 2;
  column-gap: 8px;
  padding: 0 14px 16px;
}
.gitem {
  break-inside: avoid;
  margin-bottom: 8px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}
.gitem__img {
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}
.gitem__chip {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.gitem__body {
  padding: 9px 11px 11px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.gitem__title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); line-height: 1.3; flex: 1; }
.gitem__media { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

/* ---- Journal empty state + jcard ---- */
.empty {
  margin: 12px 18px;
  padding: 30px 24px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
  border: 1.5px dashed var(--light-grey);
}
.empty__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--warm-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
}
.empty__title { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.empty__sub {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 28ch;
  margin: 0 auto 16px;
}
.jcard {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 8px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  border: none;
  font-family: var(--font-primary);
}
.jcard__num {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  font-style: italic;
}
.jcard__title { font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.jcard__meta {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.jcard__dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* ---- Micador about card (Journal footer) ---- */
.micabout {
  margin: 24px 18px 12px;
  padding: 24px 22px 22px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--light-grey);
  text-align: left;
}
.micabout__logo { height: 36px; width: auto; display: block; margin-bottom: 14px; }
.micabout__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kraft-deep);
  margin-bottom: 10px;
}
.micabout__body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 12px;
  text-wrap: pretty;
}
.micabout__link {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1.5px solid var(--text-primary);
  padding-bottom: 1px;
}

/* ---- Toast ---- */
.ea-toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: var(--text-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  pointer-events: none;
  transition: all 220ms cubic-bezier(.2,.7,.2,1);
  z-index: 999;
  white-space: nowrap;
}
.ea-toast[data-show="true"] { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Bottom nav (4 items, scan centre-weighted) ---- */
.bottom-nav { grid-template-columns: repeat(4, 1fr); display: grid; }
.bottom-nav .nav-item.active { color: var(--text-primary); }
.bottom-nav .nav-item--scan {
  position: relative;
  padding-top: 0;
}
.bottom-nav .nav-item--scan .nav-scan-dot {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--text-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: -16px 0 2px;
  box-shadow: 0 4px 14px rgba(20,17,15,0.25);
}
.bottom-nav .nav-item--scan.active .nav-scan-dot { background: var(--kraft-deep); }
.bottom-nav .nav-item--scan .nav-label { color: var(--text-primary); }

/* About modal — restyle the existing overlay to match new tokens. */
.about-overlay { z-index: 1000; }
.about-panel { background: #fff; border-radius: 22px; padding: 28px 24px; }
.about-panel h2, .about-panel .about-tagline, .about-text, .about-link {
  color: var(--text-primary);
}
.about-logo-large { width: auto; height: 28px; margin-bottom: 14px; }
.about-tagline {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kraft-deep);
  margin-bottom: 14px;
}
.about-text { color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.about-link {
  display: inline-block;
  margin-top: 14px;
  background: var(--text-primary);
  color: #fff;
  border: none;
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
}

/* ============================================
   Scanner Phase 1 — confirmation sheet, wrong pill, opt-in
   ============================================ */

/* Reuse the existing scan ring, just swap the chrome colour to kraft */
.scan-frame-corner { border-color: var(--kraft); }
.scan-detection-label { background: var(--kraft-deep); }
.scan-progress-ring .progress { stroke: var(--kraft); }
.scan-logo span { color: var(--kraft); }
.scan-logo-mark { height: 22px; filter: brightness(0) invert(1); }

/* Confirmation overlay (mid + low confidence) */
.scan-confirm {
  /* Mounted on <body> (see showScanConfirm) so it escapes #scanner-view's
     stacking context. z-index matches .wrong-overlay so the sheet — and its
     CTAs — sit above the fixed .bottom-nav (z-index 50) instead of under it. */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  pointer-events: auto;
  z-index: 1000;
}
.scan-confirm.hidden { display: none; }
.scan-confirm__panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  padding: 22px 20px 18px;
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font-primary);
}
.scan-confirm__eye {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.scan-confirm__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.scan-confirm__sub {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-bottom: 14px;
}
.scan-confirm__ctas {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.scan-confirm__ctas .btn--ghost-light {
  background: var(--warm-bg);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--light-grey);
}
.scan-confirm__picker.hidden { display: none; }
.scan-confirm__chips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 12px;
}
@media (max-width: 380px) {
  .scan-confirm__chips { grid-template-columns: repeat(3, 1fr); }
}
.scan-confirm__chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid var(--light-grey);
  border-radius: 12px;
  padding: 6px 4px 8px;
  cursor: pointer;
  font-family: var(--font-primary);
}
.scan-confirm__chip[data-current="true"] {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--text-primary);
}
.scan-confirm__chip-img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}
.scan-confirm__chip-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
}

/* "Detected: Kraft · Wrong?" pill on guide hero */
.scan-wrong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
}
.scan-wrong__sep { opacity: 0.6; }
.scan-wrong__cta { color: #fff; text-decoration: underline; }

/* Wrong-detection action sheet (on guide page) */
.wrong-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  animation: fadeIn 0.25s ease;
}
.wrong-overlay__panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px 18px 18px 18px;
  padding: 24px 22px 22px;
  position: relative;
  text-align: left;
  font-family: var(--font-primary);
  color: var(--text-primary);
}

/* Opt-in modal for sending scan corrections to CMS */
.scan-opt-in {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.scan-opt-in__panel {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px 22px;
  font-family: var(--font-primary);
  color: var(--text-primary);
  text-align: left;
}
.scan-opt-in__title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.scan-opt-in__body {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 16px;
}
.scan-opt-in__ctas {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scan-opt-in__ctas .btn { width: 100%; }

/* ============================================
   Card hit-targets (Journal jcards / pcards / gitems / tcard)
   Outer is a non-button element so inner buttons can nest safely.
   ============================================ */
.jcard[role="link"],
.gitem[role="link"],
.pcard[role="link"],
.tcard--tappable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.jcard[role="link"]:focus-visible,
.gitem[role="link"]:focus-visible,
.pcard[role="link"]:focus-visible,
.tcard--tappable:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}
.tcard--tappable {
  transition: transform 120ms ease, box-shadow 200ms ease;
}
.tcard--tappable:active {
  transform: scale(0.99);
}

/* Floating remove button at top-right of the paper image in Journal pcards */
.savebtn--corner {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.savebtn--corner[data-saved="true"] {
  background: var(--text-primary);
  color: #fff;
}

/* ============================================
   Technique reader — fullscreen view at #read/<paperId>/<idx>
   ============================================ */
#reader-view {
  background: var(--warm-bg);
  font-family: var(--font-primary);
}
.reader-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(to bottom, rgba(245,241,235,0.95) 0%, rgba(245,241,235,0.85) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.reader-topbar .gbtn {
  background: rgba(20,17,15,0.08);
  color: var(--text-primary);
}
.reader-topbar .gbtn.gbtn--saved {
  background: var(--text-primary);
  color: #fff;
}
.reader-topbar__actions {
  display: flex;
  gap: 8px;
}

/* The activity artwork is a complete square composition — a mandala, a border,
   a lettering plate. The old 46vh full-width band centre-cropped it with
   `cover`, cutting the top and bottom off the artwork. Capping width and
   height to the same value keeps the box square at every viewport, so `cover`
   has nothing to crop and the whole piece shows. */
.reader-hero {
  aspect-ratio: 1;
  width: 100%;
  /* Both caps at the same value keep the box square at any viewport. No
     min-height: on a short landscape window it would force height past width
     and start cropping again, which is the thing we're fixing. */
  max-width: min(100%, 52vh);
  max-height: 52vh;
  margin-inline: auto;
  background-size: cover;
  background-position: center;
  position: relative;
}
/* The blank fallback has no artwork to preserve, so it keeps the original
   shallow band rather than becoming a large empty square. */
.reader-hero--blank {
  aspect-ratio: auto;
  height: 46vh;
  min-height: 240px;
  max-height: 420px;
  max-width: none;
}
.reader-hero--blank {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 24px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent, var(--kraft)) 35%, transparent) 0%,
    color-mix(in srgb, var(--accent, var(--kraft)) 10%, transparent) 100%);
}
@supports not (background: color-mix(in srgb, red, blue)) {
  .reader-hero--blank {
    background: linear-gradient(135deg, rgba(193,148,103,0.35) 0%, rgba(193,148,103,0.1) 100%);
  }
}
.reader-hero__num {
  font-size: 96px;
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  color: var(--accent, var(--kraft-deep));
  opacity: 0.85;
}
.reader-hero__papername {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-top: 8px;
}

.reader-content {
  padding: 24px 22px 32px;
  max-width: 640px;
  margin: 0 auto;
}
.reader-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.reader-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  color: var(--text-primary);
  text-wrap: balance;
}
.reader-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0 0 20px;
  text-wrap: pretty;
}
.reader-section {
  margin-top: 24px;
}
.reader-section__head {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.reader-section .technique-products {
  margin-top: 0;
}

/* Step-by-step cards */
.reader-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.reader-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
}
.reader-step__num {
  font-size: 28px;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1;
  width: 36px;
}
.reader-step__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.reader-step__img {
  width: 100%;
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
}
.reader-step__text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-wrap;
  text-wrap: pretty;
}

/* Hide bottom-nav when the reader is open — immersive feel.
   Stamp set in route() via document.body.dataset.view. */
body[data-view="read"] .bottom-nav { display: none; }

/* C8: "N of M techniques tried" progress ring on the guide hero. */
.guide-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #fff;
}
.guide-progress__ring { display: block; flex: none; }
.guide-progress__label {
  font-family: var(--font-primary);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* C8: "You've made N things" line on the Journal header. */
.pageHead__made {
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--text-primary);
  margin-top: 6px;
}
.pageHead__made strong { font-weight: 800; }

/* C1: real product image fills the modal thumbnail when one is supplied
   (falls back to the placeholder SVG when empty). */
.modal-product-image.has-image {
  background-size: cover;
  background-position: center;
}
