/* ════════════════════════════════════════════════════════════════
   LewJonesssTCG — Editorial layer
   The type-led, restrained system that sits on top of design-system.css.
   Bold in scale & composition, quiet in colour & effects.

   Built & proven on index.html (the reference implementation); extracted
   here so every page shares one source of truth. See design.md.
   Load order on every page:
     1) styles/design-system.css   (brand tokens)
     2) styles/editorial.css       (this file)
   ════════════════════════════════════════════════════════════════ */

:root {
  --paper:    #f3f1ec;   /* warm editorial paper */
  --paper-2:  #eceae3;   /* slightly deeper panel */
  --ink:      #16121b;   /* near-black, faint warm-purple */
  --ink-soft: #4a4350;
  --ink-mute: #837c8a;
  --line:     #d9d5cf;   /* hairline on paper */
  --line-2:   #c8c3bb;
  /* "mono" now maps to Hanken with tabular figures (plain zeros, no dots) —
     numbers stay column-aligned via font-variant-numeric, no monospace font. */
  --mono: var(--font-sans);
}

html { scroll-behavior: smooth; }
/* Guard against horizontal scroll on small screens from decorative bleed
   (e.g. the coverflow's fanned side cards, the off-canvas drawer at rest).
   `clip` clips without creating a scroll container, so it leaves the sticky
   header working — unlike `overflow-x: hidden`. */
html { overflow-x: clip; }
body { background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--purple-900); color: #fff; }

/* ── Editorial type helpers ── */
.lj-display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; color: var(--ink); }
.lj-label { font-family: var(--font-sans); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-mute); }
.lj-num   { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Inline editorial link: label + arrow, underline grows on hover */
.lj-link { position: relative; display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 0.9375rem; color: var(--ink); cursor: pointer; }
.lj-link svg { transition: transform var(--dur-base) var(--ease-out); }
.lj-link::after { content: ""; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--dur-base) var(--ease-out); }
.lj-link:hover { color: var(--purple-900); }
.lj-link:hover::after { transform: scaleX(1); }
.lj-link:hover svg { transform: translateX(4px); }

/* ── Buttons — sharp, minimal ── */
.lj-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-weight: var(--weight-semibold);
  letter-spacing: 0; text-transform: none;
  border-radius: 3px; cursor: pointer; white-space: nowrap; border: 1px solid transparent;
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.lj-btn--sm { height: var(--control-h-sm); padding: 0 16px; font-size: var(--text-sm); gap: 6px; }
.lj-btn--md { height: var(--control-h-md); padding: 0 22px; font-size: var(--text-base); gap: 8px; }
.lj-btn--lg { height: 54px; padding: 0 30px; font-size: var(--text-base); gap: 10px; }
.lj-btn--full { width: 100%; }
.lj-btn--primary   { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lj-btn--primary:hover { background: var(--purple-900); border-color: var(--purple-900); }
.lj-btn--gold      { background: var(--gold-500); color: var(--ink-950); border-color: var(--gold-500); }
.lj-btn--gold:hover { background: var(--gold-400); border-color: var(--gold-400); }
.lj-btn--secondary { background: transparent; color: var(--ink); border-color: var(--line-2); }
.lj-btn--secondary:hover { border-color: var(--ink); }
.lj-btn--ghost     { background: transparent; color: var(--ink); border-color: transparent; padding-left: 0; padding-right: 0; }
.lj-btn--ghost:hover { color: var(--purple-900); }
.lj-btn--white     { background: #fff; color: var(--ink); border-color: #fff; }
.lj-btn--white:hover { background: var(--paper); border-color: var(--paper); }
.lj-btn:active { opacity: 0.85; }

/* ── Featured coverflow carousel ── */
/* `overflow-x: clip` here (not on <html>) clips the fanned side cards at the
   stage box — their real containing block — so they can't widen the page on
   mobile. Vertical card shadows stay visible (clip is compatible with the
   visible y-axis); desktop is unaffected since the fan fits inside the stage. */
.lj-cf-stage { position: relative; height: 432px; perspective: 1600px; overflow-x: clip; }
.lj-cf-card {
  position: absolute; top: 50%; left: 50%; width: 234px; height: 326px;
  transform: translate(-50%,-50%); will-change: transform, opacity; cursor: pointer;
  transition: transform 600ms var(--ease-out), opacity 500ms var(--ease-out);
}
.lj-cf-card img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 4.7%;
  filter: drop-shadow(0 18px 34px rgba(22,18,27,0.30)); -webkit-user-drag: none; user-select: none; pointer-events: none; }
.lj-cf-card.is-side img { filter: drop-shadow(0 10px 20px rgba(22,18,27,0.16)); }
/* z-index sits above the cards (max 30) but BELOW the sticky header (.lj-head, z 50)
   so the arrows don't paint over the nav when the carousel scrolls up behind it. */
.lj-cf-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 40; background: var(--paper); }
.lj-cf-arrow--prev { left: 0; } .lj-cf-arrow--next { right: 0; }
.lj-cf-meta { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin-top: 30px; }
.lj-cf-dots { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.lj-cf-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); border: none; padding: 0; cursor: pointer; transition: background var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.lj-cf-dot.is-active { background: var(--purple-700); transform: scale(1.35); }

/* ── Masthead vertical card scroller (hashtagpaid style) ── */
.lj-mast { display: grid; grid-template-columns: minmax(0,1fr) 296px; gap: 56px; align-items: center; }
.lj-vstack { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; height: 470px; }
.lj-vcol { overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent); }
/* Single, consistent scroll speed for both columns (was 26s vs 34s). Both columns
   hold the same cards-per-track, so one duration = one speed; column B just runs
   the opposite direction. Tune the feel by changing --vscroll-dur. */
.lj-vstack { --vscroll-dur: 28s; }
.lj-vtrack { display: flex; flex-direction: column; animation: lj-vscroll var(--vscroll-dur) linear infinite; }
.lj-vcol--b .lj-vtrack { animation-direction: reverse; }
/* Spacing is a per-image bottom margin (not flex `gap`) so the duplicated set tiles
   seamlessly: total height = 6×(card+margin) per half, so translateY(-50%) lands
   exactly on the repeat — no odd gap at the loop seam. */
/* Fixed card aspect-ratio so every tile is the SAME height (63:88 = a real card).
   This keeps the box reserved before the image decodes (no reflow) and makes cards
   pass at a perfectly even cadence — otherwise mixed image heights read as the
   column speeding up and slowing down even though the duration is constant. */
.lj-vtrack img { width: 100%; aspect-ratio: 63 / 88; object-fit: cover; display: block; margin-bottom: 16px; border-radius: 9px; filter: drop-shadow(0 8px 18px rgba(22,18,27,0.16)); }
@keyframes lj-vscroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }

.lj-railbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--line-2); border-radius: 3px; background: transparent; color: var(--ink);
  cursor: pointer; transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.lj-railbtn:hover { border-color: var(--purple-900); color: var(--purple-900); }
.lj-railbtn--ondark { border-color: rgba(255,255,255,0.32); color: #fff; }
.lj-railbtn--ondark:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.1); }

/* ── Reviews rail (light) ── */
#reviewRail { display: flex; gap: 18px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; padding-bottom: 18px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
#reviewRail > .lj-review { flex: 0 0 auto; width: 360px; scroll-snap-align: start; }
#reviewRail::-webkit-scrollbar { height: 4px; }
#reviewRail::-webkit-scrollbar-track { background: var(--line); border-radius: 2px; }
#reviewRail::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 2px; }
.lj-review { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 28px 28px 30px; display: flex; flex-direction: column; gap: 16px; }
.lj-review-av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: var(--purple-50); color: var(--purple-900); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 0.8125rem; }

.lj-item { position: relative; display: flex; flex-direction: column; cursor: default; }
.lj-item-media {
  position: relative; aspect-ratio: 3/4; overflow: visible;
  background: transparent; border: none;
  display: flex; align-items: center; justify-content: center;
}
/* Real card art floats on the paper — no box, card-shaped drop shadow */
.lj-item-media img { border-radius: 4.7%; filter: drop-shadow(0 12px 24px rgba(22,18,27,0.18)); transition: transform var(--dur-base) var(--ease-out); }
.lj-item:hover .lj-item-media img { transform: translateY(-4px); }
.lj-item-mark { font-family: var(--font-display); font-weight: 800; font-size: 2rem; letter-spacing: 0.14em; color: var(--line-2); transition: transform 600ms var(--ease-out), color var(--dur-base) var(--ease-out); }
.lj-item:hover .lj-item-mark { transform: translateY(-4px); color: var(--ink-mute); }
/* No-image placeholder: a card-shaped rectangle with the monogram centred, so an
   imageless card (e.g. the Chinese / Other Language set) reads as a card, not a bare
   letter. Transparent + hairline on paper, card corners + a light card shadow. */
.lj-item-ph {
  position: relative;
  height: 100%; aspect-ratio: 5 / 7; max-width: 100%;        /* real trading-card proportions */
  border: 1px solid var(--line-2); border-radius: 4.7%;       /* matches real card art corners */
  background: transparent;
  filter: drop-shadow(0 12px 24px rgba(22,18,27,0.10));
  transition: transform var(--dur-base) var(--ease-out);
}
.lj-item-ph::before {
  content: ''; position: absolute; inset: 0;
  background: center / 42% auto no-repeat url('../assets/logo-tcg.png');
  opacity: 0.5;
}
.lj-item:hover .lj-item-ph { transform: translateY(-4px); }
.lj-item-no { position: absolute; top: 10px; left: 12px; }
.lj-item-grade { position: absolute; top: 10px; right: 12px; padding: 3px 7px; border-radius: 2px; background: rgba(255,255,255,0.85); }
.lj-item-add {
  position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 3px;
  background: var(--ink); color: var(--paper); border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(6px); transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.lj-item:hover .lj-item-add { opacity: 1; transform: translateY(0); }
.lj-item-add:hover { background: var(--purple-900); }
.lj-item-name { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Sold out ── card art washed out, ink band across the tile ── */
.lj-item--sold .lj-item-media img,
.lj-item--sold .lj-item-media .lj-item-ph { filter: grayscale(0.92) opacity(0.55); }
.lj-item--sold:hover .lj-item-media img,
.lj-item--sold:hover .lj-item-media .lj-item-ph { transform: none; }
.lj-sold-banner {
  position: absolute; left: 0; right: 0; top: 50%; z-index: 3;
  transform: translateY(-50%); pointer-events: none;
  padding: 8px 0; text-align: center;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-sans); font-weight: 600; font-size: 0.6875rem;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.lj-sold-banner--lg { padding: 12px 0; font-size: 0.8125rem; letter-spacing: 0.28em; }

/* ── Mono filter tabs ── */
.lj-filter { font-family: var(--font-sans); transition: color var(--dur-fast) var(--ease-out); }
.lj-filter:hover { color: var(--ink) !important; }

/* ── Inputs ── */
.lj-field { transition: border-color var(--dur-base) var(--ease-out); }
.lj-field:focus-within { border-color: var(--ink); }

/* ── Header — minimal editorial bar ── */
.lj-head { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.lj-navlink { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: var(--ink-soft); transition: color var(--dur-base) var(--ease-out); }
.lj-navlink:hover { color: var(--ink); }
.lj-navlink--active { color: var(--purple-900); }
.lj-head .lj-shop-trigger { color: var(--ink-soft); text-transform: none; letter-spacing: 0.02em; font-weight: 600; font-size: 0.8125rem; }
.lj-head .lj-shop-menu:hover .lj-shop-trigger { color: var(--ink); }
.lj-headicon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: transparent; border: 1px solid var(--line-2); border-radius: 3px; color: var(--ink); cursor: pointer; transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.lj-headicon:hover { border-color: var(--ink); color: var(--purple-900); }
.lj-search input::placeholder { color: var(--ink-mute); }

/* ── Marquee — skewed purple ribbon (angular + brand) ── */
.lj-marquee-wrap { overflow: hidden; padding: 26px 0; }
.lj-marquee { background: var(--purple-900); padding: 13px 0; transform: rotate(-1.8deg); width: 112%; margin-left: -6%; }
.lj-marquee-track { display: inline-flex; align-items: center; white-space: nowrap; will-change: transform; animation: lj-marquee 38s linear infinite; }
/* padding (each side) must equal HALF the dot's margin-right so the gaps read as a
   uniform 26px rhythm (text↔dot the same on both sides). With 0 26px padding the
   text sat 26px from its left dot but 52px from the next — visibly off-centre. */
.lj-marquee span { font-family: var(--font-sans); font-weight: 500; font-size: 0.8125rem; letter-spacing: 0.04em; color: rgba(255,255,255,0.92); padding: 0 13px; }
.lj-marquee span::before { content: "◆"; color: var(--gold-400); margin-right: 26px; font-size: 0.5rem; vertical-align: middle; }
@keyframes lj-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Rotated "stamp" sticker (angular accent) ── */
.lj-sticker {
  position: absolute; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 16px 22px; border: 1.5px solid var(--purple-900); border-radius: 3px; background: var(--paper);
  transform: rotate(-7deg);
}
.lj-sticker span { font-family: var(--font-sans); font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--purple-900); line-height: 1.3; }
.lj-sticker span:first-child { font-weight: 600; }
.lj-sticker span:last-child { color: var(--ink-mute); }

/* ── Spec list (manifesto) — hairline rows, mono labels ── */
.lj-spec { display: flex; flex-direction: column; }
.lj-spec-row { display: grid; grid-template-columns: 28px 1fr; gap: 20px; padding: 26px 0; border-top: 1px solid var(--line); align-items: start; }
.lj-spec-row:last-child { border-bottom: 1px solid var(--line); }

/* ── Pillars (manifesto) — vertical hairline grid ── */
.lj-pillars { display: grid; grid-template-columns: repeat(3,1fr); }
.lj-pillar { display: flex; flex-direction: column; gap: 14px; padding: 6px 36px; }
.lj-pillar:first-child { padding-left: 0; }
.lj-pillar:last-child { padding-right: 0; }
.lj-pillar + .lj-pillar { border-left: 1px solid var(--line); }

/* ── Section divider — short rule with the TCG monogram in the middle ── */
.lj-divider { max-width: 760px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 22px; }
.lj-divider::before, .lj-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.lj-divider-mark { flex-shrink: 0; width: 25px; height: 30px; background: var(--line-2);
  -webkit-mask: url(../assets/logo-tcg.png) center/contain no-repeat; mask: url(../assets/logo-tcg.png) center/contain no-repeat; }

/* Inline link on dark surfaces */
.lj-link--ondark { color: #fff; }
.lj-link--ondark:hover { color: var(--gold-400); }

/* ── Big footer wordmark ── */
.lj-wordmark { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.04em; line-height: 0.8; color: rgba(255,255,255,0.07); white-space: nowrap; user-select: none; font-size: clamp(4rem, 18vw, 16rem); }
footer a { transition: color var(--dur-fast) var(--ease-out); }
footer a:hover { color: #fff; }

/* ── Mini-cart fade ── */
#miniCart { animation: lj-minicart-in var(--dur-fast) var(--ease-standard); }
@keyframes lj-minicart-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ── Add-to-cart badge bump ── */
@keyframes lj-cart-bump { 0% { transform: scale(1); } 30% { transform: scale(1.4); } 60% { transform: scale(0.9); } 100% { transform: scale(1); } }
.lj-cart-bump { animation: lj-cart-bump 380ms var(--ease-spring); }
@media (prefers-reduced-motion: reduce) { .lj-cart-bump { animation: none; } }

/* ── Add-to-cart confirmation: the button content cross-fades text ↔ tick ──
   The button's size is locked by JS (flashAdded) and the tick is overlaid,
   so nothing around it shifts. Both the morph-in and morph-back are smooth. */
.lj-btn-label { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 200ms var(--ease-out), transform 220ms var(--ease-out); }
.lj-btn-tick { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.5);
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-spring); }
.is-added { background: var(--purple-900) !important; border-color: var(--purple-900) !important; color: #fff !important; pointer-events: none; }
.is-added .lj-btn-label { opacity: 0; transform: scale(0.85); }
.is-added .lj-btn-tick { opacity: 1; transform: scale(1); }
@media (prefers-reduced-motion: reduce) { .lj-btn-label, .lj-btn-tick { transition: none; } }

/* ── Icon buttons (mini-cart remove, qty steppers, etc.) ── */
.lj-iconbtn { transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.lj-iconbtn:hover { color: var(--ink-700) !important; }
.lj-step:hover { background: var(--purple-50) !important; }

/* ── Scroll-reveal (gentle fade + rise) ── */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ── FAQ answer reveal ── */
.lj-faq-answer { animation: lj-fade-in var(--dur-slow) var(--ease-out); }
@keyframes lj-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .lj-faq-answer { animation: none !important; }
  .lj-marquee-track, .lj-vtrack { animation: none !important; }
  .lj-cf-card { transition: none !important; }
  .lj-item-add { opacity: 1; transform: none; }
}

/* ── Responsive ── */
@media (max-width: 920px) {
  .lj-faq { grid-template-columns: 1fr !important; gap: 28px !important; }
  .lj-contact { grid-template-columns: 1fr !important; }
  .lj-spec-cols { grid-template-columns: 1fr !important; gap: 28px !important; }
  .lj-pillars { grid-template-columns: 1fr !important; }
  .lj-pillar { padding: 30px 0 6px !important; }
  .lj-pillar:first-child { padding-top: 6px !important; }
  .lj-pillar + .lj-pillar { border-left: 0 !important; border-top: 1px solid var(--line) !important; }
  .lj-footer-cols { grid-template-columns: 1fr 1fr !important; }
  .lj-search { display: none !important; }
  .lj-cart-grid { grid-template-columns: 1fr !important; }
  .lj-cart-summary { position: static !important; }
}
@media (max-width: 980px) {
  .lj-mast { grid-template-columns: 1fr !important; }
  .lj-vstack { display: none !important; }
}
@media (max-width: 620px) {
  .lj-nav-extra { display: none !important; }
  /* Let the carousel run full-bleed so the fanned side cards peek and clip at
     the actual screen edge (a natural carousel look) rather than being hard-cut
     32px inside the padded container. The stage's overflow-x:clip then contains
     them — no page overflow, no ugly inset cut. */
  .lj-cf { width: 100vw; margin-left: calc(50% - 50vw); }
  .lj-cf-stage { height: 372px; }
  .lj-cf-card { width: 188px; height: 262px; }
  /* Keep the arrows visible and tappable above the cards, just inside the edge:
     solid paper fill + the .lj-railbtn hairline (no shadow — stays on-brand). */
  .lj-cf-arrow { background: var(--paper); }
  .lj-cf-arrow--prev { left: 10px; }
  .lj-cf-arrow--next { right: 10px; }
  .lj-rail-nav { display: none !important; }
  #reviewRail > .lj-review { width: 82vw; max-width: 340px; }
}
@media (max-width: 560px) {
  .lj-footer-cols { grid-template-columns: 1fr !important; }
  .lj-hero-cta { flex-direction: column !important; align-items: flex-start !important; gap: 14px !important; }
}

/* ════════════════════════════════════════════════════════════════
   Mobile navigation — hamburger + slide-in drawer.
   Markup is injected by lj-mobile-nav.js; this is the styling.
   Editorial language: paper panel, hairlines, sharp corners, ink text.
   ════════════════════════════════════════════════════════════════ */

/* Burger lives in the header right-cluster; hidden until the mobile bar. */
.lj-burger { display: none; }
.lj-burger svg { display: block; }

/* Visually-hidden helper (spam honeypots etc.). Clips instead of shoving the
   element off-screen with left:-9999px — an off-screen element extends the
   page's scroll width and lets mobile browsers swipe into blank space. */
.lj-hp {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: 0; border: 0; opacity: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; pointer-events: none;
}

/* The drawer + overlay live inside a fixed, viewport-sized clipping root.
   SLIDE (iOS-robust): the panel is anchored with `left` (NOT `right`) and slid
   with explicit viewport-relative distances (NOT an element-% translate). On
   iOS, a composited layer positioned with `right:0` and moved by `translateX(%)`
   was being mis-placed on the first frame (it flashed in from the left); using
   left-anchoring + translate3d(<vw distance>) removes both ambiguities so the
   layer's geometry is unambiguous from frame one. Always rendered + clipped by
   the root so it never widens the page. */
.lj-drawer-root {
  position: fixed; inset: 0; z-index: 90; overflow: hidden;
  pointer-events: none;
}
.lj-drawer-root.is-open { pointer-events: auto; }

.lj-drawer-overlay {
  position: absolute; inset: 0;
  background: rgba(22, 18, 27, 0.42);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.lj-drawer-root.is-open .lj-drawer-overlay { opacity: 1; }

.lj-drawer {
  position: absolute; top: 0; left: 0;          /* left-anchored; placed via transform */
  width: min(86vw, 360px); height: 100%;
  background: var(--paper); border-left: 1px solid var(--line-2);
  box-shadow: -18px 0 50px rgba(22, 18, 27, 0.18);
  display: flex; flex-direction: column;
  /* CLOSED: left edge parked at the viewport's right edge (fully off-screen). */
  transform: translate3d(100vw, 0, 0);
  transition: transform var(--dur-base) var(--ease-out);
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* OPEN: left edge sits exactly one panel-width in from the right edge. */
.lj-drawer-root.is-open .lj-drawer { transform: translate3d(calc(100vw - min(86vw, 360px)), 0, 0); }

.lj-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; flex: 0 0 64px; padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.lj-drawer-head .lj-label { letter-spacing: 0.18em; text-transform: uppercase; }
.lj-drawer-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-right: -8px;
  background: transparent; border: none; color: var(--ink); cursor: pointer;
}
.lj-drawer-close:hover { color: var(--purple-900); }

.lj-drawer-body { padding: 8px 18px 28px; }

/* Search field inside the drawer (mirrors the header search). */
.lj-drawer-search {
  display: flex; align-items: center; gap: 10px;
  height: 46px; margin: 16px 0 8px; padding: 0 14px;
  background: transparent; border: 1px solid var(--line-2); border-radius: 3px;
}
.lj-drawer-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: var(--font-sans); font-size: 0.9375rem; color: var(--ink);
}
.lj-drawer-search input::placeholder { color: var(--ink-mute); }

/* Primary nav rows. */
.lj-drawer-link {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 16px 2px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.02em; color: var(--ink);
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  text-align: left; cursor: pointer;
}
.lj-drawer-link:hover, .lj-drawer-link:focus-visible { color: var(--purple-900); }
.lj-drawer-link.is-active { color: var(--purple-900); }
.lj-drawer-link .lj-drawer-chev { transition: transform var(--dur-base) var(--ease-out); color: var(--ink-mute); }
.lj-drawer-link[aria-expanded="true"] .lj-drawer-chev { transform: rotate(180deg); }

/* Expandable Shop category panel (clones the header dropdown links). */
.lj-drawer-shoppanel { display: none; padding: 6px 0 14px; border-bottom: 1px solid var(--line); }
.lj-drawer-shoppanel.is-open { display: block; }
.lj-drawer-shoppanel .lj-shop-grouplabel {
  font-family: var(--font-sans); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute);
  padding: 12px 2px 4px;
}
.lj-drawer-shoppanel a {
  display: block; padding: 9px 2px; font-size: 0.95rem; font-weight: 500; color: var(--ink-soft);
}
.lj-drawer-shoppanel a:hover { color: var(--purple-900); }
.lj-drawer-shoppanel a.lj-shop-all { font-weight: 600; color: var(--ink); }
.lj-drawer-shoppanel a svg { display: none; }
.lj-drawer-shoppanel .lj-flyout { display: none !important; }
.lj-drawer-shoppanel .lj-shop-sub { display: block; position: static; }
.lj-drawer-shoppanel .lj-shop-div { height: 1px; background: var(--line); margin: 8px 0; }

/* Account control pinned beneath the nav. */
.lj-drawer-acct { margin-top: 24px; }
.lj-drawer-acct .lj-btn { width: 100%; }

body.lj-noscroll { overflow: hidden; }

/* ── Mobile header bar (≤860px): swap desktop nav for the burger ── */
@media (max-width: 860px) {
  .lj-head > div { height: 64px !important; padding: 0 18px !important; gap: 0 !important; }
  .lj-head > div > nav { display: none !important; }
  .lj-head .lj-search { display: none !important; }
  .lj-head [data-lj-acct] { display: none !important; }
  .lj-head img { height: 34px !important; }
  .lj-burger { display: inline-flex !important; }
  /* tighten the icon cluster so cart + burger sit neatly at the edge */
  .lj-head [id="cartRegion"] + .lj-burger { margin-left: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  /* No slide — the panel snaps open/closed (is-open still sets the end state). */
  .lj-drawer, .lj-drawer-overlay, .lj-drawer-link .lj-drawer-chev { transition: none !important; }
}

/* Redeem modal + success pop */
.lj-modal-root { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lj-modal-backdrop { position: absolute; inset: 0; background: rgba(20, 8, 30, 0.55); animation: lj-fade-in 0.18s ease both; }
.lj-modal-card { position: relative; z-index: 1; width: 100%; max-width: 420px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 8px; padding: 28px; box-shadow: 0 24px 60px rgba(20, 8, 30, 0.28); animation: lj-modal-in 0.22s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes lj-modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes lj-pop { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 100% { transform: scale(1); } }
.lj-pop { animation: lj-pop 0.45s ease; }
@media (prefers-reduced-motion: reduce) {
  .lj-modal-backdrop, .lj-modal-card { animation: none !important; }
  .lj-pop { animation: none !important; }
}

/* ── Flippable card (detail page) ─────────────────────────── */
.lj-detail-stage { perspective: 1600px; }

.lj-flip {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  cursor: pointer;
}
.lj-flip.is-flipped { transform: rotateY(180deg); }

.lj-flip__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lj-flip__back { transform: rotateY(180deg); }

/* Small editorial flip control — paper + hairline, never gold */
/* Row beneath the card: source caption (left) + flip control (right) */
.lj-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.lj-flip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.lj-flip-btn:hover { border-color: var(--ink); }
.lj-flip-btn svg { display: block; }

/* Stock / Real caption — small, muted, sits under the card */
.lj-img-source {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-mute);
}

@media (prefers-reduced-motion: reduce) {
  .lj-flip { transition: none; }
}
