/* Structural ornament pass: every decorative asset is attached to an edge, frame, divider, node, or control. */

:root {
  --lunar-paper: #f4ecdf;
  --lunar-black: #171315;
  --lunar-pink: #ff88bb;
  --lunar-baby: #ffc2da;
  --lunar-wine: #942b51;
  --lunar-blue: #8099d1;
  --lunar-yellow: #e1cb55;
  --lunar-green: #718160;
  --lunar-rust: #b45e49;
  --lunar-lilac: #baa6db;
  --lunar-silver: #c7c8cf;
}

.ll-lace-header {
  position: relative;
  width: 100%;
  height: clamp(58px, 6vw, 88px);
  overflow: visible;
  pointer-events: none;
}

.ll-lace-header__lace {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 68%;
}

.ll-lace-header--ink { background: var(--lunar-black); }
.ll-lace-header--blue { background: #dbe4f2; }
.ll-lace-header--pink,
.ll-lace-header--home { background: var(--lunar-baby); }

.ll-bow-node {
  display: block;
  width: clamp(66px, 7vw, 104px);
  height: clamp(50px, 5vw, 74px);
  overflow: hidden;
  background: var(--lunar-paper);
  border: 1px solid currentColor;
  border-radius: 50% 50% 44% 44%;
}

.ll-bow-node__image {
  width: 100%;
  height: 190%;
  object-fit: cover;
  object-position: 50% 22%;
  transform: translateY(-8%);
}

.ll-lace-header__bow {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  transform: translate(-50%, 42%);
}

.ll-pearl-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: currentColor;
}

.ll-pearl-divider__line { height: 1px; background: currentColor; }
.ll-pearl-divider__pearls { display: flex; align-items: center; gap: 6px; }
.ll-pearl-divider__pearls i {
  display: block;
  width: 9px;
  aspect-ratio: 1;
  background: radial-gradient(circle at 34% 28%, #fff 0 16%, var(--lunar-silver) 18% 55%, #777 100%);
  border: 1px solid rgba(23, 19, 21, .46);
  border-radius: 50%;
}
.ll-pearl-divider__pearls i:nth-child(3) { width: 13px; }

.ll-botanical-corner {
  position: absolute;
  z-index: 5;
  width: clamp(120px, 21vw, 300px);
  max-height: 46%;
  object-fit: contain;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.ll-botanical-corner--bottom-left { left: -4%; bottom: -6%; }
.ll-botanical-corner--bottom-right { right: -4%; bottom: -6%; }
.ll-botanical-corner--top-right { right: -3%; top: -5%; }

.ll-chrome-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(54px, 6vw, 82px);
  aspect-ratio: 1;
  overflow: hidden;
  color: var(--lunar-black);
  background: var(--lunar-silver);
  border: 1px solid var(--lunar-black);
  border-radius: 50%;
  box-shadow: 3px 3px 0 rgba(23, 19, 21, .25);
}
.ll-chrome-marker__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .46; }
.ll-chrome-marker > i { position: relative; z-index: 1; font: normal 800 22px/1 Georgia, serif; }

.ll-print-border {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 8px clamp(20px, 4vw, 58px);
  font: 800 12px/1 ui-monospace, Consolas, monospace;
  letter-spacing: .08em;
  background-color: var(--lunar-yellow);
  background-image: repeating-linear-gradient(90deg, transparent 0 21px, rgba(23, 19, 21, .14) 22px 23px);
  border-block: 1px solid var(--lunar-black);
}
.ll-print-border b { text-align: center; }

.ll-stamp-label {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  padding: 6px 12px;
  font: 800 10px/1.1 ui-monospace, Consolas, monospace;
  text-transform: uppercase;
  border: 1px solid currentColor;
  outline: 1px dashed currentColor;
  outline-offset: -4px;
}

.ll-category-frame {
  position: relative;
  border: 1px solid var(--lunar-black);
  outline: 1px solid color-mix(in srgb, var(--world-primary, var(--lunar-pink)) 64%, var(--lunar-black));
  outline-offset: -8px;
}

.ll-ornamental-section {
  position: relative;
  border-block: 1px solid currentColor;
}
.ll-ornamental-section > header { display: flex; align-items: center; min-height: 42px; padding-inline: 18px; border-bottom: 1px solid currentColor; }

/* World trim replaces the old viewport scatter layer. */
.ll-world-structure {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.ll-world-structure__top { position: absolute; top: 0; right: 0; left: 0; z-index: 3; }
.ll-world-structure__marker {
  position: absolute;
  top: clamp(72px, 7vw, 100px);
  right: clamp(18px, 3vw, 46px);
  z-index: 4;
  padding: 5px 9px;
  font: 800 10px/1 ui-monospace, Consolas, monospace;
  color: var(--lunar-black);
  background: var(--lunar-silver);
  border: 1px solid var(--lunar-black);
}
.ll-world-structure__side {
  position: absolute;
  top: clamp(58px, 6vw, 88px);
  bottom: 0;
  width: clamp(18px, 2.4vw, 42px);
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 210px auto;
  opacity: .72;
}
.ll-world-structure__side--left { left: 0; }
.ll-world-structure__side--right { right: 0; transform: scaleX(-1); }
.ll-world-structure--tarot .ll-world-structure__side { background-image: url("/assets/lunar/ornaments/lace/lace-floral-border.webp"); filter: grayscale(1) contrast(1.45); }
.ll-world-structure--manifestation .ll-world-structure__side { background-image: url("/assets/lunar/ornaments/lace/lace-eighteenth-century.webp"); filter: grayscale(1) contrast(1.2); mix-blend-mode: multiply; }

.ll-zine-landing { padding-top: clamp(58px, 6vw, 88px); }
.ll-zine-landing > .archive-breadcrumbs { position: relative; z-index: 7; margin: 18px clamp(22px, 5vw, 78px); }
.ll-landing-frame { margin: 0 clamp(18px, 3vw, 46px); }
.ll-landing-frame .ll-zine-hero { border: 0; }
.ll-hero-pearl-divider { max-width: 460px; margin-top: 26px; }
.ll-hero-chrome-node { position: absolute; top: 20px; right: 20px; z-index: 12; }
.ll-landing-divider { height: auto !important; padding: 24px clamp(28px, 6vw, 96px); margin: 0 !important; background: var(--world-paper) !important; border-bottom: 1px solid var(--lunar-black); }
.ll-landing-divider img { display: none !important; }

/* Homepage is one framed magazine cover rather than a loose collage. */
.ll-asset-hero { position: relative; padding-top: clamp(62px, 6vw, 90px); border: 1px solid var(--lunar-black); outline: 1px solid var(--lunar-pink); outline-offset: -10px; }
.ll-home-lace-header { position: absolute; top: 0; right: 0; left: 0; z-index: 9; }
.ll-home-hero-divider { max-width: 470px; margin-top: 30px; }
.ll-asset-hero__composition { border-left: 1px solid var(--lunar-black); }
.ll-asset-hero__moon { top: 12%; left: 16%; width: 68%; padding: 14px; transform: none; box-shadow: 14px 14px 0 var(--lunar-blue); }
.ll-asset-hero__flower { left: -3%; bottom: -3%; width: 34%; transform: none; }
.ll-asset-hero__chrome { position: absolute; top: 14%; right: 5%; z-index: 7; }
.ll-asset-hero__lace,
.ll-asset-hero__butterfly,
.ll-asset-hero__frame,
.ll-asset-hero__stamp { display: none !important; }

.ll-ornamental-category-nav {
  position: relative;
  display: grid;
  grid-template-columns: 1fr repeat(5, auto) 1fr;
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
  min-height: 96px;
  padding-inline: clamp(18px, 4vw, 64px);
  background: var(--lunar-paper);
  border-bottom: 1px solid var(--lunar-black);
}
.ll-ornamental-category-nav__line { height: 1px; background: currentColor; }
.ll-ornamental-category-nav a { position: relative; color: inherit; font: 800 12px/1 var(--sans, Arial, sans-serif); text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.ll-ornamental-category-nav a::before { display: block; width: 10px; height: 10px; margin: 0 auto 9px; content: ""; background: var(--lunar-silver); border: 1px solid currentColor; border-radius: 50%; }
.ll-ornamental-category-nav .is-astrology::before { box-shadow: inset 3px 0 0 var(--lunar-blue); }
.ll-ornamental-category-nav .is-tarot::before { background: var(--lunar-pink); }
.ll-ornamental-category-nav .is-bazi::before { border-radius: 0; background: var(--lunar-yellow); }
.ll-ornamental-category-nav .is-manifestation::before { background: var(--lunar-lilac); transform: rotate(45deg); border-radius: 2px; }
.ll-ornamental-category-nav .is-library::before { background: var(--lunar-black); }

.ll-asset-today { position: relative; padding-top: clamp(126px, 11vw, 168px); padding-bottom: 112px; }
.ll-today-lace-header { position: absolute; top: 0; right: 0; left: 0; z-index: 4; }
.ll-asset-today__cards { display: grid; place-items: center; }
.ll-today-card-frame { position: relative; width: min(360px, 76%); padding: 22px; background: var(--lunar-pink); border: 1px solid var(--lunar-paper); outline: 1px solid var(--lunar-paper); outline-offset: -10px; }
.ll-asset-today__cards figure { position: relative; inset: auto; width: 100%; padding: 8px; transform: none; }
.ll-today-card-frame__label { display: block; padding: 12px 4px 2px; color: var(--lunar-black); font: 850 12px/1.2 ui-monospace, Consolas, monospace; text-align: center; }
.ll-today-divider { position: absolute; right: clamp(28px, 6vw, 96px); bottom: 38px; left: clamp(28px, 6vw, 96px); width: auto; }
.ll-asset-today__echo,
.ll-asset-today__lace,
.ll-asset-today__botanical { display: none !important; }

/* Category previews use their images as framed architecture. */
.ll-world-preview figure { margin: clamp(24px, 4vw, 56px); min-height: 520px; border: 1px solid var(--lunar-black); outline: 1px solid var(--lunar-black); outline-offset: -10px; }
.ll-world-preview figure > img:first-child { inset: 8% 12%; width: 76%; height: 78%; transform: none !important; }
.ll-world-preview__detail { right: -2%; bottom: -3%; width: 32%; max-height: 42%; transform: none !important; }
.ll-world-preview--astrology .ll-world-preview__detail { top: -2%; right: -2%; bottom: auto; width: 22%; max-height: 28%; border: 1px solid var(--lunar-black); border-radius: 50%; }
.ll-world-preview--tarot figure { display: grid; grid-template-columns: 1fr 1fr; place-items: center; gap: 8px; padding: 10%; }
.ll-world-preview--tarot figure > img,
.ll-world-preview--tarot figure > img:first-child,
.ll-world-preview--tarot figure > img:nth-child(2) { position: static; width: 78%; height: auto; transform: none; }
.ll-world-preview--bazi .ll-world-preview__detail { right: 0; bottom: 0; width: 34%; padding: 8px; background: var(--lunar-paper); border-top: 1px solid var(--lunar-black); border-left: 1px solid var(--lunar-black); }
.ll-world-preview--manifestation .ll-world-preview__detail { left: -3%; right: auto; bottom: -5%; width: 38%; }

/* Landing illustrations are composed inside a frame. */
.ll-structural-visual { display: grid; place-items: center; padding: clamp(42px, 6vw, 88px); }
.ll-structural-visual .ll-zine-figure { position: relative; inset: auto; top: auto; right: auto; bottom: auto; left: auto; width: auto; margin: 0; transform: none; }
.ll-illustration-frame,
.ll-card-stage,
.ll-bazi-print-field,
.ll-letter-frame { position: relative; width: min(600px, 88%); min-height: 590px; border: 1px solid var(--lunar-black); outline: 1px solid var(--lunar-black); outline-offset: -10px; }
.ll-illustration-frame--celestial { background: color-mix(in srgb, var(--lunar-blue) 24%, var(--lunar-paper)); }
.ll-illustration-frame--celestial .ll-collage__main { position: absolute; top: 8%; left: 12%; width: 70%; }
.ll-illustration-frame--celestial .ll-collage__secondary { position: absolute; right: -6%; bottom: 5%; width: 38%; border: 1px solid var(--lunar-black); }
.ll-frame-caption { position: absolute; right: clamp(40px, 7vw, 100px); bottom: clamp(20px, 4vw, 54px); z-index: 9; padding: 8px 12px; color: var(--lunar-paper); background: var(--lunar-black); border: 1px solid var(--lunar-paper); font: 800 10px/1 ui-monospace, Consolas, monospace; }

.ll-card-stage { display: grid; grid-template-columns: .7fr 1.2fr .7fr; align-items: center; gap: 12px; padding: 42px 32px 58px; color: var(--lunar-paper); background: var(--lunar-wine); border-color: var(--lunar-paper); outline-color: var(--lunar-paper); }
.ll-card-stage .ll-collage__fan-card { width: 100%; }
.ll-card-stage .ll-collage__fan-card--three { z-index: 3; }
.ll-card-stage .ll-collage__fan-card--one,
.ll-card-stage .ll-collage__fan-card--two { align-self: end; opacity: .84; }
.ll-card-stage__rose { left: -10%; bottom: -8%; width: 34%; }
.ll-collage--tarot .ll-tarot-numeral { top: 3%; left: 50%; bottom: auto; z-index: 1; color: rgba(255, 194, 218, .35); transform: translateX(-50%); }
.ll-collage--tarot .ll-tarot-online { right: auto; bottom: 4%; left: 50%; transform: translateX(-50%); white-space: nowrap; }

.ll-bazi-print-field { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; padding: 24px; background: var(--lunar-yellow); }
.ll-bazi-print-field .ll-collage__main,
.ll-bazi-print-field .ll-collage__secondary { align-self: center; width: 100%; mix-blend-mode: normal; }
body.archive-zine .ll-collage--bazi .ll-bazi-print-field .ll-collage__main .ll-zine-image,
body.archive-zine .ll-collage--bazi .ll-bazi-print-field .ll-collage__secondary .ll-zine-image { height: auto; min-height: 0; background: var(--lunar-paper); mix-blend-mode: normal; }
.ll-bazi-print-field .ll-zine-image img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
.ll-bazi-print-field .ll-collage__diagram { position: absolute; right: 4%; bottom: 4%; width: 38%; background: var(--lunar-paper); border: 1px solid var(--lunar-black); }
.ll-collage--bazi .ll-bazi-elements { top: auto; right: 7%; bottom: 3%; left: 7%; display: grid; grid-template-columns: repeat(5, 1fr); height: auto; }
.ll-collage--bazi .ll-bazi-elements span { position: static; display: grid; min-height: 68px; place-items: center; color: var(--lunar-black); text-shadow: none; }
.ll-collage--bazi .ll-bazi-elements b { font: 700 28px/1 "Noto Serif CJK SC", "Songti SC", serif; }
.ll-collage--bazi .ll-bazi-elements i { border: 0; padding: 0; box-shadow: none; background: transparent; }

/* Dark hero panels retain print texture without sacrificing reading contrast. */
body[data-archive-section="tarot"] .ll-zine-hero-copy .ll-zine-deck,
body[data-archive-section="manifestation"] .ll-zine-hero-copy .ll-zine-deck,
body[data-archive-section="bazi"] .ll-zine-hero-copy .ll-zine-deck { color: var(--lunar-paper-light); }
body[data-archive-section="tarot"] .ll-zine-hero-copy .ll-zine-deck p,
body[data-archive-section="manifestation"] .ll-zine-hero-copy .ll-zine-deck p,
body[data-archive-section="bazi"] .ll-zine-hero-copy .ll-zine-deck p { color: inherit; }
body[data-archive-section="tarot"] .ll-zine-hero-copy .typewritten-label,
body[data-archive-section="manifestation"] .ll-zine-hero-copy .typewritten-label,
body[data-archive-section="bazi"] .ll-zine-hero-copy .typewritten-label,
body[data-archive-section="tarot"] .ll-zine-hero-copy .ll-file-line,
body[data-archive-section="manifestation"] .ll-zine-hero-copy .ll-file-line,
body[data-archive-section="bazi"] .ll-zine-hero-copy .ll-file-line { color: color-mix(in srgb, var(--lunar-paper-light) 76%, var(--world-primary)); }

.ll-letter-frame { display: grid; place-items: center; padding: 42px; background: var(--lunar-baby); }
.ll-letter-frame .ll-collage__main { width: min(420px, 82%); }
.ll-letter-frame__botanical { left: -9%; bottom: -7%; width: 38%; }
.ll-letter-frame__butterfly { position: absolute; top: -5%; right: -5%; width: 24%; max-height: 28%; object-fit: contain; border: 1px solid var(--lunar-black); border-radius: 50%; }
.ll-collage--manifestation .ll-manifest-date { top: 3%; left: 50%; transform: translateX(-50%); }
.ll-collage--manifestation .ll-frame-caption { right: 50%; bottom: 4%; transform: translateX(50%); }

.ll-illustration-frame--library { display: grid; place-items: center; padding: 40px; background: var(--lunar-blue); }
.ll-illustration-frame--library .ll-collage__main { width: min(450px, 82%); }
.ll-library-frame-flower { left: -8%; bottom: -7%; width: 34%; }

/* Nested documents keep a quieter version of the same structural trim. */
.archive-document { margin-top: clamp(86px, 9vw, 124px) !important; overflow: visible; outline: 1px solid color-mix(in srgb, var(--world-primary) 62%, var(--lunar-black)); outline-offset: -9px; }
.archive-document .ll-world-structure { top: calc(-1 * clamp(86px, 9vw, 124px)); bottom: auto; height: clamp(86px, 9vw, 124px); }
.archive-document .ll-world-structure__marker { top: auto; right: 18px; bottom: 6px; }
.archive-document .ll-world-structure__side { display: none; }
.ll-document-divider { margin: 28px 0 12px; }
.archive-document-sections .archive-reference-section { position: relative; }
.archive-document-sections .archive-reference-section::before { position: absolute; top: 0; left: 0; width: 52px; height: 3px; content: ""; background: var(--world-primary); }

/* Library ornaments become cover trim, frame corner, and tab. */
body.archive-zine .ll-library-cover > div:first-of-type { min-width: 0; overflow: visible; color: var(--lunar-black); }
body.archive-zine .ll-library-cover > div:first-of-type p { color: var(--lunar-black) !important; }
body.archive-zine .ll-library-cover h1 { max-width: 100%; color: var(--lunar-black); font-size: 54px; line-height: .84; letter-spacing: 0; overflow-wrap: normal; word-break: normal; }
.ll-library-cover-visual { padding-top: clamp(58px, 6vw, 88px); }
.ll-library-cover-visual > .ll-library-ornament { top: 0 !important; right: 0; left: 0 !important; width: 100% !important; height: clamp(58px, 6vw, 88px) !important; object-fit: cover; object-position: 50% 68%; opacity: .86; transform: none !important; }
.ll-library-cover-visual > .ll-library-flower { bottom: -4% !important; left: -3% !important; width: 30% !important; transform: none !important; }
.ll-library-cover-visual > .ll-library-butterfly { top: 12% !important; right: 2% !important; width: 18% !important; max-height: 22%; object-fit: contain; transform: none !important; border: 1px solid var(--lunar-black); border-radius: 50%; }
.ll-library-cover-visual figure { border: 1px solid var(--lunar-black); outline: 1px solid var(--lunar-black); outline-offset: -10px; }

/* Reports read as a publication shelf inside one ornamental catalogue frame. */
.reports-hub-page { position: relative; }
.reports-hub-hero { padding-top: clamp(126px, 11vw, 170px) !important; background-image: url("/assets/lunar/ornaments/lace/lace-floral-border.webp"); background-repeat: no-repeat; background-position: center top; background-size: 100% clamp(62px, 7vw, 98px); }
.reports-hub-groups { margin: 0 clamp(18px, 4vw, 64px) 64px; border: 1px solid var(--lunar-black); outline: 1px solid var(--lunar-pink); outline-offset: -9px; }
.reports-hub-card { border: 0 !important; border-bottom: 1px solid var(--lunar-black) !important; }

body.archive-zine .site-header .auth-nav a,
body.archive-zine .site-header .auth-link-button { color: var(--lunar-black); background: var(--lunar-paper-light); border-color: var(--lunar-black); }

@media (max-width: 899px) {
  .ll-world-structure__side { display: none; }
  .ll-landing-frame { margin-inline: 0; border-inline: 0; outline-offset: -6px; }
  .ll-asset-hero { padding-top: 72px; }
  .ll-ornamental-category-nav { grid-template-columns: repeat(5, auto); justify-content: start; overflow-x: auto; min-height: 88px; padding-inline: 20px; }
  .ll-ornamental-category-nav__line { display: none; }
  .ll-structural-visual { padding: 34px 20px 50px; }
  .ll-illustration-frame,
  .ll-card-stage,
  .ll-bazi-print-field,
  .ll-letter-frame { width: min(620px, 92%); }
  .ll-world-preview figure { margin: 24px; }
  .ll-asset-hero__composition { border-top: 1px solid var(--lunar-black); border-left: 0; }
}

@media (max-width: 560px) {
  .ll-lace-header { height: 62px; }
  .ll-bow-node { width: 66px; height: 50px; }
  .ll-pearl-divider__pearls i:nth-child(n+4) { display: none; }
  .ll-asset-hero__moon { top: 13%; left: 10%; width: 80%; box-shadow: 8px 8px 0 var(--lunar-blue); }
  .ll-asset-hero__flower { width: 42%; }
  .ll-asset-hero__chrome { top: 12%; right: 2%; }
  .ll-asset-today { padding-top: 122px; }
  .ll-today-card-frame { width: min(300px, 88%); }
  .ll-world-preview figure { min-height: 390px; }
  .ll-illustration-frame,
  .ll-card-stage,
  .ll-bazi-print-field,
  .ll-letter-frame { min-height: 450px; width: 100%; }
  .ll-card-stage { grid-template-columns: .65fr 1.2fr .65fr; gap: 6px; padding: 36px 16px 52px; }
  .ll-bazi-print-field { grid-template-columns: 1fr; padding: 16px; }
  .ll-bazi-print-field .ll-collage__secondary { display: none; }
  .ll-bazi-print-field .ll-collage__diagram { right: 2%; bottom: 2%; width: 48%; }
  .ll-letter-frame { padding: 28px 16px; }
  .ll-letter-frame .ll-collage__main { width: 78%; }
  .ll-letter-frame__butterfly { width: 28%; }
  .archive-document { margin-top: 84px !important; }
  .archive-document .ll-world-structure { top: -84px; height: 84px; }
  .ll-library-cover-visual > .ll-library-butterfly { width: 23% !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ll-bow-node,
  .ll-chrome-marker,
  .ll-world-structure { animation: none !important; }
}
